Repository navigation
Conversation
… calls func_0026F7B0 (was stub_empty_20) is empty in the boot, but it is a level hook: in each of USA v2.00's 27 level programs its value is that level's hero_update_button_hold_timers (func_L00_002CB218; 0x2CB4C0 in level 0's program, 0x2EDD80 in level 4's), read from each program's resolved symbols. UpdateModalState's mode 7 (the weapon quick select's paused mode) calls it in each of its four phases, so the hero's double-tap timers run while the world is held; read as an empty stub, that call looked like nothing. It is level_hook_hero_button_hold_timers now, with a comment at its definition and at mode 7 in the three UpdateModalState sources. Checked: names and comments only. The four changed C files are token-identical to master once tools/srcnames.py turns names back into address names (comments aside), so every object is the same; see the pull request for the builds.
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.
What
func_0026F7B0(wasstub_empty_20) becomeslevel_hook_hero_button_hold_timers. Only the name changes, plus comments at its definition (src/game/0026EA00.c) and at mode 7 in the three UpdateModalState sources (src/game/00286738-g8.c,src/pal/game/00287018-g8.c,src/us2/game/00287140-g8.c).Why
In the boot the function is an empty 8-byte stub, but it is a level hook: each level's program puts its own function at that symbol. In every one of USA v2.00's 27 level programs, its resolved value is that level's place of
hero_update_button_hold_timers(func_L00_002CB218, the hero's double-tap timers):These values come from the build's resolved symbols per program (
build/us2/<program>/config/undefined_symbols.ld), compared with theplacescolumn ofconfig/us2/levels/functions.tsv.UpdateModalState's mode 7 is the weapon quick select's paused mode. It calls this hook in each of its four phases, so the hero's double-tap timers keep running while the world is held. Read as
stub_empty_20, that call looked like it did nothing. I found this while porting the quick select to a Ratchet & Clank 1 mod (https://github.com/Promises/rac1-gc-weapon-wheel), where the double tap depends on it.Checked
tools/srcnames.pyturns names back into address names (comments aside).python3 tools/build.py boot --version us2 --strict:OK.python3 tools/build.py level 0 --version us2 --strictandlevel 4:OK.python3 tools/build.py boot --version pal --strict:OK.tests/check_repository.py: passed.tools/names.py check: current.tools/progress.py --check: passes.