Six agents took over OnlineEmotes (emote wheel), OnlineStatsScreen's deeds, VictoryRunPrompt, RevivePlayerMenu, HUD, PauseScreen, Minimap, PreloadManager, ProceduralItemManager, Game::LoadBossRushXml, GameState's loading, the menu loose ends, Manager::StartNewGame, LevelGenerator and Level (Game now derives from Level). Integration: completion_widget.h breaks an include loop, call sites moved to the new APIs. --mute (main.cpp) keeps the mixer running at zero gain. build/isaac reaches the main menu by itself (input skips the intro); under gdb, picking a character calls StartNewGame and stops at Game::Start. 1611 functions taken over, boot path 287/615. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
553 lines
24 KiB
C++
553 lines
24 KiB
C++
#include "classes.h"
|
|
|
|
// 00436010
|
|
uint8_t RoomDescriptor::Clear()
|
|
{
|
|
return (uint8_t)this->Flags & 1;
|
|
}
|
|
|
|
// 00456560
|
|
uint32_t RoomDescriptor::PressurePlatesTriggered()
|
|
{
|
|
return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 9),(char)(GHIDRA_UINT(this->Flags) >> 1)) & 0xffffff01;
|
|
}
|
|
|
|
// 00505c30
|
|
uint32_t RoomDescriptor::HasWater()
|
|
{
|
|
return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 0xd),(char)(GHIDRA_UINT(this->Flags) >> 5)) & 0xffffff01;
|
|
}
|
|
|
|
// 005cd640
|
|
uint32_t RoomDescriptor::SacrificeDone()
|
|
{
|
|
return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 10),(char)(GHIDRA_UINT(this->Flags) >> 2)) & 0xffffff01;
|
|
}
|
|
|
|
// 006ef590
|
|
RoomConfig_Room * RoomDescriptor::constructor()
|
|
{
|
|
void *pvVar1;
|
|
void *pvVar2;
|
|
uint32_t *gridSave;
|
|
int gridSavesLeft;
|
|
uint32_t gridSaveOffset;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
|
|
local_8 = 0xffffffff;
|
|
puStack_c = &LAB_00afb307;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
this->GridIndex = -1;
|
|
this->SafeGridIndex = -1;
|
|
this->ListIndex = -1;
|
|
this->Dimension = 0;
|
|
this->Data = (void *)0x0;
|
|
this->OverrideData = (void *)0x0;
|
|
this->AllowedDoors = 0;
|
|
this->DisplayFlags = 0;
|
|
this->VisitedCount = 0;
|
|
this->Flags = 0;
|
|
this->TotalMoneySpent = 0;
|
|
this->ClearCount = 0;
|
|
this->GreedSubType = 0;
|
|
this->PoopCount = 0;
|
|
this->TKeeperCoinSpawns = 0;
|
|
this->PitsCount = 0;
|
|
this->DecorationSeed = 0;
|
|
this->SpawnSeed = 0;
|
|
this->AwardSeed = 0;
|
|
this->BossDeathSeed = 0;
|
|
(this->SavedGridEntities)._begin = (void *)0x0;
|
|
(this->SavedGridEntities)._end = (void *)0x0;
|
|
(this->SavedGridEntities)._capacity = (void *)0x0;
|
|
pvVar1 = operator_new(0x3823);
|
|
if (pvVar1 == (void *)0x0) {
|
|
/* WARNING: Subroutine does not return */
|
|
_invalid_parameter_noinfo_noreturn();
|
|
}
|
|
pvVar2 = (void *)(GHIDRA_INT(pvVar1) + 0x23U & 0xffffffe0);
|
|
*(void **)(GHIDRA_INT(pvVar2) - 4) = pvVar1;
|
|
gridSavesLeft = 0x1c0;
|
|
(this->SavedGridEntities)._begin = pvVar2;
|
|
(this->SavedGridEntities)._capacity = (void *)(GHIDRA_INT(pvVar2) + 0x3800);
|
|
gridSave = (this->SavedGridEntities)._begin;
|
|
do {
|
|
*gridSave = 0;
|
|
gridSave[1] = 0;
|
|
gridSave[2] = 0;
|
|
gridSave[3] = 0;
|
|
gridSave[4] = 0x16a9de81;
|
|
gridSave[5] = 0;
|
|
*GHIDRA_CAST<uint8_t *>((gridSave + 6)) = 0;
|
|
gridSave[7] = 0x16a9de81;
|
|
gridSave = gridSave + 8;
|
|
gridSavesLeft = gridSavesLeft + -1;
|
|
} while (gridSavesLeft != 0);
|
|
(this->SavedGridEntities)._end = gridSave;
|
|
(this->SavedEntities)._begin = (void *)0x0;
|
|
(this->SavedEntities)._end = (void *)0x0;
|
|
(this->SavedEntities)._capacity = (void *)0x0;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))) = 0;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x0))) = 1;
|
|
(this->RestrictedGridIndexes)._head = (void *)0x0;
|
|
(this->RestrictedGridIndexes)._size = 0;
|
|
pvVar1 = operator_new(0x14);
|
|
*(void **)pvVar1 = pvVar1;
|
|
*(void **)(GHIDRA_CAST<char *>(pvVar1) + 4) = pvVar1;
|
|
*(void **)(GHIDRA_CAST<char *>(pvVar1) + 8) = pvVar1;
|
|
*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(pvVar1) + 0xc)) = 0x101;
|
|
(this->RestrictedGridIndexes)._head = pvVar1;
|
|
(this->SavedEffects)._begin = (void *)0x0;
|
|
(this->SavedEffects)._end = (void *)0x0;
|
|
(this->SavedEffects)._capacity = (void *)0x0;
|
|
local_8 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_8)) + 0x1))),3);
|
|
this->ShopItemIdx = -1;
|
|
this->ShopItemDiscountIdx = -1;
|
|
this->DeliriumDistance = 0;
|
|
this->Group = -1;
|
|
pvVar1 = (this->SavedEntities)._end;
|
|
pvVar2 = (this->SavedEntities)._begin;
|
|
if (pvVar2 != pvVar1) {
|
|
do {
|
|
invoke_pending_callbacks(pvVar2);
|
|
pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 0x78);
|
|
} while (pvVar2 != pvVar1);
|
|
pvVar2 = (this->SavedEntities)._begin;
|
|
}
|
|
(this->SavedEntities)._end = pvVar2;
|
|
if (GHIDRA_UINT(((GHIDRA_INT((this->SavedEntities)._capacity) - GHIDRA_INT((this->SavedEntities)._begin)) / 0x78)) <
|
|
0x10) {
|
|
msvc::vector<EntitySaveState>::_Reallocate_exactly(0x10);
|
|
}
|
|
pvVar1 = (this->SavedEffects)._end;
|
|
pvVar2 = (this->SavedEffects)._begin;
|
|
if (pvVar2 != pvVar1) {
|
|
do {
|
|
invoke_pending_callbacks(pvVar2);
|
|
pvVar2 = (void *)(GHIDRA_INT(pvVar2) + 0x78);
|
|
} while (pvVar2 != pvVar1);
|
|
pvVar2 = (this->SavedEffects)._begin;
|
|
}
|
|
(this->SavedEffects)._end = pvVar2;
|
|
if (GHIDRA_UINT(((GHIDRA_INT((this->SavedEffects)._capacity) - GHIDRA_INT((this->SavedEffects)._begin)) / 0x78)) < 0x20
|
|
) {
|
|
msvc::vector<EntitySaveState>::_Reallocate_exactly(0x20);
|
|
}
|
|
pvVar1 = (this->RestrictedGridIndexes)._head;
|
|
FID_conflict__Erase_tree<fuzzer::fuzzer_allocator<msvc::_Tree_node<fuzzer::TracePC::PCTableEntry_const*,void*>_>_>
|
|
(&this->RestrictedGridIndexes,
|
|
(fuzzer_allocator<msvc::_Tree_node<unsigned_int,void*>_> *)&this->RestrictedGridIndexes,
|
|
*(_Tree_node<unsigned_int,void*> **)(GHIDRA_INT(pvVar1) + 4));
|
|
*(void **)(GHIDRA_CAST<char *>(pvVar1) + 4) = pvVar1;
|
|
gridSaveOffset = 0;
|
|
*(void **)pvVar1 = pvVar1;
|
|
*(void **)(GHIDRA_CAST<char *>(pvVar1) + 8) = pvVar1;
|
|
(this->RestrictedGridIndexes)._size = 0;
|
|
this->_doors[0] = -1;
|
|
this->_doors[1] = -1;
|
|
this->_doors[2] = -1;
|
|
this->_doors[3] = -1;
|
|
this->_doors[4] = -1;
|
|
this->_doors[5] = -1;
|
|
this->_doors[6] = -1;
|
|
this->_doors[7] = -1;
|
|
do {
|
|
*GHIDRA_CAST<uint32_t *>((gridSaveOffset + GHIDRA_INT((this->SavedGridEntities)._begin))) = 0;
|
|
gridSaveOffset = gridSaveOffset + 0x20;
|
|
} while (gridSaveOffset < 0x3800);
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x94)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x98)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x9c)))) = 0;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa0)))) = 0;
|
|
ExceptionList = local_10;
|
|
return GHIDRA_CAST<RoomConfig_Room *>(this);
|
|
}
|
|
|
|
// 006ef9c0
|
|
void RoomDescriptor::destructor()
|
|
{
|
|
std_set *restrictedGridIndexes;
|
|
|
|
msvc::vector<RoomEntry>::_Tidy();
|
|
restrictedGridIndexes = &this->RestrictedGridIndexes;
|
|
FID_conflict__Erase_tree<fuzzer::fuzzer_allocator<msvc::_Tree_node<fuzzer::TracePC::PCTableEntry_const*,void*>_>_>
|
|
(restrictedGridIndexes,(fuzzer_allocator<msvc::_Tree_node<unsigned_int,void*>_> *)restrictedGridIndexes,
|
|
*(_Tree_node<unsigned_int,void*> **)(GHIDRA_INT((this->RestrictedGridIndexes)._head) + 4));
|
|
operator_delete(restrictedGridIndexes->_head,0x14);
|
|
msvc::vector<RoomEntry>::_Tidy();
|
|
FUN_00708f90();
|
|
return;
|
|
}
|
|
|
|
// 0070c550
|
|
uint32_t RoomDescriptor::ChallengeDone()
|
|
{
|
|
return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 0xb),(char)(GHIDRA_UINT(this->Flags) >> 3)) & 0xffffff01;
|
|
}
|
|
|
|
// 00738180
|
|
uint32_t RoomDescriptor::SurpriseMiniboss()
|
|
{
|
|
return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 0xc),(char)(GHIDRA_UINT(this->Flags) >> 4)) & 0xffffff01;
|
|
}
|
|
|
|
// 007387d0
|
|
RoomDescriptor * RoomDescriptor::operator_assign(RoomDescriptor *other)
|
|
{
|
|
std_set *restrictedIndexes;
|
|
void *pvVar1;
|
|
std_vector *otherVector;
|
|
uint32_t setSize;
|
|
|
|
otherVector = &other->SavedGridEntities;
|
|
this->GridIndex = other->GridIndex;
|
|
this->SafeGridIndex = other->SafeGridIndex;
|
|
this->ListIndex = other->ListIndex;
|
|
this->Dimension = other->Dimension;
|
|
this->Data = other->Data;
|
|
this->OverrideData = other->OverrideData;
|
|
this->AllowedDoors = other->AllowedDoors;
|
|
this->_doors[0] = other->_doors[0];
|
|
this->_doors[1] = other->_doors[1];
|
|
this->_doors[2] = other->_doors[2];
|
|
this->_doors[3] = other->_doors[3];
|
|
this->_doors[4] = other->_doors[4];
|
|
this->_doors[5] = other->_doors[5];
|
|
this->_doors[6] = other->_doors[6];
|
|
this->_doors[7] = other->_doors[7];
|
|
this->DisplayFlags = other->DisplayFlags;
|
|
this->VisitedCount = other->VisitedCount;
|
|
this->Flags = other->Flags;
|
|
this->TotalMoneySpent = other->TotalMoneySpent;
|
|
this->ClearCount = other->ClearCount;
|
|
this->GreedSubType = other->GreedSubType;
|
|
this->PoopCount = other->PoopCount;
|
|
this->TKeeperCoinSpawns = other->TKeeperCoinSpawns;
|
|
this->PitsCount = other->PitsCount;
|
|
this->DecorationSeed = other->DecorationSeed;
|
|
this->SpawnSeed = other->SpawnSeed;
|
|
this->AwardSeed = other->AwardSeed;
|
|
this->BossDeathSeed = other->BossDeathSeed;
|
|
if (&this->SavedGridEntities != otherVector) {
|
|
FUN_00708f90();
|
|
(this->SavedGridEntities)._begin = otherVector->_begin;
|
|
(this->SavedGridEntities)._end = (other->SavedGridEntities)._end;
|
|
(this->SavedGridEntities)._capacity = (other->SavedGridEntities)._capacity;
|
|
otherVector->_begin = (void *)0x0;
|
|
(other->SavedGridEntities)._end = (void *)0x0;
|
|
(other->SavedGridEntities)._capacity = (void *)0x0;
|
|
}
|
|
otherVector = &other->SavedEntities;
|
|
if (&this->SavedEntities != otherVector) {
|
|
msvc::vector<RoomEntry>::_Tidy();
|
|
(this->SavedEntities)._begin = otherVector->_begin;
|
|
(this->SavedEntities)._end = (other->SavedEntities)._end;
|
|
(this->SavedEntities)._capacity = (other->SavedEntities)._capacity;
|
|
otherVector->_begin = (void *)0x0;
|
|
(other->SavedEntities)._end = (void *)0x0;
|
|
(other->SavedEntities)._capacity = (void *)0x0;
|
|
}
|
|
restrictedIndexes = &this->RestrictedGridIndexes;
|
|
if (restrictedIndexes != &other->RestrictedGridIndexes) {
|
|
pvVar1 = restrictedIndexes->_head;
|
|
FID_conflict__Erase_tree<fuzzer::fuzzer_allocator<msvc::_Tree_node<fuzzer::TracePC::PCTableEntry_const*,void*>_>_>
|
|
(restrictedIndexes,(fuzzer_allocator<msvc::_Tree_node<unsigned_int,void*>_> *)restrictedIndexes,
|
|
*(_Tree_node<unsigned_int,void*> **)(GHIDRA_INT(pvVar1) + 4));
|
|
*(void **)(GHIDRA_CAST<char *>(pvVar1) + 4) = pvVar1;
|
|
*(void **)pvVar1 = pvVar1;
|
|
*(void **)(GHIDRA_CAST<char *>(pvVar1) + 8) = pvVar1;
|
|
(this->RestrictedGridIndexes)._size = 0;
|
|
pvVar1 = (this->RestrictedGridIndexes)._head;
|
|
(this->RestrictedGridIndexes)._head = (other->RestrictedGridIndexes)._head;
|
|
(other->RestrictedGridIndexes)._head = pvVar1;
|
|
setSize = (this->RestrictedGridIndexes)._size;
|
|
(this->RestrictedGridIndexes)._size = (other->RestrictedGridIndexes)._size;
|
|
(other->RestrictedGridIndexes)._size = setSize;
|
|
}
|
|
otherVector = &other->SavedEffects;
|
|
if (&this->SavedEffects != otherVector) {
|
|
msvc::vector<RoomEntry>::_Tidy();
|
|
(this->SavedEffects)._begin = otherVector->_begin;
|
|
(this->SavedEffects)._end = (other->SavedEffects)._end;
|
|
(this->SavedEffects)._capacity = (other->SavedEffects)._capacity;
|
|
otherVector->_begin = (void *)0x0;
|
|
(other->SavedEffects)._end = (void *)0x0;
|
|
(other->SavedEffects)._capacity = (void *)0x0;
|
|
}
|
|
*GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x94)))) = *GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x94))));
|
|
*GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x96)))) = *GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x96))));
|
|
*GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x98)))) = *GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x98))));
|
|
*GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x9a)))) = *GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x9a))));
|
|
*GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x9c)))) = *GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x9c))));
|
|
*GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x9e)))) = *GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x9e))));
|
|
*GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa0)))) = *GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa0))));
|
|
*GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa2)))) = *GHIDRA_CAST<uint16_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa2))));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa4))) = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa4)));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa5))) = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa5)));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa6))) = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa6)));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa7))) = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa7)));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa8))) = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa8)));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa9))) = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa9)));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xaa))) = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xaa)));
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xab))) = (*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xab)));
|
|
this->ShopItemIdx = other->ShopItemIdx;
|
|
this->ShopItemDiscountIdx = other->ShopItemDiscountIdx;
|
|
this->DeliriumDistance = other->DeliriumDistance;
|
|
this->Group = other->Group;
|
|
return this;
|
|
}
|
|
|
|
// 00749040
|
|
RoomDescriptor * RoomDescriptor::copy_constructor(RoomDescriptor *other)
|
|
{
|
|
uint32_t *puVar1;
|
|
uint32_t uVar2;
|
|
int iVar3;
|
|
int iVar4;
|
|
int iVar5;
|
|
uint32_t uVar6;
|
|
uint32_t uVar7;
|
|
uint32_t uVar8;
|
|
uint32_t byteCount;
|
|
void *pvVar9;
|
|
uint32_t *dstGridEntity;
|
|
uint32_t *srcGridEntity;
|
|
void *local_1c;
|
|
uint8_t *puStack_18;
|
|
uint32_t local_14;
|
|
std_set *restrictedGridIndexes;
|
|
uint32_t *srcGridEnd;
|
|
|
|
local_14 = 0xffffffff;
|
|
puStack_18 = &LAB_00afdfc1;
|
|
local_1c = ExceptionList;
|
|
uVar8 = __security_cookie ^ GHIDRA_INT(register0x00000010) - 0x10U;
|
|
ExceptionList = &local_1c;
|
|
this->GridIndex = other->GridIndex;
|
|
this->SafeGridIndex = other->SafeGridIndex;
|
|
this->ListIndex = other->ListIndex;
|
|
this->Dimension = other->Dimension;
|
|
this->Data = other->Data;
|
|
this->OverrideData = other->OverrideData;
|
|
this->AllowedDoors = other->AllowedDoors;
|
|
iVar3 = other->_doors[1];
|
|
iVar4 = other->_doors[2];
|
|
iVar5 = other->_doors[3];
|
|
this->_doors[0] = other->_doors[0];
|
|
this->_doors[1] = iVar3;
|
|
this->_doors[2] = iVar4;
|
|
this->_doors[3] = iVar5;
|
|
iVar3 = other->_doors[5];
|
|
iVar4 = other->_doors[6];
|
|
iVar5 = other->_doors[7];
|
|
this->_doors[4] = other->_doors[4];
|
|
this->_doors[5] = iVar3;
|
|
this->_doors[6] = iVar4;
|
|
this->_doors[7] = iVar5;
|
|
this->DisplayFlags = other->DisplayFlags;
|
|
this->VisitedCount = other->VisitedCount;
|
|
this->Flags = other->Flags;
|
|
this->TotalMoneySpent = other->TotalMoneySpent;
|
|
this->ClearCount = other->ClearCount;
|
|
this->GreedSubType = other->GreedSubType;
|
|
this->PoopCount = other->PoopCount;
|
|
this->TKeeperCoinSpawns = other->TKeeperCoinSpawns;
|
|
this->PitsCount = other->PitsCount;
|
|
this->DecorationSeed = other->DecorationSeed;
|
|
this->SpawnSeed = other->SpawnSeed;
|
|
this->AwardSeed = other->AwardSeed;
|
|
this->BossDeathSeed = other->BossDeathSeed;
|
|
(this->SavedGridEntities)._begin = (void *)0x0;
|
|
(this->SavedGridEntities)._end = (void *)0x0;
|
|
(this->SavedGridEntities)._capacity = (void *)0x0;
|
|
srcGridEnd = (other->SavedGridEntities)._end;
|
|
srcGridEntity = (other->SavedGridEntities)._begin;
|
|
if (srcGridEntity != srcGridEnd) {
|
|
byteCount = GHIDRA_INT(srcGridEnd) - GHIDRA_INT(srcGridEntity) >> 5;
|
|
if (0x7ffffff < byteCount) {
|
|
/* WARNING: Subroutine does not return */
|
|
FUN_0040cee0(uVar8);
|
|
}
|
|
byteCount = byteCount * 0x20;
|
|
pvVar9 = msvc::_Allocate(byteCount);
|
|
(this->SavedGridEntities)._begin = pvVar9;
|
|
(this->SavedGridEntities)._end = pvVar9;
|
|
(this->SavedGridEntities)._capacity = (void *)(GHIDRA_INT(pvVar9) + byteCount);
|
|
dstGridEntity = (this->SavedGridEntities)._begin;
|
|
do {
|
|
uVar2 = srcGridEntity[1];
|
|
uVar6 = srcGridEntity[2];
|
|
uVar7 = srcGridEntity[3];
|
|
*dstGridEntity = *srcGridEntity;
|
|
dstGridEntity[1] = uVar2;
|
|
dstGridEntity[2] = uVar6;
|
|
dstGridEntity[3] = uVar7;
|
|
puVar1 = srcGridEntity + 4;
|
|
uVar2 = srcGridEntity[5];
|
|
uVar6 = srcGridEntity[6];
|
|
uVar7 = srcGridEntity[7];
|
|
srcGridEntity = srcGridEntity + 8;
|
|
dstGridEntity[4] = *puVar1;
|
|
dstGridEntity[5] = uVar2;
|
|
dstGridEntity[6] = uVar6;
|
|
dstGridEntity[7] = uVar7;
|
|
dstGridEntity = dstGridEntity + 8;
|
|
} while (srcGridEntity != srcGridEnd);
|
|
(this->SavedGridEntities)._end = dstGridEntity;
|
|
}
|
|
local_14 = 0;
|
|
FUN_00752830(&other->SavedEntities);
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 1;
|
|
restrictedGridIndexes = &this->RestrictedGridIndexes;
|
|
restrictedGridIndexes->_head = (void *)0x0;
|
|
(this->RestrictedGridIndexes)._size = 0;
|
|
pvVar9 = operator_new(0x14);
|
|
*(void **)pvVar9 = pvVar9;
|
|
*(void **)(GHIDRA_CAST<char *>(pvVar9) + 4) = pvVar9;
|
|
*(void **)(GHIDRA_CAST<char *>(pvVar9) + 8) = pvVar9;
|
|
*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(pvVar9) + 0xc)) = 0x101;
|
|
restrictedGridIndexes->_head = pvVar9;
|
|
(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x0))) = 2;
|
|
std_set_uint_copy(restrictedGridIndexes,&other->RestrictedGridIndexes,GHIDRA_INT(this));
|
|
local_14 = CONCAT31((*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>(&(local_14)) + 0x1))),3);
|
|
FUN_00752830(&other->SavedEffects);
|
|
uVar2 = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x98))));
|
|
uVar6 = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x9c))));
|
|
uVar7 = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa0))));
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x94)))) = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x94))));
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x98)))) = uVar2;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x9c)))) = uVar6;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa0)))) = uVar7;
|
|
uVar2 = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa8))));
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa4)))) = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa4))));
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa8)))) = uVar2;
|
|
this->ShopItemIdx = other->ShopItemIdx;
|
|
this->ShopItemDiscountIdx = other->ShopItemDiscountIdx;
|
|
this->DeliriumDistance = other->DeliriumDistance;
|
|
this->Group = other->Group;
|
|
ExceptionList = local_1c;
|
|
return this;
|
|
}
|
|
|
|
// 00752e80
|
|
RoomDescriptor * RoomDescriptor::move_constructor(RoomDescriptor *other)
|
|
{
|
|
void *pvVar1;
|
|
void *pvVar2;
|
|
uint32_t swappedListSize;
|
|
int iVar4;
|
|
int iVar5;
|
|
int iVar6;
|
|
uint32_t uVar7;
|
|
uint32_t uVar8;
|
|
void *pvVar9;
|
|
void *local_10;
|
|
uint8_t *puStack_c;
|
|
uint32_t local_8;
|
|
uint32_t swappedListSize;
|
|
|
|
puStack_c = &LAB_00afe73b;
|
|
local_10 = ExceptionList;
|
|
ExceptionList = &local_10;
|
|
this->GridIndex = other->GridIndex;
|
|
this->SafeGridIndex = other->SafeGridIndex;
|
|
this->ListIndex = other->ListIndex;
|
|
this->Dimension = other->Dimension;
|
|
this->Data = other->Data;
|
|
this->OverrideData = other->OverrideData;
|
|
this->AllowedDoors = other->AllowedDoors;
|
|
iVar4 = other->_doors[1];
|
|
iVar5 = other->_doors[2];
|
|
iVar6 = other->_doors[3];
|
|
this->_doors[0] = other->_doors[0];
|
|
this->_doors[1] = iVar4;
|
|
this->_doors[2] = iVar5;
|
|
this->_doors[3] = iVar6;
|
|
iVar4 = other->_doors[5];
|
|
iVar5 = other->_doors[6];
|
|
iVar6 = other->_doors[7];
|
|
this->_doors[4] = other->_doors[4];
|
|
this->_doors[5] = iVar4;
|
|
this->_doors[6] = iVar5;
|
|
this->_doors[7] = iVar6;
|
|
this->DisplayFlags = other->DisplayFlags;
|
|
this->VisitedCount = other->VisitedCount;
|
|
this->Flags = other->Flags;
|
|
this->TotalMoneySpent = other->TotalMoneySpent;
|
|
this->ClearCount = other->ClearCount;
|
|
this->GreedSubType = other->GreedSubType;
|
|
this->PoopCount = other->PoopCount;
|
|
this->TKeeperCoinSpawns = other->TKeeperCoinSpawns;
|
|
this->PitsCount = other->PitsCount;
|
|
this->DecorationSeed = other->DecorationSeed;
|
|
this->SpawnSeed = other->SpawnSeed;
|
|
this->AwardSeed = other->AwardSeed;
|
|
this->BossDeathSeed = other->BossDeathSeed;
|
|
pvVar9 = (other->SavedGridEntities)._capacity;
|
|
pvVar1 = (other->SavedGridEntities)._end;
|
|
pvVar2 = (other->SavedGridEntities)._begin;
|
|
(other->SavedGridEntities)._capacity = (void *)0x0;
|
|
(other->SavedGridEntities)._end = (void *)0x0;
|
|
(other->SavedGridEntities)._begin = (void *)0x0;
|
|
(this->SavedGridEntities)._begin = pvVar2;
|
|
(this->SavedGridEntities)._end = pvVar1;
|
|
(this->SavedGridEntities)._capacity = pvVar9;
|
|
pvVar9 = (other->SavedEntities)._capacity;
|
|
pvVar1 = (other->SavedEntities)._end;
|
|
pvVar2 = (other->SavedEntities)._begin;
|
|
(other->SavedEntities)._capacity = (void *)0x0;
|
|
(other->SavedEntities)._end = (void *)0x0;
|
|
(other->SavedEntities)._begin = (void *)0x0;
|
|
(this->SavedEntities)._begin = pvVar2;
|
|
(this->SavedEntities)._end = pvVar1;
|
|
(this->SavedEntities)._capacity = pvVar9;
|
|
local_8 = 1;
|
|
(this->RestrictedGridIndexes)._head = (void *)0x0;
|
|
(this->RestrictedGridIndexes)._size = 0;
|
|
pvVar9 = operator_new(0x14);
|
|
*(void **)pvVar9 = pvVar9;
|
|
*(void **)(GHIDRA_CAST<char *>(pvVar9) + 4) = pvVar9;
|
|
*(void **)(GHIDRA_CAST<char *>(pvVar9) + 8) = pvVar9;
|
|
*GHIDRA_CAST<uint16_t *>((GHIDRA_CAST<char *>(pvVar9) + 0xc)) = 0x101;
|
|
(this->RestrictedGridIndexes)._head = pvVar9;
|
|
(this->RestrictedGridIndexes)._head = (other->RestrictedGridIndexes)._head;
|
|
(other->RestrictedGridIndexes)._head = pvVar9;
|
|
swappedListSize = (this->RestrictedGridIndexes)._size;
|
|
(this->RestrictedGridIndexes)._size = (other->RestrictedGridIndexes)._size;
|
|
(other->RestrictedGridIndexes)._size = swappedListSize;
|
|
pvVar9 = (other->SavedEffects)._end;
|
|
pvVar1 = (other->SavedEffects)._begin;
|
|
pvVar2 = (other->SavedEffects)._capacity;
|
|
(other->SavedEffects)._capacity = (void *)0x0;
|
|
(other->SavedEffects)._end = (void *)0x0;
|
|
(other->SavedEffects)._begin = (void *)0x0;
|
|
(this->SavedEffects)._begin = pvVar1;
|
|
(this->SavedEffects)._end = pvVar9;
|
|
(this->SavedEffects)._capacity = pvVar2;
|
|
swappedListSize = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x98))));
|
|
uVar7 = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x9c))));
|
|
uVar8 = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa0))));
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x94)))) = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0x94))));
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x98)))) = swappedListSize;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0x9c)))) = uVar7;
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa0)))) = uVar8;
|
|
swappedListSize = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa8))));
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa4)))) = *GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((other)) + 0xa4))));
|
|
*GHIDRA_CAST<uint32_t *>(&(*GHIDRA_CAST<uint8_t *>((GHIDRA_CAST<char *>((this)) + 0xa8)))) = swappedListSize;
|
|
this->ShopItemIdx = other->ShopItemIdx;
|
|
this->ShopItemDiscountIdx = other->ShopItemDiscountIdx;
|
|
this->DeliriumDistance = other->DeliriumDistance;
|
|
this->Group = other->Group;
|
|
ExceptionList = local_10;
|
|
return this;
|
|
}
|
|
|
|
// 007e9190
|
|
uint32_t RoomDescriptor::NoReward()
|
|
{
|
|
return CONCAT31((uint3)(GHIDRA_UINT(this->Flags) >> 0xf),(char)(GHIDRA_UINT(this->Flags) >> 7)) & 0xffffff01;
|
|
}
|