Added some basic font rendering and texas holdem
This commit is contained in:
@ -8,6 +8,13 @@
|
||||
#pragma once
|
||||
#include "../../libs.h"
|
||||
#include "../../display/spritebatch.h"
|
||||
#include "../../display/texture.h"
|
||||
#include "../../display/tileset.h"
|
||||
|
||||
/** Entity Texture Information */
|
||||
#define ENTITY_ASSET_TEXTURE "world/entity.png"
|
||||
#define ENTITY_WIDTH 32
|
||||
#define ENTITY_HEIGHT ENTITY_WIDTH
|
||||
|
||||
/** Entity ID Definitions */
|
||||
#define ENTITY_TYPE_NULL 0x00
|
||||
@ -19,6 +26,13 @@
|
||||
/** Count of different types of entities */
|
||||
#define ENTITY_TYPE_COUNT ENTITY_TYPE_PLAYER + 1
|
||||
|
||||
#define ENTITY_DIRECTION_SOUTH 0x00
|
||||
#define ENTITY_DIRECTION_NORTH 0x01
|
||||
#define ENTITY_DIRECTION_WEST 0x02
|
||||
#define ENTITY_DIRECTION_EAST 0x03
|
||||
|
||||
#define ENTITY_STATE_WALKING 0x01
|
||||
|
||||
/** Unique Entity ID */
|
||||
typedef uint8_t entityid_t;
|
||||
|
||||
@ -31,12 +45,15 @@ typedef struct {
|
||||
int32_t gridX, gridY, gridZ;
|
||||
int32_t oldGridX, oldGridY, oldGridZ;
|
||||
float positionX, positionY, positionZ;
|
||||
uint8_t direction;
|
||||
uint32_t state;
|
||||
} entity_t;
|
||||
|
||||
/** Definition for an entity type */
|
||||
typedef struct {
|
||||
void (*entityInit)(entityid_t entityId, entity_t *entity);
|
||||
void (*entityUpdate)(entityid_t entityId, entity_t *entity);
|
||||
void (*entityRender)(entityid_t entityId, entity_t *entity);
|
||||
void (*entityDispose)(entityid_t entityId, entity_t *entity);
|
||||
} entitytype_t;
|
||||
|
||||
@ -47,6 +64,12 @@ typedef struct {
|
||||
|
||||
/** Sprite Batch in the state */
|
||||
spritebatch_t *spriteBatch;
|
||||
|
||||
/** Texture for entities */
|
||||
texture_t *texture;
|
||||
|
||||
/** Divided Tileset for entities */
|
||||
tileset_t *tileset;
|
||||
} entitystate_t;
|
||||
|
||||
/** Global Entity State */
|
||||
|
Reference in New Issue
Block a user