82 lines
7.0 KiB
Markdown
82 lines
7.0 KiB
Markdown
# Repentance+ screen, part 3: every room's backdrop, DecorationSeed, camera focus, HUD rows, door snapshot
|
|
|
|
Read from the dump (v1.9.7.17) for isaac-classic's Rebirth art style (rif/rep-look-3). Builds on rep_screen_2.md.
|
|
|
|
## DecorationSeed
|
|
- `Level::place_room 0x738ab0(slot, data, seed, ...)`: `Seeds::Init3 0x428940` on RNG {seed, 2, 7, 9}: first Next ->
|
|
desc+0x58 DecorationSeed, second -> +0x5c SpawnSeed, third -> +0x60 AwardSeed, then shifts 11, 7, 12 -> +0x64
|
|
BossDeathSeed. `seed` is the level generation RNG's state as it drew the room's config (try_place_random_room,
|
|
place_special_rooms, generate_random_layout, MakeRedRoomDoor's own rng); DEBUG_goto_room 0x73fc80 uses Random().
|
|
- `generate_mirror_world 0x74f0c0` copies the source room's DecorationSeed onto the mirror room.
|
|
- `Room::LoadBackdropGraphics 0x7f1380` (0x7f17ef): backdrop RNG (Room+0x6af0 = Backdrop+0x4f28) = {DecorationSeed, 5,
|
|
9, 7}; Backdrop+0x4f38 = DecorationSeed too (the throwaway RNG's seed, shifts 4, 3, 27, never advanced).
|
|
- `PreRenderControls 0x934770` jitters each key by the backdrop RNG's state as render_floor_to_target ends (its own
|
|
copy, shifts 5, 15, 17).
|
|
|
|
## Floor `render_ashpit_ash 0x9353b0` -> `render_floor_to_target 0x9356a0`
|
|
- `get_random_floor_variant 0x935270` twice (second kept): Ashpit (46/59, no alternate flag 0x1000) and Gehenna (47)
|
|
from the throwaway RNG; Mausoleum (33/40) rooms not 1x1: RandomInt(floors - 1); else RandomInt(floors).
|
|
- Quads: `grid_rect_to_quad 0x932090` (tiles on a sheet), `render_grid_rect 0x932120` (tiles from origin (52,52)),
|
|
flips 0x931f50 (x), 0x931fc0 (y), 0x932020 (both).
|
|
- Cathedral (15) rooms not 1x1/L/closet: 52x52 squares over the floor, each Next()&3 of tiles (11,14) (13,14)
|
|
(13,16) (11,16); tile (15,14) at the four corners (0,0) (W-3,0) (0,H-3) (W-3,H-3) mirrored.
|
|
- L rooms with lfloor: half = RandomInt(2) (Ashpit: kind==1); quarters (0|13|26, half*7, 13, 7) laid at (0,0),
|
|
(13,0), (13,7) for 11 (LBL), mirrored toward the notch for 9/10/12.
|
|
- Closets with nfloor: half = RandomInt(2); IH (0,2,12,3) + its first column mirrored at (12,2); IIH (0,2,13,3)
|
|
twice, the second mirrored; IV (4,0,5,6) + its first row flipped at (4,6); IIV (4,0,5,7) twice, flipped.
|
|
- Else: chunks (cell's tiles 2..9 x 2..6) doubled past 32 and Fisher-Yates shuffled; Dark Room (16/18): six fixed
|
|
px rects, no shuffle, picks Next()&3 (bottom row (Next()&1)+4), its rows end at H-5. An L room without lfloor skips
|
|
the notch's chunks (row>4 / col>7 by quarter); the far column/row/corner by the same test.
|
|
|
|
## Walls `pre_render_walls 0x937420` (full spec: scratch specs/walls.md of the agent; summary)
|
|
- config.walls == 0: nothing. Set: shop (20) in a shop room or Greed, by Room::_shopLevel (Room::Init 0x7f30fb:
|
|
Greed by stage 1..5, stage 6 normal rooms 5 else 1; normal mode 1 raised by achievements 0x97..0x9a): rareDen 4/3/2/1
|
|
for levels 2-5, level 1 wallVariants = 1. Gehenna/Ashpit: throwaway RNG. Basement boss: set = wallVariants, then
|
|
wallVariants = 1, and per grid cell Next()&1 -> 1000.7 splat inside bounds+20 with Next() scale *2.5+0.5.
|
|
Sacrifice (30), Corpse entrance (39), pre-Ascent Mom room: centre blood (dx*0.6, closets double one axis, < 100).
|
|
- pick = RandomInt(rareDen)==0 ? RandomInt(wallVariants) : 0. Corners (2x2 of the cell), closets' at the shape
|
|
table's rect (DAT_00c35b80), L's notch corner twice (at (11|13, -2|H-2) and (-2|W-2, 5|7)). Columns 0..W-3 (sources
|
|
2+i, 7+(i&1), W-1-j mirrored), rows 0..H-3 (2+r, 4+(r&1), H-1-r flipped); L runs over the notch moved to it
|
|
(top 7 / bottom -7, left 13 / right -13), closets inset 2 / 4 and their ends' rows or columns skipped. L inner
|
|
corner from px (468, set*52). Cathedral floor (stage 10 type 1) closets and L rooms: fixed pieces of cell 0.
|
|
- `spawn_wall_details 0x93b760` per piece (RNG draws: Burning Basement 1 for variant 1; Dank Depths 3 + pillar/h/v
|
|
decorations; Dross RandomInt(40) lights; Mines RandomInt(4) lanterns; Ashpit 1; Mausoleum RandomInt(3) torches;
|
|
Gehenna RandomInt(2), chains RandomInt(3) [+RandomInt(2) + 7 RandomInt(3)]).
|
|
- `render_wall_detail 0x93d510` at the corners (and an L's notch ends): each h/v layer RandomFloat < 0.18 (Ashpit set
|
|
2: 0.45; Mausoleum boss: 1 unless flipped y) -> RandomInt(layer frames).
|
|
- Blood splat 1000.7 (`Entity_Effect::Update 0x5ef105`): SizeNBloodStains by the scale it was given (<.4, .6, .8,
|
|
1.2, 2, else 6), frame Random(frames), flip Random(2)==0, drawn at +0x478's scale.
|
|
|
|
## Camera (camera spec)
|
|
- `Entity_Player::GetFocusEntity 0x779320`: Marked target, else weapons' slot 9: Ludovico's tear, Epic Fetus'
|
|
target, Bone's target; knife/bombs/laser/brimstone only with Ludovico (329). update_focus_position: a = 0.2 *
|
|
(focus - player) unless a knife without Ludovico; a thick laser (variant 1/3) of a player's, no Ludovico: a =
|
|
35 * lastDirection.
|
|
- `Camera::SetFocusPosition 0x944d10`: first per frame; focus ring (120, f 0.5) of sentinels (-1,-1) replaced by the
|
|
natural target when averaged. Writers: Mother, Dogma (state 2 intro, 16), Dogma angel (16), Beast (18), Mega Satan
|
|
(Appear, (320,210)), Hush (state 2), Ultra Greed (state 2, y-100), Gideon (state 1).
|
|
- Two camera steps a tick (Manager::Update 0x954cd0); odd step after interpolate_update: players a real 60 Hz step,
|
|
others pos += vel*friction*speed*0.5. Enemy pull: boss weight 0.6 in the denominator only.
|
|
|
|
## HUD
|
|
- StatHUD 0x84c2c0 / RecomputeStats 0x84ca00: Duality (498): devil = angel = p; merged icon hudstats2 frame 10 in
|
|
row 6, row 7 skipped. Rosary Bead (trinket 7): devil row "0.0%", angel row min(sum, 100) with summed delta, colour by
|
|
its own delta, timer = max of both.
|
|
- Greed (HUD::Render 0x9a5262): icon 7 (Greedier 11), "%d/%d" wave / (10 + Greedier) 4 px after the icons, stages < 7;
|
|
the lone-icon 4 px shift not on Greed floors 1-6.
|
|
- Charge bar 0x8453c0: soul (Bethany, colorize .6,.85,1.2), blood (Tainted Bethany, 1,.2,.2) under the charge:
|
|
min(1, (stored + charge)/max), timed/special bars full by any; partial (half alpha), overcharge, berserk.
|
|
- `Minimap::render_icons 0x98e170` (mapitemicons): The Mind 5 alone, else Compass 0, Blue Map 1, Treasure Map 2;
|
|
Restock 4; curses by bit; at most 7, right to left 16 apart ((n-3)-16 from 4); small map F + (45,55), large
|
|
(W-32, content height + 24). Curse of the Lost: small map minimap_questionmark.png at F + (8,8), opaque; large map
|
|
nothing but the icons.
|
|
- refresh_room_icons 0x98b5e0: maxIcons 1 small / 4 large; room icon then pickup kinds by Heart > Item > Trinket >
|
|
Chest > Rune > Card > Pill > Key > Bomb > Poop > Coin > Battery > Beggar > Slot > Ladder > Portal; slots centre,
|
|
halves, quarters; floor(cell + border + gap + slot - 6).
|
|
- Game::update_map_input 0x98dba0: hold == 10 -> Level::ShowName(sticky): ui_streak TextIn (9) then TextStay at
|
|
y = H-48; release -> HUD_Message::text_out (TextOut, 11). Stacked messages start at 83 meanwhile.
|
|
|
|
## Door snapshot
|
|
- `RoomTransition::Update 0x8318a0` capture: with a door direction and animation 0/2 only the player who went
|
|
through (PlayerManager _roomTransitionPlayer) is made invisible before Room::Render into the old target.
|