#ifndef OBJ01_H
	#define OBJ01_H
	
	#ifdef __cplusplus
	extern "C"{
	#endif



int CalcSine();
int CalcAngle();
inline int Obj01();
inline int Sonic_Display();
int Sonic_RecordPos();
inline int Sonic_Water();
int Obj01_MdNormal_Checks();
inline int Obj01_MdAir();
inline int Obj01_MdRoll();
inline int Obj01_MdJump();
inline int Sonic_Move();
int Obj01_CheckWallsOnGround();
inline int Sonic_MoveLeft();
inline int Sonic_MoveRight();
inline int Sonic_RollSpeed();
inline int Sonic_RollLeft();
inline int Sonic_RollRight();
int Sonic_ChgJumpDir();
int Sonic_LevelBound();
inline int Sonic_Roll();
int Sonic_Jump();
int Sonic_JumpHeight();
inline int Sonic_Super();
inline int Sonic_CheckSpindash();
inline int Sonic_SlopeResist();
inline int Sonic_RollRepel();
int Sonic_SlopeRepel();
int Sonic_JumpAngle();
int Sonic_DoLevelCollision();
int Sonic_ResetOnFloor(char label);
inline int Obj01_Hurt();
inline int Sonic_HurtStop();
inline int Sonic_HurtInstantRecover();
inline int Obj01_Dead();
inline int CheckGameOver();
inline int Obj01_Gone();
inline int Obj01_Respawning();
int Sonic_Animate();
int AnglePos();
int Sonic_Angle();
int Floor_ChkTile();
int FindFloor();
int FindFloor2();
int Obj_CheckInFloor();
int FindWall();
int FindWall2();
inline int CalcRoomInFront();
inline int CalcRoomOverHead();
int Sonic_CheckFloor();
inline int ChkFloorEdge();
int ChkFloorEdge_Part2();
inline int CheckRightCeilingDist();
int CheckRightWallDist();
int CheckRightWallDist_Part2();
int CheckCeilingDist();
inline int CheckSlopeDist();
inline int CheckLeftCeilingDist();
int CheckLeftWallDist();
int CheckLeftWallDist_Part2();
int LoadSonicDynPLC();
int KillCharacter();
int DisplaySprite();
int ObjectMoveAndFall();
int ObjectMove();
inline int TouchResponse();
inline void PositionCamera(short x, short y);

// additional temporary storage
int i;
int n;
int stack[16];

// quick and dirty fix to force a function return to exit the object
char double_return;

// quick and dirty fix for external object variables
char	a1_status;/////////////////////!!! (a1)
char	a1_width_pixels;///////////////!!! (a1)
short	a1_x_pos;//////////////////////!!! (a1)

char	Update_HUD_lives_2P;
char	Update_HUD_rings_2P;
char	Update_HUD_timer_2P;
char	Update_HUD_score_2P;
char	Two_player_mode;

short	Water_Level_1;
char	Palette_frame_count;
char	Super_Sonic_palette;
short	Super_Sonic_frame_count;

char	Water_flag;
char	Extra_life_flags_2P;

char	Control_Locked;
short	Chain_Bonus_counter;
char	Current_Boss_ID;

short	Level_Inactive_flag;
short	Timer_frames;
short	Debug_object;
short	Debug_placement_mode;
short	Debug_mode_flag;
char	Emerald_count;
char	Continue_count;
char	Super_Sonic_flag;
char	Time_Over_flag;

char	Update_HUD_lives;
char	Update_HUD_rings;
char	Update_HUD_timer;
char	Update_HUD_score;

char	Update_Bonus_score;
short	Chain_Bonus_counter;
short	Perfect_rings_left;

char	Time_Over_flag;
char	Time_Over_flag_2P;

char	Last_star_pole_hit;
char	Last_star_pole_hit_2P;

int		Timer;
short	Timer_minute_word;
char	Timer_minute;
char	Timer_second;
char	Timer_millisecond;


	#ifdef __cplusplus
	}
	#endif
#endif
