1
0
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:
ζeh Matt
2021-11-24 15:58:16 +02:00
parent c6242fd310
commit 88366bd296
2 changed files with 11 additions and 17 deletions

View File

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

View File

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