// Header File
// Created 9/4/2004; 2:23:14 PM

#include <tigcclib.h>
#include "extgraph.h"


//SOME SPECTACUPEDOSOSITY-UBERLY AWESOME ENUMERATIONS
enum MarioStates {mss_JumpRight, mss_StandRight, mss_WalkRight, mss_SwitchRight, mss_JumpLeft, mss_StandLeft, mss_WalkLeft, mss_SwitchLeft, mss_Dead, mss_GrabLeft, mss_GrabRight, mss_ClimbLeft, mss_ClimbRight};
enum BigMarioStates {msb_JumpRight, msb_StandRight, msb_WalkRight, msb_SwitchRight, msb_JumpLeft, msb_StandLeft, msb_WalkLeft, msb_SwitchLeft, msb_CrouchRight, msb_CrouchLeft, msb_MiniRight1, msb_MiniRight2, msb_MiniLeft, msb_MiniLeft2, msb_ThrowRight, msb_ThrowLeft, msb_GrabLeft, msb_GrabRight, msb_ClimbLeft, msb_ClimbRight};
enum Directions {RIGHT, LEFT, UP, DOWN};
enum MarioTypes {m_Small, m_Big, m_Fire, m_Dead};
enum Particles {p_Null, p_Brick, p_Fire, p_Explosion, p_Shroom, p_Star, p_Flower, p_SpinCoin, p_Score, p_Hammer};
enum ParticleProperties {p_X, p_Y, p_Type, p_YCmp, p_Dir, p_LastX, p_Life};
enum Colors_or_BackColors {col_White, col_Gray, col_DarkGray, col_Black};
enum Enimies {e_X, e_Y, e_Type, e_YCmp, e_Dir, e_Ani, e_Life};
enum MapTypes {mt_Platform, mt_Water, mt_Bowser, mt_BulletBill};
enum EnemyTypes {eGoomba, eKoopa, eAirKoopa, eBuzzy, eLakutu, eSpiny, eSpinyEgg, eHammer, eCheep, eAirCheep, eBullet, eSquid, ePlant, ePodobo, eShell, eFlameCW45, eFlameCW315, eFlameCW225, eFlameCW135, eFlameCCW45, eFlameCCW315, eFlameCCW225, eFlameCCW135, eCannon, eBuzzyShell, eStompedGoomba};	
enum Scenes {scn_Title, scn_Game, scn_Splash, scn_MainMenu, scn_Credits, scn_LoadFile, scn_GameOver};
enum ScoreTypes {sc_Stomp, sc_Fire, sc_Knock, sc_Invince};

//enum EnemyStates {es_Dead};

#define es_Dead -10
#define true 1
#define false 0
#define Max_Enemies 30
#define Max_Particles 14
#define Pi 3.14

//THE EXTERNS FOR THE GAMES SPRITES...
extern unsigned short Wave1[];
extern unsigned short MapSprites[69][48];
//extern short SpriteAni[65][4];		/*Move*/
extern short MarioSprites[27][48];
extern short BigMarioSprites[30][96];
extern short FireMarioSprites[30][96];
extern char SmallSprites[8][24];
extern long WideSprites[2][24];
extern char SmallTallSprites[4][48];



//THE EXTERNS FOR THE GAMES PUBLIC FUNCTIONS
//Draw.c
void GGrayOn();
void GGrayOff();
void gfx_DrawScene(short Scene);
//Physics.c
void phys_DoPhys();
void phys_MarioJump(short Dir);
void phys_ShootBall();
void phys_SpawnEnemy(short PosX, short PosY);
//Collision.c
void coll_DoCollision();
//Main.c
void SCORE(short Type, short x, short y, short KillMethod);
void SpawnScore(short x, short y, short Score);
void KillMario();
void RestartLevel();
void DoSplash();
void ExitGame();

//THE EXTERNS FOR THE GAMES PUBLIC VARIABLS
//Draw.c
extern void *DBuffer;
//All:
//const int true=1;
//const int false=0;
//const short Max_Particles=14;



extern char Map[16][501];
//extern char *Map;
extern short BumpX, BumpY;
extern short Particle[14][7];
extern short Enemy[30][7];
extern short Time, ScrollX, ScrollY;
extern short *ScenePtr;
extern char LevelComplete;
extern char MapQueue[100][10];
extern short Warps[40];

//extern char Level1[16][201];
/*extern char Level2[16][201];
extern char Level3[16][201];
extern char Level4[16][201];
extern char Level5[16][201];*/
/*PARTILE COMPONENTS:
[0]=X Coord
[1]=Y Coord
[2]=Type
[3]=Y Component
[4]=X Component
*/


//SOME UBTASTICALLY COOL TYPES
typedef struct MARIOCHAR
{
	short x,y,YCmp,Direction,JDir,JDir2,Animation,State,IsJumping,Airborn,Transition,Coins,Invincible,Momentum,Swimming,Lives,OnVine,OnFlagpole;
	int Score;
} MARIOCHAR;

typedef struct MAPDATA
{
	short Length,BackColor,Number,Type;
} MAPDATA;

typedef struct CHEATS
{
	short Invincible;
} CHEATS;

//MARIOS PIMP ASS DEFINITION
extern MARIOCHAR Mario;

//THE CURRENT MAPS DEF
extern MAPDATA CurrentMap;

//THE CHEAT STATUS
extern CHEATS Cheats;
