// Header File // Created 01/01/2004; 16:21:16 //Gestion de la racket fantôme //Interruption #define INT1_GHOST 8 #define __INT1_GHOST_FREQUENCY 1028 static unsigned short __COUNTER_GHOST=0; //Interruption BOOL StartIntGhost=FALSE; //Créer le Bonus Ghost void Bonus_CreateGhost (unsigned char item) { //Si Bonus existe if (Racket [item]->ghost) return; //Arrête interruption StartIntGhost=FALSE; Racket [item]->ghost=TRUE; Racket [item]->ghost_dir=1; Racket [item]->ghost_xpos=0; Racket [item]->ShowGhost=FALSE; Racket [item]->ghost_key=FALSE; //Démarre interruption StartIntGhost=TRUE; } //Dessine Ghost void Bonus_DrawGhost (void) { short x1,x2; //Parcours rackets for (int i=0;ighost && Racket [i]->ShowGhost) { //A droite if (Racket [i]->ghost_dir==1) { x1=Racket [i]->xpos+15+Racket [i]->ghost_xpos-28; x2=x1-22; } //A Gauche else { x1=Racket [i]->xpos+15-Racket [i]->ghost_xpos; x2=x1+22; } //Dessine le plus loin if (Racket [i]->ghost_xpos>13) FastGraySprite32_MASK_R (x1,Racket [i]->ypos,9,SPRITE_RACKETS [10][0],ScreenBuffer); //Dessine le plus près if (Racket [i]->ghost_xpos>37) FastGraySprite32_MASK_R (x2,Racket [i]->ypos,9,SPRITE_RACKETS [9][0],ScreenBuffer); } } } //Efface Bonus Ghost void Bonus_DeleteGhost (unsigned char item) { //Arrête interruption StartIntGhost=FALSE; Racket [item]->ghost=FALSE; //Démarre interruption StartIntGhost=TRUE; }