How pret/pokeheartgold works
This repository is a work-in-progress disassembly of Pokémon HeartGold and SoulSilver, whose player-facing product is a pair of Pokémon game ROMs. A principal runtime path is player interaction in the field, where the script manager sets up and runs map scripts; those scripts can represent events and lead into game systems such as battles. The tree and excerpts also show battle control, storage, graphics, and several standalone activities. Evidence is uneven: unsampled capabilities are included where the tree supports them, but their runtime connections are not inferred.
Main entry points: battle_controller_player.c Player battle control · script_manager.c Script manager · field_sprite_manager.c Field sprites · scr_seq Map event scripts
Components 18
Field and events
- Script manager
src/script_manager.c - Map event scripts
files/fielddata/script/scr_seq - Field sprites
src/field/field_sprite_manager.c - Map props
src/field/map_prop_manager.c
Battle systems
- Player battle control
src/battle/battle_controller_player.c - Battle interface
include/battle/battle_controller.h - Battle state
include/battle/battle.h
Game activities
- Pokémon storage
src/pokemon_storage_system.c - Pokédex
src/application/pokedex/ov18_021E8BF4.c - Pokéathlon
src/pokeathlon/pokeathlon_course.c - Voltorb Flip
src/voltorb_flip/voltorb_flip_tasks.c - Radio search show
src/application/pokegear/radio/shows/pokemon_search_party.c - Communication club
src/overlay_03/communication_club.c - Credits
src/credits/credits.c
Runtime services
- Touch input
src/touch_hitbox_controller.c - VRAM transfers
src/vram_transfer_manager.c - Frontier scripts
src/frontier/frontier_script_context.c
Other components
- Player
Connections 5
- Player → Script manager: interacts with
- Script manager → Map event scripts: loads scripts
src/script_manager.c - Player battle control → Battle state: uses battle state
src/battle/battle_controller_player.c - Player battle control → Battle interface: uses controller interface
src/battle/battle_controller_player.c - Field sprites → VRAM transfers: transfers resources