Files
isaac-port/notes/decomp_issues.md
T
shweetandClaude Opus 5.5 c426b91486 Full redump with round 26 (689 locals in 127 functions); src/game/classes.hpp: reconstructed class declarations
classes.tsv (vtable.py --classes): 194 RTTI classes with vftable, direct bases (offsets from the PMD), vtable slots and,
for 176, the exact size from the deleting destructor's sized delete. Sizes flow into structs.hpp (static_assert sizeof)
and, next build, into Ghidra's structs (ApplyTypes 'size' rows) so this[1]._x stops standing in for the tail.
scripts/source_tree.py generates src/game/classes.hpp: 293 classes with real bases, vtables in slot order (overrides,
REPENTOGON slot names, vfunc_N placeholders), fields at their offsets, 2400 method declarations; it compiles with
clang --target=i686-pc-windows-msvc and all 174 sizeof / 1899 offsetof asserts hold. Round 26's prototypes are held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 19:43:13 -05:00

50 KiB

Decompiler issues found by locals rounds (agent reports, round 23+; verify before acting)

Misidentified functions (wrong function name, ICF-folded names, wrong signature match, suggested real name)

  • 006bbdc0 Entity_Pickup::Update: wrong name. Pickup vtable Update is 006e3940; only caller is Entity_NPC::Update; body is NPC death drops (Gimpy, Bone Spurs, Hungry Soul, Vasculitis, Quints, Sharp Key, Tainted Magdalene/Keeper, Urn of Souls). this typed Entity_Pickup so NPC fields show as this[1]._priceANM2.*
  • 00806c20 Game::Render: wrong ZHL [exact] match. Only caller is 0080ea80 Room::render_lighting (ECX = Room); renders one entity's light. Suggested Room::render_entity_light. Real Game::Render is 006fbc10
  • 005832c0 Entity_Pickup::GetLootList: wrong. Walks chain of type 0x38d variant 10 via +0x3c0, builds quad strip, renders with "KAGE_ColorTextureShader"
  • 0058a010 Entity_NPC::Render: wrong ZHL prefix match. Ends in plain RET and reads one stack arg [ebp+8] (entity); grows a ring of pits around it per call (counter at entity +0x450), spawns effect/pickup, sound 0x89. No direct callers (called via pointer)
  • 006a6f10 Entity_Bomb::update_sparks: misleading; loads bomb costumes per variant (size suffix 0-3, ReplaceSpritesheet, hides "sparks" layer). Suggested Entity_Bomb::load_costumes
  • 009dcc70 ItemPool::CreateGlitchedCollectible: ECX is not an ItemPool; it is the vector of GlitchedCollectibleGfx* indexed by ~id (Game::_proceduralItemManager._proceduralItems). Class prefix probably wrong
  • 00700060 / 00700061 Game::BombExplosionEffects: spurious split (see Wrong this/parameter types)
  • 00794e50 Entity_Player::update_effects at 547259: Entity_Projectile::Damage and Entity_NPC::SetAimAngle calls on pEVar24 (Mega Blast laser) are ICF mislabels
  • 00653070 Entity_Projectile::Update: Font::SetLineHeightModifier(Sprite::Color(...)) probably ICF-folded colour setter; Entity::AddFear((Entity *)(this+0x33c)) after KColor ctor probably ICF-folded
  • 006fbc10 Game::Render: Entity_Player::TriggerRoomExit((Entity_Player *)&this->_roomTransition) very likely a RoomTransition render method folded by ICF
  • 0077b020 Entity_Player::update_shooting: Game::GetField26614 cast to EntityList at ~line 1540 and used as DeathmatchManager getter elsewhere; ICF/misnamed getter
  • 0068cdc0 Console::RunCommand: Room::GetGridHeight(FUN_004143f0()) calls are probably std::string size/empty on a token (ICF)
  • 00a02890: header claim that it is misnamed still holds (seen from 00a01020 Weapon_Brimstone::fire_hitscan caller)
  • 006b5320 Entity_Tear::reroll_hit_entity: wrong name and this; only caller HandleCollision does mov ecx,collider. Moves the hit Entity to a random free tile >=20px from its old spot and >=80px from the nearest player, poofs at both (teleport-tear effect). Prototype __thiscall void (int unused) (RET 0x4, junk slot from push ecx)
  • 008e3db0 AnimationLayer::RenderFrame: wrong ZHL prefix match; really Menu_Mods::Render (between Menu_Mods::Update 008e3830 and reset 008e4970; MenuManager::Render calls it at 0098a268 with ecx=menuManager+0xd96c; strings "Piece%d", "Bottom", "%d.%s", "%s[Old]", "Cursor", "WidgetButton"). Needs names.tsv fix, then __thiscall void Menu_Mods::Render();; this typed AnimationLayer
  • 0091d2b0 OnlineChat::render: ECX is a chat message (map node +0x18 from render_all), probably OnlineChatMessage::render
  • 0047d8a0 ENTITY_PEEP: Menu_Character::ChangeCharacterPage((Menu_Character*)npc, &out, sheetName) is a string helper building the "_b.png"/"_c.png" sheet path; misnamed
  • 00782af0 Entity_Player::Update: folded getters used as other types: Config::GetCollectibles() returns Level*, Room::GetTopLeftPos((Room*)g_manager) PersistentGameData*, EntityPtr::Ref() the stage; Entity_Projectile::Damage used as the angle for Vector::FromAngle. Many calls decompile with no args (std::vector::operator_index(), std::min(), EntityPtr::Ref()); fields show as raw ((Entity_Player *)((int)this + 0x26cc))->_chargeBarSprites...
  • 005cdb20 Entity_Effect::Init: ICF-folded calls: Font::SetLineHeightModifier on a sprite Color, Config::GetPillEffects used as an AnimationState, Level::GetCurrentRoom passed to GridEntity::GetVariant
  • 0084f780 InfoDisplay::describe_pickup_stats: value/value_00 passed to int_to_string never set; its prototype probably passes the int in EDX, not on the stack
  • 004d48b0 ENTITY_MOMS_HEART: calls ENTITY_MOMS_HEART_mausoleum_death((Entity_NPC *)game); that helper's prototype/register mapping looks wrong
  • 0063f9f0 Entity_Familiar::ai_blood_oath: Entity_Player::GetHealthType followed by extraout_EDX/extraout_ECX reads; its prototype or register use looks wrong
  • 008f74c0 Game::render_mod_shaders: ECX = g_manager+0x2a6c0 (Manager._modManager), body walks vector begin/end at this+0/+4; should be ModManager::render_shaders, prototype __thiscall void ModManager::render_shaders(); (plain RET); not written under the Game name (would type this as Game)
  • 008ebfb0 GameOver::RenderItemSprite: wrong ZHL match; renders an online-lobby member slot (Player_Ready_Button, Invite_Player, Swap_Button, Connection_Bar, "Tokens: %d"); suggest Menu_OnlineLobby::render_member_slot
  • 00abc500 dsp_init_sincos_table: is libvorbis smallft.c dradfg (general-radix forward FFT pass); param names already match vorbis source
  • 007cfba0 Game::render_debug_player_info: ECX is the player, body only reads player fields; suggest Entity_Player::render_debug_info
  • 005caa70 Entity_Player::console_spawn: really the Delirious effect (collectible RNG slot 510, charms delirium-form enemies, hallucination, wisp under Book of Virtues 584); name doubtful
  • 009aa040 FontKerningPair::IsaacStartup: class prefix FontKerningPair looks wrong for the startup function
  • 00791a40 Entity_Player::ControlActiveItem: KAGE_Filesys_FileManager::OpenRead((KAGE_Filesys_FileManager*)this, item, slot) is a wrong ICF name for a player function checking whether the active can be used; *(int*)((int)(&(this->_sprite)._filename - 3) + slotOffset) is _activeDesc[slot]._item; GetActiveMaxCharge(this_00, ...) gets an uninitialised this_00
  • 007e7820 pathfinder_can_reach_pos: KAGE_Graphics_ImageManager::CreateProceduralImage_Internal calls (lines 145, 302) are the PathNode priority_queue push (misnamed/ICF callee)
  • 00acebf0 mapping0_forward: theora_oc_dec_dc_unpredict_mcu_plane is called where libvorbis calls floor1_encode and theora_oc_dec_frags_recon_mcu_plane where it calls _vp_couple_quantize_normalize (ICF or misnamed); FUN_00aaca80 is _vorbis_block_alloc, FUN_00abab50 vorbis_bitrate_managed
  • 00743550 Level::generate_greed: RoomDescriptor::Init(aRStack_3ac, seed) is called on the LevelGenerator stack object; probably a LevelGenerator init/ctor
  • 008d7cb0 menu_item_description_build: std::string::concat_move gets player passed as an argument (misnamed/ICF)
  • 009555c0 Manager::Render: header says it renders Game::Render then FUN_0098a040, but it actually calls MenuManager::Render with an extraout ECX
  • 006f6500 Game::add_players: PlayerManager::get_player_by_user_id returns a NetInputDevice (0x3f8-byte object), not an Entity_Player; pEVar6->_sizeMulti / ->_damageEvents._end are device fields

Wrong this/parameter types (in_ECX typed as the wrong class, prototype present but not applied, spurious function splits)

  • 00700060/00700061 Game::BombExplosionEffects: spurious split; every parameter shifted one dword (damage holds pos, Color holds tear-flag high word, radiusMult holds source, _lineCheck is radius multiplier). Local names unreliable until fixed
  • 0080f200 Room::Render: in_ECX typed Game* but is Room (this); _curses, field_0x10, _roomList[...] are Room members (width, height, type at +8). protos.zhl entry has no typed this yet
  • 00802980 Room::Update: in_ECX typed Level* but is Room (_curses = grid width +0xc, _isHeartPicked = height +0x10). protos.zhl line 228 __thiscall void Room::Update(); not reflected in snapshot
  • 009d45c0 GameState::write_player: pending prototype makes ECX the record and param_1 the writer; decompile depends on in_ECX/unaff_ESI/uRam00000010 (hold locals rows one build behind)
  • 00a0a720 Weapon_Tears::Fire: pending protos.zhl line (1090), hold locals rows one build behind
  • 00763570 Entity_Player::EvaluateItems, 0077b020 update_shooting: protos rows exist but snapshot still shows (void) with in_ECX (one-build lag)
  • 007729d0 Entity_Player::TakeDamage: protos.zhl:1086 prototype not yet shown in dump header
  • 007c4180 Entity_Player::UsePill: protos.zhl line (RET 0xc) not shown in snapshot
  • 009f7930 Weapon::TriggerTearEffects: Entity_Player::GetTearHitParams() decompiled with no args though protos.zhl has RET 0x14 prototype; stack offsets drift between call sites
  • 00859290 Leaderboard::render_scores: this param named sprite (Leaderboard *) and a local int *sprite exists
  • 008c66a0 Menu_Bestiary::Render: this param named frontAnimState and a local AnimationState *frontAnimState exists
  • 0099c790 HomingLaser::build_bezier_path: this param named bezierVec (HomingLaser *), local std_vector *bezierVec exists; line 87 reads bezierVec = &bezierVec->_bezier
  • 009f0290 rich_text_layout: ECX parameter named copiedSpan (same as a later local); it is the Font, should be font
  • 0094ef10 Menu_Collection::Render: this param named font (Menu_Collection *) and a separate Font *font local exists
  • 00849510 PlayerHUD::RenderCraftingTable: unusedArg is actually the Bag of Crafting slot loop counter in the final loop (while (unusedArg < 8))
  • 0083eae0 PlayerHUD::render_pocket_item_info: 4-parameter signature looks wrong; ECX is PlayerHUD, extraout_EAX/EDX read, param_1 is a 0/1 mode not Entity_Player. No prototype added
  • 0083c8d0 HUD::update_item_info: in_ECX typed Entity_Pickup* but is the item-info panel object (+0x8 image smart pointer, +0x10 ANM2, popup id)
  • 0043aa90 Entity_Familiar::ai_wisp / 00526470 NpcAI::ENTITY_HOPPER / 0058a010: this/npc/room cast to Room* throughout (_gridEntities[0xd7]); real parameter type lost, causes slot reuse
  • 004c8090 NpcAI::ENTITY_MEGA_SATAN: local_244 typed Entity_Player* is the Room (shows as ->_playerCostumeMap[3]); local_23c, local_244, local_24c typed Entity_Player* hold room, sound ids, floats, npc copies
  • 00a69090 KAGE::Filesys::ArchivedFile::refill_buffer: existing protos.zhl row (line 1851) wrong (reads plain RET at a6908b of previous function); real end ret 0x4 at a6948e. Proposed __thiscall void ...refill_buffer(unsigned int byteCount);; delete old row
  • 0047a360 NpcAI::ENTITY_CHUB: decompile runs into another function's body after ~line 1220; FUN_00499550 (deque _Xlength) is probably noreturn, mark so
  • 0082f1c0 RoomTransition::StartBossIntro: pGVar20 (Game*) is g_game early and the RoomTransition this later (pGVar20->_roomList[0].field_0xa0, ->_stage = 2, versusSprite = ..._doors + 2 are RoomTransition fields); local_7c, local_28, local_6c also typed Game* with unrelated values
  • 00686da0 Console::FillOmnicomplete: this param named roomConfig (Console *) and a local RoomConfig *roomConfig exists
  • 0082b2f0 RoomConfig::LoadStagesXml: this printed as RoomConfig *destString; local void **destString exists
  • 0095b310 Manager::update_controller_popups: this named menuManager (Manager*); local MenuManager *menuManager holds both this and g_menuManager; local_3c (Vector) is a popup position then a device handle
  • 0090f760 NetplayManager::process_drop_player_message: this is NetplayManager *dropEntry; local ulonglong *dropEntry (get_drop_entry result) same name
  • 008f06e0 Menu_SpecialSeeds::Render: param sprite (Menu_SpecialSeeds*, i.e. this) and local ANM2 *sprite later used as Menu_SpecialSeeds (sprite->PositionX, sprite[1])
  • 0073e0a0 Level::load_room: this is named pit (db/locals.tsv row 0073e0a0 this pit is wrong, should be this level; local GridEntity_Pit *pit also exists); this used as (Game *)pit throughout
  • 0063f9f0 Entity_Familiar::ai_blood_oath: in_ECX typed Entity_NPC so _statusEffectSprite._color._tint[0] is the stab count, _tint[2] the familiar state, _stateFrame (+0x410) the familiar's player; prototype __thiscall void ai_blood_oath(); pending
  • 00499de0 NpcAI::ENTITY_BUMBINO: after npc = self npc prints as (Entity_Player *)npc (_isControlsEnabled, _chargeBarSprites[3]._color._offset[2], _collisionPoints, _config); those are NPC state/i1/i2/timers
  • 00782af0 Entity_Player::Update: this_01 (Tractor Beam laser, type 7) typed Entity_NPC*
  • NpcHelper::willo_get_target_pos: possibly returns float* in EAX; 005586b0 ENTITY_WILLO reads uninitialised targetPos (*targetPos, targetPos[1]) after the call
  • Prototypes added in round 25, pending (hold locals rows one build behind): 00698e80 EntityConfig::load_boss_colors(char* path) RET 0x4; 0049fa10 NpcAI::ENTITY_CHIMERA __fastcall (Entity_NPC*) plain RET 004a0fc4; 0063c1c0 Entity_Familiar::ai_minisaac() RET 63ce15; 00712180 GridEntity_Pit::Update() RET 71343a (dump shows Entity* return, leftover EAX); 00a03f90 Weapon_Knife::Fire(Vector*, bool, bool) RET 0xc (decompile had void *this); 0091d2b0 OnlineChat::render(Vector*, bool, bool, float alpha) RET 0xc; 0069c420 load_bossportraits_xml(void* ecx, char* path) RET 0x4 at 0069d138
  • 0058aed0 ENTITY_SINGE_body / 0044f2b0 ENTITY_BEAST_ultra_war_bomb: objdump of bin/isaac-ng.exe found no ret in their ranges (shared epilogue), so no RET n check/prototype
  • 00911c70 NetplayManager::update_revives: this is cast to PlayerManager (netplayManager = (PlayerManager*)this) and read via _coopSlots/_playerList; NetplayManager layout or this type is wrong, local netplayManager typed PlayerManager*
  • 00911120 NetplayManager::update_player_removal: in_ECX typed PlayerManager (wrong); removeMessage typed CoopJoinSlot is a RemovePlayerMessage; prototype __thiscall void () added (plain RET), pending
  • 007009a0 Game::BombTearflagEffects: first parameter is Game *room in db/protos.zhl; it is Game this, name should be this/game
  • 009c4100 InviteFriendsMenu::load_graphics: this param named cursorSprite (void *) collides with local ANM2 *cursorSprite (this+0x118); should be InviteFriendsMenu *this
  • 00821fc0 Room::is_obstacle_path_valid: this shows as Room *pathGrid while local GridEntity_Pit *pathGrid exists
  • 008471c0 PlayerHUD::RenderPocketItems: db/locals.tsv row 008471c0 this font makes this PlayerHUD *font, colliding with real Font *font (line ~899); delete the row
  • 00a0e630 Weapon_UrnOfSouls::Fire: db/locals.tsv line 7034 renames this to flameLaser (ECX is the Weapon: +4 owner, +0x44 charge, +0x4c soul effect) and a local EntityPtr flameLaser exists; delete or change to weapon; pEVar1 typed Entity_Player makes familiar fields read _isControlsEnabled, _chargeBarSprites[5]._scale.x
  • 005c9930 trigger_book_of_belial_passive: this named effectSprite, local ANM2 *effectSprite exists; 0078b640 Entity_Player::Render: this named costumeSprite, local ANM2 *costumeSprite exists; 00743550 Level::generate_greed: this (Level*) named rng, local RNG *rng exists
  • 005b23f0 Entity_Player::use_card_hagalaz: this shows as Entity_Player *npc and a local npc (Entity_NPC cast) exists; an earlier row seems to have renamed this
  • 004fdf80 NpcAI::ENTITY_MOLE: row this_00 -> mole with type Entity_NPC * did not take ("Unable to use type for symbol mole"); mole stays EntityPtr, accesses read *(int *)((int)mole + 0xb64)
  • 00780f40 Entity_Player::update_bomb_input: self read uninitialised (lines 69, 88, 439); should be this
  • 007a6c50 Entity_Player::room_enter: this read via raw offsets (*(int*)((int)this+0x13c0)), probably from the this = (Entity_Player*)local_90 alias; local_90 retype may fix
  • 007fec00 Room::TriggerBossDeath: RNG::Next(this_00) at the end uses an uninitialised this_00; should be &subRng
  • 004ea3d0 ENTITY_VIS_FATTY: Entity_NPC::SetAimAngle(this, fVar15) passes an uninitialised this; real target is the laser in local_cc.y
  • 0070d3f0 / 008df9b0 Menu_LobbyList::render_lobbies: no struct for the class (prototype __thiscall void () plain RET added, turns in_ECX into this); 0074fbe0 Level::try_place_random_room prototype __thiscall bool (LevelGenerator* generator, int unusedA, int unusedB) RET 0xc added, pending

Struct and field problems (wrong field offsets/sizes, struct smaller than real, missing fields, arrays with wrong length)

  • 00780560 Entity_Player::GetBombFlags: this[1]._chargeBarSprites[0]._championColor._tint[0] is really Entity_Player+0x2ef8 (int, trinket id compared with 0x47 Bob's Bladder); byte at +0x2ef0. Neither in fields.tsv. Entity_Player struct smaller than real object
  • 0075f0e0 Entity_Player::AddCollectible: iStack_f0/uStack_e0/uStack_dc written from itemConfig[1].type/id/name; ItemConfig_Item smaller in structs.hpp than real object
  • 00794e50 Entity_Player::update_effects: _coopBabyBuffTimers[i + 0x25] is the Black Powder trail effect array; field name or offset wrong
  • 00463100 NpcAI::ENTITY_ISAAC: local_e0/dc/d8/d4 set right after burstParams (0, -1.0f, 0, 0); ProjectileParams missing ~16 bytes of trailing fields
  • 0065d950 Entity_Slot::Update: short at this[1]._damageEvents._capacity is a slot timer; field mistyped
  • 006950c0 EntityConfig::LoadEntities: EntityConfig_Entity _pad_0x8c[0xc] is a std::vector of 36-byte preload entries (preloadId/Variant/Subtype emplaced ~line 2372)
  • 007efa50 Room::on_leave: EntitySaveState needs a real 0x78-byte struct (decompile writes saveState = (EntitySaveState)0x0)
  • 009b0b00 LevelGenerator::get_neighbor_candidates: newRoom declared as 32-byte array, room struct is 0x48 bytes (local_110..local_f0 are its tail)
  • 009b1220 LevelGenerator::try_resize_room: real types candidatePositions int[28] (14 x/y spots), candidateShapes int[14], candidateDoorSlots uint[13]; 14th slot read is the security cookie; retypes need script change or new rows (ApplyLocals skips rows whose new name exists)
  • 00802980 Room::Update: gridOccupied int[448] should be byte[448] (0x70 dwords copied from local_1e8 byte map, memset 0x1c0); pairOffsets int[3] is start of 40-int table (10 rows of 4) through iStack_1fc
  • 009785d0 Entity_Laser::Render: local_208 typed Color is a UV quad struct in straight-laser branches; local_1b0 typed Vector holds a texture SmartPointer
  • 00a1d8f0 render_quad_draw_color_shader: no ColorQuad struct exists; edgeQuads should be 0x70-byte ColorQuad[4]; param line is a quad (4 points [0..7] + 4 KColors of 5 floats [8..0x1b])
  • 00a1d710 render_color_quad / 009c16b0 Popup::render_frame: ColorQuad layout (28 floats, 0x70); colorQuad declared float[6] in render_frame
  • 00817830 Room::render_water: 12 source quads of 9 dwords each (SourceQuad size/layout unconfirmed); whiteColorA KColor[2]
  • 009356a0 Backdrop::render_floor_to_target, 008453c0 RenderActiveItem, 0084ad40 render_deathmatch_health_bar: 9-dword quad+flag groups (local_214/1f0/1cc/160; segmentParams/segmentRect) should be one struct (SourceQuad); layout unconfirmed
  • 00990a40 FXLayers::LoadConfig: auStack_10278 should be typed as an FXLayer struct (reused for rayGroup params); attribute strings at 0xb66e0c "path", 0xb7d790 "xMin", 0xb7d798 "xMax", 0xb7d7a0 "yMin", 0xb7d7a8 "yMax", 0xb6987c "gfxroot", 0xb7d6b4 "fx"
  • 004bfd30 NpcAI::ENTITY_HUSH: local_2620..local_2560 is a table of 3 entries of 0xc80 bytes (16 sub-entries of 0xc8, ProjectileParams at +0x18); needs a struct type
  • 0099c790 HomingLaser::build_bezier_path: no struct for 0x18-byte HomingLaser_Bezier element (sample, handleIn, handleOut)
  • 0072ba80 ItemConfig::LoadLocustConfig: 184-byte temporary locust entry at local_120 has no struct
  • 0092b930 PersistentGameData::import_afterbirth_save: local_710 is base of AfterbirthPersistentGameData (check_header offsets match); abLevelCounter0-11 -> dest +0xdc8, abMiniboss0-6 -> +0xe00, abBossFlags -> +0xe07, abChallengeFlags -> +0xe6f; "Level counters" name unverified
  • 0092b2e0 PersistentGameData::TryImportRebirthLocalSave: 347-byte block copied to field 0xae8 (inferred Rebirth collectible flags); uStack_10c..uStack_b8 each copied once into unnamed fields 0xe00..0xe83
  • 006fbc10 Game::Render: four quad-UV structs start at quadParams, pixelationParams, bloomParams, shaderParams (corners (0,0),(1,0),(0,1),(1,1))
  • 009e5d90 ScoreSheet::Calculate: ScoreSheet type has no fields (4 bytes); code reads this[0x16], this[0x1f] as dword indices. Needs +0x58 category/end type, +0x7c/+0x80 vector of 12-byte entries, etc.
  • 00926f10 PersistentGameData::read: field_0xf74 is a fourth bestiary std_map (size at 0xf78, bestiary list type 3) next to _bestiaryEncounters (1), _bestiaryKills (2), _bestiaryDeaths (4); add to db/fields.tsv
  • 007d6670 Entity_Player::poop_spell_roll: _poopSpellQueue indexed past slot 6 ([count + 6], up to 20 entries); field_0x1f72 is the queue count. Field too small (6 visible slots + 20-entry pending queue)
  • 0098b5e0 Minimap::refresh_room_icons: Minimap _config[0] fields mis-mapped: _vec1.x/.y are visible column/row counts; _borderScale, _i1, _i2, _minimapIconNum are min/max x and y bounds; _mapSprite._shadowLayerIndex and _bitflags are cell width and height; _mapSprite._championColor._offset[2] is the render target
  • 007b0be0 Entity_Player::StoreGameState: GameStatePlayer is a 4-byte type, every saveState[N] is a dword index and most locals come out typed GameStatePlayer; raw this+0x1dec etc. Entity_Player save fields unconfirmed (007ae4b0 RestoreGameState reads saveState[0x5a] likewise)
  • 004b92e0 Entity_NPC::Hornfel_UpdateAI: minecart (local_12c) read at +3000 (0xbb8) as a speed float clamped to 0.8..1.2 and <=30; Entity_NPC has no such field
  • 00506bd0 ENTITY_FLY: local_108 written right after shotParams (set to 1); ProjectileParams is a byte or more short, or this is a field just past it
  • 00506bd0 FLY / 00610540 Kill / 0049d130 CHIMERA_body / 00453140 BIG_HORN / 00712180 Pit::Update / 004e0dd0 GUTTED_FATTY / 00496fb0 SISTERS_VIS (L553-563): writes via pEVar[1]._sprite._filename._buf[8..0xf] and pEVar[1].field_0x4 are Entity_Effect/Entity_Bomb fields past the end of Entity (timeouts 0x1c2, 0x12c, 0x10e, lifespan 30) seen through an Entity*; also ENTITY_BLOATY, ENTITY_POOP, Entity_Familiar (&effect[1]._sprite writes _filename._buf), and Entity *spawned temps in wisp_kill, room_enter, ENTITY_GAPER, ENTITY_VIS_FATTY
  • 00740e10 Level::generate_dungeon: generator typed RoomDescriptor[3] but passed as LevelGenerator*; no LevelGenerator struct, auStack_150, auStack_a4, iStack_98/94, auStack_8c, cStack_75 are its pieces
  • 00982100 Menu_Game::PreRenderContinueImg: timeFontSettings (FontSettings) too small; its init spills into local_260 (std_string for the stage name)
  • 005cdb20 Entity_Effect::Init: no BlendMode struct; stack buffers local_2f4/308/31c/330/344/36c stay undefined1 arrays
  • 00427870 holiday_get_current: no DateTime type; three stack records (thanksgiving* local_f4..local_c4, easter* local_84..local_54, scratchDateFlags/scratchTime)
  • Capsule: 4 bytes in Ghidra (Capsule entityCapsule [10]) but 0x28 in REPENTOGON; ENTITY_WHIPPER hitbox is Vector[4], local_78/local_74 are Capsule +0x20/+0x24 floats
  • 00664560 Entity_Slot::TakeDamage: slot state at this[1].field_0x4, Entity_Slot struct too small; late in the function this is reassigned from local_74 and cast to Entity
  • 0071b410 GridEntity_Rock::SpawnDrops: local_c0->_roomList[0x20].SavedGridEntities is the per-player trinket RNG vector (local_c0 is an Entity_Player* from RandomTrinketOwner cast to Game*)
  • 007ac7e0 Entity_Player::DischargeActiveItem: (g_game->_seedEffects)._stageSeeds[idx] and &(g_game->_playerManager).field_0x80 are the Esau Jr. stored-player slots (4-entry Entity_Player* array)
  • Room accesses via (int)g_game->_room + ...: +0x7240 (_waterAmount, ENTITY_BLOATY) and +0x72a1 (Entity_Familiar) show raw though db/fields.tsv has 0x7240; room local declared void * in ENTITY_GUSH (currentRoom)
  • 0099e360 HomingLaser::CalculateSamples: field_0x18 sample count, field_0x34..0x3c vector of Vector samples, field_0x40 mode flag (1 = lerp by blend); code compares &_samples with &field_0x34, so _samples offset may be wrong
  • 00780f40 update_bomb_input: SpawnEx's bomb typed Entity, Entity_Bomb fields show as pEVar2[1]._type etc.

Local variables that need a struct/array type (e.g. ColorMod over uStack runs, std_string, char*[N], TemporaryEffect)

  • 009af620 LevelGenerator::get_door_target_position: ltlTargets/ltrTargets/lblTargets/lbrTargets/defaultTargets -> <x>SlotTargets int[16] (8 door slots as XY pairs); BitSet128[16] / int[16] type strings unprecedented, parser.parse() outside try in ApplyLocals.java would abort the script on a bad type
  • 00780560 Entity_Player::GetBombFlags: nancyBombFlagTable -> nancyBombFlags BitSet128[16] (-0x110..-0x10, picked with Random()&0xf)
  • 005b39d0 Entity_Player::UseActiveItem: larynxEffect[8], secretsEffect[8], megaMushEffect, peelerEffect should be TemporaryEffect (0xc); next slot is _cooldown. blueBoxPools[5] really has 10 entries. friendTypes/friendVariants are entry 0 of a 21-pair table
  • 006950c0 EntityConfig::LoadEntities: auStack_10220 -> parsedEntity EntityConfig_Entity (folds ~60 field locals: shadowSize +0x24, baseHP +0x50, anm2Path +0x74, gridCollisionClassString +0xb4, bestiary strings +0xf8, modEntry +0x160, isPortraitModded +0x164)
  • 006998d0 EntityConfig::load_players_xml: auStack_10218 -> playerEntry EntityConfig_Player (0x148 bytes)
  • 004bfd30 NpcAI::ENTITY_HUSH: emptySourceRef EntityRef, faceShotParams ProjectileParams, bigShotVelocities Vector[3], curvingAngleSets float[9], curvingChangeTimeouts int[6], sideOffsets float[4], groupOneNpcs/pickedGroupNpcs EntityList_EL, attack200Pairs int[4]; EntityList_EL *player second declaration should be outcomePair (int *)
  • 006bbdc0: tearColor (uStack_98..local_74) and poofColor (uStack_6c..local_48) each ColorMod (11 dwords); ApplyLocals skips rows whose new name exists
  • 00700060 BombExplosionEffects: poisonColor (undefined4) is 11-dword ColorMod (0.4, 0.97, 0.5, 1.0...); poisonColor/buttBombColor/brimstoneBombColor ColorMod
  • 00848d20 PlayerHUD::render_inventory: iconColor and shadowColor (undefined4) span 0x2c bytes each -> ColorMod
  • 008d9340 Menu_KeyConfig::Render: actionLabels declared [4], really char*[19] (local_68..local_30); 008da510 render_gamepad_layout: actionLabels[4..19] -> char *[20]
  • 0068cdc0 Console::RunCommand: macroCommands[2] is a 12-entry char* array (local_5c[20], local_48..local_38) -> char *[12]
  • 0080f200 Room::Render: roomTypeNames -> char *[30] (absorbs local_15c..local_ec)
  • 0040ed50 AnmCache::ParseFile: 13 attribute string temporaries -> std_string
  • 009abe70 load_giantbook_xml: anm2Path and gfxPath each split into buffer/size/capacity -> std_string; tmpString std_string (local_3c); layerColor ColorMod (local_b0)
  • 00904050 make_timestamp_string: local_98 timeCopy -> tm (36 bytes)
  • 006a6f10 Entity_Bomb::update_sparks: local_54 typed BitSet128 is std_string[2]
  • 009ee2a0 Menu_Stats::update_achievements, 00806c20, 0059edb0, 008d9340, 00468180, 0048c3b0, 00624e10: ColorMod typed over uStack runs (11 dwords)
  • 007efa50 Room::on_leave: emptyGridDesc GridEntityDesc, savedTargetPos Vector
  • 00468180 ENTITY_DADDYLONGLEGS: shockwavePos Vector (ShockwaveParams: pos, +0xc amplitude, +0x10 speed, +0x18 duration)
  • 006ab440 Entity::PlayerCollideWithGrid: doorCollideInfo/gridCollideInfo/webCollideInfo/megaMushCollideInfo are 0x28-byte EntityRef (rows retype same name)
  • 0058a010 Entity_NPC::Render: destroySource EntityRef (absorbs local_f0..local_d0)
  • 00a25770 parseMapping: local_bc -> char *[44] (GLFW name/element table, 22 pairs)
  • 00644e80 Entity_Familiar::ai_shadow_intruder_damocles: local_58 typed EntityRef is really first dword of the ref; retype local_7c as EntityRef
  • 00751650 / 009688d0 Entity_Knife::UpdateSwingHits: tipCapsule and extraCapsule typed EntityRef but are Capsules
  • 0083eae0: poolIdIt and poolIdsBegin typed Entity_Player* but are pointers into an int vector
  • 006dae40 Entity_Pickup::GetChestLoot: trinketIds should be uint[5] (RStack_34 is tail)
  • 007fb250 Room::SpawnClearAward: playerColor is float but heads a ColorMod (local_60..local_3c)
  • 00843df0 / 00431be0 / 00961b00: local_14 typed FontSettings/Capsule is the EH state (int ehState)
  • 0061da10 Entity_Familiar::Update: listSize declared Entity_Player* is a loop bound (EntityList::Size) -> int
  • 0099c790: candidateIndex typed Entity * is an index; 00460780 shockwaveRoom typed Game * is g_game->_room; 00645bc0 Game *type is the pickup type returned by Lua pre-spawn callback
  • 009785d0 / 007e33c0 PathFinder::FindGridPath: leftNeighbor is element 0 of int[4] {left, up, right, down} -> neighbors int[4] (not applied; local_20/1c/18 also hold offsets vector)
  • 00569170 NpcAI::ENTITY_MOTHER: local_124/128/134 typed Entity*/Entity_NPC* hold floats
  • 006c4b30 Entity_NPC::Update: pRVar13 typed Room* also holds an effect
  • 00817830 Room::render_water: room is a float holding the Room pointer copied from local_7dc.x
  • 009fa450 Weapon_Bone::Fire: tearDamage typed Entity_Player* holds a float
  • 006670f0 Entity_Tear::Update: Vector on float pairs; float constants (zeroConst, halfConst, oneConst, pointThreeConst) retyped EntityPtr -> float
  • 00982100 Menu_Game::PreRenderContinueImg: many char*/vector pointers typed NetplayManager (by value)
  • 00739370 Level::place_special_rooms: local_d4, local_dc, local_e8, local_f8 (and others) typed Entity_Player* are RoomConfig_Room*, LevelGenerator_Room*, ints, floats; local_f8 = g_game->_stageType compared with 4/5 (alt-path test)
  • 00842230 PlayerHUD::Update: cachedImages, cachedCardImages, foundNode typed Entity_Player* are std::map/std::set nodes
  • 00476860 ENTITY_PIN: Color local_50 and Color local_94 mistyped; local_50 slots hold a std_string ("gfx/Bosses/Afterbirth/Boss_TheFrail2.png")
  • 0056cd60 ENTITY_MOTHER_2: local_15c..local_180 typed Entity_NPC* used as floats/counters/pointers; local_50 is both KColor and EntityList sublist; local_3c/local_54 std_string slots
  • 004e6570 ENTITY_GRUDGE: local_9c/a0/b0/b4/b8/bc/c0/c4/98 typed Entity_NPC* hold floats, loop indexes and the npc in turn
  • 0049fa10 ENTITY_CHIMERA: Vector split wrongly; real pair is pEStack_16c (x) + local_168.x (y), not retyped (would overlap local_168)
  • 0049d130 ENTITY_CHIMERA_body: attackPicker typed 4-byte WeightedOutcomePicker is the begin pointer of a vector<pair<int,int>>; end/capacity in local_154.x/.y (needs 12-byte vector)
  • 004ff620 ENTITY_GYRO: pcStack_2c..puStack_10 are a std_string copy of the anim name then an 8-entry direction-name table (char*[8]); local_58[44] is both ColorMod and a sprintf anim-name buffer
  • 00518e20 ENTITY_SWARMER: local_50 ColorMod (to fStack_38..local_28) also std_string at local_50+0x14/local_2c/local_28
  • 004d48b0 ENTITY_MOMS_HEART: local_28 typed EntityPtr holds saved npc copy, then a float, then attack-pattern table pointer; after npc = (Entity_NPC *)local_28 npc typing is lost
  • 007bc740 Entity_Player::InitPostLevelInitStats: local_a4 typed PersistentGameData* first holds EntityConfig_Player* (stride 0x148), hence _achievements + 0x90/0x94/0xa8/0xb8/0x9c; assignments to local_94/local_90 lost in the random-start-item loop
  • 0046c0a0 ENTITY_MONSTRO: pGVar1 typed Game* holds g_game->_room at L617 (pGVar1->_roomList[0x9d].Data is a Room field); local_1fc (EntityList_EL) also used as ShockwaveParams fields
  • 004e0dd0 ENTITY_GUTTED_FATTY: local_34 typed RNG also EntityList_Query (QueryNPCsType) and tail of std::string walkLeftAnim
  • 004f4730 ENTITY_BALL_AND_CHAIN: EStack_84 typed EntityRef is the tail of a ColorMod starting at local_8c[1]
  • 00584140 ENTITY_SCOURGE_chain: local_360 is room then wall index (local_360->_gridEntities = wall index + 0)
  • 007cc200 SwapForgottenForm: ItemConfig_Item *trailCount is an int count
  • 0098b5e0 Minimap::refresh_room_icons: local_34 typed RoomDescriptor* also a Vector* into the icon-slot tables (->GridIndex/->SafeGridIndex are slot x/y)
  • 004f2c20 ENTITY_GOAT: after line 413 npc assigned from local_1f0.y (float), rest shows raw offsets ((int)npc + 0xb64)
  • 0074fbe0 Level::try_place_random_room / 00742ef0 Level::generate_backwards: generator typed RoomDescriptor[3] but is a LevelGenerator (would absorb auStack_150/a4/8c, deadEndsBegin/End, isLevelUsable); try_place_random_room local_448/pGVar5 typed Game* hold the placed room from LevelGenerator::place_room
  • 008ed350 Menu_OnlineLobby::load_member_sprite: markOrder[6] and markLayerIds[6] are int[12] (loops use 12); not retyped, would swallow std_string temps pppppbStack_6c and memberNumberText
  • 007d58f0 Entity_Player::tainted_cain_pedestal_burst: pickupTrinkets uint[2] really 5 entries (0x2d,0x2c,0x22,0x29,0x24) running into WStack_20/pfStack_1c/local_18 (reused later as picker vector)
  • 0060bae0 Entity_Effect::setup_loot_preview: lootMap/lootIt/lootType typed ANM2* are a std::multimap tree head, iterator and int type
  • 004855b0 ENTITY_DINGLE: pRVar11 typed Room* holds a new GridEntity_Poop (operator_new 0x19c) and the room; 00743550 generate_greed: pRStack_3c0/pRStack_3b0 typed RoomConfig_Room* also hold LevelGenerator::CreateRoom slots and counters
  • 004bf310 ENTITY_HUSH_FLY: fVar6 holds the parent Entity_NPC* typed float; 004ed840 ENTITY_CULTIST: EStack_4c is an EntityRef in one branch and the tail of a creep ColorMod with local_50 in another
  • 006e8ae0 Entity_Pickup::HandleCollision: pRVar11 and local_100/fc/f0/a4 typed Room* hold ints, RNGs, floats
  • 0056ffa0 ENTITY_MOTHERS_SHADOW: Entity_NPC *player is an iterator over room-descriptor callback lists (invoke_pending_callbacks); int *sprite is a std::set root in a RoomDescriptor at +100; loop indexes _roomList[0]._doors + offset with 0xb8 stride (_doors wrong anchor)
  • 004db6a0 ENTITY_TWITCHY: hori string overlaps EntityList local_34 so not retyped; 004a12f0 ENTITY_CLOG: pickerSeed + auStack_13c/fStack_134 form an RNG but auStack_13c+4 is later a velocity Vector, not retyped
  • 004a3040 ENTITY_COLOSTOMIA: npc = (Entity_NPC *)local_164.y shows a spilled npc copy stored in a Vector slot (Ghidra merge artefact)
  • 0054d250 ENTITY_BUTT_SLICKER: after npc = self npc loses its type and shows raw offsets ((int)npc + 0x360)
  • 007ae4b0 RestoreGameState: pGVar10 is saveState and also a player-list pointer; GameStatePlayer is a 4-byte placeholder (saveState[0x5a])

Wrong existing local names (a name that is wrong, a name declared twice, a parameter renamed by a locals row)

  • 009948f0 FXLayers::Render: preventedCurses declared twice (g_game->_curses at line 223 vs lowercased char in "KAGE_ColorTextureShader" hash loop); suggest curses / hashInput
  • 009d45c0 GameState::write_player: listEntry declared twice (checksum accumulator &param_1->field_0xc vs list walker +0x3bc); first should be checksum
  • 00a0a720 Weapon_Tears::Fire: isCursedEye declared uint, only low byte tested; local_103 is isMarked then NUL terminator after animDigit
  • 009fa450 Weapon_Bone::Fire: fetusTear declared twice (EntityPtr * copy is a min/max pointer helper); rngResult also set to constant 1 for fire_brimstone_ball; owner overwritten with call-argument leftovers
  • 006fbc10 / 00937420 Backdrop::pre_render_walls: room is mostly backdrop type (in_ECX[0x54]) but also RNG seed; isPreAscentMomRoom reused for greed-mode result and render_wall_detail bool
  • 0047a360 ENTITY_CHUB: anim ends as up/final animation; downAnim correct; horiAnim/playerTarget/curAnimChar appear again in garbage region after ~line 1220
  • 00794e50 update_effects: entityList (Entity_Player*) is Black Powder ring index (mod 0x60), reused as AddCharmed duration; music and playerManager (RNG*) are pointers to local RNGs projectileRng/tearRng; layerName (byte*) is a layer index; effect declared twice (Entity_Effect*, Entity*)
  • 00624e10 Entity_Familiar::Render: iconPosX and iconScaleX are Vectors (iconPos/iconScale in 0xed case) but .y reused as scratch
  • 00817830 Room::render_water: waveScroll and waveRotation reused as Vector temporaries (~line 1308)
  • 00a1d8f0: param line is really a quad drawn as outline of width thickness
  • 0094ef10 Menu_Collection::Render: this param named font, separate Font *font local
  • 008453c0 PlayerHUD::RenderActiveItem: two locals named shader (undefined * and undefined4 *); second is quad_set_rect result or book-image pointer
  • 006950c0 EntityConfig::LoadEntities: two locals named atoiFn; the char * one is a strlen/literal cursor
  • 00a1d710 render_color_quad: two locals named length; applied fVar1 -> length is dirX (to.x - from.x, normalized, then half-thickness term); color passed to ColorQuad ctor never initialized (probably &white)
  • 00468180 ENTITY_DADDYLONGLEGS: second Entity *bloodCloud wrong (RTDynamicCast'd spawned entity, later GetPlayerTarget)
  • 0048c3b0 ENTITY_BROWNIE: second Entity *subList wrong (Game::Spawn results and GetPlayerTarget); EStack_4c (EntityRef) shares slot with ColorMod copy from local_50
  • 005442a0 ENTITY_TARBOY: gridIdx declared twice (void *), holds room ptr, grid index, squared distance, RNG seed; local_2a4 typed Room * is player target then float scratch
  • 004bfd30 ENTITY_HUSH: two locals named player; EntityList_EL * one should be outcomePair (int *); local_48 (RNG) shares slot with projectile EntityList_EL
  • 0059edb0 ENTITY_ULTRA_GREED: two locals animState (Game*, AnimationState*)
  • 0075f0e0 AddCollectible: two locals playerManager (PlayerManager*, Entity_Player*)
  • 006dae40 GetChestLoot: local_48 is Daemon's Tail RNG then WeightedOutcomePicker vector; local_c9 Safety Cap flag then "not start room" flag; local_bc Rusted Key RNG and weight half of pairs
  • 007fb250 SpawnClearAward: two locals itemPool (RNG*, ItemPool*); RNG* one is probably &local_38
  • 008d9340 Menu_KeyConfig::Render: layerIndex reused (gamepad cast result, action table base, widths, SelectedElement, column offset); keyName also strcmp cursor
  • 008da510 render_gamepad_layout: buttonName also current anim name in Idle/IdleUD compares; layerIndex also binding-table base and widths
  • 00849510 RenderCraftingTable: unusedArg is a slot loop counter
  • 0083eae0 render_pocket_item_info: b and g are param_2[0]/param_2[1] (text box x/y), not colour channels
  • 0061da10 Entity_Familiar::Update: projectile is Entity_Bomb* (bomb copy via __RTDynamicCast); listSize typed Entity_Player*
  • 007729d0 TakeDamage: tear declared twice (Entity_Tear*, EntityList*); effect declared twice (Entity_Familiar* is bone-heart index counter ~526829); spawnedEffect declared twice (RNG* one is Eden RNG passed to RNG::Next)
  • 00961b00 Entity_Knife::Update: second spawnedTear (RNG*) is the RNG passed to RandomFloat (&local_158)
  • 007c4180 UsePill: Color *pillRng is per-pill stat-up colour (suggest statColor); second RNG *pillRng exists; rngFloat/blueOffset are float args to Color::Color
  • 00431be0 ai_umbilical_baby: ropePointCount is a rope point pointer (float *), also min/max select pointer; pEVar15 typed Entity_Projectile holds any hit entity (tear flags show as _curvingStrength/_acceleration/_orbitDistance/field_0x434)
  • 00414e00 InterpolateNullFrames: startFrame is a running frame position (end frame in copy path)
  • 00843df0 RenderHearts: colorOffsetB declared twice, both reused (x spacing, row, x position); byte isMultipleMantles holds SetAnimation results and CL junk
  • 00751650 generate_dark_closet: isRepentanceStage twice (bool, byte); byte copy reused for Item::IsAvailable result and RNG shift byte; roomIt reused for g_manager
  • 00a01020 fire_hitscan: gridCenterY declared twice (grid row, ceil radius in cells, X loop counter)
  • 009688d0 UpdateSwingHits: ownerPlayer also copy of player
  • 00919980 Menu_Save::load_slot_data: int gain declared twice; first is offset (shareEndOffset+1) before use as gain
  • 00904050 make_timestamp_string: newSize declared twice
  • 0099c790 / 0083eae0: poolIdIt, poolIdsBegin types wrong (see types)
  • 007e33c0 FindGridPath: leftNeighbor is element 0 of neighbor array
  • 0064aab0 anm2_apply_gfx_overrides: param unusedString is used (split on '&' into "layer-colorPreset"); presetColor is first float of ColorMod overlapping std::string temp auStack_9c
  • 0058a010 Entity_NPC::Render: timer is the entity pointer (positions at +0x33c/+0x340)
  • 00806c20: iconColor/shadowColor see types
  • 0073e0a0 Level::load_room: db/locals.tsv row 0073e0a0 this pit wrong (should be this level); ApplyLocals looks up by name so a row cannot fix it while a pit local exists
  • 004186c0 EntityList::Update: two locals isAnyWallEntity (byte, bool); the byte one holds DoesEntityShareStatus result and checksum byte count; checksum and player also declared twice, void * copies are this pointers for Checksum::Update
  • 004e6570 ENTITY_GRUDGE: Entity_NPC *entityRef has several roles (npc copy, speed float, collided entity, EntityRef return); name only fits the collided entity
  • 0059c830 ENTITY_TURDLET: two locals segmentPosY; one also saves flags high dword
  • 00607620 Entity_Effect::Render: two locals player (Entity_Player *, Color * pointing at parent color copy)
  • 00739370 place_special_rooms: roomDesc twice (RoomDescriptor*, RoomConfig_Room*); isFullHealth is the return value and every bool result (AnyoneHasTrinket, HasTrinket, GetStateFlag, place_room)
  • 004d1290 ENTITY_MOM: target twice (Entity*, EntityPtr*); the EntityPtr* one is an operator_delete size/temp
  • 00982100 PreRenderContinueImg: secondAnimState twice (AnimationState*, ModManager*)
  • 008f06e0 Menu_SpecialSeeds::Render: isEffectAddable also SetAnimation result and a strlen char; textBuf2 is a stack argument slot
  • 007fa360 remove_grid_entity_for_spawn: npcGridIndex also a column loop counter
  • 00a03f90 Weapon_Knife::Fire: knife and ownerPlayer hold the room pointer, a vector end and push args
  • 00506bd0 ENTITY_FLY: EntityPtr *player (lines 391/696) and EntityPtr *projectile (line 700) are pointers to the smaller of two health/speed values; clash with real Entity_Player *player/Entity_Projectile *projectile
  • 00610540 Entity_Familiar::Kill: Sprite *player and this_01 never assigned (this of Sprite::SetColor on spawned effects); Sprite *player clashes with Entity_Player *player
  • 004f2c20 ENTITY_GOAT: Entity_NPC *laser (line 181, passed to GetPlayerTarget) never assigned, should be the other goat (fVar18); clashes with Entity_Laser *laser
  • 0049d130 ENTITY_CHIMERA_body: Vector *game (Vector::Normalize(game)) never assigned, should be pVVar5 (&npc->_velocity); clashes with Game *game
  • 00493200 ENTITY_RAG_MAN: Entity_NPC *randomPlayer is a head count, velocity component and spawned ragling/head; clashes with real Entity_Player *randomPlayer (line 1440)
  • 007b0be0 StoreGameState: existing game is typed GameStatePlayer* (savedState+0x137, then a float min-pointer, then g_game); another local game (Game*) exists
  • 007cc200 SwapForgottenForm: Entity_Player *spawnedEffect (twin player _subPlayer, spawned poof/trail effects, this/tempEffects._player) and a second Entity *spawnedEffect
  • 00459d20 ENTITY_DEATH: two playerTarget (Entity*, Entity_NPC*); the NPC one holds spawned/dynamic-cast entities (horsemen at walls, variant-0x14 spawn)
  • 00749270 maze_swap_rooms: gridSize is room height (RoomConfig +0x47), then cell count (h+2)*(w+2)
  • 00518e20 ENTITY_SWARMER: flagsHigh also entity-deque offset and size counter
  • 005cdb20 Entity_Effect::Init: two locals player (Entity_Player*, Entity_Familiar*)
  • 00458870 ENTITY_WAR: two literalCursor (anim-name byte cursor; s_Attack1/s_Attack2 name holder)
  • 007a4ba0 level_start: startX is a Vector (Ascent door start position), its .y later reused as an RNG-seed pointer
  • 00496fb0 ENTITY_SISTERS_VIS: an existing local is named this (Vector*); EVar20 is the sister (npc->_child) then a laser-ref slot at L898/L1024
  • 007d6670 poop_spell_roll: previous names earlyPool/midPool/latePool misleading; really rare (Black/Holy/Diarrhea, one queue slot), mid, common pools, shuffled afterwards
  • 0047c850 ENTITY_GURDY: two boilListData; the second is a spawn Y float
  • 004aafa0 ENTITY_DOGMA: Game *camera (uninitialised ECX passed to Game::SetColorModifier) and Camera *camera; wallRng (RNG) shares slot with an EntityList_EL in state 0xd; playerSlot (int*) also an entity/projectile pointer
  • 00443e50 ENTITY_BEAST_ultra_death_scythe: Entity *trailEffect and EntityPtr *trailEffect
  • 006261f0 Entity_Familiar::HandleCollision: two collectibleRng; the Vector * one (line 1654, Vector::operator_ne(collectibleRng,&g_vectorZero)) is not an RNG
  • 007d9d00 CalculateBagOfCraftingOutput: two pickup4; one holds bag[0]/bag[4] (lines 88/90, should be pickup0), the other Item::IsAvailable results
  • 0056ffa0 ENTITY_MOTHERS_SHADOW: two player, two sprite (see types)
  • 004db6a0 ENTITY_TWITCHY: two byte *curAnim; 004faad0 ENTITY_FACELESS: two nearEntity (the Vector * one at line 146 is not an entity)
  • 00821fc0 is_obstacle_path_valid: score and rightCol each declared twice; one rightCol holds goalRow (old row wrong)
  • 00a58cb0 send_message: connection twice, one reused for a child pointer and a sequence value; 006b9c10 anm2_resolve_spritesheet_path: isFileFound twice (bool, byte); 004ed840 ENTITY_CULTIST: animNameChar twice
  • 006e8ae0 Entity_Pickup::HandleCollision: itemOverlay (ItemOverlay*, Entity_Player*) and gridEntity (Entity_Player*, GridEntity*) each twice
  • 0055ad20 ENTITY_BUBBLES: CreateTimer argument delay is just the loop counter (ends at 1)
  • 0071b410 SpawnDrops: rng (ColorMod ) wrong, roles are seed%3, ColorMod, RNG** argument; rename back or split
  • 0075b540 costume_path_apply_skin_color: params outIsPlayerPathFound and outIsSkinPathFound are swapped (end writes *outIsPlayerPathFound = isSkinPathFound)
  • 004e8fa0 UpdateCordChain: two segmentLength (rest length vs measured-distance scratch); fVar28 = segmentLength - segmentLength is distance minus rest length; rest-length one should be restLength
  • 0051e0f0 ENTITY_URIEL: two angelMatch; 006e3940 Entity_Pickup::Update: two explosionSprite (RNG *, ANM2 *)
  • 006ff2a0 BombDamage: two player; the Vector *player is the ToCardinal direction at line 484
  • 0050e4d0 ENTITY_GLOBIN: two flagsHighPtr; the undefined1 * one is the saved puStack_20 frame pointer
  • 007ae4b0 RestoreGameState: two friendBallHealth; the undefined4 one is a swap/copy temp (lines 110-114, 287-292)
  • 00acebf0 mapping0_forward: vorbisInfo, codecSetup, pcm each twice (first vorbisInfo is vi, second is backend state b; pcm = param_1[9] is n/pcmend, other is vb->pcm[i])
  • 007e7070 HasPathToPos: int column twice (one is room width); 0060bae0 setup_loot_preview: uint preventedCurses twice (one is GetEntity subtype); 006a24d0 Entity_Bomb::Update: trinketRng twice (RNG*, Entity_Bomb* copy of this passed to IsRocket); 00743550 generate_greed: roomDesc twice
  • 00552d30 ENTITY_BLOOD_PUPPY: game twice (GridEntity*, Game*), flagsHigh twice (uint, undefined4)
  • 00816910 SpawnGreedModeWave: bossWave (float) twice, rngResult (uint) twice, door (Room*, GridEntity_Door*); first bossWave is the new wave number (greedModeWave+1) as uint
  • 006d2e50 Entity_NPC::Render: curses twice (real uint, extraout ECX holder); 0091a450 load_persistent_game_data_buffer: src twice; 00591460 ENTITY_SIREN: flagsHigh twice (uint3, undefined4); 0070d3f0 LoadSprite: colorizeG twice (one is offset[2] copy); 00aa38a0 inverse_mdct: n2 twice (second is stb i_off/k0)
  • 00436fd0 wisp_kill: two tear (Entity_Tear*, Entity_Familiar* holding a float) and two spawned; 007a6c50 room_enter: two itemConfig (the Entity_Player* is extraout ECX passed to GetEnterPosition, i.e. this); 007fec00 TriggerBossDeath: two isAngelSpawnRoom (byte one is a general bool temp)
  • 004fdf80 ENTITY_MOLE: existing db row for dVar23 is stale (it is dVar13 animFrame)

Other (globals worth adding, dead stores, etc.)

  • 006670f0 Entity_Tear::Update: DAT_00c346a0/b0/c0/d0 are .data BitSet128 constants for bits 76/125/126/127; d0 duplicates g_tearFlagLudovico; add to globals.tsv
  • 00535280 ENTITY_SQUIRT: fStack_154..fStack_118 are dead stores; ppvVar19 is inlined Entity_NPC::set_entity_ptr_f54
  • 00569170 NpcAI::ENTITY_MOTHER: FUN_0044bc90(n) is a global EntityPtr slot getter (heldSlot)
  • 00a1d710 render_color_quad: color uninitialized in ColorQuad ctor call
  • 007efa50 Room::on_leave: giving EntitySaveState a 0x78-byte struct fixes many reused slots
  • 00a69090 refill_buffer: local_88 xorKey is first dword of 128-byte key (local_84..local_c rest)
  • 0090d640 NetplayManager::save_frame_snapshot: no prototype before; added bool isResetEntities (RET 0x4 at 0090d949)
  • ApplyLocals.java: parser.parse() outside try block, an unparseable type string (e.g. BitSet128[16], int[16]) aborts whole script; rows whose new name already exists are skipped, blocking same-name retypes and the Hush/Pickup ColorMod retypes
  • db/protos.zhl Color::copy_constructor_ext: entry +0x74/+0x78 called ints but load_boss_colors (00698e80) fills them from atof of "scale" and a second float attribute (scale, hpScale): floats
  • 00495610 ENTITY_RAG_MEGA: Color::Lerp(&lerpOut, from, ...) reads from never set; probably &baseColor
  • 00649290 Entity_Familiar::apply_tear_flag_effects: UseActiveItem(..., (short*)&local_b8.field_0x2, ...) takes the address of a stack slot; decompile artifact
  • 007d6670 poop_spell_roll: spell names (lateFart, earlyDiarrhea, ...) assume REPENTOGON PoopSpellType order 1 Poop .. 11 Diarrhea; unconfirmed in this repo
  • 0069c420 load_bossportraits_xml: ECX is field +0x2a670 of whatever EDI holds in Manager::load_configs (caller 00953be8 lea ecx,[edi+0x2a670]), a vector of 100-byte entries at +0x20; header comment "EntityConfig._bosses-like" is wrong
  • 00584140 ENTITY_SCOURGE_chain: garbage case 0x584eb6: switch on spawnVariant (Ghidra artifact)
  • 00735a30 ItemPool::load_pools: uStack_100c7 is the pool entry byte set from the item config's +0xb0; meaning unknown
  • 0057e4a0 ENTITY_ROTGUT_maggot: spawn_blood_explosion is passed uninitialised ColorMod *color where &bloodColor is meant; 0050af90 ENTITY_GUSHER: Color::Color constructs into local_7c but uninitialised color is passed to spawn_blood_explosion

Build failures (ApplyLocals)

  • 007b2230 Entity_Player::UseCard: "Bad instruction count exceeded" in ApplyLocals' decompile; its locals rows never apply.
  • 005d2a70: "PTRSUB off of non structured pointer type"; its locals rows never apply.
  • 009f7930 Weapon::TriggerTearEffects: since round 23, "Symbols local_2a8 and pencilVelX assigned to the same variable": the row pWVar13 pencilVelX float committed storage overlapping the local_2a8 Vector. The dump still decompiles; only new rows for this function are blocked. Fix in Ghidra by clearing pencilVelX's type, or drop the row and re-import.
  • dump/all.c: 57 functions have a header comment Ghidra's decompiler printed without its closing */ (e.g. 0062bb70 Entity_Familiar::room_enter), so all.c is not valid C as a whole; scripts/source_tree.py reads signatures as the last paragraph before { to stay clear of it.