From 269f2c3ba72776e975f5b00d9a1361cadbda42a7 Mon Sep 17 00:00:00 2001 From: dannye Date: Sat, 11 Jun 2016 15:45:24 -0500 Subject: Sync with pokered from August 29, 2015 to April 6, 2016 --- engine/bank3c.asm | 4 +- engine/bank3d.asm | 13 +- engine/battle/common_text.asm | 6 +- engine/battle/core.asm | 62 ++-- engine/battle/init_battle_variables.asm | 2 +- engine/battle/moveEffects/pay_day_effect.asm | 2 +- engine/battle/scale_sprites.asm | 8 +- engine/diploma_3a.asm | 4 +- engine/hall_of_fame.asm | 8 +- engine/hidden_object_functions17.asm | 36 +-- engine/hidden_object_functions7.asm | 9 +- engine/items/items.asm | 420 ++++++++++++++++++--------- engine/menu/link_menu.asm | 2 +- engine/menu/main_menu.asm | 8 +- engine/menu/naming_screen.asm | 2 +- engine/menu/start_sub_menus.asm | 6 +- engine/oak_speech.asm | 6 +- engine/overworld/card_key.asm | 2 +- engine/overworld/cinnabar_lab.asm | 10 +- engine/overworld/movement.asm | 14 +- engine/overworld/special_warps.asm | 2 +- engine/pikachu_pic_animation.asm | 6 +- engine/predefs7.asm | 2 +- engine/town_map.asm | 6 +- 24 files changed, 392 insertions(+), 248 deletions(-) (limited to 'engine') diff --git a/engine/bank3c.asm b/engine/bank3c.asm index 2d9671f9..81b03374 100644 --- a/engine/bank3c.asm +++ b/engine/bank3c.asm @@ -218,11 +218,11 @@ Func_f02da:: ; f02da (3c:42da) jr nz, .asm_f02e5 ret .asm_f02ee - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 6, [hl] ret .asm_f02f4 - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] ret diff --git a/engine/bank3d.asm b/engine/bank3d.asm index f86bcf21..aac3ddce 100644 --- a/engine/bank3d.asm +++ b/engine/bank3d.asm @@ -452,12 +452,15 @@ Text_f5b28:: ; f5b28 (3d:5b28) TX_FAR _CanMoveBouldersText ; 2d:4193 db "@" -CheckForForcedBikeSurf:: ; f5b2d (3d:5b2d) +IsSurfingAllowed: ; cdc0 (3:4dc0) +; Returns whether surfing is allowed in bit 1 of wd728. +; Surfing isn't allowed on the Cycling Road or in the lowest level of the +; Seafoam Islands before the current has been slowed with boulders. ld hl, wd728 set 1, [hl] ld a, [wd732] bit 5, a - jr nz, .asm_f5b59 + jr nz, .forcedToRideBike ld a, [wCurMap] cp SEAFOAM_ISLANDS_5 ret nz @@ -470,7 +473,7 @@ CheckForForcedBikeSurf:: ; f5b2d (3d:5b2d) res 1, [hl] ld hl, CurrentTooFastText jp PrintText -.asm_f5b59 +.forcedToRideBike ld hl, wd728 res 1, [hl] ld hl, CyclingIsFunText @@ -495,7 +498,7 @@ AddItemToInventory_:: ; f5b70 (3d:5b70) push de push hl push hl - ld d, 50 ; PC box can hold 50 items + ld d, PC_ITEM_CAPACITY ; how many items the PC can hold ld a, wNumBagItems & $FF cp l jr nz, .checkIfInventoryFull @@ -503,7 +506,7 @@ AddItemToInventory_:: ; f5b70 (3d:5b70) cp h jr nz, .checkIfInventoryFull ; if the destination is the bag - ld d, 20 ; bag can hold 20 items + ld d, BAG_ITEM_CAPACITY ; how many items the bag can hold .checkIfInventoryFull ld a, [hl] sub d diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm index 0ca9ce96..a0c44346 100644 --- a/engine/battle/common_text.asm +++ b/engine/battle/common_text.asm @@ -9,8 +9,8 @@ PrintBeginningBattleText: ; f4000 (3d:4000) jr c, .pokemonTower .notPokemonTower ld a,[wBattleType] - cp $4 ; new battle type? - jr nz,.notnewbattletype + cp BATTLE_TYPE_PIKACHU + jr nz,.notPikachuBattle callab IsPlayerPikachuAsleepInParty ld e,$24 jr c,.asm_f4026 @@ -18,7 +18,7 @@ PrintBeginningBattleText: ; f4000 (3d:4000) .asm_f4026 callab PlayPikachuSoundClip jr .continue -.notnewbattletype +.notPikachuBattle ld a, [wEnemyMonSpecies2] call PlayCry .continue diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 7a3eab32..665d79f7 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -250,9 +250,9 @@ StartBattle: ; 3c127 (f:4127) call SaveScreenTilesToBuffer1 .checkAnyPartyAlive ld a, [wBattleType] - cp $3 + cp BATTLE_TYPE_RUN jp z, .specialBattle - cp $4 + cp BATTLE_TYPE_PIKACHU jp z, .specialBattle call AnyPartyAlive ld a, d @@ -1625,9 +1625,9 @@ TryRunningFromBattle: ; 3cb1e (f:4b1e) call IsGhostBattle jp z, .canEscape ; jump if it's a ghost battle ld a, [wBattleType] - cp $2 + cp BATTLE_TYPE_SAFARI jp z, .canEscape ; jump if it's a safari battle - cp $3 + cp BATTLE_TYPE_RUN jp z, .canEscape ; hurry, get away? ld a, [wLinkState] cp LINK_STATE_BATTLING @@ -1770,7 +1770,7 @@ LoadBattleMonFromParty: ; 3cc10 (f:4c10) ld bc, NUM_MOVES call CopyData ld de, wBattleMonLevel - ld bc, $b + ld bc, wBattleMonPP - wBattleMonLevel call CopyData ld a, [wBattleMonSpecies2] ld [wd0b5], a @@ -1814,7 +1814,7 @@ LoadEnemyMonFromParty: ; 3cc7d (f:4c7d) ld bc, NUM_MOVES call CopyData ld de, wEnemyMonLevel - ld bc, $b + ld bc, wEnemyMonPP - wEnemyMonLevel call CopyData ld a, [wEnemyMonSpecies] ld [wd0b5], a @@ -1990,11 +1990,11 @@ DrawPlayerHUDAndHPBar: ; 3ce25 (f:4e25) call PlaceString ld hl, wBattleMonSpecies ld de, wLoadedMon - ld bc, $c + ld bc, wBattleMonDVs - wBattleMonSpecies call CopyData ld hl, wBattleMonLevel ld de, wLoadedMonLevel - ld bc, $b + ld bc, wBattleMonPP - wBattleMonLevel call CopyData coord hl, 14, 8 push hl @@ -2171,7 +2171,7 @@ DisplayBattleMenu: ; 3cf78 (f:4f78) call SaveScreenTilesToBuffer1 .nonstandardbattle ld a, [wBattleType] - cp $2 ; safari + cp BATTLE_TYPE_SAFARI ld a, BATTLE_MENU_TEMPLATE jr nz, .menuselected ld a, SAFARI_BATTLE_MENU_TEMPLATE @@ -2179,9 +2179,9 @@ DisplayBattleMenu: ; 3cf78 (f:4f78) ld [wTextBoxID], a call DisplayTextBoxID ld a, [wBattleType] - cp $1 + cp BATTLE_TYPE_OLD_MAN jr z, .doSimulatedMenuInput ; simulate menu input if it's the old man or prof. oak pikachu battle - cp $4 + cp BATTLE_TYPE_PIKACHU jr z, .doSimulatedMenuInput jp .handleBattleMenuInput ; the following happens for the old man tutorial and prof. oak pikachu battle @@ -2234,7 +2234,7 @@ DisplayBattleMenu: ; 3cf78 (f:4f78) jr .rightColumn .leftColumn ; put cursor in left column of menu ld a, [wBattleType] - cp $2 + cp BATTLE_TYPE_SAFARI ld a, " " jr z, .safariLeftColumn ; put cursor in left column for normal battle menu (i.e. when it's not a Safari battle) @@ -2267,7 +2267,7 @@ DisplayBattleMenu: ; 3cf78 (f:4f78) jr .AButtonPressed ; the A button was pressed .rightColumn ; put cursor in right column of menu ld a, [wBattleType] - cp $2 + cp BATTLE_TYPE_SAFARI ld a, " " jr z, .safariRightColumn ; put cursor in right column for normal battle menu (i.e. when it's not a Safari battle) @@ -2304,10 +2304,10 @@ DisplayBattleMenu: ; 3cf78 (f:4f78) .AButtonPressed call PlaceUnfilledArrowMenuCursor ld a, [wBattleType] - cp HURRY_RUN_AWAY_BATTLE + cp BATTLE_TYPE_RUN jr z, .handleUnusedBattle ld a, [wBattleType] - cp SAFARI_BATTLE ; is it a Safari battle? + cp BATTLE_TYPE_SAFARI ld a, [wCurrentMenuItem] ld [wBattleAndStartSavedMenuItem], a jr z, .handleMenuSelection @@ -2329,7 +2329,7 @@ DisplayBattleMenu: ; 3cf78 (f:4f78) jr nz, .upperLeftMenuItemWasNotSelected ; the upper left menu item was selected ld a, [wBattleType] - cp $2 + cp BATTLE_TYPE_SAFARI jr z, .throwSafariBallWasSelected ; the "FIGHT" menu was selected xor a @@ -2368,7 +2368,7 @@ DisplayBattleMenu: ; 3cf78 (f:4f78) .notLinkBattle call SaveScreenTilesToBuffer2 ld a, [wBattleType] - cp $2 ; is it a safari battle? + cp BATTLE_TYPE_SAFARI jr nz, BagWasSelected ; bait was selected @@ -2386,9 +2386,9 @@ BagWasSelected: ; 3d10a (f:510a) call DrawHUDsAndHPBars .next ld a, [wBattleType] - cp OLD_MAN_BATTLE ; is it the old man tutorial? + cp BATTLE_TYPE_OLD_MAN ; is it the old man tutorial? jr z, .simulatedInputBattle - cp STARTER_PIKACHU_BATTLE ; is it the prof oak battle with pikachu? + cp BATTLE_TYPE_PIKACHU ; is it the prof oak battle with pikachu? jr z, .simulatedInputBattle jr DisplayPlayerBag .simulatedInputBattle @@ -2441,7 +2441,7 @@ UseBagItem: ; 3c162 (f:5162) xor a ld [wCurrentMenuItem], a ld a, [wBattleType] - cp SAFARI_BATTLE ; is it a safari battle? + cp BATTLE_TYPE_SAFARI jr z, .checkIfMonCaptured ld a, [wActionResultOrTookBattleTurn] @@ -2463,7 +2463,7 @@ UseBagItem: ; 3c162 (f:5162) jr nz, .returnAfterCapturingMon ld a, [wBattleType] - cp SAFARI_BATTLE ; is it a safari battle? + cp BATTLE_TYPE_SAFARI jr z, .returnAfterUsingItem_NoCapture ; not a safari battle call LoadScreenTilesFromBuffer1 @@ -2494,7 +2494,7 @@ PartyMenuOrRockOrRun: ; 3d1cd (f:51cd) ; party menu or rock was selected call SaveScreenTilesToBuffer2 ld a, [wBattleType] - cp $2 ; is it a safari battle? + cp BATTLE_TYPE_SAFARI jr nz, .partyMenuWasSelected ; safari battle ld a, SAFARI_ROCK @@ -3626,7 +3626,7 @@ CheckPlayerStatusConditions: ; 3d9c6 (f:59c6) ld a,[wPlayerBattleStatus1] add a ; is player confused? jr nc,.TriedToUseDisabledMoveCheck - ld hl,W_PLAYERCONFUSEDCOUNTER + ld hl,wPlayerConfusedCounter dec [hl] jr nz,.IsConfused ld hl,wPlayerBattleStatus1 @@ -3764,7 +3764,7 @@ CheckPlayerStatusConditions: ; 3d9c6 (f:59c6) and a,3 inc a inc a ; confused for 2-5 turns - ld [W_PLAYERCONFUSEDCOUNTER],a + ld [wPlayerConfusedCounter],a pop hl ; skip DecrementPP jp .returnToHL @@ -6126,7 +6126,7 @@ CheckEnemyStatusConditions: ; 3ea15 (f:6a15) ld a, [wEnemyBattleStatus1] add a ; check if enemy mon is confused jp nc, .checkIfTriedToUseDisabledMove - ld hl, W_ENEMYCONFUSEDCOUNTER + ld hl, wEnemyConfusedCounter dec [hl] jr nz, .isConfused ld hl, wEnemyBattleStatus1 @@ -6298,7 +6298,7 @@ CheckEnemyStatusConditions: ; 3ea15 (f:6a15) and $3 inc a inc a ; confused for 2-5 turns - ld [W_ENEMYCONFUSEDCOUNTER], a + ld [wEnemyConfusedCounter], a pop hl ; skip DecrementPP jp .enemyReturnToHL .checkIfUsingMultiturnMove @@ -6576,10 +6576,10 @@ SwapPlayerAndEnemyLevels: ; 3ee07 (f:6e07) LoadPlayerBackPic: ; 3ee18 (f:6e18) ld a, [wBattleType] ld de, OldManPic - cp OLD_MAN_BATTLE ; is it the old man tutorial? + cp BATTLE_TYPE_OLD_MAN ; is it the old man tutorial? jr z, .next ld de, ProfOakPicBack - cp STARTER_PIKACHU_BATTLE ; is it the pikachu battle at the beginning of the game? + cp BATTLE_TYPE_PIKACHU ; is it the pikachu battle at the beginning of the game? jr z, .next ld de, RedPicBack .next @@ -6624,7 +6624,7 @@ LoadPlayerBackPic: ; 3ee18 (f:6e18) ld a, $0 call SwitchSRAMBankAndLatchClockData ld hl, vSprites - ld de, S_SPRITEBUFFER1 + ld de, sSpriteBuffer1 ld a, [H_LOADEDROMBANK] ld b, a ld c, 7 * 7 @@ -8292,11 +8292,11 @@ ConfusionSideEffectSuccess: ; 3f94a (f:794a) ld a, [H_WHOSETURN] and a ld hl, wEnemyBattleStatus1 - ld bc, W_ENEMYCONFUSEDCOUNTER + ld bc, wEnemyConfusedCounter ld a, [wPlayerMoveEffect] jr z, .confuseTarget ld hl, wPlayerBattleStatus1 - ld bc, W_PLAYERCONFUSEDCOUNTER + ld bc, wPlayerConfusedCounter ld a, [wEnemyMoveEffect] .confuseTarget bit Confused, [hl] ; is mon confused? diff --git a/engine/battle/init_battle_variables.asm b/engine/battle/init_battle_variables.asm index 8c43e8f8..74ea3814 100644 --- a/engine/battle/init_battle_variables.asm +++ b/engine/battle/init_battle_variables.asm @@ -32,7 +32,7 @@ InitBattleVariables: ; f6236 (3d:6236) jr c, .notSafariBattle cp SAFARI_ZONE_REST_HOUSE_1 jr nc, .notSafariBattle - ld a, $2 ; safari battle + ld a, BATTLE_TYPE_SAFARI ld [wBattleType], a .notSafariBattle jpab PlayBattleMusic diff --git a/engine/battle/moveEffects/pay_day_effect.asm b/engine/battle/moveEffects/pay_day_effect.asm index 2fa6b53f..0236e3e4 100644 --- a/engine/battle/moveEffects/pay_day_effect.asm +++ b/engine/battle/moveEffects/pay_day_effect.asm @@ -1,4 +1,4 @@ -PayDayEffect_ ; f6511 (3d:6511) +PayDayEffect_: ; f6511 (3d:6511) xor a ld hl, wcd6d ld [hli], a diff --git a/engine/battle/scale_sprites.asm b/engine/battle/scale_sprites.asm index 03495c82..c829fa13 100644 --- a/engine/battle/scale_sprites.asm +++ b/engine/battle/scale_sprites.asm @@ -9,12 +9,12 @@ ScaleSpriteByTwo: ; 2fd79 (b:7d79) ret ScaleSpriteByTwo_: ; 2fd85 (b:7d85) - ld de, S_SPRITEBUFFER1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped - ld hl, S_SPRITEBUFFER0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer + ld de, sSpriteBuffer1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped + ld hl, sSpriteBuffer0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer call ScaleLastSpriteColumnByTwo ; last tile column is special case call ScaleFirstThreeSpriteColumnsByTwo ; scale first 3 tile columns - ld de, S_SPRITEBUFFER2 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped - ld hl, S_SPRITEBUFFER1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer + ld de, sSpriteBuffer2 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped + ld hl, sSpriteBuffer1 + SPRITEBUFFERSIZE - 1 ; end of destination buffer call ScaleLastSpriteColumnByTwo ; last tile column is special case ScaleFirstThreeSpriteColumnsByTwo: ; 2fd9a (b:7d9a) diff --git a/engine/diploma_3a.asm b/engine/diploma_3a.asm index c8a7e740..60769e09 100755 --- a/engine/diploma_3a.asm +++ b/engine/diploma_3a.asm @@ -91,12 +91,12 @@ Func_e9ad3: coord hl, 2, 15 call PlaceString coord hl, 12, 15 - ld de, wPlayTimeHours + 1 + ld de, wPlayTimeHours lb bc, $40 | 1, 3 call PrintNumber ld [hl], $16 inc hl - ld de, wPlayTimeMinutes + 1 + ld de, wPlayTimeMinutes lb bc, $80 | 1, 2 call PrintNumber ld a, [wNumSetBits] diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index 9649da5d..f99cf18f 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -202,8 +202,8 @@ HoFLoadPlayerPics: ; 70390 (1c:433e) call UncompressSpriteFromDE ld a,$0 call SwitchSRAMBankAndLatchClockData - ld hl, S_SPRITEBUFFER1 - ld de, S_SPRITEBUFFER0 + ld hl, sSpriteBuffer1 + ld de, sSpriteBuffer0 ld bc, $310 call CopyData call PrepareRTCDataAndDisableSRAM @@ -239,12 +239,12 @@ HoFDisplayPlayerStats: ; 703d1 (1c:43d1) ld de, HoFPlayTimeText call PlaceString coord hl, 5, 7 - ld de, wPlayTimeHours + 1 + ld de, wPlayTimeHours lb bc, 1, 3 call PrintNumber ld [hl], $6d inc hl - ld de, wPlayTimeMinutes + 1 + ld de, wPlayTimeMinutes lb bc, LEADING_ZEROES | 1, 2 call PrintNumber coord hl, 1, 9 diff --git a/engine/hidden_object_functions17.asm b/engine/hidden_object_functions17.asm index 8e5920d5..7ef1a7c8 100755 --- a/engine/hidden_object_functions17.asm +++ b/engine/hidden_object_functions17.asm @@ -1,4 +1,4 @@ -PrintRedsNESText: ; 5dbae (17:5bae) +PrintRedSNESText: ; 5dbae (17:5bae) call EnableAutoTextBoxDrawing tx_pre_jump RedBedroomSNESText @@ -122,7 +122,7 @@ LinkCableHelp: ; 5dc29 (17:5c29) ld hl, LinkCableHelpText1 call PrintText xor a - ld [wAnimationID], a + ld [wMenuItemOffset], a ld [wCurrentMenuItem], a ld [wLastMenuItem], a ld a, A_BUTTON | B_BUTTON @@ -205,7 +205,7 @@ ViridianSchoolBlackboard: ; 5dced (17:5ced) ld hl, ViridianSchoolBlackboardText1 call PrintText xor a - ld [wAnimationID], a + ld [wMenuItemOffset], a ld [wCurrentMenuItem], a ld [wLastMenuItem], a ld a, D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON @@ -242,8 +242,8 @@ ViridianSchoolBlackboard: ; 5dced (17:5ced) ld [wTopMenuItemY], a ld a, $6 ld [wTopMenuItemX], a - ld a, $3 - ld [wAnimationID], a + ld a, $3 ; in the the right column, use an offset to prevent overlap + ld [wMenuItemOffset], a jr .blackboardLoop .didNotPressRight bit 5, a ; pressed left @@ -256,7 +256,7 @@ ViridianSchoolBlackboard: ; 5dced (17:5ced) ld a, $1 ld [wTopMenuItemX], a xor a - ld [wAnimationID], a + ld [wMenuItemOffset], a jr .blackboardLoop .didNotPressLeftOrRight ld a, [wCurrentMenuItem] @@ -306,7 +306,7 @@ StatusAilmentText2: ; 5ddbb (17:5dbb) ViridianBlackboardStatusPointers: ; 5ddcc (17:5ddc) dw ViridianBlackboardSleepText dw ViridianBlackboardPoisonText - dw ViridianBlackbaordPrlzText + dw ViridianBlackboardPrlzText dw ViridianBlackboardBurnText dw ViridianBlackboardFrozenText @@ -318,8 +318,8 @@ ViridianBlackboardPoisonText: ; 5dddb (17:5ddb) TX_FAR _ViridianBlackboardPoisonText db "@" -ViridianBlackbaordPrlzText: ; 5dde0 (17:5de0) - TX_FAR _ViridianBlackbaordPrlzText +ViridianBlackboardPrlzText: ; 5dde0 (17:5de0) + TX_FAR _ViridianBlackboardPrlzText db "@" ViridianBlackboardBurnText: ; 5dde5 (17:5de5) @@ -366,7 +366,7 @@ GymTrashScript: ; 5ddfc (17:5dfc) ; Next can is trying for the second switch. SetEvent EVENT_1ST_LOCK_OPENED callab Func_f2d0c - tx_pre_id VermilionGymTrashSuccesText1 + tx_pre_id VermilionGymTrashSuccessText1 jr .done .trySecondLock @@ -392,10 +392,10 @@ GymTrashScript: ; 5ddfc (17:5dfc) .openSecondLock ; Completed the trash can puzzle. SetEvent EVENT_2ND_LOCK_OPENED - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 6, [hl] - tx_pre_id VermilionGymTrashSuccesText3 + tx_pre_id VermilionGymTrashSuccessText3 .done jp PrintPredefTextID @@ -425,8 +425,8 @@ GymTrashCans: ; 5de7d (17:5e7d) db 2, 11, 13, -1, -1 ; 14 ; 5dec8 -VermilionGymTrashSuccesText1: ; 5dec8 (17:5ec8) - TX_FAR _VermilionGymTrashSuccesText1 +VermilionGymTrashSuccessText1: ; 5dec8 (17:5ec8) + TX_FAR _VermilionGymTrashSuccessText1 TX_ASM call WaitForSoundToFinish ld a, SFX_SWITCH @@ -435,8 +435,8 @@ VermilionGymTrashSuccesText1: ; 5dec8 (17:5ec8) jp TextScriptEnd ; unused -VermilionGymTrashSuccesText2: ; 5dedb (17:5edb) - TX_FAR _VermilionGymTrashSuccesText2 +VermilionGymTrashSuccessText2: ; 5dedb (17:5edb) + TX_FAR _VermilionGymTrashSuccessText2 db "@" ; unused @@ -448,8 +448,8 @@ VermilionGymTrashSuccesPlaySfx: ; 5dee0 (17:5ee0) call WaitForSoundToFinish jp TextScriptEnd -VermilionGymTrashSuccesText3: ; 5deef (17:5eef) - TX_FAR _VermilionGymTrashSuccesText3 +VermilionGymTrashSuccessText3: ; 5deef (17:5eef) + TX_FAR _VermilionGymTrashSuccessText3 TX_ASM call WaitForSoundToFinish ld a, SFX_GO_INSIDE diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm index 7ccfbf01..648255d9 100755 --- a/engine/hidden_object_functions7.asm +++ b/engine/hidden_object_functions7.asm @@ -22,9 +22,10 @@ DisplayOakLabRightPoster: ; 1e2fe (7:62fe) ld a, [wNumSetBits] cp 2 tx_pre_id SaveOptionText - jr c, .ownOneMon + jr c, .ownLessThanTwo + ; own two or more mon tx_pre_id StrengthsAndWeaknessesText -.ownOneMon +.ownLessThanTwo jp PrintPredefTextID SaveOptionText: ; 1e317 (7:6317) @@ -209,7 +210,7 @@ CinnabarGymQuiz_1ea92: ; 1e43a (7:643a) ld a, [wCurrentMenuItem] cp c jr nz, .wrongAnswer - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] ld a, [hGymGateIndex] ld [$ffe0], a @@ -434,7 +435,7 @@ BillsHousePokemonList: ; 1e5dc (7:65dc) ld hl, BillsHousePokemonListText1 call PrintText xor a - ld [wAnimationID], a + ld [wMenuItemOffset], a ld [wCurrentMenuItem], a ld [wLastMenuItem], a ld a, A_BUTTON | B_BUTTON diff --git a/engine/items/items.asm b/engine/items/items.asm index 31426795..92d53819 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -101,112 +101,157 @@ ItemUsePtrTable: ; d307 (3:5307) dw ItemUsePPRestore ; MAX_ELIXER ItemUseBall: ; d3ad (3:53ad) + +; Balls can't be used out of battle. ld a,[wIsInBattle] and a - jp z,ItemUseNotTime ; not in battle + jp z,ItemUseNotTime + +; Balls can't catch trainers' Pokémon. dec a jp nz,ThrowBallAtTrainerMon + +; If this is for the old man battle, skip checking if the party & box are full. ld a,[wBattleType] - cp $1 - jr z,.UseBall - cp $4 ; pikachu battle? - jr z,.UseBall - ld a,[wPartyCount] ;is Party full? + cp BATTLE_TYPE_OLD_MAN + jr z,.canUseBall + cp BATTLE_TYPE_PIKACHU + jr z,.canUseBall + + ld a,[wPartyCount] ; is party full? cp a,PARTY_LENGTH - jr nz,.UseBall - ld a,[wNumInBox] ;is Box full? + jr nz,.canUseBall + ld a,[wNumInBox] ; is box full? cp a,MONS_PER_BOX jp z,BoxFullCannotThrowBall -.UseBall -;ok, you can use a ball + +.canUseBall xor a ld [wCapturedMonSpecies],a + ld a,[wBattleType] - cp a,2 ;SafariBattle + cp a,BATTLE_TYPE_SAFARI jr nz,.skipSafariZoneCode + .safariZone - ; remove a Safari Ball from inventory ld hl,wNumSafariBalls - dec [hl] + dec [hl] ; remove a Safari Ball + .skipSafariZoneCode call RunDefaultPaletteCommand - ld a,$43 - ld [wd11e],a - call LoadScreenTilesFromBuffer1 ;restore screenBuffer from Backup + + ld a,$43 ; successful capture value + ld [wPokeBallAnimData],a + + call LoadScreenTilesFromBuffer1 ld hl,ItemUseText00 call PrintText + +; If the player is fighting an unidentified ghost, set the value that indicates +; the Pokémon can't be caught and skip the capture calculations. callab IsGhostBattle - ld b,$10 - jp z,.next12 + ld b,$10 ; can't be caught value + jp z,.setAnimData + ld a,[wBattleType] - cp $1 + cp BATTLE_TYPE_OLD_MAN jr z,.oldManBattle - cp $4 + cp BATTLE_TYPE_PIKACHU jr z,.oldManBattle ; pikachu battle technically old man battle jr .notOldManBattle + .oldManBattle ld hl,wGrassRate ld de,wPlayerName ld bc,NAME_LENGTH - call CopyData ; save the player's name in the Wild Monster data + call CopyData ; save the player's name in the Wild Monster data (part of the Cinnabar Island Missingno. glitch) ld a, [wBattleType] - cp $1 - jp nz,.BallSuccess + cp BATTLE_TYPE_OLD_MAN + jp nz,.captured ld a,$1 ld [wCapturedMonSpecies], a ld a, [wd74c] bit 7, a ld b, $63 - jp nz,.next12 - jp .BallSuccess + jp nz,.setAnimData + jp .captured .notOldManBattle +; If the player is fighting the ghost Marowak, set the value that indicates the +; Pokémon can't be caught and skip the capture calculations. ld a,[wCurMap] cp a,POKEMONTOWER_6 jr nz,.loop ld a,[wEnemyMonSpecies2] cp a,MAROWAK - ld b,$10 - jp z,.next12 -; if not fighting ghost Marowak, loop until a random number in the current -; pokeball's allowed range is found + ld b,$10 ; can't be caught value + jp z,.setAnimData + +; Get the first random number. Let it be called Rand1. +; Rand1 must be within a certain range according the kind of ball being thrown. +; The ranges are as follows. +; Poké Ball: [0, 255] +; Great Ball: [0, 200] +; Ultra/Safari Ball: [0, 150] +; Loop until an acceptable number is found. + .loop call Random ld b,a + +; Get the item ID. ld hl,wcf91 .asm_d54a ld a,[hl] + +; The Master Ball always succeeds. cp a,MASTER_BALL - jp z,.BallSuccess + jp z,.captured + +; Anything will do for the basic Poké Ball. cp a,POKE_BALL jr z,.checkForAilments + +; If it's a Great/Ultra/Safari Ball and Rand1 is greater than 200, try again. ld a,200 cp b - jr c,.loop ;get only numbers <= 200 for Great Ball + jr c,.loop + +; Less than or equal to 200 is good enough for a Great Ball. ld a,[hl] cp a,GREAT_BALL jr z,.checkForAilments - ld a,150 ;get only numbers <= 150 for Ultra Ball + +; If it's an Ultra/Safari Ball and Rand1 is greater than 150, try again. + ld a,150 cp b jr c,.loop + .checkForAilments -; pokemon can be caught more easily with any (primary) status ailment -; Frozen/Asleep pokemon are relatively even easier to catch -; for Frozen/Asleep pokemon, any random number from 0-24 ensures a catch. -; for the others, a random number from 0-11 ensures a catch. - ld a,[wEnemyMonStatus] ;status ailments +; Pokémon can be caught more easily with a status ailment. +; Depending on the status ailment, a certain value will be subtracted from +; Rand1. Let this value be called Status. +; The larger Status is, the more easily the Pokémon can be caught. +; no status ailment: Status = 0 +; Burn/Paralysis/Poison: Status = 12 +; Freeze/Sleep: Status = 25 +; If Status is greater than Rand1, the Pokémon will be caught for sure. + ld a,[wEnemyMonStatus] and a - jr z,.noAilments - and a, 1 << FRZ | SLP ;is frozen and/or asleep? + jr z,.skipAilmentValueSubtraction ; no ailments + and a, 1 << FRZ | SLP ld c,12 jr z,.notFrozenOrAsleep ld c,25 .notFrozenOrAsleep ld a,b sub c - jp c,.BallSuccess + jp c,.captured ld b,a -.noAilments - push bc ;save RANDOM number + +.skipAilmentValueSubtraction + push bc ; save (Rand1 - Status) + +; Calculate MaxHP * 255. xor a ld [H_MULTIPLICAND],a ld hl,wEnemyMonMaxHP @@ -216,121 +261,180 @@ ItemUseBall: ; d3ad (3:53ad) ld [H_MULTIPLICAND + 2],a ld a,255 ld [H_MULTIPLIER],a - call Multiply ; MaxHP * 255 + call Multiply + +; Determine BallFactor. It's 8 for Great Balls and 12 for the others. ld a,[wcf91] cp GREAT_BALL - ld a,12 ;any other BallFactor - jr nz,.next7 + ld a,12 + jr nz,.skip1 ld a,8 -.next7 + +.skip1 +; Note that the results of all division operations are floored. + +; Calculate (MaxHP * 255) / BallFactor. ld [H_DIVISOR],a - ld b,4 ; number of bytes in dividend + ld b,4 ; number of bytes in dividend call Divide + +; Divide the enemy's current HP by 4. HP is not supposed to exceed 999 so +; the result should fit in a. If the division results in a quotient of 0, +; change it to 1. ld hl,wEnemyMonHP ld a,[hli] ld b,a ld a,[hl] - -; explanation: we have a 16-bit value equal to [b << 8 | a]. -; This number is divided by 4. The result is 8 bit (reg. a). -; Always bigger than zero. srl b rr a srl b - rr a ; a = current HP / 4 + rr a and a - jr nz,.next8 + jr nz,.skip2 inc a -.next8 + +.skip2 + +; Let W = ((MaxHP * 255) / BallFactor) / max(HP / 4, 1). Calculate W. ld [H_DIVISOR],a ld b,4 - call Divide ; ((MaxHP * 255) / BallFactor) / (CurHP / 4) + call Divide + +; If W > 255, store 255 in [H_QUOTIENT + 3]. +; Let X = min(W, 255) = [H_QUOTIENT + 3]. ld a,[H_QUOTIENT + 2] and a - jr z,.next9 + jr z,.skip3 ld a,255 ld [H_QUOTIENT + 3],a -.next9 - pop bc - ld a,[wEnemyMonCatchRate] ;enemy: Catch Rate + +.skip3 + pop bc ; b = Rand1 - Status + +; If Rand1 - Status > CatchRate, the ball fails to capture the Pokémon. + ld a,[wEnemyMonCatchRate] cp b - jr c,.next10 + jr c,.failedToCapture + +; If W > 255, the ball captures the Pokémon. ld a,[H_QUOTIENT + 2] and a - jr nz,.BallSuccess ; if ((MaxHP * 255) / BallFactor) / (CurHP / 4) > 0x255, automatic success - call Random + jr nz,.captured + + call Random ; Let this random number be called Rand2. + +; If Rand2 > X, the ball fails to capture the Pokémon. ld b,a ld a,[H_QUOTIENT + 3] cp b - jr c,.next10 -.BallSuccess - jr .BallSuccess2 -.next10 + jr c,.failedToCapture + +.captured + jr .skipShakeCalculations + +.failedToCapture ld a,[H_QUOTIENT + 3] - ld [wd11e],a + ld [wPokeBallCaptureCalcTemp],a ; Save X. + +; Calculate CatchRate * 100. xor a ld [H_MULTIPLICAND],a ld [H_MULTIPLICAND + 1],a - ld a,[wEnemyMonCatchRate] ;enemy: Catch Rate + ld a,[wEnemyMonCatchRate] ld [H_MULTIPLICAND + 2],a ld a,100 ld [H_MULTIPLIER],a - call Multiply ; CatchRate * 100 + call Multiply + +; Determine BallFactor2. +; Poké Ball: BallFactor2 = 255 +; Great Ball: BallFactor2 = 200 +; Ultra/Safari Ball: BallFactor2 = 150 ld a,[wcf91] ld b,255 cp POKE_BALL - jr z,.next11 + jr z,.skip4 ld b,200 cp GREAT_BALL - jr z,.next11 + jr z,.skip4 ld b,150 cp ULTRA_BALL - jr z,.next11 -.next11 + jr z,.skip4 + +.skip4 + +; Let Y = (CatchRate * 100) / BallFactor2. Calculate Y. ld a,b ld [H_DIVISOR],a ld b,4 call Divide + +; If Y > 255, there are 3 shakes. +; Note that this shouldn't be possible. +; The maximum value of Y is (255 * 100) / 150 = 170. ld a,[H_QUOTIENT + 2] and a - ld b,$63 - jr nz,.next12 - ld a,[wd11e] + ld b,$63 ; 3 shakes + jr nz,.setAnimData + +; Calculate X * Y. + ld a,[wPokeBallCaptureCalcTemp] ld [H_MULTIPLIER],a call Multiply + +; Calculate (X * Y) / 255. ld a,255 ld [H_DIVISOR],a ld b,4 call Divide - ld a,[wEnemyMonStatus] ;status ailments + +; Determine Status2. +; no status ailment: Status2 = 0 +; Burn/Paralysis/Poison: Status2 = 5 +; Freeze/Sleep: Status2 = 10 + ld a,[wEnemyMonStatus] and a - jr z,.next13 + jr z,.skip5 and 1 << FRZ | SLP ld b,5 - jr z,.next14 + jr z,.addAilmentValue ld b,10 -.next14 + +.addAilmentValue +; If the Pokémon has a status ailment, add Status2. ld a,[H_QUOTIENT + 3] add b ld [H_QUOTIENT + 3],a -.next13 + +.skip5 +; Finally determine the number of shakes. +; Let Z = ((X * Y) / 255) + Status2 = [H_QUOTIENT + 3]. +; The number of shakes depend on the range Z is in. +; 0 ≤ Z < 10: 0 shakes (the ball misses) +; 10 ≤ Z < 30: 1 shake +; 30 ≤ Z < 70: 2 shakes +; 70 ≤ Z: 3 shakes ld a,[H_QUOTIENT + 3] cp a,10 ld b,$20 - jr c,.next12 + jr c,.setAnimData cp a,30 ld b,$61 - jr c,.next12 + jr c,.setAnimData cp a,70 ld b,$62 - jr c,.next12 + jr c,.setAnimData ld b,$63 -.next12 + +.setAnimData ld a,b ld [wPokeBallAnimData],a -.BallSuccess2 + +.skipShakeCalculations ld c,20 call DelayFrames + +; Do the animation. ld a,TOSS_ANIM ld [wAnimationID],a xor a @@ -346,45 +450,61 @@ ItemUseBall: ; d3ad (3:53ad) ld [wcf91],a pop af ld [wWhichPokemon],a + +; Determine the message to display from the animation. ld a,[wPokeBallAnimData] cp a,$10 ld hl,ItemUseBallText00 - jp z,.printText0 + jp z,.printMessage cp a,$20 ld hl,ItemUseBallText01 - jp z,.printText0 + jp z,.printMessage cp a,$61 ld hl,ItemUseBallText02 - jp z,.printText0 + jp z,.printMessage cp a,$62 ld hl,ItemUseBallText03 - jp z,.printText0 + jp z,.printMessage cp a,$63 ld hl,ItemUseBallText04 - jp z,.printText0 - ld hl,wEnemyMonHP ;current HP + jp z,.printMessage + +; Save current HP. + ld hl,wEnemyMonHP ld a,[hli] push af ld a,[hli] - push af ;backup currentHP... + push af + +; Save status ailment. inc hl ld a,[hl] - push af ;...and status ailments + push af + push hl + +; If the Pokémon is transformed, the Pokémon is assumed to be a Ditto. +; This is a bug because a wild Pokémon could have used Transform via +; Mirror Move even though the only wild Pokémon that knows Transform is Ditto. ld hl,wEnemyBattleStatus3 bit Transformed,[hl] - jr z,.next15 - ld a,$4c + jr z,.notTransformed + ld a,DITTO ld [wEnemyMonSpecies2],a - jr .next16 -.next15 + jr .skip6 + +.notTransformed +; If the Pokémon is not transformed, set the transformed bit and copy the +; DVs to wTransformedEnemyMonOriginalDVs so that LoadEnemyMonData won't generate +; new DVs. set Transformed,[hl] ld hl,wTransformedEnemyMonOriginalDVs ld a,[wEnemyMonDVs] ld [hli],a ld a,[wEnemyMonDVs + 1] ld [hl],a -.next16 + +.skip6 ld a,[wcf91] push af ld a,[wEnemyMonSpecies2] @@ -402,17 +522,19 @@ ItemUseBall: ; d3ad (3:53ad) ld [hld],a pop af ld [hl],a - ld a,[wEnemyMonSpecies] ;enemy + ld a,[wEnemyMonSpecies] ld [wCapturedMonSpecies],a ld [wcf91],a ld [wd11e],a ld a,[wBattleType] - cp $1 - jp z,.printText1 ; just barely out of reach for a relative jump - cp $4 - jr z,.printText1 + cp BATTLE_TYPE_OLD_MAN ; is this the old man battle? + jp z,.oldManCaughtMon ; if so, don't give the player the caught Pokémon + cp BATTLE_TYPE_PIKACHU + jr z,.oldManCaughtMon ; same with Pikachu battle ld hl,ItemUseBallText05 call PrintText + +; Add the caught Pokémon to the Pokédex. predef IndexToPokedex ld a,[wd11e] dec a @@ -428,53 +550,63 @@ ItemUseBall: ; d3ad (3:53ad) ld b,FLAG_SET predef FlagActionPredef pop af - and a - jr nz,.checkParty + + and a ; was the Pokémon already in the Pokédex? + jr nz,.skipShowingPokedexData ; if so, don't show the Pokédex data + ld hl,ItemUseBallText06 call PrintText call ClearSprites - ld a,[wEnemyMonSpecies] ;caught mon_ID + ld a,[wEnemyMonSpecies] ld [wd11e],a predef ShowPokedexData -.checkParty + +.skipShowingPokedexData ld a, $1 ld [wd49c], a ld a, $85 ld [wPikachuMood], a ld a,[wPartyCount] - cp PARTY_LENGTH ;is party full? + cp PARTY_LENGTH ; is party full? jr z,.sendToBox xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation],a call ClearSprites ld hl, .emptyString call PrintText - call AddPartyMon ;add mon to Party - jr .End + call AddPartyMon + jr .done + .sendToBox call ClearSprites call SendNewMonToBox ld hl,ItemUseBallText07 ld a, [wd7f1] bit 0, a - jr nz,.sendToBox2 + jr nz,.printTransferredToPCText ld hl,ItemUseBallText08 -.sendToBox2 +.printTransferredToPCText call PrintText - jr .End -.printText1 + jr .done + +.oldManCaughtMon ld hl,ItemUseBallText05 -.printText0 + +.printMessage call PrintText call ClearSprites -.End + +.done ld a,[wBattleType] - and a - ret nz + and a ; is this the old man battle? + ret nz ; if so, don't remove a ball from the bag + +; Remove a ball from the bag. ld hl,wNumBagItems inc a ld [wItemQuantity],a jp RemoveItemFromInventory + .emptyString db "@" @@ -826,7 +958,7 @@ ItemUseMedicine: ; d8ae (3:58ae) jr nc,.healHP ; if it's a Full Restore or one of the potions ; fall through if it's one of the status-specifc healing items .cureStatusAilment - ld bc,4 + ld bc,wPartyMon1Status - wPartyMon1 add hl,bc ; hl now points to status ld a,[wcf91] lb bc, ANTIDOTE_MSG, 1 << PSN @@ -864,10 +996,10 @@ ItemUseMedicine: ; d8ae (3:58ae) ld hl,wPlayerBattleStatus3 res BadlyPoisoned,[hl] ; heal Toxic status pop hl - ld bc,30 + ld bc,wPartyMon1Stats - wPartyMon1Status add hl,bc ; hl now points to party stats - ld de,wBattleMonMaxHP - ld bc,10 + ld de,wBattleMonStats + ld bc,NUM_STATS * 2 call CopyData ; copy party stats to in-battle stat data predef DoubleOrHalveSelectedStats jp .doneHealing @@ -936,7 +1068,7 @@ ItemUseMedicine: ; d8ae (3:58ae) .compareCurrentHPToMaxHP push hl push bc - ld bc,32 + ld bc,wPartyMon1MaxHP - (wPartyMon1HP + 1) add hl,bc ; hl now points to max HP pop bc ld a,[hli] @@ -968,7 +1100,7 @@ ItemUseMedicine: ; d8ae (3:58ae) ld [wChannelSoundIDs + CH4],a push hl push de - ld bc,32 + ld bc,wPartyMon1MaxHP - (wPartyMon1HP + 1) add hl,bc ; hl now points to max HP ld a,[hli] ld [wHPBarMaxHP+1],a @@ -1001,7 +1133,7 @@ ItemUseMedicine: ; d8ae (3:58ae) ld [H_DIVISOR],a ld b,2 ; number of bytes call Divide ; get 1/5 of max HP of pokemon that used Softboiled - ld bc,wPartyMon1HP - wPartyMon1MaxHP + ld bc,(wPartyMon1HP + 1) - (wPartyMon1MaxHP + 1) add hl,bc ; hl now points to LSB of current HP of pokemon that used Softboiled ; subtract 1/5 of max HP from current HP of pokemon that used Softboiled ld a,[H_QUOTIENT + 3] @@ -1080,7 +1212,7 @@ ItemUseMedicine: ; d8ae (3:58ae) inc hl ld d,h ld e,l ; de now points to current HP - ld hl,33 + ld hl,(wPartyMon1MaxHP + 1) - (wPartyMon1HP + 1) add hl,de ; hl now points to max HP ld a,[wcf91] cp a,REVIVE @@ -1127,7 +1259,7 @@ ItemUseMedicine: ; d8ae (3:58ae) ld a,[wcf91] cp a,FULL_RESTORE jr nz,.updateInBattleData - ld bc,-31 + ld bc,wPartyMon1Status - (wPartyMon1MaxHP + 1) add hl,bc xor a ld [hl],a ; remove the status ailment in the party data @@ -1150,7 +1282,7 @@ ItemUseMedicine: ; d8ae (3:58ae) ld [wBattleMonStatus],a ; remove the status ailment in the in-battle pokemon data .calculateHPBarCoords ld hl,wOAMBuffer + $90 - ld bc,2 * 20 + ld bc,2 * SCREEN_WIDTH inc d .calculateHPBarCoordsLoop add hl,bc @@ -1230,7 +1362,7 @@ ItemUseMedicine: ; d8ae (3:58ae) ld a,[hl] ld [wd0b5],a ld [wd11e],a - ld bc,33 + ld bc,wPartyMon1Level - wPartyMon1 add hl,bc ; hl now points to level ld a,[hl] ; a = level ld [wCurEnemyLVL],a ; store level @@ -1247,7 +1379,7 @@ ItemUseMedicine: ; d8ae (3:58ae) push hl sub a,HP_UP add a - ld bc,17 + ld bc,wPartyMon1HPExp - wPartyMon1 add hl,bc add l ld l,a @@ -1295,17 +1427,17 @@ ItemUseMedicine: ; d8ae (3:58ae) call PrintText jp GBPalWhiteOut .recalculateStats - ld bc,34 + ld bc,wPartyMon1Stats - wPartyMon1 add hl,bc ld d,h ld e,l ; de now points to stats - ld bc,-18 - add hl,bc ; hl now points to byte 3 of experience + ld bc,(wPartyMon1Exp + 2) - wPartyMon1Stats + add hl,bc ; hl now points to LSB of experience ld b,1 jp CalcStats ; recalculate stats .useRareCandy push hl - ld bc,33 + ld bc,wPartyMon1Level - wPartyMon1 add hl,bc ; hl now points to level ld a,[hl] ; a = level cp a, MAX_LEVEL @@ -1319,8 +1451,8 @@ ItemUseMedicine: ; d8ae (3:58ae) callab CalcExperience ; calculate experience for next level and store it at $ff96 pop de pop hl - ld bc,-19 - add hl,bc ; hl now points to experience + ld bc,wPartyMon1Exp - wPartyMon1Level + add hl,bc ; hl now points to MSB of experience ; update experience to minimum for new level ld a,[hExperience] ld [hli],a @@ -1335,7 +1467,7 @@ ItemUseMedicine: ; d8ae (3:58ae) push af push de push hl - ld bc,34 + ld bc,wPartyMon1MaxHP - wPartyMon1 add hl,bc ; hl now points to MSB of max HP ld a,[hli] ld b,a @@ -1345,8 +1477,8 @@ ItemUseMedicine: ; d8ae (3:58ae) push hl call .recalculateStats pop hl - ld bc,35 ; hl now points to LSB of max HP - add hl,bc + ld bc,(wPartyMon1MaxHP + 1) - wPartyMon1 + add hl,bc ; hl now points to LSB of max HP pop bc ld a,[hld] sub c @@ -1355,8 +1487,8 @@ ItemUseMedicine: ; d8ae (3:58ae) sbc b ld b,a ; bc = the amount of max HP gained from leveling up ; add the amount gained to the current HP - ld de,-32 - add hl,de ; hl now points to MSB of current HP + ld de,(wPartyMon1HP + 1) - wPartyMon1MaxHP + add hl,de ; hl now points to LSB of current HP ld a,[hl] add c ld [hld],a @@ -1547,7 +1679,7 @@ ItemUseCardKey: ; de57 (3:de57) xor a ld [wUnusedD71F],a call GetTileAndCoordsInFrontOfPlayer - ld a,[GetTileAndCoordsInFrontOfPlayer] ; $4586 + ld a,[GetTileAndCoordsInFrontOfPlayer] cp a,$18 jr nz,.next0 ld hl,CardKeyTable1 @@ -2116,7 +2248,7 @@ ItemUsePPRestore: ; e1f7 (3:61f7) cp a,ETHER jr nc,.useEther ; if Ether or Max Ether .usePPUp - ld bc,21 + ld bc,wPartyMon1PP - wPartyMon1Moves add hl,bc ld a,[hl] ; move PP cp a,3 << 6 ; have 3 PP Ups already been used? diff --git a/engine/menu/link_menu.asm b/engine/menu/link_menu.asm index becefd47..4d0beb7e 100644 --- a/engine/menu/link_menu.asm +++ b/engine/menu/link_menu.asm @@ -776,7 +776,7 @@ LinkMenu: ; f580c (3d:580c) call DelayFrames ld hl, wd732 res 1, [hl] - ld a, [wAnimationID] + ld a, [wDefaultMap] ld [wDestinationMap], a callab SpecialWarpIn ld c, 20 diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm index 94504ffb..f7c92326 100755 --- a/engine/menu/main_menu.asm +++ b/engine/menu/main_menu.asm @@ -20,7 +20,7 @@ MainMenu: ; 5ba6 (1:5ba6) ld [hli],a ld [hli],a ld [hl],a - ld [wAnimationID],a + ld [wDefaultMap],a ld hl,wd72e res 6,[hl] call ClearScreen @@ -88,7 +88,7 @@ MainMenu: ; 5ba6 (1:5ba6) jp .mainMenuLoop .choseContinue call DisplayContinueGameInfo - ld hl,wd126 + ld hl,wCurrentMapScriptFlags set 5,[hl] .inputLoop xor a @@ -247,12 +247,12 @@ PrintNumOwnedMons: ; 5daa (1:5daa) jp PrintNumber PrintPlayTime: ; 5dbd (1:5dbd) - ld de, wPlayTimeHours + 1 + ld de, wPlayTimeHours lb bc, 1, 3 call PrintNumber ld [hl], $6d inc hl - ld de, wPlayTimeMinutes + 1 + ld de, wPlayTimeMinutes lb bc, LEADING_ZEROES | 1, 2 jp PrintNumber diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index de0c696c..0eacc8f6 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -164,7 +164,7 @@ DisplayNamingScreen: ; 6307 (1:6307) call RunDefaultPaletteCommand call GBPalNormal xor a - ld [wSubAnimTransform], a + ld [wAnimCounter], a ld hl, wd730 res 6, [hl] ld a, [wIsInBattle] diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index e2491253..792903b7 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -163,7 +163,7 @@ StartMenu_Pokemon: ; 11c36 (4:5c36) .surf ; 11d66 (4:5d66) bit 4,a ; does the player have the Soul Badge? jp z,.newBadgeRequired - callba CheckForForcedBikeSurf + callba IsSurfingAllowed ld hl,wd728 bit 1,[hl] res 1,[hl] @@ -618,12 +618,12 @@ DrawTrainerInfo: ; 1204c (4:604c) ld c,$e3 call PrintBCDNumber coord hl, 9, 6 - ld de,wPlayTimeHours + 1 ; hours + ld de,wPlayTimeHours ; hours lb bc, LEFT_ALIGN | 1, 3 call PrintNumber ld [hl],$d6 ; colon tile ID inc hl - ld de,wPlayTimeMinutes + 1 ; minutes + ld de,wPlayTimeMinutes ; minutes lb bc, LEADING_ZEROES | 1, 2 jp PrintNumber diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm index eeeb32c8..f07c7bb2 100755 --- a/engine/oak_speech.asm +++ b/engine/oak_speech.asm @@ -56,7 +56,7 @@ OakSpeech: ; 5e85 (1:5e85) ld a,1 ld [wItemQuantity],a call AddItemToInventory ; give one potion - ld a,[wAnimationID] + ld a,[wDefaultMap] ld [wDestinationMap],a call SpecialWarpIn xor a @@ -225,8 +225,8 @@ IntroDisplayPicCenteredOrUpperRight: ; 6010 (1:6010) call UncompressSpriteFromDE ld a, $0 call SwitchSRAMBankAndLatchClockData - ld hl,S_SPRITEBUFFER1 - ld de,S_SPRITEBUFFER0 + ld hl,sSpriteBuffer1 + ld de,sSpriteBuffer0 ld bc,$310 call CopyData call PrepareRTCDataAndDisableSRAM diff --git a/engine/overworld/card_key.asm b/engine/overworld/card_key.asm index 48b2380d..d2e710ae 100755 --- a/engine/overworld/card_key.asm +++ b/engine/overworld/card_key.asm @@ -50,7 +50,7 @@ PrintCardKeyText: ; 525d8 (14:65d8) .replaceCardKeyDoorTileBlock ld [wNewTileBlockID], a predef ReplaceTileBlock - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 5, [hl] ld a, SFX_GO_INSIDE jp PlaySound diff --git a/engine/overworld/cinnabar_lab.asm b/engine/overworld/cinnabar_lab.asm index f81324e0..f7c5e326 100755 --- a/engine/overworld/cinnabar_lab.asm +++ b/engine/overworld/cinnabar_lab.asm @@ -48,9 +48,9 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006) .choseDomeFossil ld b, KABUTO .fossilSelected - ld [W_FOSSILITEM], a + ld [wFossilItem], a ld a, b - ld [W_FOSSILMON], a + ld [wFossilMon], a call LoadFossilItemAndMonName ld hl, LabFossil_610ae call PrintText @@ -60,7 +60,7 @@ GiveFossilToCinnabarLab: ; 61006 (18:5006) jr nz, .cancelledGivingFossil ld hl, LabFossil_610b3 call PrintText - ld a, [W_FOSSILITEM] + ld a, [wFossilItem] ld [hItemToRemoveID], a callba RemoveItemByID ld hl, LabFossil_610b8 @@ -113,11 +113,11 @@ PrintFossilsInBag: ; 610c2 (18:50c2) ; loads the names of the fossil item and the resulting mon LoadFossilItemAndMonName: ; 610eb (18:50eb) - ld a, [W_FOSSILMON] + ld a, [wFossilMon] ld [wd11e], a call GetMonName call CopyStringToCF4B - ld a, [W_FOSSILITEM] + ld a, [wFossilItem] ld [wd11e], a call GetItemName ret diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index 9ca03ff4..418d7928 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -118,8 +118,8 @@ UpdateNPCSprite: ; 4e3e (1:4e3e) ld l, a inc l ld a, [hl] ; c1x1 - bit 7, a - jp nz, InitializeSpriteFacingDirection ; c1x1 >= $80 + bit 7, a ; is the face player flag set? + jp nz, MakeNPCFacePlayer ld b, a ld a, [wFontLoaded] bit 0, a @@ -156,7 +156,7 @@ UpdateNPCSprite: ; 4e3e (1:4e3e) call LoadDEPlusA ; a = [wNPCMovementDirections + movement byte 1] cp $e0 jp z, ChangeFacingDirection - cp $ff + cp STAY jr nz, .next ; reached end of wNPCMovementDirections list ld [hl], a ; store $ff in movement byte 1, disabling scripted movement @@ -167,7 +167,7 @@ UpdateNPCSprite: ; 4e3e (1:4e3e) ld [wWastedByteCD3A], a ret .next - cp $fe + cp WALK jr nz, .asm_4ecb ; current NPC movement data is $fe. this seems buggy ld [hl], $1 ; set movement byte 1 to $1 @@ -359,7 +359,11 @@ notYetMoving: ; 4fc5 (1:4fc5) ld [hl], $0 ; c1x8 = 0 (walk animation frame) jp UpdateSpriteImage -InitializeSpriteFacingDirection: ; 4fd1 (1:4fd1) +MakeNPCFacePlayer: ; 507f (1:507f) +; Make an NPC face the player if the player has spoken to him or her. + +; Check if the behaviour of the NPC facing the player when spoken to is +; disabled. This is only done when rubbing the S.S. Anne captain's back. ld a, [wd72d] bit 5, a jr nz, notYetMoving diff --git a/engine/overworld/special_warps.asm b/engine/overworld/special_warps.asm index 29000d98..8c1b4159 100644 --- a/engine/overworld/special_warps.asm +++ b/engine/overworld/special_warps.asm @@ -69,7 +69,7 @@ LoadSpecialWarpData: ; 6073 (1:6073) xor a jr .done .notFirstMap - ld a, [wLastMap] + ld a, [wLastMap] ; this value is overwritten before it's ever read ld hl, wd732 bit 4, [hl] ; used dungeon warp (jumped down hole/waterfall)? jr nz, .usedDunegonWarp diff --git a/engine/pikachu_pic_animation.asm b/engine/pikachu_pic_animation.asm index 6d588fdb..390bf39b 100755 --- a/engine/pikachu_pic_animation.asm +++ b/engine/pikachu_pic_animation.asm @@ -2816,10 +2816,10 @@ DecompressRequestPikaPicAnimGFX: ; fe128 jr c, .failed ld a, b call UncompressSpriteFromDE - ld a, BANK(S_SPRITEBUFFER1) + ld a, BANK(sSpriteBuffer1) call SwitchSRAMBankAndLatchClockData - ld hl, S_SPRITEBUFFER1 - ld de, S_SPRITEBUFFER0 + ld hl, sSpriteBuffer1 + ld de, sSpriteBuffer0 ld bc, SPRITEBUFFERSIZE * 2 call CopyData call PrepareRTCDataAndDisableSRAM diff --git a/engine/predefs7.asm b/engine/predefs7.asm index 9138897f..1bf4c018 100755 --- a/engine/predefs7.asm +++ b/engine/predefs7.asm @@ -25,7 +25,7 @@ DisplayElevatorFloorMenu: ; 1c264 (7:4264) ld a, b ld [wListScrollOffset], a ret c - ld hl, wd126 + ld hl, wCurrentMapScriptFlags set 7, [hl] ld hl, wElevatorWarpMaps ld a, [wWhichPokemon] diff --git a/engine/town_map.asm b/engine/town_map.asm index 82e24d75..47812db0 100755 --- a/engine/town_map.asm +++ b/engine/town_map.asm @@ -454,8 +454,12 @@ WritePlayerOrBirdSpriteOAM: ; 712f6 (1c:52f6) WriteTownMapSpriteOAM: ; 71302 (1c:5302) push hl + +; Subtract 4 from c (X coord) and 4 from b (Y coord). However, the carry from c +; is added to b, so the net result is that only 3 is subtracted from b. lb hl, -4, -4 - add hl, bc ; subtract 4 from c (X coord) and 4 from b (Y coord) + add hl, bc + ld b, h ld c, l pop hl -- cgit v1.3.1-sl0p From 401d6e7f36e86aa246a2c0591195e1f0f01e879f Mon Sep 17 00:00:00 2001 From: dannye Date: Sat, 11 Jun 2016 17:10:37 -0500 Subject: More syncing with pokered from April 8, 2016 to present --- data/baseStats/ninetails.asm | 28 -------------- data/baseStats/ninetales.asm | 28 ++++++++++++++ data/base_stats.asm | 2 +- data/mart_inventories.asm | 75 +++++++++++++++--------------------- engine/oak_speech2.asm | 11 +++++- macros.asm | 13 +++++-- scripts/blueshouse.asm | 2 +- scripts/celadonmart2.asm | 4 +- scripts/celadonmart4.asm | 2 +- scripts/celadonmart5.asm | 4 +- scripts/celadonmartelevator.asm | 18 ++++----- scripts/celadonpokecenter.asm | 8 ++-- scripts/ceruleanmart.asm | 2 +- scripts/ceruleanpokecenter.asm | 8 ++-- scripts/cinnabarmart.asm | 2 +- scripts/cinnabarpokecenter.asm | 10 ++--- scripts/fuchsiamart.asm | 2 +- scripts/fuchsiapokecenter.asm | 12 +++--- scripts/indigoplateaulobby.asm | 12 +++--- scripts/lavendermart.asm | 22 +++++------ scripts/lavenderpokecenter.asm | 10 ++--- scripts/mtmoonpokecenter.asm | 14 +++---- scripts/mtmoonpokecenter2.asm | 26 ++++++------- scripts/pewtermart.asm | 14 +++---- scripts/pewterpokecenter.asm | 16 ++++---- scripts/pewterpokecenter2.asm | 10 ++--- scripts/rocktunnelpokecenter.asm | 10 ++--- scripts/saffronmart.asm | 2 +- scripts/saffronpokecenter.asm | 10 ++--- scripts/vermiliongym.asm | 2 +- scripts/vermilionmart.asm | 2 +- scripts/vermilionpokecenter.asm | 10 ++--- scripts/viridianmart.asm | 4 +- scripts/viridianpokecenter.asm | 10 ++--- text.asm | 1 + text/maps/cinnabar_pokecenter.asm | 1 - text/maps/indigo_plateau_lobby.asm | 2 +- text/maps/lavender_mart.asm | 4 +- text/maps/lavender_pokecenter.asm | 2 - text/maps/mt_moon_pokecenter.asm | 8 ++-- text/maps/pewter_mart.asm | 4 +- text/maps/pewter_pokecenter.asm | 6 +-- text/maps/rock_tunnel_pokecenter.asm | 2 +- text/maps/saffron_pokecenter.asm | 2 +- text/maps/vermilion_pokecenter.asm | 1 - text/maps/viridian_mart.asm | 18 --------- text/maps/viridian_pokecenter.asm | 16 ++++++++ text/move_names.asm | 1 - text/oakspeech.asm | 1 - text/pokedex.asm | 1 - 50 files changed, 234 insertions(+), 241 deletions(-) delete mode 100644 data/baseStats/ninetails.asm create mode 100644 data/baseStats/ninetales.asm create mode 100755 text/maps/viridian_pokecenter.asm (limited to 'engine') diff --git a/data/baseStats/ninetails.asm b/data/baseStats/ninetails.asm deleted file mode 100644 index 212f6322..00000000 --- a/data/baseStats/ninetails.asm +++ /dev/null @@ -1,28 +0,0 @@ -db DEX_NINETALES ; pokedex id -db 73 ; base hp -db 76 ; base attack -db 75 ; base defense -db 100 ; base speed -db 100 ; base special -db FIRE ; species type 1 -db FIRE ; species type 2 -db 75 ; catch rate -db 178 ; base exp yield -INCBIN "pic/ymon/ninetales.pic",0,1 ; 77, sprite dimensions -dw NinetalesPicFront -dw NinetalesPicBack -; attacks known at lvl 0 -db EMBER -db TAIL_WHIP -db QUICK_ATTACK -db ROAR -db 0 ; growth rate -; learnset - tmlearn 6,8 - tmlearn 9,10,15 - tmlearn 20 - tmlearn 28,31,32 - tmlearn 33,34,38,39,40 - tmlearn 44 - tmlearn 50 -db 0 ; padding diff --git a/data/baseStats/ninetales.asm b/data/baseStats/ninetales.asm new file mode 100644 index 00000000..212f6322 --- /dev/null +++ b/data/baseStats/ninetales.asm @@ -0,0 +1,28 @@ +db DEX_NINETALES ; pokedex id +db 73 ; base hp +db 76 ; base attack +db 75 ; base defense +db 100 ; base speed +db 100 ; base special +db FIRE ; species type 1 +db FIRE ; species type 2 +db 75 ; catch rate +db 178 ; base exp yield +INCBIN "pic/ymon/ninetales.pic",0,1 ; 77, sprite dimensions +dw NinetalesPicFront +dw NinetalesPicBack +; attacks known at lvl 0 +db EMBER +db TAIL_WHIP +db QUICK_ATTACK +db ROAR +db 0 ; growth rate +; learnset + tmlearn 6,8 + tmlearn 9,10,15 + tmlearn 20 + tmlearn 28,31,32 + tmlearn 33,34,38,39,40 + tmlearn 44 + tmlearn 50 +db 0 ; padding diff --git a/data/base_stats.asm b/data/base_stats.asm index 716d1118..23e85e0f 100755 --- a/data/base_stats.asm +++ b/data/base_stats.asm @@ -35,7 +35,7 @@ INCLUDE "data/baseStats/nidoking.asm" INCLUDE "data/baseStats/clefairy.asm" INCLUDE "data/baseStats/clefable.asm" INCLUDE "data/baseStats/vulpix.asm" -INCLUDE "data/baseStats/ninetails.asm" +INCLUDE "data/baseStats/ninetales.asm" INCLUDE "data/baseStats/jigglypuff.asm" INCLUDE "data/baseStats/wigglytuff.asm" INCLUDE "data/baseStats/zubat.asm" diff --git a/data/mart_inventories.asm b/data/mart_inventories.asm index 498d48d2..b821f4d7 100755 --- a/data/mart_inventories.asm +++ b/data/mart_inventories.asm @@ -1,75 +1,64 @@ ; mart inventories are below ; they are texts -; first byte $FE, next byte # of items, last byte $FF ; Viridian -ViridianMartText6:: ; 233b (0:233b) - db $FE,5,POKE_BALL,POTION,ANTIDOTE,PARLYZ_HEAL,BURN_HEAL,$FF +ViridianCashierText:: + TX_MART POKE_BALL,POTION,ANTIDOTE,PARLYZ_HEAL,BURN_HEAL ; Pewter -PewterMartText1:: ; 2343 (0:2343) - db $FE,7,POKE_BALL,POTION,ESCAPE_ROPE,ANTIDOTE,BURN_HEAL,AWAKENING - db PARLYZ_HEAL,$FF +PewterCashierText:: + TX_MART POKE_BALL,POTION,ESCAPE_ROPE,ANTIDOTE,BURN_HEAL,AWAKENING,PARLYZ_HEAL ; Cerulean -CeruleanMartText1:: ; 234d (0:234d) - db $FE,8,POKE_BALL,POTION,ESCAPE_ROPE,REPEL,ANTIDOTE,BURN_HEAL,AWAKENING - db PARLYZ_HEAL,$FF +CeruleanCashierText:: + TX_MART POKE_BALL,POTION,ESCAPE_ROPE,REPEL,ANTIDOTE,BURN_HEAL,AWAKENING,PARLYZ_HEAL -; Bike shop ; 2358 (0:2358) - db $FE,1,BICYCLE,$FF +; Bike shop + TX_MART BICYCLE ; Vermilion -VermilionMartText1:: ; 235c (0:235c) - db $FE,6,POKE_BALL,SUPER_POTION,ICE_HEAL,AWAKENING,PARLYZ_HEAL - db REPEL,$FF +VermilionCashierText:: + TX_MART POKE_BALL,SUPER_POTION,ICE_HEAL,AWAKENING,PARLYZ_HEAL,REPEL ; Lavender -LavenderMartText1:: ; 2365 (0:2365) - db $FE,9,GREAT_BALL,SUPER_POTION,REVIVE,ESCAPE_ROPE,SUPER_REPEL - db ANTIDOTE,BURN_HEAL,ICE_HEAL,PARLYZ_HEAL,$FF +LavenderCashierText:: + TX_MART GREAT_BALL,SUPER_POTION,REVIVE,ESCAPE_ROPE,SUPER_REPEL,ANTIDOTE,BURN_HEAL,ICE_HEAL,PARLYZ_HEAL ; Celadon Dept. Store 2F (1) -CeladonMart2Text1:: ; 2371 (0:2371) - db $FE,9,GREAT_BALL,SUPER_POTION,REVIVE,SUPER_REPEL,ANTIDOTE - db BURN_HEAL,ICE_HEAL,AWAKENING,PARLYZ_HEAL,$FF +CeladonMart2Clerk1Text:: + TX_MART GREAT_BALL,SUPER_POTION,REVIVE,SUPER_REPEL,ANTIDOTE,BURN_HEAL,ICE_HEAL,AWAKENING,PARLYZ_HEAL ; Celadon Dept. Store 2F (2) -CeladonMart2Text2:: ; 237d (0:237d) - db $FE,9,TM_32,TM_33,TM_02,TM_07,TM_37,TM_01,TM_05,TM_09,TM_17,$FF +CeladonMart2Clerk2Text:: + TX_MART TM_32,TM_33,TM_02,TM_07,TM_37,TM_01,TM_05,TM_09,TM_17 ; Celadon Dept. Store 4F -CeladonMart4Text1:: ; 2389 (0:2389) - db $FE,5,POKE_DOLL,FIRE_STONE,THUNDER_STONE,WATER_STONE,LEAF_STONE,$FF +CeladonMart4ClerkText:: + TX_MART POKE_DOLL,FIRE_STONE,THUNDER_STONE,WATER_STONE,LEAF_STONE ; Celadon Dept. Store 5F (1) -CeladonMart5Text3:: ; 2391 (0:2391) - db $FE,7,X_ACCURACY,GUARD_SPEC,DIRE_HIT,X_ATTACK,X_DEFEND,X_SPEED - db X_SPECIAL,$FF +CeladonMart5Clerk1Text:: + TX_MART X_ACCURACY,GUARD_SPEC,DIRE_HIT,X_ATTACK,X_DEFEND,X_SPEED,X_SPECIAL ; Celadon Dept. Store 5F (2) -CeladonMart5Text4:: ; 239b (0:239b) - db $FE,5,HP_UP,PROTEIN,IRON,CARBOS,CALCIUM,$FF +CeladonMart5Clerk2Text:: + TX_MART HP_UP,PROTEIN,IRON,CARBOS,CALCIUM ; Fuchsia -FuchsiaMartText1:: ; 23a3 (0:23a3) - db $FE,6,ULTRA_BALL,GREAT_BALL,HYPER_POTION,REVIVE,FULL_HEAL - db SUPER_REPEL,$FF +FuchsiaCashierText:: + TX_MART ULTRA_BALL,GREAT_BALL,HYPER_POTION,REVIVE,FULL_HEAL,SUPER_REPEL -; unused? 23ac (0:23ac) - db $FE,5,GREAT_BALL,HYPER_POTION,SUPER_POTION,FULL_HEAL,REVIVE,$FF +; unused? + TX_MART GREAT_BALL,HYPER_POTION,SUPER_POTION,FULL_HEAL,REVIVE ; Cinnabar -CinnabarMartText1:: ; 23b4 (0:23b4) - db $FE,7,ULTRA_BALL,GREAT_BALL,HYPER_POTION,MAX_REPEL,ESCAPE_ROPE - db FULL_HEAL,REVIVE,$FF +CinnabarCashierText:: + TX_MART ULTRA_BALL,GREAT_BALL,HYPER_POTION,MAX_REPEL,ESCAPE_ROPE,FULL_HEAL,REVIVE ; Saffron -SaffronMartText1:: ; 23be (0:23be) - db $FE,6,GREAT_BALL,HYPER_POTION,MAX_REPEL,ESCAPE_ROPE,FULL_HEAL - db REVIVE,$FF +SaffronCashierText:: + TX_MART GREAT_BALL,HYPER_POTION,MAX_REPEL,ESCAPE_ROPE,FULL_HEAL,REVIVE ; Indigo -IndigoPlateauLobbyText4:: ; 23c7 (0:23c7) - db $FE,7,ULTRA_BALL,GREAT_BALL,FULL_RESTORE,MAX_POTION,FULL_HEAL - db REVIVE,MAX_REPEL,$FF +IndigoCashierText:: + TX_MART ULTRA_BALL,GREAT_BALL,FULL_RESTORE,MAX_POTION,FULL_HEAL,REVIVE,MAX_REPEL diff --git a/engine/oak_speech2.asm b/engine/oak_speech2.asm index 37c998a9..5eeb5ea9 100755 --- a/engine/oak_speech2.asm +++ b/engine/oak_speech2.asm @@ -226,9 +226,16 @@ GetDefaultName: ; 6858 (1:6858) jp CopyData DefaultNamesPlayerList: ; 687d (1:687d) - db "NEW NAME@YELLOW@ASH@JACK@" + db "NEW NAME@" + db "YELLOW@" + db "ASH@" + db "JACK@" + DefaultNamesRivalList: ; 688d (1:688d) - db "NEW NAME@BLUE@GARY@JOHN@" + db "NEW NAME@" + db "BLUE@" + db "GARY@" + db "JOHN@" TextTerminator_6b20: ; 68a5 (1:68a5) db "@" diff --git a/macros.asm b/macros.asm index 235daf73..1875d00c 100644 --- a/macros.asm +++ b/macros.asm @@ -355,6 +355,15 @@ TX_BILLS_PC EQUS "db $fd" TX_POKEMART_CLERK EQUS "db $fe" TX_POKECENTER_NURSE EQUS "db $ff" +TX_MART: MACRO + db $FE, _NARG + rept _NARG + db \1 + shift + endr + db $FF + ENDM + ; Predef macro. predef_const: MACRO const \1PredefID @@ -406,10 +415,6 @@ tx_pre_jump: MACRO jp PrintPredefTextID ENDM -sound0x0A: macro - db $11 -endm - WALK EQU $FE STAY EQU $FF diff --git a/scripts/blueshouse.asm b/scripts/blueshouse.asm index 161955c1..b727bbd1 100755 --- a/scripts/blueshouse.asm +++ b/scripts/blueshouse.asm @@ -65,7 +65,7 @@ DaisyOfferMapText: GotMapText: TX_FAR _GotMapText - sound0x0A + TX_SFX_KEY_ITEM db "@" DaisyBagFullText: diff --git a/scripts/celadonmart2.asm b/scripts/celadonmart2.asm index b8128c54..c438d6e1 100755 --- a/scripts/celadonmart2.asm +++ b/scripts/celadonmart2.asm @@ -2,8 +2,8 @@ CeladonMart2Script: jp EnableAutoTextBoxDrawing CeladonMart2TextPointers: - dw CeladonMart2Text1 - dw CeladonMart2Text2 + dw CeladonMart2Clerk1Text + dw CeladonMart2Clerk2Text dw CeladonMart2Text3 dw CeladonMart2Text4 dw CeladonMart2Text5 diff --git a/scripts/celadonmart4.asm b/scripts/celadonmart4.asm index f547ca62..18049dc0 100755 --- a/scripts/celadonmart4.asm +++ b/scripts/celadonmart4.asm @@ -2,7 +2,7 @@ CeladonMart4Script: jp EnableAutoTextBoxDrawing CeladonMart4TextPointers: - dw CeladonMart4Text1 + dw CeladonMart4ClerkText dw CeladonMart4Text2 dw CeladonMart4Text3 dw CeladonMart4Text4 diff --git a/scripts/celadonmart5.asm b/scripts/celadonmart5.asm index 92ccb313..f65b42bc 100755 --- a/scripts/celadonmart5.asm +++ b/scripts/celadonmart5.asm @@ -5,8 +5,8 @@ CeladonMart5Script: CeladonMart5TextPointers: dw CeladonMart5Text1 dw CeladonMart5Text2 - dw CeladonMart5Text3 - dw CeladonMart5Text4 + dw CeladonMart5Clerk1Text + dw CeladonMart5Clerk2Text dw CeladonMart5Text5 CeladonMart5Text1: diff --git a/scripts/celadonmartelevator.asm b/scripts/celadonmartelevator.asm index e78d86fc..60e5210c 100755 --- a/scripts/celadonmartelevator.asm +++ b/scripts/celadonmartelevator.asm @@ -32,23 +32,23 @@ CeladonMartElevatorScript_4862a: ret CeladonMartElevatorScript_48631: - ld hl, CeladonMartElavatorFloors + ld hl, CeladonMartElevatorFloors call LoadItemList - ld hl, CeldaonMartElevatorWarpMaps + ld hl, CeladonMartElevatorWarpMaps ld de, wElevatorWarpMaps - ld bc, CeldaonMartElevatorWarpMapsEnd - CeldaonMartElevatorWarpMaps + ld bc, CeladonMartElevatorWarpMapsEnd - CeladonMartElevatorWarpMaps jp CopyData -CeladonMartElavatorFloors: - db $05 ; num elements in list +CeladonMartElevatorFloors: + db 5 ; number of elements in list db FLOOR_1F db FLOOR_2F db FLOOR_3F db FLOOR_4F db FLOOR_5F - db $FF ; terminator + db $FF -CeldaonMartElevatorWarpMaps: +CeladonMartElevatorWarpMaps: ; first byte is warp number ; second byte is map number ; These specify where the player goes after getting out of the elevator. @@ -57,7 +57,7 @@ CeldaonMartElevatorWarpMaps: db $02, CELADON_MART_3 db $02, CELADON_MART_4 db $02, CELADON_MART_5 -CeldaonMartElevatorWarpMapsEnd: +CeladonMartElevatorWarpMapsEnd: CeladonMartElevatorScript_48654: jpba ShakeElevator @@ -68,6 +68,6 @@ CeladonMartElevatorTextPointers: CeladonMartElevatorText1: TX_ASM call CeladonMartElevatorScript_48631 - ld hl, CeldaonMartElevatorWarpMaps + ld hl, CeladonMartElevatorWarpMaps predef DisplayElevatorFloorMenu jp TextScriptEnd diff --git a/scripts/celadonpokecenter.asm b/scripts/celadonpokecenter.asm index b577906a..acbae2ec 100755 --- a/scripts/celadonpokecenter.asm +++ b/scripts/celadonpokecenter.asm @@ -3,16 +3,16 @@ CeladonPokecenterScript: jp EnableAutoTextBoxDrawing CeladonPokecenterTextPointers: - dw CeladonPokecenterText1 + dw CeladonHealNurseText dw CeladonPokecenterText2 dw CeladonPokecenterText3 - dw CeladonPokecenterText4 + dw CeladonTradeNurseText dw CeladonPokecenterText5 -CeladonPokecenterText4: +CeladonTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST -CeladonPokecenterText1: +CeladonHealNurseText: TX_POKECENTER_NURSE CeladonPokecenterText2: diff --git a/scripts/ceruleanmart.asm b/scripts/ceruleanmart.asm index 1a5df5a2..76d83f90 100755 --- a/scripts/ceruleanmart.asm +++ b/scripts/ceruleanmart.asm @@ -2,7 +2,7 @@ CeruleanMartScript: jp EnableAutoTextBoxDrawing CeruleanMartTextPointers: - dw CeruleanMartText1 + dw CeruleanCashierText dw CeruleanMartText2 dw CeruleanMartText3 diff --git a/scripts/ceruleanpokecenter.asm b/scripts/ceruleanpokecenter.asm index 2c9d4419..876d2bbd 100755 --- a/scripts/ceruleanpokecenter.asm +++ b/scripts/ceruleanpokecenter.asm @@ -3,16 +3,16 @@ CeruleanPokecenterScript: jp EnableAutoTextBoxDrawing CeruleanPokecenterTextPointers: - dw CeruleanPokecenterText1 + dw CeruleanHealNurseText dw CeruleanPokecenterText2 dw CeruleanPokecenterText3 - dw CeruleanPokecenterText4 + dw CeruleanTradeNurseText dw CeruleanPokecenterText5 -CeruleanPokecenterText4: +CeruleanTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST -CeruleanPokecenterText1: +CeruleanHealNurseText: TX_POKECENTER_NURSE CeruleanPokecenterText2: diff --git a/scripts/cinnabarmart.asm b/scripts/cinnabarmart.asm index 35e9b4ce..55b82cf0 100755 --- a/scripts/cinnabarmart.asm +++ b/scripts/cinnabarmart.asm @@ -2,7 +2,7 @@ CinnabarMartScript: jp EnableAutoTextBoxDrawing CinnabarMartTextPointers: - dw CinnabarMartText1 + dw CinnabarCashierText dw CinnabarMartText2 dw CinnabarMartText3 diff --git a/scripts/cinnabarpokecenter.asm b/scripts/cinnabarpokecenter.asm index b4305d02..a43e5385 100755 --- a/scripts/cinnabarpokecenter.asm +++ b/scripts/cinnabarpokecenter.asm @@ -3,24 +3,24 @@ CinnabarPokecenterScript: jp EnableAutoTextBoxDrawing CinnabarPokecenterTextPointers: - dw CinnabarPokecenterText1 + dw CinnabarHealNurseText dw CinnabarPokecenterText2 dw CinnabarPokecenterText3 - dw CinnabarPokecenterText4 + dw CinnabarTradeNurseText dw CinnabarPokecenterText5 -CinnabarPokecenterText1: +CinnabarHealNurseText: TX_POKECENTER_NURSE CinnabarPokecenterText2: - TX_FAR _CinnabarPokecenterText1 + TX_FAR _CinnabarPokecenterText2 db "@" CinnabarPokecenterText3: TX_FAR _CinnabarPokecenterText3 db "@" -CinnabarPokecenterText4: +CinnabarTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST CinnabarPokecenterText5: diff --git a/scripts/fuchsiamart.asm b/scripts/fuchsiamart.asm index 46049163..32dbe773 100755 --- a/scripts/fuchsiamart.asm +++ b/scripts/fuchsiamart.asm @@ -3,7 +3,7 @@ FuchsiaMartScript: ret FuchsiaMartTextPointers: - dw FuchsiaMartText1 + dw FuchsiaCashierText dw FuchsiaMartText2 dw FuchsiaMartText3 diff --git a/scripts/fuchsiapokecenter.asm b/scripts/fuchsiapokecenter.asm index 5f7afeb3..50f5ba76 100755 --- a/scripts/fuchsiapokecenter.asm +++ b/scripts/fuchsiapokecenter.asm @@ -3,14 +3,14 @@ FuchsiaPokecenterScript: jp EnableAutoTextBoxDrawing FuchsiaPokecenterTextPointers: - dw FuchsiaPokecenterText1 + dw FuchsiaHealNurseText dw FuchsiaPokecenterText2 dw FuchsiaPokecenterText3 - dw FuchsiaPokecenterText4 + dw FuchsiaTradeNurseText dw FuchsiaPokecenterText5 -FuchsiaPokecenterText1: - db $ff +FuchsiaHealNurseText: + TX_POKECENTER_NURSE FuchsiaPokecenterText2: TX_FAR _FuchsiaPokecenterText1 @@ -20,8 +20,8 @@ FuchsiaPokecenterText3: TX_FAR _FuchsiaPokecenterText3 db "@" -FuchsiaPokecenterText4: - db $f6 +FuchsiaTradeNurseText: + TX_CABLE_CLUB_RECEPTIONIST FuchsiaPokecenterText5: TX_ASM diff --git a/scripts/indigoplateaulobby.asm b/scripts/indigoplateaulobby.asm index 63f228d0..36ed7fd5 100755 --- a/scripts/indigoplateaulobby.asm +++ b/scripts/indigoplateaulobby.asm @@ -15,25 +15,25 @@ IndigoPlateauLobbyScript: ret IndigoPlateauLobbyTextPointers: - dw IndigoPlateauLobbyText1 + dw IndigoHealNurseText dw IndigoPlateauLobbyText2 dw IndigoPlateauLobbyText3 - dw IndigoPlateauLobbyText4 - dw IndigoPlateauLobbyText5 + dw IndigoCashierText + dw IndigoTradeNurseText dw IndigoPlateauLobbyText6 -IndigoPlateauLobbyText1: +IndigoHealNurseText: TX_POKECENTER_NURSE IndigoPlateauLobbyText2: - TX_FAR _IndigoPlateauLobbyText1 + TX_FAR _IndigoPlateauLobbyText2 db "@" IndigoPlateauLobbyText3: TX_FAR _IndigoPlateauLobbyText3 db "@" -IndigoPlateauLobbyText5: +IndigoTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST IndigoPlateauLobbyText6: diff --git a/scripts/lavendermart.asm b/scripts/lavendermart.asm index 915c9662..51b64992 100755 --- a/scripts/lavendermart.asm +++ b/scripts/lavendermart.asm @@ -2,7 +2,7 @@ LavenderMartScript: jp EnableAutoTextBoxDrawing LavenderMartTextPointers: - dw LavenderMartText1 + dw LavenderCashierText dw LavenderMartText2 dw LavenderMartText3 @@ -13,20 +13,20 @@ LavenderMartText2: LavenderMartText3: TX_ASM CheckEvent EVENT_RESCUED_MR_FUJI - jr nz, .asm_c88d4 - ld hl, LavenderMart_5c953 + jr nz, .Nugget + ld hl, .ReviveText call PrintText - jr .asm_6d225 -.asm_c88d4 - ld hl, LavenderMart_5c958 + jr .done +.Nugget + ld hl, .NuggetText call PrintText -.asm_6d225 +.done jp TextScriptEnd -LavenderMart_5c953: - TX_FAR _LavenderMart_5c953 +.ReviveText + TX_FAR _LavenderMartReviveText db "@" -LavenderMart_5c958: - TX_FAR _LavenderMart_5c958 +.NuggetText + TX_FAR _LavenderMartNuggetText db "@" diff --git a/scripts/lavenderpokecenter.asm b/scripts/lavenderpokecenter.asm index e8e23655..67960c1b 100755 --- a/scripts/lavenderpokecenter.asm +++ b/scripts/lavenderpokecenter.asm @@ -3,20 +3,20 @@ LavenderPokecenterScript: jp EnableAutoTextBoxDrawing LavenderPokecenterTextPointers: - dw LavenderPokecenterText1 + dw LavenderHealNurseText dw LavenderPokecenterText2 dw LavenderPokecenterText3 - dw LavenderPokecenterText4 + dw LavenderTradeNurseText dw LavenderPokecenterText5 -LavenderPokecenterText4: +LavenderTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST -LavenderPokecenterText1: +LavenderHealNurseText: TX_POKECENTER_NURSE LavenderPokecenterText2: - TX_FAR _LavenderPokecenterText1 + TX_FAR _LavenderPokecenterText2 db "@" LavenderPokecenterText3: diff --git a/scripts/mtmoonpokecenter.asm b/scripts/mtmoonpokecenter.asm index a2f2c82b..76cc472a 100755 --- a/scripts/mtmoonpokecenter.asm +++ b/scripts/mtmoonpokecenter.asm @@ -3,15 +3,15 @@ MtMoonPokecenterScript: jp EnableAutoTextBoxDrawing MtMoonPokecenterTextPointers: - dw MtMoonPokecenterText1 + dw MtMoonHealNurseText dw MtMoonPokecenterText2 dw MtMoonPokecenterText3 - dw MtMoonPokecenterText4 + dw MagikarpSalesmanText dw MtMoonPokecenterText5 - dw MtMoonPokecenterText6 + dw MtMoonTradeNurseText dw MtMoonPokecenterText7 -MtMoonPokecenterText1: +MtMoonHealNurseText: TX_POKECENTER_NURSE MtMoonPokecenterText2: @@ -22,16 +22,16 @@ MtMoonPokecenterText3: TX_FAR _MtMoonPokecenterText3 db "@" -MtMoonPokecenterText4: +MagikarpSalesmanText: TX_ASM - callab Func_f218c + callab MagikarpSalesman jp TextScriptEnd MtMoonPokecenterText5: TX_FAR _MtMoonPokecenterText5 db "@" -MtMoonPokecenterText6: +MtMoonTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST MtMoonPokecenterText7: diff --git a/scripts/mtmoonpokecenter2.asm b/scripts/mtmoonpokecenter2.asm index f01b7218..6097342b 100755 --- a/scripts/mtmoonpokecenter2.asm +++ b/scripts/mtmoonpokecenter2.asm @@ -1,7 +1,7 @@ -Func_f218c: +MagikarpSalesman: CheckEvent EVENT_BOUGHT_MAGIKARP, 1 jp c, .alreadyBoughtMagikarp - ld hl, MtMoonPokecenterText_4935c + ld hl, .Text1 call PrintText ld a, MONEY_BOX ld [wTextBoxID], a @@ -18,7 +18,7 @@ Func_f218c: ld [hMoney + 1], a call HasEnoughMoney jr nc, .enoughMoney - ld hl, MtMoonPokecenterText_49366 + ld hl, .NoMoneyText jr .printText .enoughMoney lb bc, MAGIKARP, 5 @@ -40,27 +40,27 @@ Func_f218c: SetEvent EVENT_BOUGHT_MAGIKARP jr .done .choseNo - ld hl, MtMoonPokecenterText_49361 + ld hl, .RefuseText jr .printText .alreadyBoughtMagikarp - ld hl, MtMoonPokecenterText_4936b + ld hl, .Text2 .printText call PrintText .done ret -MtMoonPokecenterText_4935c: - TX_FAR _MtMoonPokecenterText_4935c +.Text1 + TX_FAR _MagikarpSalesmanText1 db "@" -MtMoonPokecenterText_49361: - TX_FAR _MtMoonPokecenterText_49361 +.RefuseText + TX_FAR _MagikarpSalesmanNoText db "@" -MtMoonPokecenterText_49366: - TX_FAR _MtMoonPokecenterText_49366 +.NoMoneyText + TX_FAR _MagikarpSalesmanNoMoneyText db "@" -MtMoonPokecenterText_4936b: - TX_FAR _MtMoonPokecenterText_4936b +.Text2 + TX_FAR _MagikarpSalesmanText2 db "@" diff --git a/scripts/pewtermart.asm b/scripts/pewtermart.asm index 33a0a4c2..64915563 100755 --- a/scripts/pewtermart.asm +++ b/scripts/pewtermart.asm @@ -5,26 +5,26 @@ PewterMartScript: ret PewterMartTextPointers: - dw PewterMartText1 + dw PewterCashierText dw PewterMartText2 dw PewterMartText3 PewterMartText2: TX_ASM - ld hl, PewterMartText_74cc6 + ld hl, .Text call PrintText jp TextScriptEnd -PewterMartText_74cc6: - TX_FAR _PewterMartText_74cc6 +.Text + TX_FAR _PewterMartText2 db "@" PewterMartText3: TX_ASM - ld hl, PewterMartText_74cd5 + ld hl, .Text call PrintText jp TextScriptEnd -PewterMartText_74cd5: - TX_FAR _PewterMartText_74cd5 +.Text + TX_FAR _PewterMartText3 db "@" diff --git a/scripts/pewterpokecenter.asm b/scripts/pewterpokecenter.asm index 2d7f8713..78bfc9fa 100755 --- a/scripts/pewterpokecenter.asm +++ b/scripts/pewterpokecenter.asm @@ -6,26 +6,26 @@ PewterPokecenterScript: ret PewterPokecenterTextPointers: - dw PewterPokecenterText1 + dw PewterHealNurseText dw PewterPokecenterText2 - dw PewterPokecenterText3 - dw PewterPokecenterText4 + dw PewterJigglypuffText + dw PewterTradeNurseText dw PewterPokecenterText5 dw PewterPokecenterText6 -PewterPokecenterText1: +PewterHealNurseText: TX_POKECENTER_NURSE PewterPokecenterText2: - TX_FAR _PewterPokecenterText1 + TX_FAR _PewterPokecenterText2 db "@" -PewterPokecenterText3: +PewterJigglypuffText: TX_ASM - callba Func_f1da4 + callba PewterJigglypuff jp TextScriptEnd -PewterPokecenterText4: +PewterTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST PewterPokecenterText5: diff --git a/scripts/pewterpokecenter2.asm b/scripts/pewterpokecenter2.asm index e424071a..9f035fa9 100755 --- a/scripts/pewterpokecenter2.asm +++ b/scripts/pewterpokecenter2.asm @@ -4,13 +4,13 @@ Func_f1d98: ret PewterPokecenterText_f1d9f: - TX_FAR _PewterPokecenterText2 + TX_FAR _PewterPokecenterText3 db "@" -Func_f1da4: +PewterJigglypuff: ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld hl, PewterPokecenterText_f1e19 + ld hl, .Text call PrintText call StopAllMusic ld c, 32 @@ -60,8 +60,8 @@ Func_f1da4: call DisablePikachuFollowingPlayer ret -PewterPokecenterText_f1e19: - TX_FAR _PewterPokecenterText5 +.Text + TX_FAR _PewterJigglypuffText db "@" JigglypuffSpinData: diff --git a/scripts/rocktunnelpokecenter.asm b/scripts/rocktunnelpokecenter.asm index 76336e5f..68c5f31a 100755 --- a/scripts/rocktunnelpokecenter.asm +++ b/scripts/rocktunnelpokecenter.asm @@ -3,24 +3,24 @@ RockTunnelPokecenterScript: jp EnableAutoTextBoxDrawing RockTunnelPokecenterTextPointers: - dw RockTunnelPokecenterText1 + dw RockTunnelHealNurseText dw RockTunnelPokecenterText2 dw RockTunnelPokecenterText3 - dw RockTunnelPokecenterText4 + dw RockTunnelTradeNurseText dw RockTunnelPokecenterText5 -RockTunnelPokecenterText1: +RockTunnelHealNurseText: TX_POKECENTER_NURSE RockTunnelPokecenterText2: - TX_FAR _RockTunnelPokecenterText1 + TX_FAR _RockTunnelPokecenterText2 db "@" RockTunnelPokecenterText3: TX_FAR _RockTunnelPokecenterText3 db "@" -RockTunnelPokecenterText4: +RockTunnelTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST RockTunnelPokecenterText5: diff --git a/scripts/saffronmart.asm b/scripts/saffronmart.asm index 0bc03362..8b140610 100755 --- a/scripts/saffronmart.asm +++ b/scripts/saffronmart.asm @@ -2,7 +2,7 @@ SaffronMartScript: jp EnableAutoTextBoxDrawing SaffronMartTextPointers: - dw SaffronMartText1 + dw SaffronCashierText dw SaffronMartText2 dw SaffronMartText3 diff --git a/scripts/saffronpokecenter.asm b/scripts/saffronpokecenter.asm index 7fde0502..46667927 100755 --- a/scripts/saffronpokecenter.asm +++ b/scripts/saffronpokecenter.asm @@ -3,24 +3,24 @@ SaffronPokecenterScript: jp EnableAutoTextBoxDrawing SaffronPokecenterTextPointers: - dw SaffronPokecenterText1 + dw SaffronHealNurseText dw SaffronPokecenterText2 dw SaffronPokecenterText3 - dw SaffronPokecenterText4 + dw SaffronTradeNurseText dw SaffronPokecenterText5 -SaffronPokecenterText1: +SaffronHealNurseText: TX_POKECENTER_NURSE SaffronPokecenterText2: - TX_FAR _SaffronPokecenterText1 + TX_FAR _SaffronPokecenterText2 db "@" SaffronPokecenterText3: TX_FAR _SaffronPokecenterText3 db "@" -SaffronPokecenterText4: +SaffronTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST SaffronPokecenterText5: diff --git a/scripts/vermiliongym.asm b/scripts/vermiliongym.asm index 41ca1e53..eb726831 100755 --- a/scripts/vermiliongym.asm +++ b/scripts/vermiliongym.asm @@ -1,4 +1,4 @@ -VermilionGymScript: ; 5ca26 (17:4a26) +VermilionGymScript: ld hl, wCurrentMapScriptFlags bit 5, [hl] res 5, [hl] diff --git a/scripts/vermilionmart.asm b/scripts/vermilionmart.asm index ec9f7f18..2d4df78d 100755 --- a/scripts/vermilionmart.asm +++ b/scripts/vermilionmart.asm @@ -2,7 +2,7 @@ VermilionMartScript: jp EnableAutoTextBoxDrawing VermilionMartTextPointers: - dw VermilionMartText1 + dw VermilionCashierText dw VermilionMartText2 dw VermilionMartText3 diff --git a/scripts/vermilionpokecenter.asm b/scripts/vermilionpokecenter.asm index 15d9dbd9..af481a16 100755 --- a/scripts/vermilionpokecenter.asm +++ b/scripts/vermilionpokecenter.asm @@ -3,24 +3,24 @@ VermilionPokecenterScript: jp EnableAutoTextBoxDrawing VermilionPokecenterTextPointers: - dw VermilionPokecenterText1 + dw VermilionHealNurseText dw VermilionPokecenterText2 dw VermilionPokecenterText3 - dw VermilionPokecenterText4 + dw VermilionTradeNurseText dw VermilionPokecenterText5 -VermilionPokecenterText1: +VermilionHealNurseText: TX_POKECENTER_NURSE VermilionPokecenterText2: - TX_FAR _VermilionPokecenterText1 + TX_FAR _VermilionPokecenterText2 db "@" VermilionPokecenterText3: TX_FAR _VermilionPokecenterText3 db "@" -VermilionPokecenterText4: +VermilionTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST VermilionPokecenterText5: diff --git a/scripts/viridianmart.asm b/scripts/viridianmart.asm index 64c0eda0..e20ed48e 100755 --- a/scripts/viridianmart.asm +++ b/scripts/viridianmart.asm @@ -12,7 +12,7 @@ ViridianMartScript_1d47d: ld hl, ViridianMartTextPointers jr .asm_1d48c .asm_1d489 - ld hl, ViridianMartTextPointers + $a ; starts at ViridianMartText6 + ld hl, ViridianMartTextPointers + $a ; starts at ViridianCashierText .asm_1d48c ld a, l ld [wMapTextPtr], a @@ -79,7 +79,7 @@ ViridianMartTextPointers: dw ViridianMartText3 dw ViridianMartText4 dw ViridianMartText5 - dw ViridianMartText6 + dw ViridianCashierText dw ViridianMartText2 dw ViridianMartText3 diff --git a/scripts/viridianpokecenter.asm b/scripts/viridianpokecenter.asm index 3bbedf8d..75e6ea6f 100755 --- a/scripts/viridianpokecenter.asm +++ b/scripts/viridianpokecenter.asm @@ -3,24 +3,24 @@ ViridianPokeCenterScript: jp EnableAutoTextBoxDrawing ViridianPokecenterTextPointers: - dw ViridianPokeCenterText1 + dw ViridianHealNurseText dw ViridianPokeCenterText2 dw ViridianPokeCenterText3 - dw ViridianPokeCenterText4 + dw ViridianTradeNurseText dw ViridianPokeCenterText5 -ViridianPokeCenterText1: +ViridianHealNurseText: TX_POKECENTER_NURSE ViridianPokeCenterText2: - TX_FAR _ViridianPokeCenterText1 + TX_FAR _ViridianPokeCenterText2 db "@" ViridianPokeCenterText3: TX_FAR _ViridianPokeCenterText3 db "@" -ViridianPokeCenterText4: +ViridianTradeNurseText: TX_CABLE_CLUB_RECEPTIONIST ViridianPokeCenterText5: diff --git a/text.asm b/text.asm index 65ae4de5..024a2880 100644 --- a/text.asm +++ b/text.asm @@ -2497,6 +2497,7 @@ INCLUDE "text/maps/reds_house_1f.asm" INCLUDE "text/maps/blues_house.asm" INCLUDE "text/maps/oaks_lab.asm" INCLUDE "text/pokedex_ratings.asm" +INCLUDE "text/maps/viridian_pokecenter.asm" INCLUDE "text/maps/viridian_mart.asm" INCLUDE "text/maps/school.asm" INCLUDE "text/maps/viridian_house.asm" diff --git a/text/maps/cinnabar_pokecenter.asm b/text/maps/cinnabar_pokecenter.asm index 301c9740..cf481764 100644 --- a/text/maps/cinnabar_pokecenter.asm +++ b/text/maps/cinnabar_pokecenter.asm @@ -1,5 +1,4 @@ _CinnabarPokecenterText2:: -_CinnabarPokecenterText1:: text "You can cancel" line "evolution." diff --git a/text/maps/indigo_plateau_lobby.asm b/text/maps/indigo_plateau_lobby.asm index 86cfb562..8487e29a 100644 --- a/text/maps/indigo_plateau_lobby.asm +++ b/text/maps/indigo_plateau_lobby.asm @@ -1,4 +1,4 @@ -_IndigoPlateauLobbyText1:: +_IndigoPlateauLobbyText2:: text "Yo! Champ in" line "making!" diff --git a/text/maps/lavender_mart.asm b/text/maps/lavender_mart.asm index 54519890..222712c6 100644 --- a/text/maps/lavender_mart.asm +++ b/text/maps/lavender_mart.asm @@ -14,13 +14,13 @@ _LavenderMartText2:: line "I can get them?" done -_LavenderMart_5c953:: +_LavenderMartReviveText:: text "You know REVIVE?" line "It revives any" cont "fainted #MON!" done -_LavenderMart_5c958:: +_LavenderMartNuggetText:: text "I found a NUGGET" line "in the mountains." diff --git a/text/maps/lavender_pokecenter.asm b/text/maps/lavender_pokecenter.asm index 5ee5b2f5..3aa7b67d 100644 --- a/text/maps/lavender_pokecenter.asm +++ b/text/maps/lavender_pokecenter.asm @@ -1,6 +1,4 @@ -_LavenderPokecenterText4:: _LavenderPokecenterText2:: -_LavenderPokecenterText1:: text "TEAM ROCKET will" line "do anything for" cont "the sake of gold!" diff --git a/text/maps/mt_moon_pokecenter.asm b/text/maps/mt_moon_pokecenter.asm index f45c5598..ebcada87 100644 --- a/text/maps/mt_moon_pokecenter.asm +++ b/text/maps/mt_moon_pokecenter.asm @@ -20,7 +20,7 @@ _MtMoonPokecenterText5:: db $0 done -_MtMoonPokecenterText_4935c:: +_MagikarpSalesmanText1:: text "MAN: Hello, there!" line "Have I got a deal" cont "just for you!" @@ -31,18 +31,18 @@ _MtMoonPokecenterText_4935c:: cont "What do you say?" done -_MtMoonPokecenterText_49361:: +_MagikarpSalesmanNoText:: text "No? I'm only" line "doing this as a" cont "favor to you!" done -_MtMoonPokecenterText_49366:: +_MagikarpSalesmanNoMoneyText:: text "You'll need more" line "money than that!" done -_MtMoonPokecenterText_4936b:: +_MagikarpSalesmanText2:: text "MAN: Well, I don't" line "give refunds!" done diff --git a/text/maps/pewter_mart.asm b/text/maps/pewter_mart.asm index 29a1f597..4dbc3c02 100644 --- a/text/maps/pewter_mart.asm +++ b/text/maps/pewter_mart.asm @@ -1,4 +1,4 @@ -_PewterMartText_74cc6:: +_PewterMartText2:: text "A shady old man" line "got me to buy" cont "this really weird" @@ -8,7 +8,7 @@ _PewterMartText_74cc6:: line "and it cost ¥500!" done -_PewterMartText_74cd5:: +_PewterMartText3:: text "Good things can" line "happen if you" cont "raise #MON" diff --git a/text/maps/pewter_pokecenter.asm b/text/maps/pewter_pokecenter.asm index cd76b004..968f6af0 100644 --- a/text/maps/pewter_pokecenter.asm +++ b/text/maps/pewter_pokecenter.asm @@ -1,4 +1,4 @@ -_PewterPokecenterText1:: +_PewterPokecenterText2:: text "What!?" para "TEAM ROCKET is" @@ -8,7 +8,7 @@ _PewterPokecenterText1:: para "Scram!" done -_PewterPokecenterText2:: +_PewterPokecenterText3:: text "#MON CENTERS" line "are wonderful!" @@ -21,7 +21,7 @@ _PewterPokecenterText2:: cont "are cured." done -_PewterPokecenterText5:: +_PewterJigglypuffText:: text "JIGGLYPUFF: Puu" line "pupuu!" done diff --git a/text/maps/rock_tunnel_pokecenter.asm b/text/maps/rock_tunnel_pokecenter.asm index ec625e95..0fc249ff 100644 --- a/text/maps/rock_tunnel_pokecenter.asm +++ b/text/maps/rock_tunnel_pokecenter.asm @@ -1,4 +1,4 @@ -_RockTunnelPokecenterText1:: +_RockTunnelPokecenterText2:: text "The element types" line "of #MON make" cont "them stronger" diff --git a/text/maps/saffron_pokecenter.asm b/text/maps/saffron_pokecenter.asm index 8fd47e4f..6548aff8 100644 --- a/text/maps/saffron_pokecenter.asm +++ b/text/maps/saffron_pokecenter.asm @@ -1,4 +1,4 @@ -_SaffronPokecenterText1:: +_SaffronPokecenterText2:: text "#MON growth" line "rates differ from" cont "specie to specie." diff --git a/text/maps/vermilion_pokecenter.asm b/text/maps/vermilion_pokecenter.asm index bbd8842f..c9e9a581 100644 --- a/text/maps/vermilion_pokecenter.asm +++ b/text/maps/vermilion_pokecenter.asm @@ -1,5 +1,4 @@ _VermilionPokecenterText2:: -_VermilionPokecenterText1:: text "Even if they are" line "the same level," cont "#MON can have" diff --git a/text/maps/viridian_mart.asm b/text/maps/viridian_mart.asm index 4cc2ce19..5f4e147c 100644 --- a/text/maps/viridian_mart.asm +++ b/text/maps/viridian_mart.asm @@ -1,21 +1,3 @@ -_ViridianPokeCenterText2:: -_ViridianPokeCenterText1:: - text "You can use that" - line "PC in the corner." - - para "The receptionist" - line "told me. So kind!" - done - -_ViridianPokeCenterText3:: - text "There's a #MON" - line "CENTER in every" - cont "town ahead." - - para "They don't charge" - line "any money either!" - done - _ViridianMartText1:: text "Okay! Say hi to" line "PROF.OAK for me!" diff --git a/text/maps/viridian_pokecenter.asm b/text/maps/viridian_pokecenter.asm new file mode 100755 index 00000000..4ac18bf6 --- /dev/null +++ b/text/maps/viridian_pokecenter.asm @@ -0,0 +1,16 @@ +_ViridianPokeCenterText2:: + text "You can use that" + line "PC in the corner." + + para "The receptionist" + line "told me. So kind!" + done + +_ViridianPokeCenterText3:: + text "There's a #MON" + line "CENTER in every" + cont "town ahead." + + para "They don't charge" + line "any money either!" + done diff --git a/text/move_names.asm b/text/move_names.asm index 92760d45..a9265f51 100644 --- a/text/move_names.asm +++ b/text/move_names.asm @@ -164,4 +164,3 @@ MoveNames:: ; b0000 (2c:4000) db "SLASH@" db "SUBSTITUTE@" db "STRUGGLE@" - diff --git a/text/oakspeech.asm b/text/oakspeech.asm index 91aaf5c3..5911092c 100644 --- a/text/oakspeech.asm +++ b/text/oakspeech.asm @@ -53,4 +53,3 @@ _OakSpeechText3:: cont "with #MON" cont "awaits! Let's go!" done - diff --git a/text/pokedex.asm b/text/pokedex.asm index 22aa946e..7e84a83d 100644 --- a/text/pokedex.asm +++ b/text/pokedex.asm @@ -1506,4 +1506,3 @@ _MewDexEntry:: next "fine, delicate" next "hair can be seen" dex - -- cgit v1.3.1-sl0p