models wip
parent
8e013c4171
commit
e718164544
|
@ -8,14 +8,15 @@ add_library(eco2d-foundation STATIC
|
|||
src/platform/signal_handling.c
|
||||
src/platform/profiler.c
|
||||
|
||||
src/ents/items.c
|
||||
src/ents/entity.c
|
||||
src/ents/device.c
|
||||
src/models/components.c
|
||||
src/models/items.c
|
||||
src/models/entity.c
|
||||
src/models/device.c
|
||||
|
||||
src/ents/prefabs/player.c
|
||||
src/ents/prefabs/vehicle.c
|
||||
src/ents/prefabs/storage.c
|
||||
src/ents/prefabs/furnace.c
|
||||
src/models/prefabs/player.c
|
||||
src/models/prefabs/vehicle.c
|
||||
src/models/prefabs/storage.c
|
||||
src/models/prefabs/furnace.c
|
||||
|
||||
src/pkt/packet.c
|
||||
|
||||
|
@ -36,8 +37,7 @@ add_library(eco2d-foundation STATIC
|
|||
|
||||
src/gen/assets.c
|
||||
|
||||
src/ecs/systems.c
|
||||
src/ecs/components.c
|
||||
src/systems/systems.c
|
||||
|
||||
${PKT_SRCS}
|
||||
)
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
#include "pkt/packet.h"
|
||||
#include "platform/signal_handling.h"
|
||||
#include "net/network.h"
|
||||
#include "ents/entity.h"
|
||||
#include "models/entity.h"
|
||||
#include "world/world_view.h"
|
||||
#include "world/entity_view.h"
|
||||
#include "core/camera.h"
|
||||
#include "platform/profiler.h"
|
||||
|
||||
#include "flecs/flecs_os_api_stdcpp.h"
|
||||
#include "flecs/flecs.h"
|
||||
#include "flecs.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "ecs/systems.h"
|
||||
#include "models/components.h"
|
||||
#include "systems/systems.h"
|
||||
|
||||
#include "packets/pkt_00_init.h"
|
||||
#include "packets/pkt_01_welcome.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "debug/debug_replay.h"
|
||||
#include "core/camera.h"
|
||||
#include "ents/entity.h"
|
||||
#include "models/entity.h"
|
||||
|
||||
#include "cwpack/cwpack.h"
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#include "debug/debug_ui.h"
|
||||
#include "debug/debug_draw.h"
|
||||
#include "raylib.h"
|
||||
#include "ents/prefabs/vehicle.h"
|
||||
#include "models/prefabs/vehicle.h"
|
||||
#include "core/camera.h"
|
||||
#include "world/world.h"
|
||||
#include "core/game.h"
|
||||
#include "sfd.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "models/components.h"
|
||||
|
||||
typedef enum {
|
||||
DITEM_RAW,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "debug/debug_ui.h"
|
||||
#include "world/blocks.h"
|
||||
#include "ents/items.h"
|
||||
#include "models/items.h"
|
||||
#include "net/network.h"
|
||||
|
||||
void
|
||||
|
|
|
@ -22,5 +22,5 @@
|
|||
#include "items_list.c"
|
||||
|
||||
// NOTE(zaklaus): Register a spawnable entity
|
||||
#include "ents/entity_spawnlist.c"
|
||||
#include "models/entity_spawnlist.c"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "core/camera.h"
|
||||
#include "ents/item_placement.h"
|
||||
#include "models/item_placement.h"
|
||||
|
||||
static bool build_submit_placements = false;
|
||||
static bool build_is_in_draw_mode = false;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ecs/components.h"
|
||||
#include "models/components.h"
|
||||
|
||||
ECS_COMPONENT_DECLARE(Vector2D);
|
||||
ECS_COMPONENT_DECLARE(Position);
|
||||
|
@ -24,7 +24,7 @@ ECS_COMPONENT_DECLARE(StreamInfo);
|
|||
|
||||
void ComponentsImport(ecs_world_t *ecs) {
|
||||
ECS_MODULE(ecs, Components);
|
||||
|
||||
|
||||
ECS_COMPONENT_DEFINE(ecs, Vector2D);
|
||||
ECS_COMPONENT_DEFINE(ecs, Position);
|
||||
ECS_COMPONENT_DEFINE(ecs, Velocity);
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
#include "flecs/flecs.h"
|
||||
#include "flecs.h"
|
||||
#include "gen/assets.h"
|
||||
|
||||
#define ecs_get_mut_ex(world, entity, T) \
|
|
@ -1,9 +1,9 @@
|
|||
#include "ents/device.h"
|
||||
#include "ents/entity.h"
|
||||
#include "models/device.h"
|
||||
#include "models/entity.h"
|
||||
#include "world/entity_view.h"
|
||||
#include "world/world.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "models/components.h"
|
||||
|
||||
uint64_t device_spawn(asset_id id) {
|
||||
ecs_entity_t e = entity_spawn(EKIND_DEVICE);
|
|
@ -1,11 +1,11 @@
|
|||
#include "ents/entity.h"
|
||||
#include "models/entity.h"
|
||||
#include "world/entity_view.h"
|
||||
#include "flecs/flecs.h"
|
||||
#include "flecs.h"
|
||||
#include "librg.h"
|
||||
#include "world/world.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "ecs/systems.h"
|
||||
#include "models/components.h"
|
||||
#include "systems/systems.h"
|
||||
#include "zpl.h"
|
||||
|
||||
// NOTE(zaklaus): bring in entity spawnlist
|
|
@ -1,6 +1,6 @@
|
|||
// NOTE(zaklaus): access to spawners
|
||||
#include "ents/prefabs/storage.h"
|
||||
#include "ents/prefabs/furnace.h"
|
||||
#include "models/prefabs/storage.h"
|
||||
#include "models/prefabs/furnace.h"
|
||||
|
||||
static struct {
|
||||
asset_id id;
|
|
@ -1,10 +1,10 @@
|
|||
#include "ents/items.h"
|
||||
#include "ents/entity.h"
|
||||
#include "models/items.h"
|
||||
#include "models/entity.h"
|
||||
#include "world/entity_view.h"
|
||||
#include "world/world.h"
|
||||
#include "world/blocks.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "models/components.h"
|
||||
|
||||
#include "zpl.h"
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
#include "gen/assets.h"
|
||||
#include "world/blocks.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "models/components.h"
|
||||
|
||||
typedef enum {
|
||||
// NOTE(zaklaus): hardcoded fields for placement ops
|
|
@ -1,4 +1,4 @@
|
|||
#include "ents/items.h"
|
||||
#include "models/items.h"
|
||||
#include "world/entity_view.h"
|
||||
#include "items_list_helpers.h"
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#include "furnace.h"
|
||||
#include "ents/device.h"
|
||||
#include "models/device.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "models/components.h"
|
||||
|
||||
uint64_t furnace_spawn(void) {
|
||||
ecs_entity_t e = device_spawn(ASSET_FURNACE);
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "world/world.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "models/components.h"
|
||||
|
||||
#define PLAYER_MAX_HP 100.0f
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
#include "storage.h"
|
||||
#include "ents/device.h"
|
||||
#include "models/device.h"
|
||||
#include "world/world.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "models/components.h"
|
||||
|
||||
uint64_t storage_spawn(void) {
|
||||
ecs_entity_t e = device_spawn(ASSET_CHEST);
|
|
@ -3,7 +3,7 @@
|
|||
#include "world/entity_view.h"
|
||||
#include "world/world.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "models/components.h"
|
||||
|
||||
uint64_t vehicle_spawn(void) {
|
||||
ecs_entity_t e = entity_spawn(EKIND_VEHICLE);
|
|
@ -16,9 +16,9 @@
|
|||
#include "packets/pkt_00_init.h"
|
||||
#include "world/world.h"
|
||||
#include "core/game.h"
|
||||
#include "ents/prefabs/player.h"
|
||||
#include "models/prefabs/player.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "models/components.h"
|
||||
|
||||
#define NETWORK_UPDATE_DELAY 0.100
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
#include "net/network.h"
|
||||
#include "world/entity_view.h"
|
||||
#include "core/camera.h"
|
||||
#include "ents/prefabs/player.h"
|
||||
#include "ents/entity.h"
|
||||
#include "models/prefabs/player.h"
|
||||
#include "models/entity.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "ecs/systems.h"
|
||||
#include "models/components.h"
|
||||
#include "systems/systems.h"
|
||||
|
||||
pkt_desc pkt_00_init_desc[] = {
|
||||
{ PKT_FIELD(CWP_ITEM_POSITIVE_INTEGER, pkt_00_init, view_id) },
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include "pkt/packet_utils.h"
|
||||
#include "net/network.h"
|
||||
#include "packets/pkt_send_keystate.h"
|
||||
#include "ecs/components.h"
|
||||
#include "ecs/systems.h"
|
||||
#include "models/components.h"
|
||||
#include "systems/systems.h"
|
||||
#include "world/world.h"
|
||||
#include "ents/entity.h"
|
||||
#include "models/entity.h"
|
||||
|
||||
#include "debug/debug_replay.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
#include "platform/system.h"
|
||||
#include "pkt/packet_utils.h"
|
||||
#include "ents/item_placement.h"
|
||||
#include "models/item_placement.h"
|
||||
|
||||
typedef struct {
|
||||
float x;
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#include "net/network.h"
|
||||
#include "world/entity_view.h"
|
||||
#include "core/camera.h"
|
||||
#include "ents/prefabs/player.h"
|
||||
#include "models/prefabs/player.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "ecs/systems.h"
|
||||
#include "models/components.h"
|
||||
#include "systems/systems.h"
|
||||
|
||||
pkt_desc pkt_switch_viewer_desc[] = {
|
||||
{ PKT_FIELD(CWP_ITEM_POSITIVE_INTEGER, pkt_switch_viewer, view_id) },
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "ents/items.h"
|
||||
#include "models/items.h"
|
||||
|
||||
void PickItem(ecs_iter_t *it) {
|
||||
Position *p = ecs_field(it, Position, 2);
|
|
@ -1,4 +1,4 @@
|
|||
#include "ents/entity.h"
|
||||
#include "models/entity.h"
|
||||
|
||||
void MovementImpulse(ecs_iter_t *it) {
|
||||
Input *in = ecs_field(it, Input, 1);
|
|
@ -1,5 +1,5 @@
|
|||
#include "debug/debug_draw.h"
|
||||
#include "ents/entity.h"
|
||||
#include "models/entity.h"
|
||||
|
||||
void LeaveVehicle(ecs_iter_t *it) {
|
||||
Input *in = ecs_field(it, Input, 1);
|
|
@ -1,6 +1,6 @@
|
|||
#include "zpl.h"
|
||||
#include "ecs/systems.h"
|
||||
#include "ecs/components.h"
|
||||
#include "systems/systems.h"
|
||||
#include "models/components.h"
|
||||
#include "world/world.h"
|
||||
#include "world/blocks.h"
|
||||
#include "platform/profiler.h"
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
#include "flecs/flecs.h"
|
||||
#include "flecs.h"
|
||||
|
||||
static inline float safe_dt(ecs_iter_t *it) {
|
||||
return zpl_min(it->delta_time, 0.03334f);
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
#include "platform/system.h"
|
||||
#include "gen/assets.h"
|
||||
#include "ents/items.h"
|
||||
#include "models/items.h"
|
||||
|
||||
#define ZPL_PICO
|
||||
#include "zpl.h"
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#include "zpl.h"
|
||||
#include "librg.h"
|
||||
#include "ecs/components.h"
|
||||
#include "ecs/systems.h"
|
||||
#include "models/components.h"
|
||||
#include "systems/systems.h"
|
||||
#include "world/world.h"
|
||||
#include "world/entity_view.h"
|
||||
#include "debug/debug_replay.h"
|
||||
#include "ents/items.h"
|
||||
#include "models/items.h"
|
||||
#include "world/worldgen.h"
|
||||
#include "platform/platform.h"
|
||||
#include "platform/profiler.h"
|
||||
#include "core/game.h"
|
||||
#include "ents/entity.h"
|
||||
#include "models/entity.h"
|
||||
|
||||
#include "packets/pkt_send_librg_update.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include "platform/system.h"
|
||||
#include "librg.h"
|
||||
#include "pkt/packet.h"
|
||||
#include "flecs/flecs.h"
|
||||
#include "flecs.h"
|
||||
#include "world/blocks.h"
|
||||
|
||||
#define WORLD_ERROR_NONE +0x0000
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
#include "zpl.h"
|
||||
#include "platform/system.h"
|
||||
#include "core/game.h"
|
||||
#include "ents/entity.h"
|
||||
#include "models/entity.h"
|
||||
#include "world/entity_view.h"
|
||||
#include "utils/options.h"
|
||||
#include "platform/signal_handling.h"
|
||||
#include "platform/profiler.h"
|
||||
|
||||
#include "flecs/flecs.h"
|
||||
#include "flecs.h"
|
||||
#include "flecs/flecs_os_api_stdcpp.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "ecs/systems.h"
|
||||
#include "models/components.h"
|
||||
#include "systems/systems.h"
|
||||
|
||||
#include "platform/arch.h"
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
#include "world/blocks.h"
|
||||
#include "world/perlin.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "ents/entity.h"
|
||||
#include "ents/prefabs/vehicle.h"
|
||||
#include "ents/items.h"
|
||||
#include "models/components.h"
|
||||
#include "models/entity.h"
|
||||
#include "models/prefabs/vehicle.h"
|
||||
#include "models/items.h"
|
||||
#include "world/blocks_info.h"
|
||||
|
||||
#include "world/worldgen_utils.h"
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
#include "zpl.h"
|
||||
#include "platform/system.h"
|
||||
#include "core/game.h"
|
||||
#include "ents/entity.h"
|
||||
#include "models/entity.h"
|
||||
#include "world/entity_view.h"
|
||||
#include "utils/options.h"
|
||||
#include "platform/signal_handling.h"
|
||||
#include "platform/profiler.h"
|
||||
|
||||
#include "flecs/flecs.h"
|
||||
#include "flecs.h"
|
||||
#include "flecs/flecs_os_api_stdcpp.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "ecs/systems.h"
|
||||
#include "models/components.h"
|
||||
#include "systems/systems.h"
|
||||
|
||||
#include "platform/arch.h"
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
#include "world/blocks.h"
|
||||
#include "world/perlin.h"
|
||||
|
||||
#include "ecs/components.h"
|
||||
#include "ents/entity.h"
|
||||
#include "ents/prefabs/vehicle.h"
|
||||
#include "ents/items.h"
|
||||
#include "models/components.h"
|
||||
#include "models/entity.h"
|
||||
#include "models/prefabs/vehicle.h"
|
||||
#include "models/items.h"
|
||||
#include "world/blocks_info.h"
|
||||
|
||||
#include "world/worldgen_utils.h"
|
||||
|
|
Loading…
Reference in New Issue