supercasiobros/src/world.h

37 lines
696 B
C
Raw Normal View History

2019-11-16 11:44:09 +01:00
#ifndef WORLD_H
#define WORLD_H
#include <stdint.h>
#define W_CELL_SIZEPX 8
#define W_SIZE_X 160
#define W_SIZE_Y 16
#define W_DEATH -1
#define W_EMPTY 0
#define W_FLOOR 1
#define W_EARTH 2
#define W_STONE 3
#define W_BRICK 4
#define W_BOX 5
#define W_PLATEFORM 6
#define W_TUYAU 7
typedef struct
{
char type;
int state; // numéro de tile
int state2; // visible, invisible, téléporteur/en train de tirer (canon par exemple)
} world_t;
typedef world_t world[W_SIZE_X][W_SIZE_Y];
world_t world_get(int x, int y);
void display_cell(int cx, int cy, int sx, int sy);
void world_set(world const * const w);
2019-11-16 12:02:30 +01:00
void world_draw(int x, int y);
2019-11-16 11:44:09 +01:00
#endif