models wip

isolation
Dominik Madarász 2022-09-29 16:16:06 +02:00
parent 8e013c4171
commit e718164544
46 changed files with 83 additions and 83 deletions

View File

@ -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}
)

View File

@ -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"

View File

@ -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"

View File

@ -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,

View File

@ -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

View File

@ -22,5 +22,5 @@
#include "items_list.c"
// NOTE(zaklaus): Register a spawnable entity
#include "ents/entity_spawnlist.c"
#include "models/entity_spawnlist.c"

View File

@ -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;

View File

@ -1,4 +1,4 @@
#include "ecs/components.h"
#include "models/components.h"
ECS_COMPONENT_DECLARE(Vector2D);
ECS_COMPONENT_DECLARE(Position);

View File

@ -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) \

View File

@ -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);

View File

@ -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

View File

@ -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;

View File

@ -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"

View File

@ -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

View File

@ -1,4 +1,4 @@
#include "ents/items.h"
#include "models/items.h"
#include "world/entity_view.h"
#include "items_list_helpers.h"

View File

@ -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);

View File

@ -3,7 +3,7 @@
#include "world/world.h"
#include "ecs/components.h"
#include "models/components.h"
#define PLAYER_MAX_HP 100.0f

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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) },

View File

@ -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"

View File

@ -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;

View File

@ -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) },

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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"

View File

@ -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);

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"