diff options
Diffstat (limited to 'engine/menus/start_sub_menus.asm')
-rwxr-xr-x | engine/menus/start_sub_menus.asm | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm index 6a98a10c..84583a69 100755 --- a/engine/menus/start_sub_menus.asm +++ b/engine/menus/start_sub_menus.asm @@ -144,11 +144,14 @@ StartMenu_Pokemon:: call ChooseFlyDestination ld a, [wd732] bit 3, a ; did the player decide to fly? - jp nz, .goBackToMap + jr nz, .asm_5d4c call LoadFontTilePatterns ld hl, wd72e set 1, [hl] jp StartMenu_Pokemon +.asm_5d4c + call Func_1510 + jp .goBackToMap .cut bit BIT_CASCADEBADGE, a jp z, .newBadgeRequired @@ -165,15 +168,28 @@ StartMenu_Pokemon:: bit 1, [hl] res 1, [hl] jp z, .loop + ld a, [wcf91] + cp PIKACHU ; is this surfing pikachu? + jr z, .surfingPikachu + ld a, $1 + jr .continue +.surfingPikachu + ld a, $2 +.continue + ld [wd473], a ld a, SURFBOARD ld [wcf91], a ld [wPseudoItemID], a call UseItem ld a, [wActionResultOrTookBattleTurn] and a - jp z, .loop + jr z, .reloadNormalSprite call GBPalWhiteOutWithDelay3 jp .goBackToMap +.reloadNormalSprite + xor a + ld [wd473], a + jp .loop .strength bit BIT_RAINBOWBADGE, a jp z, .newBadgeRequired @@ -217,6 +233,7 @@ StartMenu_Pokemon:: ld hl, wd732 set 3, [hl] set 6, [hl] + call Func_1510 ld hl, wd72e set 1, [hl] res 4, [hl] @@ -307,11 +324,10 @@ StartMenu_Item:: call PrintText jr .exitMenu .notInCableClubRoom - ld bc, wNumBagItems ld hl, wListPointer - ld a, c - ld [hli], a - ld [hl], b ; store item bag pointer in wListPointer (for DisplayListMenuID) + ld [hl], wNumBagItems & $ff + inc hl + ld [hl], wNumBagItems / $100 ; store item bag pointer in wListPointer (for DisplayListMenuID) xor a ld [wPrintItemPrices], a ld a, ITEMLISTMENU @@ -469,10 +485,11 @@ StartMenu_TrainerInfo:: call LoadScreenTilesFromBuffer2 ; restore saved screen call RunDefaultPaletteCommand call ReloadMapData + farcall DrawStartMenu ; XXX what difference does this make? call LoadGBPal pop af ldh [hTilesetType], a - jp RedisplayStartMenu + jp RedisplayStartMenu_DoNotDrawStartMenu ; loads tile patterns and draws everything except for gym leader faces / badges DrawTrainerInfo: @@ -506,7 +523,7 @@ DrawTrainerInfo: ld de, vChars2 tile $20 ld bc, 8 * 8 tiles ld a, BANK(GymLeaderFaceAndBadgeTileGraphics) - call FarCopyData2 + call FarCopyData ld hl, TextBoxGraphics ld de, 13 tiles add hl, de ; hl = colon tile pattern @@ -514,7 +531,7 @@ DrawTrainerInfo: ld bc, 1 tiles ld a, BANK(TextBoxGraphics) push bc - call FarCopyData2 + call FarCopyData pop bc ld hl, TrainerInfoTextBoxTileGraphics tile 8 ; background tile pattern ld de, vChars1 tile $57 @@ -566,7 +583,7 @@ DrawTrainerInfo: TrainerInfo_FarCopyData: ld a, BANK(TrainerInfoTextBoxTileGraphics) - jp FarCopyData2 + jp FarCopyData TrainerInfo_NameMoneyTimeText: db "NAME/" |