Le nouveau Super Mario Bros pour la gamme des fx9860g https://www.planet-casio.com/Fr/forums/topic15994-1-[addin]-SuperCasioBros-v0.1.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
supercasiobros/include/ennemi.h

51 lines
1.2 KiB

#ifndef ENNEMI_H
#define ENNEMI_H
#include <box.h>
#define ALIVE 1
#define DEAD 0
#define NOMBRE_ENNEMIS 7
extern const int ennemi_widths[NOMBRE_ENNEMIS];
extern const int ennemi_heights[NOMBRE_ENNEMIS];
#define NONE 0
#define GOOMBA_ID 1
#define KOOPA_V_ID 2
#define CARAPACE_VERTE 3
#define KOOPA_R_ID 4
#define CARAPACE_ROUGE 5
#define PLANTE_ID 6
#define GOOMBA(x,y,dir) {GOOMBA_ID,{x,y,ennemi_widths[GOOMBA_ID],ennemi_heights[GOOMBA_ID],dir,0,0,1},ALIVE,0,dir}
#define KOOPA_V(x,y,dir) {KOOPA_V_ID,{x,y,ennemi_widths[KOOPA_V_ID],ennemi_heights[KOOPA_V_ID],dir,0,0,1},ALIVE,0,dir}
#define KOOPA_R(x,y,dir) {KOOPA_R_ID,{x,y,ennemi_widths[KOOPA_R_ID],ennemi_heights[KOOPA_R_ID],dir,0,0,1},ALIVE,0,dir}
#define PLANTE(x,y) {PLANTE_ID,{x,y,ennemi_widths[PLANTE_ID],ennemi_heights[PLANTE_ID],0,0,0,0},ALIVE,0,0}
// Dimensions pr les boites
typedef struct
{
int type :8;
box_t b;
unsigned life :1;
unsigned discovered :1;
int p1 :14;
} ennemi_t;
void ennemiDisplay(ennemi_t const * e);
extern ennemi_t * ennemis_global;
extern int ennemis_global_size;
void ennemiesDisplay();
void ennemiMove(ennemi_t * e);
void ennemiesInit(ennemi_t * table, int s);
#endif