# Functions the runtime watches without changing what they do: the original
# is kept (renamed <name>_orig) and the runtime's hook_<name> runs it.
# <module> <address> <name> (USA addresses; tools/region.py moves them for the
# European version)

# HD text (runtime/hdtext.c): every letter the game draws, and where its
# pixels go.
main 0205b36c GlyphBlit                    # draws one letter into a text window
main 02001a40 Memcpy                       # memcpy: the letters' tags go along
main 02045864 GlyphCell                    # draws one letter into its own texture (dialogue windows)

# Modern > Save by itself (runtime/autosave.c): the field's frame, where the
# adventure is saved every 10 minutes.
ov017 0218d0ec FieldFrame                  # once a frame on the field

# Modern > Map markers (runtime/mapmarks.c): the rank the game gives each
# chest of a grotto's floor, shown beside its mark.
main 0201afd0 GrottoFloorObjects           # a grotto's floor: its chests (and the rest) placed
main 02090018 GrottoChestRank              # ActiveGrottoClass::RandomizeChestRank: one chest's rank (1-10)

# Cheats > Monsters always drop their item (runtime/cheats.c): the battle's
# end rolls each monster's item with this (a random number below r0; 0 drops
# it); the hook makes it 0 for those two calls only (rare item, then common).
main 02032370 RandBelow                    # a random number from 0 to r0 - 1

# Enhanced > Townspeople in 3D (runtime/npc3d.c): a townsperson's picture
# (a sprite facing the camera) drawn; its quads hidden, a model drawn there.
main 0203cd64 DrawSprite                   # one sprite: its quads, for the way it faces as seen from the camera

# Modern > Use several (runtime/multiuse.c): an everyday item's "What do you
# want to do?" gets the row "Use several" (its text, written with tags, gets
# one more); the rows chosen there and in "To whom?" after it.
ov002 0215cd98 ItemCmdText                 # writes the item's menu: <TITLE=..>, then <N=0>Use</N>... (object, text, frame)
ov002 021631e8 ItemCmdFrame                # the item's menu, once a frame (its row chosen: the next screen)
ov002 02163664 ItemWhoFrame                # "To whom?" for an item, once a frame (the companion chosen: the item used)
main 0205d794 MenuRow                      # a window's chosen row: the item's menu does what its row does (theirs, with ours one more)
main 02084a64 StatGain                     # a lasting gain on one member (a seed's): its amount (r0 the member, r1 the effect)
ov002 021548c4 HealHP                      # HP healed on one member by an item (r2 the amount): the amount healed
ov002 02154944 HealMP                      # MP healed the same way
main 020a0a08 BagTake                      # items taken from the bag (r1 the item, r2 how many)
