From 0f3c9354a9d095cd99bdfa9c05b60c9de959ea71 Mon Sep 17 00:00:00 2001 From: dannye Date: Tue, 25 Nov 2025 22:54:43 +0000 Subject: [PATCH] Avoid magic numbers for most `CopyData` calls (#542) --- pokeblue.map | 6 +++++- pokeblue.sym | 4 ++++ pokeblue_debug.map | 6 +++++- pokeblue_debug.sym | 4 ++++ pokeblue_vc.map | 6 +++++- pokeblue_vc.sym | 4 ++++ pokered.map | 6 +++++- pokered.sym | 4 ++++ pokered_vc.map | 6 +++++- pokered_vc.sym | 4 ++++ 10 files changed, 45 insertions(+), 5 deletions(-) diff --git a/pokeblue.map b/pokeblue.map index 66a3a716a..13564c602 100644 --- a/pokeblue.map +++ b/pokeblue.map @@ -18905,9 +18905,9 @@ WRAM0 bank #0: $cd3d = wTitleMonSpecies $cd3d = wPlayerSpinWhileMovingUpOrDownAnimDeltaY $cd3d = wTempSCX + $cd3d = wUnusedCreditsByte $cd3d = wMoveDownSmallStarsOAMCount $cd3d = wStoppingWhichSlotMachineWheel - $cd3d = wUnusedCreditsByte $cd3d = wFieldMoves $cd3d = wHoFTeamIndex $cd3d = wCoordIndex @@ -18943,6 +18943,7 @@ WRAM0 bank #0: $cd3f = wPlayerSpinWhileMovingUpOrDownAnimFrameDelay $cd3f = wPlayerSpinInPlaceAnimFrameDelayEndValue $cd3f = wSlotMachineWheel2Offset + $cd3f = wHUDUnusedTopTile $cd3f = wFlyAnimBirdSpriteImageIndex $cd3f = wNameOfPlayerMonToBeTraded $cd3f = wDayCareTotalCost @@ -18954,11 +18955,13 @@ WRAM0 bank #0: $cd40 = wOptionsCancelCursorX $cd40 = wTrainerScreenY $cd40 = wSlotMachineWheel3Offset + $cd40 = wHUDCornerTile $cd40 = wPlayerSpinInPlaceAnimSoundID $cd40 = wHiddenObjectY $cd40 = wHoFMonOrPlayer $cd41 = wSlotMachineWheel1BottomTile $cd41 = wSlotMachineWinningSymbol + $cd41 = wHUDTriangleTile $cd41 = wHoFTeamIndex2 $cd41 = wNumFieldMoves $cd41 = wDayCarePerLevelCost @@ -18967,6 +18970,7 @@ WRAM0 bank #0: $cd41 = wTrainerScreenX $cd41 = wHiddenItemOrCoinsIndex $cd42 = wSlotMachineWheel1MiddleTile + $cd42 = wHUDGraphicsTilesEnd $cd42 = wHoFTeamNo $cd42 = wFieldMovesLeftmostXCoord $cd43 = wLastFieldMoveID diff --git a/pokeblue.sym b/pokeblue.sym index c9fb791c7..0f1e212dc 100644 --- a/pokeblue.sym +++ b/pokeblue.sym @@ -18607,6 +18607,7 @@ 00:cd3f wDayCareTotalCost 00:cd3f wFlyAnimBirdSpriteImageIndex 00:cd3f wHUDGraphicsTiles +00:cd3f wHUDUnusedTopTile 00:cd3f wHiddenObjectIndex 00:cd3f wHoFMonLevel 00:cd3f wJigglypuffFacingDirections @@ -18617,6 +18618,7 @@ 00:cd3f wSlotMachineWheel2Offset 00:cd3f wTrainerFacingDirection 00:cd3f wTrainerInfoTextBoxNextRowOffset +00:cd40 wHUDCornerTile 00:cd40 wHiddenObjectY 00:cd40 wHoFMonOrPlayer 00:cd40 wOptionsCancelCursorX @@ -18624,6 +18626,7 @@ 00:cd40 wSlotMachineWheel3Offset 00:cd40 wTrainerScreenY 00:cd41 wDayCarePerLevelCost +00:cd41 wHUDTriangleTile 00:cd41 wHiddenItemOrCoinsIndex 00:cd41 wHiddenObjectX 00:cd41 wHoFTeamIndex2 @@ -18633,6 +18636,7 @@ 00:cd41 wTradedPlayerMonOT 00:cd41 wTrainerScreenX 00:cd42 wFieldMovesLeftmostXCoord +00:cd42 wHUDGraphicsTilesEnd 00:cd42 wHoFTeamNo 00:cd42 wSlotMachineWheel1MiddleTile 00:cd43 wLastFieldMoveID diff --git a/pokeblue_debug.map b/pokeblue_debug.map index d4a463b46..6c79e865b 100644 --- a/pokeblue_debug.map +++ b/pokeblue_debug.map @@ -18915,9 +18915,9 @@ WRAM0 bank #0: $cd3d = wTitleMonSpecies $cd3d = wPlayerSpinWhileMovingUpOrDownAnimDeltaY $cd3d = wTempSCX + $cd3d = wUnusedCreditsByte $cd3d = wMoveDownSmallStarsOAMCount $cd3d = wStoppingWhichSlotMachineWheel - $cd3d = wUnusedCreditsByte $cd3d = wFieldMoves $cd3d = wHoFTeamIndex $cd3d = wCoordIndex @@ -18953,6 +18953,7 @@ WRAM0 bank #0: $cd3f = wPlayerSpinWhileMovingUpOrDownAnimFrameDelay $cd3f = wPlayerSpinInPlaceAnimFrameDelayEndValue $cd3f = wSlotMachineWheel2Offset + $cd3f = wHUDUnusedTopTile $cd3f = wFlyAnimBirdSpriteImageIndex $cd3f = wNameOfPlayerMonToBeTraded $cd3f = wDayCareTotalCost @@ -18964,11 +18965,13 @@ WRAM0 bank #0: $cd40 = wOptionsCancelCursorX $cd40 = wTrainerScreenY $cd40 = wSlotMachineWheel3Offset + $cd40 = wHUDCornerTile $cd40 = wPlayerSpinInPlaceAnimSoundID $cd40 = wHiddenObjectY $cd40 = wHoFMonOrPlayer $cd41 = wSlotMachineWheel1BottomTile $cd41 = wSlotMachineWinningSymbol + $cd41 = wHUDTriangleTile $cd41 = wHoFTeamIndex2 $cd41 = wNumFieldMoves $cd41 = wDayCarePerLevelCost @@ -18977,6 +18980,7 @@ WRAM0 bank #0: $cd41 = wTrainerScreenX $cd41 = wHiddenItemOrCoinsIndex $cd42 = wSlotMachineWheel1MiddleTile + $cd42 = wHUDGraphicsTilesEnd $cd42 = wHoFTeamNo $cd42 = wFieldMovesLeftmostXCoord $cd43 = wLastFieldMoveID diff --git a/pokeblue_debug.sym b/pokeblue_debug.sym index cbf6548a2..d5ed88812 100644 --- a/pokeblue_debug.sym +++ b/pokeblue_debug.sym @@ -18617,6 +18617,7 @@ 00:cd3f wDayCareTotalCost 00:cd3f wFlyAnimBirdSpriteImageIndex 00:cd3f wHUDGraphicsTiles +00:cd3f wHUDUnusedTopTile 00:cd3f wHiddenObjectIndex 00:cd3f wHoFMonLevel 00:cd3f wJigglypuffFacingDirections @@ -18627,6 +18628,7 @@ 00:cd3f wSlotMachineWheel2Offset 00:cd3f wTrainerFacingDirection 00:cd3f wTrainerInfoTextBoxNextRowOffset +00:cd40 wHUDCornerTile 00:cd40 wHiddenObjectY 00:cd40 wHoFMonOrPlayer 00:cd40 wOptionsCancelCursorX @@ -18634,6 +18636,7 @@ 00:cd40 wSlotMachineWheel3Offset 00:cd40 wTrainerScreenY 00:cd41 wDayCarePerLevelCost +00:cd41 wHUDTriangleTile 00:cd41 wHiddenItemOrCoinsIndex 00:cd41 wHiddenObjectX 00:cd41 wHoFTeamIndex2 @@ -18643,6 +18646,7 @@ 00:cd41 wTradedPlayerMonOT 00:cd41 wTrainerScreenX 00:cd42 wFieldMovesLeftmostXCoord +00:cd42 wHUDGraphicsTilesEnd 00:cd42 wHoFTeamNo 00:cd42 wSlotMachineWheel1MiddleTile 00:cd43 wLastFieldMoveID diff --git a/pokeblue_vc.map b/pokeblue_vc.map index a26e07404..0ab90b76f 100644 --- a/pokeblue_vc.map +++ b/pokeblue_vc.map @@ -18995,6 +18995,7 @@ WRAM0 bank #0: $cd3f = wPlayerSpinWhileMovingUpOrDownAnimFrameDelay $cd3f = wPlayerSpinInPlaceAnimFrameDelayEndValue $cd3f = wSlotMachineWheel2Offset + $cd3f = wHUDUnusedTopTile $cd3f = wFlyAnimBirdSpriteImageIndex $cd3f = wNameOfPlayerMonToBeTraded $cd3f = wDayCareTotalCost @@ -19006,11 +19007,13 @@ WRAM0 bank #0: $cd40 = wOptionsCancelCursorX $cd40 = wTrainerScreenY $cd40 = wSlotMachineWheel3Offset + $cd40 = wHUDCornerTile $cd40 = wPlayerSpinInPlaceAnimSoundID $cd40 = wHiddenObjectY $cd40 = wHoFMonOrPlayer $cd41 = wSlotMachineWheel1BottomTile $cd41 = wSlotMachineWinningSymbol + $cd41 = wHUDTriangleTile $cd41 = wHoFTeamIndex2 $cd41 = wNumFieldMoves $cd41 = wDayCarePerLevelCost @@ -19019,6 +19022,7 @@ WRAM0 bank #0: $cd41 = wTrainerScreenX $cd41 = wHiddenItemOrCoinsIndex $cd42 = wSlotMachineWheel1MiddleTile + $cd42 = wHUDGraphicsTilesEnd $cd42 = wHoFTeamNo $cd42 = wFieldMovesLeftmostXCoord $cd43 = wLastFieldMoveID @@ -20647,8 +20651,8 @@ HRAM bank #0: $ffdc = hOaksAideRewardItem $ffdc = hGymGateAnswer $ffdc = hItemToRemoveIndex - $ffdd = hPlayerXCoord $ffdd = hOaksAideNumMonsOwned + $ffdd = hPlayerXCoord $ffe0 = hBackupGymGateIndex $ffe0 = hUnlockedSilphCoDoors $ffe1 = hStartTileID diff --git a/pokeblue_vc.sym b/pokeblue_vc.sym index d4599068a..38ced6bfe 100644 --- a/pokeblue_vc.sym +++ b/pokeblue_vc.sym @@ -18659,6 +18659,7 @@ 00:cd3f wDayCareTotalCost 00:cd3f wFlyAnimBirdSpriteImageIndex 00:cd3f wHUDGraphicsTiles +00:cd3f wHUDUnusedTopTile 00:cd3f wHiddenObjectIndex 00:cd3f wHoFMonLevel 00:cd3f wJigglypuffFacingDirections @@ -18669,6 +18670,7 @@ 00:cd3f wSlotMachineWheel2Offset 00:cd3f wTrainerFacingDirection 00:cd3f wTrainerInfoTextBoxNextRowOffset +00:cd40 wHUDCornerTile 00:cd40 wHiddenObjectY 00:cd40 wHoFMonOrPlayer 00:cd40 wOptionsCancelCursorX @@ -18676,6 +18678,7 @@ 00:cd40 wSlotMachineWheel3Offset 00:cd40 wTrainerScreenY 00:cd41 wDayCarePerLevelCost +00:cd41 wHUDTriangleTile 00:cd41 wHiddenItemOrCoinsIndex 00:cd41 wHiddenObjectX 00:cd41 wHoFTeamIndex2 @@ -18685,6 +18688,7 @@ 00:cd41 wTradedPlayerMonOT 00:cd41 wTrainerScreenX 00:cd42 wFieldMovesLeftmostXCoord +00:cd42 wHUDGraphicsTilesEnd 00:cd42 wHoFTeamNo 00:cd42 wSlotMachineWheel1MiddleTile 00:cd43 wLastFieldMoveID diff --git a/pokered.map b/pokered.map index cda28d678..10ac62666 100644 --- a/pokered.map +++ b/pokered.map @@ -18905,9 +18905,9 @@ WRAM0 bank #0: $cd3d = wTitleMonSpecies $cd3d = wPlayerSpinWhileMovingUpOrDownAnimDeltaY $cd3d = wTempSCX + $cd3d = wUnusedCreditsByte $cd3d = wMoveDownSmallStarsOAMCount $cd3d = wStoppingWhichSlotMachineWheel - $cd3d = wUnusedCreditsByte $cd3d = wFieldMoves $cd3d = wHoFTeamIndex $cd3d = wCoordIndex @@ -18943,6 +18943,7 @@ WRAM0 bank #0: $cd3f = wPlayerSpinWhileMovingUpOrDownAnimFrameDelay $cd3f = wPlayerSpinInPlaceAnimFrameDelayEndValue $cd3f = wSlotMachineWheel2Offset + $cd3f = wHUDUnusedTopTile $cd3f = wFlyAnimBirdSpriteImageIndex $cd3f = wNameOfPlayerMonToBeTraded $cd3f = wDayCareTotalCost @@ -18954,11 +18955,13 @@ WRAM0 bank #0: $cd40 = wOptionsCancelCursorX $cd40 = wTrainerScreenY $cd40 = wSlotMachineWheel3Offset + $cd40 = wHUDCornerTile $cd40 = wPlayerSpinInPlaceAnimSoundID $cd40 = wHiddenObjectY $cd40 = wHoFMonOrPlayer $cd41 = wSlotMachineWheel1BottomTile $cd41 = wSlotMachineWinningSymbol + $cd41 = wHUDTriangleTile $cd41 = wHoFTeamIndex2 $cd41 = wNumFieldMoves $cd41 = wDayCarePerLevelCost @@ -18967,6 +18970,7 @@ WRAM0 bank #0: $cd41 = wTrainerScreenX $cd41 = wHiddenItemOrCoinsIndex $cd42 = wSlotMachineWheel1MiddleTile + $cd42 = wHUDGraphicsTilesEnd $cd42 = wHoFTeamNo $cd42 = wFieldMovesLeftmostXCoord $cd43 = wLastFieldMoveID diff --git a/pokered.sym b/pokered.sym index 6b0374bfa..8729dbd95 100644 --- a/pokered.sym +++ b/pokered.sym @@ -18607,6 +18607,7 @@ 00:cd3f wDayCareTotalCost 00:cd3f wFlyAnimBirdSpriteImageIndex 00:cd3f wHUDGraphicsTiles +00:cd3f wHUDUnusedTopTile 00:cd3f wHiddenObjectIndex 00:cd3f wHoFMonLevel 00:cd3f wJigglypuffFacingDirections @@ -18617,6 +18618,7 @@ 00:cd3f wSlotMachineWheel2Offset 00:cd3f wTrainerFacingDirection 00:cd3f wTrainerInfoTextBoxNextRowOffset +00:cd40 wHUDCornerTile 00:cd40 wHiddenObjectY 00:cd40 wHoFMonOrPlayer 00:cd40 wOptionsCancelCursorX @@ -18624,6 +18626,7 @@ 00:cd40 wSlotMachineWheel3Offset 00:cd40 wTrainerScreenY 00:cd41 wDayCarePerLevelCost +00:cd41 wHUDTriangleTile 00:cd41 wHiddenItemOrCoinsIndex 00:cd41 wHiddenObjectX 00:cd41 wHoFTeamIndex2 @@ -18633,6 +18636,7 @@ 00:cd41 wTradedPlayerMonOT 00:cd41 wTrainerScreenX 00:cd42 wFieldMovesLeftmostXCoord +00:cd42 wHUDGraphicsTilesEnd 00:cd42 wHoFTeamNo 00:cd42 wSlotMachineWheel1MiddleTile 00:cd43 wLastFieldMoveID diff --git a/pokered_vc.map b/pokered_vc.map index a7d60f3de..6121c1add 100644 --- a/pokered_vc.map +++ b/pokered_vc.map @@ -18998,6 +18998,7 @@ WRAM0 bank #0: $cd3f = wPlayerSpinWhileMovingUpOrDownAnimFrameDelay $cd3f = wPlayerSpinInPlaceAnimFrameDelayEndValue $cd3f = wSlotMachineWheel2Offset + $cd3f = wHUDUnusedTopTile $cd3f = wFlyAnimBirdSpriteImageIndex $cd3f = wNameOfPlayerMonToBeTraded $cd3f = wDayCareTotalCost @@ -19009,11 +19010,13 @@ WRAM0 bank #0: $cd40 = wOptionsCancelCursorX $cd40 = wTrainerScreenY $cd40 = wSlotMachineWheel3Offset + $cd40 = wHUDCornerTile $cd40 = wPlayerSpinInPlaceAnimSoundID $cd40 = wHiddenObjectY $cd40 = wHoFMonOrPlayer $cd41 = wSlotMachineWheel1BottomTile $cd41 = wSlotMachineWinningSymbol + $cd41 = wHUDTriangleTile $cd41 = wHoFTeamIndex2 $cd41 = wNumFieldMoves $cd41 = wDayCarePerLevelCost @@ -19022,6 +19025,7 @@ WRAM0 bank #0: $cd41 = wTrainerScreenX $cd41 = wHiddenItemOrCoinsIndex $cd42 = wSlotMachineWheel1MiddleTile + $cd42 = wHUDGraphicsTilesEnd $cd42 = wHoFTeamNo $cd42 = wFieldMovesLeftmostXCoord $cd43 = wLastFieldMoveID @@ -20650,8 +20654,8 @@ HRAM bank #0: $ffdc = hOaksAideRewardItem $ffdc = hGymGateAnswer $ffdc = hItemToRemoveIndex - $ffdd = hPlayerXCoord $ffdd = hOaksAideNumMonsOwned + $ffdd = hPlayerXCoord $ffe0 = hBackupGymGateIndex $ffe0 = hUnlockedSilphCoDoors $ffe1 = hStartTileID diff --git a/pokered_vc.sym b/pokered_vc.sym index a36e21271..e31149c29 100644 --- a/pokered_vc.sym +++ b/pokered_vc.sym @@ -18662,6 +18662,7 @@ 00:cd3f wDayCareTotalCost 00:cd3f wFlyAnimBirdSpriteImageIndex 00:cd3f wHUDGraphicsTiles +00:cd3f wHUDUnusedTopTile 00:cd3f wHiddenObjectIndex 00:cd3f wHoFMonLevel 00:cd3f wJigglypuffFacingDirections @@ -18672,6 +18673,7 @@ 00:cd3f wSlotMachineWheel2Offset 00:cd3f wTrainerFacingDirection 00:cd3f wTrainerInfoTextBoxNextRowOffset +00:cd40 wHUDCornerTile 00:cd40 wHiddenObjectY 00:cd40 wHoFMonOrPlayer 00:cd40 wOptionsCancelCursorX @@ -18679,6 +18681,7 @@ 00:cd40 wSlotMachineWheel3Offset 00:cd40 wTrainerScreenY 00:cd41 wDayCarePerLevelCost +00:cd41 wHUDTriangleTile 00:cd41 wHiddenItemOrCoinsIndex 00:cd41 wHiddenObjectX 00:cd41 wHoFTeamIndex2 @@ -18688,6 +18691,7 @@ 00:cd41 wTradedPlayerMonOT 00:cd41 wTrainerScreenX 00:cd42 wFieldMovesLeftmostXCoord +00:cd42 wHUDGraphicsTilesEnd 00:cd42 wHoFTeamNo 00:cd42 wSlotMachineWheel1MiddleTile 00:cd43 wLastFieldMoveID