Skip to content

Name 141 WRAM variables#63

Open
papasmurph0 wants to merge 1 commit intopret:masterfrom
papasmurph0:contrib/wram-renames
Open

Name 141 WRAM variables#63
papasmurph0 wants to merge 1 commit intopret:masterfrom
papasmurph0:contrib/wram-renames

Conversation

@papasmurph0
Copy link
Copy Markdown

Rename generic wd-prefixed WRAM labels to descriptive names across the AI, duel, card UI, OW movement, sprite animation, audio, and SFX subsystems.

Rename generic wd-prefixed WRAM labels to descriptive names across
the AI, duel, card UI, OW movement, sprite animation, audio, and
SFX subsystems.
Copilot AI review requested due to automatic review settings March 29, 2026 21:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Renames a large set of previously generic wd* WRAM labels to more descriptive symbols across core engine subsystems (AI, overworld, UI/menus, sprite/palette animation, credits, and audio), improving readability and maintainability of the assembly codebase.

Changes:

  • Replaced many wd* WRAM references with descriptive w* labels in engine/home code paths (AI, OW scrolling/movement, sprite/palette animation, menus).
  • Updated credits and deck/check-menu related state variables to named WRAM labels.
  • Renamed SFX/music engine WRAM fields (channel masks, per-channel state, backup buffers) and adjusted SRAM mapping names for renamed WRAM fields.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/home/unsorted.asm Updates OW tileset/animated tile and palette animation WRAM references to named labels.
src/engine/play_area_menu.asm Uses named WRAM flag for screen reinit behavior.
src/engine/glossary.asm Uses named WRAM flag for glossary reinit behavior.
src/engine/credits_commands.asm Renames credits scroll state bytes to wCreditsScroll* labels.
src/engine/bank4b.asm Renames OW tilemap/tileset loading and sprite anim scratch variables.
src/engine/bank13.asm Renames AI tracking/temp variables used in attack repetition and portrait logic.
src/engine/bank12.asm Renames AI counters/temps used in turn logic and targeting decisions.
src/engine/bank0e.asm Renames AI scratch variables used across multiple AI routines.
src/engine/bank0c.asm Renames GR Island scroll configuration WRAM usage.
src/engine/bank0a.asm Renames AI targeting temps and deck screen text pointer variable.
src/engine/bank09.asm Renames duel coin-toss animation WRAM fields.
src/engine/bank08.asm Renames an AI scratch byte used during bench scanning/selection logic.
src/engine/bank07.asm Renames palette fade state and multiple duel animation/screen shake WRAM fields.
src/engine/bank06.asm Renames naming screen cursor-row WRAM state.
src/engine/bank05.asm Renames several AI evaluation flags/counters used in retreat/attack logic.
src/engine/bank04.asm Renames OW/palette animation state and loaded BG map size references.
src/engine/bank03.asm Renames save/warp and OW-object motion scratch variables.
src/engine/bank02.asm Renames check-menu cursor navigation flags and deck/card-list UI flags.
src/data/save.asm Updates WRAM↔SRAM mapper entries to renamed WRAM symbols.
src/audio/sfx2.asm Renames SFX2 engine WRAM state (channel mask, pointers, per-channel fields).
src/audio/sfx1.asm Renames SFX1 engine WRAM state (channel mask, pointers, per-channel fields).
src/audio/music7.asm Renames music engine WRAM fields and backup/restore buffers for channel state.
src/audio/music6.asm Same as music7: updates music engine WRAM names and backup/restore buffers.
src/audio/music5.asm Same as music7: updates music engine WRAM names and backup/restore buffers.
src/audio/music4.asm Same as music7: updates music engine WRAM names and backup/restore buffers.
src/audio/music3.asm Same as music7: updates music engine WRAM names and backup/restore buffers.
Comments suppressed due to low confidence (1)

src/engine/bank08.asm:393

  • wAIEnergyTransMode is used here as a temporary “current minimum HP” value for comparisons (cp b / update when smaller). Since WRAM d082 has multiple aliases and this usage is not an Energy Trans mode, consider switching these references to a more fitting alias (e.g., wAITempHPRecoverAmount) or adding a generic temp-byte alias for d082 to avoid misleading naming.
	ld a, [wAIEnergyTransMode]
	inc b
	cp b
	jr c, .asm_20ab0
	call Func_20be6

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@papasmurph0
Copy link
Copy Markdown
Author

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Author

@papasmurph0 papasmurph0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've been slaving away for a while.... got many more change to get touched up to present.

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.

3 participants