diff options
Diffstat (limited to 'engine')
-rwxr-xr-x | engine/battle/core.asm | 10 | ||||
-rwxr-xr-x | engine/cable_club.asm | 8 | ||||
-rwxr-xr-x | engine/evos_moves.asm | 2 | ||||
-rwxr-xr-x | engine/hall_of_fame.asm | 2 | ||||
-rwxr-xr-x | engine/in_game_trades.asm | 16 | ||||
-rwxr-xr-x | engine/items/items.asm | 20 | ||||
-rwxr-xr-x | engine/learn_move.asm | 2 | ||||
-rwxr-xr-x | engine/menu/league_pc.asm | 2 | ||||
-rwxr-xr-x | engine/menu/main_menu.asm | 2 | ||||
-rwxr-xr-x | engine/menu/naming_screen.asm | 8 | ||||
-rwxr-xr-x | engine/menu/start_sub_menus.asm | 12 | ||||
-rwxr-xr-x | engine/oak_speech.asm | 4 | ||||
-rwxr-xr-x | engine/oak_speech2.asm | 2 | ||||
-rwxr-xr-x | engine/save.asm | 4 | ||||
-rwxr-xr-x | engine/titlescreen.asm | 4 | ||||
-rwxr-xr-x | engine/trade.asm | 8 |
16 files changed, 53 insertions, 53 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index feadcd82..9dbcf179 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -1728,7 +1728,7 @@ LoadBattleMonFromParty: ; 3cba6 (f:4ba6) ld a, [wPlayerMonNumber] call SkipFixedLengthTextEntries ld de, wBattleMonNick - ld bc, $b + ld bc, NAME_LENGTH call CopyData ld hl, wBattleMonLevel ld de, wPlayerMonUnmodifiedLevel ; block of memory used for unmodified stats @@ -1772,7 +1772,7 @@ LoadEnemyMonFromParty: ; 3cc13 (f:4c13) ld a, [wWhichPokemon] call SkipFixedLengthTextEntries ld de, wEnemyMonNick - ld bc, $b + ld bc, NAME_LENGTH call CopyData ld hl, wEnemyMonLevel ld de, wEnemyMonUnmodifiedLevel ; block of memory used for unmodified stats @@ -2099,7 +2099,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3) ; the following happens for the old man tutorial ld hl, wPlayerName ld de, W_GRASSRATE - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ; temporarily save the player name in unused space, ; which is supposed to get overwritten when entering a ; map with wild Pokémon. Due to an oversight, the data @@ -2107,7 +2107,7 @@ DisplayBattleMenu: ; 3ceb3 (f:4eb3) ; Missingno. glitch can show up. ld hl, .oldManName ld de, wPlayerName - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ; the following simulates the keystrokes by drawing menus on screen coord hl, 9, 14 @@ -6326,7 +6326,7 @@ LoadEnemyMonData: ; 3eb01 (f:6b01) call GetMonName ld hl, wcd6d ld de, wEnemyMonNick - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld a, [wEnemyMonSpecies2] ld [wd11e], a diff --git a/engine/cable_club.asm b/engine/cable_club.asm index 503f3062..0759bd11 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -176,7 +176,7 @@ CableClub_DoBattleOrTradeAgain: ; 5345 jr z, .findStartOfEnemyNameLoop dec hl ld de, wLinkEnemyTrainerName - ld c, 11 + ld c, NAME_LENGTH .copyEnemyNameLoop ld a, [hli] cp SERIAL_NO_DATA_BYTE @@ -698,7 +698,7 @@ TradeCenter_Trade: call GetMonName ld hl, wcd6d ld de, wNameOfPlayerMonToBeTraded - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld a, [wTradingWhichEnemyMon] ld hl, wEnemyPartyMons @@ -756,7 +756,7 @@ TradeCenter_Trade: ld hl, wPartyMonOT call SkipFixedLengthTextEntries ld de, wTradedPlayerMonOT - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wPartyMon1Species ld a, [wTradingWhichPlayerMon] @@ -772,7 +772,7 @@ TradeCenter_Trade: ld hl, wEnemyMonOT call SkipFixedLengthTextEntries ld de, wTradedEnemyMonOT - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wEnemyMons ld a, [wTradingWhichEnemyMon] diff --git a/engine/evos_moves.asm b/engine/evos_moves.asm index e2b1172a..056c125e 100755 --- a/engine/evos_moves.asm +++ b/engine/evos_moves.asm @@ -278,7 +278,7 @@ RenameEvolvedMon: ; 3aef7 (e:6ef7) cp "@" jr nz, .compareNamesLoop ld a, [wWhichPokemon] - ld bc, 11 + ld bc, NAME_LENGTH ld hl, wPartyMonNicks call AddNTimes push hl diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index 293c756f..062950cf 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -276,7 +276,7 @@ HoFRecordMonInfo: ; 70404 (1c:4404) ld e, l ld d, h ld hl, wcd6d - ld bc, $b + ld bc, NAME_LENGTH jp CopyData HoFFadeOutScreenAndMusic: ; 70423 (1c:4423) diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm index b4a73e59..4229afd8 100755 --- a/engine/in_game_trades.asm +++ b/engine/in_game_trades.asm @@ -17,7 +17,7 @@ DoInGameTradeDialogue: ; 71ad9 (1c:5ad9) ld a,[hli] push af ld de,wInGameTradeMonNick - ld bc, 11 + ld bc, NAME_LENGTH call CopyData pop af ld l,a @@ -81,7 +81,7 @@ InGameTrade_GetMonName: ; 71b6a (1c:5b6a) call GetMonName ld hl,wcd6d pop de - ld bc, 11 + ld bc, NAME_LENGTH jp CopyData INCLUDE "data/trades.asm" @@ -168,11 +168,11 @@ InGameTrade_PrepareTradeData: ; 71cc1 (1c:5cc1) ld a, [wInGameTradeReceiveMonSpecies] ld [hl], a ; wTradedEnemyMonSpecies ld hl, wPartyMonOT - ld bc, 11 + ld bc, NAME_LENGTH ld a, [wWhichPokemon] call AddNTimes ld de, wTradedPlayerMonOT - ld bc, 11 + ld bc, NAME_LENGTH call InGameTrade_CopyData ld hl, InGameTrade_TrainerString ld de, wTradedEnemyMonOT @@ -201,16 +201,16 @@ InGameTrade_CopyData: ; 71d11 (1c:5d11) InGameTrade_CopyDataToReceivedMon: ; 71d19 (1c:5d19) ld hl, wPartyMonNicks - ld bc, 11 + ld bc, NAME_LENGTH call InGameTrade_GetReceivedMonPointer ld hl, wInGameTradeMonNick - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wPartyMonOT - ld bc, 11 + ld bc, NAME_LENGTH call InGameTrade_GetReceivedMonPointer ld hl, InGameTrade_TrainerString - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wPartyMon1OTID ld bc, wPartyMon2 - wPartyMon1 diff --git a/engine/items/items.asm b/engine/items/items.asm index fe53082b..4ba3c706 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -142,7 +142,7 @@ ItemUseBall: ; d687 (3:5687) .oldManBattle ld hl,W_GRASSRATE ld de,wPlayerName - ld bc,11 + ld bc,NAME_LENGTH call CopyData ; save the player's name in the Wild Monster data (part of the Cinnabar Island Missingno glitch) jp .BallSuccess .notOldManBattle @@ -2573,14 +2573,14 @@ SendNewMonToBox: ; e7a4 (3:67a4) jr nz, .asm_e7b1 call GetMonHeader ld hl, wBoxMonOT - ld bc, 11 + ld bc, NAME_LENGTH ld a, [W_NUMINBOX] dec a jr z, .asm_e7ee dec a call AddNTimes push hl - ld bc, 11 + ld bc, NAME_LENGTH add hl, bc ld d, h ld e, l @@ -2591,12 +2591,12 @@ SendNewMonToBox: ; e7a4 (3:67a4) .asm_e7db push bc push hl - ld bc, 11 + ld bc, NAME_LENGTH call CopyData pop hl ld d, h ld e, l - ld bc, -$b + ld bc, -NAME_LENGTH add hl, bc pop bc dec b @@ -2604,17 +2604,17 @@ SendNewMonToBox: ; e7a4 (3:67a4) .asm_e7ee ld hl, wPlayerName ld de, wBoxMonOT - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld a, [W_NUMINBOX] dec a jr z, .asm_e82a ld hl, wBoxMonNicks - ld bc, 11 + ld bc, NAME_LENGTH dec a call AddNTimes push hl - ld bc, 11 + ld bc, NAME_LENGTH add hl, bc ld d, h ld e, l @@ -2625,12 +2625,12 @@ SendNewMonToBox: ; e7a4 (3:67a4) .asm_e817 push bc push hl - ld bc, 11 + ld bc, NAME_LENGTH call CopyData pop hl ld d, h ld e, l - ld bc, -$b + ld bc, -NAME_LENGTH add hl, bc pop bc dec b diff --git a/engine/learn_move.asm b/engine/learn_move.asm index 02459b20..aeb7d23d 100755 --- a/engine/learn_move.asm +++ b/engine/learn_move.asm @@ -5,7 +5,7 @@ LearnMove: ; 6e43 (1:6e43) call GetPartyMonName ld hl, wcd6d ld de, wd036 - ld bc, 11 + ld bc, NAME_LENGTH call CopyData DontAbandonLearning: ; 6e5b (1:6e5b) diff --git a/engine/menu/league_pc.asm b/engine/menu/league_pc.asm index 21c3f9e7..e2dce785 100755 --- a/engine/menu/league_pc.asm +++ b/engine/menu/league_pc.asm @@ -90,7 +90,7 @@ LeaguePCShowMon: ; 76610 (1d:6610) ld a, [hli] ld [wHoFMonLevel], a ld de, wcd6d - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld b, $0B ld c, 0 diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm index b8896d79..5e853aae 100755 --- a/engine/menu/main_menu.asm +++ b/engine/menu/main_menu.asm @@ -689,7 +689,7 @@ CheckForPlayerNameInSRAM: ; 609e (1:609e) ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld b, $b + ld b, NAME_LENGTH ld hl, sPlayerName .loop ld a, [hli] diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index e64a4bee..85111cd6 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -46,7 +46,7 @@ AskName: ; 64eb (1:64eb) ld d, h ld e, l ld hl, wcd6d - ld bc, 11 + ld bc, NAME_LENGTH jp CopyData DoYouWantToNicknameText: ; 0x6557 @@ -67,13 +67,13 @@ DisplayNameRaterScreen: ; 655c (1:655c) cp "@" jr z, .playerCancelled ld hl, wPartyMonNicks - ld bc, 11 + ld bc, NAME_LENGTH ld a, [wWhichPokemon] call AddNTimes ld e, l ld d, h ld hl, wBuffer - ld bc, 11 + ld bc, NAME_LENGTH call CopyData and a ret @@ -158,7 +158,7 @@ DisplayNamingScreen: ; 6596 (1:6596) .submitNickname pop de ld hl, wcf4b - ld bc, 11 + ld bc, NAME_LENGTH call CopyData call GBPalWhiteOutWithDelay3 call ClearScreen diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index 110da50d..4dc84d06 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -813,36 +813,36 @@ SwitchPartyMon_InitVarOrSwapData: ; 13653 (4:7653) call SkipFixedLengthTextEntries push hl ld de, wSwitchPartyMonTempBuffer - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wPartyMonOT ld a, [wMenuItemToSwap] call SkipFixedLengthTextEntries pop de push hl - ld bc, 11 + ld bc, NAME_LENGTH call CopyData pop de ld hl, wSwitchPartyMonTempBuffer - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wPartyMonNicks ld a, [wCurrentMenuItem] call SkipFixedLengthTextEntries push hl ld de, wSwitchPartyMonTempBuffer - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wPartyMonNicks ld a, [wMenuItemToSwap] call SkipFixedLengthTextEntries pop de push hl - ld bc, 11 + ld bc, NAME_LENGTH call CopyData pop de ld hl, wSwitchPartyMonTempBuffer - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld a, [wMenuItemToSwap] ld [wSwappedMenuItem], a diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm index 566bd880..0de7ffad 100755 --- a/engine/oak_speech.asm +++ b/engine/oak_speech.asm @@ -24,11 +24,11 @@ SetDefaultNames: ; 60ca (1:60ca) call z, InitOptions ld hl, NintenText ld de, wPlayerName - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, SonyText ld de, W_RIVALNAME - ld bc, 11 + ld bc, NAME_LENGTH jp CopyData OakSpeech: ; 6115 (1:6115) diff --git a/engine/oak_speech2.asm b/engine/oak_speech2.asm index 50e3708c..23f39fd5 100755 --- a/engine/oak_speech2.asm +++ b/engine/oak_speech2.asm @@ -73,7 +73,7 @@ OakSpeechSlidePicLeft: ; 69ec (1:69ec) call DelayFrames pop de ld hl, wcd6d - ld bc, 11 + ld bc, NAME_LENGTH call CopyData call Delay3 coord hl, 12, 4 diff --git a/engine/save.asm b/engine/save.asm index 717b316a..26f9507f 100755 --- a/engine/save.asm +++ b/engine/save.asm @@ -57,7 +57,7 @@ LoadSAV0: ; 73623 (1c:7623) .checkSumsMatched ld hl, sPlayerName ld de, wPlayerName - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, sMainData ld de, wMainDataStart @@ -203,7 +203,7 @@ SaveSAVtoSRAM0: ; 7378c (1c:778c) ld [MBC1SRamBank], a ld hl, wPlayerName ld de, sPlayerName - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wMainDataStart ld de, sMainData diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm index 10c3f2a0..0dbe4a4c 100755 --- a/engine/titlescreen.asm +++ b/engine/titlescreen.asm @@ -1,6 +1,6 @@ -; copy text of fixed length $b (like player name, rival name, mon names, ...) +; copy text of fixed length NAME_LENGTH (like player name, rival name, mon names, ...) CopyFixedLengthText: ; 42b1 (1:42b1) - ld bc, 11 + ld bc, NAME_LENGTH jp CopyData SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7) diff --git a/engine/trade.asm b/engine/trade.asm index 6e825fe5..b7c72520 100755 --- a/engine/trade.asm +++ b/engine/trade.asm @@ -190,7 +190,7 @@ LoadTradingGFXAndMonNames: ; 411a1 (10:51a1) call GetMonName ld hl, wcd6d ld de, wcf4b - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld a, [wTradedEnemyMonSpecies] ld [wd11e], a @@ -204,15 +204,15 @@ Trade_LoadMonPartySpriteGfx: ; 4120b (10:520b) Trade_SwapNames: ; 41217 (10:5217) ld hl, wPlayerName ld de, wBuffer - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wLinkEnemyTrainerName ld de, wPlayerName - ld bc, 11 + ld bc, NAME_LENGTH call CopyData ld hl, wBuffer ld de, wLinkEnemyTrainerName - ld bc, 11 + ld bc, NAME_LENGTH jp CopyData Trade_Cleanup: ; 4123b (10:523b) |