Skip to content

Sprite groups Array Constant tagging#216

Open
Retnuhytnuob wants to merge 33 commits into
pret:masterfrom
Retnuhytnuob:spriteGroups
Open

Sprite groups Array Constant tagging#216
Retnuhytnuob wants to merge 33 commits into
pret:masterfrom
Retnuhytnuob:spriteGroups

Conversation

@Retnuhytnuob
Copy link
Copy Markdown
Contributor

@Retnuhytnuob Retnuhytnuob commented May 15, 2026

Summary

Adds constants for all sprite group array index references.
Corrects name references for sprite group related vars found to be misleading
Dumps fieldSpriteGroup arrays
Names FieldSpriteset values for all boards, with further naming of field specific spriteSet OAM data.
Refactors several packed sprite oam for readability. (All added after this pass was done previously)

Description

Dumps

  • gMainFieldSpriteGroups
  • gBonusFieldSpriteGroups
  • (Adds a macro to turn a variable length list of sprite group array indexes to their mapped memory address to help with this)

Renames:

  • gTitleMenuSlideOutAnimData -> gTitleMenuSlideOutAnimSpriteGroupData
  • multiple Rayquaza related Oam data references.
  • AnimateEvolutionSuccessScreen -> AnimateWasCaughtBanner (Used with both evolution and catching a mon)
  • RenderBonusStageOverlaySprites -> HideDusclopsSprites (Note: tagged one reference as a potential bug; due to field on if condition when leaving pause state)
  • A handful of 'titlescreen' fields.
  • gSphealExtendedScoreSprites -> gSphealNetFrontGfx
  • gPortraitGeneric* -> gLocation*
  • roulettePortraitIndexes -> areaRoulettePortraitIndex (accurate, but this should make it easier to identify which roulette.
  • gPokedexShowLinkCableIcon -> gPokedexShowCompletionBadge
  • multiple misidentified 'Makuhita' related variables/function.
  • gShopDigitTilesGfx -> gShopPortraitOverlayGfx (Sheen over shop entry when moving between items)
  • DrawRubyNuzleafPlatformSprite -> DrawRubyRampPrize
  • shopBonusStageAlreadyBought -> shopExtraBallPreviouslyPurchased
  • 'hatch' items which were actually for tiles for the 'catch' mode
  • seedotModeStartDelay -> travelModeStartDelay
  • gCatchHatchSpriteSets -> gEReaderSpriteSets
  • HighScoreScreenState.arrowBlinkToggle -> HighScoreScreenState.pressStartBlinkToggle
  • gDefaultBallPalette -> gDefaultTimerPalette
  • ballFrozenState -> ballPhysicsState
  • boardEntityActive -> cameraLocked
  • bannerPreserveBallState -> holdCameraLockAfterBanner
  • boardModeType -> eventTimerType

Names:

  • gUnknown variables related to gFieldSpriteSets
  • multiple packed SpriteSet data values related to the individual field sprite sets
    • All Dusclops, Kyogre, Groudon, Rayquaza, Spheal spritesets
    • Most kecleon spritesets, aside from a range of fields that get shuffled while working in that board, to fix 'y-sorting' for the draw order of the bushes/ball/kecleon.
    • Most spritesets used for the main board. (One unused item, one that I can't fully identify)

Refactors several packed sprite oam for readability of the underlying size.

  • (This process was done once before, so macro to handle it already exists. This covers all oam spritesets that were added after this pass was done previously)

Constant list for SpriteGroups, with named area callouts.

  • (note: the indent seen on some items in spriteGroups.h indicates items not seen directly in code, but known/tested from the dumped fieldSpriteGroup references.)
  • Shared board references (pause screen sprite groups)
  • Shared bonus/legendary board
  • Full bonus board sprite group usage (other than the 'shuffled while running' kecleon board)
  • Full sprite group list used by the title screen (not intro)
  • Full sprite group list used by the Field Select screen.
  • Full sprite group list used by the High Score screen
  • Full sprite group list used by the Pokedex screen
  • Full sprite group list used by the Options screen
  • Full(ish) sprite group list used by the Ruby/sapphire boards. (same as above)

FieldSpriteGroups

  • documentation for how these work. (Indirect referencing of sprite groups, using shared 'logical' references)
  • 1 field truly used by All fields. (0 = 'ball')
  • Const values used for the 'mon capture cutscene' (different references for main/bonus board)
  • Const values used for shared entries on the main boards

Additional work

  • Enums for the different banner modes. banneractive usage now has True/False consts
  • Enums for the different EReader cardIDs
  • Enum for High Score/Pokedex Dialog screens
  • Identified the pictures associated with 'Prize slot 14-16. (Commented, not name change)
  • Shop mode cursor consts now use the PRIZE_ enum
  • 'SquaredMagnitude' entry naming in functions updated to reflect 'squaredSpeed' vs 'squaredDistance'. (one function remains where the vectors are passed in was left unidentified)
  • Updated OptionsData field types (Based off of options graphics decomp function logic + sprite group identification findings)
  • Button Config arrays now use the button consts in additional applicable places.
  • Consts for OutlaneSide and PikaCoverage
  • Consts for EventTimerMode, BallSpawnState, BallPhysics mode

Held for later:

  • (Items not currently part of this PR.)
  • spriteGroups for EReader, Intro screens
  • Initial spriteGroup references for Kecleon, pre-shuffling.

Discord username

retnuhytnuob

@Retnuhytnuob Retnuhytnuob marked this pull request as ready for review May 25, 2026 05:56
@Retnuhytnuob
Copy link
Copy Markdown
Contributor Author

The main bulk of what I wanted with this PR is now done.

The work for the sprite groups for the Ruby/Sapphire boards is the majority of the SG_{number} entries that remain. (EReader/Intro also remain) and might be involved enough for a separate PR. - I'll work that as a separate chunk, and merge it in to this one later, if that gets completed before this is reviewed.

@Retnuhytnuob
Copy link
Copy Markdown
Contributor Author

Updated with FieldSpriteGroups, SpriteGroups, and spriteSet naming for all main board spriteGroups, and the Options screen.

Renamed misidentified Makuhita fields.
Additional consts for Banner modes.
Renamed 'SquaredMagnitude' fields to SquaredSpeed/SquaredDistance, where possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant