Merge items/death_certificate parity notes

# Conflicts:
#	db/names.tsv
This commit is contained in:
shweet committed 2026-10-30 16:46:45 -04:00
commit eb4952ed8f
2 files changed
+93 -1

No files matched your search

+4 -1
View File
@@ -117,7 +117,7 @@
006f9400 Seeds::GetForcedCurses src/rooms decompile labels (Seeds::GetForcedCurses?)
006f95a0 Seeds::GetPreventedCurses src/rooms decompile labels (Seeds::GetPreventedCurses?)
00744940 Level::Init src/rooms decompile labels (Level::Init)
00751650 Level::GenerateHome src/rooms decompile labels (Level::GenerateHome?)
00751650 Level::generate_dark_closet REPENTOGON ASM.zhl Level_generate_dark_closet_PostGenerateCollectibleSaveState hook; logs "Dark Closet Generated in %d Loops"; lays dimension 2 (stage 35 subtype 34 rooms, every item); notes/items/parity_death_certificate.md
00752c30 std::bitset<8>::to_string src/rooms decompile labels (std::bitset<8>::to_string(out))
007e9080 RNG::RandomFloat src/rooms decompile labels (RNG::RandomFloat)
007e90f0 RNG::Next src/rooms decompile labels (RNG::Next)
@@ -3478,3 +3478,6 @@
005cbf90 swap_ints ? (ECX = int*, EDX = int*): swaps the two; UseActiveItem Pandora's Box + Strange Key pool shuffle (0x5ba9fd)
00650610 FamiliarAI::vanishing_twin ? Entity_Familiar::Update case 0xf2 (Vanishing Twin, CheckFamiliar from 0x2b9): Transform, spawns its stored boss type (_coins) / variant (_keys) tied at +0xf54, Larry Jr. / 0xed / 0x38b special shapes, then a seeded collectible made a shop item with AssignOptionsIndex
00645bc0 FamiliarAI::lost_soul Entity_Familiar::Update case 0xd3 (entities2 3.211 Lost Soul): state +0xd88 0 FloatDown, 1 trail 48 behind player _aimDirection (+0x1630; within 48 adds player velocity x 0.4, else (spot - pos) x 0.04 capped 5), 2 PreSpawn then Spawn + sound 268 + reward by GetCollectibleRNG(612).RandomFloat (<.25 angel pool item, <.5 treasure item, <.75 3 x 5.10.3, else 2 x 5.10.4), 3 Spawn, 4 Death (sound 217 at 1.5 on Sound); friction x0.8; entity collision 4 only in state 1
007515c0 Level::enter_dark_closet Death Certificate use (UseActiveItem case 0x5c3433): outside dimension 2 lays it once, keeps the current room/dimension/leave door, StartRoomTransition(0x50, -1, 0x14, 0, 2)
009b1910 LevelGenerator::block_cell sets the generator +0x2b8 byte for (x, y) (13x13); generate_dark_closet blocks (1,6), (2,5), (2,7)
009b1a90 LevelGenerator::queue_push_front deque<uint> push_front on generate_rooms local queue
Can't render this file because it is too large.
+89
View File
@@ -0,0 +1,89 @@
# Parity sweep: Death Certificate (628 / 0x274) and dimension 2 (DIMENSION_DEATH_CERTIFICATE)
Repentance+ 1.9.7.17. Done in isaac-classic (src/game/rooms/level_generator.cpp, generated_dimension.cpp).
## Use: UseActiveItem case 0x5c3433 (table B slot 0x54)
- `SoundEffects::PlayWithFartOverride(0x41e)` (forgetmenow.wav), then `FUN_007515c0` (Level; named
`Level::enter_dark_closet` here). Remove result set when used owned or by Void (flags & 0x44): single use
(items.xml maxcharges 0).
- FUN_007515c0: if `_currentDimensionIdx != 2`: `GetRoomByIdx(0x50, 2)->Data == 0` -> `Level::generate_dark_closet`
(0x751650, REPENTOGON's `Level_generate_dark_closet` asm hook; db/names had `Level::GenerateHome?`); keeps current
room, previous room, dimension, last dimension and leave door in Level (Game +0x18900.. as read by Game::Update);
`_leaveDoor = -1`; `StartRoomTransition(0x50, -1, 0x14, null, 2)`.
## Level::generate_dark_closet 0x751650
- Dimension 2's room map is `_roomMap + 0x152` (169 per dimension); stage binary 0x23 (35, home.stb) loaded, or its
rooms' weights reset (+0x34 = +0x30) when loaded.
- Generator seed: `_generationRNG.Next()`; LevelGenerator RNG shifts (5, 9, 7) (`RoomDescriptor::Init` 0x9adaf0 is
the LevelGenerator constructor). Room-draw RNG: stage seed `_stageSeeds[stage (+1 on Repentance stage types 4/5)]`,
shifts (5, 7, 22).
- `CollectRooms(35, type 1, any shape 0xd, var 0..-1, diff 1..15, doors 0, subtype 0x22)` -> allowed shapes bitset
(home subtype 34: shapes 1, 4, 6, 8).
- Available items: every ItemConfig collectible with `Item::IsAvailable(3)` (flags 1 challenge/daily/greed bans, 2
achievement) but 0x29c (Dad's Note) and 0x274 (Death Certificate), in id order.
- Blocks cells (1,6), (2,5), (2,7) (FUN_009b1910 sets the generator's +0x2b8 byte grid); start room LevelGenerator_Room
at (2,6), shape 2 (IH), size from 0xc5d388.
- `LevelGenerator::Generate(50, false, false, false, &shapes, 0 dead ends, &start)`; if usable, clears dimension 2's
map and walks `get_all_rooms` (non-dead-ends in index order, then dead ends sorted by distance desc, selection sort):
- room at (2,6) with shape 2: RoomConfig room of type 1, variant 100 (home's start closet, subtype 33);
- else `GetRandomRoom(seed, reduceWeight 1, 35, 1, shape, 0, -1, diff 1..10, &doors(+0x1c), 0x22, 0)`;
- `Level::place_room`; then per spawn entry (16 bytes, stride 0x10): next seed, `Spawn::PickEntry`; a pick of 5.100:
with items left an EntitySaveState {5, 100, item, +0x10 item config +200 (charge), pos (gx*40+40, gy*40+120),
+0x30 options index 1, +0x34/+0x38 seeds, +0x50 `ItemPool::GetFirstItemPoolForCollectible`, scale 1, score 1,
+0x60 auto price 1} pushed to the descriptor's saved entities; the grid index always goes into a set (descriptor
+0x80, read by Room::Init 0x7f2800 to skip those spawns);
- stops once every item is placed (remaining rooms never placed); `update_room_doors` on the new descriptors.
- Log strings: "generate...", "placing rooms...", "Dark Closet Generated in %d Loops".
## LevelGenerator (0x9adbb0 ..)
Layout: [0..3] RNG, +0x10 allowed shapes, +0x14 grid[169] room index, +0x2b8 blocked[169], +0x364 rooms (0x48 each),
+0x370 dead ends, +0x37c others, +0x388 boss idx, +0x390 flags (unk3, unk2, unk4, ?).
LevelGenerator_Room: +0 valid, +4 index, +8 x, +0xc y, +0x10 w, +0x14 h, +0x18 shape, +0x1c door mask, +0x20 connect
dir, +0x24 connect slot, +0x28/+0x2c connect cell, +0x30 neighbour set, +0x38 count, +0x3c dead end, +0x40 distance.
- Shape sizes 0xc5d378 (w,h): 0 (0,0); 1-3 (1,1); 4,5 (1,2); 6,7 (2,1); 8-12 (2,2). Cell offsets per shape at
0xc5c4a0 (static init in get_room_placement_offsets): L shapes leave out (0,0) 9, (1,0) 10, (0,1) 11, (1,1) 12.
- Direction steps 0xc5d3e0: left (-1,0), up (0,-1), right (1,0), down (0,1); door slot & 3.
- has_shape_slot: height 1 -> no slots 4, 6; width 1 -> no 5, 7; closets 3/5 no even slots, 2/7 no odd (unless
ignoreThin).
- get_door_target_position: default {(x-1,y),(x,y-1),(x+w,y),(x,y+h),(x-1,y+1),(x+1,y-1),(x+w,y+1),(x+1,y+h)}; L shapes
their own tables (into their notch). get_door_source_position: the room's own cell the slot opens from.
- get_neighbor_candidates: per slot onto a free cell: a 1x1 (if allowed), then 13 spots (pos0 = target shifted one
further left/up for left/up doors; across = (0,-1) horizontal, (-1,0) vertical): shapes {6|4, 4|6, 4|6, 8, 8, L1,
L2, L3, L3, L4, L4, 2|3, 7|5} at {pos0, target, target+across, pos0, pos0+across, pos0, pos0+across, pos0,
pos0+across, pos0, pos0+across, target, pos0}, each drawn 1 in {48, 24, 24, 24, 24, 72, 72, 36, 36, 36, 36, 24, 24}
(always when 1x1 rooms are not allowed or unk), allowed and placeable; distance + 1.
- generate_rooms: start placed and pushed; pop front; candidates shuffled (Fisher-Yates); branch limit: start room
(target < 16: (Next & 1) + 2, else all), else min(4 coin flips, count); a candidate placeable with fewer than 2
neighbour cells around its connect cell (XL/Void flags: else 1 in 10) and is_placement_valid is placed; Next % 3 == 0
-> queue back, else front; stops at target rooms placed (start not counted).
- mark_dead_ends: non-start rooms whose connect cell touches < 2 other rooms' cells; parents cleared.
## Leaving
- Entity_Pickup::RemoveOtherOptions 0x6ee750: a collectible of options index 1 taken in dimension 2 with
`_deathCertificateExitTimer < 1` sets it to 0x5a (90). Others of its index poof (1000.15 at +10 y), collectibles
with timeout 4.
- Game::Update 0x6fadc0: while > 0: `_screenShakeTimer = 10`, count down; at 0 in dimension 2: `_leaveDoor = -1`,
`StartRoomTransition(saved room +0x18900, -1, 0x14, null, saved dimension +0x18904)`.
- Entity_Pickup::Update 0x6e3940: while the timer runs, any dimension-2 collectible of option 1 poofs (timeout 4).
- Level::ChangeRoom 0x73fc80: leaving dimension 2 restores the saved room, previous room, dimension, last dimension and
leave door.
- Transition 20: RoomTransition::start 0x82ee40 plays DeathTeleport on main players (controls off); Update waits for
the extra animation, then state 2 (3 frames); ChangeRoom 0x830950: in dimension 2 players at grid index width*4+10
(cell (10,4) of a 15-wide room), Appear from frame 2, familiars 3.238 moved there; outside, Appear at frame 2.
## Looks in dimension 2
- Game::GetStageID 0x738470 returns 0x23 (Home) in dimension 2 (and many stage-type reads short-circuit to 0x23:
ItemPool::pick_collectible, rocks, pits, Ambush::SpawnWave, update_ambient_effects).
- Room::PlayMusic 0x7eb1b0: track 0x45 (Echoes Reverse), no jingle.
- Room::LoadBackdropGraphics 0x7f1380: backdrop 0x3c (60 special_closet), 0x35 (53 house_closet_b) for a room config
of subtype 0x21 (the start closet).
- Room::GetLightingAlpha 0x81e250: alpha + 0.33 (max 1) in dimension 2 (not render_lighting's darkness + 0.6).
- Room::update_ambient_effects 0x824a70: mists (1000.138) in dimension 2, tint 120/255 grey.
- Entity_Pickup::UpdateSprite/Update: Curse of the Blind ignored in dimension 2.
- Minimap::refresh_room_icons 0x98b5e0: no room icons in dimension 2.
- get_rich_presence_room_status: 0x19 in dimension 2.