Files
isaac-port/src/entity_save_state.h
T
shweetandClaude Opus 5.5 48933cd312 Curation round 9: floors and walls, room transitions, collision, the first enemies, saving, damage, pickups
Seven agents took over the backdrop's floor and wall rendering, room transitions (StartRoomTransition, on_leave,
room_enter), grid collision with tear hits and decal baking, Entity_NPC's core with the AI dispatch and the first
enemies (flies, Gaper, Pooter, Clotty, Horf, Dip, Spider), the run's save, player damage, PlayerManager::Update,
ShowName, pickups, slots and the common effects. Integration added LuaEngine::PostNewLevel/PostNewRoom, one shared
lua_callback_check (4 copies merged) and the enemy type range the original checks.
Under gdb a run draws its rooms with floors and walls, walks between rooms, fights Gapers with contact damage and the
damage flash, and collects pickups. Next: tears hitting enemies, pathfinding, item pedestals, death.
2891 functions taken over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 08:24:38 -05:00

46 lines
1.3 KiB
C++

#pragma once
#include "classes.h"
#include <array>
#include <cstdint>
#include <memory>
#include <optional>
constexpr int ENTITY_SAVE_EXTRA_SIZE = 32;
// The bytes a saved entity may carry for a mod.
using EntitySaveExtraData = std::array<uint8_t, ENTITY_SAVE_EXTRA_SIZE>;
// 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<EntitySaveExtraData> extraData;
std::shared_ptr<EntitySaveState> 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;
};