33 lines
536 B
C
33 lines
536 B
C
|
#include "raylib.h"
|
||
|
|
||
|
typedef struct Vector2i
|
||
|
{
|
||
|
int x;
|
||
|
int y;
|
||
|
} Vector2i;
|
||
|
|
||
|
typedef struct Entity
|
||
|
{
|
||
|
Vector2i position;
|
||
|
Color color;
|
||
|
} Entity;
|
||
|
|
||
|
typedef struct Tile
|
||
|
{
|
||
|
bool walkable;
|
||
|
Color color;
|
||
|
} Tile;
|
||
|
|
||
|
Entity *createPlayer(Vector2i start_position);
|
||
|
Tile **createMapTiles();
|
||
|
void freeMapTiles(Tile **map_tiles);
|
||
|
void renderEverything(RenderTexture2D target);
|
||
|
|
||
|
void initGame();
|
||
|
void mainLoop();
|
||
|
void endGame();
|
||
|
|
||
|
extern unsigned int const MAP_HEIGHT;
|
||
|
extern unsigned int const MAP_WIDTH;
|
||
|
extern Entity *player;
|
||
|
extern Tile **map;
|