main, field: main function, more field functions and splits - #172
Merged
Merged
Conversation
Xeeynamo
approved these changes
Sep 17, 2026
Xeeynamo
left a comment
Owner
There was a problem hiding this comment.
Skimmed through it. This is a very high quality PR. Great work!!
| #define MOUSEright (1 << 2) | ||
|
|
||
| // scratch pad address 0x1f800000 - 0x1f800400 | ||
| #define getScratchAddr(offset) ((u_long *)(0x1f800000+offset*4)) |
Owner
There was a problem hiding this comment.
Just a heads-up: I might change this to something like this in the future: https://github.com/Xeeynamo/sotn-decomp/blob/master/include/scratchpad.h#L22
| GAMESTATE_MENU_COMMANND = 13, // Commands called from field to menus | ||
| GAMESTATE_SNOWBOARD2 = 14, | ||
| GAMESTATE_LOAD_INSTR2 = 16, // Load instrument bank for One-Winged Angel | ||
| } GameState; |
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.
Matching main(), .rodata for 14C70.c corrected so it includes the block of arrays used by functions in that TU.
field_entity.c TU identified from PC port and split out. Most of the functions decompiled based on PC equivalents. NON_MATCHINGS functions in field.c have .rodata alignment issues and need to be split into separate TU before they match. FieldMain and FieldMainLoop have some odd casts and temps because one of them reading a volatile member from g_FieldState also affect the other. They need a bit of further cleanup after decomping more functions to figure out the volatility of more FieldState members.