/** -- Macros -- **/ //x P.K. #define VERROUILLE if (SDL_LockSurface(ecran)<0) erreur("SDL ne peut pas verrouiller l'écran", NULL) #define VERROUILLE if (SDL_LockSurface(ecran)<0) errormessage(gettext("SDL ne peut pas verrouiller l'écran"), NULL) #define DEVERROUILLE SDL_UnlockSurface(ecran); /** --Définitions -- **/ /* Size of the playground */ #define NIVEWIDTH 16 #define NIVEHEIGHT 15 /*--Directions...--*/ #define HAUT 0 #define BAS 1 #define GAUCHE 2 #define DROITE 3 #define TOUTESDIR 4 /*--Bitmask des commandes--*/ #define CMD_REPOS 0x00 #define CMD_HAUT 0x01 #define CMD_BAS 0x02 #define CMD_GAUCHE 0x04 #define CMD_DROITE 0x08 #define CMD_B1 0x10 #define CMD_B2 0x20 /*--perso.anim--*/ /*-Les 4 directions puis-*/ #define SUPER 4 #define SUPER2 5 #define ICONES 6 #define ANIM_MORT 7 #define REPOS 8 #define GAGNE 9 #define AGONIE 99 /*--Caractéristiques des éléments du décor--*/ /*--pl.bombe--*/ #define BOMBE 1 #define EXPL 2 /*--pl.type--*/ #define LIBRE 0 #define INDESTRUCTIBLE 1 #define DESTRUCTIBLE 2 #define DETRUIT 3 #define BONUS 4 #define SECRETPASSAGE 10 // P.K. #define EXPLOSIF 20 #define MORTEL 21 #define SENSUNIQUE 30 #define EVENEMENT 31 #define CONTINU 32 #define TUNNEL 40 #define CAMOUFL 50 #define SUIVANT 100 #define OPTIONS 101 #define QUITTER 102 #define CESTPARTI 103 #define SAUVECONFIG 104 #define MODEDEJEU 105 #define MODEDEJEUPLUS 106 #define MINNB 110 #define MAXNB 119 #define MINPERSO 120 #define MAXPERSO 151 #define MINTOUCHES 220 #define MAXTOUCHES 229 /*--Actions des personnages--*/ /*--perso.statut--*/ #define MORT 0x0000 #define VIVANT 0x0001 #define INVINCIBLE 0x0002 #define SUPERBOMBE 0x0004 #define INVISIBLE 0x0008 #define RAPIDE 0x0010 #define PARALYSE 0x0020 #define FURIEDESTRUCTRICE 0x0040 #define PASSEMURAILLES 0x0080 #define DETONATEUR 0x0100 /* #define DETON_EXPL 0x0200 */ #define DEGUISE 0x0400 #define PASBOMBES 0x1000 #define ETEINT 0x2000 /*--Pour les évènements--*/ #define AVANT 0 #define APRES 1 /*--Différents bonus--*/ #define FLAMMESB 0 #define ENERGIEB 1 #define POUVOIRB 2 /*--perso.pouvactif--*/ #define INACTIF 0 #define ACTIVATION 10000 #define ACTIF 1 #define TERMINE -2 /*--perso.pouvtype--*/ #define DELAI 0 #define INSTANT 1 #define COMPTEUR 2 /*--Types de calcul du score--*/ #define MODE_STD 0 #define MODE_DEATHMATCH 1 #define MODE_DEATHMATCH_GORE 2 #define NMODES 3 /*--Langues des menus--*/ #define FR 0 #define ENG 1 /* P.K. function macros */ #define max(a,b) a>b ? a : b #define min(a,b) a