Made input work on fixed timesteps primarily.

This commit is contained in:
2025-11-04 08:41:18 -06:00
parent 6ea4132ff9
commit c9608ad7a7
11 changed files with 136 additions and 53 deletions

View File

@@ -8,24 +8,17 @@
#pragma once
#include "entitydir.h"
#include "entityanim.h"
#include "rpg/entity/player.h"
#include "entitytype.h"
#include "npc.h"
#include "rpg/world/worldpos.h"
#define ENTITY_COUNT 256
typedef struct map_s map_t;
typedef enum {
ENTITY_TYPE_NULL,
ENTITY_TYPE_PLAYER,
ENTITY_TYPE_NPC,
ENTITY_TYPE_COUNT
} entitytype_t;
typedef struct entity_s {
uint8_t id;
entitytype_t type;
entitytypedata_t;
// Movement
entitydir_t direction;
@@ -33,11 +26,6 @@ typedef struct entity_s {
entityanim_t animation;
uint8_t animFrame;
union {
player_t player;
npc_t npc;
};
} entity_t;
extern entity_t ENTITIES[ENTITY_COUNT];