6.0 KiB
6.0 KiB
Repentance+ screen, part 2: door transition, camera, backdrop variants, map, HUD details
Read from the dump (v1.9.7.17) for isaac-classic's Rebirth art style (rif/rep-look-2). Misnamed in the DB:
0x832850 "Entity_Player::TriggerRoomExit" is RoomTransition::Render; 0x993a70 "Camera::Update" is FX code;
0x9353b0 "render_ashpit_ash" is the floor pre-render; 0x9595e0 IsGameplayInputActive is the console's achievement block.
Door transition (RoomTransition = Game+0x1b83c)
- Fields: +0 state (0 idle, 1 capture, 2 out, 3 in, 4 wait anim), +4 frame, +8 duration, +0xc progress, +0x10 dir (0 L, 1 U, 2 R, 3 D, -1), +0x1c anim, +0x28/+0x30 old/new snapshot targets, +0x22c/+0x230 slide offset.
- Trigger
0x7f01c0 Room::update_door_transitions: |player - (door cell centre + 18 outward)| < 25, door passable. 0x6fd7c0 Game::StartRoomTransition->0x82ee40 RoomTransition::start: duration 30 (anim 2), 7 (a direction), 3 (none). Players' controls off, velocity 0.0x6fadc0 Game::Updatereturns early while state != 0 (RoomTransition::Update, map input, HUD::PostUpdate only): no Room::Update,_frameCountfrozen,Game::IsPaused0x6fd350 true (no camera).0x8318a0 RoomTransition::Update: case 1 one tick (old snapshot, ChangeRoom 0x830950: one Room::Update of the new room with controls on, new snapshot); case 3 frame++ to 7, then controls on, one Player::Update, state 0. Touch at T: frozen T+1..T+9, normal from T+10. No entry lock afterwards. p = frame/duration, +0.5/duration on odd render frames (0x6fd3f0 interpolate_update, interpolation on).- Slide distance (ChangeRoom): G = map column delta * 338, row delta * 182 points (13 x 26, 7 x 26); off-grid or across dimensions the rooms abut (dir 0: -target width26, 1: -target height26, 2: +current width26, 3: +current height26); W = G -/+ (new scroll - old scroll) along the axis; mirror world negates G.x.
- Render (0x832850, in place of Room::Render in states 2/3): s = (3-2p)p^2; old snapshot at -s*W alpha 1-s, new at
(1-s)*W alpha s (dir 2; signs flip for 0, y for 1/3), blend mode 1. Other anims: fade quad, black (white for 3, 0x12).
HUD on top,
0x8327e0 get_hud_alpha1 for the slide.
Camera (Room+0x11f8)
0x954cd0 Manager::Updateevery 60 Hz frame, not while paused.Options._cameraStyle(default 1 = ActiveCam on):0x9439d0 update_focus_position; 2:0x9446e0 update_follow(lerp 0.1..0.5 by squared distance 338/676).- Focus = players' middle (0x9beba0) + ring averages (0x943190; weight (i+1)/(e+1) up to e = nf, then falling):
aim 35aimDir (60 frames, .75), velocity 4.5vel (90, .85), enemies
0x942f20(300, .75: each CanShutDoors within 550, d((550-|d|)/550)*0.4, weight 1 or 0.6 boss), co-op spread (15, .5); one player only for aim/velocity. - Clamp bounds
0x9432f0; hard0x943490; soft0x943610: t from lo, x -6t^5+15t^4-14t^3+6t^2, y -4t^5+10t^4-10t^3+5t^2. - Door snap: first existing door (slots L0 U0 R0 D0 L1 ...) whose cell centre is within 30 of the middle: w = min(1, (30-d)/20), pos += (hard(D) - pos) * smoothstep(w).
- Ctor
0x9428d0: buffers zeroed, pos = hard clamp of the entry door (Level enter position soft-clamped). - Shake (same functions): 4-entry ring; timer < 1 push 0; frameCount%3==0 push 10*(cos a, sin a), else 2*(cos, sin) -
newest; a = Random()/2^323.142 (global MT 0x6eef60); newest *= clamp(timer/11); offset = weights 1..4 / 10.
Applied once per frame to every sprite quad (
0x409cb0) and explicitly to text, HUD and the minimap: one offset.
Backdrop variants (0x7f1380, 0x93d960, 0x93da00)
- RNG {DecorationSeed, 5, 9, 7}; RandomInt(n) = Next() % n (draws even for 0,
0x7e9020). - Floor
0x9356a0: RandomInt(floors) twice (second kept); cells FV*f.. doubled until >= 32, Fisher-Yates (j = Next() % (k+1)); 7x4-tile chunks (floor area of a 234x156 cell) at rows 0,3->4,... cols 0,6->7,... then far column, far row, corner = last bottom chunk HV; flips toward the far sides. L: lfloor halves by RandomInt(2); narrow: nfloor by RandomInt(2). Cathedral (15) big rooms tile 2x2 by Next()&3; Dark Room (16/18) fixed rects. - Walls
0x937420: wallIdx = RandomInt(walls); Basement (1) boss rooms cell WV for all, then per grid cell Next()&1 -> splat with one more Next(); pick() = Next()%3==0 ? RandomInt(WV) : 0; corners, then per column top/bottom, per row left/right; sources: top band columns 2-8 (middle 7+(c&1), far mirrored), left band rows 2-5 (middle 4+(r&1)). Wall details0x93b760: Burning Basement (variant 1: one Next), Dank Depths (three draws a slot).
Map key (0x98dba0) and large map (0x98e4d0)
- States 0 small / 1 held / 2 toggled; small +0.1 (to 1 from .9), large -0.2; held: large +0.1, full from hold 9; a tap (< 9) toggles; toggled large steps to Map Opacity (0.3 default) by 0.1.
- Large target 230x204, cells 16x14 + gap 1 (17x15), border 4, minimap2.anm2 (room pivot -4), RoomOutline blocks 26x24 per cell; drawn whole with alpha, content top-right at (W-24, 14); icons at floor(corner + 5 + slot - 6).
0x98e170 render_icons(mapitemicons): Compass 0, Blue Map 1, Treasure Map 2, The Mind 5 alone, Restock 4; curses by bit; right to left from (W-32, height+24) on the large map, frame+(45,55) on the small one.
HUD details
- Overcharge (
0x8453c0): BarFull again with colour offset red +1.0 clipped to min(1, battery/max); also soul/blood/ partial/berserk fills. Coins%03dwith Deep Pockets (416); icon row 16 apart (hard 4, daily 8 / no achievements 5, greed 7/11/9), Destination frame by challenge end stage (0x706940). Card shimmer (Tarot Cloth, tarot/reverse): offsets sin(t+.5).17+.17, sin(t+.25).1+.1, sin(t).25+.25, t = frameCount0.2. - StatHUD (
0x84c2c0): Duality merges the deal rows (frame 10); Rosary Bead shows 0.0% devil, sum on angel; a change shows even at 0. - Jacob & Esau (
0x9a6570layout 1): Esau anchor (W-64, H-33) mirrored; actives (x+12, y-12) bar 0, reserve (x+28, y-16) bar 38; trinkets from (x, y+20) step -16; pocket half size; actives/pocket alpha 0.3 + 0.7f (drop held); Jacob's reserve (x-45, y-16), trinkets (x, y+22) +16, counters +14.