conversion to c by gemini 4 argon
This commit is contained in:
1 parent
b70e2d21d2
commit
f9356f9ba7
369 files changed
+18074
-107634
No files matched your search
+15
-14
@@ -1,38 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
#include <Core/Common/String.h>
|
||||
#include <Core/Container/Vector.h>
|
||||
#include <Core/Memory/MemoryArena.h>
|
||||
#include <Entity/Entity.h>
|
||||
|
||||
struct Archive;
|
||||
struct EntityManager;
|
||||
typedef struct Archive Archive;
|
||||
typedef struct EntityManager EntityManager;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
typedef struct WorldFileHeader WorldFileHeader;
|
||||
struct WorldFileHeader
|
||||
{
|
||||
uint32 Magic = 0x444C574A; // 'JWLD' in little-endian
|
||||
uint32 Magic; // 0x444C574A ('JWLD' in little-endian)
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
constexpr uint32 kWorldMagic = 0x444C574A; // 'JWLD'
|
||||
constexpr uint32 kWorldVersion = 1;
|
||||
#define kWorldMagic ((uint32)0x444C574A) // 'JWLD'
|
||||
#define kWorldVersion ((uint32)1)
|
||||
|
||||
typedef struct World World;
|
||||
struct World
|
||||
{
|
||||
Arena* WorldArena = nullptr;
|
||||
EntityManager* EntityManager = nullptr;
|
||||
Arena* WorldArena;
|
||||
EntityManager* EntityManager;
|
||||
};
|
||||
|
||||
void InitWorld(NonNullPtr<World> world, NonNullPtr<Arena> arena);
|
||||
void ShutdownWorld(NonNullPtr<World> world);
|
||||
void InitWorld(World* world, Arena* arena);
|
||||
void ShutdownWorld(World* world);
|
||||
|
||||
void AddToWorld(NonNullPtr<World> world, NonNullPtr<Entity> entity);
|
||||
void RemoveWorldEntity(World& world, size_t index);
|
||||
void AddToWorld(World* world, Entity* entity);
|
||||
void RemoveWorldEntity(World* world, size_t index);
|
||||
|
||||
void Serialize(Archive& data, World& world, String filename);
|
||||
void SerializeWorld(Archive* data, World* world, String filename);
|
||||
|
||||
#if JULIET_EDITOR
|
||||
void RenderWorldEditorUI(World& world);
|
||||
void RenderWorldEditorUI(World* world);
|
||||
#endif
|
||||
Reference in new issue
Block a user