Skip to content

Commit

Permalink
feat: move ecs tools & gizmo to extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Feb 13, 2025
1 parent 4c15436 commit 0ba144e
Show file tree
Hide file tree
Showing 12 changed files with 764 additions and 547 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ jobs:
if not exist ../out/pl_draw_backend_ext.dll exit 1
if not exist ../out/pl_draw_ext.dll exit 1
if not exist ../out/pl_ecs_ext.dll exit 1
if not exist ../out/pl_ecs_tools_ext.dll exit 1
if not exist ../out/pl_gizmo_ext.dll exit 1
if not exist ../out/pl_gpu_allocators_ext.dll exit 1
if not exist ../out/pl_graphics_ext.dll exit 1
if not exist ../out/pl_image_ext.dll exit 1
Expand Down Expand Up @@ -237,6 +239,8 @@ jobs:
test -f ./out/pl_draw_backend_ext.dylib || exit 1
test -f ./out/pl_draw_ext.dylib || exit 1
test -f ./out/pl_ecs_ext.dylib || exit 1
test -f ./out/pl_ecs_tools_ext.dylib || exit 1
test -f ./out/pl_gizmo_ext.dylib || exit 1
test -f ./out/pl_gpu_allocators_ext.dylib || exit 1
test -f ./out/pl_graphics_ext.dylib || exit 1
test -f ./out/pl_image_ext.dylib || exit 1
Expand Down Expand Up @@ -374,6 +378,8 @@ jobs:
test -f ./out/pl_draw_backend_ext.so || exit 1
test -f ./out/pl_draw_ext.so || exit 1
test -f ./out/pl_ecs_ext.so || exit 1
test -f ./out/pl_ecs_tools_ext.so || exit 1
test -f ./out/pl_gizmo_ext.so || exit 1
test -f ./out/pl_gpu_allocators_ext.so || exit 1
test -f ./out/pl_graphics_ext.so || exit 1
test -f ./out/pl_image_ext.so || exit 1
Expand Down
522 changes: 323 additions & 199 deletions sandbox/pl_ecs_tools.c → extensions/pl_ecs_tools_ext.c

Large diffs are not rendered by default.

30 changes: 19 additions & 11 deletions sandbox/pl_ecs_tools.h → extensions/pl_ecs_tools_ext.h
Original file line number Diff line number Diff line change
@@ -1,42 +1,50 @@

/*
pl_ecs_tools.h
pl_ecs_tools_ext.h
*/

/*
Index of this file:
// [SECTION] header mess
// [SECTION] APIs
// [SECTION] includes
// [SECTION] forward declarations
// [SECTION] public api
// [SECTION] public api structs
*/

//-----------------------------------------------------------------------------
// [SECTION] header mess
//-----------------------------------------------------------------------------

#ifndef PL_ECS_TOOLS_H
#define PL_ECS_TOOLS_H
#ifndef PL_ECS_TOOLS_EXT_H
#define PL_ECS_TOOLS_EXT_H

//-----------------------------------------------------------------------------
// [SECTION] APIs
//-----------------------------------------------------------------------------

#define plEcsToolsI_version (plVersion){0, 1, 0}

//-----------------------------------------------------------------------------
// [SECTION] includes
//-----------------------------------------------------------------------------

#include <stdint.h>
#include <stdbool.h>

//-----------------------------------------------------------------------------
// [SECTION] forward declarations
//-----------------------------------------------------------------------------

// external
typedef struct _plApiRegistryI plApiRegistryI; // pl.h
typedef struct _plComponentLibrary plComponentLibrary; // pl_ecs_ext.h
typedef union _plEntity plEntity;
typedef union _plEntity plEntity; // pl_ecs_ext.h

//-----------------------------------------------------------------------------
// [SECTION] public api
// [SECTION] public api structs
//-----------------------------------------------------------------------------

bool pl_show_ecs_window(plEntity* ptSelectedEntity, uint32_t uSceneHandle, bool*);
typedef struct _plEcsToolsI
{
bool (*show_ecs_window)(plEntity* ptSelectedEntity, uint32_t uSceneHandle, bool*);
} plEcsToolsI;

#endif // PL_ECS_TOOLS_H
#endif // PL_ECS_TOOLS_EXT_H
Loading

0 comments on commit 0ba144e

Please sign in to comment.