// Header File // Created 26/10/2003; 11:06:47 //****************** //Variables globales //****************** //Ptrs DataFiles static void *FileGFX=NULL; static void *FileSND=NULL; static void *FileLVL=NULL; //Entrées handles fichiers SYM_ENTRY *entry_fileGFX; SYM_ENTRY *entry_fileSND; SYM_ENTRY *entry_fileLVL; //Interruptions static BOOL StartInt1=FALSE; static BOOL MAP_StartInt1=FALSE; static BOOL Rackets_anim=FALSE; static BOOL StartIntMonster=FALSE; //Le jeu a commencé pour: static BOOL StartGameForHumain0=FALSE; static BOOL EndAnimForHumain0=FALSE; static BOOL LanceBille=FALSE; //Sélectionne le niveau static unsigned char LEVEL=1; static BOOL LEVEL_DIR=1; //Numéro du scénario static unsigned char MAP_SCENARIO; //Scénarios #define MAP_ORIGINAL_SMALLBOSS 1 //Petit Boss #define MAP_ORIGINAL_BIGBOSS 2 //DOH Boss //Vitesse initial des Billes #define DEFAULT_SPEED_BILLES 85 //Vitesse initial des monstres #define DEFAULT_SPEED_MONSTERS 16 //Vitesse initial des rackets #define DEFAULT_SPEED_RACKETS 100 //Temps d'attente début du jeu #define START_PLAYER_DELAY 20 //Temps d'affichage logo #define LOGO_DELAY 7 static unsigned short COUNTER_LOGO=0; static BOOL EndCounterLogo=FALSE; static BOOL ScrollLevelLogo=FALSE; //Temps d'attente avant de scroller le niveau #define SCROLL_LEVEL_DELAY 1 //Raquette en cours pour HUMAIN static unsigned char HUMAIN0=0; //Mode Graphique //0=Scrolling //1=Dézoom suivant la largeur //2=Dézoom total static unsigned char GRAPHIC_MODE=0; //Constantes décors static unsigned char C_DECORS=1; //Nombres de vies static unsigned char nbrLifes=3; //Buffer contenant le sprite de décors sur 64x64 pixels static unsigned char DecorsBlocks [1024]={}; //Compteur temporaire static volatile unsigned short delay_1Hz=0; static volatile unsigned short delay_80Hz=0; //Appuie touch animations static BOOL TouchKey=FALSE; //********* //FONCTIONS //********* //Optimized rowread unsigned char opt_rowread (register unsigned short row asm("%d0")); #define opt__keytest(row,col) (!!(opt_rowread(1<<(row))&(1<<(col)))) #define _keytest2(rowcol...) (opt__keytest(rowcol)) //Aléatoire2 unsigned long GCL_RandomSeed; unsigned short GCL_Rand (void) { GCL_RandomSeed = GCL_RandomSeed * 1103515245 + 12345; return (unsigned int)(GCL_RandomSeed/65536) % 32768; } unsigned short GCL_Random(unsigned short Max) { return GCL_Rand()%Max;} void GCL_Randomize() { // compute random seed from 0x600017 and FiftyMSecTick unsigned long randnum=255-peekIO(0x600017); //AMS 2.xx ou PedRom if ((!AMS_1xx) || (*(unsigned short *)0x32==(('R'<<8)+'O'))) randnum+=(*((volatile unsigned long*)(_rom_call_addr(4FC))))* (_GrayIsRealHW2()?52:78); GCL_RandomSeed = randnum; } //Déclaration de fonctions void DeleteGame (void); void CREATE_ANIM_BLOCK (short x_block, short y_block, unsigned char block); short Test_Collide_0 (short x0, short y0, short x1, short y1, unsigned char w0, unsigned char h0, unsigned char w1, unsigned char h1); void DrawLifes (void); void Bonus_ActivateColle (unsigned char item); void SetDecors (unsigned char decors); void ENV_SetDecors2 (unsigned char decors);