6.2 KiB
6.2 KiB
Menus (MenuManager and friends), as the port's Rebirth-style skin transcribes them
Port: isaac-classic src/game/menu/rebirth_menu.{hpp,cpp} (logic), src/app/rebirth_menu.cpp (drawing).
MenuManager 0x986450
_viewPositionSet(Init 0x987450, at MenuManager+0xf6f8..): title (1) 0,0; save (2) 0,-270; game (3) 0,-540; daily (4) -960,-810; character (5) 0,-810; challenge (7) 480,-405; collection (8) 0,-1080; stats (9) 480,-1350; options (10) -480,-1080; bestiary (0xe) 480,-1670; mods (0x10) 1440,-290. Each menu's Position = -set at Init.- Update 0x9897d0 (60 Hz; sprites advance on even framecounts): ViewPosition eases to (screen-480x270)/2 + set[sel]:
step = max(1, dist*0.1) along the gap; within 1 it snaps and
_state= 0. Fade out +0.025/update. - Render 0x98a040: clear quad 0xffccbebb, every menu at ViewPosition + Position, fly at ViewPosition + (d0.004d + 364, d0.004 + 176) (d = distance from the title's place; wings sin(frame%802pi/80)+8, shadow *0.4), MenuOverlay.png stretched over the screen, MenuShadow at (0, H-148), the overlay again at the vignette's alpha (eases 0.025 toward 0.5 on Hard/Greedier).
- Menu_Challenge::Update 0x945e50 overwrites set[7].y each update: cursor<5 -216; <43 -216-(c-4)*22; else -1074 (0xbaae84/0xbaaea8). The challenge menu's Position is NOT -(480,-405): Init calls Menu_SpecialSeeds::Reset 0x8f19f0 ("Menu SpecialSeed Init") before "Menu Challenge Init", and that Reset writes set[7].y = -216 ([g_menuManager+0xf740], asm 0x8f1a5c), so Init reads (480,-216) and the challenges' Position is (-480, 216): -216 is the list's top. (Reading Position as -405 put the first rows ~260 pt low.) set[i] lives at MenuManager+0xf704+8i; 0xf6fc/0xf700 (constructor: 0, -1350) are the special seeds' base view, copied into set[6] by Init and Menu_SpecialSeeds::Update.
Menu_Game 0x981140
Items 0 New Run (push 5), 1 Continue (skipped without a save; Item2 layer frame 0 saved / 1 greyed / 2 rerun), 2 Online, 3 Challenges (7), 4 Stats (9), 5 Options (10). Cursor layer frame = item. KeyDownTimer: act at 0, then
49 every 10.
Menu_Character
- Table 0xb24140 (24-byte entries: anim, player type, hidden-unless-available, 3 item-line achievements); tainted page = entries +18 (types 21..37).
- Reset 0x948fc0: depth = max(0,N-10)^20.01 + 2 (pow at 0x94e3b0, exp 0xbaa638 = 2.0); h=(depth-1)/2, k=h/(h+1), width = ((h+1)-kh)1.3/sqrt(1-k^2); scrollSpeed = (360/N)/(width50); start entry 1, place N-1.
- UpdateRotations 0x94d500: per portrait (the turn steps once per portrait, N times an update) toward (360/N)place the short way, at most scrollSpeed; portrait i angle a=-(i2pi/N), b=(90-turn) deg: t=clamp((sin(a+b)-1)*-0.5,0,1), f=(depth-1)t+1, scale 1/f, x=cos(a+b)70/fwidth+240, y=sin(a+b)70/f0.4+85. Locked page: layers 4..15 hidden, Name frame 1, Unlocked By shown.
- handle_input 0x94c580: actions 0xe confirm, 0x16 up (difficulty back: 0->2|3), 0x17 down (0->1->2->3|0; Greedier needs achievement 0x155), 0x14/0x15 left/right (pressed; held repeats on cooldown 10 while the wheel stands), 0x1c MENUTAB seed entry (view x -480), 0x18 LB special seeds, 0x19 RB page swap.
- Render 0x94a500 places: page swap (54,50), completion (80,50), difficulty (365,120), seed (350,45; text centred at 400,57 TeamMeatEx10 0xff362f2d), win streak (45,140; count at 85,162), seed entry at +480 (halves at 185,35/60 TeamMeatEx16). render_portraits 0x94bee0 fades far portraits toward (231,221,220).
- SelectRandomChar 0x94de50: steps = pick + 3N, speed (360/N)/30, slowing over the last 60 toward scrollSpeed/6.
PauseScreen / Menu_Options / GameOver
- PauseScreen::Render 0x9b7190 at (W0.6, H0.5); Show sets cursor 2; Update 0x9b5d20 cursor 0..3: options, my stuff, resume, exit (Cursor anim has 3 frames: the port maps options/resume/exit to them).
- Menu_Options::Render 0x9b31c0: rows at Background's OptionPositions (240,62) + ispacing, spacing = round((ceil((N20-104)/52)52+104)/N); paper top at (240,16), middles every 52 from +100; Adjustor1 frame = volume10, OnOff frame 1 = off, Cursor layer only on the selected row; pause variant hides Background and dims at 0.6078.
- GameOver::Render 0x998880 / Show 0x9997c0: 0.502 black, Diary at centre+16; Portrait = seed%12, Location = stage frame (1-2:0 3-4:1 5-6:2 7-8:3 9:5 12:6 13:11 else 4), Boss/Enemy = killer portrait (0x95 unknown), Name = player type; seed halves at SeedPos (-146,-73) -4,+2 and +17, TeamMeatEx12.
Open: keyboard defaults of MENU LB/RB/TAB (InputDeviceKeyboard table not found); the port binds Tab and the swap_character control (E).
Run screens (isaac-classic rif/menus-runs, src/app/menu_runs.cpp)
- Menu_Challenge::Render 0x9462c0: the paper with Cursor/Titles/Strikeout/Locked hidden, then per challenge 1..45 those three held on frame (id-1) (Titles shown unless locked via the achievement table DAT_00b7b0b0, Strikeout once done: _cutsceneCounters byte), then Cursor on frame (selected-1). The rows' places are baked into those frames; the 45th's Titles frame stands apart (y 817), the lowest is the 44th (1043). The port cuts each challenge's frames into its own package (tools/rebirth_challenges.py) and places row n at the list's Titles frame n.
- Menu_Challenge::Update also sets Seeds::_isCustomRun = 1 for a challenge (with an empty start seed).
- Menu_Save::Update 0x9d9c60: actions 0x14/0x15 walk files 0..2 (in the confirmation they toggle this[2]), 0x17 takes Delete (this[1] = 3, DeleteSelect), 0x16 back to File1, 0xf back (cancel the confirmation / delete pick, else pop). Render 0x9da6d0: the file drawings at the select animation's Drawing1..3 nulls; replace_slot_graphics 0x9db2d0 picks a drawing from achievements (unported). saveselectmenu DeleteConfirmationIdle's Cursor: frame 0 at 166,164 (Yes), 1 at 254,161 (No).
- Menu_Game::Update: MENUTAB (0x1c) pushes the mods menu (0x10), not the daily; the daily lives under Online.
- HUD::Render 0x9a3eb0's icon row: 4 hard (not daily/challenge), then 5 when achievements are off (_isCustomRun, AchievementUnlocksDisallowed, rerun, challenge) or 8 on a daily, then greed 7/11 (9 in the cleared greed boss room).
- Manager::RestartGame 0x958cb0 keeps the start seed of a custom run (not a challenge's); persistent_game_data_set_writable 0x95a680 leaves the save read-only for a custom run.