Commit Graph

818 Commits

Author SHA1 Message Date
Retnuhytnuob
77c628e0ee
Sound Effect Naming, kickback naming, catch state enum (#211)
Some checks failed
CI / build (push) Has been cancelled
* kickback naming, catch state enum

* sound renaming through 98
2026-03-19 17:59:21 -05:00
Youpeoples
69f931d646
Mass naming: Ball/PinballGame Unk variables, function names (#210)
Some checks failed
CI / build (push) Has been cancelled
* sha1 compliant

fingers crossed

* oops. You need these too.

missing files.

* renames

* renames 2

* renames 4

* more renames

347 replacements, 31 files. SHA1 verified.

## Ramp Prize (was "rubyPondBumper")

- `rubyPondBumperHitFlag` -> `rampPrizeType` -- controls Nuzleaf ramp prize (0=none, 1=1UP, 2-100=powerUp). Not pond-related at all, it's the prize platform at the top of the Ruby ramp.
- `rubyPondBumperTimer` -> `rampPrizeRespawnTimer` -- 600-frame cooldown before ramp prize respawns with random type.

Files: global.h, board_process3_ruby.c, collision_checks.c, ruby_ramp_entities.c + PC port (26 total)

## Screen Shake

- `horizontalShakeOffset` -> `screenShakeX` -- X-axis camera shake (Whiscash + Rayquaza). Shorter, clearer.
- `bonusBoardYOffset` -> `screenShakeY` -- Y-axis camera shake (Rayquaza + Groudon, bonus stages only). Pairs with screenShakeX.

Files: global.h, board_process2.c, board_process3_rayquaza.c, board_process3_groudon.c, board_process7.c, ruby_board_entities.c + PC port (44 total)

## Gauntlet Flash (drop "Boss")

- `gauntletBossFlashTimer` -> `gauntletFlashTimer` -- not a boss fight, it's a projectile launcher board feature. "Boss" was misleading.
- `gauntletBossFlashActive` -> `gauntletFlashActive` -- same. The `gauntletProjectile*` fields were already correct and kept as-is.

Files: global.h, collision_checks.c, ruby_board_entities.c + PC port (20 total)

## Egg Delivery System (was "TravelMode"/"EvolutionMode")

Two delivery paths exist after the hatch cave: Pelipper (rare, Totodile) and egg drop (common, Aerodactyl). The old names "Travel" and "Evolution" referred to the delivery mechanism, not the game modes of the same name. This was confusing.

Fields:
- `travelSpriteFrame` -> `pelipperDeliveryFrame`
- `pikaSaverAnimFrameTimer` -> `pelipperDeliveryTimer` -- "PikaSaver" was a leftover decompilation artifact
- `modeSpriteTimer` -> `eggDropTimer`
- `modeSpriteX` -> `eggDeliveryX`
- `modeSpriteY` -> `eggDeliveryY`
- `modeSpriteVelX` -> `eggDeliveryVelX`
- `modeSpriteVelY` -> `eggDeliveryVelY`
- `eggAnimTravelState` -> `eggDeliveryState` -- dropped misleading "Travel"

Functions:
- `InitTravelModeSprites` -> `InitPelipperEggDelivery`
- `AnimateTravelModeSprite` -> `AnimatePelipperEggDelivery`
- `InitEvolutionModeSprites` -> `InitEggDropDelivery`
- `AnimateEvolutionModeSprite` -> `AnimateEggDropDelivery`

Files: global.h, functions.h, catch_hatch_animations.c, ruby_catch_mode.c + PC port (132 total)

## Catch Hole Animation (was "sharpedo")

- `sharpedoOamIndex` -> `catchHoleAnimFrame` -- used by both Sharpedo (Ruby) and Wailmer (Sapphire). Named after the shared mechanic, matches adjacent `catchHolePauseTimer`.
- `sharpedoTileVariant` -> `catchHoleTileVariant` -- same, shared between both boards.

Files: global.h, ruby_catch_mode.c, board_process3_sapphire.c, ruby_board_entities.c, sapphire_board_entities.c, pinball_game_main.c + PC port (73 total)

* more renames

362 replacements across 28 files. GBA ROM SHA1 verified.

## Renames

### gravityFrozen -> ballGrabbed
This field is set to 1 when a legendary boss grabs the ball during its attack sequence, and cleared to 0 when the ball is released. The old name described what happens as a side effect (gravity stops updating), but the actual state being tracked is whether the boss is holding the ball. Used by Kyogre, Groudon, and Rayquaza boss fights.

### bossColorState -> kecleonFramesetBase
Only used by the Kecleon bonus stage. It stores a base animation frameset index derived from Kecleon's movement direction angle (via `gKecleonVisibleWalkDirectionMap`), then various offsets are added to select specific walk/stand/fall frames. Nothing to do with color.

### bossSubEntityState -> dusclopsWalkFootIndex
Only used by the Dusclops bonus stage. Cycles through values 0-4 to track which foot Dusclops is leading with during its walk cycle. The parity (`& 1`) determines animation direction. Other bonus stages initialize it to 0 and never touch it again.

### kecleonHitState -> kecleonBoardHitState
Tracks collision with any of the 14 berry zones on the Kecleon board (4 large + 10 small, collision cases 8-12), not just Kecleon's body being hit directly. The broader name better reflects that this covers all scope/berry overlay collisions.

### catchSpinRadius -> trapSpinRadius
### captureAngleQ16 -> trapAngleQ16
These two fields control the ball's spiral orbit during trap captures (boss fights, center hole traps, Jirachi bonus). They are not used by the regular catch system (Sharpedo hole). The old names mixed "catch" and "capture" inconsistently and were ambiguous with the separate catch mode. "trap" distinguishes this mechanic clearly.

### travelPelipperPosX/PosY/VelX/VelY -> travelPainterPosX/PosY/VelX/VelY
### gRubyTravelPelipper_Gfx -> gRubyTravelVolbeat_Gfx
### gSapphireTravelPelipper_Gfx -> gSapphireTravelIllumise_Gfx
The travel cutscene entity is Volbeat (Ruby board) and Illumise (Sapphire board), not Pelipper. The actual Pelipper has its own separate fields (`pelipperState`, `pelipperPosX`, `pelipperPosY` at offsets 0x306-0x322) and its own graphics (`gPelipper_Gfx` from `pelipper.4bpp`). The travel sprites at ROM 0x08483D8C / 0x08488A0C are 44-53% different from real Pelipper pixel data, and the Ruby and Sapphire variants differ from each other by 22-37% per frame, consistent with two distinct but related Pokemon. The previous "travelPelipper" labels were a misidentification.

### rouletteSpeciesId -> rouletteAreaIndex
This array stores area-based portrait indices (0-12) used to look up graphics sets, not actual species IDs. The lookup table `gAreaToSpeciesTable` is essentially an identity mapping (area N maps to index N). The old name made it sound like the roulette was selecting a specific Pokemon species, when it is selecting an area index for portrait rendering.

## Source File Reverts

17 source files reverted from descriptive names back to their original ROM-offset names. The `ld_script.txt` linker order was updated to match.

| Descriptive Name | Reverted To |
|------------------|-------------|
| `interrupt_handlers.c` | `rom_850.c` |
| `text_graphics_util.c` | `rom_1068C.c` |
| `banner_camera.c` | `rom_1A0F4.c` |
| `ruby_catch_mode.c` | `rom_1A98C.c` |
| `ruby_board_entities.c` | `rom_201B8.c` |
| `catch_hatch_animations.c` | `rom_27E08.c` |
| `catch_roulette_rendering.c` | `rom_27F94.c` |
| `sprite_link_init.c` | `rom_2414.c` |
| `ruby_ramp_entities.c` | `rom_2C538.c` |
| `sapphire_board_entities.c` | `rom_2E67C.c` |
| `sapphire_egg_cave.c` | `rom_30480.c` |
| `sapphire_visual_effects.c` | `rom_31BE8.c` |
| `capture_registry.c` | `rom_31CF8.c` |
| `bonus_stage_transitions.c` | `rom_356A0.c` |
| `board_layout_init.c` | `rom_467F4.c` |
| `ruby_hud_animations.c` | `rom_4F258.c` |
| `sapphire_hud_animations.c` | `rom_50AD4.c` |

* removal

Removed duplicated & unwanted renames

* renames

## Changes Made

### Misidentified Pokemon Entities (6 functions + 2 fields)

Wrong Pokemon names from initial decompilation. Corrected based on in-game sprite identification.

| Old Name | New Name | File | Notes |
|----------|----------|------|-------|
| `InitPelipperEggDelivery` | `InitTotodileEggDelivery` | rom_27E08.c | Sprite group 82; Totodile carries egg when `rubyPondState == RUBY_POND_STATE_LOTAD` |
| `AnimatePelipperEggDelivery` | `AnimateTotodileEggDelivery` | rom_27E08.c | Same entity |
| `InitEggDropDelivery` | `InitAerodactylEggDelivery` | rom_27E08.c | Sprite group 12; Aerodactyl flies in with the egg |
| `AnimateEggDropDelivery` | `AnimateAerodactylEggDelivery` | rom_27E08.c | Same entity |
| `UpdateGauntletBossAnimation` | `UpdateChikoritaAttackAnimation` | rom_201B8.c | Sprite groups 13-14; Chikorita shoots leaf projectiles at bumpers |
| `AnimateGauntletBossSprite` | `AnimateChikoritaSprite` | rom_201B8.c | Sprite group 53, flash animation |
| `pelipperDeliveryFrame` | `totodileDeliveryFrame` | global.h (0x2C3) | Misattributed to Pelipper |
| `pelipperDeliveryTimer` | `totodileDeliveryTimer` | global.h (0x2C4) | Same |

### Chikorita Fields (7 fields, 0x2B0-0x2BC)

| Old | New |
|-----|-----|
| `gauntletFlashTimer` | `chikoritaFlashTimer` |
| `gauntletFlashActive` | `chikoritaFlashActive` |
| `gauntletProjectileX` | `chikoritaProjectileX` |
| `gauntletProjectileY` | `chikoritaProjectileY` |
| `gauntletProjectileVelX` | `chikoritaProjectileVelX` |
| `gauntletProjectileUnused` | `chikoritaProjectileUnused` |
| `gauntletProjectileTimer` | `chikoritaProjectileTimer` |

### Chikorita Data Labels (3)

| Old | New |
|-----|-----|
| `gGauntletExplosionTiles` | `gChikoritaExplosionTiles` |
| `gGauntletProjectileTiles` | `gChikoritaProjectileTiles` |
| `gGauntletBossFlashFrameIndices` | `gChikoritaFlashFrameIndices` |

### Spheal Stage Entity Disambiguation (3 functions + 1 struct + 1 data label)

The Spheal bonus stage has two Pokemon: Spheal (flying enemies) and Sealeo (ground minions that get knocked down). Functions were lumping both under "Spheal."

| Old Name | New Name | Notes |
|----------|----------|-------|
| `UpdateSphealMinionLogic` | `UpdateSealeoEntityLogic` | "Minions" use `minionState`/`minionFramesetIx` - these are Sealeo |
| `UpdateSphealFlyingEnemyLogic` | `UpdateSphealEntityLogic` | Flying enemies ARE Spheal; dropped redundant "FlyingEnemy" |
| `UpdateSphealKnockdownPhysics` | `UpdateSealeoKnockdownPhysics` | Knockdown targets are Sealeo (operates on `minionState[var0]`) |
| `struct FlyingEnemyPath` | `struct SphealFlightPath` | Flight path data for Spheal patterns |
| `gSphealFlyingEnemyPathData` | `gSphealFlightPathData` | Matching struct rename |

### Ruby Board Distinction (4 functions)

These are Ruby-only but lacked the "Ruby" prefix. Sapphire counterparts already had it.

| Old Name | New Name |
|----------|----------|
| `DispatchCatchModeInit` | `DispatchRubyCatchModeInit` |
| `UpdateCatchModeAnimation` | `UpdateRubyCatchModeAnimation` |
| `InitEvolutionShopMode` | `InitRubyEvolutionShopMode` |
| `AnimateEvolutionShopSequence` | `AnimateRubyEvolutionShopSequence` |

### Improved Descriptiveness (3 functions + 2 data labels + 1 field)

| Old Name | New Name | Notes |
|----------|----------|-------|
| `ProcessMainBoardBallDrain` | `ProcessMainBoardBallDrainAndLaunch` | Also handles plunger charging/launch (lines 421-438) |
| `HideCaughtPokemonSprite` | `CleanupCaughtPokemonSprite` | Sets OAM off-screen AND sets `available=0` |
| `HideJirachiSprites` | `CleanupJirachiSprites` | Hides sprite group 33 AND deactivates 4 star tag groups (45-48) |
| `gMonIconTilesGfx` | `gPikaSaverTilesGfx` | Pikachu saver icon tiles, indexed via `gPikaSaverAnimFrameTable` |
| `monIconTileIndex` | `pikaSaverTileIndex` | Indexes into `gPikaSaverTilesGfx` |
| `field` (0x10FD) | `savedField` | Adjacent fields are `savedTempField`, `savedIsBonusField`, etc. |

### Comments Added (4)

| Location | Comment |
|----------|---------|
| `progressLevel` (0x70E) | Becomes bonusMultiplier at end-of-ball; displayed on the blue bonus sign |
| `ballLaunchTimer` (0x1328) | Countdown to activate secondaryBall (multiball) |
| Fields 0x1106-0x110E | Values applied by the pause process (set when pausing) |
| Fields 0x1110-0x1118 | Values preserved from before pause (restored when unpausing) |
2026-03-15 19:40:33 -05:00
Retnuhytnuob
c555ddb059
Misc dump in Rom_2 (#205)
Some checks failed
CI / build (push) Has been cancelled
* checkpoint

* checkpoint 2

* checkpoint 3

* checkpoint 4

* checkpoint 5

* carve 86aa4a8, aa20c, aa208

* carve through ACCA0

* through 086ADA6E
2026-03-07 19:05:44 -06:00
Marcus Huderle
d4b22a7fd6 jq is a dependency right now
Some checks failed
CI / build (push) Has been cancelled
2026-03-04 18:14:37 -06:00
Wendy Moniuk
634f4b72bb
add debug packaging and documentation to set up debugging (#206)
Some checks are pending
CI / build (push) Waiting to run
2026-03-03 14:36:40 -06:00
Retnuhytnuob
956787ad3b
Deep dive naming / const extraction, and minor dumps for Ruby Pond entities (#204)
Some checks failed
CI / build (push) Has been cancelled
* checkpoint

* checkpoint 2

* checkpoint

* checkpoint

* checkpoint

* checkpoint

* final mode_change update

* remove temporary whitespace from gDuskullSpritesheetOam

* correct spelling of collision

* remove unneeded .orig files

* remove unneeded comment

* starting checkpoint

* hatch tile detour complete

* Most Whiscash done

* Whiscash mode doc complete

* PlayRumble naming

* fixed newline
2026-03-02 07:22:41 -06:00
Retnuhytnuob
15da57f3f7
Dusclops Bonus Deep Dive Naming & incidental dump/naming (#202)
Some checks failed
CI / build (push) Has been cancelled
* checkpoint

* checkpoint 2

* checkpoint

* checkpoint

* checkpoint

* checkpoint

* final mode_change update

* remove temporary whitespace from gDuskullSpritesheetOam

* correct spelling of collision

* remove unneeded .orig files

* remove unneeded comment

* Rename PlayRumble function
2026-02-28 13:06:45 -06:00
Wendy Moniuk
97bf71ef12
dump some sprite sets (#201)
* dump some sprite sets

* extract all sprite sets

* add pokeball sprites

* add all the slot options images
2026-02-28 12:26:23 -06:00
Retnuhytnuob
fecffc2c90
Defaults for Packed OAM data & other packed OAM readability. (#200)
* Oam data defaulting & readability

* .
2026-02-28 12:25:35 -06:00
Retnuhytnuob
e4f20ce73b
dump SpeciesRSToCryID list, minor data file organization (#199)
Some checks failed
CI / build (push) Has been cancelled
* dump SpeciesRSToCryID list, minor data file organization

* stray character in name
2026-02-21 10:37:34 -06:00
Retnuhytnuob
00b481a0b0
Dump Evolution item pickup, initial sprites (#198)
* Evo appear gfx

* leafstone

* all but mismatched sun

* sun alt appear/sparkle

* update list name
2026-02-21 10:35:27 -06:00
Retnuhytnuob
f9a80d46ef
dump/split kyogre/groudon/rayquaza intro sprites (#197)
* dump/split kyogre intro sprites

* groudon intro

* rayquaza intro sprites
2026-02-21 09:56:13 -06:00
Wendy Moniuk
310933e331
More intro sprites (#195)
Some checks failed
CI / build (push) Has been cancelled
* Add dusclops stage intro

* rename intro load function and add kecleon intro sprites
2026-02-15 14:24:41 -06:00
Retnuhytnuob
e422d7b8ad
Dump/split board intro sprites (gUnknown_0845A48C, gUnknown_0845F9EC) (#194)
Some checks are pending
CI / build (push) Waiting to run
* ruby board

* Sapphire Intro, naming

* remove unneeded incbin comment
2026-02-15 08:21:13 -06:00
Retnuhytnuob
b480b7a99f
sharpedo/wailmer helper table {oam/variant} and wailmer graphics (#190)
Some checks are pending
CI / build (push) Waiting to run
* sharpedo/wailmer helper table {oam/variant} and wailmer graphics

* Naming for known Gfx variables

* name known Oam object data
2026-02-14 15:34:44 -06:00
Retnuhytnuob
a0c21c3947
Add split bonus clear graphics (#191)
* Add split bonus clear graphics

* rename, following pattern seen elsewhere
2026-02-14 15:34:03 -06:00
Wendy Moniuk
e699e66cd4
initialize the oamSprite var for compatibility (#189)
Some checks are pending
CI / build (push) Waiting to run
* initialize the oamSprite var for compatibility

* add images for bonus, cyndaquil and gulpin

* more graphics, found kecleon

* add more sprite data
2026-02-14 09:12:26 -06:00
Retnuhytnuob
7f1366b440
Rename sound constants with code use confirmation (#192)
* Name Sounds matching code use

* capitalization

* capitalization pt 2

* rename known se_unk_???.s files
2026-02-14 09:11:21 -06:00
Retnuhytnuob
6d0c274c9a
Dumps High Score default data, graphics for High score, ereader and intro screens (#193)
* dump sprites between 957A0 and E1F40

* dump default/debug high scores

* images 9AFC0 and 80500

* high score text name

* naming

* scenes 5-8
2026-02-14 09:10:01 -06:00
Wendy Moniuk
081a0c0b7d
extract icons, egg and various arrays (#188)
Some checks failed
CI / build (push) Has been cancelled
* extract icons, egg and various arrays

* Add the whole animation

* Some cleanup

---------

Co-authored-by: Marcus Huderle <huderlem@gmail.com>
2026-02-09 09:00:29 -06:00
Retnuhytnuob
450aa1c2a6
Gbagfx OAM chunk handling, with override support (#143)
Some checks are pending
CI / build (push) Waiting to run
* Add tooling support for graphics with 2^n chunking

* update to OAM handling, from 2n sizing

* Update assembly to use the hex, rather than music name, for ease of uese in decompme/m2C

* additional tools/examples

* graphics build, not currently compare matching.

* remove sprites.png

* working conversion in make file!

* stage/main folder done

* stage/misc folder done

* stage/ruby complete

* stage/sapphire updated

* base for remaining kinda-graphics; file name casing

* more name casing

* extract catch sprites

* remove special 6x4 handling from oam slicer; switched hed the 2 images to using non-oam 2x2 chunks. (net same, but allows the 6x4 to process normally when things like the whalmer are found)

* Palette info for the catch sprites, thanks to cyphgirl

* obliterate the old hatch-sprite code

* refactor segments to not have the base file name dependancy

* catch mon 1-9, horizontal layout

* rename the f param in the json for graphics

* casing cleanup?

* .

* possible fix for the out of date segment piece

* Replace graphic_cnvt_attrs.txt strategy with individually-generated makefile rules

* Don't specify tileCount

---------

Co-authored-by: Marcus Huderle <huderlem@gmail.com>
2026-02-08 14:17:19 -06:00
Marcus Huderle
018ce17fa8 Fix github actions build 2026-02-08 08:54:04 -06:00
Bivurnum
e6294201ab
Moved gEggLocations to src/data/egg_locations.h (#187)
* Moved gEggLocations to src/data/egg_locations.h

* Cleanup egg_locations migration

* spaces

---------

Co-authored-by: Marcus Huderle <huderlem@gmail.com>
2026-02-08 08:43:04 -06:00
Wendy Moniuk
bdb4109696
missed some packed oam data (#186)
Some checks failed
CI / build (push) Has been cancelled
2026-02-02 16:56:36 -06:00
Wendy Moniuk
071405bc7e
second chunk of oam data (#185)
Some checks are pending
CI / build (push) Waiting to run
2026-02-01 18:24:39 -06:00
Marcus Huderle
2174becc8d Fix calcrom 2026-02-01 18:23:17 -06:00
Wendy Moniuk
e86005e7ec
Extract several regions of packed oam data, more to come. (#184) 2026-02-01 17:44:22 -06:00
Marcus Huderle
489f77ad2b Convert all samples to .wav files 2026-02-01 11:43:10 -06:00
Marcus Huderle
a87731b003 Whoops, commit directsound .bin files
Some checks are pending
CI / build (push) Waiting to run
2026-01-31 16:14:12 -06:00
Marcus Huderle
d38752d071 Dump lots of sound data
Fix SE labels

Finish dumping songs and sound effects

Fix voice group

Fix comments
2026-01-31 16:05:32 -06:00
Marcus Huderle
07ffa070b0 Use ASCI C string literals for species english names
Some checks failed
CI / build (push) Has been cancelled
2026-01-25 09:42:58 -06:00
Marcus Huderle
7afca62229 Move unused katakana into their presumed charmap positions, based on pokeemerald 2026-01-25 09:39:28 -06:00
Bivurnum
d498c3964b
Identified unk2 in struct PokemonSpecies and provided Japanese names (#183)
* Added Katakana to charmap.txt

* Assigned the Japanese characters the proper values

* Identified unk2 and changed data to Japanese names
2026-01-25 09:34:25 -06:00
Marcus Huderle
604d9d3c39 Remove leftover comment 2026-01-24 11:03:23 -06:00
Marcus Huderle
c5b91446c8 Dump gSpeciesInfo to C 2026-01-24 11:02:42 -06:00
WhenGryphonsFly
cb8904e6ed
Merge pull request #175 from Smileynator/scoring_variables
Some checks failed
CI / build (push) Has been cancelled
Named variables related to score counting and animating
2025-09-30 18:40:05 -05:00
Smileynator
c7088b1de9 Resolved conflics with master 2025-10-01 00:09:21 +02:00
WhenGryphonsFly
ab621dc6ff
Merge pull request #179 from Retnuhytnuob/naming_flipperstate
Some checks failed
CI / build (push) Has been cancelled
Identify 'FlipperState' structure.
2025-09-20 12:12:12 -05:00
WhenGryphonsFly
d5396c0400
Merge branch 'master' into naming_flipperstate 2025-09-20 12:07:50 -05:00
WhenGryphonsFly
492b346e78
Merge pull request #181 from Retnuhytnuob/styleCleanup
Some checks are pending
CI / build (push) Waiting to run
Style cleanup: ++, --, and removed trailing whitespace
2025-09-19 21:35:14 -05:00
Retnuhytnuob
b415b4937d cleanup ++, --, and removed trailing whitespace 2025-09-14 03:16:07 -05:00
Retnuhytnuob
ea6b79a536 flipper state naming 2025-09-14 02:20:47 -05:00
Marcus Huderle
4cfe4de60e faulty number parsing checks to fix 0 values
Some checks failed
CI / build (push) Has been cancelled
2025-09-07 08:09:25 -05:00
Retnuhytnuob
6e79ed0cc5
Decomp sub_203CC (#178)
* decomp sub_203CC

* .
2025-09-07 07:49:03 -05:00
Retnuhytnuob
60513c50c6
consolidated functions with board process6, merged collision files, named game idle file. (#177)
Some checks failed
CI / build (push) Has been cancelled
2025-09-05 08:11:18 -05:00
Wendy Moniuk
974c683ffc
decompile sub_71DC (#176)
Some checks are pending
CI / build (push) Waiting to run
* decompile sub_71DC

* remove expected objects file
2025-09-04 18:38:47 -05:00
Smileynator
971936123c Found the name of a few more variable names 2025-09-04 21:52:25 +02:00
Smileynator
0fdca67e6c Merge with master - resolved conflicts 2025-09-04 20:36:38 +02:00
Smileynator
d5e5e3ca6b One more variable i spotted the naming of 2025-09-04 20:26:44 +02:00
Smileynator
4e14c22985 some unsaved files i forgot 2025-09-04 20:26:41 +02:00