#pragma once #include "classes.h" #include #include #include #include constexpr int ENTITY_SAVE_EXTRA_SIZE = 32; // The bytes a saved entity may carry for a mod. using EntitySaveExtraData = std::array; // An entity kept while nobody is in its room (a room's saved entities and effects, a Moving Box, Flip's other item): // its kind and seeds, the storage fields its class saves into, a mod's extra bytes, and a second saved entity it carries. // Construction (004d3080) and copies (004d3130) are the defaults. struct EntitySaveState { std::optional extraData; std::shared_ptr child; Vector targetPosition{}; float floatStorage1 = 60; float floatStorage2 = 1; float floatStorage3 = 1; int64_t int64Storage = -1; int intStorage4 = -1; int intStorage5 = -1; int spawnerType = 0; int spawnerVariant = 0; int subtype = 0; int type = 0; int variant = 0; uint32_t dropSeed = 0; uint32_t initSeed = 0; uint32_t intStorage1 = 0; uint32_t intStorage2 = 0; uint32_t intStorage3 = 0; uint32_t intStorage6 = 0; uint32_t intStorage7 = 0; uint32_t intStorage8 = 0; int16_t gridSpawnIdx = 0; uint8_t byteStorage = 1; bool boolStorage1 = false; bool boolStorage2 = false; };