Moved code and assets for the game to a seperate folder. Moved jansson and raylib to third_party.
This commit is contained in:
43
src/game/shared/entity.h
Normal file
43
src/game/shared/entity.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef ENTITY_H
|
||||
#define ENTITY_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef uint16_t Entity_ID;
|
||||
|
||||
#define INVALID_ENTITY_ID (Entity_ID)65535
|
||||
|
||||
typedef enum {
|
||||
Entity_Movement_Direction_None,
|
||||
Entity_Movement_Direction_Up,
|
||||
Entity_Movement_Direction_Down,
|
||||
Entity_Movement_Direction_Right,
|
||||
Entity_Movement_Direction_Left,
|
||||
} Entity_Movement_Direction;
|
||||
|
||||
typedef enum {
|
||||
Entity_Type_Snake_Head,
|
||||
Entity_Type_Snake_Body,
|
||||
Entity_Type_Food,
|
||||
} Entity_Type;
|
||||
|
||||
typedef struct {
|
||||
bool active;
|
||||
|
||||
// TODO: SS - Maybe add an ID here.
|
||||
|
||||
Entity_Type type;
|
||||
|
||||
uint16_t x;
|
||||
uint16_t y;
|
||||
|
||||
uint16_t prev_x;
|
||||
uint16_t prev_y;
|
||||
|
||||
Entity_Movement_Direction move_direction;
|
||||
|
||||
Entity_ID child;
|
||||
} Entity;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user