30 lines
613 B
C
30 lines
613 B
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
|
|
/* There should also be an entity mesh type of QUAD1, as billboards
|
|
always face the camera, thus the back side need not be rendered. */
|
|
|
|
typedef enum EntityRenderType
|
|
{
|
|
RENDER_NORMAL,
|
|
RENDER_BILLBOARD,
|
|
RENDER_BILLBOARD_Y
|
|
} EntityRenderType;
|
|
|
|
typedef struct Entity
|
|
{
|
|
enum { MESH_QUAD2, MESH_QUAD_X } mesh_type;
|
|
enum { ORIGIN_CENTER, ORIGIN_BOTTOM } origin;
|
|
EntityRenderType render_type;
|
|
|
|
void *userdata;
|
|
|
|
void (*on_tick) (struct Entity *self);
|
|
|
|
vec3 position;
|
|
float rotation;
|
|
vec3 scale; /* Unused for now. */
|
|
char *texture;
|
|
} Entity;
|