mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Move Entity storage structure to cpp
This commit is contained in:
@@ -34,6 +34,17 @@
|
||||
#include <numeric>
|
||||
#include <vector>
|
||||
|
||||
union Entity
|
||||
{
|
||||
uint8_t pad_00[0x200];
|
||||
EntityBase base;
|
||||
// Provide a constructor as EntityBase is not trivially constructible
|
||||
Entity()
|
||||
: pad_00()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
static Entity _entities[MAX_ENTITIES];
|
||||
static std::array<std::list<uint16_t>, EnumValue(EntityType::Count)> gEntityLists;
|
||||
static std::vector<uint16_t> _freeIdList;
|
||||
|
||||
@@ -15,29 +15,12 @@
|
||||
#include <array>
|
||||
|
||||
#pragma pack(push, 1)
|
||||
/**
|
||||
* Entity structure.
|
||||
* size: 0x0200
|
||||
*/
|
||||
union Entity
|
||||
{
|
||||
uint8_t pad_00[0x200];
|
||||
EntityBase base;
|
||||
// Provide a constructor as EntityBase is not trivially constructible
|
||||
Entity()
|
||||
: pad_00()
|
||||
{
|
||||
}
|
||||
};
|
||||
assert_struct_size(Entity, 0x200);
|
||||
|
||||
struct EntitiesChecksum
|
||||
{
|
||||
std::array<std::byte, 20> raw;
|
||||
|
||||
std::string ToString() const;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
void ResetAllEntities();
|
||||
|
||||
Reference in New Issue
Block a user