Repository navigation
Main cleanup - #201
Merged
Merged
Main cleanup#201
Conversation
Report for SLUS_008.92 (8515813 - c61a15b)✅ 3 new matches
🥀 3 broken matches
|
Eletonyy
approved these changes
Oct 30, 2026
It sends the GPU one command that stops setting the STP bit on drawn pixels, which battles turn on. It is only called from main.c, so it is now static.
Mode 2 is the battle-start transition, 3 the battle and 4 the battle results screen. The enum moves to gamestate.h next to g_renderMode, and the code uses its names instead of numbers.
VsyncHandler sets it every VBlank and the field clears it when a fade-in starts. Nothing reads it.
Both add one frame's share of a second every VBlank and tick their timer when a whole second has passed.
roengstrom
force-pushed
the
main-cleanup
branch
from
October 30, 2026 20:51
e3235aa to
6f5073b
Compare
dargor123
approved these changes
Oct 30, 2026
Eletonyy
approved these changes
Oct 30, 2026
func_80011870 records where a loaded game resumes each time the menu opens, and RestoreSnapshot puts it back. This also names the facing direction and previous field it saves.
It is the field engine's global state block, not an entity.
A field's script entities live in four arrays, one per kind: lines, doors, background animations and actors.
Its two public functions move out of fe_object1.h, and the trigger dispatcher only it calls becomes static.
fe_object1.h repeated the declarations gamestate.h already has.
The field's random battle roll reads a 256-byte table at g_fieldRngIndex and adds g_fieldRngOffset. The field state snapshot saves both.
SaveFieldSnapshot runs when the menu opens and RestoreFieldSnapshot when a save is loaded. Both are only called from main.c, so they are now static.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.