// Header File // Created 01/01/2004; 16:55:07 //Gestion des commandes //Déplacement rackets void KEYS_MoveRacket (unsigned char item) { char incr=Racket [item]->speed_value; BOOL flag=FALSE; //Si plus de joueur if ((item==0xFF) || !StartGameForHumain0 || !incr) return; //Réinitialise vitesse Racket [item]->speed_value=0; //Touche d'accélération if (_keytest (RR_HAND)) incr*=2; //Touches LEFT et RIGHT if (_keytest2 (RR_LEFT)) { incr=-incr; flag=TRUE;} else if (_keytest2 (RR_RIGHT)) flag=TRUE; //Déplace racket if (flag) { Racket [item]->xpos+=incr;} //Double raquette mouvement if (Racket [item]->double_racket && flag) Racket [Racket [item]->double_racket_n]->xpos+=incr; //Gestion Bonus Ghost (Vérfie si non dans le mur) if ((Racket [item]->ghost && flag) && ((Racket [item]->xpos>START_X) && ((Racket [item]->xpos+29)ghost_key=TRUE; Racket [item]->ShowGhost=TRUE; Racket [item]->ghost_xpos++; //Appuie sur HAND if (_keytest2 (RR_HAND)) Racket [item]->ghost_xpos+=2; //Vers la droite if (incr>0) { //Autre sens if (Racket [item]->ghost_dir==1) { Racket [item]->ghost_dir=-1; Racket [item]->ghost_xpos=14; } else Racket [item]->ghost_dir=-1; } //Vers la gauche else { //Autre sens if (Racket [item]->ghost_dir==-1) { Racket [item]->ghost_dir=1; Racket [item]->ghost_xpos=14; } else Racket [item]->ghost_dir=1; } //Dépassement de capacité if (Racket [item]->ghost_xpos>56) Racket [item]->ghost_xpos=56; } else Racket [item]->ghost_key=FALSE; }