diff options
author | dannye <33dannye@gmail.com> | 2020-11-04 00:06:44 -0600 |
---|---|---|
committer | dannye <33dannye@gmail.com> | 2020-11-04 00:06:44 -0600 |
commit | 5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch) | |
tree | dde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /scripts | |
parent | 53fcd05aa24693093d8af1dc8ec4fedd3957decc (diff) |
Sync with pokered
Diffstat (limited to 'scripts')
247 files changed, 6864 insertions, 9235 deletions
diff --git a/scripts/AgathasRoom.asm b/scripts/AgathasRoom.asm index 20245166..9aa957f5 100755 --- a/scripts/AgathasRoom.asm +++ b/scripts/AgathasRoom.asm @@ -64,8 +64,8 @@ AgathaScript0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyPressed], a - ld [hJoyHeld], a + ldh [hJoyPressed], a + ldh [hJoyHeld], a ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesIndex], a ld a, [wCoordIndex] @@ -75,7 +75,7 @@ AgathaScript0: jr z, AgathaScriptWalkIntoRoom .stopPlayerFromLeaving ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ; "Don't run away!" ld a, D_UP ld [wSimulatedJoypadStatesEnd], a @@ -88,11 +88,11 @@ AgathaScript0: ret AgathaEntranceCoords: - db $0A,$04 - db $0A,$05 - db $0B,$04 - db $0B,$05 - db $FF + dbmapcoord 4, 10 + dbmapcoord 5, 10 + dbmapcoord 4, 11 + dbmapcoord 5, 11 + db -1 ; end AgathaScript3: ld a, [wSimulatedJoypadStatesIndex] @@ -111,7 +111,7 @@ AgathaScript2: cp $ff jp z, ResetAgathaScript ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wChampionsRoomCurScript], a @@ -122,34 +122,27 @@ AgathasRoom_TextPointers: dw AgathaDontRunAwayText AgathaTrainerHeader0: - dbEventFlagBit EVENT_BEAT_AGATHAS_ROOM_TRAINER_0 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_AGATHAS_ROOM_TRAINER_0 - dw AgathaBeforeBattleText ; TextBeforeBattle - dw AgathaAfterBattleText ; TextAfterBattle - dw AgathaEndBattleText ; TextEndBattle - dw AgathaEndBattleText ; TextEndBattle - - db $ff + trainer EVENT_BEAT_AGATHAS_ROOM_TRAINER_0, 0, AgathaBeforeBattleText, AgathaEndBattleText, AgathaAfterBattleText + db -1 ; end AgathaText1: - TX_ASM + text_asm ld hl, AgathaTrainerHeader0 call TalkToTrainer jp TextScriptEnd AgathaBeforeBattleText: - TX_FAR _AgathaBeforeBattleText - db "@" + text_far _AgathaBeforeBattleText + text_end AgathaEndBattleText: - TX_FAR _AgathaEndBattleText - db "@" + text_far _AgathaEndBattleText + text_end AgathaAfterBattleText: - TX_FAR _AgathaAfterBattleText - db "@" + text_far _AgathaAfterBattleText + text_end AgathaDontRunAwayText: - TX_FAR _AgathaDontRunAwayText - db "@" + text_far _AgathaDontRunAwayText + text_end diff --git a/scripts/BeachHouse.asm b/scripts/BeachHouse.asm index 6a67c7ab..2059f59d 100644 --- a/scripts/BeachHouse.asm +++ b/scripts/BeachHouse.asm @@ -11,7 +11,7 @@ BeachHouse_TextPointers: dw BeachHouseSign4Text SurfinDudeText: - TX_ASM + text_asm ld a, [wd472] bit 6, a jr nz, .next @@ -35,7 +35,7 @@ SurfinDudeText: jr nz, .asm_f226b ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - callba SurfingPikachuMinigame + farcall SurfingPikachuMinigame ld hl, wd492 set 1, [hl] jr .done @@ -46,20 +46,20 @@ SurfinDudeText: jp TextScriptEnd .SurfinDudeText1 - TX_FAR _SurfinDudeText1 - db "@" + text_far _SurfinDudeText1 + text_end .SurfinDudeText2 - TX_FAR _SurfinDudeText2 - db "@" + text_far _SurfinDudeText2 + text_end .SurfinDudeText3 - TX_FAR _SurfinDudeText3 - db "@" + text_far _SurfinDudeText3 + text_end .SurfinDudeText4 - TX_FAR _SurfinDudeText4 - db "@" + text_far _SurfinDudeText4 + text_end BeachHousePikachuText: - TX_ASM + text_asm ld hl, .BeachHousePikachuText call PrintText ld a, PIKACHU @@ -68,11 +68,11 @@ BeachHousePikachuText: jp TextScriptEnd .BeachHousePikachuText - TX_FAR _BeachHousePikachuText - db "@" + text_far _BeachHousePikachuText + text_end BeachHouseSign1Text: - TX_ASM + text_asm ld hl, .BeachHouseSign1Text2 ld a, [wd472] bit 6, a @@ -83,14 +83,14 @@ BeachHouseSign1Text: jp TextScriptEnd .BeachHouseSign1Text1 - TX_FAR _BeachHouseSign1Text1 - db "@" + text_far _BeachHouseSign1Text1 + text_end .BeachHouseSign1Text2 - TX_FAR _BeachHouseSign1Text2 - db "@" + text_far _BeachHouseSign1Text2 + text_end BeachHouseSign2Text: - TX_ASM + text_asm ld hl, .BeachHouseSign2Text2 ld a, [wd472] bit 6, a @@ -101,14 +101,14 @@ BeachHouseSign2Text: jp TextScriptEnd .BeachHouseSign2Text1 - TX_FAR _BeachHouseSign2Text1 - db "@" + text_far _BeachHouseSign2Text1 + text_end .BeachHouseSign2Text2 - TX_FAR _BeachHouseSign2Text2 - db "@" + text_far _BeachHouseSign2Text2 + text_end BeachHouseSign3Text: - TX_ASM + text_asm ld hl, .BeachHouseSign3Text2 ld a, [wd472] bit 6, a @@ -119,14 +119,14 @@ BeachHouseSign3Text: jp TextScriptEnd .BeachHouseSign3Text1 - TX_FAR _BeachHouseSign3Text1 - db "@" + text_far _BeachHouseSign3Text1 + text_end .BeachHouseSign3Text2 - TX_FAR _BeachHouseSign3Text2 - db "@" + text_far _BeachHouseSign3Text2 + text_end BeachHouseSign4Text: - TX_ASM + text_asm ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, [wd472] @@ -158,7 +158,7 @@ BeachHouseSign4Text: set 6, [hl] xor a ld [wUpdateSpritesEnabled], a - callab Printer_PrepareSurfingMinigameHighScoreTileMap + callfar Printer_PrepareSurfingMinigameHighScoreTileMap call WaitForTextScrollButtonPress ld hl, wd730 res 6, [hl] @@ -178,14 +178,16 @@ BeachHouseSign4Text: jp TextScriptEnd .BeachHousePrinterText1 - TX_FAR _BeachHousePrinterText1 - db $d, "@" + text_far _BeachHousePrinterText1 + text_waitbutton + text_end .BeachHousePrinterText2 - TX_FAR _BeachHousePrinterText2 - db $d, "@" + text_far _BeachHousePrinterText2 + text_waitbutton + text_end .BeachHousePrinterText3 - TX_FAR _BeachHousePrinterText3 - db "@" + text_far _BeachHousePrinterText3 + text_end .BeachHousePrinterText4 - TX_FAR _BeachHousePrinterText4 - db "@" + text_far _BeachHousePrinterText4 + text_end diff --git a/scripts/BeachHouse2.asm b/scripts/BeachHouse2.asm index a5b7e7be..1cf570bc 100755 --- a/scripts/BeachHouse2.asm +++ b/scripts/BeachHouse2.asm @@ -4,7 +4,7 @@ Func_f23d0: ld [wUpdateSpritesEnabled], a ld hl, wd730 set 6, [hl] - callab PrintSurfingMinigameHighScore + callfar PrintSurfingMinigameHighScore ld hl, wd730 res 6, [hl] call GBPalWhiteOutWithDelay3 @@ -14,7 +14,7 @@ Func_f23d0: call Delay3 call GBPalNormal ld hl, Text_f2412 - ld a, [hOaksAideResult] + ldh a, [hOaksAideResult] and a jr nz, .asm_f2406 ld hl, Text_f240c @@ -23,11 +23,11 @@ Func_f23d0: jp TextScriptEnd Text_f240c: - TX_FAR _BeachHousePrinterText5 - TX_WAIT - db "@" + text_far _BeachHousePrinterText5 + text_waitbutton + text_end Text_f2412: - TX_FAR _BeachHousePrinterText6 - TX_WAIT - db "@" + text_far _BeachHousePrinterText6 + text_waitbutton + text_end diff --git a/scripts/BikeShop.asm b/scripts/BikeShop.asm index a554cf7c..e4345e8e 100755 --- a/scripts/BikeShop.asm +++ b/scripts/BikeShop.asm @@ -8,7 +8,7 @@ BikeShop_TextPointers: dw BikeShopText3 BikeShopText1: - TX_ASM + text_asm CheckEvent EVENT_GOT_BICYCLE jr z, .asm_260d4 ld hl, BikeShopText_1d82f @@ -25,8 +25,8 @@ BikeShopText1: call GiveItem jr nc, .BagFull ld a, BIKE_VOUCHER - ld [$ffdb], a - callba RemoveItemByID + ldh [hItemToRemoveID], a + farcall RemoveItemByID SetEvent EVENT_GOT_BICYCLE ld hl, BikeShopText_1d824 call PrintText @@ -53,14 +53,14 @@ BikeShopText1: ld [wTopMenuItemX], a ld hl, wd730 set 6, [hl] - coord hl, 0, 0 + hlcoord 0, 0 lb bc, 4, 15 call TextBoxBorder call UpdateSprites - coord hl, 2, 2 + hlcoord 2, 2 ld de, BikeShopMenuText call PlaceString - coord hl, 8, 3 + hlcoord 8, 3 ld de, BikeShopMenuPrice call PlaceString ld hl, BikeShopText_1d815 @@ -90,50 +90,50 @@ BikeShopMenuPrice: db "¥1000000@" BikeShopText_1d810: - TX_FAR _BikeShopText_1d810 - db "@" + text_far _BikeShopText_1d810 + text_end BikeShopText_1d815: - TX_FAR _BikeShopText_1d815 - db "@" + text_far _BikeShopText_1d815 + text_end BikeShopCantAffordText: - TX_FAR _BikeShopCantAffordText - db "@" + text_far _BikeShopCantAffordText + text_end BikeShopText_1d81f: - TX_FAR _BikeShopText_1d81f - db "@" + text_far _BikeShopText_1d81f + text_end BikeShopText_1d824: - TX_FAR _BikeShopText_1d824 - TX_SFX_KEY_ITEM - db "@" + text_far _BikeShopText_1d824 + sound_get_key_item + text_end BikeShopComeAgainText: - TX_FAR _BikeShopComeAgainText - db "@" + text_far _BikeShopComeAgainText + text_end BikeShopText_1d82f: - TX_FAR _BikeShopText_1d82f - db "@" + text_far _BikeShopText_1d82f + text_end BikeShopText_1d834: - TX_FAR _BikeShopText_1d834 - db "@" + text_far _BikeShopText_1d834 + text_end BikeShopText2: - TX_ASM + text_asm ld hl, BikeShopText_1d843 call PrintText jp TextScriptEnd BikeShopText_1d843: - TX_FAR _BikeShopText_1d843 - db "@" + text_far _BikeShopText_1d843 + text_end BikeShopText3: - TX_ASM + text_asm CheckEvent EVENT_GOT_BICYCLE ld hl, BikeShopText_1d861 jr nz, .asm_34d2d @@ -143,9 +143,9 @@ BikeShopText3: jp TextScriptEnd BikeShopText_1d85c: - TX_FAR _BikeShopText_1d85c - db "@" + text_far _BikeShopText_1d85c + text_end BikeShopText_1d861: - TX_FAR _BikeShopText_1d861 - db "@" + text_far _BikeShopText_1d861 + text_end diff --git a/scripts/BillsHouse.asm b/scripts/BillsHouse.asm index a9e09947..8559c0b1 100755 --- a/scripts/BillsHouse.asm +++ b/scripts/BillsHouse.asm @@ -41,9 +41,9 @@ BillsHouseScript0: ld a, [wd472] bit 7, a jr z, .asm_1e0d2 - callab CheckPikachuFaintedOrStatused + callfar CheckPikachuFaintedOrStatused jr c, .asm_1e0d2 - callab Func_f24d5 + callfar Func_f24d5 .asm_1e0d2 xor a ld [wJoyIgnore], a @@ -63,12 +63,12 @@ BillsHouseScript2: jr nz, .notDown call CheckPikachuFollowingPlayer jr nz, .asm_1e0f8 - callab Func_f250b + callfar Func_f250b .asm_1e0f8 ld de, MovementData_1e7a0 .notDown ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite ld a, $3 ld [wBillsHouseCurScript], a @@ -78,7 +78,7 @@ MovementData_1e79c: db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP - db $FF + db -1 ; end ; make Bill walk around the player MovementData_1e7a0: @@ -87,7 +87,7 @@ MovementData_1e7a0: db NPC_MOVEMENT_UP db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_UP - db $FF + db -1 ; end BillsHouseScript3: ld a, [wd730] @@ -105,7 +105,7 @@ BillsHouseScript3: ld hl, PikachuMovementData_1e152 .asm_1e133 call ApplyPikachuMovementData - callab InitializePikachuTextID + callfar InitializePikachuTextID .asm_1e13e xor a ld [wJoyIgnore], a @@ -144,13 +144,13 @@ BillsHouseScript5: ld a, $2 ld [wSpriteIndex], a ld a, $c - ld [$ffeb], a + ldh [hSpriteScreenYCoord], a ld a, $40 - ld [$ffec], a - ld a, $6 - ld [$ffed], a - ld a, $5 - ld [$ffee], a + ldh [hSpriteScreenXCoord], a + ld a, 6 + ldh [hSpriteMapYCoord], a + ld a, 5 + ldh [hSpriteMapXCoord], a call SetSpritePosition1 ld a, HS_BILL_1 ld [wMissableObjectIndex], a @@ -163,9 +163,9 @@ BillsHouseScript5: call CheckPikachuFollowingPlayer jr z, .asm_1e1c6 ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld hl, PikachuMovementData_1e1a9 call ApplyPikachuMovementData @@ -174,10 +174,10 @@ BillsHouseScript5: ld a, EXCLAMATION_BUBBLE ld [wWhichEmotionBubble], a predef EmotionBubble - callab InitializePikachuTextID + callfar InitializePikachuTextID .asm_1e1c6 ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld de, MovementData_1e807 call MoveSprite ld a, $6 @@ -190,7 +190,7 @@ MovementData_1e807: db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end PikachuMovementData_1e1a9: db $00 @@ -225,7 +225,7 @@ BillsHouseScript7: ret RLE_1e219: - db D_RIGHT,$3 + db D_RIGHT, $3 db $FF BillsHouseScript8: @@ -237,14 +237,14 @@ BillsHouseScript8: ld a, SPRITE_FACING_UP ld [wSpritePlayerStateData1FacingDirection], a ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay xor a ld [wJoyIgnore], a ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $9 ld [wBillsHouseCurScript], a @@ -260,20 +260,20 @@ BillsHouse_TextPointers: dw BillsHouseText4 BillsHouseText4: - TX_FAR _BillsHouseDontLeaveText - db "@" + text_far _BillsHouseDontLeaveText + text_end BillsHouseText1: - TX_ASM - callba Func_f2418 + text_asm + farcall Func_f2418 jp TextScriptEnd BillsHouseText2: - TX_ASM - callba Func_f244a + text_asm + farcall Func_f244a jp TextScriptEnd BillsHouseText3: - TX_ASM - callba Func_f24a2 + text_asm + farcall Func_f24a2 jp TextScriptEnd diff --git a/scripts/BillsHouse2.asm b/scripts/BillsHouse2.asm index ce474004..b1c6e820 100755 --- a/scripts/BillsHouse2.asm +++ b/scripts/BillsHouse2.asm @@ -1,4 +1,4 @@ -Func_f2418: +Func_f2418:: ld hl, BillsHouseText_f243b call PrintText call YesNoChoice @@ -18,18 +18,18 @@ Func_f2418: jr .asm_f2427 BillsHouseText_f243b: - TX_FAR _BillsHouseText_1e865 - db "@" + text_far _BillsHouseText_1e865 + text_end BillsHouseText_f2440: - TX_FAR _BillsHouseText_1e86a - db "@" + text_far _BillsHouseText_1e86a + text_end BillsHouseText_f2445: - TX_FAR _BillsHouseText_1e86f - db "@" + text_far _BillsHouseText_1e86f + text_end -Func_f244a: +Func_f244a:: CheckEvent EVENT_GOT_SS_TICKET jr nz, .asm_f247e ld hl, BillsHouseText_f248c @@ -57,31 +57,31 @@ Func_f244a: ret BillsHouseText_f248c: - TX_FAR _BillThankYouText - db "@" + text_far _BillThankYouText + text_end BillsHouseText_f2491: - TX_FAR _SSTicketReceivedText - TX_SFX_KEY_ITEM - TX_BLINK - db "@" + text_far _SSTicketReceivedText + sound_get_key_item + text_promptbutton + text_end BillsHouseText_f2498: - TX_FAR _SSTicketNoRoomText - db "@" + text_far _SSTicketNoRoomText + text_end BillsHouseText_f249d: - TX_FAR _BillsHouseText_1e8cb - db "@" + text_far _BillsHouseText_1e8cb + text_end -Func_f24a2: +Func_f24a2:: ld hl, BillsHouseText_f24a9 call PrintText ret BillsHouseText_f24a9: - TX_FAR _BillsHouseText_1e8da - db "@" + text_far _BillsHouseText_1e8da + text_end Func_f24ae: ld a, [wCurMap] @@ -106,7 +106,7 @@ Func_f24ae: ld e, $ff ret -Func_f24d5: +Func_f24d5:: ld a, $ff ld [wJoyIgnore], a xor a @@ -121,7 +121,7 @@ Func_f24d5: ld [wWhichEmotionBubble], a predef EmotionBubble call DisablePikachuFollowingPlayer - callab InitializePikachuTextID + callfar InitializePikachuTextID ret Data_f2505: @@ -132,7 +132,7 @@ Data_f2505: db $1e db $3f -Func_f250b: +Func_f250b:: ld hl, Data_f251c ld b, SPRITE_FACING_UP call TryApplyPikachuMovementData diff --git a/scripts/BluesHouse.asm b/scripts/BluesHouse.asm index 471e6989..9d9bf33a 100755 --- a/scripts/BluesHouse.asm +++ b/scripts/BluesHouse.asm @@ -11,75 +11,76 @@ BluesHouse_ScriptPointers: BluesHouseScript0: SetEvent EVENT_ENTERED_BLUES_HOUSE - - ; trigger the next script - ld a, 1 + ld a, $1 ld [wBluesHouseCurScript], a BluesHouseScript1: ret BluesHouse_TextPointers: - dw BluesHouseText1 - dw BluesHouseText2 - dw BluesHouseText3 + dw BluesHouseDaisySittingText + dw BluesHouseDaisyWalkingText + dw BluesHouseTownMapText -BluesHouseText1: - TX_ASM +BluesHouseDaisySittingText: + text_asm CheckEvent EVENT_GOT_TOWN_MAP - jr nz, .GotMap + jr nz, .got_town_map CheckEvent EVENT_GOT_POKEDEX - jr nz, .GiveMap + jr nz, .give_town_map ld hl, DaisyInitialText call PrintText jr .done -.GiveMap + +.give_town_map ld hl, DaisyOfferMapText call PrintText lb bc, TOWN_MAP, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld a, HS_TOWN_MAP ld [wMissableObjectIndex], a - predef HideObject ; hide table map object + predef HideObject ld hl, GotMapText call PrintText SetEvent EVENT_GOT_TOWN_MAP jr .done -.GotMap + +.got_town_map ld hl, DaisyUseMapText call PrintText jr .done -.BagFull + +.bag_full ld hl, DaisyBagFullText call PrintText .done jp TextScriptEnd DaisyInitialText: - TX_FAR _DaisyInitialText - db "@" + text_far _DaisyInitialText + text_end DaisyOfferMapText: - TX_FAR _DaisyOfferMapText - db "@" + text_far _DaisyOfferMapText + text_end GotMapText: - TX_FAR _GotMapText - TX_SFX_KEY_ITEM - db "@" + text_far _GotMapText + sound_get_key_item + text_end DaisyBagFullText: - TX_FAR _DaisyBagFullText - db "@" + text_far _DaisyBagFullText + text_end DaisyUseMapText: - TX_FAR _DaisyUseMapText - db "@" + text_far _DaisyUseMapText + text_end -BluesHouseText2: ; Daisy, walking around - TX_FAR _BluesHouseText2 - db "@" +BluesHouseDaisyWalkingText: + text_far _BluesHouseDaisyWalkingText + text_end -BluesHouseText3: ; map on table - TX_FAR _BluesHouseText3 - db "@" +BluesHouseTownMapText: + text_far _BluesHouseTownMapText + text_end diff --git a/scripts/BrunosRoom.asm b/scripts/BrunosRoom.asm index a525e5bb..e5ecc1af 100755 --- a/scripts/BrunosRoom.asm +++ b/scripts/BrunosRoom.asm @@ -64,8 +64,8 @@ BrunoScript0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyPressed], a - ld [hJoyHeld], a + ldh [hJoyPressed], a + ldh [hJoyHeld], a ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesIndex], a ld a, [wCoordIndex] @@ -75,7 +75,7 @@ BrunoScript0: jr z, BrunoScriptWalkIntoRoom .stopPlayerFromLeaving ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ; "Don't run away!" ld a, D_UP ld [wSimulatedJoypadStatesEnd], a @@ -88,11 +88,11 @@ BrunoScript0: ret BrunoEntranceCoords: - db $0A,$04 - db $0A,$05 - db $0B,$04 - db $0B,$05 - db $FF + dbmapcoord 4, 10 + dbmapcoord 5, 10 + dbmapcoord 4, 11 + dbmapcoord 5, 11 + db -1 ; end BrunoScript3: ld a, [wSimulatedJoypadStatesIndex] @@ -111,7 +111,7 @@ BrunoScript2: cp $ff jp z, ResetBrunoScript ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID BrunosRoom_TextPointers: @@ -119,34 +119,27 @@ BrunosRoom_TextPointers: dw BrunoDontRunAwayText BrunoTrainerHeader0: - dbEventFlagBit EVENT_BEAT_BRUNOS_ROOM_TRAINER_0 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_BRUNOS_ROOM_TRAINER_0 - dw BrunoBeforeBattleText ; TextBeforeBattle - dw BrunoAfterBattleText ; TextAfterBattle - dw BrunoEndBattleText ; TextEndBattle - dw BrunoEndBattleText ; TextEndBattle - - db $ff + trainer EVENT_BEAT_BRUNOS_ROOM_TRAINER_0, 0, BrunoBeforeBattleText, BrunoEndBattleText, BrunoAfterBattleText + db -1 ; end BrunoText1: - TX_ASM + text_asm ld hl, BrunoTrainerHeader0 call TalkToTrainer jp TextScriptEnd BrunoBeforeBattleText: - TX_FAR _BrunoBeforeBattleText - db "@" + text_far _BrunoBeforeBattleText + text_end BrunoEndBattleText: - TX_FAR _BrunoEndBattleText - db "@" + text_far _BrunoEndBattleText + text_end BrunoAfterBattleText: - TX_FAR _BrunoAfterBattleText - db "@" + text_far _BrunoAfterBattleText + text_end BrunoDontRunAwayText: - TX_FAR _BrunoDontRunAwayText - db "@" + text_far _BrunoDontRunAwayText + text_end diff --git a/scripts/CeladonChiefHouse.asm b/scripts/CeladonChiefHouse.asm index fc37bd4d..ad604b98 100755 --- a/scripts/CeladonChiefHouse.asm +++ b/scripts/CeladonChiefHouse.asm @@ -8,13 +8,13 @@ CeladonChiefHouse_TextPointers: dw CeladonHouseText3 CeladonHouseText1: - TX_FAR _CeladonHouseText1 - db "@" + text_far _CeladonHouseText1 + text_end CeladonHouseText2: - TX_FAR _CeladonHouseText2 - db "@" + text_far _CeladonHouseText2 + text_end CeladonHouseText3: - TX_FAR _CeladonHouseText3 - db "@" + text_far _CeladonHouseText3 + text_end diff --git a/scripts/CeladonCity.asm b/scripts/CeladonCity.asm index bd49f5af..b6280980 100755 --- a/scripts/CeladonCity.asm +++ b/scripts/CeladonCity.asm @@ -34,28 +34,28 @@ CeladonCity_TextPointers: dw CeladonCityText18 CeladonCityText1: - TX_FAR _CeladonCityText1 - db "@" + text_far _CeladonCityText1 + text_end CeladonCityText2: - TX_FAR _CeladonCityText2 - db "@" + text_far _CeladonCityText2 + text_end CeladonCityText3: - TX_FAR _CeladonCityText3 - db "@" + text_far _CeladonCityText3 + text_end CeladonCityText4: - TX_FAR _CeladonCityText4 - db "@" + text_far _CeladonCityText4 + text_end CeladonCityText5: - TX_ASM + text_asm CheckEvent EVENT_GOT_TM41 jr nz, .asm_7053f ld hl, TM41PreText call PrintText - lb bc, TM_41, 1 + lb bc, TM_SOFTBOILED, 1 call GiveItem jr c, .Success ld hl, TM41NoRoomText @@ -73,70 +73,70 @@ CeladonCityText5: jp TextScriptEnd TM41PreText: - TX_FAR _TM41PreText - db "@" + text_far _TM41PreText + text_end ReceivedTM41Text: - TX_FAR _ReceivedTM41Text - TX_SFX_ITEM_1 - db "@" + text_far _ReceivedTM41Text + sound_get_item_1 + text_end TM41ExplanationText: - TX_FAR _TM41ExplanationText - db "@" + text_far _TM41ExplanationText + text_end TM41NoRoomText: - TX_FAR _TM41NoRoomText - db "@" + text_far _TM41NoRoomText + text_end CeladonCityText6: - TX_FAR _CeladonCityText6 - db "@" + text_far _CeladonCityText6 + text_end CeladonCityText7: - TX_FAR _CeladonCityText7 - TX_ASM + text_far _CeladonCityText7 + text_asm ld a, POLIWRATH call PlayCry jp TextScriptEnd CeladonCityText8: - TX_FAR _CeladonCityText8 - db "@" + text_far _CeladonCityText8 + text_end CeladonCityText9: - TX_FAR _CeladonCityText9 - db "@" + text_far _CeladonCityText9 + text_end CeladonCityText10: - TX_ASM - callba Func_f1ac6 + text_asm + farcall Func_f1ac6 jp TextScriptEnd CeladonCityText11: - TX_FAR _CeladonCityText11 - db "@" + text_far _CeladonCityText11 + text_end CeladonCityText13: - TX_FAR _CeladonCityText13 - db "@" + text_far _CeladonCityText13 + text_end CeladonCityText14: - TX_FAR _CeladonCityText14 - db "@" + text_far _CeladonCityText14 + text_end CeladonCityText15: - TX_FAR _CeladonCityText15 - db "@" + text_far _CeladonCityText15 + text_end CeladonCityText16: - TX_FAR _CeladonCityText16 - db "@" + text_far _CeladonCityText16 + text_end CeladonCityText17: - TX_FAR _CeladonCityText17 - db "@" + text_far _CeladonCityText17 + text_end CeladonCityText18: - TX_FAR _CeladonCityText18 - db "@" + text_far _CeladonCityText18 + text_end diff --git a/scripts/CeladonCity2.asm b/scripts/CeladonCity2.asm index 12f7b366..56824c9a 100755 --- a/scripts/CeladonCity2.asm +++ b/scripts/CeladonCity2.asm @@ -1,8 +1,8 @@ -Func_f1ac6: +Func_f1ac6:: ld hl, Text_f1acd call PrintText ret Text_f1acd: - TX_FAR _CeladonCityText10 - db "@" + text_far _CeladonCityText10 + text_end diff --git a/scripts/CeladonDiner.asm b/scripts/CeladonDiner.asm index f444ec15..b4936e75 100755 --- a/scripts/CeladonDiner.asm +++ b/scripts/CeladonDiner.asm @@ -10,22 +10,22 @@ CeladonDiner_TextPointers: dw CeladonDinerText5 CeladonDinerText1: - TX_FAR _CeladonDinerText1 - db "@" + text_far _CeladonDinerText1 + text_end CeladonDinerText2: - TX_FAR _CeladonDinerText2 - db "@" + text_far _CeladonDinerText2 + text_end CeladonDinerText3: - TX_FAR _CeladonDinerText3 - db "@" + text_far _CeladonDinerText3 + text_end CeladonDinerText4: - TX_FAR _CeladonDinerText4 - db "@" + text_far _CeladonDinerText4 + text_end CeladonDinerText5: - TX_ASM - callab Func_f1f31 + text_asm + callfar Func_f1f31 jp TextScriptEnd diff --git a/scripts/CeladonDiner2.asm b/scripts/CeladonDiner2.asm index 8cd66a19..ceef9f52 100755 --- a/scripts/CeladonDiner2.asm +++ b/scripts/CeladonDiner2.asm @@ -1,38 +1,38 @@ -Func_f1f31: +Func_f1f31:: CheckEvent EVENT_GOT_COIN_CASE - jr nz, .asm_eb14d + jr nz, .got_item ld hl, CeladonDinerText_491a7 call PrintText lb bc, COIN_CASE, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full SetEvent EVENT_GOT_COIN_CASE ld hl, ReceivedCoinCaseText call PrintText - jr .asm_68b61 -.BagFull + jr .done +.bag_full ld hl, CoinCaseNoRoomText call PrintText - jr .asm_68b61 -.asm_eb14d + jr .done +.got_item ld hl, CeladonDinerText_491b7 call PrintText -.asm_68b61 +.done ret CeladonDinerText_491a7: - TX_FAR _CeladonDinerText_491a7 - db "@" + text_far _CeladonDinerText_491a7 + text_end ReceivedCoinCaseText: - TX_FAR _ReceivedCoinCaseText - TX_SFX_KEY_ITEM - db "@" + text_far _ReceivedCoinCaseText + sound_get_key_item + text_end CoinCaseNoRoomText: - TX_FAR _CoinCaseNoRoomText - db "@" + text_far _CoinCaseNoRoomText + text_end CeladonDinerText_491b7: - TX_FAR _CeladonDinerText_491b7 - db "@" + text_far _CeladonDinerText_491b7 + text_end diff --git a/scripts/CeladonGym.asm b/scripts/CeladonGym.asm index 50c02196..2b695819 100755 --- a/scripts/CeladonGym.asm +++ b/scripts/CeladonGym.asm @@ -2,7 +2,7 @@ CeladonGym_Script: ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] - call nz, CeladonGymScript_48927 + call nz, .LoadNames call EnableAutoTextBoxDrawing ld hl, CeladonGymTrainerHeader0 ld de, CeladonGym_ScriptPointers @@ -11,15 +11,15 @@ CeladonGym_Script: ld [wCeladonGymCurScript], a ret -CeladonGymScript_48927: - ld hl, Gym4CityName - ld de, Gym4LeaderName +.LoadNames: + ld hl, .CityName + ld de, .LeaderName jp LoadGymLeaderAndCityName -Gym4CityName: +.CityName: db "CELADON CITY@" -Gym4LeaderName: +.LeaderName: db "ERIKA@" CeladonGymText_48943: @@ -44,26 +44,26 @@ CeladonGymScript3: CeladonGymText_48963: ld a, $9 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_ERIKA - lb bc, TM_21, 1 + lb bc, TM_MEGA_DRAIN, 1 call GiveItem jr nc, .BagFull ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM21 jr .gymVictory .BagFull ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges - set 3, [hl] + set BIT_RAINBOWBADGE, [hl] ld hl, wBeatGymFlags - set 3, [hl] + set BIT_RAINBOWBADGE, [hl] ; deactivate gym trainers SetEventRange EVENT_BEAT_CELADON_GYM_TRAINER_0, EVENT_BEAT_CELADON_GYM_TRAINER_6 @@ -84,72 +84,23 @@ CeladonGym_TextPointers: dw TM21NoRoomText CeladonGymTrainerHeader0: - dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_0 - dw CeladonGymBattleText2 ; TextBeforeBattle - dw CeladonGymAfterBattleText2 ; TextAfterBattle - dw CeladonGymEndBattleText2 ; TextEndBattle - dw CeladonGymEndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_CELADON_GYM_TRAINER_0, 2, CeladonGymBattleText2, CeladonGymEndBattleText2, CeladonGymAfterBattleText2 CeladonGymTrainerHeader1: - dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_1 - dw CeladonGymBattleText3 ; TextBeforeBattle - dw CeladonGymAfterBattleText3 ; TextAfterBattle - dw CeladonGymEndBattleText3 ; TextEndBattle - dw CeladonGymEndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_CELADON_GYM_TRAINER_1, 2, CeladonGymBattleText3, CeladonGymEndBattleText3, CeladonGymAfterBattleText3 CeladonGymTrainerHeader2: - dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_2 - dw CeladonGymBattleText4 ; TextBeforeBattle - dw CeladonGymAfterBattleText4 ; TextAfterBattle - dw CeladonGymEndBattleText4 ; TextEndBattle - dw CeladonGymEndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_CELADON_GYM_TRAINER_2, 4, CeladonGymBattleText4, CeladonGymEndBattleText4, CeladonGymAfterBattleText4 CeladonGymTrainerHeader3: - dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_3 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_3 - dw CeladonGymBattleText5 ; TextBeforeBattle - dw CeladonGymAfterBattleText5 ; TextAfterBattle - dw CeladonGymEndBattleText5 ; TextEndBattle - dw CeladonGymEndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_CELADON_GYM_TRAINER_3, 4, CeladonGymBattleText5, CeladonGymEndBattleText5, CeladonGymAfterBattleText5 CeladonGymTrainerHeader4: - dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_4 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_4 - dw CeladonGymBattleText6 ; TextBeforeBattle - dw CeladonGymAfterBattleText6 ; TextAfterBattle - dw CeladonGymEndBattleText6 ; TextEndBattle - dw CeladonGymEndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_CELADON_GYM_TRAINER_4, 2, CeladonGymBattleText6, CeladonGymEndBattleText6, CeladonGymAfterBattleText6 CeladonGymTrainerHeader5: - dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_5 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_5 - dw CeladonGymBattleText7 ; TextBeforeBattle - dw CeladonGymAfterBattleText7 ; TextAfterBattle - dw CeladonGymEndBattleText7 ; TextEndBattle - dw CeladonGymEndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_CELADON_GYM_TRAINER_5, 2, CeladonGymBattleText7, CeladonGymEndBattleText7, CeladonGymAfterBattleText7 CeladonGymTrainerHeader6: - dbEventFlagBit EVENT_BEAT_CELADON_GYM_TRAINER_6, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_CELADON_GYM_TRAINER_6, 1 - dw CeladonGymBattleText8 ; TextBeforeBattle - dw CeladonGymAfterBattleText8 ; TextAfterBattle - dw CeladonGymEndBattleText8 ; TextEndBattle - dw CeladonGymEndBattleText8 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_CELADON_GYM_TRAINER_6, 1, 3, CeladonGymBattleText8, CeladonGymEndBattleText8, CeladonGymAfterBattleText8 + db -1 ; end CeladonGymText1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_ERIKA jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM21 @@ -170,7 +121,7 @@ CeladonGymText1: ld hl, CeladonGymText_48a63 ld de, CeladonGymText_48a63 call SaveEndBattleTextPointers - ld a, [H_SPRITEINDEX] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -183,153 +134,153 @@ CeladonGymText1: jp TextScriptEnd CeladonGymText_48a5e: - TX_FAR _CeladonGymText_48a5e - db "@" + text_far _CeladonGymText_48a5e + text_end CeladonGymText_48a63: - TX_FAR _CeladonGymText_48a63 - db "@" + text_far _CeladonGymText_48a63 + text_end CeladonGymText_48a68: - TX_FAR _CeladonGymText_48a68 - db "@" + text_far _CeladonGymText_48a68 + text_end CeladonGymText9: - TX_FAR _CeladonGymText9 - db "@" + text_far _CeladonGymText9 + text_end TM21Text: - TX_FAR _ReceivedTM21Text - TX_SFX_ITEM_1 - TX_FAR _TM21ExplanationText - db "@" + text_far _ReceivedTM21Text + sound_get_item_1 + text_far _TM21ExplanationText + text_end TM21NoRoomText: - TX_FAR _TM21NoRoomText - db "@" + text_far _TM21NoRoomText + text_end CeladonGymText2: - TX_ASM + text_asm ld hl, CeladonGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd CeladonGymBattleText2: - TX_FAR _CeladonGymBattleText2 - db "@" + text_far _CeladonGymBattleText2 + text_end CeladonGymEndBattleText2: - TX_FAR _CeladonGymEndBattleText2 - db "@" + text_far _CeladonGymEndBattleText2 + text_end CeladonGymAfterBattleText2: - TX_FAR _CeladonGymAfterBattleText2 - db "@" + text_far _CeladonGymAfterBattleText2 + text_end CeladonGymText3: - TX_ASM + text_asm ld hl, CeladonGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd CeladonGymBattleText3: - TX_FAR _CeladonGymBattleText3 - db "@" + text_far _CeladonGymBattleText3 + text_end CeladonGymEndBattleText3: - TX_FAR _CeladonGymEndBattleText3 - db "@" + text_far _CeladonGymEndBattleText3 + text_end CeladonGymAfterBattleText3: - TX_FAR _CeladonGymAfterBattleText3 - db "@" + text_far _CeladonGymAfterBattleText3 + text_end CeladonGymText4: - TX_ASM + text_asm ld hl, CeladonGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd CeladonGymBattleText4: - TX_FAR _CeladonGymBattleText4 - db "@" + text_far _CeladonGymBattleText4 + text_end CeladonGymEndBattleText4: - TX_FAR _CeladonGymEndBattleText4 - db "@" + text_far _CeladonGymEndBattleText4 + text_end CeladonGymAfterBattleText4: - TX_FAR _CeladonGymAfterBattleText4 - db "@" + text_far _CeladonGymAfterBattleText4 + text_end CeladonGymText5: - TX_ASM + text_asm ld hl, CeladonGymTrainerHeader3 call TalkToTrainer jp TextScriptEnd CeladonGymBattleText5: - TX_FAR _CeladonGymBattleText5 - db "@" + text_far _CeladonGymBattleText5 + text_end CeladonGymEndBattleText5: - TX_FAR _CeladonGymEndBattleText5 - db "@" + text_far _CeladonGymEndBattleText5 + text_end CeladonGymAfterBattleText5: - TX_FAR _CeladonGymAfterBattleText5 - db "@" + text_far _CeladonGymAfterBattleText5 + text_end CeladonGymText6: - TX_ASM + text_asm ld hl, CeladonGymTrainerHeader4 call TalkToTrainer jp TextScriptEnd CeladonGymBattleText6: - TX_FAR _CeladonGymBattleText6 - db "@" + text_far _CeladonGymBattleText6 + text_end CeladonGymEndBattleText6: - TX_FAR _CeladonGymEndBattleText6 - db "@" + text_far _CeladonGymEndBattleText6 + text_end CeladonGymAfterBattleText6: - TX_FAR _CeladonGymAfterBattleText6 - db "@" + text_far _CeladonGymAfterBattleText6 + text_end CeladonGymText7: - TX_ASM + text_asm ld hl, CeladonGymTrainerHeader5 call TalkToTrainer jp TextScriptEnd CeladonGymBattleText7: - TX_FAR _CeladonGymBattleText7 - db "@" + text_far _CeladonGymBattleText7 + text_end CeladonGymEndBattleText7: - TX_FAR _CeladonGymEndBattleText7 - db "@" + text_far _CeladonGymEndBattleText7 + text_end CeladonGymAfterBattleText7: - TX_FAR _CeladonGymAfterBattleText7 - db "@" + text_far _CeladonGymAfterBattleText7 + text_end CeladonGymText8: - TX_ASM + text_asm ld hl, CeladonGymTrainerHeader6 call TalkToTrainer jp TextScriptEnd CeladonGymBattleText8: - TX_FAR _CeladonGymBattleText8 - db "@" + text_far _CeladonGymBattleText8 + text_end CeladonGymEndBattleText8: - TX_FAR _CeladonGymEndBattleText8 - db "@" + text_far _CeladonGymEndBattleText8 + text_end CeladonGymAfterBattleText8: - TX_FAR _CeladonGymAfterBattleText8 - db "@" + text_far _CeladonGymAfterBattleText8 + text_end diff --git a/scripts/CeladonHotel.asm b/scripts/CeladonHotel.asm index ee4e140c..2cdd95b0 100755 --- a/scripts/CeladonHotel.asm +++ b/scripts/CeladonHotel.asm @@ -7,13 +7,13 @@ CeladonHotel_TextPointers: dw CeladonHotelText3 CeladonHotelText1: - TX_FAR _CeladonHotelText1 - db "@" + text_far _CeladonHotelText1 + text_end CeladonHotelText2: - TX_FAR _CeladonHotelText2 - db "@" + text_far _CeladonHotelText2 + text_end CeladonHotelText3: - TX_FAR _CeladonHotelText3 - db "@" + text_far _CeladonHotelText3 + text_end diff --git a/scripts/CeladonMansion1F.asm b/scripts/CeladonMansion1F.asm index 1d7c37b4..61d53da7 100755 --- a/scripts/CeladonMansion1F.asm +++ b/scripts/CeladonMansion1F.asm @@ -10,39 +10,39 @@ CeladonMansion1F_TextPointers: dw CeladonMansion1Text5 CeladonMansion1Text1: - TX_FAR _CeladonMansion1Text1 - TX_ASM + text_far _CeladonMansion1Text1 + text_asm ld a, MEOWTH call PlayCry jp TextScriptEnd CeladonMansion1Text2: - TX_ASM - callba Func_f1e70 + text_asm + farcall Func_f1e70 ld a, [wPikachuHappiness] cp 251 jr c, .asm_485d9 ld c, 50 call DelayFrames ldpikacry e, PikachuCry23 - callab PlayPikachuSoundClip + callfar PlayPikachuSoundClip .asm_485d9 jp TextScriptEnd CeladonMansion1Text3: - TX_FAR _CeladonMansion1Text3 - TX_ASM + text_far _CeladonMansion1Text3 + text_asm ld a, CLEFAIRY call PlayCry jp TextScriptEnd CeladonMansion1Text4: - TX_FAR _CeladonMansion1Text4 - TX_ASM + text_far _CeladonMansion1Text4 + text_asm ld a, NIDORAN_F call PlayCry jp TextScriptEnd CeladonMansion1Text5: - TX_FAR _CeladonMansion1Text5 - db "@" + text_far _CeladonMansion1Text5 + text_end diff --git a/scripts/CeladonMansion1F_2.asm b/scripts/CeladonMansion1F_2.asm index cdd56ab8..70bf6c88 100755 --- a/scripts/CeladonMansion1F_2.asm +++ b/scripts/CeladonMansion1F_2.asm @@ -1,9 +1,9 @@ -Func_f1e70: +Func_f1e70:: ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, CeladonMansion1Text_f1e96 call PrintText - callab IsStarterPikachuInOurParty + callfar IsStarterPikachuInOurParty ret nc ld hl, CeladonMansionText_f1e9c call PrintText @@ -14,14 +14,14 @@ Func_f1e70: ret CeladonMansion1Text_f1e96: - TX_FAR _CeladonMansion1Text2 - TX_WAIT - db "@" + text_far _CeladonMansion1Text2 + text_waitbutton + text_end CeladonMansionText_f1e9c: - TX_FAR _CeladonMansion1Text6 - TX_BLINK - db "@" + text_far _CeladonMansion1Text6 + text_promptbutton + text_end Func_f1ea2: ld hl, PikachuHappinessThresholds_f1eb9 @@ -44,7 +44,7 @@ Func_f1ea2: ld l, a ret -PikachuHappinessThresholds_f1eb9 +PikachuHappinessThresholds_f1eb9: dw 51, CeladonMansion1Text_f1ed5 dw 101, CeladonMansion1Text_f1eda dw 131, CeladonMansion1Text_f1edf @@ -54,25 +54,25 @@ PikachuHappinessThresholds_f1eb9 dbbw 0, $ff, CeladonMansion1Text_f1eee CeladonMansion1Text_f1ed5: - TX_FAR _CeladonMansion1Text7 - db "@" + text_far _CeladonMansion1Text7 + text_end CeladonMansion1Text_f1eda: - TX_FAR _CeladonMansion1Text8 - db "@" + text_far _CeladonMansion1Text8 + text_end CeladonMansion1Text_f1edf: - TX_FAR _CeladonMansion1Text9 - db "@" + text_far _CeladonMansion1Text9 + text_end CeladonMansion1Text_f1ee4: - TX_FAR _CeladonMansion1Text10 - db "@" + text_far _CeladonMansion1Text10 + text_end CeladonMansion1Text_f1ee9: - TX_FAR _CeladonMansion1Text11 - db "@" + text_far _CeladonMansion1Text11 + text_end CeladonMansion1Text_f1eee: - TX_FAR _CeladonMansion1Text12 - db "@" + text_far _CeladonMansion1Text12 + text_end diff --git a/scripts/CeladonMansion2F.asm b/scripts/CeladonMansion2F.asm index 9deb606d..8f83e86a 100755 --- a/scripts/CeladonMansion2F.asm +++ b/scripts/CeladonMansion2F.asm @@ -6,5 +6,5 @@ CeladonMansion2F_TextPointers: dw CeladonMansion2Text1 CeladonMansion2Text1: - TX_FAR _CeladonMansion2Text1 - db "@" + text_far _CeladonMansion2Text1 + text_end diff --git a/scripts/CeladonMansion3F.asm b/scripts/CeladonMansion3F.asm index 64a8343b..0cea70cc 100755 --- a/scripts/CeladonMansion3F.asm +++ b/scripts/CeladonMansion3F.asm @@ -20,7 +20,7 @@ CeladonMansion3F_TextPointers: dw GameFreakSignText ProgrammerText: - TX_ASM + text_asm call CeladonMansion3_PokedexCount cp 150 ld hl, CeladonMansion3Text_486f5 @@ -31,15 +31,15 @@ ProgrammerText: jp TextScriptEnd CeladonMansion3Text_486f0: - TX_FAR _ProgrammerText - db "@" + text_far _ProgrammerText + text_end CeladonMansion3Text_486f5: - TX_FAR _ProgrammerText2 - db "@" + text_far _ProgrammerText2 + text_end GraphicArtistText: - TX_ASM + text_asm call CeladonMansion3_PokedexCount cp 150 jr nc, .completed @@ -58,7 +58,7 @@ GraphicArtistText: ld [wUpdateSpritesEnabled], a ld hl, wd730 set 6, [hl] - callab PrintDiploma + callfar PrintDiploma ld hl, wd730 res 6, [hl] call GBPalWhiteOutWithDelay3 @@ -68,7 +68,7 @@ GraphicArtistText: call Delay3 call GBPalNormal ld hl, CeladonMansion3Text_4876b - ld a, [$ffdb] + ldh a, [hCanceledPrinting] and a jr nz, .print ld hl, CeladonMansion3Text_48766 @@ -81,27 +81,27 @@ GraphicArtistText: jp TextScriptEnd CeladonMansion3Text_48757: - TX_FAR _GraphicArtistText - db "@" + text_far _GraphicArtistText + text_end CeladonMansion3Text_4875c: - TX_FAR _GraphicArtistText2 - db "@" + text_far _GraphicArtistText2 + text_end CeladonMansion3Text_48761: - TX_FAR _GraphicArtistText3 - db "@" + text_far _GraphicArtistText3 + text_end CeladonMansion3Text_48766: - TX_FAR _GraphicArtistText4 - db "@" + text_far _GraphicArtistText4 + text_end CeladonMansion3Text_4876b: - TX_FAR _GraphicArtistText5 - db "@" + text_far _GraphicArtistText5 + text_end WriterText: - TX_ASM + text_asm call CeladonMansion3_PokedexCount cp 150 ld hl, CeladonMansion3Text_48789 @@ -112,22 +112,22 @@ WriterText: jp TextScriptEnd CeladonMansion3Text_48784: - TX_FAR _WriterText - db "@" + text_far _WriterText + text_end CeladonMansion3Text_48789: - TX_FAR _WriterText2 - db "@" + text_far _WriterText2 + text_end DirectorText: - TX_ASM + text_asm call CeladonMansion3_PokedexCount ; check pokédex - cp 150 - jr nc, .CompletedDex - ld hl, .GameDesigner + cp NUM_POKEMON - 1 ; discount Mew + jr nc, .completed_dex + ld hl, .GameDesignerText jr .done -.CompletedDex +.completed_dex ld hl, .CompletedDexText call PrintText call Delay3 @@ -138,39 +138,39 @@ DirectorText: call PrintText jp TextScriptEnd -.GameDesigner - TX_FAR _GameDesignerText - db "@" +.GameDesignerText: + text_far _GameDesignerText + text_end -.CompletedDexText - TX_FAR _CompletedDexText - TX_BLINK - TX_ASM - callab DisplayDiploma - ld a, $1 +.CompletedDexText: + text_far _CompletedDexText + text_promptbutton + text_asm + callfar DisplayDiploma + ld a, TRUE ld [wDoNotWaitForButtonPressAfterDisplayingText], a jp TextScriptEnd .UnlockedDiplomaPrinting - TX_FAR _CompletedDexText2 - db "@" + text_far _CompletedDexText2 + text_end GameFreakPCText1: - TX_ASM - callba Func_f1ef3 + text_asm + farcall Func_f1ef3 jp TextScriptEnd GameFreakPCText2: - TX_ASM - callba Func_f1eff + text_asm + farcall Func_f1eff jp TextScriptEnd GameFreakPCText3: - TX_ASM - callba Func_f1f0b + text_asm + farcall Func_f1f0b jp TextScriptEnd GameFreakSignText: - TX_ASM - callba Func_f1f17 + text_asm + farcall Func_f1f17 jp TextScriptEnd diff --git a/scripts/CeladonMansion3F_2.asm b/scripts/CeladonMansion3F_2.asm index 3a7035ba..f0b7c395 100755 --- a/scripts/CeladonMansion3F_2.asm +++ b/scripts/CeladonMansion3F_2.asm @@ -1,35 +1,35 @@ -Func_f1ef3: +Func_f1ef3:: ld hl, CeladonMansion3Text_f1efa call PrintText ret CeladonMansion3Text_f1efa: - TX_FAR _CeladonMansion3Text5 - db "@" + text_far _CeladonMansion3Text5 + text_end -Func_f1eff: +Func_f1eff:: ld hl, CeladonMansion3Text_f1f06 call PrintText ret CeladonMansion3Text_f1f06: - TX_FAR _CeladonMansion3Text6 - db "@" + text_far _CeladonMansion3Text6 + text_end -Func_f1f0b: +Func_f1f0b:: ld hl, CeladonMansion3Text_f1f12 call PrintText ret CeladonMansion3Text_f1f12: - TX_FAR _CeladonMansion3Text7 - db "@" + text_far _CeladonMansion3Text7 + text_end -Func_f1f17: +Func_f1f17:: ld hl, CeladonMansion3Text_f1f1e call PrintText ret CeladonMansion3Text_f1f1e: - TX_FAR _CeladonMansion3Text8 - db "@" + text_far _CeladonMansion3Text8 + text_end diff --git a/scripts/CeladonMansionRoof.asm b/scripts/CeladonMansionRoof.asm index 1813e9ee..47c093dd 100755 --- a/scripts/CeladonMansionRoof.asm +++ b/scripts/CeladonMansionRoof.asm @@ -6,5 +6,5 @@ CeladonMansionRoof_TextPointers: dw CeladonMansion4Text1 CeladonMansion4Text1: - TX_FAR _CeladonMansion4Text1 - db "@" + text_far _CeladonMansion4Text1 + text_end diff --git a/scripts/CeladonMansionRoofHouse.asm b/scripts/CeladonMansionRoofHouse.asm index 8e485352..3b7e3914 100755 --- a/scripts/CeladonMansionRoofHouse.asm +++ b/scripts/CeladonMansionRoofHouse.asm @@ -7,16 +7,16 @@ CeladonMansionRoofHouse_TextPointers: dw CeladonMansion5Text2 CeladonMansion5Text1: - TX_FAR _CeladonMansion5Text1 - db "@" + text_far _CeladonMansion5Text1 + text_end CeladonMansion5Text2: - TX_ASM + text_asm lb bc, EEVEE, 25 call GivePokemon - jr nc, .asm_24365 + jr nc, .party_full ld a, HS_CELADON_MANSION_EEVEE_GIFT ld [wMissableObjectIndex], a predef HideObject -.asm_24365 +.party_full jp TextScriptEnd diff --git a/scripts/CeladonMart1F.asm b/scripts/CeladonMart1F.asm index e84eaae0..54176e01 100755 --- a/scripts/CeladonMart1F.asm +++ b/scripts/CeladonMart1F.asm @@ -8,13 +8,13 @@ CeladonMart1F_TextPointers: dw CeladonMart1Text3 CeladonMart1Text1: - TX_FAR _CeladonMart1Text1 - db "@" + text_far _CeladonMart1Text1 + text_end CeladonMart1Text2: - TX_FAR _CeladonMart1Text2 - db "@" + text_far _CeladonMart1Text2 + text_end CeladonMart1Text3: - TX_FAR _CeladonMart1Text3 - db "@" + text_far _CeladonMart1Text3 + text_end diff --git a/scripts/CeladonMart2F.asm b/scripts/CeladonMart2F.asm index 787c186e..11827128 100755 --- a/scripts/CeladonMart2F.asm +++ b/scripts/CeladonMart2F.asm @@ -9,13 +9,13 @@ CeladonMart2F_TextPointers: dw CeladonMart2Text5 CeladonMart2Text3: - TX_FAR _CeladonMart2Text3 - db "@" + text_far _CeladonMart2Text3 + text_end CeladonMart2Text4: - TX_FAR _CeladonMart2Text4 - db "@" + text_far _CeladonMart2Text4 + text_end CeladonMart2Text5: - TX_FAR _CeladonMart2Text5 - db "@" + text_far _CeladonMart2Text5 + text_end diff --git a/scripts/CeladonMart3F.asm b/scripts/CeladonMart3F.asm index c8a108d7..01ab73ce 100755 --- a/scripts/CeladonMart3F.asm +++ b/scripts/CeladonMart3F.asm @@ -21,55 +21,55 @@ CeladonMart3F_TextPointers: dw CeladonMart3Text17 CeladonMart3Text1: - TX_ASM - callab Func_f1e30 + text_asm + callfar Func_f1e30 jp TextScriptEnd CeladonMart3Text2: - TX_FAR _CeladonMart3Text2 - db "@" + text_far _CeladonMart3Text2 + text_end CeladonMart3Text3: - TX_FAR _CeladonMart3Text3 - db "@" + text_far _CeladonMart3Text3 + text_end CeladonMart3Text4: - TX_FAR _CeladonMart3Text4 - db "@" + text_far _CeladonMart3Text4 + text_end CeladonMart3Text5: - TX_FAR _CeladonMart3Text5 - db "@" + text_far _CeladonMart3Text5 + text_end -CeladonMart3Text12 +CeladonMart3Text12: CeladonMart3Text10: CeladonMart3Text8: CeladonMart3Text6: - TX_FAR _CeladonMart3Text6 - db "@" + text_far _CeladonMart3Text6 + text_end CeladonMart3Text7: - TX_FAR _CeladonMart3Text7 - db "@" + text_far _CeladonMart3Text7 + text_end CeladonMart3Text9: - TX_FAR _CeladonMart3Text9 - db "@" + text_far _CeladonMart3Text9 + text_end CeladonMart3Text11: - TX_FAR _CeladonMart3Text11 - db "@" + text_far _CeladonMart3Text11 + text_end CeladonMart3Text13: - TX_FAR _CeladonMart3Text13 - db "@" + text_far _CeladonMart3Text13 + text_end CeladonMart3Text14: - TX_FAR _CeladonMart3Text14 - db "@" + text_far _CeladonMart3Text14 + text_end CeladonMart3Text17: CeladonMart3Text16: CeladonMart3Text15: - TX_FAR _CeladonMart3Text15 - db "@" + text_far _CeladonMart3Text15 + text_end diff --git a/scripts/CeladonMart3F_2.asm b/scripts/CeladonMart3F_2.asm index 8c99e0e0..239f84d1 100755 --- a/scripts/CeladonMart3F_2.asm +++ b/scripts/CeladonMart3F_2.asm @@ -1,38 +1,36 @@ -Func_f1e30 +Func_f1e30:: CheckEvent EVENT_GOT_TM18 - jr nz, .asm_f1e54 - ld hl, CeladonMart3Text_f1e5b + jr nz, .got_item + ld hl, TM18PreReceiveText call PrintText - lb bc, TM_18, 1 + lb bc, TM_COUNTER, 1 call GiveItem - jr nc, .asm_f1e4f + jr nc, .bag_full SetEvent EVENT_GOT_TM18 - ld hl, CeladonMart3Text_f1e60 - jr .asm_f1e57 - -.asm_f1e4f - ld hl, CeladonMart3Text_f1e6b - jr .asm_f1e57 - -.asm_f1e54 - ld hl, CeladonMart3Text_f1e66 -.asm_f1e57 + ld hl, ReceivedTM18Text + jr .done +.bag_full + ld hl, TM18NoRoomText + jr .done +.got_item + ld hl, TM18ExplanationText +.done call PrintText ret -CeladonMart3Text_f1e5b: - TX_FAR _TM18PreReceiveText - db "@" +TM18PreReceiveText: + text_far _TM18PreReceiveText + text_end -CeladonMart3Text_f1e60: - TX_FAR _ReceivedTM18Text - TX_SFX_ITEM_1 - db "@" +ReceivedTM18Text: + text_far _ReceivedTM18Text + sound_get_item_1 + text_end -CeladonMart3Text_f1e66: - TX_FAR _TM18ExplanationText - db "@" +TM18ExplanationText: + text_far _TM18ExplanationText + text_end -CeladonMart3Text_f1e6b: - TX_FAR _TM18NoRoomText - db "@" +TM18NoRoomText: + text_far _TM18NoRoomText + text_end diff --git a/scripts/CeladonMart4F.asm b/scripts/CeladonMart4F.asm index 20f817e9..1365dd0d 100755 --- a/scripts/CeladonMart4F.asm +++ b/scripts/CeladonMart4F.asm @@ -8,13 +8,13 @@ CeladonMart4F_TextPointers: dw CeladonMart4Text4 CeladonMart4Text2: - TX_FAR _CeladonMart4Text2 - db "@" + text_far _CeladonMart4Text2 + text_end CeladonMart4Text3: - TX_FAR _CeladonMart4Text3 - db "@" + text_far _CeladonMart4Text3 + text_end CeladonMart4Text4: - TX_FAR _CeladonMart4Text4 - db "@" + text_far _CeladonMart4Text4 + text_end diff --git a/scripts/CeladonMart5F.asm b/scripts/CeladonMart5F.asm index 74c590be..a6e97405 100755 --- a/scripts/CeladonMart5F.asm +++ b/scripts/CeladonMart5F.asm @@ -10,13 +10,13 @@ CeladonMart5F_TextPointers: dw CeladonMart5Text5 CeladonMart5Text1: - TX_FAR _CeladonMart5Text1 - db "@" + text_far _CeladonMart5Text1 + text_end CeladonMart5Text2: - TX_FAR _CeladonMart5Text2 - db "@" + text_far _CeladonMart5Text2 + text_end CeladonMart5Text5: - TX_FAR _CeladonMart5Text5 - db "@" + text_far _CeladonMart5Text5 + text_end diff --git a/scripts/CeladonMartElevator.asm b/scripts/CeladonMartElevator.asm index 34b923f9..b657b3f9 100755 --- a/scripts/CeladonMartElevator.asm +++ b/scripts/CeladonMartElevator.asm @@ -40,33 +40,32 @@ CeladonMartElevatorScript_48631: jp CopyData CeladonMartElevatorFloors: - db 5 ; number of elements in list + db 5 ; # db FLOOR_1F db FLOOR_2F db FLOOR_3F db FLOOR_4F db FLOOR_5F - db $FF + db -1 ; end -CeladonMartElevatorWarpMaps: -; first byte is warp number -; second byte is map number ; These specify where the player goes after getting out of the elevator. - db $05, CELADON_MART_1F - db $02, CELADON_MART_2F - db $02, CELADON_MART_3F - db $02, CELADON_MART_4F - db $02, CELADON_MART_5F +CeladonMartElevatorWarpMaps: + ; warp number, map id + db 5, CELADON_MART_1F + db 2, CELADON_MART_2F + db 2, CELADON_MART_3F + db 2, CELADON_MART_4F + db 2, CELADON_MART_5F CeladonMartElevatorWarpMapsEnd: CeladonMartElevatorScript_48654: - jpba ShakeElevator + farjp ShakeElevator CeladonMartElevator_TextPointers: dw CeladonMartElevatorText1 CeladonMartElevatorText1: - TX_ASM + text_asm call CeladonMartElevatorScript_48631 ld hl, CeladonMartElevatorWarpMaps predef DisplayElevatorFloorMenu diff --git a/scripts/CeladonMartRoof.asm b/scripts/CeladonMartRoof.asm index 64871bdd..1d39670d 100755 --- a/scripts/CeladonMartRoof.asm +++ b/scripts/CeladonMartRoof.asm @@ -39,7 +39,7 @@ CeladonMartRoofDrinkList: db FRESH_WATER db SODA_POP db LEMONADE - db $00 + db 0 ; end CeladonMartRoofScript_GiveDrinkToGirl: ld hl, wd730 @@ -65,7 +65,7 @@ CeladonMartRoofScript_GiveDrinkToGirl: dec l ld b, l ld c, 12 - coord hl, 0, 0 + hlcoord 0, 0 call TextBoxBorder call UpdateSprites call CeladonMartRoofScript_PrintDrinksInBag @@ -80,7 +80,7 @@ CeladonMartRoofScript_GiveDrinkToGirl: ld e, a add hl, de ld a, [hl] - ld [hItemToRemoveID], a + ldh [hItemToRemoveID], a cp FRESH_WATER jr z, .gaveFreshWater cp SODA_POP @@ -91,7 +91,7 @@ CeladonMartRoofScript_GiveDrinkToGirl: ld hl, CeladonMartRoofText_48515 call PrintText call RemoveItemByIDBank12 - lb bc, TM_49, 1 + lb bc, TM_TRI_ATTACK, 1 call GiveItem jr nc, .bagFull ld hl, ReceivedTM49Text @@ -104,7 +104,7 @@ CeladonMartRoofScript_GiveDrinkToGirl: ld hl, CeladonMartRoofText_48504 call PrintText call RemoveItemByIDBank12 - lb bc, TM_48, 1 + lb bc, TM_ROCK_SLIDE, 1 call GiveItem jr nc, .bagFull ld hl, CeladonMartRoofText_4850a @@ -117,7 +117,7 @@ CeladonMartRoofScript_GiveDrinkToGirl: ld hl, CeladonMartRoofText_484f3 call PrintText call RemoveItemByIDBank12 - lb bc, TM_13, 1 + lb bc, TM_ICE_BEAM, 1 call GiveItem jr nc, .bagFull ld hl, CeladonMartRoofText_484f9 @@ -134,63 +134,63 @@ CeladonMartRoofScript_GiveDrinkToGirl: ret RemoveItemByIDBank12: - callba RemoveItemByID + farcall RemoveItemByID ret CeladonMartRoofText_484ee: - TX_FAR _CeladonMartRoofText_484ee - db "@" + text_far _CeladonMartRoofText_484ee + text_end CeladonMartRoofText_484f3: - TX_FAR _CeladonMartRoofText_484f3 - TX_WAIT - db "@" + text_far _CeladonMartRoofText_484f3 + text_waitbutton + text_end CeladonMartRoofText_484f9: - TX_FAR _CeladonMartRoofText_484f9 - TX_SFX_ITEM_1 - TX_FAR _CeladonMartRoofText_484fe - TX_WAIT - db "@" + text_far _CeladonMartRoofText_484f9 + sound_get_item_1 + text_far _CeladonMartRoofText_484fe + text_waitbutton + text_end CeladonMartRoofText_48504: - TX_FAR _CeladonMartRoofText_48504 - TX_WAIT - db "@" + text_far _CeladonMartRoofText_48504 + text_waitbutton + text_end CeladonMartRoofText_4850a: - TX_FAR _CeladonMartRoofText_4850a - TX_SFX_ITEM_1 - TX_FAR _CeladonMartRoofText_4850f - TX_WAIT - db "@" + text_far _CeladonMartRoofText_4850a + sound_get_item_1 + text_far _CeladonMartRoofText_4850f + text_waitbutton + text_end CeladonMartRoofText_48515: - TX_FAR _CeladonMartRoofText_48515 - TX_WAIT - db "@" + text_far _CeladonMartRoofText_48515 + text_waitbutton + text_end ReceivedTM49Text: - TX_FAR _ReceivedTM49Text - TX_SFX_ITEM_1 - TX_FAR _CeladonMartRoofText_48520 - TX_WAIT - db "@" + text_far _ReceivedTM49Text + sound_get_item_1 + text_far _CeladonMartRoofText_48520 + text_waitbutton + text_end CeladonMartRoofText_48526: - TX_FAR _CeladonMartRoofText_48526 - TX_WAIT - db "@" + text_far _CeladonMartRoofText_48526 + text_waitbutton + text_end CeladonMartRoofText_4852c: - TX_FAR _CeladonMartRoofText_4852c - TX_WAIT - db "@" + text_far _CeladonMartRoofText_4852c + text_waitbutton + text_end CeladonMartRoofScript_PrintDrinksInBag: ld hl, wFilteredBagItems xor a - ld [hItemCounter], a + ldh [hItemCounter], a .loop ld a, [hli] cp $ff @@ -198,8 +198,8 @@ CeladonMartRoofScript_PrintDrinksInBag: push hl ld [wd11e], a call GetItemName - coord hl, 2, 2 - ld a, [hItemCounter] + hlcoord 2, 2 + ldh a, [hItemCounter] ld bc, SCREEN_WIDTH * 2 call AddNTimes ld de, wcd6d @@ -218,11 +218,11 @@ CeladonMartRoof_TextPointers: dw CeladonMartRoofText6 CeladonMartRoofText1: - TX_FAR _CeladonMartRoofText1 - db "@" + text_far _CeladonMartRoofText1 + text_end CeladonMartRoofText2: - TX_ASM + text_asm call CeladonMartRoofScript_GetDrinksInBag ld a, [wFilteredBagItemsCount] and a @@ -244,16 +244,16 @@ CeladonMartRoofText2: jp TextScriptEnd CeladonMartRoofText3: - TX_FAR _CeladonMartRoofText_48598 - db "@" + text_far _CeladonMartRoofText_48598 + text_end CeladonMartRoofText4: - TX_FAR _CeladonMartRoofText4 - db "@" + text_far _CeladonMartRoofText4 + text_end CeladonMartRoofText5: - TX_VENDING_MACHINE + script_vending_machine CeladonMartRoofText6: - TX_FAR _CeladonMartRoofText6 - db "@" + text_far _CeladonMartRoofText6 + text_end diff --git a/scripts/CeladonPokecenter.asm b/scripts/CeladonPokecenter.asm index 21b9452c..febc21f8 100755 --- a/scripts/CeladonPokecenter.asm +++ b/scripts/CeladonPokecenter.asm @@ -10,20 +10,20 @@ CeladonPokecenter_TextPointers: dw CeladonPokecenterText5 CeladonTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist CeladonHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse CeladonPokecenterText2: - TX_FAR _CeladonPokecenterText2 - db "@" + text_far _CeladonPokecenterText2 + text_end CeladonPokecenterText3: - TX_FAR _CeladonPokecenterText3 - db "@" + text_far _CeladonPokecenterText3 + text_end CeladonPokecenterText5: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/CeruleanBadgeHouse.asm b/scripts/CeruleanBadgeHouse.asm index cab2bf23..5e35b079 100755 --- a/scripts/CeruleanBadgeHouse.asm +++ b/scripts/CeruleanBadgeHouse.asm @@ -1,5 +1,5 @@ CeruleanBadgeHouse_Script: - ld a, $1 + ld a, TRUE ld [wAutoTextBoxDrawingControl], a dec a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -9,7 +9,7 @@ CeruleanBadgeHouse_TextPointers: dw CeruleanHouse2Text1 CeruleanHouse2Text1: - TX_ASM + text_asm ld hl, CeruleanHouse2Text_74e77 call PrintText xor a @@ -34,7 +34,7 @@ CeruleanHouse2Text1: jr c, .asm_74e60 ld hl, TextPointers_74e86 ld a, [wcf91] - sub $15 + sub BOULDERBADGE add a ld d, $0 ld e, a @@ -52,19 +52,28 @@ CeruleanHouse2Text1: jp TextScriptEnd BadgeItemList: - db $8,BOULDERBADGE,CASCADEBADGE,THUNDERBADGE,RAINBOWBADGE,SOULBADGE,MARSHBADGE,VOLCANOBADGE,EARTHBADGE,$FF + db 8 ; # + db BOULDERBADGE + db CASCADEBADGE + db THUNDERBADGE + db RAINBOWBADGE + db SOULBADGE + db MARSHBADGE + db VOLCANOBADGE + db EARTHBADGE + db -1 ; end CeruleanHouse2Text_74e77: - TX_FAR _CeruleanHouse2Text_74e77 - db "@" + text_far _CeruleanHouse2Text_74e77 + text_end CeruleanHouse2Text_74e7c: - TX_FAR _CeruleanHouse2Text_74e7c - db "@" + text_far _CeruleanHouse2Text_74e7c + text_end CeruleanHouse2Text_74e81: - TX_FAR _CeruleanHouse2Text_74e81 - db "@" + text_far _CeruleanHouse2Text_74e81 + text_end TextPointers_74e86: dw CeruleanHouse2Text_74e96 @@ -77,33 +86,33 @@ TextPointers_74e86: dw CeruleanHouse2Text_74eb9 CeruleanHouse2Text_74e96: - TX_FAR _CeruleanHouse2Text_74e96 - db "@" + text_far _CeruleanHouse2Text_74e96 + text_end CeruleanHouse2Text_74e9b: - TX_FAR _CeruleanHouse2Text_74e9b - db "@" + text_far _CeruleanHouse2Text_74e9b + text_end CeruleanHouse2Text_74ea0: - TX_FAR _CeruleanHouse2Text_74ea0 - db "@" + text_far _CeruleanHouse2Text_74ea0 + text_end CeruleanHouse2Text_74ea5: - TX_FAR _CeruleanHouse2Text_74ea5 - db "@" + text_far _CeruleanHouse2Text_74ea5 + text_end CeruleanHouse2Text_74eaa: - TX_FAR _CeruleanHouse2Text_74eaa - db "@" + text_far _CeruleanHouse2Text_74eaa + text_end CeruleanHouse2Text_74eaf: - TX_FAR _CeruleanHouse2Text_74eaf - db "@" + text_far _CeruleanHouse2Text_74eaf + text_end CeruleanHouse2Text_74eb4: - TX_FAR _CeruleanHouse2Text_74eb4 - db "@" + text_far _CeruleanHouse2Text_74eb4 + text_end CeruleanHouse2Text_74eb9: - TX_FAR _CeruleanHouse2Text_74eb9 - db "@" + text_far _CeruleanHouse2Text_74eb9 + text_end diff --git a/scripts/CeruleanCaveB1F.asm b/scripts/CeruleanCaveB1F.asm index b98ca4ba..a94a7fe3 100755 --- a/scripts/CeruleanCaveB1F.asm +++ b/scripts/CeruleanCaveB1F.asm @@ -20,25 +20,18 @@ CeruleanCaveB1F_TextPointers: dw PickUpItemText MewtwoTrainerHeader: - dbEventFlagBit EVENT_BEAT_MEWTWO - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MEWTWO - dw MewtwoBattleText ; TextBeforeBattle - dw MewtwoBattleText ; TextAfterBattle - dw MewtwoBattleText ; TextEndBattle - dw MewtwoBattleText ; TextEndBattle - - db $ff + trainer EVENT_BEAT_MEWTWO, 0, MewtwoBattleText, MewtwoBattleText, MewtwoBattleText + db -1 ; end MewtwoText: - TX_ASM + text_asm ld hl, MewtwoTrainerHeader call TalkToTrainer jp TextScriptEnd MewtwoBattleText: - TX_FAR _MewtwoBattleText - TX_ASM + text_far _MewtwoBattleText + text_asm ld a, MEWTWO call PlayCry call WaitForSoundToFinish diff --git a/scripts/CeruleanCity.asm b/scripts/CeruleanCity.asm index c36b3dd6..5a8ce978 100755 --- a/scripts/CeruleanCity.asm +++ b/scripts/CeruleanCity.asm @@ -27,7 +27,7 @@ CeruleanCityScript4: ld [wJoyIgnore], a SetEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a @@ -50,10 +50,10 @@ CeruleanCityScript0: .asm_194e6 ld [wPlayerMovingDirection], a ld a, b - ld [wSpriteStateData1 + 2 * $10 + $9], a + ld [wSprite02StateData1FacingDirection], a call Delay3 ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID .asm_194f7 CheckEvent EVENT_BEAT_CERULEAN_RIVAL @@ -70,51 +70,51 @@ CeruleanCityScript0: ld a, MUSIC_MEET_RIVAL call PlayMusic xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a ld a, [wXCoord] - cp $14 + cp 20 jr z, .asm_19535 ld a, $1 - ld [H_SPRITEINDEX], a - ld a, $5 - ld [H_SPRITEDATAOFFSET], a + ldh [hSpriteIndex], a + ld a, SPRITESTATEDATA2_MAPX + ldh [hSpriteDataOffset], a call GetPointerWithinSpriteStateData2 - ld [hl], $19 + ld [hl], 25 .asm_19535 ld a, HS_CERULEAN_RIVAL ld [wMissableObjectIndex], a predef ShowObject ld de, CeruleanCityMovement1 ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite ld a, $1 ld [wCeruleanCityCurScript], a ret CeruleanCityCoords1: - db $07,$1e - db $09,$1e - db $ff + dbmapcoord 30, 7 + dbmapcoord 30, 9 + db -1 ; end CeruleanCityCoords2: - db $06,$14 - db $06,$15 - db $ff + dbmapcoord 20, 6 + dbmapcoord 21, 6 + db -1 ; end CeruleanCityMovement1: db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end CeruleanCityScript_1955d: ld a, 1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a jp SetSpriteFacingDirectionAndDelay ; face object CeruleanCityScript1: @@ -124,7 +124,7 @@ CeruleanCityScript1: xor a ld [wJoyIgnore], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd72d set 6, [hl] @@ -132,12 +132,12 @@ CeruleanCityScript1: ld hl, CeruleanCityText_1966d ld de, CeruleanCityText_19672 call SaveEndBattleTextPointers - ld a, OPP_SONY1 + ld a, OPP_RIVAL1 ld [wCurOpponent], a ld a, 3 ld [wTrainerNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a call CeruleanCityScript_1955d ld a, $2 ld [wCeruleanCityCurScript], a @@ -152,15 +152,15 @@ CeruleanCityScript2: ld [wJoyIgnore], a SetEvent EVENT_BEAT_CERULEAN_RIVAL ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call StopAllMusic - callba Music_RivalAlternateStart + farcall Music_RivalAlternateStart ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld a, [wXCoord] - cp $14 + cp 20 jr nz, .asm_195f0 ld de, CeruleanCityMovement4 jr .asm_195f3 @@ -168,7 +168,7 @@ CeruleanCityScript2: ld de, CeruleanCityMovement3 .asm_195f3 ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite ld a, $3 ld [wCeruleanCityCurScript], a @@ -182,7 +182,7 @@ CeruleanCityMovement3: db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end CeruleanCityMovement4: db NPC_MOVEMENT_RIGHT @@ -192,7 +192,7 @@ CeruleanCityMovement4: db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end CeruleanCityScript3: ld a, [wd730] @@ -228,7 +228,7 @@ CeruleanCity_TextPointers: dw CeruleanCityText17 CeruleanCityText1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_CERULEAN_RIVAL ; do pre-battle text jr z, .PreBattleText @@ -243,23 +243,23 @@ CeruleanCityText1: jp TextScriptEnd CeruleanCityText_19668: - TX_FAR _CeruleanCityText_19668 - db "@" + text_far _CeruleanCityText_19668 + text_end CeruleanCityText_1966d: - TX_FAR _CeruleanCityText_1966d - db "@" + text_far _CeruleanCityText_1966d + text_end CeruleanCityText_19672: - TX_FAR _CeruleanCityText_19672 - db "@" + text_far _CeruleanCityText_19672 + text_end CeruleanCityText_19677: - TX_FAR _CeruleanCityText_19677 - db "@" + text_far _CeruleanCityText_19677 + text_end CeruleanCityText2: - TX_ASM + text_asm CheckEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF jr nz, .asm_4ca20 ld hl, CeruleanCityText_196d9 @@ -270,7 +270,7 @@ CeruleanCityText2: ld hl, CeruleanCityText_196ee ld de, CeruleanCityText_196ee call SaveEndBattleTextPointers - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -280,7 +280,7 @@ CeruleanCityText2: .asm_4ca20 ld hl, CeruleanCityText_196f3 call PrintText - lb bc, TM_28, 1 + lb bc, TM_DIG, 1 call GiveItem jr c, .Success ld hl, TM28NoRoomText @@ -291,53 +291,53 @@ CeruleanCityText2: ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, ReceivedTM28Text call PrintText - callba CeruleanHideRocket + farcall CeruleanHideRocket .Done jp TextScriptEnd CeruleanCityText_196d9: - TX_FAR _CeruleanCityText_196d9 - db "@" + text_far _CeruleanCityText_196d9 + text_end ReceivedTM28Text: - TX_FAR _ReceivedTM28Text - TX_SFX_ITEM_1 - TX_FAR _ReceivedTM28Text2 - TX_WAIT - db "@" + text_far _ReceivedTM28Text + sound_get_item_1 + text_far _ReceivedTM28Text2 + text_waitbutton + text_end TM28NoRoomText: - TX_FAR _TM28NoRoomText - db "@" + text_far _TM28NoRoomText + text_end CeruleanCityText_196ee: - TX_FAR _CeruleanCityText_196ee - db "@" + text_far _CeruleanCityText_196ee + text_end CeruleanCityText_196f3: - TX_FAR _CeruleanCityText_196f3 - db "@" + text_far _CeruleanCityText_196f3 + text_end CeruleanCityText3: - TX_FAR _CeruleanCityText3 - db "@" + text_far _CeruleanCityText3 + text_end CeruleanCityText4: - TX_FAR _CeruleanCityText4 - db "@" + text_far _CeruleanCityText4 + text_end CeruleanCityText5: - TX_FAR _CeruleanCityText5 - db "@" + text_far _CeruleanCityText5 + text_end CeruleanCityText11: CeruleanCityText6: - TX_FAR _CeruleanCityText6 - db "@" + text_far _CeruleanCityText6 + text_end CeruleanCityText7: - TX_ASM - ld a, [hRandomAdd] + text_asm + ldh a, [hRandomAdd] cp 180 jr c, .asm_e9fc9 ld hl, CeruleanCityText_19730 @@ -356,20 +356,20 @@ CeruleanCityText7: jp TextScriptEnd CeruleanCityText_19730: - TX_FAR _CeruleanCityText_19730 - db "@" + text_far _CeruleanCityText_19730 + text_end CeruleanCityText_19735: - TX_FAR _CeruleanCityText_19735 - db "@" + text_far _CeruleanCityText_19735 + text_end CeruleanCityText_1973a: - TX_FAR _CeruleanCityText_1973a - db "@" + text_far _CeruleanCityText_1973a + text_end CeruleanCityText8: - TX_ASM - ld a, [hRandomAdd] + text_asm + ldh a, [hRandomAdd] cp 180 jr c, .asm_e28da ld hl, CeruleanCityText_1976f @@ -394,41 +394,41 @@ CeruleanCityText8: jp TextScriptEnd CeruleanCityText_1976f: - TX_FAR _CeruleanCityText_1976f - db "@" + text_far _CeruleanCityText_1976f + text_end CeruleanCityText_19774: - TX_FAR _CeruleanCityText_19774 - db "@" + text_far _CeruleanCityText_19774 + text_end CeruleanCityText_19779: - TX_FAR _CeruleanCityText_19779 - db "@" + text_far _CeruleanCityText_19779 + text_end CeruleanCityText_1977e: - TX_FAR _CeruleanCityText_1977e - db "@" + text_far _CeruleanCityText_1977e + text_end CeruleanCityText9: - TX_FAR _CeruleanCityText9 - db "@" + text_far _CeruleanCityText9 + text_end CeruleanCityText10: - TX_FAR _CeruleanCityText10 - db "@" + text_far _CeruleanCityText10 + text_end CeruleanCityText12: - TX_FAR _CeruleanCityText12 - db "@" + text_far _CeruleanCityText12 + text_end CeruleanCityText13: - TX_FAR _CeruleanCityText13 - db "@" + text_far _CeruleanCityText13 + text_end CeruleanCityText16: - TX_FAR _CeruleanCityText16 - db "@" + text_far _CeruleanCityText16 + text_end CeruleanCityText17: - TX_FAR _CeruleanCityText17 - db "@" + text_far _CeruleanCityText17 + text_end diff --git a/scripts/CeruleanGym.asm b/scripts/CeruleanGym.asm index d1dd66e4..13a00da2 100755 --- a/scripts/CeruleanGym.asm +++ b/scripts/CeruleanGym.asm @@ -2,7 +2,7 @@ CeruleanGym_Script: ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] - call nz, CeruleanGymScript_5c6d0 + call nz, .LoadNames call EnableAutoTextBoxDrawing ld hl, CeruleanGymTrainerHeader0 ld de, CeruleanGym_ScriptPointers @@ -11,15 +11,15 @@ CeruleanGym_Script: ld [wCeruleanGymCurScript], a ret -CeruleanGymScript_5c6d0: - ld hl, Gym2CityName - ld de, Gym2LeaderName +.LoadNames: + ld hl, .CityName + ld de, .LeaderName jp LoadGymLeaderAndCityName -Gym2CityName: +.CityName: db "CERULEAN CITY@" -Gym2LeaderName: +.LeaderName: db "MISTY@" CeruleanGymScript_5c6ed: @@ -44,26 +44,26 @@ CeruleanGymScript3: CeruleanGymScript_5c70d: ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_MISTY - lb bc, TM_11, 1 + lb bc, TM_BUBBLEBEAM, 1 call GiveItem jr nc, .BagFull ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM11 jr .gymVictory .BagFull ld a, $7 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges - set 1, [hl] + set BIT_CASCADEBADGE, [hl] ld hl, wBeatGymFlags - set 1, [hl] + set BIT_CASCADEBADGE, [hl] ; deactivate gym trainers SetEvents EVENT_BEAT_CERULEAN_GYM_TRAINER_0, EVENT_BEAT_CERULEAN_GYM_TRAINER_1 @@ -80,27 +80,13 @@ CeruleanGym_TextPointers: dw CeruleanGymText7 CeruleanGymTrainerHeader0: - dbEventFlagBit EVENT_BEAT_CERULEAN_GYM_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_CERULEAN_GYM_TRAINER_0 - dw CeruleanGymBattleText1 ; TextBeforeBattle - dw CeruleanGymAfterBattleText1 ; TextAfterBattle - dw CeruleanGymEndBattleText1 ; TextEndBattle - dw CeruleanGymEndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_CERULEAN_GYM_TRAINER_0, 3, CeruleanGymBattleText1, CeruleanGymEndBattleText1, CeruleanGymAfterBattleText1 CeruleanGymTrainerHeader1: - dbEventFlagBit EVENT_BEAT_CERULEAN_GYM_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_CERULEAN_GYM_TRAINER_1 - dw CeruleanGymBattleText2 ; TextBeforeBattle - dw CeruleanGymAfterBattleText2 ; TextAfterBattle - dw CeruleanGymEndBattleText2 ; TextEndBattle - dw CeruleanGymEndBattleText2 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_CERULEAN_GYM_TRAINER_1, 3, CeruleanGymBattleText2, CeruleanGymEndBattleText2, CeruleanGymAfterBattleText2 + db -1 ; end CeruleanGymText1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_MISTY jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM11 @@ -121,82 +107,82 @@ CeruleanGymText1: ld hl, CeruleanGymText_5c7d8 ld de, CeruleanGymText_5c7d8 call SaveEndBattleTextPointers - ld a, [H_SPRITEINDEX] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $2 ld [wGymLeaderNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wCeruleanGymCurScript], a .done jp TextScriptEnd CeruleanGymText_5c7be: - TX_FAR _CeruleanGymText_5c7be - db "@" + text_far _CeruleanGymText_5c7be + text_end CeruleanGymText_5c7c3: - TX_FAR _CeruleanGymText_5c7c3 - db "@" + text_far _CeruleanGymText_5c7c3 + text_end CeruleanGymText5: - TX_FAR _CeruleanGymText_5c7c8 - db "@" + text_far _CeruleanGymText_5c7c8 + text_end CeruleanGymText6: - TX_FAR _ReceivedTM11Text - TX_SFX_ITEM_1 - db "@" + text_far _ReceivedTM11Text + sound_get_item_1 + text_end CeruleanGymText7: - TX_FAR _CeruleanGymText_5c7d3 - db "@" + text_far _CeruleanGymText_5c7d3 + text_end CeruleanGymText_5c7d8: - TX_FAR _CeruleanGymText_5c7d8 - db "@" + text_far _CeruleanGymText_5c7d8 + text_end CeruleanGymText2: - TX_ASM + text_asm ld hl, CeruleanGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd CeruleanGymBattleText1: - TX_FAR _CeruleanGymBattleText1 - db "@" + text_far _CeruleanGymBattleText1 + text_end CeruleanGymEndBattleText1: - TX_FAR _CeruleanGymEndBattleText1 - db "@" + text_far _CeruleanGymEndBattleText1 + text_end CeruleanGymAfterBattleText1: - TX_FAR _CeruleanGymAfterBattleText1 - db "@" + text_far _CeruleanGymAfterBattleText1 + text_end CeruleanGymText3: - TX_ASM + text_asm ld hl, CeruleanGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd CeruleanGymBattleText2: - TX_FAR _CeruleanGymBattleText2 - db "@" + text_far _CeruleanGymBattleText2 + text_end CeruleanGymEndBattleText2: - TX_FAR _CeruleanGymEndBattleText2 - db "@" + text_far _CeruleanGymEndBattleText2 + text_end CeruleanGymAfterBattleText2: - TX_FAR _CeruleanGymAfterBattleText2 - db "@" + text_far _CeruleanGymAfterBattleText2 + text_end CeruleanGymText4: - TX_ASM + text_asm CheckEvent EVENT_BEAT_MISTY jr nz, .asm_5c821 ld hl, CeruleanGymText_5c82a @@ -209,9 +195,9 @@ CeruleanGymText4: jp TextScriptEnd CeruleanGymText_5c82a: - TX_FAR _CeruleanGymText_5c82a - db "@" + text_far _CeruleanGymText_5c82a + text_end CeruleanGymText_5c82f: - TX_FAR _CeruleanGymText_5c82f - db "@" + text_far _CeruleanGymText_5c82f + text_end diff --git a/scripts/CeruleanMart.asm b/scripts/CeruleanMart.asm index f812aadd..beb0fa1b 100755 --- a/scripts/CeruleanMart.asm +++ b/scripts/CeruleanMart.asm @@ -7,9 +7,9 @@ CeruleanMart_TextPointers: dw CeruleanMartText3 CeruleanMartText2: - TX_FAR _CeruleanMartText2 - db "@" + text_far _CeruleanMartText2 + text_end CeruleanMartText3: - TX_FAR _CeruleanMartText3 - db "@" + text_far _CeruleanMartText3 + text_end diff --git a/scripts/CeruleanPokecenter.asm b/scripts/CeruleanPokecenter.asm index de4fd57d..3aa465ca 100755 --- a/scripts/CeruleanPokecenter.asm +++ b/scripts/CeruleanPokecenter.asm @@ -10,20 +10,20 @@ CeruleanPokecenter_TextPointers: dw CeruleanPokecenterText5 CeruleanTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist CeruleanHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse CeruleanPokecenterText2: - TX_FAR _CeruleanPokecenterText2 - db "@" + text_far _CeruleanPokecenterText2 + text_end CeruleanPokecenterText3: - TX_FAR _CeruleanPokecenterText3 - db "@" + text_far _CeruleanPokecenterText3 + text_end CeruleanPokecenterText5: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/CeruleanTradeHouse.asm b/scripts/CeruleanTradeHouse.asm index 8b5d4495..a6820fdb 100755 --- a/scripts/CeruleanTradeHouse.asm +++ b/scripts/CeruleanTradeHouse.asm @@ -9,7 +9,7 @@ CeruleanTradeHouse_TextPointers: dw CeruleanHouse1Text4 CeruleanHouse1Text1: - TX_ASM + text_asm ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a CheckEvent EVENT_GOT_BULBASAUR_IN_CERULEAN @@ -61,46 +61,46 @@ CeruleanHouse1Text1: jp TextScriptEnd CeruleanHouse1Text_1cfc8: - TX_FAR MelanieText1 - TX_WAIT - db "@" + text_far MelanieText1 + text_waitbutton + text_end CeruleanHouse1Text_1cfce: - TX_FAR MelanieText2 - db "@" + text_far MelanieText2 + text_end CeruleanHouse1Text_1cfd3: - TX_FAR MelanieText3 - TX_WAIT - db "@" + text_far MelanieText3 + text_waitbutton + text_end CeruleanHouse1Text_1cfd9: - TX_FAR MelanieText4 - TX_WAIT - db "@" + text_far MelanieText4 + text_waitbutton + text_end CeruleanHouse1Text_1cfdf: - TX_FAR MelanieText5 - TX_WAIT - db "@" + text_far MelanieText5 + text_waitbutton + text_end CeruleanHouse1Text2: - TX_FAR MelanieBulbasaurText - TX_ASM + text_far MelanieBulbasaurText + text_asm ld a, BULBASAUR call PlayCry jp TextScriptEnd CeruleanHouse1Text3: - TX_FAR MelanieOddishText - TX_ASM + text_far MelanieOddishText + text_asm ld a, ODDISH call PlayCry jp TextScriptEnd CeruleanHouse1Text4: - TX_FAR MelanieSandshrewText - TX_ASM + text_far MelanieSandshrewText + text_asm ld a, SANDSHREW call PlayCry jp TextScriptEnd diff --git a/scripts/CeruleanTrashedHouse.asm b/scripts/CeruleanTrashedHouse.asm index f249ef01..d11c7721 100755 --- a/scripts/CeruleanTrashedHouse.asm +++ b/scripts/CeruleanTrashedHouse.asm @@ -8,32 +8,32 @@ CeruleanTrashedHouse_TextPointers: dw CeruleanHouseTrashedText3 CeruleanHouseTrashedText1: - TX_ASM - ld b, $e4 + text_asm + ld b, TM_DIG predef GetQuantityOfItemInBag and b - jr z, .asm_f8734 + jr z, .no_dig_tm ld hl, CeruleanHouseTrashedText_1d6b0 call PrintText - jr .asm_8dfe9 -.asm_f8734 + jr .done +.no_dig_tm ld hl, CeruleanHouseTrashedText_1d6ab call PrintText -.asm_8dfe9 +.done jp TextScriptEnd CeruleanHouseTrashedText_1d6ab: - TX_FAR _CeruleanTrashedText_1d6ab - db "@" + text_far _CeruleanTrashedText_1d6ab + text_end CeruleanHouseTrashedText_1d6b0: - TX_FAR _CeruleanTrashedText_1d6b0 - db "@" + text_far _CeruleanTrashedText_1d6b0 + text_end CeruleanHouseTrashedText2: - TX_FAR _CeruleanHouseTrashedText2 - db "@" + text_far _CeruleanHouseTrashedText2 + text_end CeruleanHouseTrashedText3: - TX_FAR _CeruleanHouseTrashedText3 - db "@" + text_far _CeruleanHouseTrashedText3 + text_end diff --git a/scripts/ChampionsRoom.asm b/scripts/ChampionsRoom.asm index b8ce710b..d500e1d2 100755 --- a/scripts/ChampionsRoom.asm +++ b/scripts/ChampionsRoom.asm @@ -44,7 +44,7 @@ GaryEntrance_RLEMovement: db D_UP, 1 db D_RIGHT, 1 db D_UP, 3 - db $ff + db -1 ; end GaryScript2: ld a, [wSimulatedJoypadStatesIndex] @@ -56,7 +56,7 @@ GaryScript2: ld hl, wOptions res 7, [hl] ; Turn on battle animations to make the battle feel more epic. ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld hl, wd72d @@ -65,7 +65,7 @@ GaryScript2: ld hl, GaryDefeatedText ld de, GaryVictoryText call SaveEndBattleTextPointers - ld a, OPP_SONY3 + ld a, OPP_RIVAL3 ld [wCurOpponent], a ; select which team to use during the encounter @@ -74,7 +74,7 @@ GaryScript2: ld [wTrainerNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wChampionsRoomCurScript], a ret @@ -88,26 +88,26 @@ GaryScript3: ld a, $f0 ld [wJoyIgnore], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld a, $4 ld [wChampionsRoomCurScript], a ret GaryScript4: - callba Music_Cities1AlternateTempo + farcall Music_Cities1AlternateTempo ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld de, OakEntranceAfterVictoryMovement ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite ld a, HS_CHAMPIONS_ROOM_OAK ld [wMissableObjectIndex], a @@ -122,7 +122,7 @@ OakEntranceAfterVictoryMovement: db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP - db $FF + db -1 ; end GaryScript5: ld a, [wd730] @@ -131,17 +131,17 @@ GaryScript5: ld a, PLAYER_DIR_LEFT ld [wPlayerMovingDirection], a ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_LEFT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $6 ld [wChampionsRoomCurScript], a @@ -149,12 +149,12 @@ GaryScript5: GaryScript6: ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_RIGHT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call GaryScript_760c8 ld a, $7 ld [wChampionsRoomCurScript], a @@ -162,16 +162,16 @@ GaryScript6: GaryScript7: ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call GaryScript_760c8 ld de, OakExitGaryRoomMovement ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite ld a, $8 ld [wChampionsRoomCurScript], a @@ -180,7 +180,7 @@ GaryScript7: OakExitGaryRoomMovement: db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP - db $FF + db -1 ; end GaryScript8: ld a, [wd730] @@ -209,7 +209,7 @@ GaryScript9: WalkToHallOfFame_RLEMovment: db D_UP, 4 db D_LEFT, 1 - db $ff + db -1 ; end GaryScript10: ld a, [wSimulatedJoypadStatesIndex] @@ -237,7 +237,7 @@ ChampionsRoom_TextPointers: dw GaryText5 GaryText1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_CHAMPION_RIVAL ld hl, GaryChampionIntroText jr z, .printText @@ -247,27 +247,27 @@ GaryText1: jp TextScriptEnd GaryChampionIntroText: - TX_FAR _GaryChampionIntroText - db "@" + text_far _GaryChampionIntroText + text_end GaryDefeatedText: - TX_FAR _GaryDefeatedText - db "@" + text_far _GaryDefeatedText + text_end GaryVictoryText: - TX_FAR _GaryVictoryText - db "@" + text_far _GaryVictoryText + text_end GaryText_76103: - TX_FAR _GaryText_76103 - db "@" + text_far _GaryText_76103 + text_end GaryText2: - TX_FAR _GaryText2 - db "@" + text_far _GaryText2 + text_end GaryText3: - TX_ASM + text_asm ld a, [wPlayerStarter] ld [wd11e], a call GetMonName @@ -276,13 +276,13 @@ GaryText3: jp TextScriptEnd GaryText_76120: - TX_FAR _GaryText_76120 - db "@" + text_far _GaryText_76120 + text_end GaryText4: - TX_FAR _GaryText_76125 - db "@" + text_far _GaryText_76125 + text_end GaryText5: - TX_FAR _GaryText_7612a - db "@" + text_far _GaryText_7612a + text_end diff --git a/scripts/CinnabarGym.asm b/scripts/CinnabarGym.asm index 2dc07e58..529b3be2 100755 --- a/scripts/CinnabarGym.asm +++ b/scripts/CinnabarGym.asm @@ -10,21 +10,23 @@ CinnabarGymScript_75759: bit 6, [hl] res 6, [hl] push hl - call nz, CinnabarGymScript_75772 + call nz, .LoadNames pop hl bit 5, [hl] res 5, [hl] call nz, UpdateCinnabarGymGateTileBlocks ResetEvent EVENT_2A7 ret -CinnabarGymScript_75772: - ld hl, Gym7CityName - ld de, Gym7LeaderName + +.LoadNames: + ld hl, .CityName + ld de, .LeaderName jp LoadGymLeaderAndCityName -Gym7CityName: +.CityName: db "CINNABAR ISLAND@" -Gym7LeaderName: + +.LeaderName: db "BLAINE@" CinnabarGymScript_75792: @@ -36,7 +38,7 @@ CinnabarGymScript_75792: ret CinnabarGymScript_74f48: - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] ld [wTrainerHeaderFlagBit], a ret @@ -53,7 +55,7 @@ CinnabarGymScript0: ld a, [wOpponentAfterWrongAnswer] and a ret z - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a cp $4 jr nz, .asm_757c3 ld a, PLAYER_DIR_DOWN @@ -80,7 +82,7 @@ CinnabarGymScript0: MovementData_757d7: db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_UP - db $FF + db -1 ; end PikachuMovementData_74f97: db $00 @@ -91,7 +93,7 @@ PikachuMovementData_74f97: MovementData_757da: db NPC_MOVEMENT_LEFT - db $FF + db -1 ; end PikachuMovementData_74f9e: db $00 @@ -106,7 +108,7 @@ CinnabarGymScript_74fa3: ret z push hl push bc - callab GetPikachuFacingDirectionAndReturnToE + callfar GetPikachuFacingDirectionAndReturnToE pop bc pop hl ld a, b @@ -123,7 +125,7 @@ CinnabarGymScript1: ld [wJoyIgnore], a ld a, [wOpponentAfterWrongAnswer] ld [wTrainerHeaderFlagBit], a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID CinnabarGymScript2: @@ -166,7 +168,7 @@ CinnabarGymScript2: CinnabarGymScript_75023: ld a, [wTrainerHeaderFlagBit] - ld [$ffdb], a + ldh [hGymGateIndex], a ld c, a ld b, FLAG_SET EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0 @@ -175,7 +177,7 @@ CinnabarGymScript_75023: CinnabarGymScript_75032: ld a, [wTrainerHeaderFlagBit] - ld [$ffdb], a + ldh [hGymGateIndex], a ld c, a ld b, FLAG_TEST EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0 @@ -201,26 +203,26 @@ CinnabarGymScript3: ld [wJoyIgnore], a CinnabarGymScript3_75857: ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_BLAINE - lb bc, TM_38, 1 + lb bc, TM_FIRE_BLAST, 1 call GiveItem jr nc, .BagFull ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM38 jr .gymVictory .BagFull ld a, $c - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges - set 6, [hl] + set BIT_VOLCANOBADGE, [hl] ld hl, wBeatGymFlags - set 6, [hl] + set BIT_VOLCANOBADGE, [hl] ; deactivate gym trainers SetEventRange EVENT_BEAT_CINNABAR_GYM_TRAINER_0, EVENT_BEAT_CINNABAR_GYM_TRAINER_6 @@ -245,7 +247,7 @@ CinnabarGym_TextPointers: dw TM38NoRoomText CinnabarGymScript_750c3: - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -265,7 +267,7 @@ CinnabarGymScript_750c3: jp TextScriptEnd CinnabarGymText1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_BLAINE jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM38 @@ -288,35 +290,35 @@ CinnabarGymText1: jp CinnabarGymScript_750c3 BlaineBattleText: - TX_FAR _BlaineBattleText - db "@" + text_far _BlaineBattleText + text_end BlaineEndBattleText: - TX_FAR _BlaineEndBattleText - TX_SFX_KEY_ITEM ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded - TX_WAIT - db "@" + text_far _BlaineEndBattleText + sound_get_key_item ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded + text_waitbutton + text_end BlaineFireBlastText: - TX_FAR _BlaineFireBlastText - db "@" + text_far _BlaineFireBlastText + text_end BlaineBadgeText: - TX_FAR _BlaineBadgeText - db "@" + text_far _BlaineBadgeText + text_end ReceivedTM38Text: - TX_FAR _ReceivedTM38Text - TX_SFX_ITEM_1 - TX_FAR _TM38ExplanationText - db "@" + text_far _ReceivedTM38Text + sound_get_item_1 + text_far _TM38ExplanationText + text_end TM38NoRoomText: - TX_FAR _TM38NoRoomText - db "@" + text_far _TM38NoRoomText + text_end CinnabarGymText2: - TX_ASM + text_asm call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_0 jr nz, .asm_46bb4 @@ -332,19 +334,19 @@ CinnabarGymText2: jp TextScriptEnd CinnabarGymText_7595f: - TX_FAR _CinnabarGymText_7595f - db "@" + text_far _CinnabarGymText_7595f + text_end CinnabarGymText_75964: - TX_FAR _CinnabarGymText_75964 - db "@" + text_far _CinnabarGymText_75964 + text_end CinnabarGymText_75969: - TX_FAR _CinnabarGymText_75969 - db "@" + text_far _CinnabarGymText_75969 + text_end CinnabarGymText3: - TX_ASM + text_asm call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_1 jr nz, .asm_751a8 @@ -369,19 +371,19 @@ CinnabarGymText3: jp TextScriptEnd CinnabarGymText_75994: - TX_FAR _CinnabarGymText_75994 - db "@" + text_far _CinnabarGymText_75994 + text_end CinnabarGymText_75999: - TX_FAR _CinnabarGymText_75999 - db "@" + text_far _CinnabarGymText_75999 + text_end CinnabarGymText_7599e: - TX_FAR _CinnabarGymText_7599e - db "@" + text_far _CinnabarGymText_7599e + text_end CinnabarGymText4: - TX_ASM + text_asm call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_2 jr nz, .asm_751ee @@ -405,19 +407,19 @@ CinnabarGymText4: jp TextScriptEnd CinnabarGymText_759c9: - TX_FAR _CinnabarGymText_759c9 - db "@" + text_far _CinnabarGymText_759c9 + text_end CinnabarGymText_759ce: - TX_FAR _CinnabarGymText_759ce - db "@" + text_far _CinnabarGymText_759ce + text_end CinnabarGymText_759d3: - TX_FAR _CinnabarGymText_759d3 - db "@" + text_far _CinnabarGymText_759d3 + text_end CinnabarGymText5: - TX_ASM + text_asm call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_3 jr nz, .asm_75234 @@ -441,19 +443,19 @@ CinnabarGymText5: jp TextScriptEnd CinnabarGymText_759fe: - TX_FAR _CinnabarGymText_759fe - db "@" + text_far _CinnabarGymText_759fe + text_end CinnabarGymText_75a03: - TX_FAR _CinnabarGymText_75a03 - db "@" + text_far _CinnabarGymText_75a03 + text_end CinnabarGymText_75a08: - TX_FAR _CinnabarGymText_75a08 - db "@" + text_far _CinnabarGymText_75a08 + text_end CinnabarGymText6: - TX_ASM + text_asm call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_4 jr nz, .asm_776b4 @@ -477,19 +479,19 @@ CinnabarGymText6: jp TextScriptEnd CinnabarGymText_75a33: - TX_FAR _CinnabarGymText_75a33 - db "@" + text_far _CinnabarGymText_75a33 + text_end CinnabarGymText_75a38: - TX_FAR _CinnabarGymText_75a38 - db "@" + text_far _CinnabarGymText_75a38 + text_end CinnabarGymText_75a3d: - TX_FAR _CinnabarGymText_75a3d - db "@" + text_far _CinnabarGymText_75a3d + text_end CinnabarGymText7: - TX_ASM + text_asm call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_5 jr nz, .asm_2f755 @@ -513,19 +515,19 @@ CinnabarGymText7: jp TextScriptEnd CinnabarGymText_75a68: - TX_FAR _CinnabarGymText_75a68 - db "@" + text_far _CinnabarGymText_75a68 + text_end CinnabarGymText_75a6d: - TX_FAR _CinnabarGymText_75a6d - db "@" + text_far _CinnabarGymText_75a6d + text_end CinnabarGymText_75a72: - TX_FAR _CinnabarGymText_75a72 - db "@" + text_far _CinnabarGymText_75a72 + text_end CinnabarGymText8: - TX_ASM + text_asm call CinnabarGymScript_74f48 CheckEvent EVENT_BEAT_CINNABAR_GYM_TRAINER_6 jr nz, .asm_d87be @@ -549,18 +551,18 @@ CinnabarGymText8: jp TextScriptEnd CinnabarGymText_75a9d: - TX_FAR _CinnabarGymText_75a9d - db "@" + text_far _CinnabarGymText_75a9d + text_end CinnabarGymText_75aa2: - TX_FAR _CinnabarGymText_75aa2 - db "@" + text_far _CinnabarGymText_75aa2 + text_end CinnabarGymText_75aa7: - TX_FAR _CinnabarGymText_75aa7 - db "@" + text_far _CinnabarGymText_75aa7 + text_end CinnabarGymText9: - TX_ASM - callab Func_f2133 + text_asm + callfar Func_f2133 jp TextScriptEnd diff --git a/scripts/CinnabarGym3.asm b/scripts/CinnabarGym3.asm index 9e8cad74..af3db510 100755 --- a/scripts/CinnabarGym3.asm +++ b/scripts/CinnabarGym3.asm @@ -1,4 +1,4 @@ -Func_f2133: +Func_f2133:: CheckEvent EVENT_BEAT_BLAINE jr nz, .asm_627d9 ld hl, CinnabarGymText_75ac2 @@ -10,14 +10,14 @@ Func_f2133: ret CinnabarGymText_75ac2: - TX_FAR _CinnabarGymText_75ac2 - db "@" + text_far _CinnabarGymText_75ac2 + text_end CinnabarGymText_75ac7: - TX_FAR _CinnabarGymText_75ac7 - db "@" + text_far _CinnabarGymText_75ac7 + text_end -Func_f2150: +Func_f2150:: ld hl, TextPointers_f215d ld d, 0 add hl, de @@ -36,29 +36,29 @@ TextPointers_f215d: dw CinnabarGymText_f2182 CinnabarGymText_f2169: - TX_FAR _CinnabarGymText_1 - db "@" + text_far _CinnabarGymText_1 + text_end CinnabarGymText_f216e: - TX_FAR _CinnabarGymText_2 - db "@" + text_far _CinnabarGymText_2 + text_end CinnabarGymText_f2173: - TX_FAR _CinnabarGymText_3 - db "@" + text_far _CinnabarGymText_3 + text_end CinnabarGymText_f2178: - TX_FAR _CinnabarGymText_4 - db "@" + text_far _CinnabarGymText_4 + text_end CinnabarGymText_f217d: - TX_FAR _CinnabarGymText_5 - db "@" + text_far _CinnabarGymText_5 + text_end CinnabarGymText_f2182: - TX_FAR _CinnabarGymText_6 - db "@" + text_far _CinnabarGymText_6 + text_end CinnabarGymText_f2187: - TX_FAR _CinnabarGymText_7 ; unused - db "@" + text_far _CinnabarGymText_7 ; unused + text_end diff --git a/scripts/CinnabarGym_2.asm b/scripts/CinnabarGym_2.asm index 00118fb5..4c296cf7 100755 --- a/scripts/CinnabarGym_2.asm +++ b/scripts/CinnabarGym_2.asm @@ -1,5 +1,5 @@ CinnabarGymScript_753de: - callab Func_f2150 + callfar Func_f2150 jp TextScriptEnd CinnabarGymScript_753e9: diff --git a/scripts/CinnabarIsland.asm b/scripts/CinnabarIsland.asm index 5716428c..a1b20cd3 100755 --- a/scripts/CinnabarIsland.asm +++ b/scripts/CinnabarIsland.asm @@ -17,18 +17,18 @@ CinnabarIslandScript0: call IsItemInBag ret nz ld a, [wYCoord] - cp $4 + cp 4 ret nz ld a, [wXCoord] - cp $12 + cp 18 ret nz ld a, PLAYER_DIR_UP ld [wPlayerMovingDirection], a ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $1 ld [wSimulatedJoypadStatesIndex], a ld a, D_DOWN @@ -61,25 +61,25 @@ CinnabarIsland_TextPointers: dw CinnabarIslandText8 CinnabarIslandText8: - TX_FAR _CinnabarIslandText8 - db "@" + text_far _CinnabarIslandText8 + text_end CinnabarIslandText1: - TX_FAR _CinnabarIslandText1 - db "@" + text_far _CinnabarIslandText1 + text_end CinnabarIslandText2: - TX_FAR _CinnabarIslandText2 - db "@" + text_far _CinnabarIslandText2 + text_end CinnabarIslandText3: - TX_FAR _CinnabarIslandText3 - db "@" + text_far _CinnabarIslandText3 + text_end CinnabarIslandText6: - TX_FAR _CinnabarIslandText6 - db "@" + text_far _CinnabarIslandText6 + text_end CinnabarIslandText7: - TX_FAR _CinnabarIslandText7 - db "@" + text_far _CinnabarIslandText7 + text_end diff --git a/scripts/CinnabarLab.asm b/scripts/CinnabarLab.asm index aab3324b..2f4be7f2 100755 --- a/scripts/CinnabarLab.asm +++ b/scripts/CinnabarLab.asm @@ -10,21 +10,21 @@ CinnabarLab_TextPointers: dw Lab1Text5 Lab1Text1: - TX_FAR _Lab1Text1 - db "@" + text_far _Lab1Text1 + text_end Lab1Text2: - TX_FAR _Lab1Text2 - db "@" + text_far _Lab1Text2 + text_end Lab1Text3: - TX_FAR _Lab1Text3 - db "@" + text_far _Lab1Text3 + text_end Lab1Text4: - TX_FAR _Lab1Text4 - db "@" + text_far _Lab1Text4 + text_end Lab1Text5: - TX_FAR _Lab1Text5 - db "@" + text_far _Lab1Text5 + text_end diff --git a/scripts/CinnabarLabFossilRoom.asm b/scripts/CinnabarLabFossilRoom.asm index f5f03a19..2c388119 100755 --- a/scripts/CinnabarLabFossilRoom.asm +++ b/scripts/CinnabarLabFossilRoom.asm @@ -44,10 +44,10 @@ FossilsList: db DOME_FOSSIL db HELIX_FOSSIL db OLD_AMBER - db $00 + db 0 ; end Lab4Text1: - TX_ASM + text_asm CheckEvent EVENT_GAVE_FOSSIL_TO_LAB jr nz, .asm_75d96 ld hl, Lab4Text_75dc6 @@ -56,7 +56,7 @@ Lab4Text1: ld a, [wFilteredBagItemsCount] and a jr z, .asm_75d8d - callba GiveFossilToCinnabarLab + farcall GiveFossilToCinnabarLab jr .asm_75d93 .asm_75d8d ld hl, Lab4Text_75dcb @@ -83,27 +83,27 @@ Lab4Text1: jr .asm_75d93 Lab4Text_75dc6: - TX_FAR _Lab4Text_75dc6 - db "@" + text_far _Lab4Text_75dc6 + text_end Lab4Text_75dcb: - TX_FAR _Lab4Text_75dcb - db "@" + text_far _Lab4Text_75dcb + text_end Lab4Text_75dd0: - TX_FAR _Lab4Text_75dd0 - db "@" + text_far _Lab4Text_75dd0 + text_end Lab4Text_75dd5: - TX_FAR _Lab4Text_75dd5 - db "@" + text_far _Lab4Text_75dd5 + text_end Lab4Text2: - TX_ASM - ld a, $3 + text_asm + ld a, TRADE_FOR_SAILOR ld [wWhichTrade], a predef DoInGameTradeDialogue jp TextScriptEnd LoadFossilItemAndMonNameBank1D: - jpba LoadFossilItemAndMonName + farjp LoadFossilItemAndMonName diff --git a/scripts/CinnabarLabMetronomeRoom.asm b/scripts/CinnabarLabMetronomeRoom.asm index 6eddceae..b43f98e2 100755 --- a/scripts/CinnabarLabMetronomeRoom.asm +++ b/scripts/CinnabarLabMetronomeRoom.asm @@ -9,54 +9,54 @@ CinnabarLabMetronomeRoom_TextPointers: dw Lab3Text5 Lab3Text1: - TX_ASM + text_asm CheckEvent EVENT_GOT_TM35 - jr nz, .asm_e551a + jr nz, .got_item ld hl, TM35PreReceiveText call PrintText - lb bc, TM_35, 1 + lb bc, TM_METRONOME, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedTM35Text call PrintText SetEvent EVENT_GOT_TM35 - jr .asm_eb896 -.BagFull + jr .done +.bag_full ld hl, TM35NoRoomText call PrintText - jr .asm_eb896 -.asm_e551a + jr .done +.got_item ld hl, TM35ExplanationText call PrintText -.asm_eb896 +.done jp TextScriptEnd TM35PreReceiveText: - TX_FAR _TM35PreReceiveText - db "@" + text_far _TM35PreReceiveText + text_end ReceivedTM35Text: - TX_FAR _ReceivedTM35Text - TX_SFX_ITEM_1 - db "@" + text_far _ReceivedTM35Text + sound_get_item_1 + text_end TM35ExplanationText: - TX_FAR _TM35ExplanationText - db "@" + text_far _TM35ExplanationText + text_end TM35NoRoomText: - TX_FAR _TM35NoRoomText - db "@" + text_far _TM35NoRoomText + text_end Lab3Text2: - TX_FAR _Lab3Text2 - db "@" + text_far _Lab3Text2 + text_end Lab3Text4: Lab3Text3: - TX_FAR _Lab3Text3 - db "@" + text_far _Lab3Text3 + text_end Lab3Text5: - TX_FAR _Lab3Text5 - db "@" + text_far _Lab3Text5 + text_end diff --git a/scripts/CinnabarLabTradeRoom.asm b/scripts/CinnabarLabTradeRoom.asm index 6093ae14..1f8710be 100755 --- a/scripts/CinnabarLabTradeRoom.asm +++ b/scripts/CinnabarLabTradeRoom.asm @@ -7,18 +7,18 @@ CinnabarLabTradeRoom_TextPointers: dw Lab2Text3 Lab2Text1: - TX_FAR _Lab2Text1 - db "@" + text_far _Lab2Text1 + text_end Lab2Text2: - TX_ASM - ld a, $7 + text_asm + ld a, TRADE_FOR_DORIS ld [wWhichTrade], a jr Lab2DoTrade Lab2Text3: - TX_ASM - ld a, $8 + text_asm + ld a, TRADE_FOR_CRINKLES ld [wWhichTrade], a Lab2DoTrade: predef DoInGameTradeDialogue diff --git a/scripts/CinnabarMart.asm b/scripts/CinnabarMart.asm index 898948c7..e614bd29 100755 --- a/scripts/CinnabarMart.asm +++ b/scripts/CinnabarMart.asm @@ -7,9 +7,9 @@ CinnabarMart_TextPointers: dw CinnabarMartText3 CinnabarMartText2: - TX_FAR _CinnabarMartText2 - db "@" + text_far _CinnabarMartText2 + text_end CinnabarMartText3: - TX_FAR _CinnabarMartText3 - db "@" + text_far _CinnabarMartText3 + text_end diff --git a/scripts/CinnabarPokecenter.asm b/scripts/CinnabarPokecenter.asm index 53301266..3a229ca3 100755 --- a/scripts/CinnabarPokecenter.asm +++ b/scripts/CinnabarPokecenter.asm @@ -10,20 +10,20 @@ CinnabarPokecenter_TextPointers: dw CinnabarPokecenterText5 CinnabarHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse CinnabarPokecenterText2: - TX_FAR _CinnabarPokecenterText2 - db "@" + text_far _CinnabarPokecenterText2 + text_end CinnabarPokecenterText3: - TX_FAR _CinnabarPokecenterText3 - db "@" + text_far _CinnabarPokecenterText3 + text_end CinnabarTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist CinnabarPokecenterText5: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/Colosseum.asm b/scripts/Colosseum.asm index 8cc6b056..83d41bdc 100644 --- a/scripts/Colosseum.asm +++ b/scripts/Colosseum.asm @@ -5,5 +5,5 @@ Colosseum_TextPointers: dw ColosseumText1 ColosseumText1: - TX_FAR _ColosseumText1 - db "@" + text_far _ColosseumText1 + text_end diff --git a/scripts/CopycatsHouse1F.asm b/scripts/CopycatsHouse1F.asm index a86625fc..fc5ff3cf 100755 --- a/scripts/CopycatsHouse1F.asm +++ b/scripts/CopycatsHouse1F.asm @@ -7,16 +7,16 @@ CopycatsHouse1F_TextPointers: dw CopycatsHouse1FText3 CopycatsHouse1FText1: - TX_FAR _CopycatsHouse1FText1 - db "@" + text_far _CopycatsHouse1FText1 + text_end CopycatsHouse1FText2: - TX_FAR _CopycatsHouse1FText2 - db "@" + text_far _CopycatsHouse1FText2 + text_end CopycatsHouse1FText3: - TX_FAR _CopycatsHouse1FText3 - TX_ASM + text_far _CopycatsHouse1FText3 + text_asm ld a, CHANSEY call PlayCry jp TextScriptEnd diff --git a/scripts/CopycatsHouse2F.asm b/scripts/CopycatsHouse2F.asm index e0ec5425..ef0742ab 100755 --- a/scripts/CopycatsHouse2F.asm +++ b/scripts/CopycatsHouse2F.asm @@ -11,79 +11,79 @@ CopycatsHouse2F_TextPointers: dw CopycatsHouse2FText7 CopycatsHouse2FText1: - TX_ASM + text_asm CheckEvent EVENT_GOT_TM31 - jr nz, .asm_7ccf3 - ld a, $1 + jr nz, .got_item + ld a, TRUE ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, CopycatsHouse2FText_5ccd4 call PrintText ld b, POKE_DOLL call IsItemInBag - jr z, .asm_62ecd + jr z, .done ld hl, TM31PreReceiveText call PrintText - lb bc, TM_31, 1 + lb bc, TM_MIMIC, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedTM31Text call PrintText ld a, POKE_DOLL - ld [$ffdb], a - callba RemoveItemByID + ldh [hItemToRemoveID], a + farcall RemoveItemByID SetEvent EVENT_GOT_TM31 - jr .asm_62ecd -.BagFull + jr .done +.bag_full ld hl, TM31NoRoomText call PrintText - jr .asm_62ecd -.asm_7ccf3 + jr .done +.got_item ld hl, TM31ExplanationText2 call PrintText -.asm_62ecd +.done jp TextScriptEnd CopycatsHouse2FText_5ccd4: - TX_FAR _CopycatsHouse2FText_5ccd4 - db "@" + text_far _CopycatsHouse2FText_5ccd4 + text_end TM31PreReceiveText: - TX_FAR _TM31PreReceiveText - db "@" + text_far _TM31PreReceiveText + text_end ReceivedTM31Text: - TX_FAR _ReceivedTM31Text - TX_SFX_ITEM_1 + text_far _ReceivedTM31Text + sound_get_item_1 TM31ExplanationText1: - TX_FAR _TM31ExplanationText1 - TX_WAIT - db "@" + text_far _TM31ExplanationText1 + text_waitbutton + text_end TM31ExplanationText2: - TX_FAR _TM31ExplanationText2 - db "@" + text_far _TM31ExplanationText2 + text_end TM31NoRoomText: - TX_FAR _TM31NoRoomText - TX_WAIT - db "@" + text_far _TM31NoRoomText + text_waitbutton + text_end CopycatsHouse2FText2: - TX_FAR _CopycatsHouse2FText2 - db "@" + text_far _CopycatsHouse2FText2 + text_end CopycatsHouse2FText5: CopycatsHouse2FText4: CopycatsHouse2FText3: - TX_FAR _CopycatsHouse2FText3 - db "@" + text_far _CopycatsHouse2FText3 + text_end CopycatsHouse2FText6: - TX_FAR _CopycatsHouse2FText6 - db "@" + text_far _CopycatsHouse2FText6 + text_end CopycatsHouse2FText7: - TX_ASM + text_asm ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP ld hl, CopycatsHouse2FText_5cd1c @@ -94,9 +94,9 @@ CopycatsHouse2FText7: jp TextScriptEnd CopycatsHouse2FText_5cd17: - TX_FAR _CopycatsHouse2FText_5cd17 - db "@" + text_far _CopycatsHouse2FText_5cd17 + text_end CopycatsHouse2FText_5cd1c: - TX_FAR _CopycatsHouse2FText_5cd1c - db "@" + text_far _CopycatsHouse2FText_5cd1c + text_end diff --git a/scripts/Daycare.asm b/scripts/Daycare.asm index 5b65307e..164664b4 100755 --- a/scripts/Daycare.asm +++ b/scripts/Daycare.asm @@ -5,7 +5,7 @@ Daycare_TextPointers: dw DayCareMText1 DayCareMText1: - TX_ASM + text_asm call SaveScreenTilesToBuffer2 ld a, [wDayCareInUse] and a @@ -35,7 +35,7 @@ DayCareMText1: pop af ld hl, DayCareAllRightThenText jp c, .done - callab KnowsHMMove + callfar KnowsHMMove ld hl, DayCareCantAcceptMonWithHMText jp c, .done xor a @@ -50,7 +50,7 @@ DayCareMText1: ld a, PARTY_TO_DAYCARE ld [wMoveMonType], a call MoveMon - callab IsThisPartymonStarterPikachu + callfar IsThisPartymonStarterPikachu push af xor a ld [wRemoveMonFromBox], a @@ -63,7 +63,7 @@ DayCareMText1: .depositedPikachuIntoDayCare ldpikacry e, PikachuCry28 - callab PlayPikachuSoundClip + callfar PlayPikachuSoundClip .asm_562e3 ld hl, DayCareComeSeeMeInAWhileText jp .done @@ -75,19 +75,19 @@ DayCareMText1: ld a, DAYCARE_DATA ld [wMonDataLocation], a call LoadMonData - callab CalcLevelFromExperience + callfar CalcLevelFromExperience ld a, d cp MAX_LEVEL jr c, .skipCalcExp ld d, MAX_LEVEL - callab CalcExperience + callfar CalcExperience ld hl, wDayCareMonExp - ld a, [hExperience] + ldh a, [hExperience] ld [hli], a - ld a, [hExperience + 1] + ldh a, [hExperience + 1] ld [hli], a - ld a, [hExperience + 2] + ldh a, [hExperience + 2] ld [hl], a ld d, MAX_LEVEL @@ -148,11 +148,11 @@ DayCareMText1: and a jp nz, .leaveMonInDayCare ld hl, wDayCareTotalCost - ld [hMoney], a + ldh [hMoney], a ld a, [hli] - ld [hMoney + 1], a + ldh [hMoney + 1], a ld a, [hl] - ld [hMoney + 2], a + ldh [hMoney + 2], a call HasEnoughMoney jr nc, .enoughMoney ld hl, DayCareNotEnoughMoneyText @@ -210,7 +210,7 @@ DayCareMText1: ld a, [wPartyCount] dec a ld [wWhichPokemon], a - callab IsThisPartymonStarterPikachu + callfar IsThisPartymonStarterPikachu jr c, .withdrewPikachuFromDayCare ld a, [wcf91] call PlayCry @@ -226,7 +226,7 @@ DayCareMText1: ld hl, Bankswitch ldpikacry e, PikachuCry35 - callab PlayPikachuSoundClip + callfar PlayPikachuSoundClip .asm_56430 ld hl, DayCareGotMonBackText jr .done @@ -240,59 +240,59 @@ DayCareMText1: jp TextScriptEnd DayCareIntroText: - TX_FAR _DayCareIntroText - db "@" + text_far _DayCareIntroText + text_end DayCareWhichMonText: - TX_FAR _DayCareWhichMonText - db "@" + text_far _DayCareWhichMonText + text_end DayCareWillLookAfterMonText: - TX_FAR _DayCareWillLookAfterMonText - db "@" + text_far _DayCareWillLookAfterMonText + text_end DayCareComeSeeMeInAWhileText: - TX_FAR _DayCareComeSeeMeInAWhileText - db "@" + text_far _DayCareComeSeeMeInAWhileText + text_end DayCareMonHasGrownText: - TX_FAR _DayCareMonHasGrownText - db "@" + text_far _DayCareMonHasGrownText + text_end DayCareOweMoneyText: - TX_FAR _DayCareOweMoneyText - db "@" + text_far _DayCareOweMoneyText + text_end DayCareGotMonBackText: - TX_FAR _DayCareGotMonBackText - db "@" + text_far _DayCareGotMonBackText + text_end DayCareMonNeedsMoreTimeText: - TX_FAR _DayCareMonNeedsMoreTimeText - db "@" + text_far _DayCareMonNeedsMoreTimeText + text_end DayCareAllRightThenText: - TX_FAR _DayCareAllRightThenText + text_far _DayCareAllRightThenText DayCareComeAgainText: - TX_FAR _DayCareComeAgainText - db "@" + text_far _DayCareComeAgainText + text_end DayCareNoRoomForMonText: - TX_FAR _DayCareNoRoomForMonText - db "@" + text_far _DayCareNoRoomForMonText + text_end DayCareOnlyHaveOneMonText: - TX_FAR _DayCareOnlyHaveOneMonText - db "@" + text_far _DayCareOnlyHaveOneMonText + text_end DayCareCantAcceptMonWithHMText: - TX_FAR _DayCareCantAcceptMonWithHMText - db "@" + text_far _DayCareCantAcceptMonWithHMText + text_end DayCareHeresYourMonText: - TX_FAR _DayCareHeresYourMonText - db "@" + text_far _DayCareHeresYourMonText + text_end DayCareNotEnoughMoneyText: - TX_FAR _DayCareNotEnoughMoneyText - db "@" + text_far _DayCareNotEnoughMoneyText + text_end diff --git a/scripts/DiglettsCave.asm b/scripts/DiglettsCave.asm index 1d7b23f9..f9f2e590 100755 --- a/scripts/DiglettsCave.asm +++ b/scripts/DiglettsCave.asm @@ -2,4 +2,5 @@ DiglettsCave_Script: jp EnableAutoTextBoxDrawing DiglettsCave_TextPointers: - db "@" + + text_end ; unused diff --git a/scripts/DiglettsCaveRoute11.asm b/scripts/DiglettsCaveRoute11.asm index 54c3112e..648fe2bc 100755 --- a/scripts/DiglettsCaveRoute11.asm +++ b/scripts/DiglettsCaveRoute11.asm @@ -8,5 +8,5 @@ DiglettsCaveRoute11_TextPointers: dw DiglettsCaveEntranceRoute11Text1 DiglettsCaveEntranceRoute11Text1: - TX_FAR _DiglettsCaveEntRoute11Text1 - db "@" + text_far _DiglettsCaveEntRoute11Text1 + text_end diff --git a/scripts/DiglettsCaveRoute2.asm b/scripts/DiglettsCaveRoute2.asm index 5fe7777c..32f17d65 100755 --- a/scripts/DiglettsCaveRoute2.asm +++ b/scripts/DiglettsCaveRoute2.asm @@ -7,5 +7,5 @@ DiglettsCaveRoute2_TextPointers: dw DiglettsCaveRoute2Text1 DiglettsCaveRoute2Text1: - TX_FAR _DiglettsCaveRoute2Text1 - db "@" + text_far _DiglettsCaveRoute2Text1 + text_end diff --git a/scripts/FightingDojo.asm b/scripts/FightingDojo.asm index fc691dba..e5d0a0a7 100755 --- a/scripts/FightingDojo.asm +++ b/scripts/FightingDojo.asm @@ -30,25 +30,25 @@ FightingDojoScript1: CheckEvent EVENT_BEAT_KARATE_MASTER ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wcf0d], a ld a, [wYCoord] - cp $3 + cp 3 ret nz ld a, [wXCoord] - cp $4 + cp 4 ret nz ld a, $1 ld [wcf0d], a ld a, PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_LEFT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ret @@ -62,9 +62,9 @@ FightingDojoScript3: ld a, PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_LEFT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay .asm_5cde4 @@ -72,7 +72,7 @@ FightingDojoScript3: ld [wJoyIgnore], a SetEventRange EVENT_BEAT_KARATE_MASTER, EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a @@ -91,45 +91,17 @@ FightingDojo_TextPointers: dw FightingDojoText8 FightingDojoTrainerHeader0: - dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_0 - dw FightingDojoBattleText1 ; TextBeforeBattle - dw FightingDojoAfterBattleText1 ; TextAfterBattle - dw FightingDojoEndBattleText1 ; TextEndBattle - dw FightingDojoEndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_0, 4, FightingDojoBattleText1, FightingDojoEndBattleText1, FightingDojoAfterBattleText1 FightingDojoTrainerHeader1: - dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_1 - dw FightingDojoBattleText2 ; TextBeforeBattle - dw FightingDojoAfterBattleText2 ; TextAfterBattle - dw FightingDojoEndBattleText2 ; TextEndBattle - dw FightingDojoEndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_1, 4, FightingDojoBattleText2, FightingDojoEndBattleText2, FightingDojoAfterBattleText2 FightingDojoTrainerHeader2: - dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_2 - dw FightingDojoBattleText3 ; TextBeforeBattle - dw FightingDojoAfterBattleText3 ; TextAfterBattle - dw FightingDojoEndBattleText3 ; TextEndBattle - dw FightingDojoEndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_2, 3, FightingDojoBattleText3, FightingDojoEndBattleText3, FightingDojoAfterBattleText3 FightingDojoTrainerHeader3: - dbEventFlagBit EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_FIGHTING_DOJO_TRAINER_3 - dw FightingDojoBattleText4 ; TextBeforeBattle - dw FightingDojoAfterBattleText4 ; TextAfterBattle - dw FightingDojoEndBattleText4 ; TextEndBattle - dw FightingDojoEndBattleText4 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_FIGHTING_DOJO_TRAINER_3, 3, FightingDojoBattleText4, FightingDojoEndBattleText4, FightingDojoAfterBattleText4 + db -1 ; end FightingDojoText1: - TX_ASM + text_asm CheckEvent EVENT_DEFEATED_FIGHTING_DOJO jp nz, .continue1 CheckEventReuseA EVENT_BEAT_KARATE_MASTER @@ -142,7 +114,7 @@ FightingDojoText1: ld hl, FightingDojoText_5ce93 ld de, FightingDojoText_5ce93 call SaveEndBattleTextPointers - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -161,96 +133,96 @@ FightingDojoText1: jp TextScriptEnd FightingDojoText_5ce8e: - TX_FAR _FightingDojoText_5ce8e - db "@" + text_far _FightingDojoText_5ce8e + text_end FightingDojoText_5ce93: - TX_FAR _FightingDojoText_5ce93 - db "@" + text_far _FightingDojoText_5ce93 + text_end FightingDojoText8: - TX_FAR _FightingDojoText_5ce98 - db "@" + text_far _FightingDojoText_5ce98 + text_end FightingDojoText_5ce9d: - TX_FAR _FightingDojoText_5ce9d - db "@" + text_far _FightingDojoText_5ce9d + text_end FightingDojoText2: - TX_ASM + text_asm ld hl, FightingDojoTrainerHeader0 call TalkToTrainer jp TextScriptEnd FightingDojoBattleText1: - TX_FAR _FightingDojoBattleText1 - db "@" + text_far _FightingDojoBattleText1 + text_end FightingDojoEndBattleText1: - TX_FAR _FightingDojoEndBattleText1 - db "@" + text_far _FightingDojoEndBattleText1 + text_end FightingDojoAfterBattleText1: - TX_FAR _FightingDojoAfterBattleText1 - db "@" + text_far _FightingDojoAfterBattleText1 + text_end FightingDojoText3: - TX_ASM + text_asm ld hl, FightingDojoTrainerHeader1 call TalkToTrainer jp TextScriptEnd FightingDojoBattleText2: - TX_FAR _FightingDojoBattleText2 - db "@" + text_far _FightingDojoBattleText2 + text_end FightingDojoEndBattleText2: - TX_FAR _FightingDojoEndBattleText2 - db "@" + text_far _FightingDojoEndBattleText2 + text_end FightingDojoAfterBattleText2: - TX_FAR _FightingDojoAfterBattleText2 - db "@" + text_far _FightingDojoAfterBattleText2 + text_end FightingDojoText4: - TX_ASM + text_asm ld hl, FightingDojoTrainerHeader2 call TalkToTrainer jp TextScriptEnd FightingDojoBattleText3: - TX_FAR _FightingDojoBattleText3 - db "@" + text_far _FightingDojoBattleText3 + text_end FightingDojoEndBattleText3: - TX_FAR _FightingDojoEndBattleText3 - db "@" + text_far _FightingDojoEndBattleText3 + text_end FightingDojoAfterBattleText3: - TX_FAR _FightingDojoAfterBattleText3 - db "@" + text_far _FightingDojoAfterBattleText3 + text_end FightingDojoText5: - TX_ASM + text_asm ld hl, FightingDojoTrainerHeader3 call TalkToTrainer jp TextScriptEnd FightingDojoBattleText4: - TX_FAR _FightingDojoBattleText4 - db "@" + text_far _FightingDojoBattleText4 + text_end FightingDojoEndBattleText4: - TX_FAR _FightingDojoEndBattleText4 - db "@" + text_far _FightingDojoEndBattleText4 + text_end FightingDojoAfterBattleText4: - TX_FAR _FightingDojoAfterBattleText4 - db "@" + text_far _FightingDojoAfterBattleText4 + text_end FightingDojoText6: ; Hitmonlee Poké Ball - TX_ASM + text_asm CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN jr z, .GetMon ld hl, OtherHitmonText @@ -280,12 +252,12 @@ FightingDojoText6: jp TextScriptEnd WantHitmonleeText: - TX_FAR _WantHitmonleeText - db "@" + text_far _WantHitmonleeText + text_end FightingDojoText7: ; Hitmonchan Poké Ball - TX_ASM + text_asm CheckEitherEventSet EVENT_GOT_HITMONLEE, EVENT_GOT_HITMONCHAN jr z, .GetMon ld hl, OtherHitmonText @@ -315,9 +287,9 @@ FightingDojoText7: jp TextScriptEnd WantHitmonchanText: - TX_FAR _WantHitmonchanText - db "@" + text_far _WantHitmonchanText + text_end OtherHitmonText: - TX_FAR _OtherHitmonText - db "@" + text_far _OtherHitmonText + text_end diff --git a/scripts/FuchsiaBillsGrandpasHouse.asm b/scripts/FuchsiaBillsGrandpasHouse.asm index ca5f2c16..69ce1cf1 100755 --- a/scripts/FuchsiaBillsGrandpasHouse.asm +++ b/scripts/FuchsiaBillsGrandpasHouse.asm @@ -8,13 +8,13 @@ FuchsiaBillsGrandpasHouse_TextPointers: dw FuchsiaHouse1Text3 FuchsiaHouse1Text1: - TX_FAR _FuchsiaHouse1Text1 - db "@" + text_far _FuchsiaHouse1Text1 + text_end FuchsiaHouse1Text2: - TX_FAR _FuchsiaHouse1Text2 - db "@" + text_far _FuchsiaHouse1Text2 + text_end FuchsiaHouse1Text3: - TX_FAR _FuchsiaHouse1Text3 - db "@" + text_far _FuchsiaHouse1Text3 + text_end diff --git a/scripts/FuchsiaCity.asm b/scripts/FuchsiaCity.asm index d3f0ce32..ac9f273b 100755 --- a/scripts/FuchsiaCity.asm +++ b/scripts/FuchsiaCity.asm @@ -28,20 +28,20 @@ FuchsiaCity_TextPointers: dw FuchsiaCityText24 FuchsiaCityText1: - TX_FAR _FuchsiaCityText1 - db "@" + text_far _FuchsiaCityText1 + text_end FuchsiaCityText2: - TX_FAR _FuchsiaCityText2 - db "@" + text_far _FuchsiaCityText2 + text_end FuchsiaCityText3: - TX_FAR _FuchsiaCityText3 - db "@" + text_far _FuchsiaCityText3 + text_end FuchsiaCityText4: - TX_FAR _FuchsiaCityText4 - db "@" + text_far _FuchsiaCityText4 + text_end FuchsiaCityText5: FuchsiaCityText6: @@ -49,32 +49,32 @@ FuchsiaCityText7: FuchsiaCityText8: FuchsiaCityText9: FuchsiaCityText10: - TX_FAR _FuchsiaCityText5 - db "@" + text_far _FuchsiaCityText5 + text_end FuchsiaCityText12: FuchsiaCityText11: - TX_FAR _FuchsiaCityText11 - db "@" + text_far _FuchsiaCityText11 + text_end FuchsiaCityText13: - TX_FAR _FuchsiaCityText13 - db "@" + text_far _FuchsiaCityText13 + text_end FuchsiaCityText16: - TX_FAR _FuchsiaCityText16 - db "@" + text_far _FuchsiaCityText16 + text_end FuchsiaCityText17: - TX_FAR _FuchsiaCityText17 - db "@" + text_far _FuchsiaCityText17 + text_end FuchsiaCityText18: - TX_FAR _FuchsiaCityText18 - db "@" + text_far _FuchsiaCityText18 + text_end FuchsiaCityText19: - TX_ASM + text_asm ld hl, FuchsiaCityChanseyText call PrintText ld a, CHANSEY @@ -82,11 +82,11 @@ FuchsiaCityText19: jp TextScriptEnd FuchsiaCityChanseyText: - TX_FAR _FuchsiaCityChanseyText - db "@" + text_far _FuchsiaCityChanseyText + text_end FuchsiaCityText20: - TX_ASM + text_asm ld hl, FuchsiaCityVoltorbText call PrintText ld a, VOLTORB @@ -94,11 +94,11 @@ FuchsiaCityText20: jp TextScriptEnd FuchsiaCityVoltorbText: - TX_FAR _FuchsiaCityVoltorbText - db "@" + text_far _FuchsiaCityVoltorbText + text_end FuchsiaCityText21: - TX_ASM + text_asm ld hl, FuchsiaCityKangaskhanText call PrintText ld a, KANGASKHAN @@ -106,11 +106,11 @@ FuchsiaCityText21: jp TextScriptEnd FuchsiaCityKangaskhanText: - TX_FAR _FuchsiaCityKangaskhanText - db "@" + text_far _FuchsiaCityKangaskhanText + text_end FuchsiaCityText22: - TX_ASM + text_asm ld hl, FuchsiaCitySlowpokeText call PrintText ld a, SLOWPOKE @@ -118,11 +118,11 @@ FuchsiaCityText22: jp TextScriptEnd FuchsiaCitySlowpokeText: - TX_FAR _FuchsiaCitySlowpokeText - db "@" + text_far _FuchsiaCitySlowpokeText + text_end FuchsiaCityText23: - TX_ASM + text_asm ld hl, FuchsiaCityLaprasText call PrintText ld a, LAPRAS @@ -130,11 +130,11 @@ FuchsiaCityText23: jp TextScriptEnd FuchsiaCityLaprasText: - TX_FAR _FuchsiaCityLaprasText - db "@" + text_far _FuchsiaCityLaprasText + text_end FuchsiaCityText24: - TX_ASM + text_asm CheckEvent EVENT_GOT_DOME_FOSSIL jr nz, .asm_3b4e8 CheckEventReuseA EVENT_GOT_HELIX_FOSSIL @@ -157,13 +157,13 @@ FuchsiaCityText24: jp TextScriptEnd FuchsiaCityOmanyteText: - TX_FAR _FuchsiaCityOmanyteText - db "@" + text_far _FuchsiaCityOmanyteText + text_end FuchsiaCityKabutoText: - TX_FAR _FuchsiaCityKabutoText - db "@" + text_far _FuchsiaCityKabutoText + text_end FuchsiaCityText_19b2a: - TX_FAR _FuchsiaCityText_19b2a - db "@" + text_far _FuchsiaCityText_19b2a + text_end diff --git a/scripts/FuchsiaGoodRodHouse.asm b/scripts/FuchsiaGoodRodHouse.asm index 93a20e80..28f6d056 100755 --- a/scripts/FuchsiaGoodRodHouse.asm +++ b/scripts/FuchsiaGoodRodHouse.asm @@ -5,71 +5,62 @@ FuchsiaGoodRodHouse_TextPointers: dw FuchsiaHouse3Text1 FuchsiaHouse3Text1: - TX_ASM + text_asm ld a, [wd728] - bit 4, a - jr nz, .after - + bit 4, a ; got good rod? + jr nz, .got_item ld hl, FuchsiaHouse3Text_561bd call PrintText - call YesNoChoice ld a, [wCurrentMenuItem] and a jr nz, .refused - lb bc, GOOD_ROD, 1 call GiveItem - jr nc, .full - + jr nc, .bag_full ld hl, wd728 - set 4, [hl] - + set 4, [hl] ; got good rod ld hl, FuchsiaHouse3Text_561c2 - jr .talk - -.full + jr .done +.bag_full ld hl, FuchsiaHouse3Text_5621c - jr .talk - + jr .done .refused ld hl, FuchsiaHouse3Text_56212 - jr .talk - -.after + jr .done +.got_item ld hl, FuchsiaHouse3Text_56217 - -.talk +.done call PrintText jp TextScriptEnd FuchsiaHouse3Text_561bd: - TX_FAR _FuchsiaHouse3Text_561bd - db "@" + text_far _FuchsiaHouse3Text_561bd + text_end FuchsiaHouse3Text_561c2: - TX_FAR _FuchsiaHouse3Text_561c2 - TX_SFX_ITEM_1 - db "@" + text_far _FuchsiaHouse3Text_561c2 + sound_get_item_1 + text_end UnusedText_561c8: - para "つり こそ" - line "おとこの ロマン だ!" + para "つり こそ" + line "おとこの ロマン だ!" para "へぼいつりざおは" - line "コイキングしか つれ なんだが" - line "この いいつりざおなら" - line "もっと いいもんが つれるんじゃ!" + line "コイキングしか つれ なんだが" + line "この いいつりざおなら" + line "もっと いいもんが つれるんじゃ!" done FuchsiaHouse3Text_56212: - TX_FAR _FuchsiaHouse3Text_56212 - db "@" + text_far _FuchsiaHouse3Text_56212 + text_end FuchsiaHouse3Text_56217: - TX_FAR _FuchsiaHouse3Text_56217 - db "@" + text_far _FuchsiaHouse3Text_56217 + text_end FuchsiaHouse3Text_5621c: - TX_FAR _FuchsiaHouse3Text_5621c - db "@" + text_far _FuchsiaHouse3Text_5621c + text_end diff --git a/scripts/FuchsiaGym.asm b/scripts/FuchsiaGym.asm index 15f016af..6f4f28fc 100755 --- a/scripts/FuchsiaGym.asm +++ b/scripts/FuchsiaGym.asm @@ -1,5 +1,5 @@ FuchsiaGym_Script: - call FuchsiaGymScript_75453 + call .LoadNames call EnableAutoTextBoxDrawing ld hl, FuchsiaGymTrainerHeader0 ld de, FuchsiaGym_ScriptPointers @@ -8,19 +8,20 @@ FuchsiaGym_Script: ld [wFuchsiaGymCurScript], a ret -FuchsiaGymScript_75453: +.LoadNames: ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] ret z - ld hl, Gym5CityName - ld de, Gym5LeaderName + ld hl, .CityName + ld de, .LeaderName call LoadGymLeaderAndCityName ret -Gym5CityName: +.CityName: db "FUCHSIA CITY@" -Gym5LeaderName: + +.LeaderName: db "KOGA@" FuchsiaGymScript_75477: @@ -44,26 +45,26 @@ FuchsiaGymScript3: ld [wJoyIgnore], a FuchsiaGymScript3_75497: ld a, $9 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_KOGA - lb bc, TM_06, 1 + lb bc, TM_TOXIC, 1 call GiveItem jr nc, .BagFull ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM06 jr .gymVictory .BagFull ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges - set 4, [hl] + set BIT_SOULBADGE, [hl] ld hl, wBeatGymFlags - set 4, [hl] + set BIT_SOULBADGE, [hl] ; deactivate gym trainers SetEventRange EVENT_BEAT_FUCHSIA_GYM_TRAINER_0, EVENT_BEAT_FUCHSIA_GYM_TRAINER_5 @@ -84,63 +85,21 @@ FuchsiaGym_TextPointers: dw FuchsiaGymText11 FuchsiaGymTrainerHeader0: - dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_0 - dw FuchsiaGymBattleText1 ; TextBeforeBattle - dw FuchsiaGymAfterBattleText1 ; TextAfterBattle - dw FuchsiaGymEndBattleText1 ; TextEndBattle - dw FuchsiaGymEndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_0, 2, FuchsiaGymBattleText1, FuchsiaGymEndBattleText1, FuchsiaGymAfterBattleText1 FuchsiaGymTrainerHeader1: - dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_1 - dw FuchsiaGymBattleText2 ; TextBeforeBattle - dw FuchsiaGymAfterBattleText2 ; TextAfterBattle - dw FuchsiaGymEndBattleText2 ; TextEndBattle - dw FuchsiaGymEndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_1, 2, FuchsiaGymBattleText2, FuchsiaGymEndBattleText2, FuchsiaGymAfterBattleText2 FuchsiaGymTrainerHeader2: - dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_2 - dw FuchsiaGymBattleText3 ; TextBeforeBattle - dw FuchsiaGymAfterBattleText3 ; TextAfterBattle - dw FuchsiaGymEndBattleText3 ; TextEndBattle - dw FuchsiaGymEndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_2, 4, FuchsiaGymBattleText3, FuchsiaGymEndBattleText3, FuchsiaGymAfterBattleText3 FuchsiaGymTrainerHeader3: - dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_3 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_3 - dw FuchsiaGymBattleText4 ; TextBeforeBattle - dw FuchsiaGymAfterBattleText4 ; TextAfterBattle - dw FuchsiaGymEndBattleText4 ; TextEndBattle - dw FuchsiaGymEndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_3, 2, FuchsiaGymBattleText4, FuchsiaGymEndBattleText4, FuchsiaGymAfterBattleText4 FuchsiaGymTrainerHeader4: - dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_4 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_4 - dw FuchsiaGymBattleText5 ; TextBeforeBattle - dw FuchsiaGymAfterBattleText5 ; TextAfterBattle - dw FuchsiaGymEndBattleText5 ; TextEndBattle - dw FuchsiaGymEndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_4, 2, FuchsiaGymBattleText5, FuchsiaGymEndBattleText5, FuchsiaGymAfterBattleText5 FuchsiaGymTrainerHeader5: - dbEventFlagBit EVENT_BEAT_FUCHSIA_GYM_TRAINER_5 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_FUCHSIA_GYM_TRAINER_5 - dw FuchsiaGymBattleText6 ; TextBeforeBattle - dw FuchsiaGymAfterBattleText6 ; TextAfterBattle - dw FuchsiaGymEndBattleText6 ; TextEndBattle - dw FuchsiaGymEndBattleText6 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_FUCHSIA_GYM_TRAINER_5, 2, FuchsiaGymBattleText6, FuchsiaGymEndBattleText6, FuchsiaGymAfterBattleText6 + db -1 ; end FuchsiaGymText1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_KOGA jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM06 @@ -161,157 +120,157 @@ FuchsiaGymText1: ld hl, KogaAfterBattleText ld de, KogaAfterBattleText call SaveEndBattleTextPointers - ld a, [H_SPRITEINDEX] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $5 ld [wGymLeaderNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wFuchsiaGymCurScript], a .done jp TextScriptEnd KogaBeforeBattleText: - TX_FAR _KogaBeforeBattleText - db "@" + text_far _KogaBeforeBattleText + text_end KogaAfterBattleText: - TX_FAR _KogaAfterBattleText - db "@" + text_far _KogaAfterBattleText + text_end KogaExplainToxicText: - TX_FAR _KogaExplainToxicText - db "@" + text_far _KogaExplainToxicText + text_end FuchsiaGymText9: - TX_FAR _FuchsiaGymText9 - db "@" + text_far _FuchsiaGymText9 + text_end FuchsiaGymText10: - TX_FAR _ReceivedTM06Text - TX_SFX_KEY_ITEM + text_far _ReceivedTM06Text + sound_get_key_item TM06ExplanationText: - TX_FAR _TM06ExplanationText - db "@" + text_far _TM06ExplanationText + text_end FuchsiaGymText11: - TX_FAR _TM06NoRoomText - db "@" + text_far _TM06NoRoomText + text_end FuchsiaGymText2: - TX_ASM + text_asm ld hl, FuchsiaGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd FuchsiaGymBattleText1: - TX_FAR _FuchsiaGymBattleText1 - db "@" + text_far _FuchsiaGymBattleText1 + text_end FuchsiaGymEndBattleText1: - TX_FAR _FuchsiaGymEndBattleText1 - db "@" + text_far _FuchsiaGymEndBattleText1 + text_end FuchsiaGymAfterBattleText1: - TX_FAR _FuchsiaGymAfterBattleText1 - db "@" + text_far _FuchsiaGymAfterBattleText1 + text_end FuchsiaGymText3: - TX_ASM + text_asm ld hl, FuchsiaGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd FuchsiaGymBattleText2: - TX_FAR _FuchsiaGymBattleText2 - db "@" + text_far _FuchsiaGymBattleText2 + text_end FuchsiaGymEndBattleText2: - TX_FAR _FuchsiaGymEndBattleText2 - db "@" + text_far _FuchsiaGymEndBattleText2 + text_end FuchsiaGymAfterBattleText2: - TX_FAR _FuchsiaGymAfterBattleText2 - db "@" + text_far _FuchsiaGymAfterBattleText2 + text_end FuchsiaGymText4: - TX_ASM + text_asm ld hl, FuchsiaGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd FuchsiaGymBattleText3: - TX_FAR _FuchsiaGymBattleText3 - db "@" + text_far _FuchsiaGymBattleText3 + text_end FuchsiaGymEndBattleText3: - TX_FAR _FuchsiaGymEndBattleText3 - db "@" + text_far _FuchsiaGymEndBattleText3 + text_end FuchsiaGymAfterBattleText3: - TX_FAR _FuchsiaGymAfterBattleText3 - db "@" + text_far _FuchsiaGymAfterBattleText3 + text_end FuchsiaGymText5: - TX_ASM + text_asm ld hl, FuchsiaGymTrainerHeader3 call TalkToTrainer jp TextScriptEnd FuchsiaGymBattleText4: - TX_FAR _FuchsiaGymBattleText4 - db "@" + text_far _FuchsiaGymBattleText4 + text_end FuchsiaGymEndBattleText4: - TX_FAR _FuchsiaGymEndBattleText4 - db "@" + text_far _FuchsiaGymEndBattleText4 + text_end FuchsiaGymAfterBattleText4: - TX_FAR _FuchsiaGymAfterBattleText4 - db "@" + text_far _FuchsiaGymAfterBattleText4 + text_end FuchsiaGymText6: - TX_ASM + text_asm ld hl, FuchsiaGymTrainerHeader4 call TalkToTrainer jp TextScriptEnd FuchsiaGymBattleText5: - TX_FAR _FuchsiaGymBattleText5 - db "@" + text_far _FuchsiaGymBattleText5 + text_end FuchsiaGymEndBattleText5: - TX_FAR _FuchsiaGymEndBattleText5 - db "@" + text_far _FuchsiaGymEndBattleText5 + text_end FuchsiaGymAfterBattleText5: - TX_FAR _FuchsiaGymAfterBattleText5 - db "@" + text_far _FuchsiaGymAfterBattleText5 + text_end FuchsiaGymText7: - TX_ASM + text_asm ld hl, FuchsiaGymTrainerHeader5 call TalkToTrainer jp TextScriptEnd FuchsiaGymBattleText6: - TX_FAR _FuchsiaGymBattleText6 - db "@" + text_far _FuchsiaGymBattleText6 + text_end FuchsiaGymEndBattleText6: - TX_FAR _FuchsiaGymEndBattleText6 - db "@" + text_far _FuchsiaGymEndBattleText6 + text_end FuchsiaGymAfterBattleText6: - TX_FAR _FuchsiaGymAfterBattleText6 - db "@" + text_far _FuchsiaGymAfterBattleText6 + text_end FuchsiaGymText8: - TX_ASM + text_asm CheckEvent EVENT_BEAT_KOGA ld hl, FuchsiaGymText_75653 jr nz, .asm_50671 @@ -321,9 +280,9 @@ FuchsiaGymText8: jp TextScriptEnd FuchsiaGymText_7564e: - TX_FAR _FuchsiaGymText_7564e - db "@" + text_far _FuchsiaGymText_7564e + text_end FuchsiaGymText_75653: - TX_FAR _FuchsiaGymText_75653 - db "@" + text_far _FuchsiaGymText_75653 + text_end diff --git a/scripts/FuchsiaMart.asm b/scripts/FuchsiaMart.asm index 50786127..75e9a45d 100755 --- a/scripts/FuchsiaMart.asm +++ b/scripts/FuchsiaMart.asm @@ -8,9 +8,9 @@ FuchsiaMart_TextPointers: dw FuchsiaMartText3 FuchsiaMartText2: - TX_FAR _FuchsiaMartText2 - db "@" + text_far _FuchsiaMartText2 + text_end FuchsiaMartText3: - TX_FAR _FuchsiaMartText3 - db "@" + text_far _FuchsiaMartText3 + text_end diff --git a/scripts/FuchsiaMeetingRoom.asm b/scripts/FuchsiaMeetingRoom.asm index 95ac12fa..4fc05b1f 100755 --- a/scripts/FuchsiaMeetingRoom.asm +++ b/scripts/FuchsiaMeetingRoom.asm @@ -8,13 +8,13 @@ FuchsiaMeetingRoom_TextPointers: dw FuchsiaMeetingRoomText3 FuchsiaMeetingRoomText1: - TX_FAR _FuchsiaMeetingRoomText1 - db "@" + text_far _FuchsiaMeetingRoomText1 + text_end FuchsiaMeetingRoomText2: - TX_FAR _FuchsiaMeetingRoomText2 - db "@" + text_far _FuchsiaMeetingRoomText2 + text_end FuchsiaMeetingRoomText3: - TX_FAR _FuchsiaMeetingRoomText3 - db "@" + text_far _FuchsiaMeetingRoomText3 + text_end diff --git a/scripts/FuchsiaPokecenter.asm b/scripts/FuchsiaPokecenter.asm index 40aa3d45..2d98ca17 100755 --- a/scripts/FuchsiaPokecenter.asm +++ b/scripts/FuchsiaPokecenter.asm @@ -10,20 +10,20 @@ FuchsiaPokecenter_TextPointers: dw FuchsiaPokecenterText5 FuchsiaHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse FuchsiaPokecenterText2: - TX_FAR _FuchsiaPokecenterText1 - db "@" + text_far _FuchsiaPokecenterText1 + text_end FuchsiaPokecenterText3: - TX_FAR _FuchsiaPokecenterText3 - db "@" + text_far _FuchsiaPokecenterText3 + text_end FuchsiaTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist FuchsiaPokecenterText5: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/GameCorner.asm b/scripts/GameCorner.asm index e2b7690c..b2d4d96a 100755 --- a/scripts/GameCorner.asm +++ b/scripts/GameCorner.asm @@ -12,7 +12,7 @@ CeladonGameCornerScript_48bcf: res 6, [hl] ret z call Random - ld a, [hRandomAdd] + ldh a, [hRandomAdd] cp $7 jr nc, .asm_48be2 ld a, $8 @@ -57,29 +57,29 @@ CeladonGameCornerScript1: ld a, $f0 ld [wJoyIgnore], a ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $b - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld de, MovementData_48c5a ld a, [wYCoord] - cp $6 + cp 6 jr nz, .asm_48c43 ld de, MovementData_48c63 jr .asm_48c4d .asm_48c43 ld a, [wXCoord] - cp $8 + cp 8 jr nz, .pikachu ld de, MovementData_48c63 jr .asm_48c4d .pikachu - callab Func_f1f23 + callfar Func_f1f23 ld de, MovementData_48c5a .asm_48c4d ld a, $b - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite ld a, $2 ld [wGameCornerCurScript], a @@ -94,7 +94,7 @@ MovementData_48c5a: db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT - db $FF + db -1 ; end MovementData_48c63: db NPC_MOVEMENT_RIGHT @@ -102,7 +102,7 @@ MovementData_48c63: db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT - db $FF + db -1 ; end CeladonGameCornerScript2: ld a, [wd730] @@ -136,11 +136,11 @@ GameCorner_TextPointers: dw CeladonGameCornerText13 CeladonGameCornerText1: - TX_FAR _CeladonGameCornerText1 - db "@" + text_far _CeladonGameCornerText1 + text_end CeladonGameCornerText2: - TX_ASM + text_asm call CeladonGameCornerScript_48f1e ld hl, CeladonGameCornerText_48d22 call PrintText @@ -154,29 +154,29 @@ CeladonGameCornerText2: call Has9990Coins jr nc, .asm_48d14 xor a - ld [hMoney], a - ld [hMoney + 2], a + ldh [hMoney], a + ldh [hMoney + 2], a ld a, $10 - ld [hMoney + 1], a + ldh [hMoney + 1], a call HasEnoughMoney jr nc, .asm_48cdb ld hl, CeladonGameCornerText_48d31 jr .asm_48d1c .asm_48cdb xor a - ld [hMoney], a - ld [hMoney + 2], a + ldh [hMoney], a + ldh [hMoney + 2], a ld a, $10 - ld [hMoney + 1], a + ldh [hMoney + 1], a ld hl, hMoney + 2 ld de, wPlayerMoney + 2 ld c, $3 predef SubBCDPredef xor a - ld [hUnusedCoinsByte], a - ld [hCoins], a + ldh [hUnusedCoinsByte], a + ldh [hCoins], a ld a, $50 - ld [hCoins + 1], a + ldh [hCoins + 1], a ld de, wPlayerCoins + 1 ld hl, hCoins + 1 ld c, $2 @@ -197,39 +197,39 @@ CeladonGameCornerText2: jp TextScriptEnd CeladonGameCornerText_48d22: - TX_FAR _CeladonGameCornerText_48d22 - db "@" + text_far _CeladonGameCornerText_48d22 + text_end CeladonGameCornerText_48d27: - TX_FAR _CeladonGameCornerText_48d27 - db "@" + text_far _CeladonGameCornerText_48d27 + text_end CeladonGameCornerText_48d2c: - TX_FAR _CeladonGameCornerText_48d2c - db "@" + text_far _CeladonGameCornerText_48d2c + text_end CeladonGameCornerText_48d31: - TX_FAR _CeladonGameCornerText_48d31 - db "@" + text_far _CeladonGameCornerText_48d31 + text_end CeladonGameCornerText_48d36: - TX_FAR _CeladonGameCornerText_48d36 - db "@" + text_far _CeladonGameCornerText_48d36 + text_end CeladonGameCornerText_48d3b: - TX_FAR _CeladonGameCornerText_48d3b - db "@" + text_far _CeladonGameCornerText_48d3b + text_end CeladonGameCornerText3: - TX_FAR _CeladonGameCornerText3 - db "@" + text_far _CeladonGameCornerText3 + text_end CeladonGameCornerText4: - TX_FAR _CeladonGameCornerText4 - db "@" + text_far _CeladonGameCornerText4 + text_end CeladonGameCornerText5: - TX_ASM + text_asm CheckEvent EVENT_GOT_10_COINS jr nz, .asm_48d89 ld hl, CeladonGameCornerText_48d9c @@ -240,10 +240,10 @@ CeladonGameCornerText5: call Has9990Coins jr nc, .asm_48d8e xor a - ld [hUnusedCoinsByte], a - ld [hCoins], a + ldh [hUnusedCoinsByte], a + ldh [hCoins], a ld a, $10 - ld [hCoins + 1], a + ldh [hCoins + 1], a ld de, wPlayerCoins + 1 ld hl, hCoins + 1 ld c, $2 @@ -266,28 +266,28 @@ CeladonGameCornerText5: jp TextScriptEnd CeladonGameCornerText_48d9c: - TX_FAR _CeladonGameCornerText_48d9c - db "@" + text_far _CeladonGameCornerText_48d9c + text_end Received10CoinsText: - TX_FAR _Received10CoinsText - TX_SFX_ITEM_1 - db "@" + text_far _Received10CoinsText + sound_get_item_1 + text_end CeladonGameCornerText_48da7: - TX_FAR _CeladonGameCornerText_48da7 - db "@" + text_far _CeladonGameCornerText_48da7 + text_end CeladonGameCornerText_48dac: - TX_FAR _CeladonGameCornerText_48dac - db "@" + text_far _CeladonGameCornerText_48dac + text_end CeladonGameCornerText6: - TX_FAR _CeladonGameCornerText6 - db "@" + text_far _CeladonGameCornerText6 + text_end CeladonGameCornerText7: - TX_ASM + text_asm CheckEvent EVENT_BEAT_ERIKA ld hl, CeladonGameCornerText_48dca jr z, .asm_48dc4 @@ -297,19 +297,19 @@ CeladonGameCornerText7: jp TextScriptEnd CeladonGameCornerText_48dca: - TX_FAR _CeladonGameCornerText_48dca - db "@" + text_far _CeladonGameCornerText_48dca + text_end CeladonGameCornerText_48dcf: - TX_FAR _CeladonGameCornerText_48dcf - db "@" + text_far _CeladonGameCornerText_48dcf + text_end CeladonGameCornerText8: - TX_FAR _CeladonGameCornerText8 - db "@" + text_far _CeladonGameCornerText8 + text_end CeladonGameCornerText9: - TX_ASM + text_asm CheckEvent EVENT_GOT_20_COINS_2 jr nz, .asm_48e13 ld hl, CeladonGameCornerText_48e26 @@ -320,10 +320,10 @@ CeladonGameCornerText9: call Has9990Coins jr nc, .asm_48e18 xor a - ld [hUnusedCoinsByte], a - ld [hCoins], a + ldh [hUnusedCoinsByte], a + ldh [hCoins], a ld a, $20 - ld [hCoins + 1], a + ldh [hCoins + 1], a ld de, wPlayerCoins + 1 ld hl, hCoins + 1 ld c, $2 @@ -344,24 +344,24 @@ CeladonGameCornerText9: jp TextScriptEnd CeladonGameCornerText_48e26: - TX_FAR _CeladonGameCornerText_48e26 - db "@" + text_far _CeladonGameCornerText_48e26 + text_end Received20CoinsText: - TX_FAR _Received20CoinsText - TX_SFX_ITEM_1 - db "@" + text_far _Received20CoinsText + sound_get_item_1 + text_end CeladonGameCornerText_48e31: - TX_FAR _CeladonGameCornerText_48e31 - db "@" + text_far _CeladonGameCornerText_48e31 + text_end CeladonGameCornerText_48e36: - TX_FAR _CeladonGameCornerText_48e36 - db "@" + text_far _CeladonGameCornerText_48e36 + text_end CeladonGameCornerText10: - TX_ASM + text_asm CheckEvent EVENT_GOT_20_COINS jr nz, .asm_48e75 ld hl, CeladonGameCornerText_48e88 @@ -372,10 +372,10 @@ CeladonGameCornerText10: call Has9990Coins jr z, .asm_48e7a xor a - ld [hUnusedCoinsByte], a - ld [hCoins], a + ldh [hUnusedCoinsByte], a + ldh [hCoins], a ld a, $20 - ld [hCoins + 1], a + ldh [hCoins + 1], a ld de, wPlayerCoins + 1 ld hl, hCoins + 1 ld c, $2 @@ -396,24 +396,24 @@ CeladonGameCornerText10: jp TextScriptEnd CeladonGameCornerText_48e88: - TX_FAR _CeladonGameCornerText_48e88 - db "@" + text_far _CeladonGameCornerText_48e88 + text_end CeladonGameCornerText_48e8d: - TX_FAR _CeladonGameCornerText_48e8d - TX_SFX_ITEM_1 - db "@" + text_far _CeladonGameCornerText_48e8d + sound_get_item_1 + text_end CeladonGameCornerText_48e93: - TX_FAR _CeladonGameCornerText_48e93 - db "@" + text_far _CeladonGameCornerText_48e93 + text_end CeladonGameCornerText_48e98: - TX_FAR _CeladonGameCornerText_48e98 - db "@" + text_far _CeladonGameCornerText_48e98 + text_end CeladonGameCornerText11: - TX_ASM + text_asm ld hl, CeladonGameCornerText_48ece call PrintText ld hl, wd72d @@ -422,32 +422,32 @@ CeladonGameCornerText11: ld hl, CeladonGameCornerText_48ed3 ld de, CeladonGameCornerText_48ed3 call SaveEndBattleTextPointers - ld a, [H_SPRITEINDEX] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters xor a - ld [hJoyHeld], a - ld [hJoyPressed], a - ld [hJoyReleased], a + ldh [hJoyHeld], a + ldh [hJoyPressed], a + ldh [hJoyReleased], a ld a, $1 ld [wGameCornerCurScript], a jp TextScriptEnd CeladonGameCornerText_48ece: - TX_FAR _CeladonGameCornerText_48ece - db "@" + text_far _CeladonGameCornerText_48ece + text_end CeladonGameCornerText_48ed3: - TX_FAR _CeladonGameCornerText_48ed3 - db "@" + text_far _CeladonGameCornerText_48ed3 + text_end CeladonGameCornerText13: - TX_FAR _CeladonGameCornerText_48ed8 - db "@" + text_far _CeladonGameCornerText_48ed8 + text_end CeladonGameCornerText12: - TX_ASM + text_asm ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, CeladonGameCornerText_48f09 @@ -464,44 +464,44 @@ CeladonGameCornerText12: jp TextScriptEnd CeladonGameCornerText_48f09: - TX_FAR _CeladonGameCornerText_48f09 - TX_ASM + text_far _CeladonGameCornerText_48f09 + text_asm ld a, SFX_SWITCH call PlaySound call WaitForSoundToFinish jp TextScriptEnd CeladonGameCornerText_48f19: - TX_FAR _CeladonGameCornerText_48f19 - db "@" + text_far _CeladonGameCornerText_48f19 + text_end CeladonGameCornerScript_48f1e: ld hl, wd730 set 6, [hl] - coord hl, 11, 0 + hlcoord 11, 0 lb bc, 5, 7 call TextBoxBorder call UpdateSprites - coord hl, 12, 1 + hlcoord 12, 1 lb bc, 4, 7 call ClearScreenArea - coord hl, 12, 2 + hlcoord 12, 2 ld de, GameCornerMoneyText call PlaceString - coord hl, 12, 3 + hlcoord 12, 3 ld de, GameCornerBlankText1 call PlaceString - coord hl, 12, 3 + hlcoord 12, 3 ld de, wPlayerMoney ld c, 3 | MONEY_SIGN | LEADING_ZEROES call PrintBCDNumber - coord hl, 12, 4 + hlcoord 12, 4 ld de, GameCornerCoinText call PlaceString - coord hl, 12, 5 + hlcoord 12, 5 ld de, GameCornerBlankText2 call PlaceString - coord hl, 15, 5 + hlcoord 15, 5 ld de, wPlayerCoins ld c, $82 call PrintBCDNumber @@ -523,7 +523,7 @@ GameCornerBlankText2: Has9990Coins: ld a, $99 - ld [hCoins], a + ldh [hCoins], a ld a, $90 - ld [hCoins + 1], a + ldh [hCoins + 1], a jp HasEnoughCoins diff --git a/scripts/GameCorner2.asm b/scripts/GameCorner2.asm index f8d25905..3571e9d9 100755 --- a/scripts/GameCorner2.asm +++ b/scripts/GameCorner2.asm @@ -1,4 +1,4 @@ -Func_f1f23: +Func_f1f23:: ld hl, PikachuMovementData_f1f2c ld b, SPRITE_FACING_DOWN call TryApplyPikachuMovementData diff --git a/scripts/GameCornerPrizeRoom.asm b/scripts/GameCornerPrizeRoom.asm index e6cf6f0d..c8dddf71 100755 --- a/scripts/GameCornerPrizeRoom.asm +++ b/scripts/GameCornerPrizeRoom.asm @@ -9,12 +9,12 @@ GameCornerPrizeRoom_TextPointers: dw CeladonPrizeRoomText3 CeladonPrizeRoomText1: - TX_FAR _CeladonPrizeRoomText1 - db "@" + text_far _CeladonPrizeRoomText1 + text_end CeladonPrizeRoomText2: - TX_FAR _CeladonPrizeRoomText2 - db "@" + text_far _CeladonPrizeRoomText2 + text_end CeladonPrizeRoomText3: - TX_PRIZE_VENDOR + script_prize_vendor diff --git a/scripts/HallOfFame.asm b/scripts/HallOfFame.asm index af424089..fd13719b 100755 --- a/scripts/HallOfFame.asm +++ b/scripts/HallOfFame.asm @@ -45,7 +45,7 @@ HallofFameRoomScript2: ld [wHallOfFameCurScript], a ld a, PALLET_TOWN ld [wLastBlackoutMap], a - callba SaveSAVtoSRAM + farcall SaveSAVtoSRAM ld b, 5 .delayLoop ld c, 600 / 5 @@ -69,8 +69,8 @@ HallofFameRoomScript0: ret RLEMovement5a528: - db D_UP,$5 - db $ff + db D_UP, 5 + db -1 ; end HallofFameRoomScript1: ld a, [wSimulatedJoypadStatesIndex] @@ -79,10 +79,10 @@ HallofFameRoomScript1: ld a, PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld a, SPRITE_FACING_LEFT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call Delay3 xor a @@ -90,7 +90,7 @@ HallofFameRoomScript1: inc a ; PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff ld [wJoyIgnore], a @@ -105,5 +105,5 @@ HallOfFame_TextPointers: dw HallofFameRoomText1 HallofFameRoomText1: - TX_FAR _HallofFameRoomText1 - db "@" + text_far _HallofFameRoomText1 + text_end diff --git a/scripts/IndigoPlateauLobby.asm b/scripts/IndigoPlateauLobby.asm index d618d155..0a532d9a 100755 --- a/scripts/IndigoPlateauLobby.asm +++ b/scripts/IndigoPlateauLobby.asm @@ -23,20 +23,20 @@ IndigoPlateauLobby_TextPointers: dw IndigoPlateauLobbyText6 IndigoHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse IndigoPlateauLobbyText2: - TX_FAR _IndigoPlateauLobbyText2 - db "@" + text_far _IndigoPlateauLobbyText2 + text_end IndigoPlateauLobbyText3: - TX_FAR _IndigoPlateauLobbyText3 - db "@" + text_far _IndigoPlateauLobbyText3 + text_end IndigoTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist IndigoPlateauLobbyText6: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/LancesRoom.asm b/scripts/LancesRoom.asm index aec555a3..68d2020e 100755 --- a/scripts/LancesRoom.asm +++ b/scripts/LancesRoom.asm @@ -58,12 +58,12 @@ LanceScript0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, [wCoordIndex] cp $3 ; Is player standing next to Lance's sprite? jr nc, .notStandingNextToLance ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID .notStandingNextToLance cp $5 ; Is player standing on the entrance staircase? @@ -77,12 +77,12 @@ LanceScript0: jp LanceShowOrHideEntranceBlocks LanceTriggerMovementCoords: - db $01,$05 - db $02,$06 - db $0B,$05 - db $0B,$06 - db $10,$18 - db $FF + dbmapcoord 5, 1 + dbmapcoord 6, 2 + dbmapcoord 5, 11 + dbmapcoord 6, 11 + dbmapcoord 24, 16 + db -1 ; end LanceScript2: call EndTrainerBattle @@ -90,7 +90,7 @@ LanceScript2: cp $ff jp z, ResetLanceScript ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID WalkToLance: @@ -109,11 +109,11 @@ WalkToLance: ret WalkToLance_RLEList: - db D_UP, $0D - db D_LEFT, $0C - db D_DOWN, $07 - db D_LEFT, $06 - db $FF + db D_UP, 13 + db D_LEFT, 12 + db D_DOWN, 7 + db D_LEFT, 6 + db -1 ; end LanceScript3: ld a, [wSimulatedJoypadStatesIndex] @@ -130,32 +130,25 @@ LancesRoom_TextPointers: dw LanceText1 LanceTrainerHeader0: - dbEventFlagBit EVENT_BEAT_LANCES_ROOM_TRAINER_0 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_LANCES_ROOM_TRAINER_0 - dw LanceBeforeBattleText ; TextBeforeBattle - dw LanceAfterBattleText ; TextAfterBattle - dw LanceEndBattleText ; TextEndBattle - dw LanceEndBattleText ; TextEndBattle - - db $ff + trainer EVENT_BEAT_LANCES_ROOM_TRAINER_0, 0, LanceBeforeBattleText, LanceEndBattleText, LanceAfterBattleText + db -1 ; end LanceText1: - TX_ASM + text_asm ld hl, LanceTrainerHeader0 call TalkToTrainer jp TextScriptEnd LanceBeforeBattleText: - TX_FAR _LanceBeforeBattleText - db "@" + text_far _LanceBeforeBattleText + text_end LanceEndBattleText: - TX_FAR _LanceEndBattleText - db "@" + text_far _LanceEndBattleText + text_end LanceAfterBattleText: - TX_FAR _LanceAfterBattleText - TX_ASM + text_far _LanceAfterBattleText + text_asm SetEvent EVENT_BEAT_LANCE jp TextScriptEnd diff --git a/scripts/LavenderCuboneHouse.asm b/scripts/LavenderCuboneHouse.asm index ff5aa732..69d74ede 100755 --- a/scripts/LavenderCuboneHouse.asm +++ b/scripts/LavenderCuboneHouse.asm @@ -7,29 +7,29 @@ LavenderCuboneHouse_TextPointers: dw LavenderHouse2Text2 LavenderHouse2Text1: - TX_FAR _LavenderHouse2Text1 - TX_ASM + text_far _LavenderHouse2Text1 + text_asm ld a, CUBONE call PlayCry jp TextScriptEnd LavenderHouse2Text2: - TX_ASM + text_asm CheckEvent EVENT_RESCUED_MR_FUJI - jr nz, .asm_65711 + jr nz, .rescued_mr_fuji ld hl, LavenderHouse2Text_1d9dc call PrintText - jr .asm_64be1 -.asm_65711 + jr .done +.rescued_mr_fuji ld hl, LavenderHouse2Text_1d9e1 call PrintText -.asm_64be1 +.done jp TextScriptEnd LavenderHouse2Text_1d9dc: - TX_FAR _LavenderHouse2Text_1d9dc - db "@" + text_far _LavenderHouse2Text_1d9dc + text_end LavenderHouse2Text_1d9e1: - TX_FAR _LavenderHouse2Text_1d9e1 - db "@" + text_far _LavenderHouse2Text_1d9e1 + text_end diff --git a/scripts/LavenderMart.asm b/scripts/LavenderMart.asm index 47330e5d..2b67aaa6 100755 --- a/scripts/LavenderMart.asm +++ b/scripts/LavenderMart.asm @@ -7,11 +7,11 @@ LavenderMart_TextPointers: dw LavenderMartText3 LavenderMartText2: - TX_FAR _LavenderMartText2 - db "@" + text_far _LavenderMartText2 + text_end LavenderMartText3: - TX_ASM + text_asm CheckEvent EVENT_RESCUED_MR_FUJI jr nz, .Nugget ld hl, .ReviveText @@ -24,9 +24,9 @@ LavenderMartText3: jp TextScriptEnd .ReviveText - TX_FAR _LavenderMartReviveText - db "@" + text_far _LavenderMartReviveText + text_end .NuggetText - TX_FAR _LavenderMartNuggetText - db "@" + text_far _LavenderMartNuggetText + text_end diff --git a/scripts/LavenderPokecenter.asm b/scripts/LavenderPokecenter.asm index 21270313..a15bfcfa 100755 --- a/scripts/LavenderPokecenter.asm +++ b/scripts/LavenderPokecenter.asm @@ -10,20 +10,20 @@ LavenderPokecenter_TextPointers: dw LavenderPokecenterText5 LavenderTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist LavenderHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse LavenderPokecenterText2: - TX_FAR _LavenderPokecenterText2 - db "@" + text_far _LavenderPokecenterText2 + text_end LavenderPokecenterText3: - TX_FAR _LavenderPokecenterText3 - db "@" + text_far _LavenderPokecenterText3 + text_end LavenderPokecenterText5: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/LavenderTown.asm b/scripts/LavenderTown.asm index c23996e9..d0c66208 100755 --- a/scripts/LavenderTown.asm +++ b/scripts/LavenderTown.asm @@ -13,51 +13,51 @@ LavenderTown_TextPointers: dw LavenderTownText9 LavenderTownText1: - TX_ASM + text_asm ld hl, LavenderTownText_4413c call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a ld hl, LavenderTownText_44146 - jr nz, .asm_40831 + jr nz, .got_text ld hl, LavenderTownText_44141 -.asm_40831 +.got_text call PrintText jp TextScriptEnd LavenderTownText_4413c: - TX_FAR _LavenderTownText_4413c - db "@" + text_far _LavenderTownText_4413c + text_end LavenderTownText_44141: - TX_FAR _LavenderTownText_44141 - db "@" + text_far _LavenderTownText_44141 + text_end LavenderTownText_44146: - TX_FAR _LavenderTownText_44146 - db "@" + text_far _LavenderTownText_44146 + text_end LavenderTownText2: - TX_FAR _LavenderTownText2 - db "@" + text_far _LavenderTownText2 + text_end LavenderTownText3: - TX_FAR _LavenderTownText3 - db "@" + text_far _LavenderTownText3 + text_end LavenderTownText4: - TX_FAR _LavenderTownText4 - db "@" + text_far _LavenderTownText4 + text_end LavenderTownText5: - TX_FAR _LavenderTownText5 - db "@" + text_far _LavenderTownText5 + text_end LavenderTownText8: - TX_FAR _LavenderTownText8 - db "@" + text_far _LavenderTownText8 + text_end LavenderTownText9: - TX_FAR _LavenderTownText9 - db "@" + text_far _LavenderTownText9 + text_end diff --git a/scripts/LoreleisRoom.asm b/scripts/LoreleisRoom.asm index 81142377..8e9730ff 100755 --- a/scripts/LoreleisRoom.asm +++ b/scripts/LoreleisRoom.asm @@ -65,8 +65,8 @@ LoreleiScript0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyPressed], a - ld [hJoyHeld], a + ldh [hJoyPressed], a + ldh [hJoyHeld], a ld [wSimulatedJoypadStatesEnd], a ld [wSimulatedJoypadStatesIndex], a ld a, [wCoordIndex] @@ -76,7 +76,7 @@ LoreleiScript0: jr z, LoreleiScriptWalkIntoRoom .stopPlayerFromLeaving ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ; "Don't run away!" ld a, D_UP ld [wSimulatedJoypadStatesEnd], a @@ -89,11 +89,11 @@ LoreleiScript0: ret LoreleiEntranceCoords: - db $0A,$04 - db $0A,$05 - db $0B,$04 - db $0B,$05 - db $FF + dbmapcoord 4, 10 + dbmapcoord 5, 10 + dbmapcoord 4, 11 + dbmapcoord 5, 11 + db -1 ; end LoreleiScript3: ld a, [wSimulatedJoypadStatesIndex] @@ -112,7 +112,7 @@ LoreleiScript2: cp $ff jp z, ResetLoreleiScript ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID LoreleisRoom_TextPointers: @@ -120,34 +120,27 @@ LoreleisRoom_TextPointers: dw LoreleiDontRunAwayText LoreleiTrainerHeader0: - dbEventFlagBit EVENT_BEAT_LORELEIS_ROOM_TRAINER_0 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_LORELEIS_ROOM_TRAINER_0 - dw LoreleiBeforeBattleText ; TextBeforeBattle - dw LoreleiAfterBattleText ; TextAfterBattle - dw LoreleiEndBattleText ; TextEndBattle - dw LoreleiEndBattleText ; TextEndBattle - - db $ff + trainer EVENT_BEAT_LORELEIS_ROOM_TRAINER_0, 0, LoreleiBeforeBattleText, LoreleiEndBattleText, LoreleiAfterBattleText + db -1 ; end LoreleiText1: - TX_ASM + text_asm ld hl, LoreleiTrainerHeader0 call TalkToTrainer jp TextScriptEnd LoreleiBeforeBattleText: - TX_FAR _LoreleiBeforeBattleText - db "@" + text_far _LoreleiBeforeBattleText + text_end LoreleiEndBattleText: - TX_FAR _LoreleiEndBattleText - db "@" + text_far _LoreleiEndBattleText + text_end LoreleiAfterBattleText: - TX_FAR _LoreleiAfterBattleText - db "@" + text_far _LoreleiAfterBattleText + text_end LoreleiDontRunAwayText: - TX_FAR _LoreleiDontRunAwayText - db "@" + text_far _LoreleiDontRunAwayText + text_end diff --git a/scripts/MrFujisHouse.asm b/scripts/MrFujisHouse.asm index 98190cd8..3ef3017a 100755 --- a/scripts/MrFujisHouse.asm +++ b/scripts/MrFujisHouse.asm @@ -11,102 +11,102 @@ MrFujisHouse_TextPointers: dw LavenderHouse1Text6 LavenderHouse1Text1: - TX_ASM + text_asm CheckEvent EVENT_RESCUED_MR_FUJI - jr nz, .asm_72e5d + jr nz, .rescued_mr_fuji ld hl, LavenderHouse1Text_1d8d1 call PrintText - jr .asm_6957f -.asm_72e5d + jr .done +.rescued_mr_fuji ld hl, LavenderHouse1Text_1d8d6 call PrintText -.asm_6957f +.done jp TextScriptEnd LavenderHouse1Text_1d8d1: - TX_FAR _LavenderHouse1Text_1d8d1 - db "@" + text_far _LavenderHouse1Text_1d8d1 + text_end LavenderHouse1Text_1d8d6: - TX_FAR _LavenderHouse1Text_1d8d6 - db "@" + text_far _LavenderHouse1Text_1d8d6 + text_end LavenderHouse1Text2: - TX_ASM + text_asm CheckEvent EVENT_RESCUED_MR_FUJI - jr nz, .asm_06470 + jr nz, .rescued_mr_fuji ld hl, LavenderHouse1Text_1d8f4 call PrintText - jr .asm_3d208 -.asm_06470 + jr .done +.rescued_mr_fuji ld hl, LavenderHouse1Text_1d8f9 call PrintText -.asm_3d208 +.done jp TextScriptEnd LavenderHouse1Text_1d8f4: - TX_FAR _LavenderHouse1Text_1d8f4 - db "@" + text_far _LavenderHouse1Text_1d8f4 + text_end LavenderHouse1Text_1d8f9: - TX_FAR _LavenderHouse1Text_1d8f9 - db "@" + text_far _LavenderHouse1Text_1d8f9 + text_end LavenderHouse1Text3: - TX_FAR _LavenderHouse1Text3 - TX_ASM + text_far _LavenderHouse1Text3 + text_asm ld a, PSYDUCK call PlayCry jp TextScriptEnd LavenderHouse1Text4: - TX_FAR _LavenderHouse1Text4 - TX_ASM + text_far _LavenderHouse1Text4 + text_asm ld a, NIDORINO call PlayCry jp TextScriptEnd LavenderHouse1Text5: - TX_ASM + text_asm CheckEvent EVENT_GOT_POKE_FLUTE - jr nz, .asm_15ac2 + jr nz, .got_item ld hl, LavenderHouse1Text_1d94c call PrintText lb bc, POKE_FLUTE, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedFluteText call PrintText SetEvent EVENT_GOT_POKE_FLUTE - jr .asm_da749 -.BagFull + jr .done +.bag_full ld hl, FluteNoRoomText call PrintText - jr .asm_da749 -.asm_15ac2 + jr .done +.got_item ld hl, MrFujiAfterFluteText call PrintText -.asm_da749 +.done jp TextScriptEnd LavenderHouse1Text_1d94c: - TX_FAR _LavenderHouse1Text_1d94c - db "@" + text_far _LavenderHouse1Text_1d94c + text_end ReceivedFluteText: - TX_FAR _ReceivedFluteText - TX_SFX_KEY_ITEM - TX_FAR _FluteExplanationText - db "@" + text_far _ReceivedFluteText + sound_get_key_item + text_far _FluteExplanationText + text_end FluteNoRoomText: - TX_FAR _FluteNoRoomText - db "@" + text_far _FluteNoRoomText + text_end MrFujiAfterFluteText: - TX_FAR _MrFujiAfterFluteText - db "@" + text_far _MrFujiAfterFluteText + text_end LavenderHouse1Text6: - TX_FAR _LavenderHouse1Text6 - db "@" + text_far _LavenderHouse1Text6 + text_end diff --git a/scripts/MrPsychicsHouse.asm b/scripts/MrPsychicsHouse.asm index 7d4f54c0..399edfbd 100755 --- a/scripts/MrPsychicsHouse.asm +++ b/scripts/MrPsychicsHouse.asm @@ -5,41 +5,41 @@ MrPsychicsHouse_TextPointers: dw SaffronHouse2Text1 SaffronHouse2Text1: - TX_ASM + text_asm CheckEvent EVENT_GOT_TM29 - jr nz, .asm_9e72b + jr nz, .got_item ld hl, TM29PreReceiveText call PrintText - lb bc, TM_29, 1 + lb bc, TM_PSYCHIC_M, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedTM29Text call PrintText SetEvent EVENT_GOT_TM29 - jr .asm_fe4e1 -.BagFull + jr .done +.bag_full ld hl, TM29NoRoomText call PrintText - jr .asm_fe4e1 -.asm_9e72b + jr .done +.got_item ld hl, TM29ExplanationText call PrintText -.asm_fe4e1 +.done jp TextScriptEnd TM29PreReceiveText: - TX_FAR _TM29PreReceiveText - db "@" + text_far _TM29PreReceiveText + text_end ReceivedTM29Text: - TX_FAR _ReceivedTM29Text - TX_SFX_ITEM_1 - db "@" + text_far _ReceivedTM29Text + sound_get_item_1 + text_end TM29ExplanationText: - TX_FAR _TM29ExplanationText - db "@" + text_far _TM29ExplanationText + text_end TM29NoRoomText: - TX_FAR _TM29NoRoomText - db "@" + text_far _TM29NoRoomText + text_end diff --git a/scripts/MtMoon1F.asm b/scripts/MtMoon1F.asm index cb120420..2653016f 100755 --- a/scripts/MtMoon1F.asm +++ b/scripts/MtMoon1F.asm @@ -29,191 +29,142 @@ MtMoon1F_TextPointers: dw MtMoon1Text14 MtMoon1TrainerHeader0: - dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_0 - dw MtMoon1BattleText2 ; TextBeforeBattle - dw MtMoon1AfterBattleText2 ; TextAfterBattle - dw MtMoon1EndBattleText2 ; TextEndBattle - dw MtMoon1EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_MT_MOON_1_TRAINER_0, 2, MtMoon1BattleText2, MtMoon1EndBattleText2, MtMoon1AfterBattleText2 MtMoon1TrainerHeader1: - dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_1 - dw MtMoon1BattleText3 ; TextBeforeBattle - dw MtMoon1AfterBattleText3 ; TextAfterBattle - dw MtMoon1EndBattleText3 ; TextEndBattle - dw MtMoon1EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_MT_MOON_1_TRAINER_1, 3, MtMoon1BattleText3, MtMoon1EndBattleText3, MtMoon1AfterBattleText3 MtMoon1TrainerHeader2: - dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_2 - dw MtMoon1BattleText4 ; TextBeforeBattle - dw MtMoon1AfterBattleText4 ; TextAfterBattle - dw MtMoon1EndBattleText4 ; TextEndBattle - dw MtMoon1EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_MT_MOON_1_TRAINER_2, 3, MtMoon1BattleText4, MtMoon1EndBattleText4, MtMoon1AfterBattleText4 MtMoon1TrainerHeader3: - dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_3 - dw MtMoon1BattleText5 ; TextBeforeBattle - dw MtMoon1AfterBattleText5 ; TextAfterBattle - dw MtMoon1EndBattleText5 ; TextEndBattle - dw MtMoon1EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_MT_MOON_1_TRAINER_3, 3, MtMoon1BattleText5, MtMoon1EndBattleText5, MtMoon1AfterBattleText5 MtMoon1TrainerHeader4: - dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_4 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_4 - dw MtMoon1BattleText6 ; TextBeforeBattle - dw MtMoon1AfterBattleText6 ; TextAfterBattle - dw MtMoon1EndBattleText6 ; TextEndBattle - dw MtMoon1EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_MT_MOON_1_TRAINER_4, 3, MtMoon1BattleText6, MtMoon1EndBattleText6, MtMoon1AfterBattleText6 MtMoon1TrainerHeader5: - dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_5 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_5 - dw MtMoon1BattleText7 ; TextBeforeBattle - dw MtMoon1AfterBattleText7 ; TextAfterBattle - dw MtMoon1EndBattleText7 ; TextEndBattle - dw MtMoon1EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_MT_MOON_1_TRAINER_5, 3, MtMoon1BattleText7, MtMoon1EndBattleText7, MtMoon1AfterBattleText7 MtMoon1TrainerHeader6: - dbEventFlagBit EVENT_BEAT_MT_MOON_1_TRAINER_6 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MT_MOON_1_TRAINER_6 - dw MtMoon1BattleText8 ; TextBeforeBattle - dw MtMoon1AfterBattleText8 ; TextAfterBattle - dw MtMoon1EndBattleText8 ; TextEndBattle - dw MtMoon1EndBattleText8 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_MT_MOON_1_TRAINER_6, 3, MtMoon1BattleText8, MtMoon1EndBattleText8, MtMoon1AfterBattleText8 + db -1 ; end MtMoon1Text1: - TX_ASM + text_asm ld hl, MtMoon1TrainerHeader0 jr MtMoon1TalkToTrainer MtMoon1Text2: - TX_ASM + text_asm ld hl, MtMoon1TrainerHeader1 jr MtMoon1TalkToTrainer MtMoon1Text3: - TX_ASM + text_asm ld hl, MtMoon1TrainerHeader2 jr MtMoon1TalkToTrainer MtMoon1Text4: - TX_ASM + text_asm ld hl, MtMoon1TrainerHeader3 jr MtMoon1TalkToTrainer MtMoon1Text5: - TX_ASM + text_asm ld hl, MtMoon1TrainerHeader4 jr MtMoon1TalkToTrainer MtMoon1Text6: - TX_ASM + text_asm ld hl, MtMoon1TrainerHeader5 jr MtMoon1TalkToTrainer MtMoon1Text7: - TX_ASM + text_asm ld hl, MtMoon1TrainerHeader6 MtMoon1TalkToTrainer: call TalkToTrainer jp TextScriptEnd MtMoon1BattleText2: - TX_FAR _MtMoon1BattleText2 - db "@" + text_far _MtMoon1BattleText2 + text_end MtMoon1EndBattleText2: - TX_FAR _MtMoon1EndBattleText2 - db "@" + text_far _MtMoon1EndBattleText2 + text_end MtMoon1AfterBattleText2: - TX_FAR _MtMoon1AfterBattleText2 - db "@" + text_far _MtMoon1AfterBattleText2 + text_end MtMoon1BattleText3: - TX_FAR _MtMoon1BattleText3 - db "@" + text_far _MtMoon1BattleText3 + text_end MtMoon1EndBattleText3: - TX_FAR _MtMoon1EndBattleText3 - db "@" + text_far _MtMoon1EndBattleText3 + text_end MtMoon1AfterBattleText3: - TX_FAR _MtMoon1AfterBattleText3 - db "@" + text_far _MtMoon1AfterBattleText3 + text_end MtMoon1BattleText4: - TX_FAR _MtMoon1BattleText4 - db "@" + text_far _MtMoon1BattleText4 + text_end MtMoon1EndBattleText4: - TX_FAR _MtMoon1EndBattleText4 - db "@" + text_far _MtMoon1EndBattleText4 + text_end MtMoon1AfterBattleText4: - TX_FAR _MtMoon1AfterBattleText4 - db "@" + text_far _MtMoon1AfterBattleText4 + text_end MtMoon1BattleText5: - TX_FAR _MtMoon1BattleText5 - db "@" + text_far _MtMoon1BattleText5 + text_end MtMoon1EndBattleText5: - TX_FAR _MtMoon1EndBattleText5 - db "@" + text_far _MtMoon1EndBattleText5 + text_end MtMoon1AfterBattleText5: - TX_FAR _MtMoon1AfterBattleText5 - db "@" + text_far _MtMoon1AfterBattleText5 + text_end MtMoon1BattleText6: - TX_FAR _MtMoon1BattleText6 - db "@" + text_far _MtMoon1BattleText6 + text_end MtMoon1EndBattleText6: - TX_FAR _MtMoon1EndBattleText6 - db "@" + text_far _MtMoon1EndBattleText6 + text_end MtMoon1AfterBattleText6: - TX_FAR _MtMoon1AfterBattleText6 - db "@" + text_far _MtMoon1AfterBattleText6 + text_end MtMoon1BattleText7: - TX_FAR _MtMoon1BattleText7 - db "@" + text_far _MtMoon1BattleText7 + text_end MtMoon1EndBattleText7: - TX_FAR _MtMoon1EndBattleText7 - db "@" + text_far _MtMoon1EndBattleText7 + text_end MtMoon1AfterBattleText7: - TX_FAR _MtMoon1AfterBattleText7 - db "@" + text_far _MtMoon1AfterBattleText7 + text_end MtMoon1BattleText8: - TX_FAR _MtMoon1BattleText8 - db "@" + text_far _MtMoon1BattleText8 + text_end MtMoon1EndBattleText8: - TX_FAR _MtMoon1EndBattleText8 - db "@" + text_far _MtMoon1EndBattleText8 + text_end MtMoon1AfterBattleText8: - TX_FAR _MtMoon1AfterBattleText8 - db "@" + text_far _MtMoon1AfterBattleText8 + text_end MtMoon1Text14: - TX_FAR _MtMoon1Text14 - db "@" + text_far _MtMoon1Text14 + text_end diff --git a/scripts/MtMoonB1F.asm b/scripts/MtMoonB1F.asm index 779812c3..06af2dd3 100755 --- a/scripts/MtMoonB1F.asm +++ b/scripts/MtMoonB1F.asm @@ -6,5 +6,5 @@ MtMoonB1F_TextPointers: dw MtMoonText1 MtMoonText1: - TX_FAR _MtMoonText1 - db "@" + text_far _MtMoonText1 + text_end diff --git a/scripts/MtMoonB2F.asm b/scripts/MtMoonB2F.asm index cf4583d3..a02d7d42 100755 --- a/scripts/MtMoonB2F.asm +++ b/scripts/MtMoonB2F.asm @@ -19,23 +19,23 @@ MtMoonB2F_Script: ret CoordsData_49d37: - db $05,$0B - db $05,$0C - db $05,$0D - db $05,$0E - db $06,$0B - db $06,$0C - db $06,$0D - db $06,$0E - db $07,$0B - db $07,$0C - db $07,$0D - db $07,$0E - db $08,$0B - db $08,$0C - db $08,$0D - db $08,$0E - db $FF + dbmapcoord 11, 5 + dbmapcoord 12, 5 + dbmapcoord 13, 5 + dbmapcoord 14, 5 + dbmapcoord 11, 6 + dbmapcoord 12, 6 + dbmapcoord 13, 6 + dbmapcoord 14, 6 + dbmapcoord 11, 7 + dbmapcoord 12, 7 + dbmapcoord 13, 7 + dbmapcoord 14, 7 + dbmapcoord 11, 8 + dbmapcoord 12, 8 + dbmapcoord 13, 8 + dbmapcoord 14, 8 + db -1 ; end MtMoon3Script_49cd7: CheckAndResetEvent EVENT_57E @@ -83,15 +83,15 @@ MtMoon3Script_49d28: CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD jp nz, .asm_49d4b ld a, [wYCoord] - cp $8 + cp 8 jp nz, .asm_49d4b ld a, [wXCoord] - cp $d + cp 13 jp nz, .asm_49d4b xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ret @@ -115,7 +115,7 @@ MtMoon3Script3: MtMoon3Script4: ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld hl, CoordsData_49dc7 call ArePlayerCoordsInArray @@ -147,21 +147,21 @@ MtMoon3Script4: ld de, MovementData_49ddc .asm_49db3 ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite ld a, $5 call MtMoon3Script_49ce5 ret CoordsData_49dc0: - db $07,$0C - db $06,$0B - db $05,$0C - db $FF + dbmapcoord 12, 7 + dbmapcoord 11, 6 + dbmapcoord 12, 5 + db -1 ; end CoordsData_49dc7: - db $07,$0C - db $FF + dbmapcoord 12, 7 + db -1 ; end PikachuMovementData_49dca: db $00 @@ -170,14 +170,14 @@ PikachuMovementData_49dca: db $3f CoordsData_49dce: - db $07,$0D - db $06,$0E - db $05,$0E - db $FF + dbmapcoord 13, 7 + dbmapcoord 14, 6 + dbmapcoord 14, 5 + db -1 ; end CoordsData_49dd5: - db $07,$0D - db $FF + dbmapcoord 13, 7 + db -1 ; end PikachuMovementData_49dd8: db $00 @@ -189,7 +189,7 @@ MovementData_49ddc: db NPC_MOVEMENT_RIGHT MovementData_49ddd: db NPC_MOVEMENT_UP - db $FF + db -1 ; end MtMoon3Script5: ld a, [wd730] @@ -200,7 +200,7 @@ MtMoon3Script5: ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID CheckEvent EVENT_GOT_HELIX_FOSSIL jr z, .asm_49e1d @@ -229,7 +229,7 @@ MtMoon3Script_49e15: ld a, MUSIC_MEET_JESSIE_JAMES call PlayMusic xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $FF ^ (A_BUTTON | B_BUTTON) ld [wJoyIgnore], a ld a, HS_MT_MOON_B2F_JESSIE @@ -239,7 +239,7 @@ MtMoon3Script_49e15: ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $c - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -272,7 +272,7 @@ MtMoon3Script6: ret nz call Delay3 ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld de, MovementData_f9e65 call MoveSprite ld a, $ff @@ -294,7 +294,7 @@ MtMoon3Script8: ld [wSpriteStateData1 + 2 * $10 + 9], a MtMoon3Script9: ld a, $6 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld de, MovementData_f9e66 call MoveSprite ld a, $ff @@ -318,7 +318,7 @@ MtMoon3Script11: ld a, $FF ^ (A_BUTTON | B_BUTTON) ld [wJoyIgnore], a ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID MtMoon3Script12: ld hl, wd72d @@ -332,7 +332,7 @@ MtMoon3Script12: ld a, $2a ld [wTrainerNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wJoyIgnore], a SetEvent EVENT_57E ld a, $d @@ -356,7 +356,7 @@ MtMoon3Script13: ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -388,7 +388,7 @@ MtMoon3Script14: MtMoon3Script15: call PlayDefaultMusic xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wJoyIgnore], a SetEvent EVENT_BEAT_MT_MOON_3_TRAINER_0 ResetEventReuseHL EVENT_57E @@ -425,41 +425,20 @@ MtMoonB2F_TextPointers: dw MtMoon3Text14 MtMoon3TrainerHeader0: - dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_1 - db ($4 << 4) - dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_1 - dw MtMoon3BattleText3 - dw MtMoon3AfterBattleText3 - dw MtMoon3EndBattleText3 - dw MtMoon3EndBattleText3 - + trainer EVENT_BEAT_MT_MOON_3_TRAINER_1, 4, MtMoon3BattleText3, MtMoon3EndBattleText3, MtMoon3AfterBattleText3 MtMoon3TrainerHeader1: - dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_2 - db ($4 << 4) - dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_2 - dw MtMoon3BattleText4 - dw MtMoon3AfterBattleText4 - dw MtMoon3EndBattleText4 - dw MtMoon3EndBattleText4 - + trainer EVENT_BEAT_MT_MOON_3_TRAINER_2, 4, MtMoon3BattleText4, MtMoon3EndBattleText4, MtMoon3AfterBattleText4 MtMoon3TrainerHeader2: - dbEventFlagBit EVENT_BEAT_MT_MOON_3_TRAINER_3 - db ($4 << 4) - dwEventFlagAddress EVENT_BEAT_MT_MOON_3_TRAINER_3 - dw MtMoon3BattleText5 - dw MtMoon3AfterBattleText5 - dw MtMoon3EndBattleText5 - dw MtMoon3EndBattleText5 - - db $FF + trainer EVENT_BEAT_MT_MOON_3_TRAINER_3, 4, MtMoon3BattleText5, MtMoon3EndBattleText5, MtMoon3AfterBattleText5 + db -1 ; end MtMoon3Text2: MtMoon3Text6: - db "@" + text_end MtMoon3Text12: - TX_FAR _MtMoonJessieJamesText1 - TX_ASM + text_far _MtMoonJessieJamesText1 + text_asm ld c, 10 call DelayFrames ld a, PLAYER_DIR_UP @@ -474,22 +453,22 @@ MtMoon3Text12: jp TextScriptEnd MtMoon3Text13: - TX_FAR _MtMoonJessieJamesText2 - db "@" + text_far _MtMoonJessieJamesText2 + text_end MtMoon3JessieJamesEndBattleText: - TX_FAR _MtMoonJessieJamesText3 - db "@" + text_far _MtMoonJessieJamesText3 + text_end MtMoon3Text14: - TX_FAR _MtMoonJessieJamesText4 - TX_ASM + text_far _MtMoonJessieJamesText4 + text_asm ld c, 64 call DelayFrames jp TextScriptEnd MtMoon3Text1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD jr z, .asm_4a02f ; CheckEitherEventSetReuseA EVENT_GOT_DOME_FOSSIL, EVENT_GOT_HELIX_FOSSIL @@ -508,7 +487,7 @@ MtMoon3Text1: ld hl, MtMoon3SuperNerdEndBattleText ld de, MtMoon3SuperNerdEndBattleText call SaveEndBattleTextPointers - ld a, [H_SPRITEINDEX] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -523,25 +502,25 @@ MtMoon3Text1: jp TextScriptEnd MtMoon3Text3: - TX_ASM + text_asm ld hl, MtMoon3TrainerHeader0 jr MtMoon3TalkToTrainer MtMoon3Text4: - TX_ASM + text_asm ld hl, MtMoon3TrainerHeader1 jr MtMoon3TalkToTrainer MtMoon3Text5: - TX_ASM + text_asm ld hl, MtMoon3TrainerHeader2 MtMoon3TalkToTrainer: call TalkToTrainer jp TextScriptEnd MtMoon3Text7: - TX_ASM + text_asm ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, MtMoon3Text_4a0ae @@ -564,11 +543,11 @@ MtMoon3Text7: jp TextScriptEnd MtMoon3Text_4a0ae: - TX_FAR _MtMoon3Text_49f24 - db "@" + text_far _MtMoon3Text_49f24 + text_end MtMoon3Text8: - TX_ASM + text_asm ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, MtMoon3Text_4a0eb @@ -591,18 +570,18 @@ MtMoon3Text8: jp TextScriptEnd MtMoon3Text_4a0eb: - TX_FAR _MtMoon3Text_49f64 - db "@" + text_far _MtMoon3Text_49f64 + text_end MtMoon3Script_4a0f0: ld hl, MtMoon3Text_4a0f6 jp PrintText MtMoon3Text_4a0f6: - TX_FAR _MtMoon3Text_49f6f - TX_SFX_KEY_ITEM - TX_WAIT - db "@" + text_far _MtMoon3Text_49f6f + sound_get_key_item + text_waitbutton + text_end MtMoon3Script_4a0fd: ld hl, MtMoon3Text_4a106 @@ -610,64 +589,64 @@ MtMoon3Script_4a0fd: jp TextScriptEnd MtMoon3Text_4a106: - TX_FAR _MtMoon3Text_49f7f - TX_WAIT - db "@" + text_far _MtMoon3Text_49f7f + text_waitbutton + text_end MtMoon3Text_4a10c: - TX_FAR _MtMoon3Text_49f85 - db "@" + text_far _MtMoon3Text_49f85 + text_end MtMoon3SuperNerdEndBattleText: - TX_FAR _MtMoon3Text_49f8a - db "@" + text_far _MtMoon3Text_49f8a + text_end MtMoon3Text_4a116: - TX_FAR _MtMoon3Text_49f8f - db "@" + text_far _MtMoon3Text_49f8f + text_end MtMoon3Text_4a11b: - TX_FAR _MtMoon3Text_49f94 - db "@" + text_far _MtMoon3Text_49f94 + text_end MtMoon3Text11: - TX_FAR _MtMoon3Text_49f99 - TX_SFX_KEY_ITEM - db "@" + text_far _MtMoon3Text_49f99 + sound_get_key_item + text_end MtMoon3BattleText3: - TX_FAR _MtMoon3BattleText3 - db "@" + text_far _MtMoon3BattleText3 + text_end MtMoon3EndBattleText3: - TX_FAR _MtMoon3EndBattleText3 - db "@" + text_far _MtMoon3EndBattleText3 + text_end MtMoon3AfterBattleText3: - TX_FAR _MtMoon3AfterBattleText3 - db "@" + text_far _MtMoon3AfterBattleText3 + text_end MtMoon3BattleText4: - TX_FAR _MtMoon3BattleText4 - db "@" + text_far _MtMoon3BattleText4 + text_end MtMoon3EndBattleText4: - TX_FAR _MtMoon3EndBattleText4 - db "@" + text_far _MtMoon3EndBattleText4 + text_end MtMoon3AfterBattleText4: - TX_FAR _MtMoon3AfterBattleText4 - db "@" + text_far _MtMoon3AfterBattleText4 + text_end MtMoon3BattleText5: - TX_FAR _MtMoon3BattleText5 - db "@" + text_far _MtMoon3BattleText5 + text_end MtMoon3EndBattleText5: - TX_FAR _MtMoon3EndBattleText5 - db "@" + text_far _MtMoon3EndBattleText5 + text_end MtMoon3AfterBattleText5: - TX_FAR _MtMoon3AfterBattleText5 - db "@" + text_far _MtMoon3AfterBattleText5 + text_end diff --git a/scripts/MtMoonB2F_2.asm b/scripts/MtMoonB2F_2.asm index c6ec92b4..c983bb0d 100755 --- a/scripts/MtMoonB2F_2.asm +++ b/scripts/MtMoonB2F_2.asm @@ -8,7 +8,7 @@ MtMoon3Script_4a325: ; pikachu-related function? push hl push bc - callab GetPikachuFacingDirectionAndReturnToE + callfar GetPikachuFacingDirectionAndReturnToE pop bc pop hl ld a, b @@ -20,7 +20,7 @@ MtMoon3Script_4a325: ; pikachu-related function? push af ld a, $ff ld [wUpdateSpritesEnabled], a - callab LoadPikachuShadowIntoVRAM + callfar LoadPikachuShadowIntoVRAM pop af ld [wUpdateSpritesEnabled], a pop hl diff --git a/scripts/MtMoonPokecenter.asm b/scripts/MtMoonPokecenter.asm index 77386109..302c5f19 100755 --- a/scripts/MtMoonPokecenter.asm +++ b/scripts/MtMoonPokecenter.asm @@ -12,29 +12,29 @@ MtMoonPokecenter_TextPointers: dw MtMoonPokecenterText7 MtMoonHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse MtMoonPokecenterText2: - TX_FAR _MtMoonPokecenterText1 - db "@" + text_far _MtMoonPokecenterText1 + text_end MtMoonPokecenterText3: - TX_FAR _MtMoonPokecenterText3 - db "@" + text_far _MtMoonPokecenterText3 + text_end MagikarpSalesmanText: - TX_ASM - callab MagikarpSalesman + text_asm + callfar MagikarpSalesman jp TextScriptEnd MtMoonPokecenterText5: - TX_FAR _MtMoonPokecenterText5 - db "@" + text_far _MtMoonPokecenterText5 + text_end MtMoonTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist MtMoonPokecenterText7: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/MtMoonPokecenter2.asm b/scripts/MtMoonPokecenter2.asm index 6097342b..9abc0286 100755 --- a/scripts/MtMoonPokecenter2.asm +++ b/scripts/MtMoonPokecenter2.asm @@ -1,4 +1,4 @@ -MagikarpSalesman: +MagikarpSalesman:: CheckEvent EVENT_BOUGHT_MAGIKARP, 1 jp c, .alreadyBoughtMagikarp ld hl, .Text1 @@ -12,10 +12,10 @@ MagikarpSalesman: jp nz, .choseNo ; $000500 xor a - ld [hMoney], a - ld [hMoney + 2], a + ldh [hMoney], a + ldh [hMoney + 2], a ld a, $5 - ld [hMoney + 1], a + ldh [hMoney + 1], a call HasEnoughMoney jr nc, .enoughMoney ld hl, .NoMoneyText @@ -50,17 +50,17 @@ MagikarpSalesman: ret .Text1 - TX_FAR _MagikarpSalesmanText1 - db "@" + text_far _MagikarpSalesmanText1 + text_end .RefuseText - TX_FAR _MagikarpSalesmanNoText - db "@" + text_far _MagikarpSalesmanNoText + text_end .NoMoneyText - TX_FAR _MagikarpSalesmanNoMoneyText - db "@" + text_far _MagikarpSalesmanNoMoneyText + text_end .Text2 - TX_FAR _MagikarpSalesmanText2 - db "@" + text_far _MagikarpSalesmanText2 + text_end diff --git a/scripts/Museum1F.asm b/scripts/Museum1F.asm index fdae9293..c89eacda 100755 --- a/scripts/Museum1F.asm +++ b/scripts/Museum1F.asm @@ -1,5 +1,5 @@ Museum1F_Script: - ld a, $1 + ld a, TRUE ld [wAutoTextBoxDrawingControl], a xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -14,19 +14,19 @@ Museum1F_ScriptPointers: Museum1FScript0: ld a, [wYCoord] - cp $4 + cp 4 ret nz ld a, [wXCoord] - cp $9 + cp 9 jr z, .asm_5c120 ld a, [wXCoord] - cp $a + cp 10 ret nz .asm_5c120 xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID Museum1FScript1: @@ -40,26 +40,26 @@ Museum1F_TextPointers: dw Museum1FText5 Museum1FText1: - TX_ASM - callba Func_f1c1b + text_asm + farcall Func_f1c1b jp TextScriptEnd Museum1FText2: - TX_ASM - callba Func_f1d2a + text_asm + farcall Func_f1d2a jp TextScriptEnd Museum1FText3: - TX_ASM - callba Func_f1d36 + text_asm + farcall Func_f1d36 jp TextScriptEnd Museum1FText4: - TX_ASM - callba Func_f1d80 + text_asm + farcall Func_f1d80 jp TextScriptEnd Museum1FText5: - TX_ASM - callba Func_f1d8c + text_asm + farcall Func_f1d8c jp TextScriptEnd diff --git a/scripts/Museum1F2.asm b/scripts/Museum1F2.asm index 9b3df420..512a3295 100755 --- a/scripts/Museum1F2.asm +++ b/scripts/Museum1F2.asm @@ -1,9 +1,9 @@ -Func_f1c1b: +Func_f1c1b:: ld a, [wYCoord] - cp $4 + cp 4 jr nz, .asm_f1c2c ld a, [wXCoord] - cp $d + cp 13 jp z, .asm_f1cde jr .asm_f1c48 @@ -11,7 +11,7 @@ Func_f1c1b: cp $3 jr nz, .asm_f1c38 ld a, [wXCoord] - cp a, $c + cp 12 jp z, .asm_f1cde .asm_f1c38 CheckEvent EVENT_BOUGHT_MUSEUM_TICKET @@ -33,7 +33,7 @@ Func_f1c1b: ld [wTextBoxID], a call DisplayTextBoxID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld hl, Museum1FText_f1d02 call PrintText call YesNoChoice @@ -41,10 +41,10 @@ Func_f1c1b: and a jr nz, .asm_f1cbf xor a - ld [hMoney], a - ld [hMoney + 1], a + ldh [hMoney], a + ldh [hMoney + 1], a ld a, $50 - ld [hMoney + 2], a + ldh [hMoney + 2], a call HasEnoughMoney jr nc, .asm_f1c89 ld hl, Museum1FText_f1d0c @@ -106,106 +106,104 @@ Func_f1c1b: ret Museum1FText_f1cfd: - TX_FAR _Museum1FText_5c21a - db "@" + text_far _Museum1FText_5c21a + text_end Museum1FText_f1d02: - TX_FAR _Museum1FText_5c21f - db "@" + text_far _Museum1FText_5c21f + text_end Museum1FText_f1d07: - TX_FAR _Museum1FText_5c224 - db "@" + text_far _Museum1FText_5c224 + text_end Museum1FText_f1d0c: - TX_FAR _Museum1FText_5c229 - db "@" + text_far _Museum1FText_5c229 + text_end Museum1FText_f1d11: - TX_FAR _Museum1FText_5c22e - db "@" + text_far _Museum1FText_5c22e + text_end Museum1FText_f1d16: - TX_FAR _Museum1FText_5c233 - db "@" + text_far _Museum1FText_5c233 + text_end Museum1FText_f1d1b: - TX_FAR _Museum1FText_5c238 - db "@" + text_far _Museum1FText_5c238 + text_end Museum1FText_f1d20: - TX_FAR _Museum1FText_5c23d - db "@" + text_far _Museum1FText_5c23d + text_end Museum1FText_f1d25: - TX_FAR _Museum1FText_5c242 - db "@" + text_far _Museum1FText_5c242 + text_end -Func_f1d2a: +Func_f1d2a:: ld hl, Museum1FText_f1d31 call PrintText ret Museum1FText_f1d31: - TX_FAR _Museum1FText_5c251 - db "@" + text_far _Museum1FText_5c251 + text_end -Func_f1d36: +Func_f1d36:: CheckEvent EVENT_GOT_OLD_AMBER - jr nz, .asm_f1d64 - ld hl, Museum1FText_f1d6b + jr nz, .got_item + ld hl, Museum1FText_5c28e call PrintText lb bc, OLD_AMBER, 1 call GiveItem - jr nc, .asm_f1d5f + jr nc, .bag_full SetEvent EVENT_GOT_OLD_AMBER ld a, HS_OLD_AMBER ld [wMissableObjectIndex], a predef HideObject - ld hl, Museum1FText_f1d70 - jr .asm_f1d67 - -.asm_f1d5f - ld hl, Museum1FText_f1d7b - jr .asm_f1d67 - -.asm_f1d64 - ld hl, Museum1FText_f1d76 -.asm_f1d67 + ld hl, ReceivedOldAmberText + jr .done +.bag_full + ld hl, Museum1FText_5c29e + jr .done +.got_item + ld hl, Museum1FText_5c299 +.done call PrintText ret -Museum1FText_f1d6b: - TX_FAR _Museum1FText_5c28e - db "@" +Museum1FText_5c28e: + text_far _Museum1FText_5c28e + text_end -Museum1FText_f1d70: - TX_FAR _ReceivedOldAmberText - TX_SFX_ITEM_1 - db "@" +ReceivedOldAmberText: + text_far _ReceivedOldAmberText + sound_get_item_1 + text_end -Museum1FText_f1d76: - TX_FAR _Museum1FText_5c299 - db "@" +Museum1FText_5c299: + text_far _Museum1FText_5c299 + text_end -Museum1FText_f1d7b: - TX_FAR _Museum1FText_5c29e - db "@" +Museum1FText_5c29e: + text_far _Museum1FText_5c29e + text_end -Func_f1d80: +Func_f1d80:: ld hl, Museum1FText_f1d87 call PrintText ret Museum1FText_f1d87: - TX_FAR _Museum1FText_5c2ad - db "@" + text_far _Museum1FText_5c2ad + text_end -Func_f1d8c: +Func_f1d8c:: ld hl, Museum1FText_f1d93 call PrintText ret Museum1FText_f1d93: - TX_FAR _Museum1FText_5c2bc - db "@" + text_far _Museum1FText_5c2bc + text_end diff --git a/scripts/Museum2F.asm b/scripts/Museum2F.asm index e97b8ded..fe02f544 100755 --- a/scripts/Museum2F.asm +++ b/scripts/Museum2F.asm @@ -12,23 +12,23 @@ Museum2F_TextPointers: dw Museum2FText7 Museum2FText1: - TX_FAR _Museum2FText1 - db "@" + text_far _Museum2FText1 + text_end Museum2FText2: - TX_FAR _Museum2FText2 - db "@" + text_far _Museum2FText2 + text_end Museum2FText3: - TX_FAR _Museum2FText3 - db "@" + text_far _Museum2FText3 + text_end Museum2FText4: - TX_FAR _Museum2FText4 - db "@" + text_far _Museum2FText4 + text_end Museum2FText5: - TX_ASM + text_asm ld a, [wd472] bit 7, a jr nz, .asm_5c1f6 @@ -51,21 +51,21 @@ Museum2FText5: jp TextScriptEnd Museum2FText_5c20e: - TX_FAR _Museum2FText5 - db "@" + text_far _Museum2FText5 + text_end Museum2FText_5c213: - TX_FAR _Museum2FPikachuText1 - db "@" + text_far _Museum2FPikachuText1 + text_end Museum2FText_5c218: - TX_FAR _Museum2FPikachuText2 - db "@" + text_far _Museum2FPikachuText2 + text_end Museum2FText6: - TX_FAR _Museum2FText6 - db "@" + text_far _Museum2FText6 + text_end Museum2FText7: - TX_FAR _Museum2FText7 - db "@" + text_far _Museum2FText7 + text_end diff --git a/scripts/NameRatersHouse.asm b/scripts/NameRatersHouse.asm index 323cb360..cecf97e7 100755 --- a/scripts/NameRatersHouse.asm +++ b/scripts/NameRatersHouse.asm @@ -41,7 +41,7 @@ NameRatersHouse_TextPointers: dw NameRaterText1 NameRaterText1: - TX_ASM + text_asm call SaveScreenTilesToBuffer2 ld hl, NameRaterText_1dab3 call NameRaterScript_1da15 @@ -68,7 +68,7 @@ NameRaterText1: jr nz, .asm_1daae ld hl, NameRaterText_1dac2 call PrintText - callba DisplayNameRaterScreen + farcall DisplayNameRaterScreen jr c, .asm_1daae ld hl, NameRaterText_1dac7 .asm_1daa8 @@ -79,29 +79,29 @@ NameRaterText1: jr .asm_1daa8 NameRaterText_1dab3: - TX_FAR _NameRaterText_1dab3 - db "@" + text_far _NameRaterText_1dab3 + text_end NameRaterText_1dab8: - TX_FAR _NameRaterText_1dab8 - db "@" + text_far _NameRaterText_1dab8 + text_end NameRaterText_1dabd: - TX_FAR _NameRaterText_1dabd - db "@" + text_far _NameRaterText_1dabd + text_end NameRaterText_1dac2: - TX_FAR _NameRaterText_1dac2 - db "@" + text_far _NameRaterText_1dac2 + text_end NameRaterText_1dac7: - TX_FAR _NameRaterText_1dac7 - db "@" + text_far _NameRaterText_1dac7 + text_end NameRaterText_1dacc: - TX_FAR _NameRaterText_1dacc - db "@" + text_far _NameRaterText_1dacc + text_end NameRaterText_1dad1: - TX_FAR _NameRaterText_1dad1 - db "@" + text_far _NameRaterText_1dad1 + text_end diff --git a/scripts/OaksLab.asm b/scripts/OaksLab.asm index 04f31d2a..e8ef4cbe 100755 --- a/scripts/OaksLab.asm +++ b/scripts/OaksLab.asm @@ -1,7 +1,7 @@ OaksLab_Script: CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS_2 call nz, OaksLabScript_1d076 - ld a, $1 + ld a, TRUE ld [wAutoTextBoxDrawingControl], a xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -53,7 +53,7 @@ OaksLabScript0: OaksLabScript1: ld a, $6 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld de, OakEntryMovement call MoveSprite @@ -65,7 +65,7 @@ OakEntryMovement: db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP - db $FF + db -1 ; end OaksLabScript2: ld a, [wd730] @@ -91,14 +91,14 @@ OaksLabScript3: ld [wSimulatedJoypadStatesIndex], a call StartSimulatingJoypadStates ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a xor a - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $3 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a xor a - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $4 @@ -106,8 +106,8 @@ OaksLabScript3: ret PlayerEntryMovementRLE: - db D_UP,$8 - db $ff + db D_UP, 8 + db -1 ; end OaksLabScript4: ld a, [wSimulatedJoypadStatesIndex] @@ -116,9 +116,9 @@ OaksLabScript4: SetEvent EVENT_FOLLOWED_OAK_INTO_LAB SetEvent EVENT_FOLLOWED_OAK_INTO_LAB_2 ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld hl, wFlags_D733 res 1, [hl] @@ -133,11 +133,11 @@ OaksLabScript5: ld a, $fc ld [wJoyIgnore], a ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, $e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, $2 @@ -145,11 +145,11 @@ OaksLabScript5: ld a, SPRITE_FACING_UP ld [wSpriteStateData1 + 1 * $10 + 9], a ld a, $f - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, $10 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a @@ -160,21 +160,21 @@ OaksLabScript5: OaksLabScript6: ld a, [wYCoord] - cp $6 + cp 6 ret nz ld a, $3 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a xor a - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call UpdateSprites ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wSimulatedJoypadStatesIndex], a @@ -200,7 +200,7 @@ OaksLabScript7: OaksLabScript8: ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a ld de, .SonyPushesPlayerAwayFromEeveeBall call MoveSprite ld a, $9 @@ -222,9 +222,9 @@ OaksLabScript9: ld [wMissableObjectIndex], a predef HideObject ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, 1 ld [wRivalStarter], a @@ -234,7 +234,7 @@ OaksLabScript9: ld a, $FF ^ (A_BUTTON | B_BUTTON) ld [wJoyIgnore], a ld a, $11 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $a @@ -243,7 +243,7 @@ OaksLabScript9: .asm_1c564 ld a, [wYCoord] - cp $4 + cp 4 ret nz ld a, [wNPCNumScriptedSteps] cp 1 @@ -260,7 +260,7 @@ OaksLabScript9: OaksLabScript10: ld a, [wYCoord] - cp $4 + cp 4 jr z, .asm_1c599 ld a, $1 ld [wSimulatedJoypadStatesIndex], a @@ -292,7 +292,7 @@ OaksLabScript11: and a ret nz ld a, $12 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a @@ -303,34 +303,34 @@ OaksLabScript11: OaksLabScript12: ld a, [wYCoord] - cp $6 + cp 6 ret nz ld a, PLAYER_DIR_UP ld [wPlayerMovingDirection], a ld a, $1 - ld [hSpriteIndexOrTextID], a - xor a - ld [hSpriteFacingDirection], a + ldh [hSpriteIndex], a + xor a ; SPRITE_FACING_DOWN + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld c, BANK(Music_MeetRival) ld a, MUSIC_MEET_RIVAL call PlayMusic ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 - ld [hNPCPlayerRelativePosPerspective], a + ldh [hNPCPlayerRelativePosPerspective], a ld a, $1 swap a - ld [hNPCPlayerYDistance], a + ldh [hNPCPlayerYDistance], a predef CalcPositionOfPlayerRelativeToNPC - ld a, [hNPCPlayerYDistance] + ldh a, [hNPCPlayerYDistance] dec a - ld [hNPCPlayerYDistance], a + ldh [hNPCPlayerYDistance], a predef FindPathToPlayer ld de, wNPCMovementDirections2 ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndex], a call MoveSprite ld a, $d ld [wOaksLabCurScript], a @@ -343,7 +343,7 @@ OaksLabScript13: ld a, $1 ld [wSpriteIndex], a call GetSpritePosition1 - ld a, OPP_SONY1 + ld a, OPP_RIVAL1 ld [wCurOpponent], a ld a, $1 ld [wTrainerNo], a @@ -400,15 +400,15 @@ OaksLabScript15: ld c, 20 call DelayFrames ld a, $c - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID - callba Music_RivalAlternateStart + farcall Music_RivalAlternateStart ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndex], a ld de, .OaksLabMovement_RivalWalksOut1 call MoveSprite ld a, [wXCoord] - cp $4 + cp 4 jr nz, .asm_1c6bb ld a, NPC_MOVEMENT_RIGHT jr .asm_1c6bd @@ -422,14 +422,14 @@ OaksLabScript15: ret .OaksLabMovement_RivalWalksOut1 - db $e0 - db $00 + db NPC_CHANGE_FACING + db NPC_MOVEMENT_DOWN db $04 db $04 db $04 db $04 db $04 - db $ff + db -1 ; end OaksLabScript16: ld a, [wd730] @@ -450,7 +450,7 @@ OaksLabScript16: cp $5 jr nz, .turnPlayerDown ld a, [wXCoord] - cp $4 + cp 4 jr nz, .turnPlayerLeft ld a, SPRITE_FACING_RIGHT jr .done @@ -460,7 +460,7 @@ OaksLabScript16: .turnPlayerDown cp $4 ret nz - xor a + xor a ; ld a, SPRITE_FACING_DOWN .done ld [wSpritePlayerStateData1FacingDirection], a ret @@ -471,10 +471,10 @@ OaksLabScript17: ld [wSpritePlayerStateData1FacingDirection], a ld a, $2 ld [wPikachuSpawnState], a - callba SchedulePikachuSpawnForAfterText + farcall SchedulePikachuSpawnForAfterText call EnablePikachuOverworldSpriteDrawing ld a, $1a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $12 ld [wOaksLabCurScript], a @@ -482,7 +482,7 @@ OaksLabScript17: OaksLabScript18: ld a, $1b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a @@ -492,14 +492,14 @@ OaksLabScript18: OaksLabScript19: xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a call EnableAutoTextBoxDrawing call StopAllMusic - callba Music_RivalAlternateStart + farcall Music_RivalAlternateStart ld a, $13 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID - callab Func_f1be0 + callfar Func_f1be0 call OaksLabScript_1c8b9 ld a, HS_OAKS_LAB_RIVAL ld [wMissableObjectIndex], a @@ -513,7 +513,7 @@ OaksLabScript19: call FillMemory ld [hl], $ff ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndex], a ld de, wNPCMovementDirections2 call MoveSprite ld a, $14 @@ -522,14 +522,14 @@ OaksLabScript19: OaksLabScript_1c78e: ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $6 - ld [hSpriteIndexOrTextID], a - xor a - ld [hSpriteFacingDirection], a + ldh [hSpriteIndex], a + xor a ; SPRITE_FACING_DOWN + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ret @@ -543,21 +543,21 @@ OaksLabScript20: ld [wJoyIgnore], a call OaksLabScript_1c78e ld a, $14 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call DelayFrame call OaksLabScript_1c78e ld a, $15 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call DelayFrame call OaksLabScript_1c78e ld a, $16 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call DelayFrame ld a, $17 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld a, HS_POKEDEX_1 @@ -568,16 +568,16 @@ OaksLabScript20: predef HideObject call OaksLabScript_1c78e ld a, $18 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_RIGHT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call Delay3 ld a, $19 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_POKEDEX ld a, $1 @@ -597,9 +597,9 @@ OaksLabScript20: call FillMemory ld [hl], $ff call StopAllMusic - callba Music_RivalAlternateStart + farcall Music_RivalAlternateStart ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a ld de, wNPCMovementDirections2 call MoveSprite ld a, $15 @@ -653,33 +653,33 @@ OaksLabScript_RemoveParcel: OaksLabScript_1c8b9: ld a, $7c - ld [$ffeb], a - ld a, $8 - ld [$ffee], a + ldh [hSpriteScreenYCoord], a + ld a, 8 + ldh [hSpriteMapXCoord], a ld a, [wYCoord] cp 3 jr nz, .asm_1c8d3 ld a, $4 ld [wNPCMovementDirections2Index], a ld a, $30 - ld b, $b + ld b, 11 jr .asm_1c8f6 .asm_1c8d3 - cp $1 + cp 1 jr nz, .asm_1c8e2 ld a, $2 ld [wNPCMovementDirections2Index], a ld a, $30 - ld b, $9 + ld b, 9 jr .asm_1c8f6 .asm_1c8e2 ld a, $3 ld [wNPCMovementDirections2Index], a - ld b, $a + ld b, 10 ld a, [wXCoord] - cp $4 + cp 4 jr nz, .asm_1c8f4 ld a, $40 jr .asm_1c8f6 @@ -687,9 +687,9 @@ OaksLabScript_1c8b9: .asm_1c8f4 ld a, $20 .asm_1c8f6 - ld [$ffec], a + ldh [hSpriteScreenXCoord], a ld a, b - ld [$ffed], a + ldh [hSpriteMapYCoord], a ld a, $1 ld [wSpriteIndex], a call SetSpritePosition1 @@ -744,7 +744,7 @@ OaksLab_TextPointers2: dw OaksLabText9 OaksLabText1: - TX_ASM + text_asm CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB_2 jr nz, .beforeChooseMon ld hl, OaksLabGaryText1 @@ -763,19 +763,19 @@ OaksLabText1: jp TextScriptEnd OaksLabGaryText1: - TX_FAR _OaksLabGaryText1 - db "@" + text_far _OaksLabGaryText1 + text_end OaksLabText40: - TX_FAR _OaksLabText40 - db "@" + text_far _OaksLabText40 + text_end OaksLabText41: - TX_FAR _OaksLabText41 - db "@" + text_far _OaksLabText41 + text_end OaksLabText2: - TX_ASM + text_asm ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a CheckEvent EVENT_OAK_ASKED_TO_CHOOSE_MON @@ -787,8 +787,8 @@ OaksLabText2: jp TextScriptEnd OaksLabText39: - TX_FAR _OaksLabText39 - db "@" + text_far _OaksLabText39 + text_end OaksLabScript_1c9ac: ld a, $1 @@ -801,7 +801,7 @@ OaksLabScript_1c9ac: jp TextScriptEnd OaksLabText3: - TX_ASM + text_asm CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS jr nz, .asm_1c9d9 ld hl, wPokedexOwned @@ -883,108 +883,108 @@ OaksLabText3: jp TextScriptEnd OaksLabText_1ca72: - TX_FAR _OaksLabPikachuText - db "@" + text_far _OaksLabPikachuText + text_end OaksLabText_1ca77: - TX_FAR _OaksLabText_1d2f5 - db "@" + text_far _OaksLabText_1d2f5 + text_end OaksLabText_1ca7c: - TX_FAR _OaksLabText_1d2fa - db "@" + text_far _OaksLabText_1d2fa + text_end OaksLabDeliverParcelText: - TX_FAR _OaksLabDeliverParcelText1 - TX_SFX_KEY_ITEM - TX_FAR _OaksLabDeliverParcelText2 - db "@" + text_far _OaksLabDeliverParcelText1 + sound_get_key_item + text_far _OaksLabDeliverParcelText2 + text_end OaksLabAroundWorldText: - TX_FAR _OaksLabAroundWorldText - db "@" + text_far _OaksLabAroundWorldText + text_end OaksLabGivePokeballsText: - TX_FAR _OaksLabGivePokeballsText1 - TX_SFX_KEY_ITEM - TX_FAR _OaksLabGivePokeballsText2 - db "@" + text_far _OaksLabGivePokeballsText1 + sound_get_key_item + text_far _OaksLabGivePokeballsText2 + text_end OaksLabPleaseVisitText: - TX_FAR _OaksLabPleaseVisitText - db "@" + text_far _OaksLabPleaseVisitText + text_end OaksLabText_1ca9f: - TX_FAR _OaksLabText_1d31d - db "@" + text_far _OaksLabText_1d31d + text_end OaksLabText4: OaksLabText5: - TX_ASM + text_asm ld hl, OaksLabText_1caae call PrintText jp TextScriptEnd OaksLabText_1caae: - TX_FAR _OaksLabText_1d32c - db "@" + text_far _OaksLabText_1d32c + text_end OaksLabText6: - TX_FAR _OaksLabText8 - db "@" + text_far _OaksLabText8 + text_end OaksLabText7: - TX_ASM + text_asm ld hl, OaksLabText_1cac2 call PrintText jp TextScriptEnd OaksLabText_1cac2: - TX_FAR _OaksLabText_1d340 - db "@" + text_far _OaksLabText_1d340 + text_end OaksLabText13: - TX_ASM + text_asm ld hl, OaksLabRivalWaitingText call PrintText jp TextScriptEnd OaksLabRivalWaitingText: - TX_FAR _OaksLabRivalWaitingText - db "@" + text_far _OaksLabRivalWaitingText + text_end OaksLabText14: - TX_ASM + text_asm ld hl, OaksLabChooseMonText call PrintText jp TextScriptEnd OaksLabChooseMonText: - TX_FAR _OaksLabChooseMonText - db "@" + text_far _OaksLabChooseMonText + text_end OaksLabText15: - TX_ASM + text_asm ld hl, OaksLabRivalInterjectionText call PrintText jp TextScriptEnd OaksLabRivalInterjectionText: - TX_FAR _OaksLabRivalInterjectionText - db "@" + text_far _OaksLabRivalInterjectionText + text_end OaksLabText16: - TX_ASM + text_asm ld hl, OaksLabBePatientText call PrintText jp TextScriptEnd OaksLabBePatientText: - TX_FAR _OaksLabBePatientText - db "@" + text_far _OaksLabBePatientText + text_end OaksLabText17: - TX_ASM + text_asm ld hl, OaksLabRivalTakesText1 call PrintText ld hl, OaksLabRivalTakesText2 @@ -998,28 +998,28 @@ OaksLabText17: jp TextScriptEnd OaksLabRivalTakesText1: - TX_FAR _OaksLabRivalTakesText1 - db "@" + text_far _OaksLabRivalTakesText1 + text_end OaksLabRivalTakesText2: - TX_FAR _OaksLabRivalTakesText2 - TX_SFX_KEY_ITEM - db "@" + text_far _OaksLabRivalTakesText2 + sound_get_key_item + text_end OaksLabRivalTakesText3: - TX_FAR _OaksLabRivalTakesText3 - db "@" + text_far _OaksLabRivalTakesText3 + text_end OaksLabRivalTakesText4: - TX_FAR _OaksLabRivalTakesText4 - db "@" + text_far _OaksLabRivalTakesText4 + text_end OaksLabRivalTakesText5: - TX_FAR _OaksLabRivalTakesText5 - db "@" + text_far _OaksLabRivalTakesText5 + text_end OaksLabText18: - TX_ASM + text_asm ld a, PIKACHU ld [wPlayerStarter], a ld [wd11e], a @@ -1047,110 +1047,110 @@ OaksLabText18: jp TextScriptEnd OaksLabOakGivesText: - TX_FAR _OaksLabOakGivesText - db "@" + text_far _OaksLabOakGivesText + text_end OaksLabRecievedText: - TX_FAR _OaksLabReceivedText - TX_SFX_KEY_ITEM - db "@" + text_far _OaksLabReceivedText + sound_get_key_item + text_end OaksLabText10: - TX_ASM + text_asm ld hl, OaksLabLeavingText call PrintText jp TextScriptEnd OaksLabLeavingText: - TX_FAR _OaksLabLeavingText - db "@" + text_far _OaksLabLeavingText + text_end OaksLabText11: - TX_ASM + text_asm ld hl, OaksLabRivalChallengeText call PrintText jp TextScriptEnd OaksLabRivalChallengeText: - TX_FAR _OaksLabRivalChallengeText - db "@" + text_far _OaksLabRivalChallengeText + text_end OaksLabRivalDefeatedText: - TX_FAR _OaksLabText_1d3be - db "@" + text_far _OaksLabText_1d3be + text_end OaksLabRivalBeatYouText: - TX_FAR _OaksLabText_1d3c3 - db "@" + text_far _OaksLabText_1d3c3 + text_end OaksLabText12: - TX_ASM + text_asm ld hl, OaksLabRivalToughenUpText call PrintText jp TextScriptEnd OaksLabRivalToughenUpText: - TX_FAR _OaksLabRivalToughenUpText - db "@" + text_far _OaksLabRivalToughenUpText + text_end OaksLabText26: - TX_ASM + text_asm ldpikacry e, PikachuCry2 - callab PlayPikachuSoundClip + callfar PlayPikachuSoundClip ld hl, OaksLabPikachuDislikesPokeballsText1 call PrintText jp TextScriptEnd OaksLabPikachuDislikesPokeballsText1: - TX_FAR _OaksLabPikachuDislikesPokeballsText1 - db "@" + text_far _OaksLabPikachuDislikesPokeballsText1 + text_end OaksLabText27: - TX_ASM + text_asm ld hl, OaksLabPikachuDislikesPokeballsText2 call PrintText jp TextScriptEnd OaksLabPikachuDislikesPokeballsText2: - TX_FAR _OaksLabPikachuDislikesPokeballsText2 - db "@" + text_far _OaksLabPikachuDislikesPokeballsText2 + text_end OaksLabText19: - TX_FAR _OaksLabText21 - db "@" + text_far _OaksLabText21 + text_end OaksLabText20: - TX_FAR _OaksLabText22 - db "@" + text_far _OaksLabText22 + text_end OaksLabText21: - TX_FAR _OaksLabText23 - db "@" + text_far _OaksLabText23 + text_end OaksLabText22: - TX_FAR _OaksLabText24 - db "@" + text_far _OaksLabText24 + text_end OaksLabText23: - TX_FAR _OaksLabText25 - TX_SFX_KEY_ITEM - db "@" + text_far _OaksLabText25 + sound_get_key_item + text_end OaksLabText24: - TX_FAR _OaksLabText26 - db "@" + text_far _OaksLabText26 + text_end OaksLabText25: - TX_FAR _OaksLabText27 - db "@" + text_far _OaksLabText27 + text_end OaksLabText8: OaksLabText9: - TX_ASM + text_asm ld hl, OaksLabText_1c31d call PrintText jp TextScriptEnd OaksLabText_1c31d: - TX_FAR _OaksLabText_1d405 - db "@" + text_far _OaksLabText_1d405 + text_end diff --git a/scripts/OaksLab2.asm b/scripts/OaksLab2.asm index 5e4e98a4..b0519827 100755 --- a/scripts/OaksLab2.asm +++ b/scripts/OaksLab2.asm @@ -1,4 +1,4 @@ -Func_f1be0: +Func_f1be0:: ld a, [wYCoord] cp 3 jr z, .asm_f1bf0 diff --git a/scripts/PalletTown.asm b/scripts/PalletTown.asm index fbdee4bc..28f93411 100755 --- a/scripts/PalletTown.asm +++ b/scripts/PalletTown.asm @@ -33,7 +33,7 @@ PalletTownScript0: SetEventReuseHL EVENT_PLAYER_AT_RIGHT_EXIT_TO_PALLET_TOWN .asm_18e40 xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $ff ld [wJoyIgnore], a ld a, PLAYER_DIR_UP @@ -41,7 +41,7 @@ PalletTownScript0: call StopAllMusic ld a, BANK(Music_MeetProfOak) ld c, a - ld a, MUSIC_MEET_PROF_OAK + ld a, MUSIC_MEET_PROF_OAK ; "oak appears" music call PlayMusic SetEvent EVENT_OAK_APPEARED_IN_PALLET @@ -56,7 +56,7 @@ PalletTownScript1: xor a ld [wcf0d], a ld a, 1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $FF ld [wJoyIgnore], a @@ -83,17 +83,17 @@ PalletTownScript2: ld a, 0 ld [wYCoord], a ld a, 1 - ld [hNPCPlayerRelativePosPerspective], a + ldh [hNPCPlayerRelativePosPerspective], a ld a, 1 swap a - ld [hNPCSpriteOffset], a + ldh [hNPCSpriteOffset], a predef CalcPositionOfPlayerRelativeToNPC ld hl, hNPCPlayerYDistance dec [hl] - predef FindPathToPlayer ; load Oak’s movement into wNPCMovementDirections2 + predef FindPathToPlayer ; load Oak's movement into wNPCMovementDirections2 ld de, wNPCMovementDirections2 ld a, 1 ; oak - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite ; trigger the next script @@ -114,7 +114,7 @@ PalletTownScript3: ld a, SPRITE_FACING_UP ld [wSpriteStateData1 + 1 * $10 + 9], a ld a, 1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ; oak faces the horizontally adjacent patch of grass to face pikachu ld a, $FF @@ -155,14 +155,14 @@ PalletTownScript5: ld a, $2 ld [wcf0d], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $2 ld [wSpriteStateData1 + 1 * $10 + 1], a ld a, SPRITE_FACING_UP ld [wSpriteStateData1 + 1 * $10 + 9], a ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff ld [wJoyIgnore], a @@ -181,7 +181,7 @@ PalletTownScript6: ld [wNPCMovementScriptFunctionNum], a ld a, $1 ld [wNPCMovementScriptPointerTableNum], a - ld a, [H_LOADEDROMBANK] + ldh a, [hLoadedROMBank] ld [wNPCMovementScriptBank], a ; trigger the next script @@ -231,7 +231,7 @@ PalletTown_TextPointers: dw PalletTownText8 PalletTownText1: - TX_ASM + text_asm ld a, [wcf0d] and a jr nz, .next @@ -252,8 +252,8 @@ PalletTownText1: jp TextScriptEnd OakAppearsText: - TX_FAR _OakAppearsText - TX_ASM + text_far _OakAppearsText + text_asm ld c, 10 call DelayFrames ld a, PLAYER_DIR_DOWN @@ -266,37 +266,37 @@ OakAppearsText: jp TextScriptEnd OakWalksUpText: - TX_FAR _OakWalksUpText - db "@" + text_far _OakWalksUpText + text_end PalletTownText_19002: - TX_FAR _OakWhewText - db "@" + text_far _OakWhewText + text_end PalletTownText8: ; girl - TX_FAR _OakGrassText - db "@" + text_far _OakGrassText + text_end PalletTownText2: ; fat man - TX_FAR _PalletTownText2 - db "@" + text_far _PalletTownText2 + text_end PalletTownText3: ; sign by lab - TX_FAR _PalletTownText3 - db "@" + text_far _PalletTownText3 + text_end PalletTownText4: ; sign by fence - TX_FAR _PalletTownText4 - db "@" + text_far _PalletTownText4 + text_end -PalletTownText5: ; sign by Red’s house - TX_FAR _PalletTownText5 - db "@" +PalletTownText5: ; sign by Red's house + text_far _PalletTownText5 + text_end -PalletTownText6: ; sign by Blue’s house - TX_FAR _PalletTownText6 - db "@" +PalletTownText6: ; sign by Blue's house + text_far _PalletTownText6 + text_end PalletTownText7: - TX_FAR _PalletTownText7 - db "@" + text_far _PalletTownText7 + text_end diff --git a/scripts/PewterCity.asm b/scripts/PewterCity.asm index 63d0fe71..26827bef 100755 --- a/scripts/PewterCity.asm +++ b/scripts/PewterCity.asm @@ -32,47 +32,47 @@ PewterCityScript_1925e: ld a, $fc ld [wJoyIgnore], a ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID CoordsData_19277: - db $11,$23 - db $11,$24 - db $12,$25 - db $13,$25 - db $ff + dbmapcoord 35, 17 + dbmapcoord 36, 17 + dbmapcoord 37, 18 + dbmapcoord 37, 19 + db -1 ; end PewterCityScript1: ld a, [wNPCMovementScriptPointerTableNum] and a ret nz ld a, $3 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, SPRITE_FACING_UP - ld [hSpriteImageIndex], a + ldh [hSpriteImageIndex], a call SpriteFunc_34a1 call PlayDefaultMusic ld hl, wFlags_0xcd60 set 4, [hl] ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $3c - ld [$ffeb], a + ldh [hSpriteScreenYCoord], a ld a, $30 - ld [$ffec], a - ld a, $c - ld [$ffed], a - ld a, $11 - ld [$ffee], a + ldh [hSpriteScreenXCoord], a + ld a, 12 + ldh [hSpriteMapYCoord], a + ld a, 17 + ldh [hSpriteMapXCoord], a ld a, $3 ld [wSpriteIndex], a call SetSpritePosition1 ld a, $3 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld de, MovementData_PewterMuseumGuyExit call MoveSprite ld a, $2 @@ -84,7 +84,7 @@ MovementData_PewterMuseumGuyExit: db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end PewterCityScript2: ld a, [wd730] @@ -115,29 +115,29 @@ PewterCityScript4: and a ret nz ld a, $5 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_LEFT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SpriteFunc_34a1 call PlayDefaultMusic ld hl, wFlags_0xcd60 set 4, [hl] ld a, $e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $3c - ld [$ffeb], a + ldh [hSpriteScreenYCoord], a ld a, $40 - ld [$ffec], a - ld a, $16 - ld [$ffed], a - ld a, $10 - ld [$ffee], a + ldh [hSpriteScreenXCoord], a + ld a, 22 + ldh [hSpriteMapYCoord], a + ld a, 16 + ldh [hSpriteMapXCoord], a ld a, $5 ld [wSpriteIndex], a call SetSpritePosition1 ld a, $5 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld de, MovementData_PewterGymGuyExit call MoveSprite ld a, $5 @@ -150,7 +150,7 @@ MovementData_PewterGymGuyExit: db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT - db $FF + db -1 ; end PewterCityScript5: ld a, [wd730] @@ -193,15 +193,15 @@ PewterCity_TextPointers: dw PewterCityText14 PewterCityText1: - TX_FAR _PewterCityText1 - db "@" + text_far _PewterCityText1 + text_end PewterCityText2: - TX_FAR _PewterCityText2 - db "@" + text_far _PewterCityText2 + text_end PewterCityText3: - TX_ASM + text_asm ld hl, PewterCityText_193f1 call PrintText call YesNoChoice @@ -215,12 +215,12 @@ PewterCityText3: ld hl, PewterCityText_193fb call PrintText xor a - ld [hJoyPressed], a - ld [hJoyHeld], a + ldh [hJoyPressed], a + ldh [hJoyHeld], a ld [wNPCMovementScriptFunctionNum], a ld a, $2 ld [wNPCMovementScriptPointerTableNum], a - ld a, [H_LOADEDROMBANK] + ldh a, [hLoadedROMBank] ld [wNPCMovementScriptBank], a ld a, $3 ld [wSpriteIndex], a @@ -231,23 +231,23 @@ PewterCityText3: jp TextScriptEnd PewterCityText_193f1: - TX_FAR _PewterCityText_193f1 - db "@" + text_far _PewterCityText_193f1 + text_end PewterCityText_193f6: - TX_FAR _PewterCityText_193f6 - db "@" + text_far _PewterCityText_193f6 + text_end PewterCityText_193fb: - TX_FAR _PewterCityText_193fb - db "@" + text_far _PewterCityText_193fb + text_end PewterCityText13: - TX_FAR _PewterCityText13 - db "@" + text_far _PewterCityText13 + text_end PewterCityText4: - TX_ASM + text_asm ld hl, PewterCityText_19427 call PrintText call YesNoChoice @@ -264,27 +264,27 @@ PewterCityText4: jp TextScriptEnd PewterCityText_19427: - TX_FAR _PewterCityText_19427 - db "@" + text_far _PewterCityText_19427 + text_end PewterCityText_1942c: - TX_FAR _PewterCityText_1942c - db "@" + text_far _PewterCityText_1942c + text_end PewterCityText_19431: - TX_FAR _PewterCityText_19431 - db "@" + text_far _PewterCityText_19431 + text_end PewterCityText5: - TX_ASM + text_asm ld hl, PewterCityText_1945d call PrintText xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wNPCMovementScriptFunctionNum], a ld a, $3 ld [wNPCMovementScriptPointerTableNum], a - ld a, [H_LOADEDROMBANK] + ldh a, [hLoadedROMBank] ld [wNPCMovementScriptBank], a ld a, $5 ld [wSpriteIndex], a @@ -294,29 +294,29 @@ PewterCityText5: jp TextScriptEnd PewterCityText_1945d: - TX_FAR _PewterCityText_1945d - db "@" + text_far _PewterCityText_1945d + text_end PewterCityText14: - TX_FAR _PewterCityText14 - db "@" + text_far _PewterCityText14 + text_end PewterCityText6: - TX_FAR _PewterCityText6 - db "@" + text_far _PewterCityText6 + text_end PewterCityText7: - TX_FAR _PewterCityText7 - db "@" + text_far _PewterCityText7 + text_end PewterCityText10: - TX_FAR _PewterCityText10 - db "@" + text_far _PewterCityText10 + text_end PewterCityText11: - TX_FAR _PewterCityText11 - db "@" + text_far _PewterCityText11 + text_end PewterCityText12: - TX_FAR _PewterCityText12 - db "@" + text_far _PewterCityText12 + text_end diff --git a/scripts/PewterGym.asm b/scripts/PewterGym.asm index 4ddec77e..76a58b71 100755 --- a/scripts/PewterGym.asm +++ b/scripts/PewterGym.asm @@ -2,7 +2,7 @@ PewterGym_Script: ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] - call nz, PewterGymScript_5c3a4 + call nz, .LoadNames call EnableAutoTextBoxDrawing ld hl, PewterGymTrainerHeader0 ld de, PewterGym_ScriptPointers @@ -11,16 +11,16 @@ PewterGym_Script: ld [wPewterGymCurScript], a ret -PewterGymScript_5c3a4: - ld hl, Gym1CityName - ld de, Gym1LeaderName +.LoadNames: + ld hl, .CityName + ld de, .LeaderName call LoadGymLeaderAndCityName ret -Gym1CityName: +.CityName: db "PEWTER CITY@" -Gym1LeaderName: +.LeaderName: db "BROCK@" PewterGymScript_5c3bf: @@ -44,26 +44,26 @@ PewterGymScript3: ld [wJoyIgnore], a PewterGymScript_5c3df: ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_BROCK - lb bc, TM_34, 1 + lb bc, TM_BIDE, 1 call GiveItem jr nc, .BagFull ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM34 jr .gymVictory .BagFull ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges - set 0, [hl] + set BIT_BOULDERBADGE, [hl] ld hl, wBeatGymFlags - set 0, [hl] + set BIT_BOULDERBADGE, [hl] ld a, HS_GYM_GUY ld [wMissableObjectIndex], a @@ -88,18 +88,11 @@ PewterGym_TextPointers: dw PewterGymText6 PewterGymTrainerHeader0: - dbEventFlagBit EVENT_BEAT_PEWTER_GYM_TRAINER_0 - db ($5 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_PEWTER_GYM_TRAINER_0 - dw PewterGymBattleText1 ; TextBeforeBattle - dw PewterGymAfterBattleText1 ; TextAfterBattle - dw PewterGymEndBattleText1 ; TextEndBattle - dw PewterGymEndBattleText1 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_PEWTER_GYM_TRAINER_0, 5, PewterGymBattleText1, PewterGymEndBattleText1, PewterGymAfterBattleText1 + db -1 ; end PewterGymText1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_BROCK jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM34 @@ -120,14 +113,14 @@ PewterGymText1: ld hl, PewterGymText_5c4bc ld de, PewterGymText_5c4bc call SaveEndBattleTextPointers - ld a, [H_SPRITEINDEX] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $1 ld [wGymLeaderNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wPewterGymCurScript], a ld [wCurMapScript], a @@ -135,55 +128,55 @@ PewterGymText1: jp TextScriptEnd PewterGymText_5c49e: - TX_FAR _PewterGymText_5c49e - db "@" + text_far _PewterGymText_5c49e + text_end PewterGymText_5c4a3: - TX_FAR _PewterGymText_5c4a3 - db "@" + text_far _PewterGymText_5c4a3 + text_end PewterGymText4: - TX_FAR _TM34PreReceiveText - db "@" + text_far _TM34PreReceiveText + text_end PewterGymText5: - TX_FAR _ReceivedTM34Text - TX_SFX_ITEM_1 - TX_FAR _TM34ExplanationText - db "@" + text_far _ReceivedTM34Text + sound_get_item_1 + text_far _TM34ExplanationText + text_end PewterGymText6: - TX_FAR _TM34NoRoomText - db "@" + text_far _TM34NoRoomText + text_end PewterGymText_5c4bc: - TX_FAR _PewterGymText_5c4bc - TX_SFX_ITEM_1 - TX_FAR _PewterGymText_5c4c1 - db "@" + text_far _PewterGymText_5c4bc + sound_get_item_1 + text_far _PewterGymText_5c4c1 + text_end PewterGymText2: - TX_ASM + text_asm ld hl, PewterGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd PewterGymBattleText1: - TX_FAR _PewterGymBattleText1 - db "@" + text_far _PewterGymBattleText1 + text_end PewterGymEndBattleText1: - TX_FAR _PewterGymEndBattleText1 - db "@" + text_far _PewterGymEndBattleText1 + text_end PewterGymAfterBattleText1: - TX_FAR _PewterGymAfterBattleText1 - db "@" + text_far _PewterGymAfterBattleText1 + text_end PewterGymText3: - TX_ASM + text_asm ld a, [wBeatGymFlags] - bit 0, a + bit BIT_BOULDERBADGE, a jr nz, .asm_5c50c ld hl, PewterGymText_5c515 call PrintText @@ -216,26 +209,26 @@ PewterGymText3: jp TextScriptEnd PewterGymText_5c515: - TX_FAR _PewterGymText_5c515 - db "@" + text_far _PewterGymText_5c515 + text_end PewterGymText_5c51a: - TX_FAR _PewterGymText_5c51a - db "@" + text_far _PewterGymText_5c51a + text_end PewterGymText_5c51f: - TX_FAR _PewterGymText_5c51f - db "@" + text_far _PewterGymText_5c51f + text_end PewterGymText_5c524: - TX_FAR _PewterGymText_5c524 - db "@" + text_far _PewterGymText_5c524 + text_end PewterGymText_5c529: - TX_FAR _PewterGymText_5c529 - db "@" + text_far _PewterGymText_5c529 + text_end PewterGymText_5c41c: - TX_FAR _PewterGymGuyText - db "@" + text_far _PewterGymGuyText + text_end diff --git a/scripts/PewterMart.asm b/scripts/PewterMart.asm index 5b3e7617..a0e9e63e 100755 --- a/scripts/PewterMart.asm +++ b/scripts/PewterMart.asm @@ -1,6 +1,6 @@ PewterMart_Script: call EnableAutoTextBoxDrawing - ld a, $1 + ld a, TRUE ld [wAutoTextBoxDrawingControl], a ret @@ -10,21 +10,21 @@ PewterMart_TextPointers: dw PewterMartText3 PewterMartText2: - TX_ASM + text_asm ld hl, .Text call PrintText jp TextScriptEnd .Text - TX_FAR _PewterMartText2 - db "@" + text_far _PewterMartText2 + text_end PewterMartText3: - TX_ASM + text_asm ld hl, .Text call PrintText jp TextScriptEnd .Text - TX_FAR _PewterMartText3 - db "@" + text_far _PewterMartText3 + text_end diff --git a/scripts/PewterNidoranHouse.asm b/scripts/PewterNidoranHouse.asm index 2f3f4145..77fb12c0 100755 --- a/scripts/PewterNidoranHouse.asm +++ b/scripts/PewterNidoranHouse.asm @@ -8,17 +8,17 @@ PewterNidoranHouse_TextPointers: dw PewterHouse1Text3 PewterHouse1Text1: - TX_FAR _PewterHouse1Text1 - TX_ASM + text_far _PewterHouse1Text1 + text_asm ld a, NIDORAN_M call PlayCry call WaitForSoundToFinish jp TextScriptEnd PewterHouse1Text2: - TX_FAR _PewterHouse1Text2 - db "@" + text_far _PewterHouse1Text2 + text_end PewterHouse1Text3: - TX_FAR _PewterHouse1Text3 - db "@" + text_far _PewterHouse1Text3 + text_end diff --git a/scripts/PewterPokecenter.asm b/scripts/PewterPokecenter.asm index add001bc..247ecb03 100755 --- a/scripts/PewterPokecenter.asm +++ b/scripts/PewterPokecenter.asm @@ -14,26 +14,26 @@ PewterPokecenter_TextPointers: dw PewterPokecenterText6 PewterHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse PewterPokecenterText2: - TX_FAR _PewterPokecenterText2 - db "@" + text_far _PewterPokecenterText2 + text_end PewterJigglypuffText: - TX_ASM - callba PewterJigglypuff + text_asm + farcall PewterJigglypuff jp TextScriptEnd PewterTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist PewterPokecenterText5: - TX_ASM - callba Func_f1d98 + text_asm + farcall Func_f1d98 jp TextScriptEnd PewterPokecenterText6: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/PewterPokecenter2.asm b/scripts/PewterPokecenter2.asm index 3d4de3f7..79d22b2f 100755 --- a/scripts/PewterPokecenter2.asm +++ b/scripts/PewterPokecenter2.asm @@ -1,20 +1,22 @@ -Func_f1d98: +Func_f1d98:: ld hl, PewterPokecenterText_f1d9f call PrintText ret PewterPokecenterText_f1d9f: - TX_FAR _PewterPokecenterText3 - db "@" + text_far _PewterPokecenterText3 + text_end -PewterJigglypuff: - ld a, $1 +PewterJigglypuff:: + ld a, TRUE ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld hl, .Text + ld hl, .JigglypuffText call PrintText + call StopAllMusic ld c, 32 call DelayFrames + ld hl, JigglypuffFacingDirections ld de, wJigglypuffFacingDirections ld bc, JigglypuffFacingDirectionsEnd - JigglypuffFacingDirections @@ -27,15 +29,16 @@ PewterJigglypuff: inc hl jr nz, .findMatchingFacingDirectionLoop dec hl + push hl ld c, BANK(Music_JigglypuffSong) ld a, MUSIC_JIGGLYPUFF_SONG call PlayMusic pop hl -.loop + +.spinMovementLoop ld a, [hl] ld [wSprite03StateData1ImageIndex], a - ; rotate the array push hl ld hl, wJigglypuffFacingDirections @@ -45,15 +48,13 @@ PewterJigglypuff: ld a, [wJigglypuffFacingDirections - 1] ld [wJigglypuffFacingDirections + 3], a pop hl - ld c, 24 call DelayFrames - ld a, [wChannelSoundIDs] ld b, a ld a, [wChannelSoundIDs + Ch2] or b - jr nz, .loop + jr nz, .spinMovementLoop ld c, 48 call DelayFrames @@ -61,14 +62,14 @@ PewterJigglypuff: ld a, [wd472] bit 7, a ret z - callab CheckPikachuFaintedOrStatused + callfar CheckPikachuFaintedOrStatused ret c call DisablePikachuFollowingPlayer ret -.Text - TX_FAR _PewterJigglypuffText - db "@" +.JigglypuffText: + text_far _PewterJigglypuffText + text_end JigglypuffFacingDirections: db $40 | SPRITE_FACING_DOWN diff --git a/scripts/PewterSpeechHouse.asm b/scripts/PewterSpeechHouse.asm index 943e1759..5d3d9249 100755 --- a/scripts/PewterSpeechHouse.asm +++ b/scripts/PewterSpeechHouse.asm @@ -6,9 +6,9 @@ PewterSpeechHouse_TextPointers: dw PewterHouse2Text2 PewterHouse2Text1: - TX_FAR _PewterHouse2Text1 - db "@" + text_far _PewterHouse2Text1 + text_end PewterHouse2Text2: - TX_FAR _PewterHouse2Text2 - db "@" + text_far _PewterHouse2Text2 + text_end diff --git a/scripts/PokemonFanClub.asm b/scripts/PokemonFanClub.asm index 3434f871..c7990f19 100755 --- a/scripts/PokemonFanClub.asm +++ b/scripts/PokemonFanClub.asm @@ -27,7 +27,7 @@ FanClubScript2: FanClubScript_59a39: call Random - ld a, [hRandomAdd] + ldh a, [hRandomAdd] cp 25 call c, FanClubScript_59a44 ret @@ -36,7 +36,7 @@ FanClubScript_59a44: ld a, [wd472] bit 7, a ret z - callab CheckPikachuFaintedOrStatused + callfar CheckPikachuFaintedOrStatused ret c ld a, $1 ld [wFanClubCurScript], a @@ -55,7 +55,7 @@ FanClubScript_59a44: ld [wSpriteStateData1 + 3 * $10 + 1], a ; Seel xor a ; SPRITE_FACING_DOWN ld [wSpriteStateData1 + 3 * $10 + 9], a - callab InitializePikachuTextID + callfar InitializePikachuTextID call DisablePikachuFollowingPlayer ret @@ -78,7 +78,7 @@ PokemonFanClub_TextPointers: FanClubText1: ; clefairy fan - TX_ASM + text_asm CheckEventHL EVENT_152 jr z, .asm_59aaf ld hl, .yellowtext @@ -101,20 +101,20 @@ FanClubText1: jp TextScriptEnd .normaltext - TX_FAR PikachuFanText - db "@" + text_far PikachuFanText + text_end .bettertext - TX_FAR PikachuFanBetterText - db "@" + text_far PikachuFanBetterText + text_end .yellowtext - TX_FAR PikachuFanPrintText - db "@" + text_far PikachuFanPrintText + text_end FanClubText2: ; seel fan - TX_ASM + text_asm CheckEventHL EVENT_152 jr z, .asm_59ae7 ld hl, .yellowtext @@ -135,20 +135,20 @@ FanClubText2: jp TextScriptEnd .normaltext - TX_FAR SeelFanText - db "@" + text_far SeelFanText + text_end .bettertext - TX_FAR SeelFanBetterText - db "@" + text_far SeelFanBetterText + text_end .yellowtext - TX_FAR SeelFanPrintText - db "@" + text_far SeelFanPrintText + text_end FanClubText3: ; pikachu - TX_ASM + text_asm ld hl, .text call PrintText ld a, CLEFAIRY @@ -157,12 +157,12 @@ FanClubText3: jp TextScriptEnd .text - TX_FAR FanClubPikachuText - db "@" + text_far FanClubPikachuText + text_end FanClubText4: ; seel - TX_ASM + text_asm ld hl, .text call PrintText ld a, SEEL @@ -171,12 +171,12 @@ FanClubText4: jp TextScriptEnd .text - TX_FAR FanClubSeelText - db "@" + text_far FanClubSeelText + text_end FanClubText5: ; chair - TX_ASM + text_asm CheckEventHL EVENT_152 jr z, .check_bike_voucher ld hl, Text_59c1f @@ -190,33 +190,32 @@ FanClubText5: .check_bike_voucher CheckEvent EVENT_GOT_BIKE_VOUCHER - jr nz, .got_bike_voucher_already - ld hl, Text_59bfc + jr nz, .nothingleft + ld hl, .meetchairtext call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .declined_story - ld hl, Text_59c01 + jr nz, .nothanks + + ; tell the story + ld hl, .storytext call PrintText lb bc, BIKE_VOUCHER, 1 call GiveItem - jr nc, .no_room_for_voucher - ld hl, Text_59c06 + jr nc, .bag_full + ld hl, .receivedvouchertext call PrintText SetEvent EVENT_GOT_BIKE_VOUCHER jp TextScriptEnd - -.no_room_for_voucher - ld hl, Text_59c1a +.bag_full + ld hl, .bagfulltext jr .gbpals_print_text - -.declined_story - ld hl, Text_59c10 +.nothanks + ld hl, .nostorytext jr .gbpals_print_text - -.got_bike_voucher_already - ld hl, Text_59c15 +.nothingleft + ld hl, .finaltext .gbpals_print_text push hl call LoadGBPal @@ -244,7 +243,7 @@ FanClubText5: ld [wUpdateSpritesEnabled], a ld hl, wd730 set 6, [hl] - callab PrintFanClubPortrait + callfar PrintFanClubPortrait ld hl, wd730 res 6, [hl] call GBPalWhiteOutWithDelay3 @@ -254,54 +253,54 @@ FanClubText5: call Delay3 call GBPalNormal ld hl, Text_59c2e - ld a, [hOaksAideResult] + ldh a, [hOaksAideResult] and a jr nz, .gbpals_print_text ld hl, Text_59c29 jr .gbpals_print_text -Text_59bfc: - TX_FAR FanClubMeetChairText - db "@" +.meetchairtext + text_far FanClubMeetChairText + text_end -Text_59c01: - TX_FAR FanClubChairStoryText - db "@" +.storytext + text_far FanClubChairStoryText + text_end -Text_59c06: - TX_FAR ReceivedBikeVoucherText - TX_SFX_KEY_ITEM - TX_FAR ExplainBikeVoucherText - db "@" +.receivedvouchertext + text_far ReceivedBikeVoucherText + sound_get_key_item + text_far ExplainBikeVoucherText + text_end -Text_59c10: - TX_FAR FanClubNoStoryText - db "@" +.nostorytext + text_far FanClubNoStoryText + text_end -Text_59c15: - TX_FAR FanClubChairFinalText - db "@" +.finaltext + text_far FanClubChairFinalText + text_end -Text_59c1a: - TX_FAR FanClubBagFullText - db "@" +.bagfulltext + text_far FanClubBagFullText + text_end Text_59c1f: - TX_FAR FanClubChairPrintText1 - db "@" + text_far FanClubChairPrintText1 + text_end Text_59c24: - TX_FAR FanClubChairPrintText2 - db "@" + text_far FanClubChairPrintText2 + text_end Text_59c29: - TX_FAR FanClubChairPrintText3 - db "@" + text_far FanClubChairPrintText3 + text_end Text_59c2e: - TX_FAR FanClubChairPrintText4 - db "@" + text_far FanClubChairPrintText4 + text_end FanClubText6: - TX_FAR _FanClubText6 - db "@" + text_far _FanClubText6 + text_end diff --git a/scripts/PokemonMansion1F.asm b/scripts/PokemonMansion1F.asm index 639a4acf..ac86d626 100755 --- a/scripts/PokemonMansion1F.asm +++ b/scripts/PokemonMansion1F.asm @@ -45,14 +45,14 @@ Mansion1ReplaceBlock: predef ReplaceTileBlock ret -Mansion1Script_Switches: +Mansion1Script_Switches:: ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID PokemonMansion1F_ScriptPointers: @@ -67,36 +67,29 @@ PokemonMansion1F_TextPointers: dw Mansion1Text4 Mansion1TrainerHeader0: - dbEventFlagBit EVENT_BEAT_MANSION_1_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MANSION_1_TRAINER_0 - dw Mansion1BattleText2 ; TextBeforeBattle - dw Mansion1AfterBattleText2 ; TextAfterBattle - dw Mansion1EndBattleText2 ; TextEndBattle - dw Mansion1EndBattleText2 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_MANSION_1_TRAINER_0, 3, Mansion1BattleText2, Mansion1EndBattleText2, Mansion1AfterBattleText2 + db -1 ; end Mansion1Text1: - TX_ASM + text_asm ld hl, Mansion1TrainerHeader0 call TalkToTrainer jp TextScriptEnd Mansion1BattleText2: - TX_FAR _Mansion1BattleText2 - db "@" + text_far _Mansion1BattleText2 + text_end Mansion1EndBattleText2: - TX_FAR _Mansion1EndBattleText2 - db "@" + text_far _Mansion1EndBattleText2 + text_end Mansion1AfterBattleText2: - TX_FAR _Mansion1AfterBattleText2 - db "@" + text_far _Mansion1AfterBattleText2 + text_end Mansion1Text4: - TX_ASM + text_asm ld hl, MansionSwitchText call PrintText call YesNoChoice @@ -122,13 +115,13 @@ Mansion1Text4: jp TextScriptEnd MansionSwitchText: - TX_FAR _MansionSwitchText - db "@" + text_far _MansionSwitchText + text_end MansionSwitchPressedText: - TX_FAR _MansionSwitchPressedText - db "@" + text_far _MansionSwitchPressedText + text_end MansionSwitchNotPressedText: - TX_FAR _MansionSwitchNotPressedText - db "@" + text_far _MansionSwitchNotPressedText + text_end diff --git a/scripts/PokemonMansion2F.asm b/scripts/PokemonMansion2F.asm index 8d05cdc9..2edd0fb6 100755 --- a/scripts/PokemonMansion2F.asm +++ b/scripts/PokemonMansion2F.asm @@ -41,14 +41,14 @@ Mansion2Script_5202f: ld [wNewTileBlockID], a predef_jump ReplaceTileBlock -Mansion2Script_Switches: +Mansion2Script_Switches:: ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID PokemonMansion2F_ScriptPointers: @@ -64,45 +64,38 @@ PokemonMansion2F_TextPointers: dw Mansion2Text5 Mansion2TrainerHeader0: - dbEventFlagBit EVENT_BEAT_MANSION_2_TRAINER_0 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MANSION_2_TRAINER_0 - dw Mansion2BattleText1 ; TextBeforeBattle - dw Mansion2AfterBattleText1 ; TextAfterBattle - dw Mansion2EndBattleText1 ; TextEndBattle - dw Mansion2EndBattleText1 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_MANSION_2_TRAINER_0, 0, Mansion2BattleText1, Mansion2EndBattleText1, Mansion2AfterBattleText1 + db -1 ; end Mansion2Text1: - TX_ASM + text_asm ld hl, Mansion2TrainerHeader0 call TalkToTrainer jp TextScriptEnd Mansion2BattleText1: - TX_FAR _Mansion2BattleText1 - db "@" + text_far _Mansion2BattleText1 + text_end Mansion2EndBattleText1: - TX_FAR _Mansion2EndBattleText1 - db "@" + text_far _Mansion2EndBattleText1 + text_end Mansion2AfterBattleText1: - TX_FAR _Mansion2AfterBattleText1 - db "@" + text_far _Mansion2AfterBattleText1 + text_end Mansion2Text3: - TX_FAR _Mansion2Text3 - db "@" + text_far _Mansion2Text3 + text_end Mansion2Text4: - TX_FAR _Mansion2Text4 - db "@" + text_far _Mansion2Text4 + text_end Mansion3Text6: Mansion2Text5: - TX_ASM + text_asm ld hl, Mansion2Text_520c2 call PrintText call YesNoChoice @@ -128,13 +121,13 @@ Mansion2Text5: jp TextScriptEnd Mansion2Text_520c2: - TX_FAR _Mansion2Text_520c2 - db "@" + text_far _Mansion2Text_520c2 + text_end Mansion2Text_520c7: - TX_FAR _Mansion2Text_520c7 - db "@" + text_far _Mansion2Text_520c7 + text_end Mansion2Text_520cc: - TX_FAR _Mansion2Text_520cc - db "@" + text_far _Mansion2Text_520cc + text_end diff --git a/scripts/PokemonMansion3F.asm b/scripts/PokemonMansion3F.asm index e19fec72..0f62d6e0 100755 --- a/scripts/PokemonMansion3F.asm +++ b/scripts/PokemonMansion3F.asm @@ -51,10 +51,10 @@ Mansion3Script0: ret CoordsData_52254: - db $0E,$10 - db $0E,$11 - db $0E,$13 - db $FF + dbmapcoord 16, 14 + dbmapcoord 17, 14 + dbmapcoord 19, 14 + db -1 ; end Mansion3Script_5225b: xor a @@ -72,14 +72,14 @@ Mansion3Script_5225b: set 4, [hl] ret -Mansion3Script_Switches: +Mansion3Script_Switches:: ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID PokemonMansion3F_TextPointers: @@ -91,61 +91,47 @@ PokemonMansion3F_TextPointers: dw Mansion3Text6 Mansion3TrainerHeader0: - dbEventFlagBit EVENT_BEAT_MANSION_3_TRAINER_0 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MANSION_3_TRAINER_0 - dw Mansion3BattleText1 ; TextBeforeBattle - dw Mansion3AfterBattleText1 ; TextAfterBattle - dw Mansion3EndBattleText1 ; TextEndBattle - dw Mansion3EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_MANSION_3_TRAINER_0, 0, Mansion3BattleText1, Mansion3EndBattleText1, Mansion3AfterBattleText1 Mansion3TrainerHeader1: - dbEventFlagBit EVENT_BEAT_MANSION_3_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MANSION_3_TRAINER_1 - dw Mansion3BattleText2 ; TextBeforeBattle - dw Mansion3AfterBattleText2 ; TextAfterBattle - dw Mansion3EndBattleText2 ; TextEndBattle - dw Mansion3EndBattleText2 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_MANSION_3_TRAINER_1, 2, Mansion3BattleText2, Mansion3EndBattleText2, Mansion3AfterBattleText2 + db -1 ; end Mansion3Text1: - TX_ASM + text_asm ld hl, Mansion3TrainerHeader0 call TalkToTrainer jp TextScriptEnd Mansion3Text2: - TX_ASM + text_asm ld hl, Mansion3TrainerHeader1 call TalkToTrainer jp TextScriptEnd Mansion3BattleText1: - TX_FAR _Mansion3BattleText1 - db "@" + text_far _Mansion3BattleText1 + text_end Mansion3EndBattleText1: - TX_FAR _Mansion3EndBattleText1 - db "@" + text_far _Mansion3EndBattleText1 + text_end Mansion3AfterBattleText1: - TX_FAR _Mansion3AfterBattleText1 - db "@" + text_far _Mansion3AfterBattleText1 + text_end Mansion3BattleText2: - TX_FAR _Mansion3BattleText2 - db "@" + text_far _Mansion3BattleText2 + text_end Mansion3EndBattleText2: - TX_FAR _Mansion3EndBattleText2 - db "@" + text_far _Mansion3EndBattleText2 + text_end Mansion3AfterBattleText2: - TX_FAR _Mansion3AfterBattleText2 - db "@" + text_far _Mansion3AfterBattleText2 + text_end Mansion3Text5: - TX_FAR _Mansion3Text5 - db "@" + text_far _Mansion3Text5 + text_end diff --git a/scripts/PokemonMansionB1F.asm b/scripts/PokemonMansionB1F.asm index 0a668c09..f3b62793 100755 --- a/scripts/PokemonMansionB1F.asm +++ b/scripts/PokemonMansionB1F.asm @@ -43,14 +43,14 @@ Mansion4Script_523cf: call Mansion2Script_5202f ret -Mansion4Script_Switches: +Mansion4Script_Switches:: ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $9 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID PokemonMansionB1F_ScriptPointers: @@ -70,61 +70,47 @@ PokemonMansionB1F_TextPointers: dw Mansion3Text6 Mansion4TrainerHeader0: - dbEventFlagBit EVENT_BEAT_MANSION_4_TRAINER_0 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MANSION_4_TRAINER_0 - dw Mansion4BattleText1 ; TextBeforeBattle - dw Mansion4AfterBattleText1 ; TextAfterBattle - dw Mansion4EndBattleText1 ; TextEndBattle - dw Mansion4EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_MANSION_4_TRAINER_0, 0, Mansion4BattleText1, Mansion4EndBattleText1, Mansion4AfterBattleText1 Mansion4TrainerHeader1: - dbEventFlagBit EVENT_BEAT_MANSION_4_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MANSION_4_TRAINER_1 - dw Mansion4BattleText2 ; TextBeforeBattle - dw Mansion4AfterBattleText2 ; TextAfterBattle - dw Mansion4EndBattleText2 ; TextEndBattle - dw Mansion4EndBattleText2 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_MANSION_4_TRAINER_1, 3, Mansion4BattleText2, Mansion4EndBattleText2, Mansion4AfterBattleText2 + db -1 ; end Mansion4Text1: - TX_ASM + text_asm ld hl, Mansion4TrainerHeader0 call TalkToTrainer jp TextScriptEnd Mansion4Text2: - TX_ASM + text_asm ld hl, Mansion4TrainerHeader1 call TalkToTrainer jp TextScriptEnd Mansion4BattleText1: - TX_FAR _Mansion4BattleText1 - db "@" + text_far _Mansion4BattleText1 + text_end Mansion4EndBattleText1: - TX_FAR _Mansion4EndBattleText1 - db "@" + text_far _Mansion4EndBattleText1 + text_end Mansion4AfterBattleText1: - TX_FAR _Mansion4AfterBattleText1 - db "@" + text_far _Mansion4AfterBattleText1 + text_end Mansion4BattleText2: - TX_FAR _Mansion4BattleText2 - db "@" + text_far _Mansion4BattleText2 + text_end Mansion4EndBattleText2: - TX_FAR _Mansion4EndBattleText2 - db "@" + text_far _Mansion4EndBattleText2 + text_end Mansion4AfterBattleText2: - TX_FAR _Mansion4AfterBattleText2 - db "@" + text_far _Mansion4AfterBattleText2 + text_end Mansion4Text7: - TX_FAR _Mansion4Text7 - db "@" + text_far _Mansion4Text7 + text_end diff --git a/scripts/PokemonTower1F.asm b/scripts/PokemonTower1F.asm index b383c647..0870364c 100755 --- a/scripts/PokemonTower1F.asm +++ b/scripts/PokemonTower1F.asm @@ -10,21 +10,21 @@ PokemonTower1F_TextPointers: dw PokemonTower1Text5 PokemonTower1Text1: - TX_FAR _PokemonTower1Text1 - db "@" + text_far _PokemonTower1Text1 + text_end PokemonTower1Text2: - TX_FAR _PokemonTower1Text2 - db "@" + text_far _PokemonTower1Text2 + text_end PokemonTower1Text3: - TX_FAR _PokemonTower1Text3 - db "@" + text_far _PokemonTower1Text3 + text_end PokemonTower1Text4: - TX_FAR _PokemonTower1Text4 - db "@" + text_far _PokemonTower1Text4 + text_end PokemonTower1Text5: - TX_FAR _PokemonTower1Text5 - db "@" + text_far _PokemonTower1Text5 + text_end diff --git a/scripts/PokemonTower2F.asm b/scripts/PokemonTower2F.asm index 54f49cae..5065e559 100755 --- a/scripts/PokemonTower2F.asm +++ b/scripts/PokemonTower2F.asm @@ -39,22 +39,22 @@ PokemonTower2Script0: .asm_60544 ld [wPlayerMovingDirection], a ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, b - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [hJoyHeld], a - ld [hJoyPressed], a + ldh [hJoyHeld], a + ldh [hJoyPressed], a ret CoordsData_6055e: - db $05,$0F - db $06,$0E - db $0F ; isn't this supposed to end in $ff? + dbmapcoord 15, 5 + dbmapcoord 14, 6 + db $0F ; end? (should be $ff?) PokemonTower2Script1: ld a, [wIsInBattle] @@ -64,19 +64,19 @@ PokemonTower2Script1: ld [wJoyIgnore], a SetEvent EVENT_BEAT_POKEMON_TOWER_RIVAL ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld de, MovementData_605b2 CheckEvent EVENT_POKEMON_TOWER_RIVAL_ON_LEFT jr nz, .asm_60589 - callab Func_f1e22 + callfar Func_f1e22 ld de, MovementData_605a9 .asm_60589 ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite call StopAllMusic - callba Music_RivalAlternateStart + farcall Music_RivalAlternateStart ld a, $2 ld [wPokemonTower2FCurScript], a ld [wCurMapScript], a @@ -91,7 +91,7 @@ MovementData_605a9: db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT - db $FF + db -1 ; end MovementData_605b2: db NPC_MOVEMENT_DOWN @@ -102,7 +102,7 @@ MovementData_605b2: db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end PokemonTower2Script2: ld a, [wd730] @@ -124,7 +124,7 @@ PokemonTower2F_TextPointers: dw PokemonTower2Text2 PokemonTower2Text1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_POKEMON_TOWER_RIVAL jr z, .asm_16f24 ld hl, PokemonTower2Text_6063c @@ -139,7 +139,7 @@ PokemonTower2Text1: ld hl, PokemonTower2Text_60632 ld de, PokemonTower2Text_60637 call SaveEndBattleTextPointers - ld a, OPP_SONY2 + ld a, OPP_RIVAL2 ld [wCurOpponent], a ld a, [wRivalStarter] add $1 @@ -152,21 +152,21 @@ PokemonTower2Text1: jp TextScriptEnd PokemonTower2Text_6062d: - TX_FAR _PokemonTower2Text_6062d - db "@" + text_far _PokemonTower2Text_6062d + text_end PokemonTower2Text_60632: - TX_FAR _PokemonTower2Text_60632 - db "@" + text_far _PokemonTower2Text_60632 + text_end PokemonTower2Text_60637: - TX_FAR _PokemonTower2Text_60637 - db "@" + text_far _PokemonTower2Text_60637 + text_end PokemonTower2Text_6063c: - TX_FAR _PokemonTower2Text_6063c - db "@" + text_far _PokemonTower2Text_6063c + text_end PokemonTower2Text2: - TX_FAR _PokemonTower2Text2 - db "@" + text_far _PokemonTower2Text2 + text_end diff --git a/scripts/PokemonTower2F_2.asm b/scripts/PokemonTower2F_2.asm index 42659da3..0dfbb965 100755 --- a/scripts/PokemonTower2F_2.asm +++ b/scripts/PokemonTower2F_2.asm @@ -1,4 +1,4 @@ -Func_f1e22: +Func_f1e22:: ld hl, PikachuMovementData_f1e2b ld b, SPRITE_FACING_RIGHT call TryApplyPikachuMovementData diff --git a/scripts/PokemonTower3F.asm b/scripts/PokemonTower3F.asm index 7d8f63e9..cf56904f 100755 --- a/scripts/PokemonTower3F.asm +++ b/scripts/PokemonTower3F.asm @@ -19,83 +19,63 @@ PokemonTower3F_TextPointers: dw PickUpItemText PokemonTower3TrainerHeader0: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_0 - dw PokemonTower3BattleText1 ; TextBeforeBattle - dw PokemonTower3AfterBattleText1 ; TextAfterBattle - dw PokemonTower3EndBattleText1 ; TextEndBattle - dw PokemonTower3EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_0, 2, PokemonTower3BattleText1, PokemonTower3EndBattleText1, PokemonTower3AfterBattleText1 PokemonTower3TrainerHeader1: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_1 - dw PokemonTower3BattleText2 ; TextBeforeBattle - dw PokemonTower3AfterBattleText2 ; TextAfterBattle - dw PokemonTower3EndBattleText2 ; TextEndBattle - dw PokemonTower3EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_1, 3, PokemonTower3BattleText2, PokemonTower3EndBattleText2, PokemonTower3AfterBattleText2 PokemonTower3TrainerHeader2: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_3_TRAINER_2 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_3_TRAINER_2 - dw PokemonTower3BattleText3 ; TextBeforeBattle - dw PokemonTower3AfterBattleText3 ; TextAfterBattle - dw PokemonTower3EndBattleText3 ; TextEndBattle - dw PokemonTower3EndBattleText3 ; TextEndBattle - db $ff + trainer EVENT_BEAT_POKEMONTOWER_3_TRAINER_2, 2, PokemonTower3BattleText3, PokemonTower3EndBattleText3, PokemonTower3AfterBattleText3 + db -1 ; end PokemonTower3Text1: - TX_ASM + text_asm ld hl, PokemonTower3TrainerHeader0 call TalkToTrainer jp TextScriptEnd PokemonTower3Text2: - TX_ASM + text_asm ld hl, PokemonTower3TrainerHeader1 call TalkToTrainer jp TextScriptEnd PokemonTower3Text3: - TX_ASM + text_asm ld hl, PokemonTower3TrainerHeader2 call TalkToTrainer jp TextScriptEnd PokemonTower3BattleText1: - TX_FAR _PokemonTower3BattleText1 - db "@" + text_far _PokemonTower3BattleText1 + text_end PokemonTower3EndBattleText1: - TX_FAR _PokemonTower3EndBattleText1 - db "@" + text_far _PokemonTower3EndBattleText1 + text_end PokemonTower3AfterBattleText1: - TX_FAR _PokemonTower3AfterBattleText1 - db "@" + text_far _PokemonTower3AfterBattleText1 + text_end PokemonTower3BattleText2: - TX_FAR _PokemonTower3BattleText2 - db "@" + text_far _PokemonTower3BattleText2 + text_end PokemonTower3EndBattleText2: - TX_FAR _PokemonTower3EndBattleText2 - db "@" + text_far _PokemonTower3EndBattleText2 + text_end PokemonTower3AfterBattleText2: - TX_FAR _PokemonTower3AfterBattleText2 - db "@" + text_far _PokemonTower3AfterBattleText2 + text_end PokemonTower3BattleText3: - TX_FAR _PokemonTower3BattleText3 - db "@" + text_far _PokemonTower3BattleText3 + text_end PokemonTower3EndBattleText3: - TX_FAR _PokemonTower3EndBattleText3 - db "@" + text_far _PokemonTower3EndBattleText3 + text_end PokemonTower3AfterBattleText3: - TX_FAR _PokemonTower3AfterBattleText3 - db "@" + text_far _PokemonTower3AfterBattleText3 + text_end diff --git a/scripts/PokemonTower4F.asm b/scripts/PokemonTower4F.asm index b8e0d772..e3431644 100755 --- a/scripts/PokemonTower4F.asm +++ b/scripts/PokemonTower4F.asm @@ -21,84 +21,63 @@ PokemonTower4F_TextPointers: dw PickUpItemText PokemonTower4TrainerHeader0: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_0 - dw PokemonTower4BattleText1 ; TextBeforeBattle - dw PokemonTower4AfterBattleText1 ; TextAfterBattle - dw PokemonTower4EndBattleText1 ; TextEndBattle - dw PokemonTower4EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_0, 2, PokemonTower4BattleText1, PokemonTower4EndBattleText1, PokemonTower4AfterBattleText1 PokemonTower4TrainerHeader1: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_1 - dw PokemonTower4BattleText2 ; TextBeforeBattle - dw PokemonTower4AfterBattleText2 ; TextAfterBattle - dw PokemonTower4EndBattleText2 ; TextEndBattle - dw PokemonTower4EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_1, 2, PokemonTower4BattleText2, PokemonTower4EndBattleText2, PokemonTower4AfterBattleText2 PokemonTower4TrainerHeader2: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_4_TRAINER_2 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_4_TRAINER_2 - dw PokemonTower4BattleText3 ; TextBeforeBattle - dw PokemonTower4AfterBattleText3 ; TextAfterBattle - dw PokemonTower4EndBattleText3 ; TextEndBattle - dw PokemonTower4EndBattleText3 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_POKEMONTOWER_4_TRAINER_2, 2, PokemonTower4BattleText3, PokemonTower4EndBattleText3, PokemonTower4AfterBattleText3 + db -1 ; end PokemonTower4Text1: - TX_ASM + text_asm ld hl, PokemonTower4TrainerHeader0 call TalkToTrainer jp TextScriptEnd PokemonTower4Text2: - TX_ASM + text_asm ld hl, PokemonTower4TrainerHeader1 call TalkToTrainer jp TextScriptEnd PokemonTower4Text3: - TX_ASM + text_asm ld hl, PokemonTower4TrainerHeader2 call TalkToTrainer jp TextScriptEnd PokemonTower4BattleText1: - TX_FAR _PokemonTower4BattleText1 - db "@" + text_far _PokemonTower4BattleText1 + text_end PokemonTower4EndBattleText1: - TX_FAR _PokemonTower4EndBattleText1 - db "@" + text_far _PokemonTower4EndBattleText1 + text_end PokemonTower4AfterBattleText1: - TX_FAR _PokemonTower4AfterBattleText1 - db "@" + text_far _PokemonTower4AfterBattleText1 + text_end PokemonTower4BattleText2: - TX_FAR _PokemonTower4BattleText2 - db "@" + text_far _PokemonTower4BattleText2 + text_end PokemonTower4EndBattleText2: - TX_FAR _PokemonTower4EndBattleText2 - db "@" + text_far _PokemonTower4EndBattleText2 + text_end PokemonTower4AfterBattleText2: - TX_FAR _PokemonTower4AfterBattleText2 - db "@" + text_far _PokemonTower4AfterBattleText2 + text_end PokemonTower4BattleText3: - TX_FAR _PokemonTower4BattleText3 - db "@" + text_far _PokemonTower4BattleText3 + text_end PokemonTower4EndBattleText3: - TX_FAR _PokemonTower4EndBattleText3 - db "@" + text_far _PokemonTower4EndBattleText3 + text_end PokemonTower4AfterBattleText3: - TX_FAR _PokemonTower4AfterBattleText3 - db "@" + text_far _PokemonTower4AfterBattleText3 + text_end diff --git a/scripts/PokemonTower5F.asm b/scripts/PokemonTower5F.asm index 299261e9..10189a8e 100755 --- a/scripts/PokemonTower5F.asm +++ b/scripts/PokemonTower5F.asm @@ -24,7 +24,7 @@ PokemonTower5Script0: CheckAndSetEvent EVENT_IN_PURIFIED_ZONE ret nz xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a ld hl, wd72e @@ -35,18 +35,18 @@ PokemonTower5Script0: call Delay3 call GBFadeInFromWhite ld a, $7 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a ret CoordsData_60992: - db $08,$0A - db $08,$0B - db $09,$0A - db $09,$0B - db $FF + dbmapcoord 10, 8 + dbmapcoord 11, 8 + dbmapcoord 10, 9 + dbmapcoord 11, 9 + db -1 ; end PokemonTower5F_TextPointers: dw PokemonTower5Text1 @@ -58,119 +58,91 @@ PokemonTower5F_TextPointers: dw PokemonTower5Text7 PokemonTower5TrainerHeader0: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_0 - dw PokemonTower5BattleText1 ; TextBeforeBattle - dw PokemonTower5AfterBattleText1 ; TextAfterBattle - dw PokemonTower5EndBattleText1 ; TextEndBattle - dw PokemonTower5EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_0, 2, PokemonTower5BattleText1, PokemonTower5EndBattleText1, PokemonTower5AfterBattleText1 PokemonTower5TrainerHeader1: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_1 - dw PokemonTower5BattleText2 ; TextBeforeBattle - dw PokemonTower5AfterBattleText2 ; TextAfterBattle - dw PokemonTower5EndBattleText2 ; TextEndBattle - dw PokemonTower5EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_1, 3, PokemonTower5BattleText2, PokemonTower5EndBattleText2, PokemonTower5AfterBattleText2 PokemonTower5TrainerHeader2: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_2 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_2 - dw PokemonTower5BattleText3 ; TextBeforeBattle - dw PokemonTower5AfterBattleText3 ; TextAfterBattle - dw PokemonTower5EndBattleText3 ; TextEndBattle - dw PokemonTower5EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_2, 2, PokemonTower5BattleText3, PokemonTower5EndBattleText3, PokemonTower5AfterBattleText3 PokemonTower5TrainerHeader3: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_5_TRAINER_3 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_5_TRAINER_3 - dw PokemonTower5BattleText4 ; TextBeforeBattle - dw PokemonTower5AfterBattleText4 ; TextAfterBattle - dw PokemonTower5EndBattleText4 ; TextEndBattle - dw PokemonTower5EndBattleText4 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_POKEMONTOWER_5_TRAINER_3, 2, PokemonTower5BattleText4, PokemonTower5EndBattleText4, PokemonTower5AfterBattleText4 + db -1 ; end PokemonTower5Text1: - TX_FAR _PokemonTower5Text1 - db "@" + text_far _PokemonTower5Text1 + text_end PokemonTower5Text2: - TX_ASM + text_asm ld hl, PokemonTower5TrainerHeader0 call TalkToTrainer jp TextScriptEnd PokemonTower5BattleText1: - TX_FAR _PokemonTower5BattleText1 - db "@" + text_far _PokemonTower5BattleText1 + text_end PokemonTower5EndBattleText1: - TX_FAR _PokemonTower5EndBattleText1 - db "@" + text_far _PokemonTower5EndBattleText1 + text_end PokemonTower5AfterBattleText1: - TX_FAR _PokemonTower5AfterBattleText1 - db "@" + text_far _PokemonTower5AfterBattleText1 + text_end PokemonTower5Text3: - TX_ASM + text_asm ld hl, PokemonTower5TrainerHeader1 call TalkToTrainer jp TextScriptEnd PokemonTower5BattleText2: - TX_FAR _PokemonTower5BattleText2 - db "@" + text_far _PokemonTower5BattleText2 + text_end PokemonTower5EndBattleText2: - TX_FAR _PokemonTower5EndBattleText2 - db "@" + text_far _PokemonTower5EndBattleText2 + text_end PokemonTower5AfterBattleText2: - TX_FAR _PokemonTower5AfterBattleText2 - db "@" + text_far _PokemonTower5AfterBattleText2 + text_end PokemonTower5Text4: - TX_ASM + text_asm ld hl, PokemonTower5TrainerHeader2 call TalkToTrainer jp TextScriptEnd PokemonTower5BattleText3: - TX_FAR _PokemonTower5BattleText3 - db "@" + text_far _PokemonTower5BattleText3 + text_end PokemonTower5EndBattleText3: - TX_FAR _PokemonTower5EndBattleText3 - db "@" + text_far _PokemonTower5EndBattleText3 + text_end PokemonTower5AfterBattleText3: - TX_FAR _PokemonTower5AfterBattleText3 - db "@" + text_far _PokemonTower5AfterBattleText3 + text_end PokemonTower5Text5: - TX_ASM + text_asm ld hl, PokemonTower5TrainerHeader3 call TalkToTrainer jp TextScriptEnd PokemonTower5BattleText4: - TX_FAR _PokemonTower5BattleText4 - db "@" + text_far _PokemonTower5BattleText4 + text_end PokemonTower5EndBattleText4: - TX_FAR _PokemonTower5EndBattleText4 - db "@" + text_far _PokemonTower5EndBattleText4 + text_end PokemonTower5AfterBattleText4: - TX_FAR _PokemonTower5AfterBattleText4 - db "@" + text_far _PokemonTower5AfterBattleText4 + text_end PokemonTower5Text7: - TX_FAR _PokemonTower5Text7 - db "@" + text_far _PokemonTower5Text7 + text_end diff --git a/scripts/PokemonTower6F.asm b/scripts/PokemonTower6F.asm index 962d33eb..e236488e 100755 --- a/scripts/PokemonTower6F.asm +++ b/scripts/PokemonTower6F.asm @@ -28,9 +28,9 @@ PokemonTower6Script0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, RESTLESS_SOUL ld [wCurOpponent], a @@ -42,7 +42,8 @@ PokemonTower6Script0: ret CoordsData_60b45: - db $10,$0A,$FF + dbmapcoord 10, 16 + db -1 ; end PokemonTower6Script4: ld a, [wIsInBattle] @@ -61,7 +62,7 @@ PokemonTower6Script4: jr nz, .asm_60b82 SetEvent EVENT_BEAT_GHOST_MAROWAK ld a, $7 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a @@ -75,7 +76,7 @@ PokemonTower6Script4: ld a, $10 ld [wSimulatedJoypadStatesEnd], a xor a - ld [wSpriteStateData2 + $06], a + ld [wSpritePlayerStateData2MovementByte1], a ld [wOverrideSimulatedJoypadStatesMask], a ld hl, wd730 set 7, [hl] @@ -104,54 +105,33 @@ PokemonTower6F_TextPointers: dw PokemonTower6Text7 PokemonTower6TrainerHeader0: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_0 - dw PokemonTower6BattleText1 ; TextBeforeBattle - dw PokemonTower6AfterBattleText1 ; TextAfterBattle - dw PokemonTower6EndBattleText1 ; TextEndBattle - dw PokemonTower6EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_0, 3, PokemonTower6BattleText1, PokemonTower6EndBattleText1, PokemonTower6AfterBattleText1 PokemonTower6TrainerHeader1: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_1 - dw PokemonTower6BattleText2 ; TextBeforeBattle - dw PokemonTower6AfterBattleText2 ; TextAfterBattle - dw PokemonTower6EndBattleText2 ; TextEndBattle - dw PokemonTower6EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_1, 3, PokemonTower6BattleText2, PokemonTower6EndBattleText2, PokemonTower6AfterBattleText2 PokemonTower6TrainerHeader2: - dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_2 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_2 - dw PokemonTower6BattleText3 ; TextBeforeBattle - dw PokemonTower6AfterBattleText3 ; TextAfterBattle - dw PokemonTower6EndBattleText3 ; TextEndBattle - dw PokemonTower6EndBattleText3 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_POKEMONTOWER_6_TRAINER_2, 2, PokemonTower6BattleText3, PokemonTower6EndBattleText3, PokemonTower6AfterBattleText3 + db -1 ; end PokemonTower6Text1: - TX_ASM + text_asm ld hl, PokemonTower6TrainerHeader0 call TalkToTrainer jp TextScriptEnd PokemonTower6Text2: - TX_ASM + text_asm ld hl, PokemonTower6TrainerHeader1 call TalkToTrainer jp TextScriptEnd PokemonTower6Text3: - TX_ASM + text_asm ld hl, PokemonTower6TrainerHeader2 call TalkToTrainer jp TextScriptEnd PokemonTower6Text7: - TX_ASM + text_asm ld hl, PokemonTower2Text_60c1f call PrintText ld a, RESTLESS_SOUL @@ -164,49 +144,49 @@ PokemonTower6Text7: jp TextScriptEnd PokemonTower2Text_60c1f: - TX_FAR _PokemonTower2Text_60c1f - db "@" + text_far _PokemonTower2Text_60c1f + text_end PokemonTower2Text_60c24: - TX_FAR _PokemonTower2Text_60c24 - db "@" + text_far _PokemonTower2Text_60c24 + text_end PokemonTower6BattleText1: - TX_FAR _PokemonTower6BattleText1 - db "@" + text_far _PokemonTower6BattleText1 + text_end PokemonTower6EndBattleText1: - TX_FAR _PokemonTower6EndBattleText1 - db "@" + text_far _PokemonTower6EndBattleText1 + text_end PokemonTower6AfterBattleText1: - TX_FAR _PokemonTower6AfterBattleText1 - db "@" + text_far _PokemonTower6AfterBattleText1 + text_end PokemonTower6BattleText2: - TX_FAR _PokemonTower6BattleText2 - db "@" + text_far _PokemonTower6BattleText2 + text_end PokemonTower6EndBattleText2: - TX_FAR _PokemonTower6EndBattleText2 - db "@" + text_far _PokemonTower6EndBattleText2 + text_end PokemonTower6AfterBattleText2: - TX_FAR _PokemonTower6AfterBattleText2 - db "@" + text_far _PokemonTower6AfterBattleText2 + text_end PokemonTower6BattleText3: - TX_FAR _PokemonTower6BattleText3 - db "@" + text_far _PokemonTower6BattleText3 + text_end PokemonTower6EndBattleText3: - TX_FAR _PokemonTower6EndBattleText3 - db "@" + text_far _PokemonTower6EndBattleText3 + text_end PokemonTower6AfterBattleText3: - TX_FAR _PokemonTower6AfterBattleText3 - db "@" + text_far _PokemonTower6AfterBattleText3 + text_end PokemonTower6Text6: - TX_FAR _PokemonTower6Text6 - db "@" + text_far _PokemonTower6Text6 + text_end diff --git a/scripts/PokemonTower7F.asm b/scripts/PokemonTower7F.asm index e34edf66..75e67a72 100755 --- a/scripts/PokemonTower7F.asm +++ b/scripts/PokemonTower7F.asm @@ -49,7 +49,7 @@ PokemonTower7Script_60d2a: ld a, MUSIC_MEET_JESSIE_JAMES call PlayMusic xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $FF ^ (A_BUTTON | B_BUTTON) ld [wJoyIgnore], a ld a, HS_POKEMON_TOWER_7F_JESSIE @@ -59,7 +59,7 @@ PokemonTower7Script_60d2a: ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff ld [wJoyIgnore], a @@ -82,7 +82,7 @@ PokemonTower7Script1: ld de, PokemonTower7MovementData_60d7a .asm_60d8c ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call MoveSprite ld a, $ff ld [wJoyIgnore], a @@ -113,7 +113,7 @@ PokemonTower7Script4: ld de, PokemonTower7MovementData_60d7b .asm_60dcc ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call MoveSprite ld a, $ff ld [wJoyIgnore], a @@ -140,7 +140,7 @@ PokemonTower7Script6: ld a, $FF ^ (A_BUTTON | B_BUTTON) ld [wJoyIgnore], a ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID PokemonTower7Script7: ld hl, wd72d @@ -154,7 +154,7 @@ PokemonTower7Script7: ld a, $2c ld [wTrainerNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wJoyIgnore], a ld a, $8 call PokemonTower7Script_60d05 @@ -177,7 +177,7 @@ PokemonTower7Script8: ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -209,7 +209,7 @@ PokemonTower7Script9: PokemonTower7Script10: call PlayDefaultMusic xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wJoyIgnore], a SetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_0 ld a, $0 @@ -223,7 +223,7 @@ PokemonTower7Script_60eaf: call Delay3 ret -PokemonTower7Script_60ebe +PokemonTower7Script_60ebe: ld [wMissableObjectIndex], a predef HideObject ret @@ -237,7 +237,7 @@ PokemonTower7Script11: ld a, SPRITE_FACING_UP ld [wSpritePlayerStateData1FacingDirection], a ld a, MR_FUJIS_HOUSE - ld [hWarpDestinationMap], a + ldh [hWarpDestinationMap], a ld a, $1 ld [wDestinationWarpID], a ld a, LAVENDER_TOWN @@ -258,11 +258,11 @@ PokemonTower7F_TextPointers: PokemonTower7Text1: PokemonTower7Text2: - db "@" + text_end PokemonTower7Text4: - TX_FAR _PokemonTowerJessieJamesText1 - TX_ASM + text_far _PokemonTowerJessieJamesText1 + text_asm ld c, 10 call DelayFrames ld a, PLAYER_DIR_UP @@ -277,22 +277,22 @@ PokemonTower7Text4: jp TextScriptEnd PokemonTower7Text5: - TX_FAR _PokemonTowerJessieJamesText2 - db "@" + text_far _PokemonTowerJessieJamesText2 + text_end PokemonTower7JessieJamesEndBattleText: - TX_FAR _PokemonTowerJessieJamesText3 - db "@" + text_far _PokemonTowerJessieJamesText3 + text_end PokemonTower7Text6: - TX_FAR _PokemonTowerJessieJamesText4 - TX_ASM + text_far _PokemonTowerJessieJamesText4 + text_asm ld c, 64 call DelayFrames jp TextScriptEnd PokemonTower7Text3: - TX_ASM + text_asm ld hl, PokemonTower7Text_60f75 call PrintText SetEvent EVENT_RESCUED_MR_FUJI @@ -311,5 +311,5 @@ PokemonTower7Text3: jp TextScriptEnd PokemonTower7Text_60f75: - TX_FAR _TowerRescueFujiText - db "@" + text_far _TowerRescueFujiText + text_end diff --git a/scripts/PowerPlant.asm b/scripts/PowerPlant.asm index f720b6f8..76859218 100755 --- a/scripts/PowerPlant.asm +++ b/scripts/PowerPlant.asm @@ -29,87 +29,24 @@ PowerPlant_TextPointers: dw PickUpItemText Voltorb0TrainerHeader: - dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_0 - db 0 ; view range - dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_0 - dw VoltorbBattleText ; TextBeforeBattle - dw VoltorbBattleText ; TextAfterBattle - dw VoltorbBattleText ; TextEndBattle - dw VoltorbBattleText ; TextEndBattle - + trainer EVENT_BEAT_POWER_PLANT_VOLTORB_0, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText Voltorb1TrainerHeader: - dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_1 - db 0 ; view range - dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_1 - dw VoltorbBattleText ; TextBeforeBattle - dw VoltorbBattleText ; TextAfterBattle - dw VoltorbBattleText ; TextEndBattle - dw VoltorbBattleText ; TextEndBattle - + trainer EVENT_BEAT_POWER_PLANT_VOLTORB_1, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText Voltorb2TrainerHeader: - dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_2 - db 0 ; view range - dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_2 - dw VoltorbBattleText ; TextBeforeBattle - dw VoltorbBattleText ; TextAfterBattle - dw VoltorbBattleText ; TextEndBattle - dw VoltorbBattleText ; TextEndBattle - + trainer EVENT_BEAT_POWER_PLANT_VOLTORB_2, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText Voltorb3TrainerHeader: - dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_3 - db 0 ; view range - dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_3 - dw VoltorbBattleText ; TextBeforeBattle - dw VoltorbBattleText ; TextAfterBattle - dw VoltorbBattleText ; TextEndBattle - dw VoltorbBattleText ; TextEndBattle - + trainer EVENT_BEAT_POWER_PLANT_VOLTORB_3, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText Voltorb4TrainerHeader: - dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_4 - db 0 ; view range - dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_4 - dw VoltorbBattleText ; TextBeforeBattle - dw VoltorbBattleText ; TextAfterBattle - dw VoltorbBattleText ; TextEndBattle - dw VoltorbBattleText ; TextEndBattle - + trainer EVENT_BEAT_POWER_PLANT_VOLTORB_4, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText Voltorb5TrainerHeader: - dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_5 - db 0 ; view range - dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_5 - dw VoltorbBattleText ; TextBeforeBattle - dw VoltorbBattleText ; TextAfterBattle - dw VoltorbBattleText ; TextEndBattle - dw VoltorbBattleText ; TextEndBattle - + trainer EVENT_BEAT_POWER_PLANT_VOLTORB_5, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText Voltorb6TrainerHeader: - dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_6 - db 0 ; view range - dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_6 - dw VoltorbBattleText ; TextBeforeBattle - dw VoltorbBattleText ; TextAfterBattle - dw VoltorbBattleText ; TextEndBattle - dw VoltorbBattleText ; TextEndBattle - + trainer EVENT_BEAT_POWER_PLANT_VOLTORB_6, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText Voltorb7TrainerHeader: - dbEventFlagBit EVENT_BEAT_POWER_PLANT_VOLTORB_7, 1 - db 0 ; view range - dwEventFlagAddress EVENT_BEAT_POWER_PLANT_VOLTORB_7, 1 - dw VoltorbBattleText ; TextBeforeBattle - dw VoltorbBattleText ; TextAfterBattle - dw VoltorbBattleText ; TextEndBattle - dw VoltorbBattleText ; TextEndBattle - + trainer EVENT_BEAT_POWER_PLANT_VOLTORB_7, 1, 0, VoltorbBattleText, VoltorbBattleText, VoltorbBattleText ZapdosTrainerHeader: - dbEventFlagBit EVENT_BEAT_ZAPDOS, 1 - db 0 ; view range - dwEventFlagAddress EVENT_BEAT_ZAPDOS, 1 - dw ZapdosBattleText ; TextBeforeBattle - dw ZapdosBattleText ; TextAfterBattle - dw ZapdosBattleText ; TextEndBattle - dw ZapdosBattleText ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ZAPDOS, 1, 0, ZapdosBattleText, ZapdosBattleText, ZapdosBattleText + db -1 ; end InitVoltorbBattle: call TalkToTrainer @@ -118,57 +55,57 @@ InitVoltorbBattle: jp TextScriptEnd Voltorb0Text: - TX_ASM + text_asm ld hl, Voltorb0TrainerHeader jr InitVoltorbBattle Voltorb1Text: - TX_ASM + text_asm ld hl, Voltorb1TrainerHeader jr InitVoltorbBattle Voltorb2Text: - TX_ASM + text_asm ld hl, Voltorb2TrainerHeader jr InitVoltorbBattle Voltorb3Text: - TX_ASM + text_asm ld hl, Voltorb3TrainerHeader jr InitVoltorbBattle Voltorb4Text: - TX_ASM + text_asm ld hl, Voltorb4TrainerHeader jr InitVoltorbBattle Voltorb5Text: - TX_ASM + text_asm ld hl, Voltorb5TrainerHeader jr InitVoltorbBattle Voltorb6Text: - TX_ASM + text_asm ld hl, Voltorb6TrainerHeader jr InitVoltorbBattle Voltorb7Text: - TX_ASM + text_asm ld hl, Voltorb7TrainerHeader jr InitVoltorbBattle ZapdosText: - TX_ASM + text_asm ld hl, ZapdosTrainerHeader jr InitVoltorbBattle VoltorbBattleText: - TX_FAR _VoltorbBattleText - db "@" + text_far _VoltorbBattleText + text_end ZapdosBattleText: - TX_FAR _ZapdosBattleText - TX_ASM + text_far _ZapdosBattleText + text_asm ld a, ZAPDOS call PlayCry call WaitForSoundToFinish diff --git a/scripts/RedsHouse1F.asm b/scripts/RedsHouse1F.asm index e4fa2094..4af4a2e6 100755 --- a/scripts/RedsHouse1F.asm +++ b/scripts/RedsHouse1F.asm @@ -3,15 +3,15 @@ RedsHouse1F_Script: ret RedsHouse1F_TextPointers: - dw RedsHouse1FText1 - dw RedsHouse1FText2 + dw RedsHouse1FMomText + dw RedsHouse1FTVText -RedsHouse1FText1: ; Mom - TX_ASM - callab Func_f1b73 +RedsHouse1FMomText: + text_asm + callfar Func_f1b73 jp TextScriptEnd -RedsHouse1FText2: ; TV - TX_ASM - callab Func_f1bc4 +RedsHouse1FTVText: + text_asm + callfar Func_f1bc4 jp TextScriptEnd diff --git a/scripts/RedsHouse1F2.asm b/scripts/RedsHouse1F2.asm index 8f44d30d..e1b2145b 100755 --- a/scripts/RedsHouse1F2.asm +++ b/scripts/RedsHouse1F2.asm @@ -1,14 +1,14 @@ -Func_f1b73: +Func_f1b73:: ld a, [wd72e] - bit 3, a - jp nz, MomHealPokemon ; if player has received a Pokémon from Oak, heal team + bit 3, a ; received a Pokémon from Oak? + jp nz, MomHealPokemon ld hl, MomWakeUpText call PrintText ret MomWakeUpText: - TX_FAR _MomWakeUpText - db "@" + text_far _MomWakeUpText + text_end MomHealPokemon: ld hl, MomHealText1 @@ -19,10 +19,10 @@ MomHealPokemon: ld a, MUSIC_PKMN_HEALED ld [wNewSoundID], a call PlaySound -.loop +.next ld a, [wChannelSoundIDs] cp MUSIC_PKMN_HEALED - jr z, .loop + jr z, .next ld a, [wMapMusicSoundID] ld [wNewSoundID], a call PlaySound @@ -32,27 +32,27 @@ MomHealPokemon: ret MomHealText1: - TX_FAR _MomHealText1 - db "@" + text_far _MomHealText1 + text_end MomHealText2: - TX_FAR _MomHealText2 - db "@" + text_far _MomHealText2 + text_end -Func_f1bc4: +Func_f1bc4:: ld hl, TVWrongSideText ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP - jp nz, .notUp + jp nz, .got_text ld hl, StandByMeText -.notUp +.got_text call PrintText ret StandByMeText: - TX_FAR _StandByMeText - db "@" + text_far _StandByMeText + text_end TVWrongSideText: - TX_FAR _TVWrongSideText - db "@" + text_far _TVWrongSideText + text_end diff --git a/scripts/RedsHouse2F.asm b/scripts/RedsHouse2F.asm index e692a0fa..4eb465c4 100755 --- a/scripts/RedsHouse2F.asm +++ b/scripts/RedsHouse2F.asm @@ -20,4 +20,5 @@ RedsHouse2FScript4: ret RedsHouse2F_TextPointers: - db "@" + + text_end ; unused diff --git a/scripts/RockTunnel1F.asm b/scripts/RockTunnel1F.asm index 94620d96..606e0317 100755 --- a/scripts/RockTunnel1F.asm +++ b/scripts/RockTunnel1F.asm @@ -23,191 +23,142 @@ RockTunnel1F_TextPointers: dw RockTunnel1Text8 RockTunnel1TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0 - dw RockTunnel1BattleText1 ; TextBeforeBattle - dw RockTunnel1AfterBattleText1 ; TextAfterBattle - dw RockTunnel1EndBattleText1 ; TextEndBattle - dw RockTunnel1EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_0, 4, RockTunnel1BattleText1, RockTunnel1EndBattleText1, RockTunnel1AfterBattleText1 RockTunnel1TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1 - dw RockTunnel1BattleText2 ; TextBeforeBattle - dw RockTunnel1AfterBattleText2 ; TextAfterBattle - dw RockTunnel1EndBattleText2 ; TextEndBattle - dw RockTunnel1EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_1, 4, RockTunnel1BattleText2, RockTunnel1EndBattleText2, RockTunnel1AfterBattleText2 RockTunnel1TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2 - dw RockTunnel1BattleText3 ; TextBeforeBattle - dw RockTunnel1AfterBattleText3 ; TextAfterBattle - dw RockTunnel1EndBattleText3 ; TextEndBattle - dw RockTunnel1EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_2, 3, RockTunnel1BattleText3, RockTunnel1EndBattleText3, RockTunnel1AfterBattleText3 RockTunnel1TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3 - dw RockTunnel1BattleText4 ; TextBeforeBattle - dw RockTunnel1AfterBattleText4 ; TextAfterBattle - dw RockTunnel1EndBattleText4 ; TextEndBattle - dw RockTunnel1EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_3, 3, RockTunnel1BattleText4, RockTunnel1EndBattleText4, RockTunnel1AfterBattleText4 RockTunnel1TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4 - dw RockTunnel1BattleText5 ; TextBeforeBattle - dw RockTunnel1AfterBattleText5 ; TextAfterBattle - dw RockTunnel1EndBattleText5 ; TextEndBattle - dw RockTunnel1EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_4, 4, RockTunnel1BattleText5, RockTunnel1EndBattleText5, RockTunnel1AfterBattleText5 RockTunnel1TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5 - dw RockTunnel1BattleText6 ; TextBeforeBattle - dw RockTunnel1AfterBattleText6 ; TextAfterBattle - dw RockTunnel1EndBattleText6 ; TextEndBattle - dw RockTunnel1EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_5, 4, RockTunnel1BattleText6, RockTunnel1EndBattleText6, RockTunnel1AfterBattleText6 RockTunnel1TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6 - dw RockTunnel1BattleText7 ; TextBeforeBattle - dw RockTunnel1AfterBattleText7 ; TextAfterBattle - dw RockTunnel1EndBattleText7 ; TextEndBattle - dw RockTunnel1EndBattleText7 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROCK_TUNNEL_1_TRAINER_6, 4, RockTunnel1BattleText7, RockTunnel1EndBattleText7, RockTunnel1AfterBattleText7 + db -1 ; end RockTunnel1Text1: - TX_ASM + text_asm ld hl, RockTunnel1TrainerHeader0 jr RockTunnel1TalkToTrainer RockTunnel1Text2: - TX_ASM + text_asm ld hl, RockTunnel1TrainerHeader1 jr RockTunnel1TalkToTrainer RockTunnel1Text3: - TX_ASM + text_asm ld hl, RockTunnel1TrainerHeader2 jr RockTunnel1TalkToTrainer RockTunnel1Text4: - TX_ASM + text_asm ld hl, RockTunnel1TrainerHeader3 jr RockTunnel1TalkToTrainer RockTunnel1Text5: - TX_ASM + text_asm ld hl, RockTunnel1TrainerHeader4 jr RockTunnel1TalkToTrainer RockTunnel1Text6: - TX_ASM + text_asm ld hl, RockTunnel1TrainerHeader5 jr RockTunnel1TalkToTrainer RockTunnel1Text7: - TX_ASM + text_asm ld hl, RockTunnel1TrainerHeader6 RockTunnel1TalkToTrainer: call TalkToTrainer jp TextScriptEnd RockTunnel1BattleText1: - TX_FAR _RockTunnel1BattleText1 - db "@" + text_far _RockTunnel1BattleText1 + text_end RockTunnel1EndBattleText1: - TX_FAR _RockTunnel1EndBattleText1 - db "@" + text_far _RockTunnel1EndBattleText1 + text_end RockTunnel1AfterBattleText1: - TX_FAR _RockTunnel1AfterBattleText1 - db "@" + text_far _RockTunnel1AfterBattleText1 + text_end RockTunnel1BattleText2: - TX_FAR _RockTunnel1BattleText2 - db "@" + text_far _RockTunnel1BattleText2 + text_end RockTunnel1EndBattleText2: - TX_FAR _RockTunnel1EndBattleText2 - db "@" + text_far _RockTunnel1EndBattleText2 + text_end RockTunnel1AfterBattleText2: - TX_FAR _RockTunnel1AfterBattleText2 - db "@" + text_far _RockTunnel1AfterBattleText2 + text_end RockTunnel1BattleText3: - TX_FAR _RockTunnel1BattleText3 - db "@" + text_far _RockTunnel1BattleText3 + text_end RockTunnel1EndBattleText3: - TX_FAR _RockTunnel1EndBattleText3 - db "@" + text_far _RockTunnel1EndBattleText3 + text_end RockTunnel1AfterBattleText3: - TX_FAR _RockTunnel1AfterBattleText3 - db "@" + text_far _RockTunnel1AfterBattleText3 + text_end RockTunnel1BattleText4: - TX_FAR _RockTunnel1BattleText4 - db "@" + text_far _RockTunnel1BattleText4 + text_end RockTunnel1EndBattleText4: - TX_FAR _RockTunnel1EndBattleText4 - db "@" + text_far _RockTunnel1EndBattleText4 + text_end RockTunnel1AfterBattleText4: - TX_FAR _RockTunnel1AfterBattleText4 - db "@" + text_far _RockTunnel1AfterBattleText4 + text_end RockTunnel1BattleText5: - TX_FAR _RockTunnel1BattleText5 - db "@" + text_far _RockTunnel1BattleText5 + text_end RockTunnel1EndBattleText5: - TX_FAR _RockTunnel1EndBattleText5 - db "@" + text_far _RockTunnel1EndBattleText5 + text_end RockTunnel1AfterBattleText5: - TX_FAR _RockTunnel1AfterBattleText5 - db "@" + text_far _RockTunnel1AfterBattleText5 + text_end RockTunnel1BattleText6: - TX_FAR _RockTunnel1BattleText6 - db "@" + text_far _RockTunnel1BattleText6 + text_end RockTunnel1EndBattleText6: - TX_FAR _RockTunnel1EndBattleText6 - db "@" + text_far _RockTunnel1EndBattleText6 + text_end RockTunnel1AfterBattleText6: - TX_FAR _RockTunnel1AfterBattleText6 - db "@" + text_far _RockTunnel1AfterBattleText6 + text_end RockTunnel1BattleText7: - TX_FAR _RockTunnel1BattleText7 - db "@" + text_far _RockTunnel1BattleText7 + text_end RockTunnel1EndBattleText7: - TX_FAR _RockTunnel1EndBattleText7 - db "@" + text_far _RockTunnel1EndBattleText7 + text_end RockTunnel1AfterBattleText7: - TX_FAR _RockTunnel1AfterBattleText7 - db "@" + text_far _RockTunnel1AfterBattleText7 + text_end RockTunnel1Text8: - TX_FAR _RockTunnel1Text8 - db "@" + text_far _RockTunnel1Text8 + text_end diff --git a/scripts/RockTunnelB1F.asm b/scripts/RockTunnelB1F.asm index 7e6fcc8b..9cba9c3e 100755 --- a/scripts/RockTunnelB1F.asm +++ b/scripts/RockTunnelB1F.asm @@ -23,219 +23,163 @@ RockTunnelB1F_TextPointers: dw RockTunnel2Text8 RockTunnel2TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0 - dw RockTunnel2BattleText2 ; TextBeforeBattle - dw RockTunnel2AfterBattleText2 ; TextAfterBattle - dw RockTunnel2EndBattleText2 ; TextEndBattle - dw RockTunnel2EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_0, 4, RockTunnel2BattleText2, RockTunnel2EndBattleText2, RockTunnel2AfterBattleText2 RockTunnel2TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1 - dw RockTunnel2BattleText3 ; TextBeforeBattle - dw RockTunnel2AfterBattleText3 ; TextAfterBattle - dw RockTunnel2EndBattleText3 ; TextEndBattle - dw RockTunnel2EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_1, 3, RockTunnel2BattleText3, RockTunnel2EndBattleText3, RockTunnel2AfterBattleText3 RockTunnel2TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2 - dw RockTunnel2BattleText4 ; TextBeforeBattle - dw RockTunnel2AfterBattleText4 ; TextAfterBattle - dw RockTunnel2EndBattleText4 ; TextEndBattle - dw RockTunnel2EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_2, 3, RockTunnel2BattleText4, RockTunnel2EndBattleText4, RockTunnel2AfterBattleText4 RockTunnel2TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3 - dw RockTunnel2BattleText5 ; TextBeforeBattle - dw RockTunnel2AfterBattleText5 ; TextAfterBattle - dw RockTunnel2EndBattleText5 ; TextEndBattle - dw RockTunnel2EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_3, 4, RockTunnel2BattleText5, RockTunnel2EndBattleText5, RockTunnel2AfterBattleText5 RockTunnel2TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4 - dw RockTunnel2BattleText6 ; TextBeforeBattle - dw RockTunnel2AfterBattleText6 ; TextAfterBattle - dw RockTunnel2EndBattleText6 ; TextEndBattle - dw RockTunnel2EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_4, 3, RockTunnel2BattleText6, RockTunnel2EndBattleText6, RockTunnel2AfterBattleText6 RockTunnel2TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5 - dw RockTunnel2BattleText7 ; TextBeforeBattle - dw RockTunnel2AfterBattleText7 ; TextAfterBattle - dw RockTunnel2EndBattleText7 ; TextEndBattle - dw RockTunnel2EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_5, 4, RockTunnel2BattleText7, RockTunnel2EndBattleText7, RockTunnel2AfterBattleText7 RockTunnel2TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6 - dw RockTunnel2BattleText8 ; TextBeforeBattle - dw RockTunnel2AfterBattleText8 ; TextAfterBattle - dw RockTunnel2EndBattleText8 ; TextEndBattle - dw RockTunnel2EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_6, 3, RockTunnel2BattleText8, RockTunnel2EndBattleText8, RockTunnel2AfterBattleText8 RockTunnel2TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7, 1 - dw RockTunnel2BattleText9 ; TextBeforeBattle - dw RockTunnel2AfterBattleText9 ; TextAfterBattle - dw RockTunnel2EndBattleText9 ; TextEndBattle - dw RockTunnel2EndBattleText9 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROCK_TUNNEL_2_TRAINER_7, 1, 3, RockTunnel2BattleText9, RockTunnel2EndBattleText9, RockTunnel2AfterBattleText9 + db -1 ; end RockTunnel2Text1: - TX_ASM + text_asm ld hl, RockTunnel2TrainerHeader0 call TalkToTrainer jp TextScriptEnd RockTunnel2Text2: - TX_ASM + text_asm ld hl, RockTunnel2TrainerHeader1 call TalkToTrainer jp TextScriptEnd RockTunnel2Text3: - TX_ASM + text_asm ld hl, RockTunnel2TrainerHeader2 call TalkToTrainer jp TextScriptEnd RockTunnel2Text4: - TX_ASM + text_asm ld hl, RockTunnel2TrainerHeader3 call TalkToTrainer jp TextScriptEnd RockTunnel2Text5: - TX_ASM + text_asm ld hl, RockTunnel2TrainerHeader4 call TalkToTrainer jp TextScriptEnd RockTunnel2Text6: - TX_ASM + text_asm ld hl, RockTunnel2TrainerHeader5 call TalkToTrainer jp TextScriptEnd RockTunnel2Text7: - TX_ASM + text_asm ld hl, RockTunnel2TrainerHeader6 call TalkToTrainer jp TextScriptEnd RockTunnel2Text8: - TX_ASM + text_asm ld hl, RockTunnel2TrainerHeader7 call TalkToTrainer jp TextScriptEnd RockTunnel2BattleText2: - TX_FAR _RockTunnel2BattleText2 - db "@" + text_far _RockTunnel2BattleText2 + text_end RockTunnel2EndBattleText2: - TX_FAR _RockTunnel2EndBattleText2 - db "@" + text_far _RockTunnel2EndBattleText2 + text_end RockTunnel2AfterBattleText2: - TX_FAR _RockTunnel2AfterBattleText2 - db "@" + text_far _RockTunnel2AfterBattleText2 + text_end RockTunnel2BattleText3: - TX_FAR _RockTunnel2BattleText3 - db "@" + text_far _RockTunnel2BattleText3 + text_end RockTunnel2EndBattleText3: - TX_FAR _RockTunnel2EndBattleText3 - db "@" + text_far _RockTunnel2EndBattleText3 + text_end RockTunnel2AfterBattleText3: - TX_FAR _RockTunnel2AfterBattleText3 - db "@" + text_far _RockTunnel2AfterBattleText3 + text_end RockTunnel2BattleText4: - TX_FAR _RockTunnel2BattleText4 - db "@" + text_far _RockTunnel2BattleText4 + text_end RockTunnel2EndBattleText4: - TX_FAR _RockTunnel2EndBattleText4 - db "@" + text_far _RockTunnel2EndBattleText4 + text_end RockTunnel2AfterBattleText4: - TX_FAR _RockTunnel2AfterBattleText4 - db "@" + text_far _RockTunnel2AfterBattleText4 + text_end RockTunnel2BattleText5: - TX_FAR _RockTunnel2BattleText5 - db "@" + text_far _RockTunnel2BattleText5 + text_end RockTunnel2EndBattleText5: - TX_FAR _RockTunnel2EndBattleText5 - db "@" + text_far _RockTunnel2EndBattleText5 + text_end RockTunnel2AfterBattleText5: - TX_FAR _RockTunnel2AfterBattleText5 - db "@" + text_far _RockTunnel2AfterBattleText5 + text_end RockTunnel2BattleText6: - TX_FAR _RockTunnel2BattleText6 - db "@" + text_far _RockTunnel2BattleText6 + text_end RockTunnel2EndBattleText6: - TX_FAR _RockTunnel2EndBattleText6 - db "@" + text_far _RockTunnel2EndBattleText6 + text_end RockTunnel2AfterBattleText6: - TX_FAR _RockTunnel2AfterBattleText6 - db "@" + text_far _RockTunnel2AfterBattleText6 + text_end RockTunnel2BattleText7: - TX_FAR _RockTunnel2BattleText7 - db "@" + text_far _RockTunnel2BattleText7 + text_end RockTunnel2EndBattleText7: - TX_FAR _RockTunnel2EndBattleText7 - db "@" + text_far _RockTunnel2EndBattleText7 + text_end RockTunnel2AfterBattleText7: - TX_FAR _RockTunnel2AfterBattleText7 - db "@" + text_far _RockTunnel2AfterBattleText7 + text_end RockTunnel2BattleText8: - TX_FAR _RockTunnel2BattleText8 - db "@" + text_far _RockTunnel2BattleText8 + text_end RockTunnel2EndBattleText8: - TX_FAR _RockTunnel2EndBattleText8 - db "@" + text_far _RockTunnel2EndBattleText8 + text_end RockTunnel2AfterBattleText8: - TX_FAR _RockTunnel2AfterBattleText8 - db "@" + text_far _RockTunnel2AfterBattleText8 + text_end RockTunnel2BattleText9: - TX_FAR _RockTunnel2BattleText9 - db "@" + text_far _RockTunnel2BattleText9 + text_end RockTunnel2EndBattleText9: - TX_FAR _RockTunnel2EndBattleText9 - db "@" + text_far _RockTunnel2EndBattleText9 + text_end RockTunnel2AfterBattleText9: - TX_FAR _RockTunnel2AfterBattleText9 - db "@" + text_far _RockTunnel2AfterBattleText9 + text_end diff --git a/scripts/RockTunnelPokecenter.asm b/scripts/RockTunnelPokecenter.asm index 2fcace67..3b3da387 100755 --- a/scripts/RockTunnelPokecenter.asm +++ b/scripts/RockTunnelPokecenter.asm @@ -10,20 +10,20 @@ RockTunnelPokecenter_TextPointers: dw RockTunnelPokecenterText5 RockTunnelHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse RockTunnelPokecenterText2: - TX_FAR _RockTunnelPokecenterText2 - db "@" + text_far _RockTunnelPokecenterText2 + text_end RockTunnelPokecenterText3: - TX_FAR _RockTunnelPokecenterText3 - db "@" + text_far _RockTunnelPokecenterText3 + text_end RockTunnelTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist RockTunnelPokecenterText5: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/RocketHideoutB1F.asm b/scripts/RocketHideoutB1F.asm index 0cbddb49..f20c0892 100755 --- a/scripts/RocketHideoutB1F.asm +++ b/scripts/RocketHideoutB1F.asm @@ -45,145 +45,110 @@ RocketHideoutB1F_TextPointers: dw PickUpItemText RocketHideout1TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0 - dw RocketHideout1BattleText2 ; TextBeforeBattle - dw RocketHideout1AfterBattleTxt2 ; TextAfterBattle - dw RocketHideout1EndBattleText2 ; TextEndBattle - dw RocketHideout1EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_0, 3, RocketHideout1BattleText2, RocketHideout1EndBattleText2, RocketHideout1AfterBattleTxt2 RocketHideout1TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1 - dw RocketHideout1BattleText3 ; TextBeforeBattle - dw RocketHideout1AfterBattleTxt3 ; TextAfterBattle - dw RocketHideout1EndBattleText3 ; TextEndBattle - dw RocketHideout1EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_1, 2, RocketHideout1BattleText3, RocketHideout1EndBattleText3, RocketHideout1AfterBattleTxt3 RocketHideout1TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2 - dw RocketHideout1BattleText4 ; TextBeforeBattle - dw RocketHideout1AfterBattleTxt4 ; TextAfterBattle - dw RocketHideout1EndBattleText4 ; TextEndBattle - dw RocketHideout1EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_2, 2, RocketHideout1BattleText4, RocketHideout1EndBattleText4, RocketHideout1AfterBattleTxt4 RocketHideout1TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3 - dw RocketHideout1BattleText5 ; TextBeforeBattle - dw RocketHideout1AfterBattleTxt5 ; TextAfterBattle - dw RocketHideout1EndBattleText5 ; TextEndBattle - dw RocketHideout1EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_3, 3, RocketHideout1BattleText5, RocketHideout1EndBattleText5, RocketHideout1AfterBattleTxt5 RocketHideout1TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4 - dw RocketHideout1BattleText6 ; TextBeforeBattle - dw RocketHideout1AfterBattleTxt6 ; TextAfterBattle - dw RocketHideout1EndBattleText6 ; TextEndBattle - dw RocketHideout1EndBattleText6 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4, 3, RocketHideout1BattleText6, RocketHideout1EndBattleText6, RocketHideout1AfterBattleTxt6 + db -1 ; end RocketHideout1Text1: - TX_ASM + text_asm ld hl, RocketHideout1TrainerHeader0 call TalkToTrainer jp TextScriptEnd RocketHideout1Text2: - TX_ASM + text_asm ld hl, RocketHideout1TrainerHeader1 call TalkToTrainer jp TextScriptEnd RocketHideout1Text3: - TX_ASM + text_asm ld hl, RocketHideout1TrainerHeader2 call TalkToTrainer jp TextScriptEnd RocketHideout1Text4: - TX_ASM + text_asm ld hl, RocketHideout1TrainerHeader3 call TalkToTrainer jp TextScriptEnd RocketHideout1Text5: - TX_ASM + text_asm ld hl, RocketHideout1TrainerHeader4 call TalkToTrainer jp TextScriptEnd RocketHideout1EndBattleText6: - TX_FAR _RocketHideout1EndBattleText6 - TX_ASM + text_far _RocketHideout1EndBattleText6 + text_asm SetEvent EVENT_BEAT_ROCKET_HIDEOUT_1_TRAINER_4 ld hl, RocketHideout1Text_44c9f ret RocketHideout1Text_44c9f: - TX_BLINK - db "@" + text_promptbutton + text_end RocketHideout1BattleText2: - TX_FAR _RocketHideout1BattleText2 - db "@" + text_far _RocketHideout1BattleText2 + text_end RocketHideout1EndBattleText2: - TX_FAR _RocketHideout1EndBattleText2 - db "@" + text_far _RocketHideout1EndBattleText2 + text_end RocketHideout1AfterBattleTxt2: - TX_FAR _RocketHideout1AfterBattleTxt2 - db "@" + text_far _RocketHideout1AfterBattleTxt2 + text_end RocketHideout1BattleText3: - TX_FAR _RocketHideout1BattleText3 - db "@" + text_far _RocketHideout1BattleText3 + text_end RocketHideout1EndBattleText3: - TX_FAR _RocketHideout1EndBattleText3 - db "@" + text_far _RocketHideout1EndBattleText3 + text_end RocketHideout1AfterBattleTxt3: - TX_FAR _RocketHideout1AfterBattleTxt3 - db "@" + text_far _RocketHideout1AfterBattleTxt3 + text_end RocketHideout1BattleText4: - TX_FAR _RocketHideout1BattleText4 - db "@" + text_far _RocketHideout1BattleText4 + text_end RocketHideout1EndBattleText4: - TX_FAR _RocketHideout1EndBattleText4 - db "@" + text_far _RocketHideout1EndBattleText4 + text_end RocketHideout1AfterBattleTxt4: - TX_FAR _RocketHideout1AfterBattleTxt4 - db "@" + text_far _RocketHideout1AfterBattleTxt4 + text_end RocketHideout1BattleText5: - TX_FAR _RocketHideout1BattleText5 - db "@" + text_far _RocketHideout1BattleText5 + text_end RocketHideout1EndBattleText5: - TX_FAR _RocketHideout1EndBattleText5 - db "@" + text_far _RocketHideout1EndBattleText5 + text_end RocketHideout1AfterBattleTxt5: - TX_FAR _RocketHideout1AfterBattleTxt5 - db "@" + text_far _RocketHideout1AfterBattleTxt5 + text_end RocketHideout1BattleText6: - TX_FAR _RocketHideout1BattleText6 - db "@" + text_far _RocketHideout1BattleText6 + text_end RocketHideout1AfterBattleTxt6: - TX_FAR _RocketHideout1AfterBattleTxt6 - db "@" + text_far _RocketHideout1AfterBattleTxt6 + text_end diff --git a/scripts/RocketHideoutB2F.asm b/scripts/RocketHideoutB2F.asm index 1b487df2..d6fae24f 100755 --- a/scripts/RocketHideoutB2F.asm +++ b/scripts/RocketHideoutB2F.asm @@ -33,273 +33,227 @@ RocketHideout2Script0: ld [wCurMapScript], a ret -;format: -;db y,x -;dw pointer to movement RocketHideout2ArrowTilePlayerMovement: - db $9,$4 - dw RocketHideout2ArrowMovement1 - db $b,$4 - dw RocketHideout2ArrowMovement2 - db $f,$4 - dw RocketHideout2ArrowMovement3 - db $10,$4 - dw RocketHideout2ArrowMovement4 - db $13,$4 - dw RocketHideout2ArrowMovement1 - db $16,$4 - dw RocketHideout2ArrowMovement5 - db $e,$5 - dw RocketHideout2ArrowMovement6 - db $16,$6 - dw RocketHideout2ArrowMovement7 - db $18,$6 - dw RocketHideout2ArrowMovement8 - db $9,$8 - dw RocketHideout2ArrowMovement9 - db $c,$8 - dw RocketHideout2ArrowMovement10 - db $f,$8 - dw RocketHideout2ArrowMovement8 - db $13,$8 - dw RocketHideout2ArrowMovement9 - db $17,$8 - dw RocketHideout2ArrowMovement11 - db $e,$9 - dw RocketHideout2ArrowMovement12 - db $16,$9 - dw RocketHideout2ArrowMovement12 - db $9,$a - dw RocketHideout2ArrowMovement13 - db $a,$a - dw RocketHideout2ArrowMovement14 - db $f,$a - dw RocketHideout2ArrowMovement15 - db $11,$a - dw RocketHideout2ArrowMovement16 - db $13,$a - dw RocketHideout2ArrowMovement17 - db $19,$a - dw RocketHideout2ArrowMovement2 - db $e,$b - dw RocketHideout2ArrowMovement18 - db $10,$b - dw RocketHideout2ArrowMovement19 - db $12,$b - dw RocketHideout2ArrowMovement12 - db $9,$c - dw RocketHideout2ArrowMovement20 - db $b,$c - dw RocketHideout2ArrowMovement21 - db $d,$c - dw RocketHideout2ArrowMovement22 - db $11,$c - dw RocketHideout2ArrowMovement23 - db $a,$d - dw RocketHideout2ArrowMovement24 - db $c,$d - dw RocketHideout2ArrowMovement25 - db $10,$d - dw RocketHideout2ArrowMovement26 - db $12,$d - dw RocketHideout2ArrowMovement27 - db $13,$d - dw RocketHideout2ArrowMovement28 - db $16,$d - dw RocketHideout2ArrowMovement29 - db $17,$d - dw RocketHideout2ArrowMovement30 - db $11,$e - dw RocketHideout2ArrowMovement31 - db $10,$f - dw RocketHideout2ArrowMovement12 - db $e,$10 - dw RocketHideout2ArrowMovement32 - db $10,$10 - dw RocketHideout2ArrowMovement33 - db $12,$10 - dw RocketHideout2ArrowMovement34 - db $a,$11 - dw RocketHideout2ArrowMovement35 - db $b,$11 - dw RocketHideout2ArrowMovement36 - db $FF + map_coord_movement 4, 9, RocketHideout2ArrowMovement1 + map_coord_movement 4, 11, RocketHideout2ArrowMovement2 + map_coord_movement 4, 15, RocketHideout2ArrowMovement3 + map_coord_movement 4, 16, RocketHideout2ArrowMovement4 + map_coord_movement 4, 19, RocketHideout2ArrowMovement1 + map_coord_movement 4, 22, RocketHideout2ArrowMovement5 + map_coord_movement 5, 14, RocketHideout2ArrowMovement6 + map_coord_movement 6, 22, RocketHideout2ArrowMovement7 + map_coord_movement 6, 24, RocketHideout2ArrowMovement8 + map_coord_movement 8, 9, RocketHideout2ArrowMovement9 + map_coord_movement 8, 12, RocketHideout2ArrowMovement10 + map_coord_movement 8, 15, RocketHideout2ArrowMovement8 + map_coord_movement 8, 19, RocketHideout2ArrowMovement9 + map_coord_movement 8, 23, RocketHideout2ArrowMovement11 + map_coord_movement 9, 14, RocketHideout2ArrowMovement12 + map_coord_movement 9, 22, RocketHideout2ArrowMovement12 + map_coord_movement 10, 9, RocketHideout2ArrowMovement13 + map_coord_movement 10, 10, RocketHideout2ArrowMovement14 + map_coord_movement 10, 15, RocketHideout2ArrowMovement15 + map_coord_movement 10, 17, RocketHideout2ArrowMovement16 + map_coord_movement 10, 19, RocketHideout2ArrowMovement17 + map_coord_movement 10, 25, RocketHideout2ArrowMovement2 + map_coord_movement 11, 14, RocketHideout2ArrowMovement18 + map_coord_movement 11, 16, RocketHideout2ArrowMovement19 + map_coord_movement 11, 18, RocketHideout2ArrowMovement12 + map_coord_movement 12, 9, RocketHideout2ArrowMovement20 + map_coord_movement 12, 11, RocketHideout2ArrowMovement21 + map_coord_movement 12, 13, RocketHideout2ArrowMovement22 + map_coord_movement 12, 17, RocketHideout2ArrowMovement23 + map_coord_movement 13, 10, RocketHideout2ArrowMovement24 + map_coord_movement 13, 12, RocketHideout2ArrowMovement25 + map_coord_movement 13, 16, RocketHideout2ArrowMovement26 + map_coord_movement 13, 18, RocketHideout2ArrowMovement27 + map_coord_movement 13, 19, RocketHideout2ArrowMovement28 + map_coord_movement 13, 22, RocketHideout2ArrowMovement29 + map_coord_movement 13, 23, RocketHideout2ArrowMovement30 + map_coord_movement 14, 17, RocketHideout2ArrowMovement31 + map_coord_movement 15, 16, RocketHideout2ArrowMovement12 + map_coord_movement 16, 14, RocketHideout2ArrowMovement32 + map_coord_movement 16, 16, RocketHideout2ArrowMovement33 + map_coord_movement 16, 18, RocketHideout2ArrowMovement34 + map_coord_movement 17, 10, RocketHideout2ArrowMovement35 + map_coord_movement 17, 11, RocketHideout2ArrowMovement36 + db -1 ; end ;format: direction, count ;each list is read starting from the $FF and working backwards RocketHideout2ArrowMovement1: - db D_LEFT,$02 - db $FF + db D_LEFT, 2 + db -1 ; end RocketHideout2ArrowMovement2: - db D_RIGHT,$04 - db $FF + db D_RIGHT, 4 + db -1 ; end RocketHideout2ArrowMovement3: - db D_UP,$04 - db D_RIGHT,$04 - db $FF + db D_UP, 4 + db D_RIGHT, 4 + db -1 ; end RocketHideout2ArrowMovement4: - db D_UP,$04 - db D_RIGHT,$04 - db D_UP,$01 - db $FF + db D_UP, 4 + db D_RIGHT, 4 + db D_UP, 1 + db -1 ; end RocketHideout2ArrowMovement5: - db D_LEFT,$02 - db D_UP,$03 - db $FF + db D_LEFT, 2 + db D_UP, 3 + db -1 ; end RocketHideout2ArrowMovement6: - db D_DOWN,$02 - db D_RIGHT,$04 - db $FF + db D_DOWN, 2 + db D_RIGHT, 4 + db -1 ; end RocketHideout2ArrowMovement7: - db D_UP,$02 - db $FF + db D_UP, 2 + db -1 ; end RocketHideout2ArrowMovement8: - db D_UP,$04 - db $FF + db D_UP, 4 + db -1 ; end RocketHideout2ArrowMovement9: - db D_LEFT,$06 - db $FF + db D_LEFT, 6 + db -1 ; end RocketHideout2ArrowMovement10: - db D_UP,$01 - db $FF + db D_UP, 1 + db -1 ; end RocketHideout2ArrowMovement11: - db D_LEFT,$06 - db D_UP,$04 - db $FF + db D_LEFT, 6 + db D_UP, 4 + db -1 ; end RocketHideout2ArrowMovement12: - db D_DOWN,$02 - db $FF + db D_DOWN, 2 + db -1 ; end RocketHideout2ArrowMovement13: - db D_LEFT,$08 - db $FF + db D_LEFT, 8 + db -1 ; end RocketHideout2ArrowMovement14: - db D_LEFT,$08 - db D_UP,$01 - db $FF + db D_LEFT, 8 + db D_UP, 1 + db -1 ; end RocketHideout2ArrowMovement15: - db D_LEFT,$08 - db D_UP,$06 - db $FF + db D_LEFT, 8 + db D_UP, 6 + db -1 ; end RocketHideout2ArrowMovement16: - db D_UP,$02 - db D_RIGHT,$04 - db $FF + db D_UP, 2 + db D_RIGHT, 4 + db -1 ; end RocketHideout2ArrowMovement17: - db D_UP,$02 - db D_RIGHT,$04 - db D_UP,$02 - db $FF + db D_UP, 2 + db D_RIGHT, 4 + db D_UP, 2 + db -1 ; end RocketHideout2ArrowMovement18: - db D_DOWN,$02 - db D_RIGHT,$04 - db D_DOWN,$02 - db $FF + db D_DOWN, 2 + db D_RIGHT, 4 + db D_DOWN, 2 + db -1 ; end RocketHideout2ArrowMovement19: - db D_DOWN,$02 - db D_RIGHT,$04 - db $FF + db D_DOWN, 2 + db D_RIGHT, 4 + db -1 ; end RocketHideout2ArrowMovement20: - db D_LEFT,$0A - db $FF + db D_LEFT, 10 + db -1 ; end RocketHideout2ArrowMovement21: - db D_LEFT,$0A - db D_UP,$02 - db $FF + db D_LEFT, 10 + db D_UP, 2 + db -1 ; end RocketHideout2ArrowMovement22: - db D_LEFT,$0A - db D_UP,$04 - db $FF + db D_LEFT, 10 + db D_UP, 4 + db -1 ; end RocketHideout2ArrowMovement23: - db D_UP,$02 - db D_RIGHT,$02 - db $FF + db D_UP, 2 + db D_RIGHT, 2 + db -1 ; end RocketHideout2ArrowMovement24: - db D_RIGHT,$01 - db D_DOWN,$02 - db $FF + db D_RIGHT, 1 + db D_DOWN, 2 + db -1 ; end RocketHideout2ArrowMovement25: - db D_RIGHT,$01 - db $FF + db D_RIGHT, 1 + db -1 ; end RocketHideout2ArrowMovement26: - db D_DOWN,$02 - db D_RIGHT,$02 - db $FF + db D_DOWN, 2 + db D_RIGHT, 2 + db -1 ; end RocketHideout2ArrowMovement27: - db D_DOWN,$02 - db D_LEFT,$02 - db $FF + db D_DOWN, 2 + db D_LEFT, 2 + db -1 ; end RocketHideout2ArrowMovement28: - db D_UP,$02 - db D_RIGHT,$04 - db D_UP,$02 - db D_LEFT,$03 - db $FF + db D_UP, 2 + db D_RIGHT, 4 + db D_UP, 2 + db D_LEFT, 3 + db -1 ; end RocketHideout2ArrowMovement29: - db D_DOWN,$02 - db D_LEFT,$04 - db $FF + db D_DOWN, 2 + db D_LEFT, 4 + db -1 ; end RocketHideout2ArrowMovement30: - db D_LEFT,$06 - db D_UP,$04 - db D_LEFT,$05 - db $FF + db D_LEFT, 6 + db D_UP, 4 + db D_LEFT, 5 + db -1 ; end RocketHideout2ArrowMovement31: - db D_UP,$02 - db $FF + db D_UP, 2 + db -1 ; end RocketHideout2ArrowMovement32: - db D_UP,$01 - db $FF + db D_UP, 1 + db -1 ; end RocketHideout2ArrowMovement33: - db D_UP,$03 - db $FF + db D_UP, 3 + db -1 ; end RocketHideout2ArrowMovement34: - db D_UP,$05 - db $FF + db D_UP, 5 + db -1 ; end RocketHideout2ArrowMovement35: - db D_RIGHT,$01 - db D_DOWN,$02 - db D_LEFT,$04 - db $FF + db D_RIGHT, 1 + db D_DOWN, 2 + db D_LEFT, 4 + db -1 ; end RocketHideout2ArrowMovement36: - db D_LEFT,$0A - db D_UP,$02 - db D_LEFT,$05 - db $FF + db D_LEFT, 10 + db D_UP, 2 + db D_LEFT, 5 + db -1 ; end RocketHideout2Script3: ld a, [wSimulatedJoypadStatesIndex] @@ -313,105 +267,7 @@ RocketHideout2Script3: ld [wCurMapScript], a ret -LoadSpinnerArrowTiles: - ld a, [wSpriteStateData1 + 2] - srl a - srl a - ld hl, SpinnerPlayerFacingDirections - ld c, a - ld b, $0 - add hl, bc - ld a, [hl] - ld [wSpriteStateData1 + 2], a - ld a, [wCurMapTileset] - cp FACILITY - ld hl, FacilitySpinnerArrows - jr z, .asm_44ff6 - ld hl, GymSpinnerArrows -.asm_44ff6 - ld a, [wSimulatedJoypadStatesIndex] - bit 0, a - jr nz, .asm_45001 - ld de, $18 - add hl, de -.asm_45001 - ld a, $4 - ld bc, $0 -.asm_45006 - push af - push hl - push bc - add hl, bc - ld a, [hli] - ld e, a - ld a, [hli] - ld d, a - ld a, [hli] - ld c, a - ld a, [hli] - ld b, a - ld a, [hli] - ld h, [hl] - ld l, a - call CopyVideoData - pop bc - ld a, $6 - add c - ld c, a - pop hl - pop af - dec a - jr nz, .asm_45006 - ret - -spinner: MACRO -; \1: source -; \2: offset (BANK() chokes on literals) -; \3: length -; \4: dest - dw \1 + \2 - db \3, BANK(\1) - dw \4 -ENDM - -FacilitySpinnerArrows: -FACILITY_SPINNER EQU $20 * $10 -vFacilitySpinner EQU vTileset + FACILITY_SPINNER - - spinner SpinnerArrowAnimTiles, $00, 1, vFacilitySpinner - spinner SpinnerArrowAnimTiles, $10, 1, vFacilitySpinner + $10 - spinner SpinnerArrowAnimTiles, $20, 1, vFacilitySpinner + $100 - spinner SpinnerArrowAnimTiles, $30, 1, vFacilitySpinner + $110 - spinner Facility_GFX, FACILITY_SPINNER + $000, 1, vFacilitySpinner - spinner Facility_GFX, FACILITY_SPINNER + $010, 1, vFacilitySpinner + $10 - spinner Facility_GFX, FACILITY_SPINNER + $100, 1, vFacilitySpinner + $100 - spinner Facility_GFX, FACILITY_SPINNER + $110, 1, vFacilitySpinner + $110 - -GymSpinnerArrows: -GYM_SPINNER EQU $3c * $10 -vGymSpinner EQU vTileset + GYM_SPINNER - - spinner SpinnerArrowAnimTiles, $10, 1, vGymSpinner - spinner SpinnerArrowAnimTiles, $30, 1, vGymSpinner + $10 - spinner SpinnerArrowAnimTiles, $00, 1, vGymSpinner + $100 - spinner SpinnerArrowAnimTiles, $20, 1, vGymSpinner + $110 - spinner Gym_GFX, GYM_SPINNER + $000, 1, vGymSpinner - spinner Gym_GFX, GYM_SPINNER + $010, 1, vGymSpinner + $10 - spinner Gym_GFX, GYM_SPINNER + $100, 1, vGymSpinner + $100 - spinner Gym_GFX, GYM_SPINNER + $110, 1, vGymSpinner + $110 - -SpinnerPlayerFacingDirections: -; This isn't the order of the facing directions. Rather, it's a list of -; the facing directions that come next. For example, when the player is -; facing down (00), the next facing direction is left (08). - db $08 ; down -> left - db $0C ; up -> right - db $04 ; left -> up - db $00 ; right -> down - -; these tiles are the animation for the tiles that push the player in dungeons like Rocket HQ -SpinnerArrowAnimTiles: - INCBIN "gfx/spinner_arrow.2bpp" +INCLUDE "engine/overworld/spinners.asm" RocketHideoutB2F_TextPointers: dw RocketHideout2Text1 @@ -421,30 +277,23 @@ RocketHideoutB2F_TextPointers: dw PickUpItemText RocketHideout2TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0 - dw RocketHideout2BattleText2 ; TextBeforeBattle - dw RocketHideout2AfterBattleTxt2 ; TextAfterBattle - dw RocketHideout2EndBattleText2 ; TextEndBattle - dw RocketHideout2EndBattleText2 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROCKET_HIDEOUT_2_TRAINER_0, 4, RocketHideout2BattleText2, RocketHideout2EndBattleText2, RocketHideout2AfterBattleTxt2 + db -1 ; end RocketHideout2Text1: - TX_ASM + text_asm ld hl, RocketHideout2TrainerHeader0 call TalkToTrainer jp TextScriptEnd RocketHideout2BattleText2: - TX_FAR _RocketHideout2BattleText2 - db "@" + text_far _RocketHideout2BattleText2 + text_end RocketHideout2EndBattleText2: - TX_FAR _RocketHideout2EndBattleText2 - db "@" + text_far _RocketHideout2EndBattleText2 + text_end RocketHideout2AfterBattleTxt2: - TX_FAR _RocketHideout2AfterBattleTxt2 - db "@" + text_far _RocketHideout2AfterBattleTxt2 + text_end diff --git a/scripts/RocketHideoutB3F.asm b/scripts/RocketHideoutB3F.asm index 4dd537b3..88876f04 100755 --- a/scripts/RocketHideoutB3F.asm +++ b/scripts/RocketHideoutB3F.asm @@ -33,103 +33,84 @@ RocketHideout3Script0: ld [wCurMapScript], a ret -;format: -;db y,x -;dw pointer to movement RocketHideout3ArrowTilePlayerMovement: - db $d,$a - dw RocketHideout3ArrowMovement6 - db $13,$a - dw RocketHideout3ArrowMovement1 - db $12,$b - dw RocketHideout3ArrowMovement2 - db $b,$c - dw RocketHideout3ArrowMovement3 - db $11,$c - dw RocketHideout3ArrowMovement4 - db $14,$c - dw RocketHideout3ArrowMovement5 - db $10,$d - dw RocketHideout3ArrowMovement6 - db $b,$e - dw RocketHideout3ArrowMovement7 - db $f,$e - dw RocketHideout3ArrowMovement6 - db $11,$e - dw RocketHideout3ArrowMovement8 - db $13,$e - dw RocketHideout3ArrowMovement9 - db $10,$f - dw RocketHideout3ArrowMovement7 - db $12,$f - dw RocketHideout3ArrowMovement10 - db $d,$10 - dw RocketHideout3ArrowMovement11 - db $c,$11 - dw RocketHideout3ArrowMovement10 - db $10,$12 - dw RocketHideout3ArrowMovement12 - db $FF + map_coord_movement 10, 13, RocketHideout3ArrowMovement6 + map_coord_movement 10, 19, RocketHideout3ArrowMovement1 + map_coord_movement 11, 18, RocketHideout3ArrowMovement2 + map_coord_movement 12, 11, RocketHideout3ArrowMovement3 + map_coord_movement 12, 17, RocketHideout3ArrowMovement4 + map_coord_movement 12, 20, RocketHideout3ArrowMovement5 + map_coord_movement 13, 16, RocketHideout3ArrowMovement6 + map_coord_movement 14, 11, RocketHideout3ArrowMovement7 + map_coord_movement 14, 15, RocketHideout3ArrowMovement6 + map_coord_movement 14, 17, RocketHideout3ArrowMovement8 + map_coord_movement 14, 19, RocketHideout3ArrowMovement9 + map_coord_movement 15, 16, RocketHideout3ArrowMovement7 + map_coord_movement 15, 18, RocketHideout3ArrowMovement10 + map_coord_movement 16, 13, RocketHideout3ArrowMovement11 + map_coord_movement 17, 12, RocketHideout3ArrowMovement10 + map_coord_movement 18, 16, RocketHideout3ArrowMovement12 + db -1 ; end ;format: direction, count ;each list is read starting from the $FF and working backwards RocketHideout3ArrowMovement1: - db D_RIGHT,$04 - db D_UP,$04 - db D_RIGHT,$04 - db $FF + db D_RIGHT, 4 + db D_UP, 4 + db D_RIGHT, 4 + db -1 ; end RocketHideout3ArrowMovement2: - db D_DOWN,$04 - db D_RIGHT,$04 - db $FF + db D_DOWN, 4 + db D_RIGHT, 4 + db -1 ; end RocketHideout3ArrowMovement3: - db D_LEFT,$02 - db $FF + db D_LEFT, 2 + db -1 ; end RocketHideout3ArrowMovement4: - db D_RIGHT,$04 - db D_UP,$02 - db D_RIGHT,$02 - db $FF + db D_RIGHT, 4 + db D_UP, 2 + db D_RIGHT, 2 + db -1 ; end RocketHideout3ArrowMovement5: - db D_RIGHT,$04 - db D_UP,$02 - db D_RIGHT,$02 - db D_UP,$03 - db $FF + db D_RIGHT, 4 + db D_UP, 2 + db D_RIGHT, 2 + db D_UP, 3 + db -1 ; end RocketHideout3ArrowMovement6: - db D_RIGHT,$04 - db $FF + db D_RIGHT, 4 + db -1 ; end RocketHideout3ArrowMovement7: - db D_RIGHT,$02 - db $FF + db D_RIGHT, 2 + db -1 ; end RocketHideout3ArrowMovement8: - db D_RIGHT,$04 - db D_UP,$02 - db $FF + db D_RIGHT, 4 + db D_UP, 2 + db -1 ; end RocketHideout3ArrowMovement9: - db D_RIGHT,$04 - db D_UP,$04 - db $FF + db D_RIGHT, 4 + db D_UP, 4 + db -1 ; end RocketHideout3ArrowMovement10: - db D_DOWN,$04 - db $FF + db D_DOWN, 4 + db -1 ; end RocketHideout3ArrowMovement11: - db D_UP,$02 - db $FF + db D_UP, 2 + db -1 ; end RocketHideout3ArrowMovement12: - db D_UP,$01 - db $FF + db D_UP, 1 + db -1 ; end RocketHideout3Script3: ld a, [wSimulatedJoypadStatesIndex] @@ -150,57 +131,43 @@ RocketHideoutB3F_TextPointers: dw PickUpItemText RocketHideout3TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0 - dw RocketHideout3BattleText2 ; TextBeforeBattle - dw RocketHideout3AfterBattleTxt2 ; TextAfterBattle - dw RocketHideout3EndBattleText2 ; TextEndBattle - dw RocketHideout3EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_0, 2, RocketHideout3BattleText2, RocketHideout3EndBattleText2, RocketHideout3AfterBattleTxt2 RocketHideout3TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1 - dw RocketHideout3BattleTxt ; TextBeforeBattle - dw RocketHideout3AfterBattleText3 ; TextAfterBattle - dw RocketHideout3EndBattleText3 ; TextEndBattle - dw RocketHideout3EndBattleText3 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROCKET_HIDEOUT_3_TRAINER_1, 4, RocketHideout3BattleTxt, RocketHideout3EndBattleText3, RocketHideout3AfterBattleText3 + db -1 ; end RocketHideout3Text1: - TX_ASM + text_asm ld hl, RocketHideout3TrainerHeader0 call TalkToTrainer jp TextScriptEnd RocketHideout3BattleText2: - TX_FAR _RocketHideout3BattleText2 - db "@" + text_far _RocketHideout3BattleText2 + text_end RocketHideout3EndBattleText2: - TX_FAR _RocketHideout3EndBattleText2 - db "@" + text_far _RocketHideout3EndBattleText2 + text_end RocketHideout3AfterBattleTxt2: - TX_FAR _RocketHideout3AfterBattleTxt2 - db "@" + text_far _RocketHideout3AfterBattleTxt2 + text_end RocketHideout3Text2: - TX_ASM + text_asm ld hl, RocketHideout3TrainerHeader1 call TalkToTrainer jp TextScriptEnd RocketHideout3BattleTxt: - TX_FAR _RocketHideout3BattleTxt - db "@" + text_far _RocketHideout3BattleTxt + text_end RocketHideout3EndBattleText3: - TX_FAR _RocketHideout3EndBattleText3 - db "@" + text_far _RocketHideout3EndBattleText3 + text_end RocketHideout3AfterBattleText3: - TX_FAR _RocketHide3AfterBattleText3 - db "@" + text_far _RocketHide3AfterBattleText3 + text_end diff --git a/scripts/RocketHideoutB4F.asm b/scripts/RocketHideoutB4F.asm index 89fd37e1..564adc2a 100755 --- a/scripts/RocketHideoutB4F.asm +++ b/scripts/RocketHideoutB4F.asm @@ -48,7 +48,7 @@ RocketHideout4Script3: ld [wJoyIgnore], a SetEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call GBFadeOutToBlack ld a, HS_ROCKET_HIDEOUT_B4F_GIOVANNI @@ -89,7 +89,7 @@ RocketHideout4Script_455a5: SetEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1 .asm_455c2 xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $fc ld [wJoyIgnore], a call StopAllMusic @@ -103,7 +103,7 @@ RocketHideout4Script_455a5: ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -132,7 +132,7 @@ RocketHideout4Script4: ld de, RocketHideout4JessieJamesMovementData_45606 .asm_45617 ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call MoveSprite ld a, $ff ld [wJoyIgnore], a @@ -166,7 +166,7 @@ RocketHideout4Script7: ld de, RocketHideout4JessieJamesMovementData_45605 .asm_4565f ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call MoveSprite ld a, $ff ld [wJoyIgnore], a @@ -194,7 +194,7 @@ RocketHideout4Script9: .asm_45697 call Delay3 ld a, $c - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID RocketHideout4Script10: ld hl, wd72d @@ -208,7 +208,7 @@ RocketHideout4Script10: ld a, $2b ld [wTrainerNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wJoyIgnore], a SetEvent EVENT_6A0 ld a, $b @@ -232,7 +232,7 @@ RocketHideout4Script11: ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -264,7 +264,7 @@ RocketHideout4Script12: RocketHideout4Script13: call PlayDefaultMusic xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wJoyIgnore], a SetEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0 ld a, $0 @@ -299,22 +299,16 @@ RocketHideoutB4F_TextPointers: dw RocketHideout4Text12 RocketHideout4TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 - db ($1 << 4) - dwEventFlagAddress EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2 - dw RocketHideout4Trainer0BeforeText - dw RocketHideout4Trainer0AfterText - dw RocketHideout4Trainer0EndBattleText - dw RocketHideout4Trainer0EndBattleText - db $ff + trainer EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2, 1, RocketHideout4Trainer0BeforeText, RocketHideout4Trainer0EndBattleText, RocketHideout4Trainer0AfterText + db -1 ; end RocketHideout4Text1: RocketHideout4Text2: - db "@" + text_end RocketHideout4Text10: - TX_FAR _RocketHideoutJessieJamesText1 - TX_ASM + text_far _RocketHideoutJessieJamesText1 + text_asm ld c, 10 call DelayFrames ld a, $8 @@ -329,22 +323,22 @@ RocketHideout4Text10: jp TextScriptEnd RocketHideout4Text11: - TX_FAR _RocketHideoutJessieJamesText2 - db "@" + text_far _RocketHideoutJessieJamesText2 + text_end RocketHideout4JessieJamesEndBattleText: - TX_FAR _RocketHideoutJessieJamesText3 - db "@" + text_far _RocketHideoutJessieJamesText3 + text_end RocketHideout4Text12: - TX_FAR _RocketHideoutJessieJamesText4 - TX_ASM + text_far _RocketHideoutJessieJamesText4 + text_asm ld c, 64 call DelayFrames jp TextScriptEnd RocketHideout4Text0: - TX_ASM + text_asm CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_GIOVANNI jp nz, .asm_457fb ld hl, RocketHideout4Text_45804 @@ -355,12 +349,12 @@ RocketHideout4Text0: ld hl, RocketHideout4Text_45809 ld de, RocketHideout4Text_45809 call SaveEndBattleTextPointers - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wRocketHideoutB4FCurScript], a ld [wCurMapScript], a @@ -373,31 +367,31 @@ RocketHideout4Text0: jp TextScriptEnd RocketHideout4Text_45804: - TX_FAR _RocketHideout4Text_4557a - db "@" + text_far _RocketHideout4Text_4557a + text_end RocketHideout4Text_45809: - TX_FAR _RocketHideout4Text_4557f - db "@" + text_far _RocketHideout4Text_4557f + text_end RocketHideout4Text9: - TX_FAR _RocketHideout4Text_45584 - db "@" + text_far _RocketHideout4Text_45584 + text_end RocketHideout4Text3: - TX_ASM + text_asm ld hl, RocketHideout4TrainerHeader0 call TalkToTrainer jp TextScriptEnd RocketHideout4Trainer0BeforeText: - TX_FAR _RocketHideout4BattleText4 - db "@" + text_far _RocketHideout4BattleText4 + text_end RocketHideout4Trainer0EndBattleText: - TX_FAR _RocketHideout4EndBattleText4 - TX_BLINK - TX_ASM + text_far _RocketHideout4EndBattleText4 + text_promptbutton + text_asm SetEvent EVENT_ROCKET_DROPPED_LIFT_KEY ld a, HS_ROCKET_HIDEOUT_B4F_ITEM_5 ld [wMissableObjectIndex], a @@ -405,11 +399,11 @@ RocketHideout4Trainer0EndBattleText: jp TextScriptEnd RocketHideout4Trainer0AfterText: - TX_ASM + text_asm ld hl, RocketHideout4Text_45844 call PrintText jp TextScriptEnd RocketHideout4Text_45844: - TX_FAR _RocketHideout4Text_455ec - db "@" + text_far _RocketHideout4Text_455ec + text_end diff --git a/scripts/RocketHideoutElevator.asm b/scripts/RocketHideoutElevator.asm index 9525db3a..8c51294e 100755 --- a/scripts/RocketHideoutElevator.asm +++ b/scripts/RocketHideoutElevator.asm @@ -41,31 +41,30 @@ RocketHideoutElevatorScript_45741: ret RocketHideoutElavatorFloors: - db $03 ; num elements in list + db 3 ; # db FLOOR_B1F db FLOOR_B2F db FLOOR_B4F - db $FF ; terminator + db -1 ; end -RocketHideoutElevatorWarpMaps: -; first byte is warp number -; second byte is map number ; These specify where the player goes after getting out of the elevator. - db $04, ROCKET_HIDEOUT_B1F - db $04, ROCKET_HIDEOUT_B2F - db $02, ROCKET_HIDEOUT_B4F +RocketHideoutElevatorWarpMaps: + ; warp number, map id + db 4, ROCKET_HIDEOUT_B1F + db 4, ROCKET_HIDEOUT_B2F + db 2, ROCKET_HIDEOUT_B4F RocketHideoutElevatorWarpMapsEnd: RocketHideoutElevatorScript_4575f: call Delay3 - callba ShakeElevator + farcall ShakeElevator ret RocketHideoutElevator_TextPointers: dw RocketHideoutElevatorText1 RocketHideoutElevatorText1: - TX_ASM + text_asm ld b, LIFT_KEY call IsItemInBag jr z, .asm_45782 @@ -80,6 +79,6 @@ RocketHideoutElevatorText1: jp TextScriptEnd RocketHideoutElevatorText_4578b: - TX_FAR _RocketElevatorText_4578b - TX_WAIT - db "@" + text_far _RocketElevatorText_4578b + text_waitbutton + text_end diff --git a/scripts/Route1.asm b/scripts/Route1.asm index d41360b2..d2f0b766 100755 --- a/scripts/Route1.asm +++ b/scripts/Route1.asm @@ -8,16 +8,16 @@ Route1_TextPointers: dw Route1Text3 Route1Text1: - TX_ASM - callba Func_f1ad2 + text_asm + farcall Func_f1ad2 jp TextScriptEnd Route1Text2: - TX_ASM - callba Func_f1b0f + text_asm + farcall Func_f1b0f jp TextScriptEnd Route1Text3: - TX_ASM - callba Func_f1b1b + text_asm + farcall Func_f1b1b jp TextScriptEnd diff --git a/scripts/Route10.asm b/scripts/Route10.asm index 3fffa2c0..93012b9a 100755 --- a/scripts/Route10.asm +++ b/scripts/Route10.asm @@ -25,174 +25,132 @@ Route10_TextPointers: dw Route10Text10 Route10TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_0 - dw Route10BattleText1 ; TextBeforeBattle - dw Route10AfterBattleText1 ; TextAfterBattle - dw Route10EndBattleText1 ; TextEndBattle - dw Route10EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_10_TRAINER_0, 4, Route10BattleText1, Route10EndBattleText1, Route10AfterBattleText1 Route10TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_1 - dw Route10BattleText2 ; TextBeforeBattle - dw Route10AfterBattleText2 ; TextAfterBattle - dw Route10EndBattleText2 ; TextEndBattle - dw Route10EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_10_TRAINER_1, 3, Route10BattleText2, Route10EndBattleText2, Route10AfterBattleText2 Route10TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_2 - dw Route10BattleText3 ; TextBeforeBattle - dw Route10AfterBattleText3 ; TextAfterBattle - dw Route10EndBattleText3 ; TextEndBattle - dw Route10EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_10_TRAINER_2, 4, Route10BattleText3, Route10EndBattleText3, Route10AfterBattleText3 Route10TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_3 - dw Route10BattleText4 ; TextBeforeBattle - dw Route10AfterBattleText4 ; TextAfterBattle - dw Route10EndBattleText4 ; TextEndBattle - dw Route10EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_10_TRAINER_3, 3, Route10BattleText4, Route10EndBattleText4, Route10AfterBattleText4 Route10TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_4 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_4 - dw Route10BattleText5 ; TextBeforeBattle - dw Route10AfterBattleText5 ; TextAfterBattle - dw Route10EndBattleText5 ; TextEndBattle - dw Route10EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_10_TRAINER_4, 2, Route10BattleText5, Route10EndBattleText5, Route10AfterBattleText5 Route10TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_10_TRAINER_5 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_10_TRAINER_5 - dw Route10BattleText6 ; TextBeforeBattle - dw Route10AfterBattleText6 ; TextAfterBattle - dw Route10EndBattleText6 ; TextEndBattle - dw Route10EndBattleText6 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_10_TRAINER_5, 2, Route10BattleText6, Route10EndBattleText6, Route10AfterBattleText6 + db -1 ; end Route10Text1: - TX_ASM + text_asm ld hl, Route10TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route10BattleText1: - TX_FAR _Route10BattleText1 - db "@" + text_far _Route10BattleText1 + text_end Route10EndBattleText1: - TX_FAR _Route10EndBattleText1 - db "@" + text_far _Route10EndBattleText1 + text_end Route10AfterBattleText1: - TX_FAR _Route10AfterBattleText1 - db "@" + text_far _Route10AfterBattleText1 + text_end Route10Text2: - TX_ASM + text_asm ld hl, Route10TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route10BattleText2: - TX_FAR _Route10BattleText2 - db "@" + text_far _Route10BattleText2 + text_end Route10EndBattleText2: - TX_FAR _Route10EndBattleText2 - db "@" + text_far _Route10EndBattleText2 + text_end Route10AfterBattleText2: - TX_FAR _Route10AfterBattleText2 - db "@" + text_far _Route10AfterBattleText2 + text_end Route10Text3: - TX_ASM + text_asm ld hl, Route10TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route10BattleText3: - TX_FAR _Route10BattleText3 - db "@" + text_far _Route10BattleText3 + text_end Route10EndBattleText3: - TX_FAR _Route10EndBattleText3 - db "@" + text_far _Route10EndBattleText3 + text_end Route10AfterBattleText3: - TX_FAR _Route10AfterBattleText3 - db "@" + text_far _Route10AfterBattleText3 + text_end Route10Text4: - TX_ASM + text_asm ld hl, Route10TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route10BattleText4: - TX_FAR _Route10BattleText4 - db "@" + text_far _Route10BattleText4 + text_end Route10EndBattleText4: - TX_FAR _Route10EndBattleText4 - db "@" + text_far _Route10EndBattleText4 + text_end Route10AfterBattleText4: - TX_FAR _Route10AfterBattleText4 - db "@" + text_far _Route10AfterBattleText4 + text_end Route10Text5: - TX_ASM + text_asm ld hl, Route10TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route10BattleText5: - TX_FAR _Route10BattleText5 - db "@" + text_far _Route10BattleText5 + text_end Route10EndBattleText5: - TX_FAR _Route10EndBattleText5 - db "@" + text_far _Route10EndBattleText5 + text_end Route10AfterBattleText5: - TX_FAR _Route10AfterBattleText5 - db "@" + text_far _Route10AfterBattleText5 + text_end Route10Text6: - TX_ASM + text_asm ld hl, Route10TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route10BattleText6: - TX_FAR _Route10BattleText6 - db "@" + text_far _Route10BattleText6 + text_end Route10EndBattleText6: - TX_FAR _Route10EndBattleText6 - db "@" + text_far _Route10EndBattleText6 + text_end Route10AfterBattleText6: - TX_FAR _Route10AfterBattleText6 - db "@" + text_far _Route10AfterBattleText6 + text_end Route10Text9: Route10Text7: - TX_FAR _Route10Text7 ; _Route10Text9 - db "@" + text_far _Route10Text7 ; _Route10Text9 + text_end Route10Text10: - TX_FAR _Route10Text10 - db "@" + text_far _Route10Text10 + text_end diff --git a/scripts/Route11.asm b/scripts/Route11.asm index 891237cc..924c0276 100755 --- a/scripts/Route11.asm +++ b/scripts/Route11.asm @@ -26,277 +26,207 @@ Route11_TextPointers: dw Route11Text11 Route11TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_0 - dw Route11BattleText1 ; TextBeforeBattle - dw Route11AfterBattleText1 ; TextAfterBattle - dw Route11EndBattleText1 ; TextEndBattle - dw Route11EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_11_TRAINER_0, 3, Route11BattleText1, Route11EndBattleText1, Route11AfterBattleText1 Route11TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_1 - dw Route11BattleText2 ; TextBeforeBattle - dw Route11AfterBattleText2 ; TextAfterBattle - dw Route11EndBattleText2 ; TextEndBattle - dw Route11EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_11_TRAINER_1, 2, Route11BattleText2, Route11EndBattleText2, Route11AfterBattleText2 Route11TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_2 - dw Route11BattleText3 ; TextBeforeBattle - dw Route11AfterBattleText3 ; TextAfterBattle - dw Route11EndBattleText3 ; TextEndBattle - dw Route11EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_11_TRAINER_2, 3, Route11BattleText3, Route11EndBattleText3, Route11AfterBattleText3 Route11TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_3 - dw Route11BattleText4 ; TextBeforeBattle - dw Route11AfterBattleText4 ; TextAfterBattle - dw Route11EndBattleText4 ; TextEndBattle - dw Route11EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_11_TRAINER_3, 3, Route11BattleText4, Route11EndBattleText4, Route11AfterBattleText4 Route11TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_4 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_4 - dw Route11BattleText5 ; TextBeforeBattle - dw Route11AfterBattleText5 ; TextAfterBattle - dw Route11EndBattleText5 ; TextEndBattle - dw Route11EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_11_TRAINER_4, 4, Route11BattleText5, Route11EndBattleText5, Route11AfterBattleText5 Route11TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_5 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_5 - dw Route11BattleText6 ; TextBeforeBattle - dw Route11AfterBattleText6 ; TextAfterBattle - dw Route11EndBattleText6 ; TextEndBattle - dw Route11EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_11_TRAINER_5, 3, Route11BattleText6, Route11EndBattleText6, Route11AfterBattleText6 Route11TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_6 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_6 - dw Route11BattleText7 ; TextBeforeBattle - dw Route11AfterBattleText7 ; TextAfterBattle - dw Route11EndBattleText7 ; TextEndBattle - dw Route11EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_11_TRAINER_6, 3, Route11BattleText7, Route11EndBattleText7, Route11AfterBattleText7 Route11TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_7, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_7, 1 - dw Route11BattleText8 ; TextBeforeBattle - dw Route11AfterBattleText8 ; TextAfterBattle - dw Route11EndBattleText8 ; TextEndBattle - dw Route11EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_11_TRAINER_7, 1, 4, Route11BattleText8, Route11EndBattleText8, Route11AfterBattleText8 Route11TrainerHeader8: - dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_8, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_8, 1 - dw Route11BattleText9 ; TextBeforeBattle - dw Route11AfterBattleText9 ; TextAfterBattle - dw Route11EndBattleText9 ; TextEndBattle - dw Route11EndBattleText9 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_11_TRAINER_8, 1, 3, Route11BattleText9, Route11EndBattleText9, Route11AfterBattleText9 Route11TrainerHeader9: - dbEventFlagBit EVENT_BEAT_ROUTE_11_TRAINER_9, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_11_TRAINER_9, 1 - dw Route11BattleText10 ; TextBeforeBattle - dw Route11AfterBattleText10 ; TextAfterBattle - dw Route11EndBattleText10 ; TextEndBattle - dw Route11EndBattleText10 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_11_TRAINER_9, 1, 4, Route11BattleText10, Route11EndBattleText10, Route11AfterBattleText10 + db -1 ; end Route11Text1: - TX_ASM + text_asm ld hl, Route11TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route11BattleText1: - TX_FAR _Route11BattleText1 - db "@" + text_far _Route11BattleText1 + text_end Route11EndBattleText1: - TX_FAR _Route11EndBattleText1 - db "@" + text_far _Route11EndBattleText1 + text_end Route11AfterBattleText1: - TX_FAR _Route11AfterBattleText1 - db "@" + text_far _Route11AfterBattleText1 + text_end Route11Text2: - TX_ASM + text_asm ld hl, Route11TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route11BattleText2: - TX_FAR _Route11BattleText2 - db "@" + text_far _Route11BattleText2 + text_end Route11EndBattleText2: - TX_FAR _Route11EndBattleText2 - db "@" + text_far _Route11EndBattleText2 + text_end Route11AfterBattleText2: - TX_FAR _Route11AfterBattleText2 - db "@" + text_far _Route11AfterBattleText2 + text_end Route11Text3: - TX_ASM + text_asm ld hl, Route11TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route11BattleText3: - TX_FAR _Route11BattleText3 - db "@" + text_far _Route11BattleText3 + text_end Route11EndBattleText3: - TX_FAR _Route11EndBattleText3 - db "@" + text_far _Route11EndBattleText3 + text_end Route11AfterBattleText3: - TX_FAR _Route11AfterBattleText3 - db "@" + text_far _Route11AfterBattleText3 + text_end Route11Text4: - TX_ASM + text_asm ld hl, Route11TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route11BattleText4: - TX_FAR _Route11BattleText4 - db "@" + text_far _Route11BattleText4 + text_end Route11EndBattleText4: - TX_FAR _Route11EndBattleText4 - db "@" + text_far _Route11EndBattleText4 + text_end Route11AfterBattleText4: - TX_FAR _Route11AfterBattleText4 - db "@" + text_far _Route11AfterBattleText4 + text_end Route11Text5: - TX_ASM + text_asm ld hl, Route11TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route11BattleText5: - TX_FAR _Route11BattleText5 - db "@" + text_far _Route11BattleText5 + text_end Route11EndBattleText5: - TX_FAR _Route11EndBattleText5 - db "@" + text_far _Route11EndBattleText5 + text_end Route11AfterBattleText5: - TX_FAR _Route11AfterBattleText5 - db "@" + text_far _Route11AfterBattleText5 + text_end Route11Text6: - TX_ASM + text_asm ld hl, Route11TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route11BattleText6: - TX_FAR _Route11BattleText6 - db "@" + text_far _Route11BattleText6 + text_end Route11EndBattleText6: - TX_FAR _Route11EndBattleText6 - db "@" + text_far _Route11EndBattleText6 + text_end Route11AfterBattleText6: - TX_FAR _Route11AfterBattleText6 - db "@" + text_far _Route11AfterBattleText6 + text_end Route11Text7: - TX_ASM + text_asm ld hl, Route11TrainerHeader6 call TalkToTrainer jp TextScriptEnd Route11BattleText7: - TX_FAR _Route11BattleText7 - db "@" + text_far _Route11BattleText7 + text_end Route11EndBattleText7: - TX_FAR _Route11EndBattleText7 - db "@" + text_far _Route11EndBattleText7 + text_end Route11AfterBattleText7: - TX_FAR _Route11AfterBattleText7 - db "@" + text_far _Route11AfterBattleText7 + text_end Route11Text8: - TX_ASM + text_asm ld hl, Route11TrainerHeader7 call TalkToTrainer jp TextScriptEnd Route11BattleText8: - TX_FAR _Route11BattleText8 - db "@" + text_far _Route11BattleText8 + text_end Route11EndBattleText8: - TX_FAR _Route11EndBattleText8 - db "@" + text_far _Route11EndBattleText8 + text_end Route11AfterBattleText8: - TX_FAR _Route11AfterBattleText8 - db "@" + text_far _Route11AfterBattleText8 + text_end Route11Text9: - TX_ASM + text_asm ld hl, Route11TrainerHeader8 call TalkToTrainer jp TextScriptEnd Route11BattleText9: - TX_FAR _Route11BattleText9 - db "@" + text_far _Route11BattleText9 + text_end Route11EndBattleText9: - TX_FAR _Route11EndBattleText9 - db "@" + text_far _Route11EndBattleText9 + text_end Route11AfterBattleText9: - TX_FAR _Route11AfterBattleText9 - db "@" + text_far _Route11AfterBattleText9 + text_end Route11Text10: - TX_ASM + text_asm ld hl, Route11TrainerHeader9 call TalkToTrainer jp TextScriptEnd Route11BattleText10: - TX_FAR _Route11BattleText10 - db "@" + text_far _Route11BattleText10 + text_end Route11EndBattleText10: - TX_FAR _Route11EndBattleText10 - db "@" + text_far _Route11EndBattleText10 + text_end Route11AfterBattleText10: - TX_FAR _Route11AfterBattleText10 - db "@" + text_far _Route11AfterBattleText10 + text_end Route11Text11: - TX_FAR _Route11Text11 - db "@" + text_far _Route11Text11 + text_end diff --git a/scripts/Route11Gate1F.asm b/scripts/Route11Gate1F.asm index 8e5f6c03..d1ebe6ea 100755 --- a/scripts/Route11Gate1F.asm +++ b/scripts/Route11Gate1F.asm @@ -5,5 +5,5 @@ Route11Gate1F_TextPointers: dw Route11GateText1 Route11GateText1: - TX_FAR _Route11GateText1 - db "@" + text_far _Route11GateText1 + text_end diff --git a/scripts/Route11Gate2F.asm b/scripts/Route11Gate2F.asm index fde7fdd6..65352cd9 100755 --- a/scripts/Route11Gate2F.asm +++ b/scripts/Route11Gate2F.asm @@ -8,21 +8,21 @@ Route11Gate2F_TextPointers: dw Route11GateUpstairsText4 Route11GateUpstairsText1: - TX_ASM - ld a, $0 + text_asm + ld a, TRADE_FOR_TERRY ld [wWhichTrade], a predef DoInGameTradeDialogue Route11GateUpstairsScriptEnd: jp TextScriptEnd Route11GateUpstairsText2: - TX_ASM + text_asm CheckEvent EVENT_GOT_ITEMFINDER, 1 - jr c, .asm_4949b - ld a, 30 ; pokemon needed - ld [hOaksAideRequirement], a - ld a, ITEMFINDER ; oak's aide reward - ld [hOaksAideRewardItem], a + jr c, .got_item + ld a, 30 + ldh [hOaksAideRequirement], a + ld a, ITEMFINDER + ldh [hOaksAideRewardItem], a ld [wd11e], a call GetItemName ld h, d @@ -31,22 +31,22 @@ Route11GateUpstairsText2: ld bc, ITEM_NAME_LENGTH call CopyData predef OaksAideScript - ld a, [hOaksAideResult] - dec a - jr nz, .asm_494a1 + ldh a, [hOaksAideResult] + dec a ; OAKS_AIDE_GOT_ITEM? + jr nz, .no_item SetEvent EVENT_GOT_ITEMFINDER -.asm_4949b +.got_item ld hl, Route11GateUpstairsText_494a3 call PrintText -.asm_494a1 +.no_item jr Route11GateUpstairsScriptEnd Route11GateUpstairsText_494a3: - TX_FAR _Route11GateUpstairsText_494a3 - db "@" + text_far _Route11GateUpstairsText_494a3 + text_end Route11GateUpstairsText3: - TX_ASM + text_asm ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP jp nz, GateUpstairsScript_PrintIfFacingUp @@ -59,18 +59,18 @@ Route11GateUpstairsText3: jp TextScriptEnd BinocularsSnorlaxText: - TX_FAR _BinocularsSnorlaxText - db "@" + text_far _BinocularsSnorlaxText + text_end BinocularsNoSnorlaxText: - TX_FAR _BinocularsNoSnorlaxText - db "@" + text_far _BinocularsNoSnorlaxText + text_end Route11GateUpstairsText4: - TX_ASM + text_asm ld hl, Route11GateUpstairsText_494d5 jp GateUpstairsScript_PrintIfFacingUp Route11GateUpstairsText_494d5: - TX_FAR _Route11GateUpstairsText_494d5 - db "@" + text_far _Route11GateUpstairsText_494d5 + text_end diff --git a/scripts/Route12.asm b/scripts/Route12.asm index 510e7727..3c0d77e1 100755 --- a/scripts/Route12.asm +++ b/scripts/Route12.asm @@ -27,7 +27,7 @@ Route12Script0: ResetEventReuseHL EVENT_FIGHT_ROUTE12_SNORLAX jp z, CheckFightingMapTrainers ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, SNORLAX ld [wCurOpponent], a @@ -50,7 +50,7 @@ Route12Script3: cp $2 jr z, .asm_59664 ld a, $e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .asm_59664 SetEvent EVENT_BEAT_ROUTE12_SNORLAX @@ -77,212 +77,163 @@ Route12_TextPointers: dw Route12Text14 Route12TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_0 - dw Route12BattleText1 ; TextBeforeBattle - dw Route12AfterBattleText1 ; TextAfterBattle - dw Route12EndBattleText1 ; TextEndBattle - dw Route12EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_12_TRAINER_0, 4, Route12BattleText1, Route12EndBattleText1, Route12AfterBattleText1 Route12TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_1 - dw Route12BattleText2 ; TextBeforeBattle - dw Route12AfterBattleText2 ; TextAfterBattle - dw Route12EndBattleText2 ; TextEndBattle - dw Route12EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_12_TRAINER_1, 4, Route12BattleText2, Route12EndBattleText2, Route12AfterBattleText2 Route12TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_2 - dw Route12BattleText3 ; TextBeforeBattle - dw Route12AfterBattleText3 ; TextAfterBattle - dw Route12EndBattleText3 ; TextEndBattle - dw Route12EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_12_TRAINER_2, 4, Route12BattleText3, Route12EndBattleText3, Route12AfterBattleText3 Route12TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_3 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_3 - dw Route12BattleText4 ; TextBeforeBattle - dw Route12AfterBattleText4 ; TextAfterBattle - dw Route12EndBattleText4 ; TextEndBattle - dw Route12EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_12_TRAINER_3, 4, Route12BattleText4, Route12EndBattleText4, Route12AfterBattleText4 Route12TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_4 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_4 - dw Route12BattleText5 ; TextBeforeBattle - dw Route12AfterBattleText5 ; TextAfterBattle - dw Route12EndBattleText5 ; TextEndBattle - dw Route12EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_12_TRAINER_4, 4, Route12BattleText5, Route12EndBattleText5, Route12AfterBattleText5 Route12TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_5 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_5 - dw Route12BattleText6 ; TextBeforeBattle - dw Route12AfterBattleText6 ; TextAfterBattle - dw Route12EndBattleText6 ; TextEndBattle - dw Route12EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_12_TRAINER_5, 4, Route12BattleText6, Route12EndBattleText6, Route12AfterBattleText6 Route12TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_12_TRAINER_6, 1 - db ($1 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_12_TRAINER_6, 1 - dw Route12BattleText7 ; TextBeforeBattle - dw Route12AfterBattleText7 ; TextAfterBattle - dw Route12EndBattleText7 ; TextEndBattle - dw Route12EndBattleText7 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_12_TRAINER_6, 1, 1, Route12BattleText7, Route12EndBattleText7, Route12AfterBattleText7 + db -1 ; end Route12Text1: - TX_FAR _Route12Text1 - db "@" + text_far _Route12Text1 + text_end Route12Text13: - TX_FAR _Route12Text13 - db "@" + text_far _Route12Text13 + text_end Route12Text14: - TX_FAR _Route12Text14 - db "@" + text_far _Route12Text14 + text_end Route12Text2: - TX_ASM + text_asm ld hl, Route12TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route12BattleText1: - TX_FAR _Route12BattleText1 - db "@" + text_far _Route12BattleText1 + text_end Route12EndBattleText1: - TX_FAR _Route12EndBattleText1 - db "@" + text_far _Route12EndBattleText1 + text_end Route12AfterBattleText1: - TX_FAR _Route12AfterBattleText1 - db "@" + text_far _Route12AfterBattleText1 + text_end Route12Text3: - TX_ASM + text_asm ld hl, Route12TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route12BattleText2: - TX_FAR _Route12BattleText2 - db "@" + text_far _Route12BattleText2 + text_end Route12EndBattleText2: - TX_FAR _Route12EndBattleText2 - db "@" + text_far _Route12EndBattleText2 + text_end Route12AfterBattleText2: - TX_FAR _Route12AfterBattleText2 - db "@" + text_far _Route12AfterBattleText2 + text_end Route12Text4: - TX_ASM + text_asm ld hl, Route12TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route12BattleText3: - TX_FAR _Route12BattleText3 - db "@" + text_far _Route12BattleText3 + text_end Route12EndBattleText3: - TX_FAR _Route12EndBattleText3 - db "@" + text_far _Route12EndBattleText3 + text_end Route12AfterBattleText3: - TX_FAR _Route12AfterBattleText3 - db "@" + text_far _Route12AfterBattleText3 + text_end Route12Text5: - TX_ASM + text_asm ld hl, Route12TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route12BattleText4: - TX_FAR _Route12BattleText4 - db "@" + text_far _Route12BattleText4 + text_end Route12EndBattleText4: - TX_FAR _Route12EndBattleText4 - db "@" + text_far _Route12EndBattleText4 + text_end Route12AfterBattleText4: - TX_FAR _Route12AfterBattleText4 - db "@" + text_far _Route12AfterBattleText4 + text_end Route12Text6: - TX_ASM + text_asm ld hl, Route12TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route12BattleText5: - TX_FAR _Route12BattleText5 - db "@" + text_far _Route12BattleText5 + text_end Route12EndBattleText5: - TX_FAR _Route12EndBattleText5 - db "@" + text_far _Route12EndBattleText5 + text_end Route12AfterBattleText5: - TX_FAR _Route12AfterBattleText5 - db "@" + text_far _Route12AfterBattleText5 + text_end Route12Text7: - TX_ASM + text_asm ld hl, Route12TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route12BattleText6: - TX_FAR _Route12BattleText6 - db "@" + text_far _Route12BattleText6 + text_end Route12EndBattleText6: - TX_FAR _Route12EndBattleText6 - db "@" + text_far _Route12EndBattleText6 + text_end Route12AfterBattleText6: - TX_FAR _Route12AfterBattleText6 - db "@" + text_far _Route12AfterBattleText6 + text_end Route12Text8: - TX_ASM + text_asm ld hl, Route12TrainerHeader6 call TalkToTrainer jp TextScriptEnd Route12BattleText7: - TX_FAR _Route12BattleText7 - db "@" + text_far _Route12BattleText7 + text_end Route12EndBattleText7: - TX_FAR _Route12EndBattleText7 - db "@" + text_far _Route12EndBattleText7 + text_end Route12AfterBattleText7: - TX_FAR _Route12AfterBattleText7 - db "@" + text_far _Route12AfterBattleText7 + text_end Route12Text11: - TX_FAR _Route12Text11 - db "@" + text_far _Route12Text11 + text_end Route12Text12: - TX_FAR _Route12Text12 - db "@" + text_far _Route12Text12 + text_end diff --git a/scripts/Route12Gate1F.asm b/scripts/Route12Gate1F.asm index 52d427ee..72f2dfbf 100755 --- a/scripts/Route12Gate1F.asm +++ b/scripts/Route12Gate1F.asm @@ -5,5 +5,5 @@ Route12Gate1F_TextPointers: dw Route12GateText1 Route12GateText1: - TX_FAR _Route12GateText1 - db "@" + text_far _Route12GateText1 + text_end diff --git a/scripts/Route12Gate2F.asm b/scripts/Route12Gate2F.asm index 4fe120e8..2174fba8 100755 --- a/scripts/Route12Gate2F.asm +++ b/scripts/Route12Gate2F.asm @@ -7,68 +7,68 @@ Route12Gate2F_TextPointers: dw Route12GateUpstairsText3 Route12GateUpstairsText1: - TX_ASM + text_asm CheckEvent EVENT_GOT_TM39, 1 - jr c, .asm_0ad3c + jr c, .got_item ld hl, TM39PreReceiveText call PrintText - lb bc, TM_39, 1 + lb bc, TM_SWIFT, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedTM39Text call PrintText SetEvent EVENT_GOT_TM39 - jr .asm_4ba56 -.BagFull + jr .done +.bag_full ld hl, TM39NoRoomText call PrintText - jr .asm_4ba56 -.asm_0ad3c + jr .done +.got_item ld hl, TM39ExplanationText call PrintText -.asm_4ba56 +.done jp TextScriptEnd TM39PreReceiveText: - TX_FAR _TM39PreReceiveText - db "@" + text_far _TM39PreReceiveText + text_end ReceivedTM39Text: - TX_FAR _ReceivedTM39Text - TX_SFX_ITEM_1 - db "@" + text_far _ReceivedTM39Text + sound_get_item_1 + text_end TM39ExplanationText: - TX_FAR _TM39ExplanationText - db "@" + text_far _TM39ExplanationText + text_end TM39NoRoomText: - TX_FAR _TM39NoRoomText - db "@" + text_far _TM39NoRoomText + text_end Route12GateUpstairsText2: - TX_ASM + text_asm ld hl, Route12GateUpstairsText_495b8 jp GateUpstairsScript_PrintIfFacingUp Route12GateUpstairsText_495b8: - TX_FAR _Route12GateUpstairsText_495b8 - db "@" + text_far _Route12GateUpstairsText_495b8 + text_end Route12GateUpstairsText3: - TX_ASM + text_asm ld hl, Route12GateUpstairsText_495c4 jp GateUpstairsScript_PrintIfFacingUp Route12GateUpstairsText_495c4: - TX_FAR _Route12GateUpstairsText_495c4 - db "@" + text_far _Route12GateUpstairsText_495c4 + text_end GateUpstairsScript_PrintIfFacingUp: ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP jr z, .up - ld a, $1 + ld a, TRUE jr .done .up call PrintText diff --git a/scripts/Route12SuperRodHouse.asm b/scripts/Route12SuperRodHouse.asm index de8ed8f0..fba5426e 100755 --- a/scripts/Route12SuperRodHouse.asm +++ b/scripts/Route12SuperRodHouse.asm @@ -5,53 +5,53 @@ Route12SuperRodHouse_TextPointers: dw Route12HouseText1 Route12HouseText1: - TX_ASM + text_asm ld a, [wd728] - bit 5, a - jr nz, .asm_b4cad + bit 5, a ; received super rod? + jr nz, .got_item ld hl, Route12HouseText_564c0 call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_a2d76 + jr nz, .refused lb bc, SUPER_ROD, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, wd728 - set 5, [hl] + set 5, [hl] ; received super rod ld hl, Route12HouseText_564c5 - jr .asm_df984 -.BagFull + jr .done +.bag_full ld hl, Route12HouseText_564d9 - jr .asm_df984 -.asm_a2d76 + jr .done +.refused ld hl, Route12HouseText_564cf - jr .asm_df984 -.asm_b4cad + jr .done +.got_item ld hl, Route12HouseText_564d4 -.asm_df984 +.done call PrintText jp TextScriptEnd Route12HouseText_564c0: - TX_FAR _Route12HouseText_564c0 - db "@" + text_far _Route12HouseText_564c0 + text_end Route12HouseText_564c5: - TX_FAR _Route12HouseText_564c5 - TX_SFX_ITEM_1 - TX_FAR _Route12HouseText_564ca - db "@" + text_far _Route12HouseText_564c5 + sound_get_item_1 + text_far _Route12HouseText_564ca + text_end Route12HouseText_564cf: - TX_FAR _Route12HouseText_564cf - db "@" + text_far _Route12HouseText_564cf + text_end Route12HouseText_564d4: - TX_FAR _Route12HouseText_564d4 - db "@" + text_far _Route12HouseText_564d4 + text_end Route12HouseText_564d9: - TX_FAR _Route12HouseText_564d9 - db "@" + text_far _Route12HouseText_564d9 + text_end diff --git a/scripts/Route13.asm b/scripts/Route13.asm index 8f92147e..c01ed514 100755 --- a/scripts/Route13.asm +++ b/scripts/Route13.asm @@ -28,285 +28,215 @@ Route13_TextPointers: dw Route13Text13 Route13TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_0 - dw Route13BattleText2 ; TextBeforeBattle - dw Route13AfterBattleText2 ; TextAfterBattle - dw Route13EndBattleText2 ; TextEndBattle - dw Route13EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_13_TRAINER_0, 2, Route13BattleText2, Route13EndBattleText2, Route13AfterBattleText2 Route13TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_1 - dw Route13BattleText3 ; TextBeforeBattle - dw Route13AfterBattleText3 ; TextAfterBattle - dw Route13EndBattleText3 ; TextEndBattle - dw Route13EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_13_TRAINER_1, 2, Route13BattleText3, Route13EndBattleText3, Route13AfterBattleText3 Route13TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_2 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_2 - dw Route13BattleText4 ; TextBeforeBattle - dw Route13AfterBattleText4 ; TextAfterBattle - dw Route13EndBattleText4 ; TextEndBattle - dw Route13EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_13_TRAINER_2, 2, Route13BattleText4, Route13EndBattleText4, Route13AfterBattleText4 Route13TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_3 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_3 - dw Route13BattleText5 ; TextBeforeBattle - dw Route13AfterBattleText5 ; TextAfterBattle - dw Route13EndBattleText5 ; TextEndBattle - dw Route13EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_13_TRAINER_3, 2, Route13BattleText5, Route13EndBattleText5, Route13AfterBattleText5 Route13TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_4 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_4 - dw Route13BattleText6 ; TextBeforeBattle - dw Route13AfterBattleText6 ; TextAfterBattle - dw Route13EndBattleText6 ; TextEndBattle - dw Route13EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_13_TRAINER_4, 4, Route13BattleText6, Route13EndBattleText6, Route13AfterBattleText6 Route13TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_5 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_5 - dw Route13BattleText7 ; TextBeforeBattle - dw Route13AfterBattleText7 ; TextAfterBattle - dw Route13EndBattleText7 ; TextEndBattle - dw Route13EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_13_TRAINER_5, 2, Route13BattleText7, Route13EndBattleText7, Route13AfterBattleText7 Route13TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_6 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_6 - dw Route13BattleText8 ; TextBeforeBattle - dw Route13AfterBattleText8 ; TextAfterBattle - dw Route13EndBattleText8 ; TextEndBattle - dw Route13EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_13_TRAINER_6, 4, Route13BattleText8, Route13EndBattleText8, Route13AfterBattleText8 Route13TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_7, 1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_7, 1 - dw Route13BattleText9 ; TextBeforeBattle - dw Route13AfterBattleText9 ; TextAfterBattle - dw Route13EndBattleText9 ; TextEndBattle - dw Route13EndBattleText9 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_13_TRAINER_7, 1, 2, Route13BattleText9, Route13EndBattleText9, Route13AfterBattleText9 Route13TrainerHeader8: - dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_8, 1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_8, 1 - dw Route13BattleText10 ; TextBeforeBattle - dw Route13AfterBattleText10 ; TextAfterBattle - dw Route13EndBattleText10 ; TextEndBattle - dw Route13EndBattleText10 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_13_TRAINER_8, 1, 2, Route13BattleText10, Route13EndBattleText10, Route13AfterBattleText10 Route13TrainerHeader9: - dbEventFlagBit EVENT_BEAT_ROUTE_13_TRAINER_9, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_13_TRAINER_9, 1 - dw Route13BattleText11 ; TextBeforeBattle - dw Route13AfterBattleText11 ; TextAfterBattle - dw Route13EndBattleText11 ; TextEndBattle - dw Route13EndBattleText11 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_13_TRAINER_9, 1, 4, Route13BattleText11, Route13EndBattleText11, Route13AfterBattleText11 + db -1 ; end Route13Text1: - TX_ASM + text_asm ld hl, Route13TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route13BattleText2: - TX_FAR _Route13BattleText2 - db "@" + text_far _Route13BattleText2 + text_end Route13EndBattleText2: - TX_FAR _Route13EndBattleText2 - db "@" + text_far _Route13EndBattleText2 + text_end Route13AfterBattleText2: - TX_FAR _Route13AfterBattleText2 - db "@" + text_far _Route13AfterBattleText2 + text_end Route13Text2: - TX_ASM + text_asm ld hl, Route13TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route13BattleText3: - TX_FAR _Route13BattleText3 - db "@" + text_far _Route13BattleText3 + text_end Route13EndBattleText3: - TX_FAR _Route13EndBattleText3 - db "@" + text_far _Route13EndBattleText3 + text_end Route13AfterBattleText3: - TX_FAR _Route13AfterBattleText3 - db "@" + text_far _Route13AfterBattleText3 + text_end Route13Text3: - TX_ASM + text_asm ld hl, Route13TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route13BattleText4: - TX_FAR _Route13BattleText4 - db "@" + text_far _Route13BattleText4 + text_end Route13EndBattleText4: - TX_FAR _Route13EndBattleText4 - db "@" + text_far _Route13EndBattleText4 + text_end Route13AfterBattleText4: - TX_FAR _Route13AfterBattleText4 - db "@" + text_far _Route13AfterBattleText4 + text_end Route13Text4: - TX_ASM + text_asm ld hl, Route13TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route13BattleText5: - TX_FAR _Route13BattleText5 - db "@" + text_far _Route13BattleText5 + text_end Route13EndBattleText5: - TX_FAR _Route13EndBattleText5 - db "@" + text_far _Route13EndBattleText5 + text_end Route13AfterBattleText5: - TX_FAR _Route13AfterBattleText5 - db "@" + text_far _Route13AfterBattleText5 + text_end Route13Text5: - TX_ASM + text_asm ld hl, Route13TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route13BattleText6: - TX_FAR _Route13BattleText6 - db "@" + text_far _Route13BattleText6 + text_end Route13EndBattleText6: - TX_FAR _Route13EndBattleText6 - db "@" + text_far _Route13EndBattleText6 + text_end Route13AfterBattleText6: - TX_FAR _Route13AfterBattleText6 - db "@" + text_far _Route13AfterBattleText6 + text_end Route13Text6: - TX_ASM + text_asm ld hl, Route13TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route13BattleText7: - TX_FAR _Route13BattleText7 - db "@" + text_far _Route13BattleText7 + text_end Route13EndBattleText7: - TX_FAR _Route13EndBattleText7 - db "@" + text_far _Route13EndBattleText7 + text_end Route13AfterBattleText7: - TX_FAR _Route13AfterBattleText7 - db "@" + text_far _Route13AfterBattleText7 + text_end Route13Text7: - TX_ASM + text_asm ld hl, Route13TrainerHeader6 call TalkToTrainer jp TextScriptEnd Route13BattleText8: - TX_FAR _Route13BattleText8 - db "@" + text_far _Route13BattleText8 + text_end Route13EndBattleText8: - TX_FAR _Route13EndBattleText8 - db "@" + text_far _Route13EndBattleText8 + text_end Route13AfterBattleText8: - TX_FAR _Route13AfterBattleText8 - db "@" + text_far _Route13AfterBattleText8 + text_end Route13Text8: - TX_ASM + text_asm ld hl, Route13TrainerHeader7 call TalkToTrainer jp TextScriptEnd Route13BattleText9: - TX_FAR _Route13BattleText9 - db "@" + text_far _Route13BattleText9 + text_end Route13EndBattleText9: - TX_FAR _Route13EndBattleText9 - db "@" + text_far _Route13EndBattleText9 + text_end Route13AfterBattleText9: - TX_FAR _Route13AfterBattleText9 - db "@" + text_far _Route13AfterBattleText9 + text_end Route13Text9: - TX_ASM + text_asm ld hl, Route13TrainerHeader8 call TalkToTrainer jp TextScriptEnd Route13BattleText10: - TX_FAR _Route13BattleText10 - db "@" + text_far _Route13BattleText10 + text_end Route13EndBattleText10: - TX_FAR _Route13EndBattleText10 - db "@" + text_far _Route13EndBattleText10 + text_end Route13AfterBattleText10: - TX_FAR _Route13AfterBattleText10 - db "@" + text_far _Route13AfterBattleText10 + text_end Route13Text10: - TX_ASM + text_asm ld hl, Route13TrainerHeader9 call TalkToTrainer jp TextScriptEnd Route13BattleText11: - TX_FAR _Route13BattleText11 - db "@" + text_far _Route13BattleText11 + text_end Route13EndBattleText11: - TX_FAR _Route13EndBattleText11 - db "@" + text_far _Route13EndBattleText11 + text_end Route13AfterBattleText11: - TX_FAR _Route13AfterBattleText11 - db "@" + text_far _Route13AfterBattleText11 + text_end Route13Text11: - TX_FAR _Route13Text11 - db "@" + text_far _Route13Text11 + text_end Route13Text12: - TX_FAR _Route13Text12 - db "@" + text_far _Route13Text12 + text_end Route13Text13: - TX_FAR _Route13Text13 - db "@" + text_far _Route13Text13 + text_end diff --git a/scripts/Route14.asm b/scripts/Route14.asm index fdc84d74..988fbe32 100755 --- a/scripts/Route14.asm +++ b/scripts/Route14.asm @@ -26,277 +26,207 @@ Route14_TextPointers: dw Route14Text11 Route14TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_0 - dw Route14BattleText1 ; TextBeforeBattle - dw Route14AfterBattleText1 ; TextAfterBattle - dw Route14EndBattleText1 ; TextEndBattle - dw Route14EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_14_TRAINER_0, 2, Route14BattleText1, Route14EndBattleText1, Route14AfterBattleText1 Route14TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_1 - dw Route14BattleText2 ; TextBeforeBattle - dw Route14AfterBattleText2 ; TextAfterBattle - dw Route14EndBattleText2 ; TextEndBattle - dw Route14EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_14_TRAINER_1, 2, Route14BattleText2, Route14EndBattleText2, Route14AfterBattleText2 Route14TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_2 - dw Route14BattleText3 ; TextBeforeBattle - dw Route14AfterBattleText3 ; TextAfterBattle - dw Route14EndBattleText3 ; TextEndBattle - dw Route14EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_14_TRAINER_2, 4, Route14BattleText3, Route14EndBattleText3, Route14AfterBattleText3 Route14TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_3 - dw Route14BattleText4 ; TextBeforeBattle - dw Route14AfterBattleText4 ; TextAfterBattle - dw Route14EndBattleText4 ; TextEndBattle - dw Route14EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_14_TRAINER_3, 3, Route14BattleText4, Route14EndBattleText4, Route14AfterBattleText4 Route14TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_4 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_4 - dw Route14BattleText5 ; TextBeforeBattle - dw Route14AfterBattleText5 ; TextAfterBattle - dw Route14EndBattleText5 ; TextEndBattle - dw Route14EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_14_TRAINER_4, 3, Route14BattleText5, Route14EndBattleText5, Route14AfterBattleText5 Route14TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_5 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_5 - dw Route14BattleText6 ; TextBeforeBattle - dw Route14AfterBattleText6 ; TextAfterBattle - dw Route14EndBattleText6 ; TextEndBattle - dw Route14EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_14_TRAINER_5, 4, Route14BattleText6, Route14EndBattleText6, Route14AfterBattleText6 Route14TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_6 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_6 - dw Route14BattleText7 ; TextBeforeBattle - dw Route14AfterBattleText7 ; TextAfterBattle - dw Route14EndBattleText7 ; TextEndBattle - dw Route14EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_14_TRAINER_6, 4, Route14BattleText7, Route14EndBattleText7, Route14AfterBattleText7 Route14TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_7, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_7, 1 - dw Route14BattleText8 ; TextBeforeBattle - dw Route14AfterBattleText8 ; TextAfterBattle - dw Route14EndBattleText8 ; TextEndBattle - dw Route14EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_14_TRAINER_7, 1, 4, Route14BattleText8, Route14EndBattleText8, Route14AfterBattleText8 Route14TrainerHeader8: - dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_8, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_8, 1 - dw Route14BattleText9 ; TextBeforeBattle - dw Route14AfterBattleText9 ; TextAfterBattle - dw Route14EndBattleText9 ; TextEndBattle - dw Route14EndBattleText9 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_14_TRAINER_8, 1, 3, Route14BattleText9, Route14EndBattleText9, Route14AfterBattleText9 Route14TrainerHeader9: - dbEventFlagBit EVENT_BEAT_ROUTE_14_TRAINER_9, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_14_TRAINER_9, 1 - dw Route14BattleText10 ; TextBeforeBattle - dw Route14AfterBattleText10 ; TextAfterBattle - dw Route14EndBattleText10 ; TextEndBattle - dw Route14EndBattleText10 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_14_TRAINER_9, 1, 4, Route14BattleText10, Route14EndBattleText10, Route14AfterBattleText10 + db -1 ; end Route14Text1: - TX_ASM + text_asm ld hl, Route14TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route14BattleText1: - TX_FAR _Route14BattleText1 - db "@" + text_far _Route14BattleText1 + text_end Route14EndBattleText1: - TX_FAR _Route14EndBattleText1 - db "@" + text_far _Route14EndBattleText1 + text_end Route14AfterBattleText1: - TX_FAR _Route14AfterBattleText1 - db "@" + text_far _Route14AfterBattleText1 + text_end Route14Text2: - TX_ASM + text_asm ld hl, Route14TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route14BattleText2: - TX_FAR _Route14BattleText2 - db "@" + text_far _Route14BattleText2 + text_end Route14EndBattleText2: - TX_FAR _Route14EndBattleText2 - db "@" + text_far _Route14EndBattleText2 + text_end Route14AfterBattleText2: - TX_FAR _Route14AfterBattleText2 - db "@" + text_far _Route14AfterBattleText2 + text_end Route14Text3: - TX_ASM + text_asm ld hl, Route14TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route14BattleText3: - TX_FAR _Route14BattleText3 - db "@" + text_far _Route14BattleText3 + text_end Route14EndBattleText3: - TX_FAR _Route14EndBattleText3 - db "@" + text_far _Route14EndBattleText3 + text_end Route14AfterBattleText3: - TX_FAR _Route14AfterBattleText3 - db "@" + text_far _Route14AfterBattleText3 + text_end Route14Text4: - TX_ASM + text_asm ld hl, Route14TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route14BattleText4: - TX_FAR _Route14BattleText4 - db "@" + text_far _Route14BattleText4 + text_end Route14EndBattleText4: - TX_FAR _Route14EndBattleText4 - db "@" + text_far _Route14EndBattleText4 + text_end Route14AfterBattleText4: - TX_FAR _Route14AfterBattleText4 - db "@" + text_far _Route14AfterBattleText4 + text_end Route14Text5: - TX_ASM + text_asm ld hl, Route14TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route14BattleText5: - TX_FAR _Route14BattleText5 - db "@" + text_far _Route14BattleText5 + text_end Route14EndBattleText5: - TX_FAR _Route14EndBattleText5 - db "@" + text_far _Route14EndBattleText5 + text_end Route14AfterBattleText5: - TX_FAR _Route14AfterBattleText5 - db "@" + text_far _Route14AfterBattleText5 + text_end Route14Text6: - TX_ASM + text_asm ld hl, Route14TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route14BattleText6: - TX_FAR _Route14BattleText6 - db "@" + text_far _Route14BattleText6 + text_end Route14EndBattleText6: - TX_FAR _Route14EndBattleText6 - db "@" + text_far _Route14EndBattleText6 + text_end Route14AfterBattleText6: - TX_FAR _Route14AfterBattleText6 - db "@" + text_far _Route14AfterBattleText6 + text_end Route14Text7: - TX_ASM + text_asm ld hl, Route14TrainerHeader6 call TalkToTrainer jp TextScriptEnd Route14BattleText7: - TX_FAR _Route14BattleText7 - db "@" + text_far _Route14BattleText7 + text_end Route14EndBattleText7: - TX_FAR _Route14EndBattleText7 - db "@" + text_far _Route14EndBattleText7 + text_end Route14AfterBattleText7: - TX_FAR _Route14AfterBattleText7 - db "@" + text_far _Route14AfterBattleText7 + text_end Route14Text8: - TX_ASM + text_asm ld hl, Route14TrainerHeader7 call TalkToTrainer jp TextScriptEnd Route14BattleText8: - TX_FAR _Route14BattleText8 - db "@" + text_far _Route14BattleText8 + text_end Route14EndBattleText8: - TX_FAR _Route14EndBattleText8 - db "@" + text_far _Route14EndBattleText8 + text_end Route14AfterBattleText8: - TX_FAR _Route14AfterBattleText8 - db "@" + text_far _Route14AfterBattleText8 + text_end Route14Text9: - TX_ASM + text_asm ld hl, Route14TrainerHeader8 call TalkToTrainer jp TextScriptEnd Route14BattleText9: - TX_FAR _Route14BattleText9 - db "@" + text_far _Route14BattleText9 + text_end Route14EndBattleText9: - TX_FAR _Route14EndBattleText9 - db "@" + text_far _Route14EndBattleText9 + text_end Route14AfterBattleText9: - TX_FAR _Route14AfterBattleText9 - db "@" + text_far _Route14AfterBattleText9 + text_end Route14Text10: - TX_ASM + text_asm ld hl, Route14TrainerHeader9 call TalkToTrainer jp TextScriptEnd Route14BattleText10: - TX_FAR _Route14BattleText10 - db "@" + text_far _Route14BattleText10 + text_end Route14EndBattleText10: - TX_FAR _Route14EndBattleText10 - db "@" + text_far _Route14EndBattleText10 + text_end Route14AfterBattleText10: - TX_FAR _Route14AfterBattleText10 - db "@" + text_far _Route14AfterBattleText10 + text_end Route14Text11: - TX_FAR _Route14Text11 - db "@" + text_far _Route14Text11 + text_end diff --git a/scripts/Route15.asm b/scripts/Route15.asm index d973eb9c..3eed25d5 100755 --- a/scripts/Route15.asm +++ b/scripts/Route15.asm @@ -27,269 +27,199 @@ Route15_TextPointers: dw Route15Text12 Route15TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_0 - dw Route15BattleText1 ; TextBeforeBattle - dw Route15AfterBattleText1 ; TextAfterBattle - dw Route15EndBattleText1 ; TextEndBattle - dw Route15EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_15_TRAINER_0, 2, Route15BattleText1, Route15EndBattleText1, Route15AfterBattleText1 Route15TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_1 - dw Route15BattleText2 ; TextBeforeBattle - dw Route15AfterBattleText2 ; TextAfterBattle - dw Route15EndBattleText2 ; TextEndBattle - dw Route15EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_15_TRAINER_1, 3, Route15BattleText2, Route15EndBattleText2, Route15AfterBattleText2 Route15TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_2 - dw Route15BattleText3 ; TextBeforeBattle - dw Route15AfterBattleText3 ; TextAfterBattle - dw Route15EndBattleText3 ; TextEndBattle - dw Route15EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_15_TRAINER_2, 3, Route15BattleText3, Route15EndBattleText3, Route15AfterBattleText3 Route15TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_3 - dw Route15BattleText4 ; TextBeforeBattle - dw Route15AfterBattleText4 ; TextAfterBattle - dw Route15EndBattleText4 ; TextEndBattle - dw Route15EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_15_TRAINER_3, 3, Route15BattleText4, Route15EndBattleText4, Route15AfterBattleText4 Route15TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_4 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_4 - dw Route15BattleText5 ; TextBeforeBattle - dw Route15AfterBattleText5 ; TextAfterBattle - dw Route15EndBattleText5 ; TextEndBattle - dw Route15EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_15_TRAINER_4, 2, Route15BattleText5, Route15EndBattleText5, Route15AfterBattleText5 Route15TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_5 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_5 - dw Route15BattleText6 ; TextBeforeBattle - dw Route15AfterBattleText6 ; TextAfterBattle - dw Route15EndBattleText6 ; TextEndBattle - dw Route15EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_15_TRAINER_5, 3, Route15BattleText6, Route15EndBattleText6, Route15AfterBattleText6 Route15TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_6 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_6 - dw Route15BattleText7 ; TextBeforeBattle - dw Route15AfterBattleText7 ; TextAfterBattle - dw Route15EndBattleText7 ; TextEndBattle - dw Route15EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_15_TRAINER_6, 3, Route15BattleText7, Route15EndBattleText7, Route15AfterBattleText7 Route15TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_7, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_7, 1 - dw Route15BattleText8 ; TextBeforeBattle - dw Route15AfterBattleText8 ; TextAfterBattle - dw Route15EndBattleText8 ; TextEndBattle - dw Route15EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_15_TRAINER_7, 1, 3, Route15BattleText8, Route15EndBattleText8, Route15AfterBattleText8 Route15TrainerHeader8: - dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_8, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_8, 1 - dw Route15BattleText9 ; TextBeforeBattle - dw Route15AfterBattleText9 ; TextAfterBattle - dw Route15EndBattleText9 ; TextEndBattle - dw Route15EndBattleText9 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_15_TRAINER_8, 1, 3, Route15BattleText9, Route15EndBattleText9, Route15AfterBattleText9 Route15TrainerHeader9: - dbEventFlagBit EVENT_BEAT_ROUTE_15_TRAINER_9, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_15_TRAINER_9, 1 - dw Route15BattleText10 ; TextBeforeBattle - dw Route15AfterBattleText10 ; TextAfterBattle - dw Route15EndBattleText10 ; TextEndBattle - dw Route15EndBattleText10 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_15_TRAINER_9, 1, 3, Route15BattleText10, Route15EndBattleText10, Route15AfterBattleText10 + db -1 ; end Route15Text1: - TX_ASM + text_asm ld hl, Route15TrainerHeader0 jr Route15TalkToTrainer Route15Text2: - TX_ASM + text_asm ld hl, Route15TrainerHeader1 jr Route15TalkToTrainer Route15Text3: - TX_ASM + text_asm ld hl, Route15TrainerHeader2 jr Route15TalkToTrainer Route15Text4: - TX_ASM + text_asm ld hl, Route15TrainerHeader3 jr Route15TalkToTrainer Route15Text5: - TX_ASM + text_asm ld hl, Route15TrainerHeader4 jr Route15TalkToTrainer Route15Text6: - TX_ASM + text_asm ld hl, Route15TrainerHeader5 jr Route15TalkToTrainer Route15Text7: - TX_ASM + text_asm ld hl, Route15TrainerHeader6 jr Route15TalkToTrainer Route15Text8: - TX_ASM + text_asm ld hl, Route15TrainerHeader7 jr Route15TalkToTrainer Route15Text9: - TX_ASM + text_asm ld hl, Route15TrainerHeader8 jr Route15TalkToTrainer Route15Text10: - TX_ASM + text_asm ld hl, Route15TrainerHeader9 Route15TalkToTrainer: call TalkToTrainer jp TextScriptEnd Route15BattleText1: - TX_FAR _Route15BattleText1 - db "@" + text_far _Route15BattleText1 + text_end Route15EndBattleText1: - TX_FAR _Route15EndBattleText1 - db "@" + text_far _Route15EndBattleText1 + text_end Route15AfterBattleText1: - TX_FAR _Route15AfterBattleText1 - db "@" + text_far _Route15AfterBattleText1 + text_end Route15BattleText2: - TX_FAR _Route15BattleText2 - db "@" + text_far _Route15BattleText2 + text_end Route15EndBattleText2: - TX_FAR _Route15EndBattleText2 - db "@" + text_far _Route15EndBattleText2 + text_end Route15AfterBattleText2: - TX_FAR _Route15AfterBattleText2 - db "@" + text_far _Route15AfterBattleText2 + text_end Route15BattleText3: - TX_FAR _Route15BattleText3 - db "@" + text_far _Route15BattleText3 + text_end Route15EndBattleText3: - TX_FAR _Route15EndBattleText3 - db "@" + text_far _Route15EndBattleText3 + text_end Route15AfterBattleText3: - TX_FAR _Route15AfterBattleText3 - db "@" + text_far _Route15AfterBattleText3 + text_end Route15BattleText4: - TX_FAR _Route15BattleText4 - db "@" + text_far _Route15BattleText4 + text_end Route15EndBattleText4: - TX_FAR _Route15EndBattleText4 - db "@" + text_far _Route15EndBattleText4 + text_end Route15AfterBattleText4: - TX_FAR _Route15AfterBattleText4 - db "@" + text_far _Route15AfterBattleText4 + text_end Route15BattleText5: - TX_FAR _Route15BattleText5 - db "@" + text_far _Route15BattleText5 + text_end Route15EndBattleText5: - TX_FAR _Route15EndBattleText5 - db "@" + text_far _Route15EndBattleText5 + text_end Route15AfterBattleText5: - TX_FAR _Route15AfterBattleText5 - db "@" + text_far _Route15AfterBattleText5 + text_end Route15BattleText6: - TX_FAR _Route15BattleText6 - db "@" + text_far _Route15BattleText6 + text_end Route15EndBattleText6: - TX_FAR _Route15EndBattleText6 - db "@" + text_far _Route15EndBattleText6 + text_end Route15AfterBattleText6: - TX_FAR _Route15AfterBattleText6 - db "@" + text_far _Route15AfterBattleText6 + text_end Route15BattleText7: - TX_FAR _Route15BattleText7 - db "@" + text_far _Route15BattleText7 + text_end Route15EndBattleText7: - TX_FAR _Route15EndBattleText7 - db "@" + text_far _Route15EndBattleText7 + text_end Route15AfterBattleText7: - TX_FAR _Route15AfterBattleText7 - db "@" + text_far _Route15AfterBattleText7 + text_end Route15BattleText8: - TX_FAR _Route15BattleText8 - db "@" + text_far _Route15BattleText8 + text_end Route15EndBattleText8: - TX_FAR _Route15EndBattleText8 - db "@" + text_far _Route15EndBattleText8 + text_end Route15AfterBattleText8: - TX_FAR _Route15AfterBattleText8 - db "@" + text_far _Route15AfterBattleText8 + text_end Route15BattleText9: - TX_FAR _Route15BattleText9 - db "@" + text_far _Route15BattleText9 + text_end Route15EndBattleText9: - TX_FAR _Route15EndBattleText9 - db "@" + text_far _Route15EndBattleText9 + text_end Route15AfterBattleText9: - TX_FAR _Route15AfterBattleText9 - db "@" + text_far _Route15AfterBattleText9 + text_end Route15BattleText10: - TX_FAR _Route15BattleText10 - db "@" + text_far _Route15BattleText10 + text_end Route15EndBattleText10: - TX_FAR _Route15EndBattleText10 - db "@" + text_far _Route15EndBattleText10 + text_end Route15AfterBattleText10: - TX_FAR _Route15AfterBattleText10 - db "@" + text_far _Route15AfterBattleText10 + text_end Route15Text12: - TX_FAR _Route15Text12 - db "@" + text_far _Route15Text12 + text_end diff --git a/scripts/Route15Gate1F.asm b/scripts/Route15Gate1F.asm index 910eb2a5..dfbce9d4 100755 --- a/scripts/Route15Gate1F.asm +++ b/scripts/Route15Gate1F.asm @@ -5,5 +5,5 @@ Route15Gate1F_TextPointers: dw Route15GateText1 Route15GateText1: - TX_FAR _Route15GateText1 - db "@" + text_far _Route15GateText1 + text_end diff --git a/scripts/Route15Gate2F.asm b/scripts/Route15Gate2F.asm index 83763762..1b85e34e 100755 --- a/scripts/Route15Gate2F.asm +++ b/scripts/Route15Gate2F.asm @@ -6,13 +6,13 @@ Route15Gate2F_TextPointers: dw Route15GateUpstairsText2 Route15GateUpstairsText1: - TX_ASM + text_asm CheckEvent EVENT_GOT_EXP_ALL - jr nz, .asm_49683 - ld a, 50 ; pokemon needed - ld [hOaksAideRequirement], a - ld a, EXP_ALL ; oak's aide reward - ld [hOaksAideRewardItem], a + jr nz, .got_item + ld a, 50 + ldh [hOaksAideRequirement], a + ld a, EXP_ALL + ldh [hOaksAideRewardItem], a ld [wd11e], a call GetItemName ld hl, wcd6d @@ -20,25 +20,25 @@ Route15GateUpstairsText1: ld bc, ITEM_NAME_LENGTH call CopyData predef OaksAideScript - ld a, [hOaksAideResult] - cp $1 - jr nz, .asm_49689 + ldh a, [hOaksAideResult] + cp OAKS_AIDE_GOT_ITEM + jr nz, .no_item SetEvent EVENT_GOT_EXP_ALL -.asm_49683 +.got_item ld hl, Route15GateUpstairsText_4968c call PrintText -.asm_49689 +.no_item jp TextScriptEnd Route15GateUpstairsText_4968c: - TX_FAR _Route15GateUpstairsText_4968c - db "@" + text_far _Route15GateUpstairsText_4968c + text_end Route15GateUpstairsText2: - TX_ASM + text_asm ld hl, Route15GateUpstairsText_49698 jp GateUpstairsScript_PrintIfFacingUp Route15GateUpstairsText_49698: - TX_FAR _Route15GateUpstairsText_49698 - db "@" + text_far _Route15GateUpstairsText_49698 + text_end diff --git a/scripts/Route16.asm b/scripts/Route16.asm index 54f83380..e7b1eb9a 100755 --- a/scripts/Route16.asm +++ b/scripts/Route16.asm @@ -27,7 +27,7 @@ Route16Script0: ResetEventReuseHL EVENT_FIGHT_ROUTE16_SNORLAX jp z, CheckFightingMapTrainers ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, SNORLAX ld [wCurOpponent], a @@ -51,7 +51,7 @@ Route16Script3: cp $2 jr z, .asm_599a8 ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .asm_599a8 SetEvent EVENT_BEAT_ROUTE16_SNORLAX @@ -75,185 +75,143 @@ Route16_TextPointers: dw Route16Text11 Route16TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_0 - dw Route16BattleText1 ; TextBeforeBattle - dw Route16AfterBattleText1 ; TextAfterBattle - dw Route16EndBattleText1 ; TextEndBattle - dw Route16EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_16_TRAINER_0, 3, Route16BattleText1, Route16EndBattleText1, Route16AfterBattleText1 Route16TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_1 - dw Route16BattleText2 ; TextBeforeBattle - dw Route16AfterBattleText2 ; TextAfterBattle - dw Route16EndBattleText2 ; TextEndBattle - dw Route16EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_16_TRAINER_1, 2, Route16BattleText2, Route16EndBattleText2, Route16AfterBattleText2 Route16TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_2 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_2 - dw Route16BattleText3 ; TextBeforeBattle - dw Route16AfterBattleText3 ; TextAfterBattle - dw Route16EndBattleText3 ; TextEndBattle - dw Route16EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_16_TRAINER_2, 2, Route16BattleText3, Route16EndBattleText3, Route16AfterBattleText3 Route16TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_3 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_3 - dw Route16BattleText4 ; TextBeforeBattle - dw Route16AfterBattleText4 ; TextAfterBattle - dw Route16EndBattleText4 ; TextEndBattle - dw Route16EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_16_TRAINER_3, 2, Route16BattleText4, Route16EndBattleText4, Route16AfterBattleText4 Route16TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_4 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_4 - dw Route16BattleText5 ; TextBeforeBattle - dw Route16AfterBattleText5 ; TextAfterBattle - dw Route16EndBattleText5 ; TextEndBattle - dw Route16EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_16_TRAINER_4, 2, Route16BattleText5, Route16EndBattleText5, Route16AfterBattleText5 Route16TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_16_TRAINER_5 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_16_TRAINER_5 - dw Route16BattleText6 ; TextBeforeBattle - dw Route16AfterBattleText6 ; TextAfterBattle - dw Route16EndBattleText6 ; TextEndBattle - dw Route16EndBattleText6 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_16_TRAINER_5, 4, Route16BattleText6, Route16EndBattleText6, Route16AfterBattleText6 + db -1 ; end Route16Text1: - TX_ASM + text_asm ld hl, Route16TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route16BattleText1: - TX_FAR _Route16BattleText1 - db "@" + text_far _Route16BattleText1 + text_end Route16EndBattleText1: - TX_FAR _Route16EndBattleText1 - db "@" + text_far _Route16EndBattleText1 + text_end Route16AfterBattleText1: - TX_FAR _Route16AfterBattleText1 - db "@" + text_far _Route16AfterBattleText1 + text_end Route16Text2: - TX_ASM + text_asm ld hl, Route16TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route16BattleText2: - TX_FAR _Route16BattleText2 - db "@" + text_far _Route16BattleText2 + text_end Route16EndBattleText2: - TX_FAR _Route16EndBattleText2 - db "@" + text_far _Route16EndBattleText2 + text_end Route16AfterBattleText2: - TX_FAR _Route16AfterBattleText2 - db "@" + text_far _Route16AfterBattleText2 + text_end Route16Text3: - TX_ASM + text_asm ld hl, Route16TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route16BattleText3: - TX_FAR _Route16BattleText3 - db "@" + text_far _Route16BattleText3 + text_end Route16EndBattleText3: - TX_FAR _Route16EndBattleText3 - db "@" + text_far _Route16EndBattleText3 + text_end Route16AfterBattleText3: - TX_FAR _Route16AfterBattleText3 - db "@" + text_far _Route16AfterBattleText3 + text_end Route16Text4: - TX_ASM + text_asm ld hl, Route16TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route16BattleText4: - TX_FAR _Route16BattleText4 - db "@" + text_far _Route16BattleText4 + text_end Route16EndBattleText4: - TX_FAR _Route16EndBattleText4 - db "@" + text_far _Route16EndBattleText4 + text_end Route16AfterBattleText4: - TX_FAR _Route16AfterBattleText4 - db "@" + text_far _Route16AfterBattleText4 + text_end Route16Text5: - TX_ASM + text_asm ld hl, Route16TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route16BattleText5: - TX_FAR _Route16BattleText5 - db "@" + text_far _Route16BattleText5 + text_end Route16EndBattleText5: - TX_FAR _Route16EndBattleText5 - db "@" + text_far _Route16EndBattleText5 + text_end Route16AfterBattleText5: - TX_FAR _Route16AfterBattleText5 - db "@" + text_far _Route16AfterBattleText5 + text_end Route16Text6: - TX_ASM + text_asm ld hl, Route16TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route16BattleText6: - TX_FAR _Route16BattleText6 - db "@" + text_far _Route16BattleText6 + text_end Route16EndBattleText6: - TX_FAR _Route16EndBattleText6 - db "@" + text_far _Route16EndBattleText6 + text_end Route16AfterBattleText6: - TX_FAR _Route16AfterBattleText6 - db "@" + text_far _Route16AfterBattleText6 + text_end Route16Text7: - TX_FAR _Route16Text7 - db "@" + text_far _Route16Text7 + text_end Route16Text10: - TX_FAR _Route16Text10 - db "@" + text_far _Route16Text10 + text_end Route16Text11: - TX_FAR _Route16Text11 - db "@" + text_far _Route16Text11 + text_end Route16Text8: - TX_FAR _Route16Text8 - db "@" + text_far _Route16Text8 + text_end Route16Text9: - TX_FAR _Route16Text9 - db "@" + text_far _Route16Text9 + text_end diff --git a/scripts/Route16FlyHouse.asm b/scripts/Route16FlyHouse.asm index 1d74ac80..3bb34b75 100755 --- a/scripts/Route16FlyHouse.asm +++ b/scripts/Route16FlyHouse.asm @@ -6,43 +6,43 @@ Route16FlyHouse_TextPointers: dw Route16HouseText2 Route16HouseText1: - TX_ASM + text_asm CheckEvent EVENT_GOT_HM02 ld hl, HM02ExplanationText - jr nz, .asm_13616 + jr nz, .got_item ld hl, Route16HouseText3 call PrintText - lb bc, HM_02, 1 + lb bc, HM_FLY, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full SetEvent EVENT_GOT_HM02 ld hl, ReceivedHM02Text - jr .asm_13616 -.BagFull + jr .got_item +.bag_full ld hl, HM02NoRoomText -.asm_13616 +.got_item call PrintText jp TextScriptEnd Route16HouseText3: - TX_FAR _Route16HouseText3 - db "@" + text_far _Route16HouseText3 + text_end ReceivedHM02Text: - TX_FAR _ReceivedHM02Text - TX_SFX_KEY_ITEM - db "@" + text_far _ReceivedHM02Text + sound_get_key_item + text_end HM02ExplanationText: - TX_FAR _HM02ExplanationText - db "@" + text_far _HM02ExplanationText + text_end HM02NoRoomText: - TX_FAR _HM02NoRoomText - db "@" + text_far _HM02NoRoomText + text_end Route16HouseText2: - TX_ASM + text_asm ld hl, Route16HouseText_1e652 call PrintText ld a, FEAROW @@ -51,5 +51,5 @@ Route16HouseText2: jp TextScriptEnd Route16HouseText_1e652: - TX_FAR _Route16HouseText_1e652 - db "@" + text_far _Route16HouseText_1e652 + text_end diff --git a/scripts/Route16Gate1F.asm b/scripts/Route16Gate1F.asm index f814d209..e992fa44 100755 --- a/scripts/Route16Gate1F.asm +++ b/scripts/Route16Gate1F.asm @@ -19,10 +19,10 @@ Route16GateScript0: call ArePlayerCoordsInArray ret nc ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, [wCoordIndex] cp $1 jr z, .asm_4970e @@ -44,11 +44,11 @@ Route16GateScript0: ret CoordsData_49714: - db $07,$04 - db $08,$04 - db $09,$04 - db $0A,$04 - db $FF + dbmapcoord 4, 7 + dbmapcoord 4, 8 + dbmapcoord 4, 9 + dbmapcoord 4, 10 + db -1 ; end Route16GateScript1: ld a, [wSimulatedJoypadStatesIndex] @@ -59,7 +59,7 @@ Route16GateScript1: Route16GateScript2: ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wSimulatedJoypadStatesIndex], a @@ -92,7 +92,7 @@ Route16Gate1F_TextPointers: dw Route16GateText3 Route16GateText1: - TX_ASM + text_asm call Route16GateScript_49755 jr z, .asm_0bdf3 ld hl, Route16GateText_4977c @@ -105,17 +105,17 @@ Route16GateText1: jp TextScriptEnd Route16GateText_49777: - TX_FAR _Route16GateText_49777 - db "@" + text_far _Route16GateText_49777 + text_end Route16GateText_4977c: - TX_FAR _Route16GateText_4977c - db "@" + text_far _Route16GateText_4977c + text_end Route16GateText3: - TX_FAR _Route16GateText_49781 - db "@" + text_far _Route16GateText_49781 + text_end Route16GateText2: - TX_FAR _Route16GateText2 - db "@" + text_far _Route16GateText2 + text_end diff --git a/scripts/Route16Gate2F.asm b/scripts/Route16Gate2F.asm index 643a5ec7..27e147a1 100755 --- a/scripts/Route16Gate2F.asm +++ b/scripts/Route16Gate2F.asm @@ -8,39 +8,39 @@ Route16Gate2F_TextPointers: dw Route16GateUpstairsText4 Route16GateUpstairsText1: - TX_ASM + text_asm ld hl, Route16GateUpstairsText_49820 call PrintText jp TextScriptEnd Route16GateUpstairsText_49820: - TX_FAR _Route16GateUpstairsText_49820 - db "@" + text_far _Route16GateUpstairsText_49820 + text_end Route16GateUpstairsText2: - TX_ASM + text_asm ld hl, Route16GateUpstairsText_4982f call PrintText jp TextScriptEnd Route16GateUpstairsText_4982f: - TX_FAR _Route16GateUpstairsText_4982f - db "@" + text_far _Route16GateUpstairsText_4982f + text_end Route16GateUpstairsText3: - TX_ASM + text_asm ld hl, Route16GateUpstairsText_4983b jp GateUpstairsScript_PrintIfFacingUp Route16GateUpstairsText_4983b: - TX_FAR _Route16GateUpstairsText_4983b - db "@" + text_far _Route16GateUpstairsText_4983b + text_end Route16GateUpstairsText4: - TX_ASM + text_asm ld hl, Route16GateUpstairsText_49847 jp GateUpstairsScript_PrintIfFacingUp Route16GateUpstairsText_49847: - TX_FAR _Route16GateUpstairsText_49847 - db "@" + text_far _Route16GateUpstairsText_49847 + text_end diff --git a/scripts/Route17.asm b/scripts/Route17.asm index dd92ac44..27693f9f 100755 --- a/scripts/Route17.asm +++ b/scripts/Route17.asm @@ -31,297 +31,227 @@ Route17_TextPointers: dw Route17Text16 Route17TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_0 - dw Route17BattleText1 ; TextBeforeBattle - dw Route17AfterBattleText1 ; TextAfterBattle - dw Route17EndBattleText1 ; TextEndBattle - dw Route17EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_17_TRAINER_0, 3, Route17BattleText1, Route17EndBattleText1, Route17AfterBattleText1 Route17TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_1 - dw Route17BattleText2 ; TextBeforeBattle - dw Route17AfterBattleText2 ; TextAfterBattle - dw Route17EndBattleText2 ; TextEndBattle - dw Route17EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_17_TRAINER_1, 4, Route17BattleText2, Route17EndBattleText2, Route17AfterBattleText2 Route17TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_2 - dw Route17BattleText3 ; TextBeforeBattle - dw Route17AfterBattleText3 ; TextAfterBattle - dw Route17EndBattleText3 ; TextEndBattle - dw Route17EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_17_TRAINER_2, 4, Route17BattleText3, Route17EndBattleText3, Route17AfterBattleText3 Route17TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_3 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_3 - dw Route17BattleText4 ; TextBeforeBattle - dw Route17AfterBattleText4 ; TextAfterBattle - dw Route17EndBattleText4 ; TextEndBattle - dw Route17EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_17_TRAINER_3, 4, Route17BattleText4, Route17EndBattleText4, Route17AfterBattleText4 Route17TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_4 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_4 - dw Route17BattleText5 ; TextBeforeBattle - dw Route17AfterBattleText5 ; TextAfterBattle - dw Route17EndBattleText5 ; TextEndBattle - dw Route17EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_17_TRAINER_4, 3, Route17BattleText5, Route17EndBattleText5, Route17AfterBattleText5 Route17TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_5 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_5 - dw Route17BattleText6 ; TextBeforeBattle - dw Route17AfterBattleText6 ; TextAfterBattle - dw Route17EndBattleText6 ; TextEndBattle - dw Route17EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_17_TRAINER_5, 2, Route17BattleText6, Route17EndBattleText6, Route17AfterBattleText6 Route17TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_6 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_6 - dw Route17BattleText7 ; TextBeforeBattle - dw Route17AfterBattleText7 ; TextAfterBattle - dw Route17EndBattleText7 ; TextEndBattle - dw Route17EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_17_TRAINER_6, 4, Route17BattleText7, Route17EndBattleText7, Route17AfterBattleText7 Route17TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_7, 1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_7, 1 - dw Route17BattleText8 ; TextBeforeBattle - dw Route17AfterBattleText8 ; TextAfterBattle - dw Route17EndBattleText8 ; TextEndBattle - dw Route17EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_17_TRAINER_7, 1, 2, Route17BattleText8, Route17EndBattleText8, Route17AfterBattleText8 Route17TrainerHeader8: - dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_8, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_8, 1 - dw Route17BattleText9 ; TextBeforeBattle - dw Route17AfterBattleText9 ; TextAfterBattle - dw Route17EndBattleText9 ; TextEndBattle - dw Route17EndBattleText9 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_17_TRAINER_8, 1, 3, Route17BattleText9, Route17EndBattleText9, Route17AfterBattleText9 Route17TrainerHeader9: - dbEventFlagBit EVENT_BEAT_ROUTE_17_TRAINER_9, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_17_TRAINER_9, 1 - dw Route17BattleText10 ; TextBeforeBattle - dw Route17AfterBattleText10 ; TextAfterBattle - dw Route17EndBattleText10 ; TextEndBattle - dw Route17EndBattleText10 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_17_TRAINER_9, 1, 4, Route17BattleText10, Route17EndBattleText10, Route17AfterBattleText10 + db -1 ; end Route17Text1: - TX_ASM + text_asm ld hl, Route17TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route17BattleText1: - TX_FAR _Route17BattleText1 - db "@" + text_far _Route17BattleText1 + text_end Route17EndBattleText1: - TX_FAR _Route17EndBattleText1 - db "@" + text_far _Route17EndBattleText1 + text_end Route17AfterBattleText1: - TX_FAR _Route17AfterBattleText1 - db "@" + text_far _Route17AfterBattleText1 + text_end Route17Text2: - TX_ASM + text_asm ld hl, Route17TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route17BattleText2: - TX_FAR _Route17BattleText2 - db "@" + text_far _Route17BattleText2 + text_end Route17EndBattleText2: - TX_FAR _Route17EndBattleText2 - db "@" + text_far _Route17EndBattleText2 + text_end Route17AfterBattleText2: - TX_FAR _Route17AfterBattleText2 - db "@" + text_far _Route17AfterBattleText2 + text_end Route17Text3: - TX_ASM + text_asm ld hl, Route17TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route17BattleText3: - TX_FAR _Route17BattleText3 - db "@" + text_far _Route17BattleText3 + text_end Route17EndBattleText3: - TX_FAR _Route17EndBattleText3 - db "@" + text_far _Route17EndBattleText3 + text_end Route17AfterBattleText3: - TX_FAR _Route17AfterBattleText3 - db "@" + text_far _Route17AfterBattleText3 + text_end Route17Text4: - TX_ASM + text_asm ld hl, Route17TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route17BattleText4: - TX_FAR _Route17BattleText4 - db "@" + text_far _Route17BattleText4 + text_end Route17EndBattleText4: - TX_FAR _Route17EndBattleText4 - db "@" + text_far _Route17EndBattleText4 + text_end Route17AfterBattleText4: - TX_FAR _Route17AfterBattleText4 - db "@" + text_far _Route17AfterBattleText4 + text_end Route17Text5: - TX_ASM + text_asm ld hl, Route17TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route17BattleText5: - TX_FAR _Route17BattleText5 - db "@" + text_far _Route17BattleText5 + text_end Route17EndBattleText5: - TX_FAR _Route17EndBattleText5 - db "@" + text_far _Route17EndBattleText5 + text_end Route17AfterBattleText5: - TX_FAR _Route17AfterBattleText5 - db "@" + text_far _Route17AfterBattleText5 + text_end Route17Text6: - TX_ASM + text_asm ld hl, Route17TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route17BattleText6: - TX_FAR _Route17BattleText6 - db "@" + text_far _Route17BattleText6 + text_end Route17EndBattleText6: - TX_FAR _Route17EndBattleText6 - db "@" + text_far _Route17EndBattleText6 + text_end Route17AfterBattleText6: - TX_FAR _Route17AfterBattleText6 - db "@" + text_far _Route17AfterBattleText6 + text_end Route17Text7: - TX_ASM + text_asm ld hl, Route17TrainerHeader6 call TalkToTrainer jp TextScriptEnd Route17BattleText7: - TX_FAR _Route17BattleText7 - db "@" + text_far _Route17BattleText7 + text_end Route17EndBattleText7: - TX_FAR _Route17EndBattleText7 - db "@" + text_far _Route17EndBattleText7 + text_end Route17AfterBattleText7: - TX_FAR _Route17AfterBattleText7 - db "@" + text_far _Route17AfterBattleText7 + text_end Route17Text8: - TX_ASM + text_asm ld hl, Route17TrainerHeader7 call TalkToTrainer jp TextScriptEnd Route17BattleText8: - TX_FAR _Route17BattleText8 - db "@" + text_far _Route17BattleText8 + text_end Route17EndBattleText8: - TX_FAR _Route17EndBattleText8 - db "@" + text_far _Route17EndBattleText8 + text_end Route17AfterBattleText8: - TX_FAR _Route17AfterBattleText8 - db "@" + text_far _Route17AfterBattleText8 + text_end Route17Text9: - TX_ASM + text_asm ld hl, Route17TrainerHeader8 call TalkToTrainer jp TextScriptEnd Route17BattleText9: - TX_FAR _Route17BattleText9 - db "@" + text_far _Route17BattleText9 + text_end Route17EndBattleText9: - TX_FAR _Route17EndBattleText9 - db "@" + text_far _Route17EndBattleText9 + text_end Route17AfterBattleText9: - TX_FAR _Route17AfterBattleText9 - db "@" + text_far _Route17AfterBattleText9 + text_end Route17Text10: - TX_ASM + text_asm ld hl, Route17TrainerHeader9 call TalkToTrainer jp TextScriptEnd Route17BattleText10: - TX_FAR _Route17BattleText10 - db "@" + text_far _Route17BattleText10 + text_end Route17EndBattleText10: - TX_FAR _Route17EndBattleText10 - db "@" + text_far _Route17EndBattleText10 + text_end Route17AfterBattleText10: - TX_FAR _Route17AfterBattleText10 - db "@" + text_far _Route17AfterBattleText10 + text_end Route17Text11: - TX_FAR _Route17Text11 - db "@" + text_far _Route17Text11 + text_end Route17Text12: - TX_FAR _Route17Text12 - db "@" + text_far _Route17Text12 + text_end Route17Text13: - TX_FAR _Route17Text13 - db "@" + text_far _Route17Text13 + text_end Route17Text14: - TX_FAR _Route17Text14 - db "@" + text_far _Route17Text14 + text_end Route17Text15: - TX_FAR _Route17Text15 - db "@" + text_far _Route17Text15 + text_end Route17Text16: - TX_FAR _Route17Text16 - db "@" + text_far _Route17Text16 + text_end diff --git a/scripts/Route18.asm b/scripts/Route18.asm index 022d41be..f6738fc6 100755 --- a/scripts/Route18.asm +++ b/scripts/Route18.asm @@ -20,92 +20,71 @@ Route18_TextPointers: dw Route18Text5 Route18TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_0 - dw Route18BattleText1 ; TextBeforeBattle - dw Route18AfterBattleText1 ; TextAfterBattle - dw Route18EndBattleText1 ; TextEndBattle - dw Route18EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_18_TRAINER_0, 3, Route18BattleText1, Route18EndBattleText1, Route18AfterBattleText1 Route18TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_1 - dw Route18BattleText2 ; TextBeforeBattle - dw Route18AfterBattleText2 ; TextAfterBattle - dw Route18EndBattleText2 ; TextEndBattle - dw Route18EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_18_TRAINER_1, 3, Route18BattleText2, Route18EndBattleText2, Route18AfterBattleText2 Route18TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_18_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_18_TRAINER_2 - dw Route18BattleText3 ; TextBeforeBattle - dw Route18AfterBattleText3 ; TextAfterBattle - dw Route18EndBattleText3 ; TextEndBattle - dw Route18EndBattleText3 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_18_TRAINER_2, 4, Route18BattleText3, Route18EndBattleText3, Route18AfterBattleText3 + db -1 ; end Route18Text1: - TX_ASM + text_asm ld hl, Route18TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route18BattleText1: - TX_FAR _Route18BattleText1 - db "@" + text_far _Route18BattleText1 + text_end Route18EndBattleText1: - TX_FAR _Route18EndBattleText1 - db "@" + text_far _Route18EndBattleText1 + text_end Route18AfterBattleText1: - TX_FAR _Route18AfterBattleText1 - db "@" + text_far _Route18AfterBattleText1 + text_end Route18Text2: - TX_ASM + text_asm ld hl, Route18TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route18BattleText2: - TX_FAR _Route18BattleText2 - db "@" + text_far _Route18BattleText2 + text_end Route18EndBattleText2: - TX_FAR _Route18EndBattleText2 - db "@" + text_far _Route18EndBattleText2 + text_end Route18AfterBattleText2: - TX_FAR _Route18AfterBattleText2 - db "@" + text_far _Route18AfterBattleText2 + text_end Route18Text3: - TX_ASM + text_asm ld hl, Route18TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route18BattleText3: - TX_FAR _Route18BattleText3 - db "@" + text_far _Route18BattleText3 + text_end Route18EndBattleText3: - TX_FAR _Route18EndBattleText3 - db "@" + text_far _Route18EndBattleText3 + text_end Route18AfterBattleText3: - TX_FAR _Route18AfterBattleText3 - db "@" + text_far _Route18AfterBattleText3 + text_end Route18Text4: - TX_FAR _Route18Text4 - db "@" + text_far _Route18Text4 + text_end Route18Text5: - TX_FAR _Route18Text5 - db "@" + text_far _Route18Text5 + text_end diff --git a/scripts/Route18Gate1F.asm b/scripts/Route18Gate1F.asm index 812cb3e0..2caeaedd 100755 --- a/scripts/Route18Gate1F.asm +++ b/scripts/Route18Gate1F.asm @@ -19,10 +19,10 @@ Route18GateScript0: call ArePlayerCoordsInArray ret nc ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, [wCoordIndex] cp $1 jr z, .asm_498c6 @@ -44,11 +44,11 @@ Route18GateScript0: ret CoordsData_498cc: - db $03,$04 - db $04,$04 - db $05,$04 - db $06,$04 - db $FF + dbmapcoord 4, 3 + dbmapcoord 4, 4 + dbmapcoord 4, 5 + dbmapcoord 4, 6 + db -1 ; end Route18GateScript1: ld a, [wSimulatedJoypadStatesIndex] @@ -59,7 +59,7 @@ Route18GateScript1: Route18GateScript2: ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 ld [wSimulatedJoypadStatesIndex], a @@ -87,7 +87,7 @@ Route18Gate1F_TextPointers: dw Route18GateText2 Route18GateText1: - TX_ASM + text_asm call Route16GateScript_49755 jr z, .asm_3c84d ld hl, Route18GateText_4992d @@ -100,13 +100,13 @@ Route18GateText1: jp TextScriptEnd Route18GateText_49928: - TX_FAR _Route18GateText_49928 - db "@" + text_far _Route18GateText_49928 + text_end Route18GateText_4992d: - TX_FAR _Route18GateText_4992d - db "@" + text_far _Route18GateText_4992d + text_end Route18GateText2: - TX_FAR _Route18GateText_49932 - db "@" + text_far _Route18GateText_49932 + text_end diff --git a/scripts/Route18Gate2F.asm b/scripts/Route18Gate2F.asm index 6987a099..efb6d70a 100755 --- a/scripts/Route18Gate2F.asm +++ b/scripts/Route18Gate2F.asm @@ -7,26 +7,26 @@ Route18Gate2F_TextPointers: dw Route18GateUpstairsText3 Route18GateUpstairsText1: - TX_ASM - ld a, $5 + text_asm + ld a, TRADE_FOR_MARC ld [wWhichTrade], a predef DoInGameTradeDialogue jp TextScriptEnd Route18GateUpstairsText2: - TX_ASM + text_asm ld hl, Route18GateUpstairsText_49993 jp GateUpstairsScript_PrintIfFacingUp Route18GateUpstairsText_49993: - TX_FAR _Route18GateUpstairsText_49993 - db "@" + text_far _Route18GateUpstairsText_49993 + text_end Route18GateUpstairsText3: - TX_ASM + text_asm ld hl, Route18GateUpstairsText_4999f jp GateUpstairsScript_PrintIfFacingUp Route18GateUpstairsText_4999f: - TX_FAR _Route18GateUpstairsText_4999f - db "@" + text_far _Route18GateUpstairsText_4999f + text_end diff --git a/scripts/Route19.asm b/scripts/Route19.asm index febeb9a4..7e09c5e3 100755 --- a/scripts/Route19.asm +++ b/scripts/Route19.asm @@ -26,269 +26,199 @@ Route19_TextPointers: dw Route19Text11 Route19TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_0 - dw Route19BattleText1 ; TextBeforeBattle - dw Route19AfterBattleText1 ; TextAfterBattle - dw Route19EndBattleText1 ; TextEndBattle - dw Route19EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_19_TRAINER_0, 4, Route19BattleText1, Route19EndBattleText1, Route19AfterBattleText1 Route19TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_1 - dw Route19BattleText2 ; TextBeforeBattle - dw Route19AfterBattleText2 ; TextAfterBattle - dw Route19EndBattleText2 ; TextEndBattle - dw Route19EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_19_TRAINER_1, 4, Route19BattleText2, Route19EndBattleText2, Route19AfterBattleText2 Route19TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_2 - dw Route19BattleText3 ; TextBeforeBattle - dw Route19AfterBattleText3 ; TextAfterBattle - dw Route19EndBattleText3 ; TextEndBattle - dw Route19EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_19_TRAINER_2, 3, Route19BattleText3, Route19EndBattleText3, Route19AfterBattleText3 Route19TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_3 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_3 - dw Route19BattleText4 ; TextBeforeBattle - dw Route19AfterBattleText4 ; TextAfterBattle - dw Route19EndBattleText4 ; TextEndBattle - dw Route19EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_19_TRAINER_3, 4, Route19BattleText4, Route19EndBattleText4, Route19AfterBattleText4 Route19TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_4 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_4 - dw Route19BattleText5 ; TextBeforeBattle - dw Route19AfterBattleText5 ; TextAfterBattle - dw Route19EndBattleText5 ; TextEndBattle - dw Route19EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_19_TRAINER_4, 4, Route19BattleText5, Route19EndBattleText5, Route19AfterBattleText5 Route19TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_5 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_5 - dw Route19BattleText6 ; TextBeforeBattle - dw Route19AfterBattleText6 ; TextAfterBattle - dw Route19EndBattleText6 ; TextEndBattle - dw Route19EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_19_TRAINER_5, 4, Route19BattleText6, Route19EndBattleText6, Route19AfterBattleText6 Route19TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_6 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_6 - dw Route19BattleText7 ; TextBeforeBattle - dw Route19AfterBattleText7 ; TextAfterBattle - dw Route19EndBattleText7 ; TextEndBattle - dw Route19EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_19_TRAINER_6, 3, Route19BattleText7, Route19EndBattleText7, Route19AfterBattleText7 Route19TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_7, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_7, 1 - dw Route19BattleText8 ; TextBeforeBattle - dw Route19AfterBattleText8 ; TextAfterBattle - dw Route19EndBattleText8 ; TextEndBattle - dw Route19EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_19_TRAINER_7, 1, 4, Route19BattleText8, Route19EndBattleText8, Route19AfterBattleText8 Route19TrainerHeader8: - dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_8, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_8, 1 - dw Route19BattleText9 ; TextBeforeBattle - dw Route19AfterBattleText9 ; TextAfterBattle - dw Route19EndBattleText9 ; TextEndBattle - dw Route19EndBattleText9 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_19_TRAINER_8, 1, 4, Route19BattleText9, Route19EndBattleText9, Route19AfterBattleText9 Route19TrainerHeader9: - dbEventFlagBit EVENT_BEAT_ROUTE_19_TRAINER_9, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_19_TRAINER_9, 1 - dw Route19BattleText10 ; TextBeforeBattle - dw Route19AfterBattleText10 ; TextAfterBattle - dw Route19EndBattleText10 ; TextEndBattle - dw Route19EndBattleText10 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_19_TRAINER_9, 1, 4, Route19BattleText10, Route19EndBattleText10, Route19AfterBattleText10 + db -1 ; end Route19Text1: - TX_ASM + text_asm ld hl, Route19TrainerHeader0 jr Route19_TalkToTrainer Route19Text2: - TX_ASM + text_asm ld hl, Route19TrainerHeader1 jr Route19_TalkToTrainer Route19Text3: - TX_ASM + text_asm ld hl, Route19TrainerHeader2 jr Route19_TalkToTrainer Route19Text4: - TX_ASM + text_asm ld hl, Route19TrainerHeader3 jr Route19_TalkToTrainer Route19Text5: - TX_ASM + text_asm ld hl, Route19TrainerHeader4 jr Route19_TalkToTrainer Route19Text6: - TX_ASM + text_asm ld hl, Route19TrainerHeader5 jr Route19_TalkToTrainer Route19Text7: - TX_ASM + text_asm ld hl, Route19TrainerHeader6 jr Route19_TalkToTrainer Route19Text8: - TX_ASM + text_asm ld hl, Route19TrainerHeader7 jr Route19_TalkToTrainer Route19Text9: - TX_ASM + text_asm ld hl, Route19TrainerHeader8 jr Route19_TalkToTrainer Route19Text10: - TX_ASM + text_asm ld hl, Route19TrainerHeader9 Route19_TalkToTrainer: call TalkToTrainer jp TextScriptEnd Route19BattleText1: - TX_FAR _Route19BattleText1 - db "@" + text_far _Route19BattleText1 + text_end Route19EndBattleText1: - TX_FAR _Route19EndBattleText1 - db "@" + text_far _Route19EndBattleText1 + text_end Route19AfterBattleText1: - TX_FAR _Route19AfterBattleText1 - db "@" + text_far _Route19AfterBattleText1 + text_end Route19BattleText2: - TX_FAR _Route19BattleText2 - db "@" + text_far _Route19BattleText2 + text_end Route19EndBattleText2: - TX_FAR _Route19EndBattleText2 - db "@" + text_far _Route19EndBattleText2 + text_end Route19AfterBattleText2: - TX_FAR _Route19AfterBattleText2 - db "@" + text_far _Route19AfterBattleText2 + text_end Route19BattleText3: - TX_FAR _Route19BattleText3 - db "@" + text_far _Route19BattleText3 + text_end Route19EndBattleText3: - TX_FAR _Route19EndBattleText3 - db "@" + text_far _Route19EndBattleText3 + text_end Route19AfterBattleText3: - TX_FAR _Route19AfterBattleText3 - db "@" + text_far _Route19AfterBattleText3 + text_end Route19BattleText4: - TX_FAR _Route19BattleText4 - db "@" + text_far _Route19BattleText4 + text_end Route19EndBattleText4: - TX_FAR _Route19EndBattleText4 - db "@" + text_far _Route19EndBattleText4 + text_end Route19AfterBattleText4: - TX_FAR _Route19AfterBattleText4 - db "@" + text_far _Route19AfterBattleText4 + text_end Route19BattleText5: - TX_FAR _Route19BattleText5 - db "@" + text_far _Route19BattleText5 + text_end Route19EndBattleText5: - TX_FAR _Route19EndBattleText5 - db "@" + text_far _Route19EndBattleText5 + text_end Route19AfterBattleText5: - TX_FAR _Route19AfterBattleText5 - db "@" + text_far _Route19AfterBattleText5 + text_end Route19BattleText6: - TX_FAR _Route19BattleText6 - db "@" + text_far _Route19BattleText6 + text_end Route19EndBattleText6: - TX_FAR _Route19EndBattleText6 - db "@" + text_far _Route19EndBattleText6 + text_end Route19AfterBattleText6: - TX_FAR _Route19AfterBattleText6 - db "@" + text_far _Route19AfterBattleText6 + text_end Route19BattleText7: - TX_FAR _Route19BattleText7 - db "@" + text_far _Route19BattleText7 + text_end Route19EndBattleText7: - TX_FAR _Route19EndBattleText7 - db "@" + text_far _Route19EndBattleText7 + text_end Route19AfterBattleText7: - TX_FAR _Route19AfterBattleText7 - db "@" + text_far _Route19AfterBattleText7 + text_end Route19BattleText8: - TX_FAR _Route19BattleText8 - db "@" + text_far _Route19BattleText8 + text_end Route19EndBattleText8: - TX_FAR _Route19EndBattleText8 - db "@" + text_far _Route19EndBattleText8 + text_end Route19AfterBattleText8: - TX_FAR _Route19AfterBattleText8 - db "@" + text_far _Route19AfterBattleText8 + text_end Route19BattleText9: - TX_FAR _Route19BattleText9 - db "@" + text_far _Route19BattleText9 + text_end Route19EndBattleText9: - TX_FAR _Route19EndBattleText9 - db "@" + text_far _Route19EndBattleText9 + text_end Route19AfterBattleText9: - TX_FAR _Route19AfterBattleText9 - db "@" + text_far _Route19AfterBattleText9 + text_end Route19BattleText10: - TX_FAR _Route19BattleText10 - db "@" + text_far _Route19BattleText10 + text_end Route19EndBattleText10: - TX_FAR _Route19EndBattleText10 - db "@" + text_far _Route19EndBattleText10 + text_end Route19AfterBattleText10: - TX_FAR _Route19AfterBattleText10 - db "@" + text_far _Route19AfterBattleText10 + text_end Route19Text11: - TX_FAR _Route19Text11 - db "@" + text_far _Route19Text11 + text_end diff --git a/scripts/Route1_2.asm b/scripts/Route1_2.asm index ee34ce55..94748252 100755 --- a/scripts/Route1_2.asm +++ b/scripts/Route1_2.asm @@ -1,53 +1,53 @@ -Func_f1ad2: +Func_f1ad2:: CheckAndSetEvent EVENT_GOT_POTION_SAMPLE - jr nz, .asm_1cada + jr nz, .got_item ld hl, Route1ViridianMartSampleText call PrintText lb bc, POTION, 1 call GiveItem - jr nc, .BagFull - ld hl, Route1Text_f1aff - jr .asm_1cadd -.BagFull - ld hl, Route1Text_f1b0a - jr .asm_1cadd -.asm_1cada - ld hl, Route1Text_f1b05 -.asm_1cadd + jr nc, .bag_full + ld hl, Route1Text_1cae8 + jr .done +.bag_full + ld hl, Route1Text_1caf3 + jr .done +.got_item + ld hl, Route1Text_1caee +.done call PrintText ret Route1ViridianMartSampleText: - TX_FAR _Route1ViridianMartSampleText - db "@" + text_far _Route1ViridianMartSampleText + text_end -Route1Text_f1aff: - TX_FAR _Route1Text_1cae8 - TX_SFX_ITEM_1 - db "@" +Route1Text_1cae8: + text_far _Route1Text_1cae8 + sound_get_item_1 + text_end -Route1Text_f1b05: - TX_FAR _Route1Text_1caee - db "@" +Route1Text_1caee: + text_far _Route1Text_1caee + text_end -Route1Text_f1b0a: - TX_FAR _Route1Text_1caf3 - db "@" +Route1Text_1caf3: + text_far _Route1Text_1caf3 + text_end -Func_f1b0f: +Func_f1b0f:: ld hl, Route1Text_f1b16 call PrintText ret Route1Text_f1b16: - TX_FAR _Route1Text2 - db "@" + text_far _Route1Text2 + text_end -Func_f1b1b: +Func_f1b1b:: ld hl, Route1Text_f1b22 call PrintText ret Route1Text_f1b22: - TX_FAR _Route1Text3 - db "@" + text_far _Route1Text3 + text_end diff --git a/scripts/Route2.asm b/scripts/Route2.asm index f4b1c8c4..c6886ce4 100755 --- a/scripts/Route2.asm +++ b/scripts/Route2.asm @@ -8,9 +8,9 @@ Route2_TextPointers: dw Route2Text4 Route2Text3: - TX_FAR _Route2Text3 - db "@" + text_far _Route2Text3 + text_end Route2Text4: - TX_FAR _Route2Text4 - db "@" + text_far _Route2Text4 + text_end diff --git a/scripts/Route20.asm b/scripts/Route20.asm index 081a723e..f9904d4e 100755 --- a/scripts/Route20.asm +++ b/scripts/Route20.asm @@ -33,7 +33,7 @@ Route20Script_50cc6: db HS_SEAFOAM_ISLANDS_B2F_BOULDER_2 db HS_SEAFOAM_ISLANDS_B3F_BOULDER_3 db HS_SEAFOAM_ISLANDS_B3F_BOULDER_4 - db $FF + db -1 ; end .asm_50cef CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE @@ -76,278 +76,208 @@ Route20_TextPointers: dw Route20Text12 Route20TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_0 - dw Route20BattleText1 ; TextBeforeBattle - dw Route20AfterBattleText1 ; TextAfterBattle - dw Route20EndBattleText1 ; TextEndBattle - dw Route20EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_20_TRAINER_0, 4, Route20BattleText1, Route20EndBattleText1, Route20AfterBattleText1 Route20TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_1 - dw Route20BattleText2 ; TextBeforeBattle - dw Route20AfterBattleText2 ; TextAfterBattle - dw Route20EndBattleText2 ; TextEndBattle - dw Route20EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_20_TRAINER_1, 4, Route20BattleText2, Route20EndBattleText2, Route20AfterBattleText2 Route20TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_2 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_2 - dw Route20BattleText3 ; TextBeforeBattle - dw Route20AfterBattleText3 ; TextAfterBattle - dw Route20EndBattleText3 ; TextEndBattle - dw Route20EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_20_TRAINER_2, 2, Route20BattleText3, Route20EndBattleText3, Route20AfterBattleText3 Route20TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_3 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_3 - dw Route20BattleText4 ; TextBeforeBattle - dw Route20AfterBattleText4 ; TextAfterBattle - dw Route20EndBattleText4 ; TextEndBattle - dw Route20EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_20_TRAINER_3, 4, Route20BattleText4, Route20EndBattleText4, Route20AfterBattleText4 Route20TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_4 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_4 - dw Route20BattleText5 ; TextBeforeBattle - dw Route20AfterBattleText5 ; TextAfterBattle - dw Route20EndBattleText5 ; TextEndBattle - dw Route20EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_20_TRAINER_4, 3, Route20BattleText5, Route20EndBattleText5, Route20AfterBattleText5 Route20TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_5 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_5 - dw Route20BattleText6 ; TextBeforeBattle - dw Route20AfterBattleText6 ; TextAfterBattle - dw Route20EndBattleText6 ; TextEndBattle - dw Route20EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_20_TRAINER_5, 4, Route20BattleText6, Route20EndBattleText6, Route20AfterBattleText6 Route20TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_6 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_6 - dw Route20BattleText7 ; TextBeforeBattle - dw Route20AfterBattleText7 ; TextAfterBattle - dw Route20EndBattleText7 ; TextEndBattle - dw Route20EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_20_TRAINER_6, 2, Route20BattleText7, Route20EndBattleText7, Route20AfterBattleText7 Route20TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_7, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_7, 1 - dw Route20BattleText8 ; TextBeforeBattle - dw Route20AfterBattleText8 ; TextAfterBattle - dw Route20EndBattleText8 ; TextEndBattle - dw Route20EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_20_TRAINER_7, 1, 4, Route20BattleText8, Route20EndBattleText8, Route20AfterBattleText8 Route20TrainerHeader8: - dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_8, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_8, 1 - dw Route20BattleText9 ; TextBeforeBattle - dw Route20AfterBattleText9 ; TextAfterBattle - dw Route20EndBattleText9 ; TextEndBattle - dw Route20EndBattleText9 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_20_TRAINER_8, 1, 3, Route20BattleText9, Route20EndBattleText9, Route20AfterBattleText9 Route20TrainerHeader9: - dbEventFlagBit EVENT_BEAT_ROUTE_20_TRAINER_9, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_20_TRAINER_9, 1 - dw Route20BattleText10 ; TextBeforeBattle - dw Route20AfterBattleText10 ; TextAfterBattle - dw Route20EndBattleText10 ; TextEndBattle - dw Route20EndBattleText10 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_20_TRAINER_9, 1, 4, Route20BattleText10, Route20EndBattleText10, Route20AfterBattleText10 + db -1 ; end Route20Text1: - TX_ASM + text_asm ld hl, Route20TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route20Text2: - TX_ASM + text_asm ld hl, Route20TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route20Text3: - TX_ASM + text_asm ld hl, Route20TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route20Text4: - TX_ASM + text_asm ld hl, Route20TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route20Text5: - TX_ASM + text_asm ld hl, Route20TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route20Text6: - TX_ASM + text_asm ld hl, Route20TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route20Text7: - TX_ASM + text_asm ld hl, Route20TrainerHeader6 call TalkToTrainer jp TextScriptEnd Route20Text8: - TX_ASM + text_asm ld hl, Route20TrainerHeader7 call TalkToTrainer jp TextScriptEnd Route20Text9: - TX_ASM + text_asm ld hl, Route20TrainerHeader8 call TalkToTrainer jp TextScriptEnd Route20Text10: - TX_ASM + text_asm ld hl, Route20TrainerHeader9 call TalkToTrainer jp TextScriptEnd Route20BattleText1: - TX_FAR _Route20BattleText1 - db "@" + text_far _Route20BattleText1 + text_end Route20EndBattleText1: - TX_FAR _Route20EndBattleText1 - db "@" + text_far _Route20EndBattleText1 + text_end Route20AfterBattleText1: - TX_FAR _Route20AfterBattleText1 - db "@" + text_far _Route20AfterBattleText1 + text_end Route20BattleText2: - TX_FAR _Route20BattleText2 - db "@" + text_far _Route20BattleText2 + text_end Route20EndBattleText2: - TX_FAR _Route20EndBattleText2 - db "@" + text_far _Route20EndBattleText2 + text_end Route20AfterBattleText2: - TX_FAR _Route20AfterBattleText2 - db "@" + text_far _Route20AfterBattleText2 + text_end Route20BattleText3: - TX_FAR _Route20BattleText3 - db "@" + text_far _Route20BattleText3 + text_end Route20EndBattleText3: - TX_FAR _Route20EndBattleText3 - db "@" + text_far _Route20EndBattleText3 + text_end Route20AfterBattleText3: - TX_FAR _Route20AfterBattleText3 - db "@" + text_far _Route20AfterBattleText3 + text_end Route20BattleText4: - TX_FAR _Route20BattleText4 - db "@" + text_far _Route20BattleText4 + text_end Route20EndBattleText4: - TX_FAR _Route20EndBattleText4 - db "@" + text_far _Route20EndBattleText4 + text_end Route20AfterBattleText4: - TX_FAR _Route20AfterBattleText4 - db "@" + text_far _Route20AfterBattleText4 + text_end Route20BattleText5: - TX_FAR _Route20BattleText5 - db "@" + text_far _Route20BattleText5 + text_end Route20EndBattleText5: - TX_FAR _Route20EndBattleText5 - db "@" + text_far _Route20EndBattleText5 + text_end Route20AfterBattleText5: - TX_FAR _Route20AfterBattleText5 - db "@" + text_far _Route20AfterBattleText5 + text_end Route20BattleText6: - TX_FAR _Route20BattleText6 - db "@" + text_far _Route20BattleText6 + text_end Route20EndBattleText6: - TX_FAR _Route20EndBattleText6 - db "@" + text_far _Route20EndBattleText6 + text_end Route20AfterBattleText6: - TX_FAR _Route20AfterBattleText6 - db "@" + text_far _Route20AfterBattleText6 + text_end Route20BattleText7: - TX_FAR _Route20BattleText7 - db "@" + text_far _Route20BattleText7 + text_end Route20EndBattleText7: - TX_FAR _Route20EndBattleText7 - db "@" + text_far _Route20EndBattleText7 + text_end Route20AfterBattleText7: - TX_FAR _Route20AfterBattleText7 - db "@" + text_far _Route20AfterBattleText7 + text_end Route20BattleText8: - TX_FAR _Route20BattleText8 - db "@" + text_far _Route20BattleText8 + text_end Route20EndBattleText8: - TX_FAR _Route20EndBattleText8 - db "@" + text_far _Route20EndBattleText8 + text_end Route20AfterBattleText8: - TX_FAR _Route20AfterBattleText8 - db "@" + text_far _Route20AfterBattleText8 + text_end Route20BattleText9: - TX_FAR _Route20BattleText9 - db "@" + text_far _Route20BattleText9 + text_end Route20EndBattleText9: - TX_FAR _Route20EndBattleText9 - db "@" + text_far _Route20EndBattleText9 + text_end Route20AfterBattleText9: - TX_FAR _Route20AfterBattleText9 - db "@" + text_far _Route20AfterBattleText9 + text_end Route20BattleText10: - TX_FAR _Route20BattleText10 - db "@" + text_far _Route20BattleText10 + text_end Route20EndBattleText10: - TX_FAR _Route20EndBattleText10 - db "@" + text_far _Route20EndBattleText10 + text_end Route20AfterBattleText10: - TX_FAR _Route20AfterBattleText10 - db "@" + text_far _Route20AfterBattleText10 + text_end Route20Text12: Route20Text11: - TX_FAR _Route20Text11 - db "@" + text_far _Route20Text11 + text_end diff --git a/scripts/Route21.asm b/scripts/Route21.asm index 15dacd5d..7afe350f 100755 --- a/scripts/Route21.asm +++ b/scripts/Route21.asm @@ -24,246 +24,183 @@ Route21_TextPointers: dw Route21Text9 Route21TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_0 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_0 - dw Route21BattleText1 ; TextBeforeBattle - dw Route21AfterBattleText1 ; TextAfterBattle - dw Route21EndBattleText1 ; TextEndBattle - dw Route21EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_21_TRAINER_0, 0, Route21BattleText1, Route21EndBattleText1, Route21AfterBattleText1 Route21TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_1 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_1 - dw Route21BattleText2 ; TextBeforeBattle - dw Route21AfterBattleText2 ; TextAfterBattle - dw Route21EndBattleText2 ; TextEndBattle - dw Route21EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_21_TRAINER_1, 0, Route21BattleText2, Route21EndBattleText2, Route21AfterBattleText2 Route21TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_2 - dw Route21BattleText3 ; TextBeforeBattle - dw Route21AfterBattleText3 ; TextAfterBattle - dw Route21EndBattleText3 ; TextEndBattle - dw Route21EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_21_TRAINER_2, 4, Route21BattleText3, Route21EndBattleText3, Route21AfterBattleText3 Route21TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_3 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_3 - dw Route21BattleText4 ; TextBeforeBattle - dw Route21AfterBattleText4 ; TextAfterBattle - dw Route21EndBattleText4 ; TextEndBattle - dw Route21EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_21_TRAINER_3, 4, Route21BattleText4, Route21EndBattleText4, Route21AfterBattleText4 Route21TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_4 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_4 - dw Route21BattleText5 ; TextBeforeBattle - dw Route21AfterBattleText5 ; TextAfterBattle - dw Route21EndBattleText5 ; TextEndBattle - dw Route21EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_21_TRAINER_4, 4, Route21BattleText5, Route21EndBattleText5, Route21AfterBattleText5 Route21TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_5 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_5 - dw Route21BattleText6 ; TextBeforeBattle - dw Route21AfterBattleText6 ; TextAfterBattle - dw Route21EndBattleText6 ; TextEndBattle - dw Route21EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_21_TRAINER_5, 4, Route21BattleText6, Route21EndBattleText6, Route21AfterBattleText6 Route21TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_6 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_6 - dw Route21BattleText7 ; TextBeforeBattle - dw Route21AfterBattleText7 ; TextAfterBattle - dw Route21EndBattleText7 ; TextEndBattle - dw Route21EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_21_TRAINER_6, 3, Route21BattleText7, Route21EndBattleText7, Route21AfterBattleText7 Route21TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_7, 1 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_7, 1 - dw Route21BattleText8 ; TextBeforeBattle - dw Route21AfterBattleText8 ; TextAfterBattle - dw Route21EndBattleText8 ; TextEndBattle - dw Route21EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_21_TRAINER_7, 1, 0, Route21BattleText8, Route21EndBattleText8, Route21AfterBattleText8 Route21TrainerHeader8: - dbEventFlagBit EVENT_BEAT_ROUTE_21_TRAINER_8, 1 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_21_TRAINER_8, 1 - dw Route21BattleText9 ; TextBeforeBattle - dw Route21AfterBattleText9 ; TextAfterBattle - dw Route21EndBattleText9 ; TextEndBattle - dw Route21EndBattleText9 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_21_TRAINER_8, 1, 0, Route21BattleText9, Route21EndBattleText9, Route21AfterBattleText9 + db -1 ; end Route21Text1: - TX_ASM + text_asm ld hl, Route21TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route21Text2: - TX_ASM + text_asm ld hl, Route21TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route21Text3: - TX_ASM + text_asm ld hl, Route21TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route21Text4: - TX_ASM + text_asm ld hl, Route21TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route21Text5: - TX_ASM + text_asm ld hl, Route21TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route21Text6: - TX_ASM + text_asm ld hl, Route21TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route21Text7: - TX_ASM + text_asm ld hl, Route21TrainerHeader6 call TalkToTrainer jp TextScriptEnd Route21Text8: - TX_ASM + text_asm ld hl, Route21TrainerHeader7 call TalkToTrainer jp TextScriptEnd Route21Text9: - TX_ASM + text_asm ld hl, Route21TrainerHeader8 call TalkToTrainer jp TextScriptEnd Route21BattleText1: - TX_FAR _Route21BattleText1 - db "@" + text_far _Route21BattleText1 + text_end Route21EndBattleText1: - TX_FAR _Route21EndBattleText1 - db "@" + text_far _Route21EndBattleText1 + text_end Route21AfterBattleText1: - TX_FAR _Route21AfterBattleText1 - db "@" + text_far _Route21AfterBattleText1 + text_end Route21BattleText2: - TX_FAR _Route21BattleText2 - db "@" + text_far _Route21BattleText2 + text_end Route21EndBattleText2: - TX_FAR _Route21EndBattleText2 - db "@" + text_far _Route21EndBattleText2 + text_end Route21AfterBattleText2: - TX_FAR _Route21AfterBattleText2 - db "@" + text_far _Route21AfterBattleText2 + text_end Route21BattleText3: - TX_FAR _Route21BattleText3 - db "@" + text_far _Route21BattleText3 + text_end Route21EndBattleText3: - TX_FAR _Route21EndBattleText3 - db "@" + text_far _Route21EndBattleText3 + text_end Route21AfterBattleText3: - TX_FAR _Route21AfterBattleText3 - db "@" + text_far _Route21AfterBattleText3 + text_end Route21BattleText4: - TX_FAR _Route21BattleText4 - db "@" + text_far _Route21BattleText4 + text_end Route21EndBattleText4: - TX_FAR _Route21EndBattleText4 - db "@" + text_far _Route21EndBattleText4 + text_end Route21AfterBattleText4: - TX_FAR _Route21AfterBattleText4 - db "@" + text_far _Route21AfterBattleText4 + text_end Route21BattleText5: - TX_FAR _Route21BattleText5 - db "@" + text_far _Route21BattleText5 + text_end Route21EndBattleText5: - TX_FAR _Route21EndBattleText5 - db "@" + text_far _Route21EndBattleText5 + text_end Route21AfterBattleText5: - TX_FAR _Route21AfterBattleText5 - db "@" + text_far _Route21AfterBattleText5 + text_end Route21BattleText6: - TX_FAR _Route21BattleText6 - db "@" + text_far _Route21BattleText6 + text_end Route21EndBattleText6: - TX_FAR _Route21EndBattleText6 - db "@" + text_far _Route21EndBattleText6 + text_end Route21AfterBattleText6: - TX_FAR _Route21AfterBattleText6 - db "@" + text_far _Route21AfterBattleText6 + text_end Route21BattleText7: - TX_FAR _Route21BattleText7 - db "@" + text_far _Route21BattleText7 + text_end Route21EndBattleText7: - TX_FAR _Route21EndBattleText7 - db "@" + text_far _Route21EndBattleText7 + text_end Route21AfterBattleText7: - TX_FAR _Route21AfterBattleText7 - db "@" + text_far _Route21AfterBattleText7 + text_end Route21BattleText8: - TX_FAR _Route21BattleText8 - db "@" + text_far _Route21BattleText8 + text_end Route21EndBattleText8: - TX_FAR _Route21EndBattleText8 - db "@" + text_far _Route21EndBattleText8 + text_end Route21AfterBattleText8: - TX_FAR _Route21AfterBattleText8 - db "@" + text_far _Route21AfterBattleText8 + text_end Route21BattleText9: - TX_FAR _Route21BattleText9 - db "@" + text_far _Route21BattleText9 + text_end Route21EndBattleText9: - TX_FAR _Route21EndBattleText9 - db "@" + text_far _Route21EndBattleText9 + text_end Route21AfterBattleText9: - TX_FAR _Route21AfterBattleText9 - db "@" + text_far _Route21AfterBattleText9 + text_end diff --git a/scripts/Route22.asm b/scripts/Route22.asm index ff57f902..5dfdc67e 100755 --- a/scripts/Route22.asm +++ b/scripts/Route22.asm @@ -22,14 +22,14 @@ Route22Script7: ret Route22Script_50ed6: - ld a, OPP_SONY1 + ld a, OPP_RIVAL1 ld [wCurOpponent], a ld a, $2 ld [wTrainerNo], a ret Route22Script_50ee1: - ld a, OPP_SONY2 + ld a, OPP_RIVAL2 ld [wCurOpponent], a ld a, [wRivalStarter] add 7 @@ -45,7 +45,7 @@ Route22MoveRivalSprite: .asm_50ef1 call MoveSprite ld a, SPRITE_FACING_RIGHT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a jp SetSpriteFacingDirectionAndDelay Route22RivalMovementData: @@ -53,7 +53,7 @@ Route22RivalMovementData: db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT - db $FF + db -1 ; end Route22Script0: CheckEvent EVENT_ROUTE22_RIVAL_WANTS_BATTLE @@ -64,7 +64,7 @@ Route22Script0: ld a, [wCoordIndex] ld [wcf0d], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a ld a, PLAYER_DIR_LEFT @@ -76,9 +76,9 @@ Route22Script0: ret .Route22RivalBattleCoords - db $04, $1D - db $05, $1D - db $FF + dbmapcoord 29, 4 + dbmapcoord 29, 5 + db -1 ; end .firstRivalBattle ld a, $1 @@ -95,7 +95,7 @@ Route22Script0: ld a, MUSIC_MEET_RIVAL call PlayMusic ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call Route22MoveRivalSprite ld a, $1 ld [wRoute22CurScript], a @@ -115,14 +115,14 @@ Route22Script1: .asm_50f78 ld a, SPRITE_FACING_RIGHT .asm_50f7a - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteFacingDirectionAndDelay xor a ld [wJoyIgnore], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd72d set 6, [hl] @@ -136,12 +136,12 @@ Route22Script1: ret Route22RivalDefeatedText1: - TX_FAR _Route22RivalDefeatedText1 - db "@" + text_far _Route22RivalDefeatedText1 + text_end Route22Text_511bc: - TX_FAR _Route22Text_511bc - db "@" + text_far _Route22Text_511bc + text_end Route22Script2: ld a, [wIsInBattle] @@ -161,18 +161,18 @@ Route22Script2: .notDown ld a, SPRITE_FACING_RIGHT .done - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteFacingDirectionAndDelay ld a, $f0 ld [wJoyIgnore], a SetEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call StopAllMusic - callba Music_RivalAlternateStart + farcall Music_RivalAlternateStart ld a, [wcf0d] cp $1 jr nz, .asm_50fff @@ -193,7 +193,7 @@ Route22Script_5100d: ld de, Route22RivalExitMovementData2 Route22MoveRival1: ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a jp MoveSprite Route22RivalExitMovementData1: @@ -204,7 +204,7 @@ Route22RivalExitMovementData1: db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end Route22RivalExitMovementData2: db NPC_MOVEMENT_UP @@ -217,7 +217,7 @@ Route22RivalExitMovementData2: db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end Route22Script3: ld a, [wd730] @@ -246,9 +246,9 @@ Route22Script_5104e: call StopAllMusic .skipYVisibilityTesta call StopAllMusic - callba Music_RivalAlternateTempo + farcall Music_RivalAlternateTempo ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call Route22MoveRivalSprite ld a, $4 ld [wRoute22CurScript], a @@ -259,7 +259,7 @@ Route22Script4: bit 0, a ret nz ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, [wcf0d] cp $1 jr nz, .asm_510a1 @@ -272,12 +272,12 @@ Route22Script4: ld [wPlayerMovingDirection], a ld a, SPRITE_FACING_RIGHT .asm_510a8 - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay xor a ld [wJoyIgnore], a ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd72d set 6, [hl] @@ -291,19 +291,19 @@ Route22Script4: ret Route22RivalDefeatedText2: - TX_FAR _Route22RivalDefeatedText2 - db "@" + text_far _Route22RivalDefeatedText2 + text_end Route22Text_511d0: - TX_FAR _Route22Text_511d0 - db "@" + text_far _Route22Text_511d0 + text_end Route22Script5: ld a, [wIsInBattle] cp $ff jp z, Route22Script_50ece ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, [wcf0d] cp $1 jr nz, .asm_510fb @@ -316,16 +316,16 @@ Route22Script5: ld [wPlayerMovingDirection], a ld a, SPRITE_FACING_RIGHT .asm_51102 - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $f0 ld [wJoyIgnore], a SetEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call StopAllMusic - callba Music_RivalAlternateStartAndTempo + farcall Music_RivalAlternateStartAndTempo ld a, [wcf0d] cp $1 jr nz, .asm_51134 @@ -346,17 +346,16 @@ Route22Script_51142: ld de, MovementData_5114d Route22MoveRival2: ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a jp MoveSprite MovementData_5114c: db NPC_MOVEMENT_LEFT - MovementData_5114d: db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT db NPC_MOVEMENT_LEFT - db $FF + db -1 ; end Route22Script6: ld a, [wd730] @@ -379,16 +378,16 @@ Route22_TextPointers: dw Route22FrontGateText Route22Text1: - TX_ASM - callba Func_f1b27 + text_asm + farcall Func_f1b27 jp TextScriptEnd Route22Text2: - TX_ASM - callba Func_f1b47 + text_asm + farcall Func_f1b47 jp TextScriptEnd Route22FrontGateText: - TX_ASM - callba Func_f1b67 + text_asm + farcall Func_f1b67 jp TextScriptEnd diff --git a/scripts/Route22Gate.asm b/scripts/Route22Gate.asm index 946366b5..adbefe8a 100755 --- a/scripts/Route22Gate.asm +++ b/scripts/Route22Gate.asm @@ -4,7 +4,7 @@ Route22Gate_Script: ld a, [wRoute22GateCurScript] call CallFunctionInTable ld a, [wYCoord] - cp $4 + cp 4 ld a, ROUTE_23 jr c, .asm_1e69a ld a, ROUTE_22 @@ -22,18 +22,18 @@ Route22GateScript0: call ArePlayerCoordsInArray ret nc xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, SPRITE_FACING_LEFT ld [wSpriteStateData1 + 1 * $10 + 9], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ret Route22GateScriptCoords: - db 2,4 - db 2,5 - db $ff + dbmapcoord 4, 2 + dbmapcoord 5, 2 + db -1 ; end Route22GateScript_1e6ba: ld a, $1 @@ -60,7 +60,7 @@ Route22Gate_TextPointers: dw Route22GateText1 Route22GateText1: - TX_ASM + text_asm ld a, [wObtainedBadges] bit 0, a ; BOULDERBADGE jr nz, .asm_1e6f6 @@ -78,8 +78,8 @@ Route22GateText1: jp TextScriptEnd Route22GateText_1e704: - TX_FAR _Route22GateText_1e704 - TX_ASM + text_far _Route22GateText_1e704 + text_asm ld a, SFX_DENIED call PlaySoundWaitForCurrent call WaitForSoundToFinish @@ -87,10 +87,10 @@ Route22GateText_1e704: ret Route22GateText_1e715: - TX_FAR _Route22GateText_1e715 - db "@" + text_far _Route22GateText_1e715 + text_end Route22GateText_1e71a: - TX_FAR _Route22GateText_1e71a - TX_SFX_ITEM_1 - db "@" + text_far _Route22GateText_1e71a + sound_get_item_1 + text_end diff --git a/scripts/Route22_2.asm b/scripts/Route22_2.asm index 1cd23ed2..7f3fa54d 100755 --- a/scripts/Route22_2.asm +++ b/scripts/Route22_2.asm @@ -1,4 +1,4 @@ -Func_f1b27: +Func_f1b27:: CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE jr z, .asm_5118b ld hl, Route22RivalAfterBattleText1 @@ -12,14 +12,14 @@ Func_f1b27: ret Route22RivalBeforeBattleText1: - TX_FAR _Route22RivalBeforeBattleText1 - db "@" + text_far _Route22RivalBeforeBattleText1 + text_end Route22RivalAfterBattleText1: - TX_FAR _Route22RivalAfterBattleText1 - db "@" + text_far _Route22RivalAfterBattleText1 + text_end -Func_f1b47: +Func_f1b47:: CheckEvent EVENT_BEAT_ROUTE22_RIVAL_2ND_BATTLE jr z, .asm_511a4 ld hl, Route22RivalAfterBattleText2 @@ -33,18 +33,18 @@ Func_f1b47: ret Route22RivalBeforeBattleText2: - TX_FAR _Route22RivalBeforeBattleText2 - db "@" + text_far _Route22RivalBeforeBattleText2 + text_end Route22RivalAfterBattleText2: - TX_FAR _Route22RivalAfterBattleText2 - db "@" + text_far _Route22RivalAfterBattleText2 + text_end -Func_f1b67: +Func_f1b67:: ld hl, Route22FrontGateText_3c call PrintText ret Route22FrontGateText_3c: - TX_FAR _Route22FrontGateText - db "@" + text_far _Route22FrontGateText + text_end diff --git a/scripts/Route23.asm b/scripts/Route23.asm index 34d95b84..e5318862 100755 --- a/scripts/Route23.asm +++ b/scripts/Route23.asm @@ -32,20 +32,20 @@ Route23Script0: EventFlagBit c, EVENT_PASSED_EARTHBADGE_CHECK + 1, EVENT_PASSED_CASCADEBADGE_CHECK .asm_51224 ld a, [hli] - cp $ff + cp -1 ret z inc e dec c cp b jr nz, .asm_51224 - cp $23 + cp 35 jr nz, .asm_51237 ld a, [wXCoord] - cp $e + cp 14 ret nc .asm_51237 ld a, e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a ld a, c ld [wWhichBadge], a ld b, FLAG_TEST @@ -57,11 +57,18 @@ Route23Script0: call Route23Script_5125d call DisplayTextID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ret YCoordsData_51255: - db $23,$38,$55,$60,$69,$77,$88,$FF + db 35 + db 56 + db 85 + db 96 + db 105 + db 119 + db 136 + db -1 ; end Route23Script_5125d: ld hl, BadgeTextPointers @@ -142,43 +149,43 @@ Route23_TextPointers: dw Route23Text8 Route23Text1: - TX_ASM + text_asm EventFlagBit a, EVENT_PASSED_EARTHBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text2: - TX_ASM + text_asm EventFlagBit a, EVENT_PASSED_VOLCANOBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text3: - TX_ASM + text_asm EventFlagBit a, EVENT_PASSED_MARSHBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text4: - TX_ASM + text_asm EventFlagBit a, EVENT_PASSED_SOULBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text5: - TX_ASM + text_asm EventFlagBit a, EVENT_PASSED_RAINBOWBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text6: - TX_ASM + text_asm EventFlagBit a, EVENT_PASSED_THUNDERBADGE_CHECK, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd Route23Text7: - TX_ASM + text_asm EventFlagBit a, EVENT_PASSED_CASCADEBADGE_CHECK call Route23Script_51346 jp TextScriptEnd @@ -218,19 +225,19 @@ Route23Script_51388: jp PrintText VictoryRoadGuardText1: - TX_FAR _VictoryRoadGuardText1 - TX_ASM + text_far _VictoryRoadGuardText1 + text_asm ld a, SFX_DENIED call PlaySoundWaitForCurrent call WaitForSoundToFinish jp TextScriptEnd VictoryRoadGuardText2: - TX_FAR _VictoryRoadGuardText2 - TX_SFX_ITEM_1 - TX_FAR _VictoryRoadGuardText_513a3 - db "@" + text_far _VictoryRoadGuardText2 + sound_get_item_1 + text_far _VictoryRoadGuardText_513a3 + text_end Route23Text8: - TX_FAR _Route23Text8 - db "@" + text_far _Route23Text8 + text_end diff --git a/scripts/Route24.asm b/scripts/Route24.asm index 58f71981..fc4633e7 100755 --- a/scripts/Route24.asm +++ b/scripts/Route24.asm @@ -28,9 +28,9 @@ Route24Script0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID CheckAndResetEvent EVENT_NUGGET_REWARD_AVAILABLE ret z @@ -45,7 +45,8 @@ Route24Script0: ret CoordsData_5140e: - db $0F,$0A,$FF + dbmapcoord 10, 15 + db -1 ; end Route24Script4: ld a, [wSimulatedJoypadStatesIndex] @@ -66,7 +67,7 @@ Route24Script3: ld [wJoyIgnore], a SetEvent EVENT_BEAT_ROUTE24_ROCKET ld a, $1 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wJoyIgnore], a @@ -87,71 +88,29 @@ Route24_TextPointers: dw Route24Text8 Route24TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_0 - dw Route24BattleText1 ; TextBeforeBattle - dw Route24AfterBattleText1 ; TextAfterBattle - dw Route24EndBattleText1 ; TextEndBattle - dw Route24EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_24_TRAINER_0, 4, Route24BattleText1, Route24EndBattleText1, Route24AfterBattleText1 Route24TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_1 - db ($1 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_1 - dw Route24BattleText2 ; TextBeforeBattle - dw Route24AfterBattleText2 ; TextAfterBattle - dw Route24EndBattleText2 ; TextEndBattle - dw Route24EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_24_TRAINER_1, 1, Route24BattleText2, Route24EndBattleText2, Route24AfterBattleText2 Route24TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_2 - db ($1 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_2 - dw Route24BattleText3 ; TextBeforeBattle - dw Route24AfterBattleText3 ; TextAfterBattle - dw Route24EndBattleText3 ; TextEndBattle - dw Route24EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_24_TRAINER_2, 1, Route24BattleText3, Route24EndBattleText3, Route24AfterBattleText3 Route24TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_3 - db ($1 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_3 - dw Route24BattleText4 ; TextBeforeBattle - dw Route24AfterBattleText4 ; TextAfterBattle - dw Route24EndBattleText4 ; TextEndBattle - dw Route24EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_24_TRAINER_3, 1, Route24BattleText4, Route24EndBattleText4, Route24AfterBattleText4 Route24TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_4 - db ($1 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_4 - dw Route24BattleText5 ; TextBeforeBattle - dw Route24AfterBattleText5 ; TextAfterBattle - dw Route24EndBattleText5 ; TextEndBattle - dw Route24EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_24_TRAINER_4, 1, Route24BattleText5, Route24EndBattleText5, Route24AfterBattleText5 Route24TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_24_TRAINER_5 - db ($1 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_24_TRAINER_5 - dw Route24BattleText6 ; TextBeforeBattle - dw Route24AfterBattleText6 ; TextAfterBattle - dw Route24EndBattleText6 ; TextEndBattle - dw Route24EndBattleText6 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_24_TRAINER_5, 1, Route24BattleText6, Route24EndBattleText6, Route24AfterBattleText6 + db -1 ; end Route24Text1: - TX_ASM + text_asm ResetEvent EVENT_NUGGET_REWARD_AVAILABLE CheckEvent EVENT_GOT_NUGGET - jr nz, .asm_514f9 + jr nz, .got_item ld hl, Route24Text_51510 call PrintText lb bc, NUGGET, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full SetEvent EVENT_GOT_NUGGET ld hl, Route24Text_5151a call PrintText @@ -163,164 +122,164 @@ Route24Text1: ld hl, Route24Text_5152b ld de, Route24Text_5152b call SaveEndBattleTextPointers - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ld [wRoute24CurScript], a ld [wCurMapScript], a jp TextScriptEnd -.asm_514f9 +.got_item ld hl, Route24Text_51530 call PrintText jp TextScriptEnd -.BagFull +.bag_full ld hl, Route24Text_51521 call PrintText SetEvent EVENT_NUGGET_REWARD_AVAILABLE jp TextScriptEnd Route24Text_51510: - TX_FAR _Route24Text_51510 - TX_SFX_ITEM_1 - TX_FAR _Route24Text_51515 - db "@" + text_far _Route24Text_51510 + sound_get_item_1 + text_far _Route24Text_51515 + text_end Route24Text_5151a: - TX_FAR _Route24Text_5151a - TX_SFX_KEY_ITEM - TX_BLINK - db "@" + text_far _Route24Text_5151a + sound_get_key_item + text_promptbutton + text_end Route24Text_51521: - TX_FAR _Route24Text_51521 - db "@" + text_far _Route24Text_51521 + text_end Route24Text_51526: - TX_FAR _Route24Text_51526 - db "@" + text_far _Route24Text_51526 + text_end Route24Text_5152b: - TX_FAR _Route24Text_5152b - db "@" + text_far _Route24Text_5152b + text_end Route24Text_51530: - TX_FAR _Route24Text_51530 - db "@" + text_far _Route24Text_51530 + text_end Route24Text2: - TX_ASM + text_asm ld hl, Route24TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route24Text3: - TX_ASM + text_asm ld hl, Route24TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route24Text4: - TX_ASM + text_asm ld hl, Route24TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route24Text5: - TX_ASM + text_asm ld hl, Route24TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route24Text6: - TX_ASM + text_asm ld hl, Route24TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route24Text7: - TX_ASM + text_asm ld hl, Route24TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route24BattleText1: - TX_FAR _Route24BattleText1 - db "@" + text_far _Route24BattleText1 + text_end Route24EndBattleText1: - TX_FAR _Route24EndBattleText1 - db "@" + text_far _Route24EndBattleText1 + text_end Route24AfterBattleText1: - TX_FAR _Route24AfterBattleText1 - db "@" + text_far _Route24AfterBattleText1 + text_end Route24BattleText2: - TX_FAR _Route24BattleText2 - db "@" + text_far _Route24BattleText2 + text_end Route24EndBattleText2: - TX_FAR _Route24EndBattleText2 - db "@" + text_far _Route24EndBattleText2 + text_end Route24AfterBattleText2: - TX_FAR _Route24AfterBattleText2 - db "@" + text_far _Route24AfterBattleText2 + text_end Route24BattleText3: - TX_FAR _Route24BattleText3 - db "@" + text_far _Route24BattleText3 + text_end Route24EndBattleText3: - TX_FAR _Route24EndBattleText3 - db "@" + text_far _Route24EndBattleText3 + text_end Route24AfterBattleText3: - TX_FAR _Route24AfterBattleText3 - db "@" + text_far _Route24AfterBattleText3 + text_end Route24BattleText4: - TX_FAR _Route24BattleText4 - db "@" + text_far _Route24BattleText4 + text_end Route24EndBattleText4: - TX_FAR _Route24EndBattleText4 - db "@" + text_far _Route24EndBattleText4 + text_end Route24AfterBattleText4: - TX_FAR _Route24AfterBattleText4 - db "@" + text_far _Route24AfterBattleText4 + text_end Route24BattleText5: - TX_FAR _Route24BattleText5 - db "@" + text_far _Route24BattleText5 + text_end Route24EndBattleText5: - TX_FAR _Route24EndBattleText5 - db "@" + text_far _Route24EndBattleText5 + text_end Route24AfterBattleText5: - TX_FAR _Route24AfterBattleText5 - db "@" + text_far _Route24AfterBattleText5 + text_end Route24BattleText6: - TX_FAR _Route24BattleText6 - db "@" + text_far _Route24BattleText6 + text_end Route24EndBattleText6: - TX_FAR _Route24EndBattleText6 - db "@" + text_far _Route24EndBattleText6 + text_end Route24AfterBattleText6: - TX_FAR _Route24AfterBattleText6 - db "@" + text_far _Route24AfterBattleText6 + text_end Route24Text8: - TX_ASM + text_asm CheckEvent EVENT_54F jr nz, .asm_515d5 ld hl, Route24Text_515de @@ -359,19 +318,18 @@ Route24Text8: jp TextScriptEnd Route24Text_515de: - TX_FAR _Route24DamianText1 - db "@" + text_far _Route24DamianText1 + text_end Route24Text_515e3: - TX_FAR _Route24DamianText2 - db $d - db "@" + text_far _Route24DamianText2 + text_waitbutton + text_end Route24Text_515e9: - TX_FAR _Route24DamianText3 - db "@" + text_far _Route24DamianText3 + text_end Route24Text_515ee: - TX_FAR _Route24DamianText4 - db "@" - + text_far _Route24DamianText4 + text_end diff --git a/scripts/Route25.asm b/scripts/Route25.asm index c3c11ed5..400ac9ed 100755 --- a/scripts/Route25.asm +++ b/scripts/Route25.asm @@ -65,250 +65,187 @@ Route25_TextPointers: dw Route25Text11 Route25TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_0 - dw Route25BattleText1 ; TextBeforeBattle - dw Route25AfterBattleText1 ; TextAfterBattle - dw Route25EndBattleText1 ; TextEndBattle - dw Route25EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_25_TRAINER_0, 2, Route25BattleText1, Route25EndBattleText1, Route25AfterBattleText1 Route25TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_1 - dw Route25BattleText2 ; TextBeforeBattle - dw Route25AfterBattleText2 ; TextAfterBattle - dw Route25EndBattleText2 ; TextEndBattle - dw Route25EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_25_TRAINER_1, 3, Route25BattleText2, Route25EndBattleText2, Route25AfterBattleText2 Route25TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_2 - dw Route25BattleText3 ; TextBeforeBattle - dw Route25AfterBattleText3 ; TextAfterBattle - dw Route25EndBattleText3 ; TextEndBattle - dw Route25EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_25_TRAINER_2, 3, Route25BattleText3, Route25EndBattleText3, Route25AfterBattleText3 Route25TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_3 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_3 - dw Route25BattleText4 ; TextBeforeBattle - dw Route25AfterBattleText4 ; TextAfterBattle - dw Route25EndBattleText4 ; TextEndBattle - dw Route25EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_25_TRAINER_3, 2, Route25BattleText4, Route25EndBattleText4, Route25AfterBattleText4 Route25TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_4 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_4 - dw Route25BattleText5 ; TextBeforeBattle - dw Route25AfterBattleText5 ; TextAfterBattle - dw Route25EndBattleText5 ; TextEndBattle - dw Route25EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_25_TRAINER_4, 4, Route25BattleText5, Route25EndBattleText5, Route25AfterBattleText5 Route25TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_5 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_5 - dw Route25BattleText6 ; TextBeforeBattle - dw Route25AfterBattleText6 ; TextAfterBattle - dw Route25EndBattleText6 ; TextEndBattle - dw Route25EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_25_TRAINER_5, 4, Route25BattleText6, Route25EndBattleText6, Route25AfterBattleText6 Route25TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_6 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_6 - dw Route25BattleText7 ; TextBeforeBattle - dw Route25AfterBattleText7 ; TextAfterBattle - dw Route25EndBattleText7 ; TextEndBattle - dw Route25EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_25_TRAINER_6, 3, Route25BattleText7, Route25EndBattleText7, Route25AfterBattleText7 Route25TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_7, 1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_7, 1 - dw Route25BattleText8 ; TextBeforeBattle - dw Route25AfterBattleText8 ; TextAfterBattle - dw Route25EndBattleText8 ; TextEndBattle - dw Route25EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_25_TRAINER_7, 1, 2, Route25BattleText8, Route25EndBattleText8, Route25AfterBattleText8 Route25TrainerHeader8: - dbEventFlagBit EVENT_BEAT_ROUTE_25_TRAINER_8, 1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_25_TRAINER_8, 1 - dw Route25BattleText9 ; TextBeforeBattle - dw Route25AfterBattleText9 ; TextAfterBattle - dw Route25EndBattleText9 ; TextEndBattle - dw Route25EndBattleText9 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_25_TRAINER_8, 1, 2, Route25BattleText9, Route25EndBattleText9, Route25AfterBattleText9 + db -1 ; end Route25Text1: - TX_ASM + text_asm ld hl, Route25TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route25Text2: - TX_ASM + text_asm ld hl, Route25TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route25Text3: - TX_ASM + text_asm ld hl, Route25TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route25Text4: - TX_ASM + text_asm ld hl, Route25TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route25Text5: - TX_ASM + text_asm ld hl, Route25TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route25Text6: - TX_ASM + text_asm ld hl, Route25TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route25Text7: - TX_ASM + text_asm ld hl, Route25TrainerHeader6 call TalkToTrainer jp TextScriptEnd Route25Text8: - TX_ASM + text_asm ld hl, Route25TrainerHeader7 call TalkToTrainer jp TextScriptEnd Route25Text9: - TX_ASM + text_asm ld hl, Route25TrainerHeader8 call TalkToTrainer jp TextScriptEnd Route25BattleText1: - TX_FAR _Route25BattleText1 - db "@" + text_far _Route25BattleText1 + text_end Route25EndBattleText1: - TX_FAR _Route25EndBattleText1 - db "@" + text_far _Route25EndBattleText1 + text_end Route25AfterBattleText1: - TX_FAR _Route25AfterBattleText1 - db "@" + text_far _Route25AfterBattleText1 + text_end Route25BattleText2: - TX_FAR _Route25BattleText2 - db "@" + text_far _Route25BattleText2 + text_end Route25EndBattleText2: - TX_FAR _Route25EndBattleText2 - db "@" + text_far _Route25EndBattleText2 + text_end Route25AfterBattleText2: - TX_FAR _Route25AfterBattleText2 - db "@" + text_far _Route25AfterBattleText2 + text_end Route25BattleText3: - TX_FAR _Route25BattleText3 - db "@" + text_far _Route25BattleText3 + text_end Route25EndBattleText3: - TX_FAR _Route25EndBattleText3 - db "@" + text_far _Route25EndBattleText3 + text_end Route25AfterBattleText3: - TX_FAR _Route25AfterBattleText3 - db "@" + text_far _Route25AfterBattleText3 + text_end Route25BattleText4: - TX_FAR _Route25BattleText4 - db "@" + text_far _Route25BattleText4 + text_end Route25EndBattleText4: - TX_FAR _Route25EndBattleText4 - db "@" + text_far _Route25EndBattleText4 + text_end Route25AfterBattleText4: - TX_FAR _Route25AfterBattleText4 - db "@" + text_far _Route25AfterBattleText4 + text_end Route25BattleText5: - TX_FAR _Route25BattleText5 - db "@" + text_far _Route25BattleText5 + text_end Route25EndBattleText5: - TX_FAR _Route25EndBattleText5 - db "@" + text_far _Route25EndBattleText5 + text_end Route25AfterBattleText5: - TX_FAR _Route25AfterBattleText5 - db "@" + text_far _Route25AfterBattleText5 + text_end Route25BattleText6: - TX_FAR _Route25BattleText6 - db "@" + text_far _Route25BattleText6 + text_end Route25EndBattleText6: - TX_FAR _Route25EndBattleText6 - db "@" + text_far _Route25EndBattleText6 + text_end Route25AfterBattleText6: - TX_FAR _Route25AfterBattleText6 - db "@" + text_far _Route25AfterBattleText6 + text_end Route25BattleText7: - TX_FAR _Route25BattleText7 - db "@" + text_far _Route25BattleText7 + text_end Route25EndBattleText7: - TX_FAR _Route25EndBattleText7 - db "@" + text_far _Route25EndBattleText7 + text_end Route25AfterBattleText7: - TX_FAR _Route25AfterBattleText7 - db "@" + text_far _Route25AfterBattleText7 + text_end Route25BattleText8: - TX_FAR _Route25BattleText8 - db "@" + text_far _Route25BattleText8 + text_end Route25EndBattleText8: - TX_FAR _Route25EndBattleText8 - db "@" + text_far _Route25EndBattleText8 + text_end Route25AfterBattleText8: - TX_FAR _Route25AfterBattleText8 - db "@" + text_far _Route25AfterBattleText8 + text_end Route25BattleText9: - TX_FAR _Route25BattleText9 - db "@" + text_far _Route25BattleText9 + text_end Route25EndBattleText9: - TX_FAR _Route25EndBattleText9 - db "@" + text_far _Route25EndBattleText9 + text_end Route25AfterBattleText9: - TX_FAR _Route25AfterBattleText9 - db "@" + text_far _Route25AfterBattleText9 + text_end Route25Text11: - TX_FAR _Route25Text11 - db "@" + text_far _Route25Text11 + text_end diff --git a/scripts/Route2Gate.asm b/scripts/Route2Gate.asm index 70d93814..60f6ffe1 100755 --- a/scripts/Route2Gate.asm +++ b/scripts/Route2Gate.asm @@ -6,13 +6,13 @@ Route2Gate_TextPointers: dw Route2GateText2 Route2GateText1: - TX_ASM + text_asm CheckEvent EVENT_GOT_HM05 - jr nz, .asm_5d60d - ld a, 10 ; pokemon needed - ld [hOaksAideRequirement], a - ld a, HM_05 ; oak's aide reward - ld [hOaksAideRewardItem], a + jr nz, .got_item + ld a, 10 + ldh [hOaksAideRequirement], a + ld a, HM_FLASH + ldh [hOaksAideRewardItem], a ld [wd11e], a call GetItemName ld hl, wcd6d @@ -20,20 +20,20 @@ Route2GateText1: ld bc, ITEM_NAME_LENGTH call CopyData predef OaksAideScript - ld a, [hOaksAideResult] - cp $1 - jr nz, .asm_5d613 + ldh a, [hOaksAideResult] + cp OAKS_AIDE_GOT_ITEM + jr nz, .no_item SetEvent EVENT_GOT_HM05 -.asm_5d60d +.got_item ld hl, Route2GateText_5d616 call PrintText -.asm_5d613 +.no_item jp TextScriptEnd Route2GateText_5d616: - TX_FAR _Route2GateText_5d616 - db "@" + text_far _Route2GateText_5d616 + text_end Route2GateText2: - TX_FAR _Route2GateText2 - db "@" + text_far _Route2GateText2 + text_end diff --git a/scripts/Route2TradeHouse.asm b/scripts/Route2TradeHouse.asm index a89e2fe9..85ed2d34 100755 --- a/scripts/Route2TradeHouse.asm +++ b/scripts/Route2TradeHouse.asm @@ -6,12 +6,12 @@ Route2TradeHouse_TextPointers: dw Route2HouseText2 Route2HouseText1: - TX_FAR _Route2HouseText1 - db "@" + text_far _Route2HouseText1 + text_end Route2HouseText2: - TX_ASM - ld a, $1 + text_asm + ld a, TRADE_FOR_MARCEL ld [wWhichTrade], a predef DoInGameTradeDialogue jp TextScriptEnd diff --git a/scripts/Route3.asm b/scripts/Route3.asm index d55831bf..74140b40 100755 --- a/scripts/Route3.asm +++ b/scripts/Route3.asm @@ -25,227 +25,171 @@ Route3_TextPointers: dw Route3Text10 Route3TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_0 - dw Route3BattleText1 ; TextBeforeBattle - dw Route3AfterBattleText1 ; TextAfterBattle - dw Route3EndBattleText1 ; TextEndBattle - dw Route3EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_3_TRAINER_0, 2, Route3BattleText1, Route3EndBattleText1, Route3AfterBattleText1 Route3TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_1 - dw Route3BattleText2 ; TextBeforeBattle - dw Route3AfterBattleText2 ; TextAfterBattle - dw Route3EndBattleText2 ; TextEndBattle - dw Route3EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_3_TRAINER_1, 3, Route3BattleText2, Route3EndBattleText2, Route3AfterBattleText2 Route3TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_2 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_2 - dw Route3BattleText3 ; TextBeforeBattle - dw Route3AfterBattleText3 ; TextAfterBattle - dw Route3EndBattleText3 ; TextEndBattle - dw Route3EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_3_TRAINER_2, 2, Route3BattleText3, Route3EndBattleText3, Route3AfterBattleText3 Route3TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_3 - db ($1 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_3 - dw Route3BattleText4 ; TextBeforeBattle - dw Route3AfterBattleText4 ; TextAfterBattle - dw Route3EndBattleText4 ; TextEndBattle - dw Route3EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_3_TRAINER_3, 1, Route3BattleText4, Route3EndBattleText4, Route3AfterBattleText4 Route3TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_4 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_4 - dw Route3BattleText5 ; TextBeforeBattle - dw Route3AfterBattleText5 ; TextAfterBattle - dw Route3EndBattleText5 ; TextEndBattle - dw Route3EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_3_TRAINER_4, 4, Route3BattleText5, Route3EndBattleText5, Route3AfterBattleText5 Route3TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_5 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_5 - dw Route3BattleText6 ; TextBeforeBattle - dw Route3AfterBattleText6 ; TextAfterBattle - dw Route3EndBattleText6 ; TextEndBattle - dw Route3EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_3_TRAINER_5, 3, Route3BattleText6, Route3EndBattleText6, Route3AfterBattleText6 Route3TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_6, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_6, 1 - dw Route3BattleText7 ; TextBeforeBattle - dw Route3AfterBattleText7 ; TextAfterBattle - dw Route3EndBattleText7 ; TextEndBattle - dw Route3EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_3_TRAINER_6, 1, 3, Route3BattleText7, Route3EndBattleText7, Route3AfterBattleText7 Route3TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_3_TRAINER_7, 1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_3_TRAINER_7, 1 - dw Route3BattleText8 ; TextBeforeBattle - dw Route3AfterBattleText8 ; TextAfterBattle - dw Route3EndBattleText8 ; TextEndBattle - dw Route3EndBattleText8 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_3_TRAINER_7, 1, 2, Route3BattleText8, Route3EndBattleText8, Route3AfterBattleText8 + db -1 ; end Route3Text1: - TX_FAR _Route3Text1 - db "@" + text_far _Route3Text1 + text_end Route3Text2: - TX_ASM + text_asm ld hl, Route3TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route3BattleText1: - TX_FAR _Route3BattleText1 - db "@" + text_far _Route3BattleText1 + text_end Route3EndBattleText1: - TX_FAR _Route3EndBattleText1 - db "@" + text_far _Route3EndBattleText1 + text_end Route3AfterBattleText1: - TX_FAR _Route3AfterBattleText1 - db "@" + text_far _Route3AfterBattleText1 + text_end Route3Text3: - TX_ASM + text_asm ld hl, Route3TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route3BattleText2: - TX_FAR _Route3BattleText2 - db "@" + text_far _Route3BattleText2 + text_end Route3EndBattleText2: - TX_FAR _Route3EndBattleText2 - db "@" + text_far _Route3EndBattleText2 + text_end Route3AfterBattleText2: - TX_FAR _Route3AfterBattleText2 - db "@" + text_far _Route3AfterBattleText2 + text_end Route3Text4: - TX_ASM + text_asm ld hl, Route3TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route3BattleText3: - TX_FAR _Route3BattleText3 - db "@" + text_far _Route3BattleText3 + text_end Route3EndBattleText3: - TX_FAR _Route3EndBattleText3 - db "@" + text_far _Route3EndBattleText3 + text_end Route3AfterBattleText3: - TX_FAR _Route3AfterBattleText3 - db "@" + text_far _Route3AfterBattleText3 + text_end Route3Text5: - TX_ASM + text_asm ld hl, Route3TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route3BattleText4: - TX_FAR _Route3BattleText4 - db "@" + text_far _Route3BattleText4 + text_end Route3EndBattleText4: - TX_FAR _Route3EndBattleText4 - db "@" + text_far _Route3EndBattleText4 + text_end Route3AfterBattleText4: - TX_FAR _Route3AfterBattleText4 - db "@" + text_far _Route3AfterBattleText4 + text_end Route3Text6: - TX_ASM + text_asm ld hl, Route3TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route3BattleText5: - TX_FAR _Route3BattleText5 - db "@" + text_far _Route3BattleText5 + text_end Route3EndBattleText5: - TX_FAR _Route3EndBattleText5 - db "@" + text_far _Route3EndBattleText5 + text_end Route3AfterBattleText5: - TX_FAR _Route3AfterBattleText5 - db "@" + text_far _Route3AfterBattleText5 + text_end Route3Text7: - TX_ASM + text_asm ld hl, Route3TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route3BattleText6: - TX_FAR _Route3BattleText6 - db "@" + text_far _Route3BattleText6 + text_end Route3EndBattleText6: - TX_FAR _Route3EndBattleText6 - db "@" + text_far _Route3EndBattleText6 + text_end Route3AfterBattleText6: - TX_FAR _Route3AfterBattleText6 - db "@" + text_far _Route3AfterBattleText6 + text_end Route3Text8: - TX_ASM + text_asm ld hl, Route3TrainerHeader6 call TalkToTrainer jp TextScriptEnd Route3BattleText7: - TX_FAR _Route3BattleText7 - db "@" + text_far _Route3BattleText7 + text_end Route3EndBattleText7: - TX_FAR _Route3EndBattleText7 - db "@" + text_far _Route3EndBattleText7 + text_end Route3AfterBattleText7: - TX_FAR _Route3AfterBattleText7 - db "@" + text_far _Route3AfterBattleText7 + text_end Route3Text9: - TX_ASM + text_asm ld hl, Route3TrainerHeader7 call TalkToTrainer jp TextScriptEnd Route3BattleText8: - TX_FAR _Route3BattleText8 - db "@" + text_far _Route3BattleText8 + text_end Route3EndBattleText8: - TX_FAR _Route3EndBattleText8 - db "@" + text_far _Route3EndBattleText8 + text_end Route3AfterBattleText8: - TX_FAR _Route3AfterBattleText8 - db "@" + text_far _Route3AfterBattleText8 + text_end Route3Text10: - TX_FAR _Route3Text10 - db "@" + text_far _Route3Text10 + text_end diff --git a/scripts/Route4.asm b/scripts/Route4.asm index 9b04a47a..b69a88c7 100755 --- a/scripts/Route4.asm +++ b/scripts/Route4.asm @@ -21,42 +21,35 @@ Route4_TextPointers: dw Route4Text6 Route4TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_4_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_4_TRAINER_0 - dw Route4BattleText1 ; TextBeforeBattle - dw Route4AfterBattleText1 ; TextAfterBattle - dw Route4EndBattleText1 ; TextEndBattle - dw Route4EndBattleText1 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_4_TRAINER_0, 3, Route4BattleText1, Route4EndBattleText1, Route4AfterBattleText1 + db -1 ; end Route4Text1: - TX_FAR _Route4Text1 - db "@" + text_far _Route4Text1 + text_end Route4Text2: - TX_ASM + text_asm ld hl, Route4TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route4BattleText1: - TX_FAR _Route4BattleText1 - db "@" + text_far _Route4BattleText1 + text_end Route4EndBattleText1: - TX_FAR _Route4EndBattleText1 - db "@" + text_far _Route4EndBattleText1 + text_end Route4AfterBattleText1: - TX_FAR _Route4AfterBattleText1 - db "@" + text_far _Route4AfterBattleText1 + text_end Route4Text5: - TX_FAR _Route4Text5 - db "@" + text_far _Route4Text5 + text_end Route4Text6: - TX_FAR _Route4Text6 - db "@" + text_far _Route4Text6 + text_end diff --git a/scripts/Route5.asm b/scripts/Route5.asm index 1b2bd242..33f3c345 100755 --- a/scripts/Route5.asm +++ b/scripts/Route5.asm @@ -5,5 +5,5 @@ Route5_TextPointers: dw Route5Text1 Route5Text1: - TX_FAR _Route5Text1 - db "@" + text_far _Route5Text1 + text_end diff --git a/scripts/Route5Gate.asm b/scripts/Route5Gate.asm index bc763dfd..e155694a 100755 --- a/scripts/Route5Gate.asm +++ b/scripts/Route5Gate.asm @@ -25,13 +25,13 @@ Route5GateScript0: ld a, PLAYER_DIR_LEFT ld [wPlayerMovingDirection], a xor a - ld [hJoyHeld], a - callba RemoveGuardDrink - ld a, [$ffdb] + ldh [hJoyHeld], a + farcall RemoveGuardDrink + ldh a, [hItemToRemoveID] and a jr nz, .asm_1df82 ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Route5GateScript_1df43 ld a, $1 @@ -39,16 +39,16 @@ Route5GateScript0: ret .asm_1df82 ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd728 set 6, [hl] ret CoordsData_1df8f: - db 3,3 - db 3,4 - db $ff + dbmapcoord 3, 3 + dbmapcoord 4, 3 + db -1 ; end Route5GateScript1: ld a, [wSimulatedJoypadStatesIndex] @@ -69,12 +69,12 @@ Route8GateText1: Route7GateText1: Route6GateText1: Route5GateText1: - TX_ASM + text_asm ld a, [wd728] bit 6, a jr nz, .asm_88856 - callba RemoveGuardDrink - ld a, [$ffdb] + farcall RemoveGuardDrink + ldh a, [hItemToRemoveID] and a jr nz, .asm_768a2 ld hl, Route5GateText2 @@ -98,20 +98,20 @@ Route8GateText2: Route7GateText2: Route6GateText2: Route5GateText2: - TX_FAR _SaffronGateText_1dfe7 - db "@" + text_far _SaffronGateText_1dfe7 + text_end Route8GateText3: Route7GateText3: Route6GateText3: Route5GateText3: - TX_FAR _SaffronGateText_8aaa9 - TX_SFX_KEY_ITEM - TX_FAR _SaffronGateText_1dff1 - db "@" + text_far _SaffronGateText_8aaa9 + sound_get_key_item + text_far _SaffronGateText_1dff1 + text_end SaffronGateText_1dff6: - TX_FAR _SaffronGateText_1dff6 - db "@" + text_far _SaffronGateText_1dff6 + text_end diff --git a/scripts/Route6.asm b/scripts/Route6.asm index 6ee3f317..01d5414d 100755 --- a/scripts/Route6.asm +++ b/scripts/Route6.asm @@ -22,169 +22,127 @@ Route6_TextPointers: dw Route6Text7 Route6TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_0 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_0 - dw Route6BattleText1 ; TextBeforeBattle - dw Route6AfterBattleText1 ; TextAfterBattle - dw Route6EndBattleText1 ; TextEndBattle - dw Route6EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_6_TRAINER_0, 0, Route6BattleText1, Route6EndBattleText1, Route6AfterBattleText1 Route6TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_1 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_1 - dw Route6BattleText2 ; TextBeforeBattle - dw Route6AfterBattleText2 ; TextAfterBattle - dw Route6EndBattleText2 ; TextEndBattle - dw Route6EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_6_TRAINER_1, 0, Route6BattleText2, Route6EndBattleText2, Route6AfterBattleText2 Route6TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_2 - dw Route6BattleText3 ; TextBeforeBattle - dw Route6AfterBattleText3 ; TextAfterBattle - dw Route6EndBattleText3 ; TextEndBattle - dw Route6EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_6_TRAINER_2, 4, Route6BattleText3, Route6EndBattleText3, Route6AfterBattleText3 Route6TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_3 - dw Route6BattleText4 ; TextBeforeBattle - dw Route6AfterBattleText4 ; TextAfterBattle - dw Route6EndBattleText4 ; TextEndBattle - dw Route6EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_6_TRAINER_3, 3, Route6BattleText4, Route6EndBattleText4, Route6AfterBattleText4 Route6TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_4 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_4 - dw Route6BattleText5 ; TextBeforeBattle - dw Route6AfterBattleText5 ; TextAfterBattle - dw Route6EndBattleText5 ; TextEndBattle - dw Route6EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_6_TRAINER_4, 3, Route6BattleText5, Route6EndBattleText5, Route6AfterBattleText5 Route6TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_6_TRAINER_5 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_6_TRAINER_5 - dw Route6BattleText6 ; TextBeforeBattle - dw Route6AfterBattleText6 ; TextAfterBattle - dw Route6EndBattleText6 ; TextEndBattle - dw Route6EndBattleText6 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_6_TRAINER_5, 3, Route6BattleText6, Route6EndBattleText6, Route6AfterBattleText6 + db -1 ; end Route6Text1: - TX_ASM + text_asm ld hl, Route6TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route6BattleText1: - TX_FAR _Route6BattleText1 - db "@" + text_far _Route6BattleText1 + text_end Route6EndBattleText1: - TX_FAR _Route6EndBattleText1 - db "@" + text_far _Route6EndBattleText1 + text_end Route6AfterBattleText1: - TX_FAR _Route6AfterBattleText1 - db "@" + text_far _Route6AfterBattleText1 + text_end Route6Text2: - TX_ASM + text_asm ld hl, Route6TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route6BattleText2: - TX_FAR _Route6BattleText2 - db "@" + text_far _Route6BattleText2 + text_end Route6EndBattleText2: - TX_FAR _Route6EndBattleText2 - db "@" + text_far _Route6EndBattleText2 + text_end Route6AfterBattleText2: - TX_FAR _Route6AfterBattleText2 - db "@" + text_far _Route6AfterBattleText2 + text_end Route6Text3: - TX_ASM + text_asm ld hl, Route6TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route6BattleText3: - TX_FAR _Route6BattleText3 - db "@" + text_far _Route6BattleText3 + text_end Route6EndBattleText3: - TX_FAR _Route6EndBattleText3 - db "@" + text_far _Route6EndBattleText3 + text_end Route6AfterBattleText3: - TX_FAR _Route6AfterBattleText3 - db "@" + text_far _Route6AfterBattleText3 + text_end Route6Text4: - TX_ASM + text_asm ld hl, Route6TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route6BattleText4: - TX_FAR _Route6BattleText4 - db "@" + text_far _Route6BattleText4 + text_end Route6EndBattleText4: - TX_FAR _Route6EndBattleText4 - db "@" + text_far _Route6EndBattleText4 + text_end Route6AfterBattleText4: - TX_FAR _Route6AfterBattleText4 - db "@" + text_far _Route6AfterBattleText4 + text_end Route6Text5: - TX_ASM + text_asm ld hl, Route6TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route6BattleText5: - TX_FAR _Route6BattleText5 - db "@" + text_far _Route6BattleText5 + text_end Route6EndBattleText5: - TX_FAR _Route6EndBattleText5 - db "@" + text_far _Route6EndBattleText5 + text_end Route6AfterBattleText5: - TX_FAR _Route6AfterBattleText5 - db "@" + text_far _Route6AfterBattleText5 + text_end Route6Text6: - TX_ASM + text_asm ld hl, Route6TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route6BattleText6: - TX_FAR _Route6BattleText6 - db "@" + text_far _Route6BattleText6 + text_end Route6EndBattleText6: - TX_FAR _Route6EndBattleText6 - db "@" + text_far _Route6EndBattleText6 + text_end Route6AfterBattleText6: - TX_FAR _Route6AfterBattleText6 - db "@" + text_far _Route6AfterBattleText6 + text_end Route6Text7: - TX_FAR _Route6Text7 - db "@" + text_far _Route6Text7 + text_end diff --git a/scripts/Route6Gate.asm b/scripts/Route6Gate.asm index 348f61ac..143f60ae 100755 --- a/scripts/Route6Gate.asm +++ b/scripts/Route6Gate.asm @@ -19,13 +19,13 @@ Route6GateScript0: ld a, PLAYER_DIR_RIGHT ld [wPlayerMovingDirection], a xor a - ld [hJoyHeld], a - callba RemoveGuardDrink - ld a, [$ffdb] + ldh [hJoyHeld], a + farcall RemoveGuardDrink + ldh a, [hItemToRemoveID] and a jr nz, .asm_1e080 ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Route6GateScript_1e0a1 ld a, $1 @@ -35,12 +35,13 @@ Route6GateScript0: ld hl, wd728 set 6, [hl] ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID CoordsData_1e08c: - db $02,$03 - db $02,$04,$FF + dbmapcoord 3, 2 + dbmapcoord 4, 2 + db -1 ; end Route6GateScript1: ld a, [wSimulatedJoypadStatesIndex] @@ -60,7 +61,7 @@ Route6GateScript_1e0a1: ld a, $1 ld [wSimulatedJoypadStatesIndex], a xor a - ld [wSpriteStateData2 + $06], a + ld [wSpritePlayerStateData2MovementByte1], a ld [wOverrideSimulatedJoypadStatesMask], a ret diff --git a/scripts/Route7.asm b/scripts/Route7.asm index 27d07a7a..648cbb58 100755 --- a/scripts/Route7.asm +++ b/scripts/Route7.asm @@ -6,5 +6,5 @@ Route7_TextPointers: dw Route7Text1 Route7Text1: - TX_FAR _Route7Text1 - db "@" + text_far _Route7Text1 + text_end diff --git a/scripts/Route7Gate.asm b/scripts/Route7Gate.asm index 724172c5..9a647965 100755 --- a/scripts/Route7Gate.asm +++ b/scripts/Route7Gate.asm @@ -17,7 +17,7 @@ Route7GateScript_1e111: ld a, $1 ld [wSimulatedJoypadStatesIndex], a xor a - ld [wSpriteStateData2 + $06], a + ld [wSpritePlayerStateData2MovementByte1], a ld [wOverrideSimulatedJoypadStatesMask], a ret @@ -31,13 +31,13 @@ Route7GateScript0: ld a, PLAYER_DIR_UP ld [wPlayerMovingDirection], a xor a - ld [hJoyHeld], a - callba RemoveGuardDrink - ld a, [$ffdb] + ldh [hJoyHeld], a + farcall RemoveGuardDrink + ldh a, [hItemToRemoveID] and a jr nz, .asm_1e15a ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Route7GateScript_1e111 ld a, $1 @@ -45,16 +45,16 @@ Route7GateScript0: ret .asm_1e15a ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wd728 set 6, [hl] ret CoordsData_1e167: - db 3,3 - db 4,3 - db $ff + dbmapcoord 3, 3 + dbmapcoord 3, 4 + db -1 ; end Route7GateScript1: ld a, [wSimulatedJoypadStatesIndex] diff --git a/scripts/Route8.asm b/scripts/Route8.asm index f3388505..f50167c0 100755 --- a/scripts/Route8.asm +++ b/scripts/Route8.asm @@ -25,250 +25,187 @@ Route8_TextPointers: dw Route8Text10 Route8TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_0 - dw Route8BattleText1 ; TextBeforeBattle - dw Route8AfterBattleText1 ; TextAfterBattle - dw Route8EndBattleText1 ; TextEndBattle - dw Route8EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_8_TRAINER_0, 4, Route8BattleText1, Route8EndBattleText1, Route8AfterBattleText1 Route8TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_1 - dw Route8BattleText2 ; TextBeforeBattle - dw Route8AfterBattleText2 ; TextAfterBattle - dw Route8EndBattleText2 ; TextEndBattle - dw Route8EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_8_TRAINER_1, 4, Route8BattleText2, Route8EndBattleText2, Route8AfterBattleText2 Route8TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_2 - dw Route8BattleText3 ; TextBeforeBattle - dw Route8AfterBattleText3 ; TextAfterBattle - dw Route8EndBattleText3 ; TextEndBattle - dw Route8EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_8_TRAINER_2, 4, Route8BattleText3, Route8EndBattleText3, Route8AfterBattleText3 Route8TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_3 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_3 - dw Route8BattleText4 ; TextBeforeBattle - dw Route8AfterBattleText4 ; TextAfterBattle - dw Route8EndBattleText4 ; TextEndBattle - dw Route8EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_8_TRAINER_3, 2, Route8BattleText4, Route8EndBattleText4, Route8AfterBattleText4 Route8TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_4 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_4 - dw Route8BattleText5 ; TextBeforeBattle - dw Route8AfterBattleText5 ; TextAfterBattle - dw Route8EndBattleText5 ; TextEndBattle - dw Route8EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_8_TRAINER_4, 3, Route8BattleText5, Route8EndBattleText5, Route8AfterBattleText5 Route8TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_5 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_5 - dw Route8BattleText6 ; TextBeforeBattle - dw Route8AfterBattleText6 ; TextAfterBattle - dw Route8EndBattleText6 ; TextEndBattle - dw Route8EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_8_TRAINER_5, 3, Route8BattleText6, Route8EndBattleText6, Route8AfterBattleText6 Route8TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_6 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_6 - dw Route8BattleText7 ; TextBeforeBattle - dw Route8AfterBattleText7 ; TextAfterBattle - dw Route8EndBattleText7 ; TextEndBattle - dw Route8EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_8_TRAINER_6, 2, Route8BattleText7, Route8EndBattleText7, Route8AfterBattleText7 Route8TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_7, 1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_7, 1 - dw Route8BattleText8 ; TextBeforeBattle - dw Route8AfterBattleText8 ; TextAfterBattle - dw Route8EndBattleText8 ; TextEndBattle - dw Route8EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_8_TRAINER_7, 1, 2, Route8BattleText8, Route8EndBattleText8, Route8AfterBattleText8 Route8TrainerHeader8: - dbEventFlagBit EVENT_BEAT_ROUTE_8_TRAINER_8, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_8_TRAINER_8, 1 - dw Route8BattleText9 ; TextBeforeBattle - dw Route8AfterBattleText9 ; TextAfterBattle - dw Route8EndBattleText9 ; TextEndBattle - dw Route8EndBattleText9 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_8_TRAINER_8, 1, 4, Route8BattleText9, Route8EndBattleText9, Route8AfterBattleText9 + db -1 ; end Route8Text1: - TX_ASM + text_asm ld hl, Route8TrainerHeader0 call TalkToTrainer jp TextScriptEnd Route8BattleText1: - TX_FAR _Route8BattleText1 - db "@" + text_far _Route8BattleText1 + text_end Route8EndBattleText1: - TX_FAR _Route8EndBattleText1 - db "@" + text_far _Route8EndBattleText1 + text_end Route8AfterBattleText1: - TX_FAR _Route8AfterBattleText1 - db "@" + text_far _Route8AfterBattleText1 + text_end Route8Text2: - TX_ASM + text_asm ld hl, Route8TrainerHeader1 call TalkToTrainer jp TextScriptEnd Route8BattleText2: - TX_FAR _Route8BattleText2 - db "@" + text_far _Route8BattleText2 + text_end Route8EndBattleText2: - TX_FAR _Route8EndBattleText2 - db "@" + text_far _Route8EndBattleText2 + text_end Route8AfterBattleText2: - TX_FAR _Route8AfterBattleText2 - db "@" + text_far _Route8AfterBattleText2 + text_end Route8Text3: - TX_ASM + text_asm ld hl, Route8TrainerHeader2 call TalkToTrainer jp TextScriptEnd Route8BattleText3: - TX_FAR _Route8BattleText3 - db "@" + text_far _Route8BattleText3 + text_end Route8EndBattleText3: - TX_FAR _Route8EndBattleText3 - db "@" + text_far _Route8EndBattleText3 + text_end Route8AfterBattleText3: - TX_FAR _Route8AfterBattleText3 - db "@" + text_far _Route8AfterBattleText3 + text_end Route8Text4: - TX_ASM + text_asm ld hl, Route8TrainerHeader3 call TalkToTrainer jp TextScriptEnd Route8BattleText4: - TX_FAR _Route8BattleText4 - db "@" + text_far _Route8BattleText4 + text_end Route8EndBattleText4: - TX_FAR _Route8EndBattleText4 - db "@" + text_far _Route8EndBattleText4 + text_end Route8AfterBattleText4: - TX_FAR _Route8AfterBattleText4 - db "@" + text_far _Route8AfterBattleText4 + text_end Route8Text5: - TX_ASM + text_asm ld hl, Route8TrainerHeader4 call TalkToTrainer jp TextScriptEnd Route8BattleText5: - TX_FAR _Route8BattleText5 - db "@" + text_far _Route8BattleText5 + text_end Route8EndBattleText5: - TX_FAR _Route8EndBattleText5 - db "@" + text_far _Route8EndBattleText5 + text_end Route8AfterBattleText5: - TX_FAR _Route8AfterBattleText5 - db "@" + text_far _Route8AfterBattleText5 + text_end Route8Text6: - TX_ASM + text_asm ld hl, Route8TrainerHeader5 call TalkToTrainer jp TextScriptEnd Route8BattleText6: - TX_FAR _Route8BattleText6 - db "@" + text_far _Route8BattleText6 + text_end Route8EndBattleText6: - TX_FAR _Route8EndBattleText6 - db "@" + text_far _Route8EndBattleText6 + text_end Route8AfterBattleText6: - TX_FAR _Route8AfterBattleText6 - db "@" + text_far _Route8AfterBattleText6 + text_end Route8Text7: - TX_ASM + text_asm ld hl, Route8TrainerHeader6 call TalkToTrainer jp TextScriptEnd Route8BattleText7: - TX_FAR _Route8BattleText7 - db "@" + text_far _Route8BattleText7 + text_end Route8EndBattleText7: - TX_FAR _Route8EndBattleText7 - db "@" + text_far _Route8EndBattleText7 + text_end Route8AfterBattleText7: - TX_FAR _Route8AfterBattleText7 - db "@" + text_far _Route8AfterBattleText7 + text_end Route8Text8: - TX_ASM + text_asm ld hl, Route8TrainerHeader7 call TalkToTrainer jp TextScriptEnd Route8BattleText8: - TX_FAR _Route8BattleText8 - db "@" + text_far _Route8BattleText8 + text_end Route8EndBattleText8: - TX_FAR _Route8EndBattleText8 - db "@" + text_far _Route8EndBattleText8 + text_end Route8AfterBattleText8: - TX_FAR _Route8AfterBattleText8 - db "@" + text_far _Route8AfterBattleText8 + text_end Route8Text9: - TX_ASM + text_asm ld hl, Route8TrainerHeader8 call TalkToTrainer jp TextScriptEnd Route8BattleText9: - TX_FAR _Route8BattleText9 - db "@" + text_far _Route8BattleText9 + text_end Route8EndBattleText9: - TX_FAR _Route8EndBattleText9 - db "@" + text_far _Route8EndBattleText9 + text_end Route8AfterBattleText9: - TX_FAR _Route8AfterBattleText9 - db "@" + text_far _Route8AfterBattleText9 + text_end Route8Text10: - TX_FAR _Route8Text10 - db "@" + text_far _Route8Text10 + text_end diff --git a/scripts/Route8Gate.asm b/scripts/Route8Gate.asm index 49f605a2..55443931 100755 --- a/scripts/Route8Gate.asm +++ b/scripts/Route8Gate.asm @@ -16,7 +16,7 @@ Route8GateScript_1e1d7: ld a, $1 ld [wSimulatedJoypadStatesIndex], a xor a - ld [wSpriteStateData2 + $06], a + ld [wSpritePlayerStateData2MovementByte1], a ld [wOverrideSimulatedJoypadStatesMask], a ret @@ -30,13 +30,13 @@ Route8GateScript0: ld a, PLAYER_DIR_UP ld [wPlayerMovingDirection], a xor a - ld [hJoyHeld], a - callba RemoveGuardDrink - ld a, [$ffdb] + ldh [hJoyHeld], a + farcall RemoveGuardDrink + ldh a, [hItemToRemoveID] and a jr nz, .asm_1e220 ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Route8GateScript_1e1d7 ld a, $1 @@ -46,13 +46,13 @@ Route8GateScript0: ld hl, wd728 set 6, [hl] ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a jp DisplayTextID CoordsData_1e22c: - db 3,2 - db 4,2 - db $ff + dbmapcoord 2, 3 + dbmapcoord 2, 4 + db -1 ; end Route8GateScript1: ld a, [wSimulatedJoypadStatesIndex] diff --git a/scripts/Route9.asm b/scripts/Route9.asm index 8b346ee8..e69d4d35 100755 --- a/scripts/Route9.asm +++ b/scripts/Route9.asm @@ -26,243 +26,180 @@ Route9_TextPointers: dw Route9Text11 Route9TrainerHeader0: - dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_0 - dw Route9BattleText1 ; TextBeforeBattle - dw Route9AfterBattleText1 ; TextAfterBattle - dw Route9EndBattleText1 ; TextEndBattle - dw Route9EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_9_TRAINER_0, 3, Route9BattleText1, Route9EndBattleText1, Route9AfterBattleText1 Route9TrainerHeader1: - dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_1 - dw Route9BattleTextAJ ; TextBeforeBattle - dw Route9AfterBattleTextAJ ; TextAfterBattle - dw Route9EndBattleTextAJ ; TextEndBattle - dw Route9EndBattleTextAJ ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_9_TRAINER_1, 2, Route9BattleTextAJ, Route9EndBattleTextAJ, Route9AfterBattleTextAJ Route9TrainerHeader2: - dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_2 - dw Route9BattleText3 ; TextBeforeBattle - dw Route9AfterBattleText3 ; TextAfterBattle - dw Route9EndBattleText3 ; TextEndBattle - dw Route9EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_9_TRAINER_2, 4, Route9BattleText3, Route9EndBattleText3, Route9AfterBattleText3 Route9TrainerHeader3: - dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_3 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_3 - dw Route9BattleText4 ; TextBeforeBattle - dw Route9AfterBattleText4 ; TextAfterBattle - dw Route9EndBattleText4 ; TextEndBattle - dw Route9EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_9_TRAINER_3, 2, Route9BattleText4, Route9EndBattleText4, Route9AfterBattleText4 Route9TrainerHeader4: - dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_4 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_4 - dw Route9BattleText5 ; TextBeforeBattle - dw Route9AfterBattleText5 ; TextAfterBattle - dw Route9EndBattleText5 ; TextEndBattle - dw Route9EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_9_TRAINER_4, 2, Route9BattleText5, Route9EndBattleText5, Route9AfterBattleText5 Route9TrainerHeader5: - dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_5 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_5 - dw Route9BattleText6 ; TextBeforeBattle - dw Route9AfterBattleText6 ; TextAfterBattle - dw Route9EndBattleText6 ; TextEndBattle - dw Route9EndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_9_TRAINER_5, 3, Route9BattleText6, Route9EndBattleText6, Route9AfterBattleText6 Route9TrainerHeader6: - dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_6 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_6 - dw Route9BattleText7 ; TextBeforeBattle - dw Route9AfterBattleText7 ; TextAfterBattle - dw Route9EndBattleText7 ; TextEndBattle - dw Route9EndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_9_TRAINER_6, 4, Route9BattleText7, Route9EndBattleText7, Route9AfterBattleText7 Route9TrainerHeader7: - dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_7, 1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_7, 1 - dw Route9BattleText8 ; TextBeforeBattle - dw Route9AfterBattleText8 ; TextAfterBattle - dw Route9EndBattleText8 ; TextEndBattle - dw Route9EndBattleText8 ; TextEndBattle - + trainer EVENT_BEAT_ROUTE_9_TRAINER_7, 1, 2, Route9BattleText8, Route9EndBattleText8, Route9AfterBattleText8 Route9TrainerHeader8: - dbEventFlagBit EVENT_BEAT_ROUTE_9_TRAINER_8, 1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ROUTE_9_TRAINER_8, 1 - dw Route9BattleText9 ; TextBeforeBattle - dw Route9AfterBattleText9 ; TextAfterBattle - dw Route9EndBattleText9 ; TextEndBattle - dw Route9EndBattleText9 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ROUTE_9_TRAINER_8, 1, 2, Route9BattleText9, Route9EndBattleText9, Route9AfterBattleText9 + db -1 ; end Route9Text1: - TX_ASM + text_asm ld hl, Route9TrainerHeader0 jr Route9TalkToTrainer Route9TextAJ: - TX_ASM + text_asm ld hl, Route9TrainerHeader1 jr Route9TalkToTrainer Route9Text3: - TX_ASM + text_asm ld hl, Route9TrainerHeader2 jr Route9TalkToTrainer Route9Text4: - TX_ASM + text_asm ld hl, Route9TrainerHeader3 jr Route9TalkToTrainer Route9Text5: - TX_ASM + text_asm ld hl, Route9TrainerHeader4 jr Route9TalkToTrainer Route9Text6: - TX_ASM + text_asm ld hl, Route9TrainerHeader5 jr Route9TalkToTrainer Route9Text7: - TX_ASM + text_asm ld hl, Route9TrainerHeader6 jr Route9TalkToTrainer Route9Text8: - TX_ASM + text_asm ld hl, Route9TrainerHeader7 jr Route9TalkToTrainer Route9Text9: - TX_ASM + text_asm ld hl, Route9TrainerHeader8 Route9TalkToTrainer: call TalkToTrainer jp TextScriptEnd Route9BattleText1: - TX_FAR _Route9BattleText1 - db "@" + text_far _Route9BattleText1 + text_end Route9EndBattleText1: - TX_FAR _Route9EndBattleText1 - db "@" + text_far _Route9EndBattleText1 + text_end Route9AfterBattleText1: - TX_FAR _Route9AfterBattleText1 - db "@" + text_far _Route9AfterBattleText1 + text_end Route9BattleTextAJ: - TX_FAR _Route9BattleTextAJ - db "@" + text_far _Route9BattleTextAJ + text_end Route9EndBattleTextAJ: - TX_FAR _Route9EndBattleTextAJ - db "@" + text_far _Route9EndBattleTextAJ + text_end Route9AfterBattleTextAJ: - TX_FAR _Route9AfterBattleTextAJ - db "@" + text_far _Route9AfterBattleTextAJ + text_end Route9BattleText3: - TX_FAR _Route9BattleText3 - db "@" + text_far _Route9BattleText3 + text_end Route9EndBattleText3: - TX_FAR _Route9EndBattleText3 - db "@" + text_far _Route9EndBattleText3 + text_end Route9AfterBattleText3: - TX_FAR _Route9AfterBattleText3 - db "@" + text_far _Route9AfterBattleText3 + text_end Route9BattleText4: - TX_FAR _Route9BattleText4 - db "@" + text_far _Route9BattleText4 + text_end Route9EndBattleText4: - TX_FAR _Route9EndBattleText4 - db "@" + text_far _Route9EndBattleText4 + text_end Route9AfterBattleText4: - TX_FAR _Route9AfterBattleText4 - db "@" + text_far _Route9AfterBattleText4 + text_end Route9BattleText5: - TX_FAR _Route9BattleText5 - db "@" + text_far _Route9BattleText5 + text_end Route9EndBattleText5: - TX_FAR _Route9EndBattleText5 - db "@" + text_far _Route9EndBattleText5 + text_end Route9AfterBattleText5: - TX_FAR _Route9AfterBattleText5 - db "@" + text_far _Route9AfterBattleText5 + text_end Route9BattleText6: - TX_FAR _Route9BattleText6 - db "@" + text_far _Route9BattleText6 + text_end Route9EndBattleText6: - TX_FAR _Route9EndBattleText6 - db "@" + text_far _Route9EndBattleText6 + text_end Route9AfterBattleText6: - TX_FAR _Route9AfterBattleText6 - db "@" + text_far _Route9AfterBattleText6 + text_end Route9BattleText7: - TX_FAR _Route9BattleText7 - db "@" + text_far _Route9BattleText7 + text_end Route9EndBattleText7: - TX_FAR _Route9EndBattleText7 - db "@" + text_far _Route9EndBattleText7 + text_end Route9AfterBattleText7: - TX_FAR _Route9AfterBattleText7 - db "@" + text_far _Route9AfterBattleText7 + text_end Route9BattleText8: - TX_FAR _Route9BattleText8 - db "@" + text_far _Route9BattleText8 + text_end Route9EndBattleText8: - TX_FAR _Route9EndBattleText8 - db "@" + text_far _Route9EndBattleText8 + text_end Route9AfterBattleText8: - TX_FAR _Route9AfterBattleText8 - db "@" + text_far _Route9AfterBattleText8 + text_end Route9BattleText9: - TX_FAR _Route9BattleText9 - db "@" + text_far _Route9BattleText9 + text_end Route9EndBattleText9: - TX_FAR _Route9EndBattleText9 - db "@" + text_far _Route9EndBattleText9 + text_end Route9AfterBattleText9: - TX_FAR _Route9AfterBattleText9 - db "@" + text_far _Route9AfterBattleText9 + text_end Route9Text11: - TX_FAR _Route9Text11 - db "@" + text_far _Route9Text11 + text_end diff --git a/scripts/SSAnne1F.asm b/scripts/SSAnne1F.asm index 5cace6ee..c819f470 100755 --- a/scripts/SSAnne1F.asm +++ b/scripts/SSAnne1F.asm @@ -7,9 +7,9 @@ SSAnne1F_TextPointers: dw SSAnne1Text2 SSAnne1Text1: - TX_FAR _SSAnne1Text1 - db "@" + text_far _SSAnne1Text1 + text_end SSAnne1Text2: - TX_FAR _SSAnne1Text2 - db "@" + text_far _SSAnne1Text2 + text_end diff --git a/scripts/SSAnne1FRooms.asm b/scripts/SSAnne1FRooms.asm index 2371f286..e4e4813d 100755 --- a/scripts/SSAnne1FRooms.asm +++ b/scripts/SSAnne1FRooms.asm @@ -26,138 +26,110 @@ SSAnne1FRooms_TextPointers: dw SSAnne8Text11 SSAnne8TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_0 - dw SSAnne8BattleText1 ; TextBeforeBattle - dw SSAnne8AfterBattleText1 ; TextAfterBattle - dw SSAnne8EndBattleText1 ; TextEndBattle - dw SSAnne8EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_8_TRAINER_0, 2, SSAnne8BattleText1, SSAnne8EndBattleText1, SSAnne8AfterBattleText1 SSAnne8TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_1 - dw SSAnne8BattleText2 ; TextBeforeBattle - dw SSAnne8AfterBattleText2 ; TextAfterBattle - dw SSAnne8EndBattleText2 ; TextEndBattle - dw SSAnne8EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_8_TRAINER_1, 3, SSAnne8BattleText2, SSAnne8EndBattleText2, SSAnne8AfterBattleText2 SSAnne8TrainerHeader2: - dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_2 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_2 - dw SSAnne8BattleText3 ; TextBeforeBattle - dw SSAnne8AfterBattleText3 ; TextAfterBattle - dw SSAnne8EndBattleText3 ; TextEndBattle - dw SSAnne8EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_8_TRAINER_2, 2, SSAnne8BattleText3, SSAnne8EndBattleText3, SSAnne8AfterBattleText3 SSAnne8TrainerHeader3: - dbEventFlagBit EVENT_BEAT_SS_ANNE_8_TRAINER_3 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_8_TRAINER_3 - dw SSAnne8BattleText4 ; TextBeforeBattle - dw SSAnne8AfterBattleText4 ; TextAfterBattle - dw SSAnne8EndBattleText4 ; TextEndBattle - dw SSAnne8EndBattleText4 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SS_ANNE_8_TRAINER_3, 2, SSAnne8BattleText4, SSAnne8EndBattleText4, SSAnne8AfterBattleText4 + db -1 ; end SSAnne8Text1: - TX_ASM + text_asm ld hl, SSAnne8TrainerHeader0 call TalkToTrainer jp TextScriptEnd SSAnne8Text2: - TX_ASM + text_asm ld hl, SSAnne8TrainerHeader1 call TalkToTrainer jp TextScriptEnd SSAnne8Text3: - TX_ASM + text_asm ld hl, SSAnne8TrainerHeader2 call TalkToTrainer jp TextScriptEnd SSAnne8Text4: - TX_ASM + text_asm ld hl, SSAnne8TrainerHeader3 call TalkToTrainer jp TextScriptEnd SSAnne8Text8: - TX_FAR _SSAnne8Text8 - TX_ASM + text_far _SSAnne8Text8 + text_asm ld a, WIGGLYTUFF call PlayCry jp TextScriptEnd SSAnne8BattleText1: - TX_FAR _SSAnne8BattleText1 - db "@" + text_far _SSAnne8BattleText1 + text_end SSAnne8EndBattleText1: - TX_FAR _SSAnne8EndBattleText1 - db "@" + text_far _SSAnne8EndBattleText1 + text_end SSAnne8AfterBattleText1: - TX_FAR _SSAnne8AfterBattleText1 - db "@" + text_far _SSAnne8AfterBattleText1 + text_end SSAnne8BattleText2: - TX_FAR _SSAnne8BattleText2 - db "@" + text_far _SSAnne8BattleText2 + text_end SSAnne8EndBattleText2: - TX_FAR _SSAnne8EndBattleText2 - db "@" + text_far _SSAnne8EndBattleText2 + text_end SSAnne8AfterBattleText2: - TX_FAR _SSAnne8AfterBattleText2 - db "@" + text_far _SSAnne8AfterBattleText2 + text_end SSAnne8BattleText3: - TX_FAR _SSAnne8BattleText3 - db "@" + text_far _SSAnne8BattleText3 + text_end SSAnne8EndBattleText3: - TX_FAR _SSAnne8EndBattleText3 - db "@" + text_far _SSAnne8EndBattleText3 + text_end SSAnne8AfterBattleText3: - TX_FAR _SSAnne8AfterBattleText3 - db "@" + text_far _SSAnne8AfterBattleText3 + text_end SSAnne8BattleText4: - TX_FAR _SSAnne8BattleText4 - db "@" + text_far _SSAnne8BattleText4 + text_end SSAnne8EndBattleText4: - TX_FAR _SSAnne8EndBattleText4 - db "@" + text_far _SSAnne8EndBattleText4 + text_end SSAnne8AfterBattleText4: - TX_FAR _SSAnne8AfterBattleText4 - db "@" + text_far _SSAnne8AfterBattleText4 + text_end SSAnne8Text5: - TX_FAR _SSAnne8Text5 - db "@" + text_far _SSAnne8Text5 + text_end SSAnne8Text6: - TX_FAR _SSAnne8Text6 - db "@" + text_far _SSAnne8Text6 + text_end SSAnne8Text7: - TX_FAR _SSAnne8Text7 - db "@" + text_far _SSAnne8Text7 + text_end SSAnne8Text9: - TX_FAR _SSAnne8Text9 - db "@" + text_far _SSAnne8Text9 + text_end SSAnne8Text11: - TX_FAR _SSAnne8Text11 - db "@" + text_far _SSAnne8Text11 + text_end diff --git a/scripts/SSAnne2F.asm b/scripts/SSAnne2F.asm index 77b283d2..d00917fe 100755 --- a/scripts/SSAnne2F.asm +++ b/scripts/SSAnne2F.asm @@ -29,19 +29,19 @@ SSAnne2Script0: ld a, MUSIC_MEET_RIVAL call PlayMusic ld a, [wCoordIndex] - ld [$ffdb], a + ldh [hSavedCoordIndex], a ld a, HS_SS_ANNE_2F_RIVAL ld [wMissableObjectIndex], a predef ShowObject call Delay3 ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a - ld a, [$ffdb] + ldh a, [hSavedCoordIndex] cp $2 jr nz, .asm_61400 ld de, MovementData_6140c @@ -56,21 +56,20 @@ SSAnne2Script0: MovementData_6140c: db NPC_MOVEMENT_DOWN - MovementData_6140d: db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end CoordsData_61411: - db $08,$24 - db $08,$25 - db $FF + dbmapcoord 36, 8 + dbmapcoord 37, 8 + db -1 ; end SSAnne2Script_61416: ld a, [wXCoord] - cp $25 + cp 37 jr nz, .asm_61426 ld a, PLAYER_DIR_LEFT ld [wPlayerMovingDirection], a @@ -79,9 +78,9 @@ SSAnne2Script_61416: .asm_61426 xor a ; SPRITE_FACING_DOWN .asm_61427 - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a jp SetSpriteFacingDirectionAndDelay SSAnne2Script1: @@ -92,10 +91,10 @@ SSAnne2Script1: xor a ld [wJoyIgnore], a ld a, $2 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 - ld a, OPP_SONY2 + ld a, OPP_RIVAL2 ld [wCurOpponent], a ld a, $1 ld [wTrainerNo], a @@ -112,13 +111,13 @@ SSAnne2Script2: ld a, $f0 ld [wJoyIgnore], a ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld a, [wXCoord] - cp $25 + cp 37 jr nz, .asm_61497 ld de, MovementData_614b9 jr .asm_6149a @@ -126,10 +125,10 @@ SSAnne2Script2: ld de, MovementData_614b7 .asm_6149a ld a, $2 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite call StopAllMusic - callba Music_RivalAlternateStart + farcall Music_RivalAlternateStart ld a, $3 ld [wSSAnne2FCurScript], a ret @@ -137,13 +136,12 @@ SSAnne2Script2: MovementData_614b7: db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_DOWN - MovementData_614b9: db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end SSAnne2Script3: ld a, [wd730] @@ -165,11 +163,11 @@ SSAnne2F_TextPointers: dw SSAnne2Text3 SSAnne2Text1: - TX_FAR _SSAnne2Text1 - db "@" + text_far _SSAnne2Text1 + text_end SSAnne2Text2: - TX_ASM + text_asm ld hl, SSAnneRivalBeforeBattleText call PrintText ld hl, wd72d @@ -181,17 +179,17 @@ SSAnne2Text2: jp TextScriptEnd SSAnneRivalBeforeBattleText: - TX_FAR _SSAnneRivalBeforeBattleText - db "@" + text_far _SSAnneRivalBeforeBattleText + text_end SSAnneRivalDefeatedText: - TX_FAR _SSAnneRivalDefeatedText - db "@" + text_far _SSAnneRivalDefeatedText + text_end SSAnneRivalWonText: - TX_FAR _SSAnneRivalWonText - db "@" + text_far _SSAnneRivalWonText + text_end SSAnne2Text3: - TX_FAR _SSAnneRivalCaptainText - db "@" + text_far _SSAnneRivalCaptainText + text_end diff --git a/scripts/SSAnne2FRooms.asm b/scripts/SSAnne2FRooms.asm index fb57cf37..ff1dcfaf 100755 --- a/scripts/SSAnne2FRooms.asm +++ b/scripts/SSAnne2FRooms.asm @@ -28,69 +28,41 @@ SSAnne2FRooms_TextPointers: dw SSAnne9Text13 SSAnne9TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_0 - dw SSAnne9BattleText1 ; TextBeforeBattle - dw SSAnne9AfterBattleText1 ; TextAfterBattle - dw SSAnne9EndBattleText1 ; TextEndBattle - dw SSAnne9EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_9_TRAINER_0, 2, SSAnne9BattleText1, SSAnne9EndBattleText1, SSAnne9AfterBattleText1 SSAnne9TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_1 - dw SSAnne9BattleText2 ; TextBeforeBattle - dw SSAnne9AfterBattleText2 ; TextAfterBattle - dw SSAnne9EndBattleText2 ; TextEndBattle - dw SSAnne9EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_9_TRAINER_1, 3, SSAnne9BattleText2, SSAnne9EndBattleText2, SSAnne9AfterBattleText2 SSAnne9TrainerHeader2: - dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_2 - dw SSAnne9BattleText3 ; TextBeforeBattle - dw SSAnne9AfterBattleText3 ; TextAfterBattle - dw SSAnne9EndBattleText3 ; TextEndBattle - dw SSAnne9EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_9_TRAINER_2, 3, SSAnne9BattleText3, SSAnne9EndBattleText3, SSAnne9AfterBattleText3 SSAnne9TrainerHeader3: - dbEventFlagBit EVENT_BEAT_SS_ANNE_9_TRAINER_3 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_9_TRAINER_3 - dw SSAnne9BattleText4 ; TextBeforeBattle - dw SSAnne9AfterBattleText4 ; TextAfterBattle - dw SSAnne9EndBattleText4 ; TextEndBattle - dw SSAnne9EndBattleText4 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SS_ANNE_9_TRAINER_3, 2, SSAnne9BattleText4, SSAnne9EndBattleText4, SSAnne9AfterBattleText4 + db -1 ; end SSAnne9Text1: - TX_ASM + text_asm ld hl, SSAnne9TrainerHeader0 call TalkToTrainer jp TextScriptEnd SSAnne9Text2: - TX_ASM + text_asm ld hl, SSAnne9TrainerHeader1 call TalkToTrainer jp TextScriptEnd SSAnne9Text3: - TX_ASM + text_asm ld hl, SSAnne9TrainerHeader2 call TalkToTrainer jp TextScriptEnd SSAnne9Text4: - TX_ASM + text_asm ld hl, SSAnne9TrainerHeader3 call TalkToTrainer jp TextScriptEnd SSAnne9Text5: - TX_ASM + text_asm call SaveScreenTilesToBuffer1 ld hl, SSAnne9Text_61bf2 call PrintText @@ -100,93 +72,93 @@ SSAnne9Text5: jp TextScriptEnd SSAnne9Text_61bf2: - TX_FAR _SSAnne9Text_61bf2 - db "@" + text_far _SSAnne9Text_61bf2 + text_end SSAnne9Text7: - TX_ASM + text_asm ld hl, SSAnne9Text_61c01 call PrintText jp TextScriptEnd SSAnne9Text_61c01: - TX_FAR _SSAnne9Text_61c01 - db "@" + text_far _SSAnne9Text_61c01 + text_end SSAnne9Text8: - TX_ASM + text_asm ld hl, SSAnne9Text_61c10 call PrintText jp TextScriptEnd SSAnne9Text_61c10: - TX_FAR _SSAnne9Text_61c10 - db "@" + text_far _SSAnne9Text_61c10 + text_end SSAnne9Text10: - TX_ASM - callba Func_f2570 + text_asm + farcall Func_f2570 jp TextScriptEnd SSAnne9Text11: - TX_ASM - callba Func_f257c + text_asm + farcall Func_f257c jp TextScriptEnd SSAnne9Text12: - TX_ASM - callba Func_f2588 + text_asm + farcall Func_f2588 jp TextScriptEnd SSAnne9Text13: - TX_ASM - callba Func_f2594 + text_asm + farcall Func_f2594 jp TextScriptEnd SSAnne9BattleText1: - TX_FAR _SSAnne9BattleText1 - db "@" + text_far _SSAnne9BattleText1 + text_end SSAnne9EndBattleText1: - TX_FAR _SSAnne9EndBattleText1 - db "@" + text_far _SSAnne9EndBattleText1 + text_end SSAnne9AfterBattleText1: - TX_FAR _SSAnne9AfterBattleText1 - db "@" + text_far _SSAnne9AfterBattleText1 + text_end SSAnne9BattleText2: - TX_FAR _SSAnne9BattleText2 - db "@" + text_far _SSAnne9BattleText2 + text_end SSAnne9EndBattleText2: - TX_FAR _SSAnne9EndBattleText2 - db "@" + text_far _SSAnne9EndBattleText2 + text_end SSAnne9AfterBattleText2: - TX_FAR _SSAnne9AfterBattleText2 - db "@" + text_far _SSAnne9AfterBattleText2 + text_end SSAnne9BattleText3: - TX_FAR _SSAnne9BattleText3 - db "@" + text_far _SSAnne9BattleText3 + text_end SSAnne9EndBattleText3: - TX_FAR _SSAnne9EndBattleText3 - db "@" + text_far _SSAnne9EndBattleText3 + text_end SSAnne9AfterBattleText3: - TX_FAR _SSAnne9AfterBattleText3 - db "@" + text_far _SSAnne9AfterBattleText3 + text_end SSAnne9BattleText4: - TX_FAR _SSAnne9BattleText4 - db "@" + text_far _SSAnne9BattleText4 + text_end SSAnne9EndBattleText4: - TX_FAR _SSAnne9EndBattleText4 - db "@" + text_far _SSAnne9EndBattleText4 + text_end SSAnne9AfterBattleText4: - TX_FAR _SSAnne9AfterBattleText4 - db "@" + text_far _SSAnne9AfterBattleText4 + text_end diff --git a/scripts/SSAnne2FRooms_2.asm b/scripts/SSAnne2FRooms_2.asm index f856221c..2271e83d 100755 --- a/scripts/SSAnne2FRooms_2.asm +++ b/scripts/SSAnne2FRooms_2.asm @@ -1,35 +1,35 @@ -Func_f2570: +Func_f2570:: ld hl, SSAnne9Text_f2577 call PrintText ret SSAnne9Text_f2577: - TX_FAR _SSAnne9Text_61c1f - db "@" + text_far _SSAnne9Text_61c1f + text_end -Func_f257c: +Func_f257c:: ld hl, SSAnne9Text_f2583 call PrintText ret SSAnne9Text_f2583: - TX_FAR _SSAnne9Text_61c2e - db "@" + text_far _SSAnne9Text_61c2e + text_end -Func_f2588: +Func_f2588:: ld hl, SSAnne9Text_f258f call PrintText ret SSAnne9Text_f258f: - TX_FAR _SSAnne9Text_61c3d - db "@" + text_far _SSAnne9Text_61c3d + text_end -Func_f2594: +Func_f2594:: ld hl, SSAnne9Text_f259b call PrintText ret SSAnne9Text_f259b: - TX_FAR _SSAnne9Text_61c4c - db "@" + text_far _SSAnne9Text_61c4c + text_end diff --git a/scripts/SSAnne3F.asm b/scripts/SSAnne3F.asm index 5da0e0c7..e3e7a1d3 100755 --- a/scripts/SSAnne3F.asm +++ b/scripts/SSAnne3F.asm @@ -5,5 +5,5 @@ SSAnne3F_TextPointers: dw SSAnne3Text1 SSAnne3Text1: - TX_FAR _SSAnne3Text1 - db "@" + text_far _SSAnne3Text1 + text_end diff --git a/scripts/SSAnneB1F.asm b/scripts/SSAnneB1F.asm index 25df076f..f66fdfaa 100755 --- a/scripts/SSAnneB1F.asm +++ b/scripts/SSAnneB1F.asm @@ -2,4 +2,5 @@ SSAnneB1F_Script: jp EnableAutoTextBoxDrawing SSAnneB1F_TextPointers: - db "@" + + text_end ; unused diff --git a/scripts/SSAnneB1FRooms.asm b/scripts/SSAnneB1FRooms.asm index 3777852c..2a077c33 100755 --- a/scripts/SSAnneB1FRooms.asm +++ b/scripts/SSAnneB1FRooms.asm @@ -26,176 +26,134 @@ SSAnneB1FRooms_TextPointers: dw PickUpItemText SSAnne10TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_0 - dw SSAnne10BattleText1 ; TextBeforeBattle - dw SSAnne10AfterBattleText1 ; TextAfterBattle - dw SSAnne10EndBattleText1 ; TextEndBattle - dw SSAnne10EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_10_TRAINER_0, 2, SSAnne10BattleText1, SSAnne10EndBattleText1, SSAnne10AfterBattleText1 SSAnne10TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_1 - dw SSAnne10BattleText2 ; TextBeforeBattle - dw SSAnne10AfterBattleText2 ; TextAfterBattle - dw SSAnne10EndBattleText2 ; TextEndBattle - dw SSAnne10EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_10_TRAINER_1, 3, SSAnne10BattleText2, SSAnne10EndBattleText2, SSAnne10AfterBattleText2 SSAnne10TrainerHeader2: - dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_2 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_2 - dw SSAnne10BattleText3 ; TextBeforeBattle - dw SSAnne10AfterBattleText3 ; TextAfterBattle - dw SSAnne10EndBattleText3 ; TextEndBattle - dw SSAnne10EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_10_TRAINER_2, 2, SSAnne10BattleText3, SSAnne10EndBattleText3, SSAnne10AfterBattleText3 SSAnne10TrainerHeader3: - dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_3 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_3 - dw SSAnne10BattleText4 ; TextBeforeBattle - dw SSAnne10AfterBattleText4 ; TextAfterBattle - dw SSAnne10EndBattleText4 ; TextEndBattle - dw SSAnne10EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_10_TRAINER_3, 2, SSAnne10BattleText4, SSAnne10EndBattleText4, SSAnne10AfterBattleText4 SSAnne10TrainerHeader4: - dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_4 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_4 - dw SSAnne10BattleText5 ; TextBeforeBattle - dw SSAnne10AfterBattleText5 ; TextAfterBattle - dw SSAnne10EndBattleText5 ; TextEndBattle - dw SSAnne10EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_10_TRAINER_4, 2, SSAnne10BattleText5, SSAnne10EndBattleText5, SSAnne10AfterBattleText5 SSAnne10TrainerHeader5: - dbEventFlagBit EVENT_BEAT_SS_ANNE_10_TRAINER_5 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_10_TRAINER_5 - dw SSAnne10BattleText6 ; TextBeforeBattle - dw SSAnne10AfterBattleText6 ; TextAfterBattle - dw SSAnne10EndBattleText6 ; TextEndBattle - dw SSAnne10EndBattleText6 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SS_ANNE_10_TRAINER_5, 3, SSAnne10BattleText6, SSAnne10EndBattleText6, SSAnne10AfterBattleText6 + db -1 ; end SSAnne10Text1: - TX_ASM + text_asm ld hl, SSAnne10TrainerHeader0 call TalkToTrainer jp TextScriptEnd SSAnne10Text2: - TX_ASM + text_asm ld hl, SSAnne10TrainerHeader1 call TalkToTrainer jp TextScriptEnd SSAnne10Text3: - TX_ASM + text_asm ld hl, SSAnne10TrainerHeader2 call TalkToTrainer jp TextScriptEnd SSAnne10Text4: - TX_ASM + text_asm ld hl, SSAnne10TrainerHeader3 call TalkToTrainer jp TextScriptEnd SSAnne10Text5: - TX_ASM + text_asm ld hl, SSAnne10TrainerHeader4 call TalkToTrainer jp TextScriptEnd SSAnne10Text6: - TX_ASM + text_asm ld hl, SSAnne10TrainerHeader5 call TalkToTrainer jp TextScriptEnd SSAnne10Text8: - TX_FAR _SSAnne10Text8 - TX_ASM + text_far _SSAnne10Text8 + text_asm ld a, MACHOKE call PlayCry jp TextScriptEnd SSAnne10BattleText1: - TX_FAR _SSAnne10BattleText1 - db "@" + text_far _SSAnne10BattleText1 + text_end SSAnne10EndBattleText1: - TX_FAR _SSAnne10EndBattleText1 - db "@" + text_far _SSAnne10EndBattleText1 + text_end SSAnne10AfterBattleText1: - TX_FAR _SSAnne10AfterBattleText1 - db "@" + text_far _SSAnne10AfterBattleText1 + text_end SSAnne10BattleText2: - TX_FAR _SSAnne10BattleText2 - db "@" + text_far _SSAnne10BattleText2 + text_end SSAnne10EndBattleText2: - TX_FAR _SSAnne10EndBattleText2 - db "@" + text_far _SSAnne10EndBattleText2 + text_end SSAnne10AfterBattleText2: - TX_FAR _SSAnne10AfterBattleText2 - db "@" + text_far _SSAnne10AfterBattleText2 + text_end SSAnne10BattleText3: - TX_FAR _SSAnne10BattleText3 - db "@" + text_far _SSAnne10BattleText3 + text_end SSAnne10EndBattleText3: - TX_FAR _SSAnne10EndBattleText3 - db "@" + text_far _SSAnne10EndBattleText3 + text_end SSAnne10AfterBattleText3: - TX_FAR _SSAnne10AfterBattleText3 - db "@" + text_far _SSAnne10AfterBattleText3 + text_end SSAnne10BattleText4: - TX_FAR _SSAnne10BattleText4 - db "@" + text_far _SSAnne10BattleText4 + text_end SSAnne10EndBattleText4: - TX_FAR _SSAnne10EndBattleText4 - db "@" + text_far _SSAnne10EndBattleText4 + text_end SSAnne10AfterBattleText4: - TX_FAR _SSAnne10AfterBattleText4 - db "@" + text_far _SSAnne10AfterBattleText4 + text_end SSAnne10BattleText5: - TX_FAR _SSAnne10BattleText5 - db "@" + text_far _SSAnne10BattleText5 + text_end SSAnne10EndBattleText5: - TX_FAR _SSAnne10EndBattleText5 - db "@" + text_far _SSAnne10EndBattleText5 + text_end SSAnne10AfterBattleText5: - TX_FAR _SSAnne10AfterBattleText5 - db "@" + text_far _SSAnne10AfterBattleText5 + text_end SSAnne10BattleText6: - TX_FAR _SSAnne10BattleText6 - db "@" + text_far _SSAnne10BattleText6 + text_end SSAnne10EndBattleText6: - TX_FAR _SSAnne10EndBattleText6 - db "@" + text_far _SSAnne10EndBattleText6 + text_end SSAnne10AfterBattleText6: - TX_FAR _SSAnne10AfterBattleText6 - db "@" + text_far _SSAnne10AfterBattleText6 + text_end SSAnne10Text7: - TX_FAR _SSAnne10Text7 - db "@" + text_far _SSAnne10Text7 + text_end diff --git a/scripts/SSAnneBow.asm b/scripts/SSAnneBow.asm index 4569f0f8..0621785d 100755 --- a/scripts/SSAnneBow.asm +++ b/scripts/SSAnneBow.asm @@ -20,69 +20,55 @@ SSAnneBow_TextPointers: dw SSAnne5Text5 SSAnne5TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SS_ANNE_5_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_5_TRAINER_0 - dw SSAnne5BattleText1 ; TextBeforeBattle - dw SSAnne5AfterBattleText1 ; TextAfterBattle - dw SSAnne5EndBattleText1 ; TextEndBattle - dw SSAnne5EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_SS_ANNE_5_TRAINER_0, 3, SSAnne5BattleText1, SSAnne5EndBattleText1, SSAnne5AfterBattleText1 SSAnne5TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SS_ANNE_5_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SS_ANNE_5_TRAINER_1 - dw SSAnne5BattleText2 ; TextBeforeBattle - dw SSAnne5AfterBattleText2 ; TextAfterBattle - dw SSAnne5EndBattleText2 ; TextEndBattle - dw SSAnne5EndBattleText2 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SS_ANNE_5_TRAINER_1, 3, SSAnne5BattleText2, SSAnne5EndBattleText2, SSAnne5AfterBattleText2 + db -1 ; end SSAnne5Text1: - TX_FAR _SSAnne5Text1 - db "@" + text_far _SSAnne5Text1 + text_end SSAnne5Text2: - TX_FAR _SSAnne5Text2 - db "@" + text_far _SSAnne5Text2 + text_end SSAnne5Text3: - TX_FAR _SSAnne5Text3 - db "@" + text_far _SSAnne5Text3 + text_end SSAnne5Text4: - TX_ASM + text_asm ld hl, SSAnne5TrainerHeader0 call TalkToTrainer jp TextScriptEnd SSAnne5BattleText1: - TX_FAR _SSAnne5BattleText1 - db "@" + text_far _SSAnne5BattleText1 + text_end SSAnne5EndBattleText1: - TX_FAR _SSAnne5EndBattleText1 - db "@" + text_far _SSAnne5EndBattleText1 + text_end SSAnne5AfterBattleText1: - TX_FAR _SSAnne5AfterBattleText1 - db "@" + text_far _SSAnne5AfterBattleText1 + text_end SSAnne5Text5: - TX_ASM + text_asm ld hl, SSAnne5TrainerHeader1 call TalkToTrainer jp TextScriptEnd SSAnne5BattleText2: - TX_FAR _SSAnne5BattleText2 - db "@" + text_far _SSAnne5BattleText2 + text_end SSAnne5EndBattleText2: - TX_FAR _SSAnne5EndBattleText2 - db "@" + text_far _SSAnne5EndBattleText2 + text_end SSAnne5AfterBattleText2: - TX_FAR _SSAnne5AfterBattleText2 - db "@" + text_far _SSAnne5AfterBattleText2 + text_end diff --git a/scripts/SSAnneCaptainsRoom.asm b/scripts/SSAnneCaptainsRoom.asm index 94918118..593cd872 100755 --- a/scripts/SSAnneCaptainsRoom.asm +++ b/scripts/SSAnneCaptainsRoom.asm @@ -15,35 +15,35 @@ SSAnneCaptainsRoom_TextPointers: dw SSAnne7Text3 SSAnne7Text1: - TX_ASM + text_asm CheckEvent EVENT_GOT_HM01 - jr nz, .asm_797c4 + jr nz, .got_item ld hl, SSAnne7RubText call PrintText ld hl, ReceivingHM01Text call PrintText - lb bc, HM_01, 1 + lb bc, HM_CUT, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedHM01Text call PrintText SetEvent EVENT_GOT_HM01 ld hl, wd72d res 5, [hl] - jr .asm_0faf5 -.BagFull + jr .done +.bag_full ld hl, HM01NoRoomText call PrintText - jr .asm_0faf5 -.asm_797c4 + jr .done +.got_item ld hl, SSAnne7Text_61932 call PrintText -.asm_0faf5 +.done jp TextScriptEnd SSAnne7RubText: - TX_FAR _SSAnne7RubText - TX_ASM + text_far _SSAnne7RubText + text_asm ld a, [wAudioROMBank] cp BANK(AudioEngine3) ld [wAudioSavedROMBank], a @@ -66,26 +66,26 @@ SSAnne7RubText: jp TextScriptEnd ReceivingHM01Text: - TX_FAR _ReceivingHM01Text - db "@" + text_far _ReceivingHM01Text + text_end ReceivedHM01Text: - TX_FAR _ReceivedHM01Text - TX_SFX_KEY_ITEM - db "@" + text_far _ReceivedHM01Text + sound_get_key_item + text_end SSAnne7Text_61932: - TX_FAR _SSAnne7Text_61932 - db "@" + text_far _SSAnne7Text_61932 + text_end HM01NoRoomText: - TX_FAR _HM01NoRoomText - db "@" + text_far _HM01NoRoomText + text_end SSAnne7Text2: - TX_FAR _SSAnne7Text2 - db "@" + text_far _SSAnne7Text2 + text_end SSAnne7Text3: - TX_FAR _SSAnne7Text3 - db "@" + text_far _SSAnne7Text3 + text_end diff --git a/scripts/SSAnneKitchen.asm b/scripts/SSAnneKitchen.asm index 137706a0..30a9830f 100755 --- a/scripts/SSAnneKitchen.asm +++ b/scripts/SSAnneKitchen.asm @@ -12,61 +12,61 @@ SSAnneKitchen_TextPointers: dw SSAnne6Text7 SSAnne6Text1: - TX_FAR _SSAnne6Text1 - db "@" + text_far _SSAnne6Text1 + text_end SSAnne6Text2: - TX_FAR _SSAnne6Text2 - db "@" + text_far _SSAnne6Text2 + text_end SSAnne6Text3: - TX_FAR _SSAnne6Text3 - db "@" + text_far _SSAnne6Text3 + text_end SSAnne6Text4: - TX_FAR _SSAnne6Text4 - db "@" + text_far _SSAnne6Text4 + text_end SSAnne6Text5: - TX_FAR _SSAnne6Text5 - db "@" + text_far _SSAnne6Text5 + text_end SSAnne6Text6: - TX_FAR _SSAnne6Text6 - db "@" + text_far _SSAnne6Text6 + text_end SSAnne6Text7: - TX_ASM + text_asm ld hl, SSAnne6Text_61807 call PrintText - ld a, [hRandomAdd] + ldh a, [hRandomAdd] bit 7, a - jr z, .asm_93eb1 + jr z, .not_dialog_1 ld hl, SSAnne6Text_6180c - jr .asm_63292 -.asm_93eb1 + jr .done +.not_dialog_1 bit 4, a - jr z, .asm_7436c + jr z, .not_dialog_2 ld hl, SSAnne6Text_61811 - jr .asm_63292 -.asm_7436c + jr .done +.not_dialog_2 ld hl, SSAnne6Text_61816 -.asm_63292 +.done call PrintText jp TextScriptEnd SSAnne6Text_61807: - TX_FAR _SSAnne6Text_61807 - db "@" + text_far _SSAnne6Text_61807 + text_end SSAnne6Text_6180c: - TX_FAR _SSAnne6Text_6180c - db "@" + text_far _SSAnne6Text_6180c + text_end SSAnne6Text_61811: - TX_FAR _SSAnne6Text_61811 - db "@" + text_far _SSAnne6Text_61811 + text_end SSAnne6Text_61816: - TX_FAR _SSAnne6Text_61816 - db "@" + text_far _SSAnne6Text_61816 + text_end diff --git a/scripts/SafariZoneCenter.asm b/scripts/SafariZoneCenter.asm index 0a266887..1e7db243 100755 --- a/scripts/SafariZoneCenter.asm +++ b/scripts/SafariZoneCenter.asm @@ -7,9 +7,9 @@ SafariZoneCenter_TextPointers: dw SafariZoneCenterText3 SafariZoneCenterText2: - TX_FAR _SafariZoneCenterText2 - db "@" + text_far _SafariZoneCenterText2 + text_end SafariZoneCenterText3: - TX_FAR _SafariZoneCenterText3 - db "@" + text_far _SafariZoneCenterText3 + text_end diff --git a/scripts/SafariZoneCenterRestHouse.asm b/scripts/SafariZoneCenterRestHouse.asm index a652644b..a03823cc 100755 --- a/scripts/SafariZoneCenterRestHouse.asm +++ b/scripts/SafariZoneCenterRestHouse.asm @@ -6,9 +6,9 @@ SafariZoneCenterRestHouse_TextPointers: dw SafariZoneRestHouse1Text2 SafariZoneRestHouse1Text1: - TX_FAR _SafariZoneRestHouse1Text1 - db "@" + text_far _SafariZoneRestHouse1Text1 + text_end SafariZoneRestHouse1Text2: - TX_FAR _SafariZoneRestHouse1Text2 - db "@" + text_far _SafariZoneRestHouse1Text2 + text_end diff --git a/scripts/SafariZoneEast.asm b/scripts/SafariZoneEast.asm index 7f4a5543..062eeab1 100755 --- a/scripts/SafariZoneEast.asm +++ b/scripts/SafariZoneEast.asm @@ -11,13 +11,13 @@ SafariZoneEast_TextPointers: dw SafariZoneEastText7 SafariZoneEastText5: - TX_FAR _SafariZoneEastText5 - db "@" + text_far _SafariZoneEastText5 + text_end SafariZoneEastText6: - TX_FAR _SafariZoneEastText6 - db "@" + text_far _SafariZoneEastText6 + text_end SafariZoneEastText7: - TX_FAR _SafariZoneEastText7 - db "@" + text_far _SafariZoneEastText7 + text_end diff --git a/scripts/SafariZoneEastRestHouse.asm b/scripts/SafariZoneEastRestHouse.asm index 24141459..03655d69 100755 --- a/scripts/SafariZoneEastRestHouse.asm +++ b/scripts/SafariZoneEastRestHouse.asm @@ -8,13 +8,13 @@ SafariZoneEastRestHouse_TextPointers: dw SafariZoneRestHouse3Text3 SafariZoneRestHouse3Text1: - TX_FAR _SafariZoneRestHouse3Text1 - db "@" + text_far _SafariZoneRestHouse3Text1 + text_end SafariZoneRestHouse3Text2: - TX_FAR _SafariZoneRestHouse3Text2 - db "@" + text_far _SafariZoneRestHouse3Text2 + text_end SafariZoneRestHouse3Text3: - TX_FAR _SafariZoneRestHouse3Text3 - db "@" + text_far _SafariZoneRestHouse3Text3 + text_end diff --git a/scripts/SafariZoneGate.asm b/scripts/SafariZoneGate.asm index 217001dd..9e4cc5dd 100755 --- a/scripts/SafariZoneGate.asm +++ b/scripts/SafariZoneGate.asm @@ -19,12 +19,12 @@ SafariZoneGate_ScriptPointers: call ArePlayerCoordsInArray ret nc ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff ld [wJoyIgnore], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, SPRITE_FACING_RIGHT ld [wSpritePlayerStateData1FacingDirection], a ld a, [wCoordIndex] @@ -44,20 +44,20 @@ SafariZoneGate_ScriptPointers: ret .CoordsData_75221: - db $02, $03 - db $02, $04 - db $FF + dbmapcoord 3, 2 + dbmapcoord 4, 2 + db -1 ; end .SafariZoneEntranceScript1 call SafariZoneEntranceScript_752b4 ret nz .SafariZoneEntranceScript2 xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wJoyIgnore], a call UpdateSprites ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $ff ld [wJoyIgnore], a @@ -82,7 +82,7 @@ SafariZoneGate_ScriptPointers: ld a, $f0 ld [wJoyIgnore], a ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wNumSafariBalls], a @@ -96,7 +96,7 @@ SafariZoneGate_ScriptPointers: jr .asm_75286 .asm_7527f ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .asm_75286 ret @@ -142,17 +142,17 @@ SafariZoneGate_TextPointers: dw .SafariZoneEntranceText6 .SafariZoneEntranceText1 - TX_FAR _SafariZoneEntranceText1 - db "@" + text_far _SafariZoneEntranceText1 + text_end .SafariZoneEntranceText4 - TX_ASM - callab Func_f1f77 + text_asm + callfar Func_f1f77 jp TextScriptEnd .SafariZoneEntranceText5 - TX_FAR SafariZoneEntranceText_9e814 - TX_ASM + text_far SafariZoneEntranceText_9e814 + text_asm call YesNoChoice ld a, [wCurrentMenuItem] and a @@ -184,18 +184,18 @@ SafariZoneGate_TextPointers: jp TextScriptEnd .SafariZoneEntranceText_753bb - TX_FAR _SafariZoneEntranceText_753bb - db "@" + text_far _SafariZoneEntranceText_753bb + text_end .SafariZoneEntranceText_753c0 - TX_FAR _SafariZoneEntranceText_753c0 - db "@" + text_far _SafariZoneEntranceText_753c0 + text_end .SafariZoneEntranceText6 - TX_FAR _SafariZoneEntranceText_753c5 - db "@" + text_far _SafariZoneEntranceText_753c5 + text_end .SafariZoneEntranceText2 - TX_ASM - callab Func_f203e + text_asm + callfar Func_f203e jp TextScriptEnd diff --git a/scripts/SafariZoneGate2.asm b/scripts/SafariZoneGate2.asm index a99bad6a..6187b2c6 100755 --- a/scripts/SafariZoneGate2.asm +++ b/scripts/SafariZoneGate2.asm @@ -1,4 +1,4 @@ -Func_f1f77: +Func_f1f77:: ld hl, .WelcomeText call PrintText ld a, MONEY_BOX @@ -20,11 +20,11 @@ Func_f1f77: .has_positive_balance xor a - ld [hMoney], a + ldh [hMoney], a ld a, $5 - ld [hMoney + 1], a + ldh [hMoney + 1], a ld a, $0 - ld [hMoney + 2], a + ldh [hMoney + 2], a call HasEnoughMoney jr nc, .has_enough_money ld hl, .NotEnoughMoneyText @@ -81,24 +81,24 @@ Func_f1f77: ret .WelcomeText - TX_FAR SafariZoneEntranceText_9e6e4 - db "@" + text_far SafariZoneEntranceText_9e6e4 + text_end .MakePaymentText - TX_FAR SafariZoneEntranceText_9e747 - TX_SFX_ITEM_1 - TX_FAR _SafariZoneEntranceText_75360 - db "@" + text_far SafariZoneEntranceText_9e747 + sound_get_item_1 + text_far _SafariZoneEntranceText_75360 + text_end .PleaseComeAgainText - TX_FAR _SafariZoneEntranceText_75365 - db "@" + text_far _SafariZoneEntranceText_75365 + text_end .NotEnoughMoneyText - TX_FAR _SafariZoneEntranceText_7536a - db "@" + text_far _SafariZoneEntranceText_7536a + text_end -Func_f203e: +Func_f203e:: ld hl, .FirstTimeQuestionText call PrintText call YesNoChoice @@ -112,16 +112,16 @@ Func_f203e: ret .FirstTimeQuestionText - TX_FAR _SafariZoneEntranceText_753e6 - db "@" + text_far _SafariZoneEntranceText_753e6 + text_end .ExplanationText - TX_FAR _SafariZoneEntranceText_753eb - db "@" + text_far _SafariZoneEntranceText_753eb + text_end .RegularText - TX_FAR _SafariZoneEntranceText_753f0 - db "@" + text_far _SafariZoneEntranceText_753f0 + text_end SafariZoneEntranceStartSimulatingJoypadStates: push af @@ -139,12 +139,12 @@ SafariZoneEntranceCalculateLowCostAdmission: ld bc, $3 call CopyData xor a - ld [hDivideBCDDivisor], a - ld [hDivideBCDDivisor + 1], a + ldh [hDivideBCDDivisor], a + ldh [hDivideBCDDivisor + 1], a ld a, 23 - ld [hDivideBCDDivisor + 2], a + ldh [hDivideBCDDivisor + 2], a predef DivideBCDPredef3 - ld a, [hDivideBCDQuotient + 2] + ldh a, [hDivideBCDQuotient + 2] call SafariZoneEntranceConvertBCDtoNumber push af ld hl, wPlayerMoney @@ -171,12 +171,12 @@ SafariZoneEntranceCalculateLowCostAdmission: ret SafariZoneEntranceText_f20c4: - TX_FAR _SafariZoneLowCostText1 - db "@" + text_far _SafariZoneLowCostText1 + text_end SafariZoneEntranceText_f20c9: - TX_FAR _SafariZoneLowCostText2 - db "@" + text_far _SafariZoneLowCostText2 + text_end SafariZoneEntranceGetLowCostAdmissionText: ld hl, wSafariSteps @@ -207,10 +207,10 @@ SafariZoneEntranceGetLowCostAdmissionText: ret SafariZoneEntranceText_f20f6: - TX_FAR _SafariZoneLowCostText3 - TX_SFX_ITEM_1 - TX_FAR _SafariZoneLowCostText4 - db "@" + text_far _SafariZoneLowCostText3 + sound_get_item_1 + text_far _SafariZoneLowCostText4 + text_end Pointers_f2100: dw SafariZoneEntranceText_f210a @@ -220,20 +220,20 @@ Pointers_f2100: dw SafariZoneEntranceText_f2119 SafariZoneEntranceText_f210a: - TX_FAR _SafariZoneLowCostText5 - db "@" + text_far _SafariZoneLowCostText5 + text_end SafariZoneEntranceText_f210f: - TX_FAR _SafariZoneLowCostText6 - db "@" + text_far _SafariZoneLowCostText6 + text_end SafariZoneEntranceText_f2114: - TX_FAR _SafariZoneLowCostText7 - db "@" + text_far _SafariZoneLowCostText7 + text_end SafariZoneEntranceText_f2119: - TX_FAR _SafariZoneLowCostText8 - db "@" + text_far _SafariZoneLowCostText8 + text_end SafariZoneEntranceConvertBCDtoNumber: push hl diff --git a/scripts/SafariZoneNorth.asm b/scripts/SafariZoneNorth.asm index 734328b4..aaf39ea2 100755 --- a/scripts/SafariZoneNorth.asm +++ b/scripts/SafariZoneNorth.asm @@ -11,21 +11,21 @@ SafariZoneNorth_TextPointers: dw SafariZoneNorthText7 SafariZoneNorthText3: - TX_FAR _SafariZoneNorthText3 - db "@" + text_far _SafariZoneNorthText3 + text_end SafariZoneNorthText4: - TX_FAR _SafariZoneNorthText4 - db "@" + text_far _SafariZoneNorthText4 + text_end SafariZoneNorthText5: - TX_FAR _SafariZoneNorthText5 - db "@" + text_far _SafariZoneNorthText5 + text_end SafariZoneNorthText6: - TX_FAR _SafariZoneNorthText6 - db "@" + text_far _SafariZoneNorthText6 + text_end SafariZoneNorthText7: - TX_FAR _SafariZoneNorthText7 - db "@" + text_far _SafariZoneNorthText7 + text_end diff --git a/scripts/SafariZoneNorthRestHouse.asm b/scripts/SafariZoneNorthRestHouse.asm index fdc438f4..b7a690a1 100755 --- a/scripts/SafariZoneNorthRestHouse.asm +++ b/scripts/SafariZoneNorthRestHouse.asm @@ -8,13 +8,13 @@ SafariZoneNorthRestHouse_TextPointers: dw SafariZoneRestHouse4Text3 SafariZoneRestHouse4Text1: - TX_FAR _SafariZoneRestHouse4Text1 - db "@" + text_far _SafariZoneRestHouse4Text1 + text_end SafariZoneRestHouse4Text2: - TX_FAR _SafariZoneRestHouse4Text2 - db "@" + text_far _SafariZoneRestHouse4Text2 + text_end SafariZoneRestHouse4Text3: - TX_FAR _SafariZoneRestHouse4Text3 - db "@" + text_far _SafariZoneRestHouse4Text3 + text_end diff --git a/scripts/SafariZoneSecretHouse.asm b/scripts/SafariZoneSecretHouse.asm index 2d9b2305..6eeff8ad 100755 --- a/scripts/SafariZoneSecretHouse.asm +++ b/scripts/SafariZoneSecretHouse.asm @@ -5,41 +5,41 @@ SafariZoneSecretHouse_TextPointers: dw SafariZoneSecretHouseText1 SafariZoneSecretHouseText1: - TX_ASM + text_asm CheckEvent EVENT_GOT_HM03 - jr nz, .asm_20a9b + jr nz, .got_item ld hl, SafariZoneSecretHouseText_4a350 call PrintText - lb bc, HM_03, 1 + lb bc, HM_SURF, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedHM03Text call PrintText SetEvent EVENT_GOT_HM03 - jr .asm_8f1fc -.BagFull + jr .done +.bag_full ld hl, HM03NoRoomText call PrintText - jr .asm_8f1fc -.asm_20a9b + jr .done +.got_item ld hl, HM03ExplanationText call PrintText -.asm_8f1fc +.done jp TextScriptEnd SafariZoneSecretHouseText_4a350: - TX_FAR _SecretHouseText_4a350 - db "@" + text_far _SecretHouseText_4a350 + text_end ReceivedHM03Text: - TX_FAR _ReceivedHM03Text - TX_SFX_ITEM_1 - db "@" + text_far _ReceivedHM03Text + sound_get_item_1 + text_end HM03ExplanationText: - TX_FAR _HM03ExplanationText - db "@" + text_far _HM03ExplanationText + text_end HM03NoRoomText: - TX_FAR _HM03NoRoomText - db "@" + text_far _HM03NoRoomText + text_end diff --git a/scripts/SafariZoneWest.asm b/scripts/SafariZoneWest.asm index 483a92ee..7ae0807d 100755 --- a/scripts/SafariZoneWest.asm +++ b/scripts/SafariZoneWest.asm @@ -12,17 +12,17 @@ SafariZoneWest_TextPointers: dw SafariZoneWestText8 SafariZoneWestText5: - TX_FAR _SafariZoneWestText5 - db "@" + text_far _SafariZoneWestText5 + text_end SafariZoneWestText6: - TX_FAR _SafariZoneWestText6 - db "@" + text_far _SafariZoneWestText6 + text_end SafariZoneWestText7: - TX_FAR _SafariZoneWestText7 - db "@" + text_far _SafariZoneWestText7 + text_end SafariZoneWestText8: - TX_FAR _SafariZoneWestText8 - db "@" + text_far _SafariZoneWestText8 + text_end diff --git a/scripts/SafariZoneWestRestHouse.asm b/scripts/SafariZoneWestRestHouse.asm index 371bd56c..74ad98fe 100755 --- a/scripts/SafariZoneWestRestHouse.asm +++ b/scripts/SafariZoneWestRestHouse.asm @@ -8,13 +8,13 @@ SafariZoneWestRestHouse_TextPointers: dw SafariZoneRestHouse2Text3 SafariZoneRestHouse2Text1: - TX_FAR _SafariZoneRestHouse2Text1 - db "@" + text_far _SafariZoneRestHouse2Text1 + text_end SafariZoneRestHouse2Text2: - TX_FAR _SafariZoneRestHouse2Text2 - db "@" + text_far _SafariZoneRestHouse2Text2 + text_end SafariZoneRestHouse2Text3: - TX_FAR _SafariZoneRestHouse2Text3 - db "@" + text_far _SafariZoneRestHouse2Text3 + text_end diff --git a/scripts/SaffronCity.asm b/scripts/SaffronCity.asm index 02e6e2bb..84982534 100755 --- a/scripts/SaffronCity.asm +++ b/scripts/SaffronCity.asm @@ -29,94 +29,94 @@ SaffronCity_TextPointers: dw SaffronCityText25 SaffronCityText1: - TX_FAR _SaffronCityText1 - db "@" + text_far _SaffronCityText1 + text_end SaffronCityText2: - TX_FAR _SaffronCityText2 - db "@" + text_far _SaffronCityText2 + text_end SaffronCityText3: - TX_FAR _SaffronCityText3 - db "@" + text_far _SaffronCityText3 + text_end SaffronCityText4: - TX_FAR _SaffronCityText4 - db "@" + text_far _SaffronCityText4 + text_end SaffronCityText5: - TX_FAR _SaffronCityText5 - db "@" + text_far _SaffronCityText5 + text_end SaffronCityText6: - TX_FAR _SaffronCityText6 - db "@" + text_far _SaffronCityText6 + text_end SaffronCityText7: - TX_FAR _SaffronCityText7 - db "@" + text_far _SaffronCityText7 + text_end SaffronCityText8: - TX_FAR _SaffronCityText8 - db "@" + text_far _SaffronCityText8 + text_end SaffronCityText9: - TX_FAR _SaffronCityText9 - db "@" + text_far _SaffronCityText9 + text_end SaffronCityText10: - TX_FAR _SaffronCityText10 - db "@" + text_far _SaffronCityText10 + text_end SaffronCityText11: - TX_FAR _SaffronCityText11 - db "@" + text_far _SaffronCityText11 + text_end SaffronCityText12: - TX_FAR _SaffronCityText12 - TX_CRY_PIDGEOT - db "@" + text_far _SaffronCityText12 + sound_cry_pidgeot + text_end SaffronCityText13: - TX_FAR _SaffronCityText13 - db "@" + text_far _SaffronCityText13 + text_end SaffronCityText14: - TX_FAR _SaffronCityText14 - db "@" + text_far _SaffronCityText14 + text_end SaffronCityText15: - TX_FAR _SaffronCityText15 - db "@" + text_far _SaffronCityText15 + text_end SaffronCityText16: - TX_FAR _SaffronCityText16 - db "@" + text_far _SaffronCityText16 + text_end SaffronCityText17: - TX_FAR _SaffronCityText17 - db "@" + text_far _SaffronCityText17 + text_end SaffronCityText18: - TX_FAR _SaffronCityText18 - db "@" + text_far _SaffronCityText18 + text_end SaffronCityText20: - TX_FAR _SaffronCityText20 - db "@" + text_far _SaffronCityText20 + text_end SaffronCityText21: - TX_FAR _SaffronCityText21 - db "@" + text_far _SaffronCityText21 + text_end SaffronCityText22: - TX_FAR _SaffronCityText22 - db "@" + text_far _SaffronCityText22 + text_end SaffronCityText24: - TX_FAR _SaffronCityText24 - db "@" + text_far _SaffronCityText24 + text_end SaffronCityText25: - TX_FAR _SaffronCityText25 - db "@" + text_far _SaffronCityText25 + text_end diff --git a/scripts/SaffronGym.asm b/scripts/SaffronGym.asm index 0539d613..f90bba65 100755 --- a/scripts/SaffronGym.asm +++ b/scripts/SaffronGym.asm @@ -2,7 +2,7 @@ SaffronGym_Script: ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] - call nz, .extra + call nz, .LoadNames call EnableAutoTextBoxDrawing ld hl, SaffronGymTrainerHeader0 ld de, SaffronGym_ScriptPointers @@ -11,15 +11,15 @@ SaffronGym_Script: ld [wSaffronGymCurScript], a ret -.extra - ld hl, Gym6CityName - ld de, Gym6LeaderName +.LoadNames: + ld hl, .CityName + ld de, .LeaderName jp LoadGymLeaderAndCityName -Gym6CityName: +.CityName: db "SAFFRON CITY@" -Gym6LeaderName: +.LeaderName: db "SABRINA@" SaffronGymText_5d048: @@ -44,26 +44,26 @@ SaffronGymScript3: SaffronGymText_5d068: ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_SABRINA - lb bc, TM_46, 1 + lb bc, TM_PSYWAVE, 1 call GiveItem jr nc, .BagFull ld a, $b - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM46 jr .gymVictory .BagFull ld a, $c - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges - set 5, [hl] + set BIT_MARSHBADGE, [hl] ld hl, wBeatGymFlags - set 5, [hl] + set BIT_MARSHBADGE, [hl] ; deactivate gym trainers SetEventRange EVENT_BEAT_SAFFRON_GYM_TRAINER_0, EVENT_BEAT_SAFFRON_GYM_TRAINER_6 @@ -85,72 +85,23 @@ SaffronGym_TextPointers: dw SaffronGymText12 SaffronGymTrainerHeader0: - dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_0 - dw SaffronGymBattleText1 ; TextBeforeBattle - dw SaffronGymAfterBattleText1 ; TextAfterBattle - dw SaffronGymEndBattleText1 ; TextEndBattle - dw SaffronGymEndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_0, 3, SaffronGymBattleText1, SaffronGymEndBattleText1, SaffronGymAfterBattleText1 SaffronGymTrainerHeader1: - dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_1 - dw SaffronGymBattleText2 ; TextBeforeBattle - dw SaffronGymAfterBattleText2 ; TextAfterBattle - dw SaffronGymEndBattleText2 ; TextEndBattle - dw SaffronGymEndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_1, 3, SaffronGymBattleText2, SaffronGymEndBattleText2, SaffronGymAfterBattleText2 SaffronGymTrainerHeader2: - dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_2 - dw SaffronGymBattleText3 ; TextBeforeBattle - dw SaffronGymAfterBattleText3 ; TextAfterBattle - dw SaffronGymEndBattleText3 ; TextEndBattle - dw SaffronGymEndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_2, 3, SaffronGymBattleText3, SaffronGymEndBattleText3, SaffronGymAfterBattleText3 SaffronGymTrainerHeader3: - dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_3 - dw SaffronGymBattleText4 ; TextBeforeBattle - dw SaffronGymAfterBattleText4 ; TextAfterBattle - dw SaffronGymEndBattleText4 ; TextEndBattle - dw SaffronGymEndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_3, 3, SaffronGymBattleText4, SaffronGymEndBattleText4, SaffronGymAfterBattleText4 SaffronGymTrainerHeader4: - dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_4 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_4 - dw SaffronGymBattleText5 ; TextBeforeBattle - dw SaffronGymAfterBattleText5 ; TextAfterBattle - dw SaffronGymEndBattleText5 ; TextEndBattle - dw SaffronGymEndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_4, 3, SaffronGymBattleText5, SaffronGymEndBattleText5, SaffronGymAfterBattleText5 SaffronGymTrainerHeader5: - dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_5 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_5 - dw SaffronGymBattleText6 ; TextBeforeBattle - dw SaffronGymAfterBattleText6 ; TextAfterBattle - dw SaffronGymEndBattleText6 ; TextEndBattle - dw SaffronGymEndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_5, 3, SaffronGymBattleText6, SaffronGymEndBattleText6, SaffronGymAfterBattleText6 SaffronGymTrainerHeader6: - dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 1 - dw SaffronGymBattleText7 ; TextBeforeBattle - dw SaffronGymAfterBattleText7 ; TextAfterBattle - dw SaffronGymEndBattleText7 ; TextEndBattle - dw SaffronGymEndBattleText7 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 1, 3, SaffronGymBattleText7, SaffronGymEndBattleText7, SaffronGymAfterBattleText7 + db -1 ; end SaffronGymText1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_SABRINA jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM46 @@ -171,7 +122,7 @@ SaffronGymText1: ld hl, SaffronGymText_5d167 ld de, SaffronGymText_5d167 call SaveEndBattleTextPointers - ld a, [H_SPRITEINDEX] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -183,77 +134,77 @@ SaffronGymText1: jp TextScriptEnd SaffronGymText_5d162: - TX_FAR _SaffronGymText_5d162 - db "@" + text_far _SaffronGymText_5d162 + text_end SaffronGymText_5d167: - TX_FAR _SaffronGymText_5d167 - TX_SFX_KEY_ITEM ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded - TX_BLINK - db "@" + text_far _SaffronGymText_5d167 + sound_get_key_item ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded + text_promptbutton + text_end SaffronGymText_5d16e: - TX_FAR _SaffronGymText_5d16e - db "@" + text_far _SaffronGymText_5d16e + text_end SaffronGymText10: - TX_FAR _SaffronGymText_5d173 - db "@" + text_far _SaffronGymText_5d173 + text_end SaffronGymText11: - TX_FAR ReceivedTM46Text - TX_SFX_ITEM_1 - TX_FAR _TM46ExplanationText - db "@" + text_far ReceivedTM46Text + sound_get_item_1 + text_far _TM46ExplanationText + text_end SaffronGymText12: - TX_FAR _TM46NoRoomText - db "@" + text_far _TM46NoRoomText + text_end SaffronGymText2: - TX_ASM + text_asm ld hl, SaffronGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd SaffronGymText3: - TX_ASM + text_asm ld hl, SaffronGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd SaffronGymText4: - TX_ASM + text_asm ld hl, SaffronGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd SaffronGymText5: - TX_ASM + text_asm ld hl, SaffronGymTrainerHeader3 call TalkToTrainer jp TextScriptEnd SaffronGymText6: - TX_ASM + text_asm ld hl, SaffronGymTrainerHeader4 call TalkToTrainer jp TextScriptEnd SaffronGymText7: - TX_ASM + text_asm ld hl, SaffronGymTrainerHeader5 call TalkToTrainer jp TextScriptEnd SaffronGymText8: - TX_ASM + text_asm ld hl, SaffronGymTrainerHeader6 call TalkToTrainer jp TextScriptEnd SaffronGymText9: - TX_ASM + text_asm CheckEvent EVENT_BEAT_SABRINA jr nz, .asm_5d1dd ld hl, SaffronGymText_5d1e6 @@ -266,93 +217,93 @@ SaffronGymText9: jp TextScriptEnd SaffronGymText_5d1e6: - TX_FAR _SaffronGymText_5d1e6 - db "@" + text_far _SaffronGymText_5d1e6 + text_end SaffronGymText_5d1eb: - TX_FAR _SaffronGymText_5d1eb - db "@" + text_far _SaffronGymText_5d1eb + text_end SaffronGymBattleText1: - TX_FAR _SaffronGymBattleText1 - db "@" + text_far _SaffronGymBattleText1 + text_end SaffronGymEndBattleText1: - TX_FAR _SaffronGymEndBattleText1 - db "@" + text_far _SaffronGymEndBattleText1 + text_end SaffronGymAfterBattleText1: - TX_FAR _SaffronGymAfterBattleText1 - db "@" + text_far _SaffronGymAfterBattleText1 + text_end SaffronGymBattleText2: - TX_FAR _SaffronGymBattleText2 - db "@" + text_far _SaffronGymBattleText2 + text_end SaffronGymEndBattleText2: - TX_FAR _SaffronGymEndBattleText2 - db "@" + text_far _SaffronGymEndBattleText2 + text_end SaffronGymAfterBattleText2: - TX_FAR _SaffronGymAfterBattleText2 - db "@" + text_far _SaffronGymAfterBattleText2 + text_end SaffronGymBattleText3: - TX_FAR _SaffronGymBattleText3 - db "@" + text_far _SaffronGymBattleText3 + text_end SaffronGymEndBattleText3: - TX_FAR _SaffronGymEndBattleText3 - db "@" + text_far _SaffronGymEndBattleText3 + text_end SaffronGymAfterBattleText3: - TX_FAR _SaffronGymAfterBattleText3 - db "@" + text_far _SaffronGymAfterBattleText3 + text_end SaffronGymBattleText4: - TX_FAR _SaffronGymBattleText4 - db "@" + text_far _SaffronGymBattleText4 + text_end SaffronGymEndBattleText4: - TX_FAR _SaffronGymEndBattleText4 - db "@" + text_far _SaffronGymEndBattleText4 + text_end SaffronGymAfterBattleText4: - TX_FAR _SaffronGymAfterBattleText4 - db "@" + text_far _SaffronGymAfterBattleText4 + text_end SaffronGymBattleText5: - TX_FAR _SaffronGymBattleText5 - db "@" + text_far _SaffronGymBattleText5 + text_end SaffronGymEndBattleText5: - TX_FAR _SaffronGymEndBattleText5 - db "@" + text_far _SaffronGymEndBattleText5 + text_end SaffronGymAfterBattleText5: - TX_FAR _SaffronGymAfterBattleText5 - db "@" + text_far _SaffronGymAfterBattleText5 + text_end SaffronGymBattleText6: - TX_FAR _SaffronGymBattleText6 - db "@" + text_far _SaffronGymBattleText6 + text_end SaffronGymEndBattleText6: - TX_FAR _SaffronGymEndBattleText6 - db "@" + text_far _SaffronGymEndBattleText6 + text_end SaffronGymAfterBattleText6: - TX_FAR _SaffronGymAfterBattleText6 - db "@" + text_far _SaffronGymAfterBattleText6 + text_end SaffronGymBattleText7: - TX_FAR _SaffronGymBattleText7 - db "@" + text_far _SaffronGymBattleText7 + text_end SaffronGymEndBattleText7: - TX_FAR _SaffronGymEndBattleText7 - db "@" + text_far _SaffronGymEndBattleText7 + text_end SaffronGymAfterBattleText7: - TX_FAR _SaffronGymAfterBattleText7 - db "@" + text_far _SaffronGymAfterBattleText7 + text_end diff --git a/scripts/SaffronMart.asm b/scripts/SaffronMart.asm index ebb3cddf..bfa47eb1 100755 --- a/scripts/SaffronMart.asm +++ b/scripts/SaffronMart.asm @@ -7,9 +7,9 @@ SaffronMart_TextPointers: dw SaffronMartText3 SaffronMartText2: - TX_FAR _SaffronMartText2 - db "@" + text_far _SaffronMartText2 + text_end SaffronMartText3: - TX_FAR _SaffronMartText3 - db "@" + text_far _SaffronMartText3 + text_end diff --git a/scripts/SaffronPidgeyHouse.asm b/scripts/SaffronPidgeyHouse.asm index f38fbfdb..90078e81 100755 --- a/scripts/SaffronPidgeyHouse.asm +++ b/scripts/SaffronPidgeyHouse.asm @@ -8,20 +8,20 @@ SaffronPidgeyHouse_TextPointers: dw SaffronHouse1Text4 SaffronHouse1Text1: - TX_FAR _SaffronHouse1Text1 - db "@" + text_far _SaffronHouse1Text1 + text_end SaffronHouse1Text2: - TX_FAR _SaffronHouse1Text2 - TX_ASM + text_far _SaffronHouse1Text2 + text_asm ld a, PIDGEY call PlayCry jp TextScriptEnd SaffronHouse1Text3: - TX_FAR _SaffronHouse1Text3 - db "@" + text_far _SaffronHouse1Text3 + text_end SaffronHouse1Text4: - TX_FAR _SaffronHouse1Text4 - db "@" + text_far _SaffronHouse1Text4 + text_end diff --git a/scripts/SaffronPokecenter.asm b/scripts/SaffronPokecenter.asm index 435367ea..f4d9f192 100755 --- a/scripts/SaffronPokecenter.asm +++ b/scripts/SaffronPokecenter.asm @@ -10,20 +10,20 @@ SaffronPokecenter_TextPointers: dw SaffronPokecenterText5 SaffronHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse SaffronPokecenterText2: - TX_FAR _SaffronPokecenterText2 - db "@" + text_far _SaffronPokecenterText2 + text_end SaffronPokecenterText3: - TX_FAR _SaffronPokecenterText3 - db "@" + text_far _SaffronPokecenterText3 + text_end SaffronTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist SaffronPokecenterText5: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/SeafoamIslands1F.asm b/scripts/SeafoamIslands1F.asm index b024a6bd..ceb2a2fb 100755 --- a/scripts/SeafoamIslands1F.asm +++ b/scripts/SeafoamIslands1F.asm @@ -38,9 +38,9 @@ SeafoamIslands1F_Script: jp IsPlayerOnDungeonWarp Seafoam1HolesCoords: - db $06,$11 - db $06,$18 - db $ff + dbmapcoord 17, 6 + dbmapcoord 24, 6 + db -1 ; end SeafoamIslands1F_TextPointers: dw BoulderText diff --git a/scripts/SeafoamIslandsB1F.asm b/scripts/SeafoamIslandsB1F.asm index a4c5767b..ac667513 100755 --- a/scripts/SeafoamIslandsB1F.asm +++ b/scripts/SeafoamIslandsB1F.asm @@ -37,9 +37,9 @@ SeafoamIslandsB1F_Script: jp IsPlayerOnDungeonWarp Seafoam2HolesCoords: - db $06,$12 - db $06,$17 - db $ff + dbmapcoord 18, 6 + dbmapcoord 23, 6 + db -1 ; end SeafoamIslandsB1F_TextPointers: dw BoulderText diff --git a/scripts/SeafoamIslandsB2F.asm b/scripts/SeafoamIslandsB2F.asm index eb6d2437..fe4b3ead 100755 --- a/scripts/SeafoamIslandsB2F.asm +++ b/scripts/SeafoamIslandsB2F.asm @@ -37,9 +37,9 @@ SeafoamIslandsB2F_Script: jp IsPlayerOnDungeonWarp Seafoam3HolesCoords: - db $06,$13 - db $06,$16 - db $ff + dbmapcoord 19, 6 + dbmapcoord 22, 6 + db -1 ; end SeafoamIslandsB2F_TextPointers: dw BoulderText diff --git a/scripts/SeafoamIslandsB3F.asm b/scripts/SeafoamIslandsB3F.asm index c8fec338..9d1093e5 100755 --- a/scripts/SeafoamIslandsB3F.asm +++ b/scripts/SeafoamIslandsB3F.asm @@ -45,9 +45,9 @@ SeafoamIslandsB3F_Script: jp CallFunctionInTable Seafoam4HolesCoords: - db $10,$03 - db $10,$06 - db $ff + dbmapcoord 3, 16 + dbmapcoord 6, 16 + db -1 ; end SeafoamIslandsB3F_ScriptPointers: dw SeafoamIslands4Script0 @@ -59,10 +59,10 @@ SeafoamIslands4Script0: CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE ret z ld a, [wYCoord] - cp $8 + cp 8 ret nz ld a, [wXCoord] - cp $f + cp 15 ret nz ld hl, wSimulatedJoypadStatesEnd ld de, RLEMovement46632 @@ -77,10 +77,10 @@ SeafoamIslands4Script0: ret RLEMovement46632: - db D_DOWN,6 - db D_RIGHT,5 - db D_DOWN,3 - db $ff + db D_DOWN, 6 + db D_RIGHT, 5 + db D_DOWN, 3 + db -1 ; end SeafoamIslands4Script1: ld a, [wSimulatedJoypadStatesIndex] @@ -94,9 +94,9 @@ SeafoamIslands4Script2: CheckBothEventsSet EVENT_SEAFOAM3_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM3_BOULDER2_DOWN_HOLE ret z ld a, [wXCoord] - cp $12 + cp 18 jr z, .asm_4665e - cp $13 + cp 19 ld a, $0 jr nz, .asm_4667b ld de, RLEData_4667f @@ -109,7 +109,7 @@ SeafoamIslands4Script2: dec a ld [wSimulatedJoypadStatesIndex], a xor a - ld [wSpriteStateData2 + $06], a + ld [wSpritePlayerStateData2MovementByte1], a ld hl, wd730 set 7, [hl] ld hl, wFlags_D733 @@ -120,17 +120,17 @@ SeafoamIslands4Script2: ret RLEData_4667f: - db D_DOWN,$06 - db D_RIGHT,$02 - db D_DOWN,$04 - db D_LEFT,$01 - db $FF + db D_DOWN, 6 + db D_RIGHT, 2 + db D_DOWN, 4 + db D_LEFT, 1 + db -1 ; end RLEData_46688: - db D_DOWN,$06 - db D_RIGHT,$02 - db D_DOWN,$04 - db $FF + db D_DOWN, 6 + db D_RIGHT, 2 + db D_DOWN, 4 + db -1 ; end SeafoamIslands4Script3: ld a, [wSimulatedJoypadStatesIndex] diff --git a/scripts/SeafoamIslandsB4F.asm b/scripts/SeafoamIslandsB4F.asm index 1383a561..1dd0b7f9 100755 --- a/scripts/SeafoamIslandsB4F.asm +++ b/scripts/SeafoamIslandsB4F.asm @@ -54,11 +54,11 @@ SeafoamIslands5Script0: ret .Coords - db $11,$14 - db $11,$15 - db $10,$14 - db $10,$15 - db $FF + dbmapcoord 20, 17 + dbmapcoord 21, 17 + dbmapcoord 20, 16 + dbmapcoord 21, 16 + db -1 ; end SeafoamIslands5Script1: ld a, [wSimulatedJoypadStatesIndex] @@ -97,21 +97,21 @@ SeafoamIslands5Script2: ret .Coords - db $0E,$04 - db $0E,$05 - db $FF + dbmapcoord 4, 14 + dbmapcoord 5, 14 + db -1 ; end RLEMovementData_46852: - db D_UP,$03 - db D_RIGHT,$02 - db D_UP,$01 - db $FF + db D_UP, 3 + db D_RIGHT, 2 + db D_UP, 1 + db -1 ; end RLEMovementData_46859: - db D_UP,$03 - db D_RIGHT,$03 - db D_UP,$01 - db $FF + db D_UP, 3 + db D_RIGHT, 3 + db D_UP, 1 + db -1 ; end SeafoamIslands5Script3: ld a, [wSimulatedJoypadStatesIndex] @@ -139,18 +139,11 @@ SeafoamIslandsB4F_TextPointers: dw SeafoamIslands5Text5 ArticunoTrainerHeader: - dbEventFlagBit EVENT_BEAT_ARTICUNO - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_ARTICUNO - dw ArticunoBattleText ; TextBeforeBattle - dw ArticunoBattleText ; TextAfterBattle - dw ArticunoBattleText ; TextEndBattle - dw ArticunoBattleText ; TextEndBattle - - db $ff + trainer EVENT_BEAT_ARTICUNO, 0, ArticunoBattleText, ArticunoBattleText, ArticunoBattleText + db -1 ; end ArticunoText: - TX_ASM + text_asm ld hl, ArticunoTrainerHeader call TalkToTrainer ld a, $4 @@ -158,17 +151,17 @@ ArticunoText: jp TextScriptEnd ArticunoBattleText: - TX_FAR _ArticunoBattleText - TX_ASM + text_far _ArticunoBattleText + text_asm ld a, ARTICUNO call PlayCry call WaitForSoundToFinish jp TextScriptEnd SeafoamIslands5Text4: - TX_FAR _SeafoamIslands5Text4 - db "@" + text_far _SeafoamIslands5Text4 + text_end SeafoamIslands5Text5: - TX_FAR _SeafoamIslands5Text5 - db "@" + text_far _SeafoamIslands5Text5 + text_end diff --git a/scripts/SilphCo10F.asm b/scripts/SilphCo10F.asm index 40506682..29b640fd 100755 --- a/scripts/SilphCo10F.asm +++ b/scripts/SilphCo10F.asm @@ -24,11 +24,11 @@ SilphCo10Script_5a14f: predef_jump ReplaceTileBlock SilphCo10GateCoords: - db $04,$05 - db $FF + dbmapcoord 5, 4 + db -1 ; end SilphCo10Text_5a176: - ld a, [$ffe0] + ldh a, [hUnlockedSilphCoDoors] and a ret z SetEvent EVENT_SILPH_CO_10_UNLOCKED_DOOR @@ -48,39 +48,25 @@ SilphCo10F_TextPointers: dw PickUpItemText SilphCo10TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SILPH_CO_10F_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_10F_TRAINER_0 - dw SilphCo10BattleText1 ; TextBeforeBattle - dw SilphCo10AfterBattleText1 ; TextAfterBattle - dw SilphCo10EndBattleText1 ; TextEndBattle - dw SilphCo10EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_10F_TRAINER_0, 3, SilphCo10BattleText1, SilphCo10EndBattleText1, SilphCo10AfterBattleText1 SilphCo10TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SILPH_CO_10F_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_10F_TRAINER_1 - dw SilphCo10BattleText2 ; TextBeforeBattle - dw SilphCo10AfterBattleText2 ; TextAfterBattle - dw SilphCo10EndBattleText2 ; TextEndBattle - dw SilphCo10EndBattleText2 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SILPH_CO_10F_TRAINER_1, 4, SilphCo10BattleText2, SilphCo10EndBattleText2, SilphCo10AfterBattleText2 + db -1 ; end SilphCo10Text1: - TX_ASM + text_asm ld hl, SilphCo10TrainerHeader0 call TalkToTrainer jp TextScriptEnd SilphCo10Text2: - TX_ASM + text_asm ld hl, SilphCo10TrainerHeader1 call TalkToTrainer jp TextScriptEnd SilphCo10Text3: - TX_ASM + text_asm CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ld hl, SilphCo10Text_5a1d8 jr nz, .asm_cf85f @@ -90,33 +76,33 @@ SilphCo10Text3: jp TextScriptEnd SilphCo10Text_5a1d3: - TX_FAR _SilphCo10Text_5a1d3 - db "@" + text_far _SilphCo10Text_5a1d3 + text_end SilphCo10Text_5a1d8: - TX_FAR _SilphCo10Text_5a1d8 - db "@" + text_far _SilphCo10Text_5a1d8 + text_end SilphCo10BattleText1: - TX_FAR _SilphCo10BattleText1 - db "@" + text_far _SilphCo10BattleText1 + text_end SilphCo10EndBattleText1: - TX_FAR _SilphCo10EndBattleText1 - db "@" + text_far _SilphCo10EndBattleText1 + text_end SilphCo10AfterBattleText1: - TX_FAR _SilphCo10AfterBattleText1 - db "@" + text_far _SilphCo10AfterBattleText1 + text_end SilphCo10BattleText2: - TX_FAR _SilphCo10BattleText2 - db "@" + text_far _SilphCo10BattleText2 + text_end SilphCo10EndBattleText2: - TX_FAR _SilphCo10EndBattleText2 - db "@" + text_far _SilphCo10EndBattleText2 + text_end SilphCo10AfterBattleText2: - TX_FAR _SilphCo10AfterBattleText2 - db "@" + text_far _SilphCo10AfterBattleText2 + text_end diff --git a/scripts/SilphCo11F.asm b/scripts/SilphCo11F.asm index e58dbebe..113ceecc 100755 --- a/scripts/SilphCo11F.asm +++ b/scripts/SilphCo11F.asm @@ -25,8 +25,8 @@ SilphCo11Script_62127: ret SilphCo11GateCoords: - db $06,$03 - db $FF + dbmapcoord 3, 6 + db -1 ; end SilphCo11Script_6214f: push hl @@ -36,14 +36,14 @@ SilphCo11Script_6214f: ld a, [hl] ld c, a xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_62143 ld a, [hli] cp $ff jr z, .asm_6215f push hl - ld hl, $ffe0 + ld hl, hUnlockedSilphCoDoors inc [hl] pop hl cp b @@ -61,11 +61,11 @@ SilphCo11Script_6214f: ret .asm_6215f xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo11Script_6217b: - ld a, [$ffe0] + ldh a, [hUnlockedSilphCoDoors] and a ret z SetEvent EVENT_SILPH_CO_11_UNLOCKED_DOOR @@ -112,14 +112,14 @@ SilphCo11Script_621c5: ld a, [wCoordIndex] ld [wcf0d], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $3 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld de, MovementData_62216 call MoveSprite @@ -128,15 +128,15 @@ SilphCo11Script_621c5: ret CoordsData_62211: - db $0D,$06 - db $0C,$07 - db $FF + dbmapcoord 6, 13 + dbmapcoord 7, 12 + db -1 ; end MovementData_62216: db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end SilphCo11Script_621ff: ld [wPlayerMovingDirection], a @@ -164,10 +164,10 @@ SilphCo11Script3: ld a, $f0 ld [wJoyIgnore], a ld a, $7 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call GBFadeOutToBlack - callba Func_f25a0 + farcall Func_f25a0 call UpdateSprites call Delay3 call GBFadeInFromBlack @@ -181,7 +181,7 @@ SilphCo11Script4: bit 0, a ret nz ld a, $3 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld a, [wcf0d] cp $1 @@ -203,7 +203,7 @@ SilphCo11Script4: ld hl, SilphCo10Text_62528 ld de, SilphCo10Text_62528 call SaveEndBattleTextPointers - ld a, [H_SPRITEINDEX] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -233,13 +233,13 @@ SilphCo11Script_6229c: ld a, MUSIC_MEET_JESSIE_JAMES call PlayMusic xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $fc ld [wJoyIgnore], a ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -308,7 +308,7 @@ SilphCo11Script5: ld de, SilphCo11MovementData_6230b .asm_6232d ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call MoveSprite ld a, $ff ld [wJoyIgnore], a @@ -346,7 +346,7 @@ SilphCo11Script8: ld de, SilphCo11MovementData_62311 .asm_6237b ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call MoveSprite ld a, $ff ld [wJoyIgnore], a @@ -374,7 +374,7 @@ SilphCo11Script10: .asm_623b1 call Delay3 ld a, $9 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SilphCo11Script11: ld hl, wd72d @@ -388,7 +388,7 @@ SilphCo11Script11: ld a, $2d ld [wTrainerNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wJoyIgnore], a ld a, $c call SilphCo11Script_62189 @@ -411,7 +411,7 @@ SilphCo11Script12: ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld a, $a - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a @@ -443,7 +443,7 @@ SilphCo11Script13: SilphCo11Script14: call PlayDefaultMusic xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wJoyIgnore], a ResetEvent EVENT_782 SetEventReuseHL EVENT_BEAT_SILPH_CO_11F_TRAINER_0 @@ -476,21 +476,14 @@ SilphCo11F_TextPointers: dw SilphCo11Text10 SilphCo11TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SILPH_CO_11F_TRAINER_1 - db ($3 << 4) - dwEventFlagAddress EVENT_BEAT_SILPH_CO_11F_TRAINER_1 - dw SilphCo11Trainer1BattleText - dw SilphCo11Trainer1AfterBattleText - dw SilphCo11Trainer1EndBattleText - dw SilphCo11Trainer1EndBattleText - - db $ff ; no more trainers + trainer EVENT_BEAT_SILPH_CO_11F_TRAINER_1, 3, SilphCo11Trainer1BattleText, SilphCo11Trainer1EndBattleText, SilphCo11Trainer1AfterBattleText + db -1 ; end SilphCo11Text4: SilphCo11Text6: SilphCo11Text8: - TX_FAR _SilphCoJessieJamesText1 - TX_ASM + text_far _SilphCoJessieJamesText1 + text_asm ld c, 10 call DelayFrames ld a, $4 @@ -505,91 +498,90 @@ SilphCo11Text8: jp TextScriptEnd SilphCo11Text9: - TX_FAR _SilphCoJessieJamesText2 - db "@" + text_far _SilphCoJessieJamesText2 + text_end SilphCo11Text_624c2: - TX_FAR _SilphCoJessieJamesText3 - db "@" + text_far _SilphCoJessieJamesText3 + text_end SilphCo11Text10: - TX_FAR _SilphCoJessieJamesText4 - TX_ASM + text_far _SilphCoJessieJamesText4 + text_asm ld c, 64 call DelayFrames jp TextScriptEnd SilphCo11Text1: - TX_ASM + text_asm CheckEvent EVENT_GOT_MASTER_BALL - jp nz, .asm_62500 - ld hl, SilphCo11Text_62509 + jp nz, .got_item + ld hl, SilphCoPresidentText call PrintText lb bc, MASTER_BALL, 1 call GiveItem - jr nc, .asm_624f8 - ld hl, SilphCo11Text_6250e + jr nc, .bag_full + ld hl, ReceivedSilphCoMasterBallText call PrintText SetEvent EVENT_GOT_MASTER_BALL - jr .asm_62506 -.asm_624f8 - ld hl, SilphCo11Text_62519 + jr .done +.bag_full + ld hl, SilphCoMasterBallNoRoomText call PrintText - jr .asm_62506 - -.asm_62500 - ld hl, SilphCo11Text_62514 + jr .done +.got_item + ld hl, SilphCo10Text_6231c call PrintText -.asm_62506 +.done jp TextScriptEnd -SilphCo11Text_62509: - TX_FAR _SilphCoPresidentText - db "@" +SilphCoPresidentText: + text_far _SilphCoPresidentText + text_end -SilphCo11Text_6250e: - TX_FAR _ReceivedSilphCoMasterBallText - TX_SFX_KEY_ITEM - db "@" +ReceivedSilphCoMasterBallText: + text_far _ReceivedSilphCoMasterBallText + sound_get_key_item + text_end -SilphCo11Text_62514: - TX_FAR _SilphCo10Text_6231c - db "@" +SilphCo10Text_6231c: + text_far _SilphCo10Text_6231c + text_end -SilphCo11Text_62519: - TX_FAR _SilphCoMasterBallNoRoomText - db "@" +SilphCoMasterBallNoRoomText: + text_far _SilphCoMasterBallNoRoomText + text_end SilphCo11Text2: - TX_FAR _SilphCo11Text2 - db "@" + text_far _SilphCo11Text2 + text_end SilphCo11Text3: - TX_FAR _SilphCo11Text3 - db "@" + text_far _SilphCo11Text3 + text_end SilphCo10Text_62528: - TX_FAR _SilphCo10Text_62330 - db "@" + text_far _SilphCo10Text_62330 + text_end SilphCo11Text7: - TX_FAR _SilphCo10Text_62335 - db "@" + text_far _SilphCo10Text_62335 + text_end SilphCo11Text5: - TX_ASM + text_asm ld hl, SilphCo11TrainerHeader0 call TalkToTrainer jp TextScriptEnd SilphCo11Trainer1BattleText: - TX_FAR _SilphCo11BattleText2 - db "@" + text_far _SilphCo11BattleText2 + text_end SilphCo11Trainer1EndBattleText: - TX_FAR _SilphCo11EndBattleText2 - db "@" + text_far _SilphCo11EndBattleText2 + text_end SilphCo11Trainer1AfterBattleText: - TX_FAR _SilphCo11AfterBattleText2 - db "@" + text_far _SilphCo11AfterBattleText2 + text_end diff --git a/scripts/SilphCo11F_2.asm b/scripts/SilphCo11F_2.asm index bf575de5..c8fd9c3e 100755 --- a/scripts/SilphCo11F_2.asm +++ b/scripts/SilphCo11F_2.asm @@ -1,4 +1,4 @@ -Func_f25a0: +Func_f25a0:: ld hl, MissableObjects_f25ce .asm_f25a3 ld a, [hli] @@ -31,7 +31,7 @@ MissableObjects_f25c7: db HS_SAFFRON_CITY_D db $FF -MissableObjects_f25ce +MissableObjects_f25ce: db HS_SAFFRON_CITY_1 db HS_SAFFRON_CITY_2 db HS_SAFFRON_CITY_3 diff --git a/scripts/SilphCo1F.asm b/scripts/SilphCo1F.asm index 6ccaa29c..bc484b7c 100755 --- a/scripts/SilphCo1F.asm +++ b/scripts/SilphCo1F.asm @@ -12,5 +12,5 @@ SilphCo1F_TextPointers: dw SilphCo1Text1 SilphCo1Text1: - TX_FAR _SilphCo1Text1 - db "@" + text_far _SilphCo1Text1 + text_end diff --git a/scripts/SilphCo2F.asm b/scripts/SilphCo2F.asm index 5fd542cb..4b96c314 100755 --- a/scripts/SilphCo2F.asm +++ b/scripts/SilphCo2F.asm @@ -33,9 +33,9 @@ SilphCo2Script_59d07: predef_jump ReplaceTileBlock SilphCo2GateCoords: - db $02,$02 - db $05,$02 - db $FF + dbmapcoord 2, 2 + dbmapcoord 2, 5 + db -1 ; end SilphCo2Script_59d43: push hl @@ -45,14 +45,14 @@ SilphCo2Script_59d43: ld a, [hl] ld c, a xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_59d4f ld a, [hli] cp $ff jr z, .asm_59d6b push hl - ld hl, $ffe0 + ld hl, hUnlockedSilphCoDoors inc [hl] pop hl cp b @@ -70,12 +70,12 @@ SilphCo2Script_59d43: ret .asm_59d6b xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo2Script_59d6f: EventFlagAddress hl, EVENT_SILPH_CO_2_UNLOCKED_DOOR1 - ld a, [$ffe0] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 @@ -99,50 +99,22 @@ SilphCo2F_TextPointers: dw SilphCo2Text5 SilphCo2TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_0 - dw SilphCo2BattleText1 ; TextBeforeBattle - dw SilphCo2AfterBattleText1 ; TextAfterBattle - dw SilphCo2EndBattleText1 ; TextEndBattle - dw SilphCo2EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_0, 3, SilphCo2BattleText1, SilphCo2EndBattleText1, SilphCo2AfterBattleText1 SilphCo2TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_1 - dw SilphCo2BattleText2 ; TextBeforeBattle - dw SilphCo2AfterBattleText2 ; TextAfterBattle - dw SilphCo2EndBattleText2 ; TextEndBattle - dw SilphCo2EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_1, 4, SilphCo2BattleText2, SilphCo2EndBattleText2, SilphCo2AfterBattleText2 SilphCo2TrainerHeader2: - dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_2 - dw SilphCo2BattleText3 ; TextBeforeBattle - dw SilphCo2AfterBattleText3 ; TextAfterBattle - dw SilphCo2EndBattleText3 ; TextEndBattle - dw SilphCo2EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_2, 3, SilphCo2BattleText3, SilphCo2EndBattleText3, SilphCo2AfterBattleText3 SilphCo2TrainerHeader3: - dbEventFlagBit EVENT_BEAT_SILPH_CO_2F_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_2F_TRAINER_3 - dw SilphCo2BattleText4 ; TextBeforeBattle - dw SilphCo2AfterBattleText4 ; TextAfterBattle - dw SilphCo2EndBattleText4 ; TextEndBattle - dw SilphCo2EndBattleText4 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SILPH_CO_2F_TRAINER_3, 3, SilphCo2BattleText4, SilphCo2EndBattleText4, SilphCo2AfterBattleText4 + db -1 ; end SilphCo2Text1: - TX_ASM + text_asm CheckEvent EVENT_GOT_TM36 jr nz, .asm_59de4 ld hl, SilphCo2Text_59ded call PrintText - lb bc, TM_36, 1 + lb bc, TM_SELFDESTRUCT, 1 call GiveItem ld hl, TM36NoRoomText jr nc, .asm_59de7 @@ -156,90 +128,90 @@ SilphCo2Text1: jp TextScriptEnd SilphCo2Text_59ded: - TX_FAR _SilphCo2Text_59ded - db "@" + text_far _SilphCo2Text_59ded + text_end ReceivedTM36Text: - TX_FAR _ReceivedTM36Text - TX_SFX_ITEM_1 - db "@" + text_far _ReceivedTM36Text + sound_get_item_1 + text_end TM36ExplanationText: - TX_FAR _TM36ExplanationText - db "@" + text_far _TM36ExplanationText + text_end TM36NoRoomText: - TX_FAR _TM36NoRoomText - db "@" + text_far _TM36NoRoomText + text_end SilphCo2Text2: - TX_ASM + text_asm ld hl, SilphCo2TrainerHeader0 call TalkToTrainer jp TextScriptEnd SilphCo2Text3: - TX_ASM + text_asm ld hl, SilphCo2TrainerHeader1 call TalkToTrainer jp TextScriptEnd SilphCo2Text4: - TX_ASM + text_asm ld hl, SilphCo2TrainerHeader2 call TalkToTrainer jp TextScriptEnd SilphCo2Text5: - TX_ASM + text_asm ld hl, SilphCo2TrainerHeader3 call TalkToTrainer jp TextScriptEnd SilphCo2BattleText1: - TX_FAR _SilphCo2BattleText1 - db "@" + text_far _SilphCo2BattleText1 + text_end SilphCo2EndBattleText1: - TX_FAR _SilphCo2EndBattleText1 - db "@" + text_far _SilphCo2EndBattleText1 + text_end SilphCo2AfterBattleText1: - TX_FAR _SilphCo2AfterBattleText1 - db "@" + text_far _SilphCo2AfterBattleText1 + text_end SilphCo2BattleText2: - TX_FAR _SilphCo2BattleText2 - db "@" + text_far _SilphCo2BattleText2 + text_end SilphCo2EndBattleText2: - TX_FAR _SilphCo2EndBattleText2 - db "@" + text_far _SilphCo2EndBattleText2 + text_end SilphCo2AfterBattleText2: - TX_FAR _SilphCo2AfterBattleText2 - db "@" + text_far _SilphCo2AfterBattleText2 + text_end SilphCo2BattleText3: - TX_FAR _SilphCo2BattleText3 - db "@" + text_far _SilphCo2BattleText3 + text_end SilphCo2EndBattleText3: - TX_FAR _SilphCo2EndBattleText3 - db "@" + text_far _SilphCo2EndBattleText3 + text_end SilphCo2AfterBattleText3: - TX_FAR _SilphCo2AfterBattleText3 - db "@" + text_far _SilphCo2AfterBattleText3 + text_end SilphCo2BattleText4: - TX_FAR _SilphCo2BattleText4 - db "@" + text_far _SilphCo2BattleText4 + text_end SilphCo2EndBattleText4: - TX_FAR _SilphCo2EndBattleText4 - db "@" + text_far _SilphCo2EndBattleText4 + text_end SilphCo2AfterBattleText4: - TX_FAR _SilphCo2AfterBattleText4 - db "@" + text_far _SilphCo2AfterBattleText4 + text_end diff --git a/scripts/SilphCo3F.asm b/scripts/SilphCo3F.asm index 42b5d611..69dfdad9 100755 --- a/scripts/SilphCo3F.asm +++ b/scripts/SilphCo3F.asm @@ -33,13 +33,13 @@ SilphCo3Script_59f71: predef_jump ReplaceTileBlock SilphCo3GateCoords: - db $04,$04 - db $04,$08 - db $FF + dbmapcoord 4, 4 + dbmapcoord 8, 4 + db -1 ; end SilphCo3Script_59fad: EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1 - ld a, [$ffe0] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 @@ -62,27 +62,13 @@ SilphCo3F_TextPointers: dw PickUpItemText SilphCo3TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SILPH_CO_3F_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_3F_TRAINER_0 - dw SilphCo3BattleText1 ; TextBeforeBattle - dw SilphCo3AfterBattleText1 ; TextAfterBattle - dw SilphCo3EndBattleText1 ; TextEndBattle - dw SilphCo3EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_0, 2, SilphCo3BattleText1, SilphCo3EndBattleText1, SilphCo3AfterBattleText1 SilphCo3TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SILPH_CO_3F_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_3F_TRAINER_1 - dw SilphCo3BattleText2 ; TextBeforeBattle - dw SilphCo3AfterBattleText2 ; TextAfterBattle - dw SilphCo3EndBattleText2 ; TextEndBattle - dw SilphCo3EndBattleText2 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_1, 3, SilphCo3BattleText2, SilphCo3EndBattleText2, SilphCo3AfterBattleText2 + db -1 ; end SilphCo3Text1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ld hl, SilphCo3Text_59ffe jr nz, .asm_59fee @@ -92,45 +78,45 @@ SilphCo3Text1: jp TextScriptEnd SilphCo3Text_59ff9: - TX_FAR _SilphCo3Text_59ff9 - db "@" + text_far _SilphCo3Text_59ff9 + text_end SilphCo3Text_59ffe: - TX_FAR _SilphCo3Text_59ffe - db "@" + text_far _SilphCo3Text_59ffe + text_end SilphCo3Text2: - TX_ASM + text_asm ld hl, SilphCo3TrainerHeader0 call TalkToTrainer jp TextScriptEnd SilphCo3BattleText1: - TX_FAR _SilphCo3BattleText1 - db "@" + text_far _SilphCo3BattleText1 + text_end SilphCo3EndBattleText1: - TX_FAR _SilphCo3EndBattleText1 - db "@" + text_far _SilphCo3EndBattleText1 + text_end SilphCo3AfterBattleText1: - TX_FAR _SilphCo3AfterBattleText1 - db "@" + text_far _SilphCo3AfterBattleText1 + text_end SilphCo3Text3: - TX_ASM + text_asm ld hl, SilphCo3TrainerHeader1 call TalkToTrainer jp TextScriptEnd SilphCo3BattleText2: - TX_FAR _SilphCo3BattleText2 - db "@" + text_far _SilphCo3BattleText2 + text_end SilphCo3EndBattleText2: - TX_FAR _SilphCo3EndBattleText2 - db "@" + text_far _SilphCo3EndBattleText2 + text_end SilphCo3AfterBattleText2: - TX_FAR _SilphCo3AfterBattleText2 - db "@" + text_far _SilphCo3AfterBattleText2 + text_end diff --git a/scripts/SilphCo4F.asm b/scripts/SilphCo4F.asm index 7d5072f6..8d5d696a 100755 --- a/scripts/SilphCo4F.asm +++ b/scripts/SilphCo4F.asm @@ -33,9 +33,9 @@ SilphCo4Script_19d21: predef_jump ReplaceTileBlock SilphCo4GateCoords: - db $06,$02 - db $04,$06 - db $FF + dbmapcoord 2, 6 + dbmapcoord 6, 4 + db -1 ; end SilphCo4Script_19d5d: push hl @@ -45,14 +45,14 @@ SilphCo4Script_19d5d: ld a, [hl] ld c, a xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_19d69 ld a, [hli] cp $ff jr z, .asm_19d85 push hl - ld hl, $ffe0 + ld hl, hUnlockedSilphCoDoors inc [hl] pop hl cp b @@ -70,12 +70,12 @@ SilphCo4Script_19d5d: ret .asm_19d85 xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo4Script_19d89: EventFlagAddress hl, EVENT_SILPH_CO_4_UNLOCKED_DOOR1 - ld a, [$ffe0] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 @@ -101,99 +101,78 @@ SilphCo4F_TextPointers: dw PickUpItemText SilphCo4TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_0 - dw SilphCo4BattleText2 ; TextBeforeBattle - dw SilphCo4AfterBattleText2 ; TextAfterBattle - dw SilphCo4EndBattleText2 ; TextEndBattle - dw SilphCo4EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_0, 4, SilphCo4BattleText2, SilphCo4EndBattleText2, SilphCo4AfterBattleText2 SilphCo4TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_1 - dw SilphCo4BattleText3 ; TextBeforeBattle - dw SilphCo4AfterBattleText3 ; TextAfterBattle - dw SilphCo4EndBattleText3 ; TextEndBattle - dw SilphCo4EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_1, 3, SilphCo4BattleText3, SilphCo4EndBattleText3, SilphCo4AfterBattleText3 SilphCo4TrainerHeader2: - dbEventFlagBit EVENT_BEAT_SILPH_CO_4F_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_4F_TRAINER_2 - dw SilphCo4BattleText4 ; TextBeforeBattle - dw SilphCo4AfterBattleText4 ; TextAfterBattle - dw SilphCo4EndBattleText4 ; TextEndBattle - dw SilphCo4EndBattleText4 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SILPH_CO_4F_TRAINER_2, 4, SilphCo4BattleText4, SilphCo4EndBattleText4, SilphCo4AfterBattleText4 + db -1 ; end SilphCo4Text1: - TX_ASM + text_asm ld hl, SilphCo4Text_19de0 ld de, SilphCo4Text_19de5 call SilphCo6Script_1a22f jp TextScriptEnd SilphCo4Text_19de0: - TX_FAR _SilphCo4Text_19de0 - db "@" + text_far _SilphCo4Text_19de0 + text_end SilphCo4Text_19de5: - TX_FAR _SilphCo4Text_19de5 - db "@" + text_far _SilphCo4Text_19de5 + text_end SilphCo4Text2: - TX_ASM + text_asm ld hl, SilphCo4TrainerHeader0 call TalkToTrainer jp TextScriptEnd SilphCo4BattleText2: - TX_FAR _SilphCo4BattleText2 - db "@" + text_far _SilphCo4BattleText2 + text_end SilphCo4EndBattleText2: - TX_FAR _SilphCo4EndBattleText2 - db "@" + text_far _SilphCo4EndBattleText2 + text_end SilphCo4AfterBattleText2: - TX_FAR _SilphCo4AfterBattleText2 - db "@" + text_far _SilphCo4AfterBattleText2 + text_end SilphCo4Text3: - TX_ASM + text_asm ld hl, SilphCo4TrainerHeader1 call TalkToTrainer jp TextScriptEnd SilphCo4BattleText3: - TX_FAR _SilphCo4BattleText3 - db "@" + text_far _SilphCo4BattleText3 + text_end SilphCo4EndBattleText3: - TX_FAR _SilphCo4EndBattleText3 - db "@" + text_far _SilphCo4EndBattleText3 + text_end SilphCo4AfterBattleText3: - TX_FAR _SilphCo4AfterBattleText3 - db "@" + text_far _SilphCo4AfterBattleText3 + text_end SilphCo4Text4: - TX_ASM + text_asm ld hl, SilphCo4TrainerHeader2 call TalkToTrainer jp TextScriptEnd SilphCo4BattleText4: - TX_FAR _SilphCo4BattleText4 - db "@" + text_far _SilphCo4BattleText4 + text_end SilphCo4EndBattleText4: - TX_FAR _SilphCo4EndBattleText4 - db "@" + text_far _SilphCo4EndBattleText4 + text_end SilphCo4AfterBattleText4: - TX_FAR _SilphCo4AfterBattleText4 - db "@" + text_far _SilphCo4AfterBattleText4 + text_end diff --git a/scripts/SilphCo5F.asm b/scripts/SilphCo5F.asm index d9deda5b..975dacac 100755 --- a/scripts/SilphCo5F.asm +++ b/scripts/SilphCo5F.asm @@ -42,14 +42,14 @@ SilphCo5Script_19f4d: predef_jump ReplaceTileBlock SilphCo5GateCoords: - db $02,$03 - db $06,$03 - db $05,$07 - db $FF + dbmapcoord 3, 2 + dbmapcoord 3, 6 + dbmapcoord 7, 5 + db -1 ; end SilphCo5Script_19f9e: EventFlagAddress hl, EVENT_SILPH_CO_5_UNLOCKED_DOOR1 - ld a, [$ffe0] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 @@ -84,138 +84,110 @@ SilphCo5F_TextPointers: dw SilphCo5Text11 SilphCo5TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_0 - db ($1 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_0 - dw SilphCo5BattleText2 ; TextBeforeBattle - dw SilphCo5AfterBattleText2 ; TextAfterBattle - dw SilphCo5EndBattleText2 ; TextEndBattle - dw SilphCo5EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_0, 1, SilphCo5BattleText2, SilphCo5EndBattleText2, SilphCo5AfterBattleText2 SilphCo5TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_1 - dw SilphCo5BattleText3 ; TextBeforeBattle - dw SilphCo5AfterBattleText3 ; TextAfterBattle - dw SilphCo5EndBattleText3 ; TextEndBattle - dw SilphCo5EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_1, 2, SilphCo5BattleText3, SilphCo5EndBattleText3, SilphCo5AfterBattleText3 SilphCo5TrainerHeader2: - dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_2 - dw SilphCo5BattleText4 ; TextBeforeBattle - dw SilphCo5AfterBattleText4 ; TextAfterBattle - dw SilphCo5EndBattleText4 ; TextEndBattle - dw SilphCo5EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_2, 4, SilphCo5BattleText4, SilphCo5EndBattleText4, SilphCo5AfterBattleText4 SilphCo5TrainerHeader3: - dbEventFlagBit EVENT_BEAT_SILPH_CO_5F_TRAINER_3 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_5F_TRAINER_3 - dw SilphCo5BattleText5 ; TextBeforeBattle - dw SilphCo5AfterBattleText5 ; TextAfterBattle - dw SilphCo5EndBattleText5 ; TextEndBattle - dw SilphCo5EndBattleText5 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SILPH_CO_5F_TRAINER_3, 3, SilphCo5BattleText5, SilphCo5EndBattleText5, SilphCo5AfterBattleText5 + db -1 ; end SilphCo5Text1: - TX_ASM + text_asm ld hl, SilphCo5Text_1a010 ld de, SilphCo5Text_1a015 call SilphCo6Script_1a22f jp TextScriptEnd SilphCo5Text_1a010: - TX_FAR _SilphCo5Text_1a010 - db "@" + text_far _SilphCo5Text_1a010 + text_end SilphCo5Text_1a015: - TX_FAR _SilphCo5Text_1a015 - db "@" + text_far _SilphCo5Text_1a015 + text_end SilphCo5Text2: - TX_ASM + text_asm ld hl, SilphCo5TrainerHeader0 call TalkToTrainer jp TextScriptEnd SilphCo5BattleText2: - TX_FAR _SilphCo5BattleText2 - db "@" + text_far _SilphCo5BattleText2 + text_end SilphCo5EndBattleText2: - TX_FAR _SilphCo5EndBattleText2 - db "@" + text_far _SilphCo5EndBattleText2 + text_end SilphCo5AfterBattleText2: - TX_FAR _SilphCo5AfterBattleText2 - db "@" + text_far _SilphCo5AfterBattleText2 + text_end SilphCo5Text3: - TX_ASM + text_asm ld hl, SilphCo5TrainerHeader1 call TalkToTrainer jp TextScriptEnd SilphCo5BattleText3: - TX_FAR _SilphCo5BattleText3 - db "@" + text_far _SilphCo5BattleText3 + text_end SilphCo5EndBattleText3: - TX_FAR _SilphCo5EndBattleText3 - db "@" + text_far _SilphCo5EndBattleText3 + text_end SilphCo5AfterBattleText3: - TX_FAR _SilphCo5AfterBattleText3 - db "@" + text_far _SilphCo5AfterBattleText3 + text_end SilphCo5Text4: - TX_ASM + text_asm ld hl, SilphCo5TrainerHeader2 call TalkToTrainer jp TextScriptEnd SilphCo5BattleText4: - TX_FAR _SilphCo5BattleText4 - db "@" + text_far _SilphCo5BattleText4 + text_end SilphCo5EndBattleText4: - TX_FAR _SilphCo5EndBattleText4 - db "@" + text_far _SilphCo5EndBattleText4 + text_end SilphCo5AfterBattleText4: - TX_FAR _SilphCo5AfterBattleText4 - db "@" + text_far _SilphCo5AfterBattleText4 + text_end SilphCo5Text5: - TX_ASM + text_asm ld hl, SilphCo5TrainerHeader3 call TalkToTrainer jp TextScriptEnd SilphCo5BattleText5: - TX_FAR _SilphCo5BattleText5 - db "@" + text_far _SilphCo5BattleText5 + text_end SilphCo5EndBattleText5: - TX_FAR _SilphCo5EndBattleText5 - db "@" + text_far _SilphCo5EndBattleText5 + text_end SilphCo5AfterBattleText5: - TX_FAR _SilphCo5AfterBattleText5 - db "@" + text_far _SilphCo5AfterBattleText5 + text_end SilphCo5Text9: - TX_FAR _SilphCo5Text9 - db "@" + text_far _SilphCo5Text9 + text_end SilphCo5Text10: - TX_FAR _SilphCo5Text10 - db "@" + text_far _SilphCo5Text10 + text_end SilphCo5Text11: - TX_FAR _SilphCo5Text11 - db "@" + text_far _SilphCo5Text11 + text_end diff --git a/scripts/SilphCo6F.asm b/scripts/SilphCo6F.asm index ddbcba79..ea8c20c2 100755 --- a/scripts/SilphCo6F.asm +++ b/scripts/SilphCo6F.asm @@ -24,11 +24,11 @@ SilphCo6Script_1a1bf: predef_jump ReplaceTileBlock SilphCo6GateCoords: - db $06,$02 - db $FF + dbmapcoord 2, 6 + db -1 ; end SilphCo6Script_1a1e6: - ld a, [$ffe0] + ldh a, [hUnlockedSilphCoDoors] and a ret z SetEvent EVENT_SILPH_CO_6_UNLOCKED_DOOR @@ -52,33 +52,12 @@ SilphCo6F_TextPointers: dw PickUpItemText SilphCo6TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_0 - dw SilphCo6BattleText2 ; TextBeforeBattle - dw SilphCo6AfterBattleText2 ; TextAfterBattle - dw SilphCo6EndBattleText2 ; TextEndBattle - dw SilphCo6EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_0, 2, SilphCo6BattleText2, SilphCo6EndBattleText2, SilphCo6AfterBattleText2 SilphCo6TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_1 - dw SilphCo6BattleText3 ; TextBeforeBattle - dw SilphCo6AfterBattleText3 ; TextAfterBattle - dw SilphCo6EndBattleText3 ; TextEndBattle - dw SilphCo6EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_1, 3, SilphCo6BattleText3, SilphCo6EndBattleText3, SilphCo6AfterBattleText3 SilphCo6TrainerHeader2: - dbEventFlagBit EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 1 - dw SilphCo6BattleText4 ; TextBeforeBattle - dw SilphCo6AfterBattleText4 ; TextAfterBattle - dw SilphCo6EndBattleText4 ; TextEndBattle - dw SilphCo6EndBattleText4 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SILPH_CO_6F_TRAINER_2, 1, 2, SilphCo6BattleText4, SilphCo6EndBattleText4, SilphCo6AfterBattleText4 + db -1 ; end SilphCo6Script_1a22f: CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI @@ -91,130 +70,130 @@ SilphCo6Script_1a22f: jp PrintText SilphCo6Text1: - TX_ASM + text_asm ld hl, SilphCo6Text_1a24a ld de, SilphCo6Text_1a24f call SilphCo6Script_1a22f jp TextScriptEnd SilphCo6Text_1a24a: - TX_FAR _SilphCo6Text_1a24a - db "@" + text_far _SilphCo6Text_1a24a + text_end SilphCo6Text_1a24f: - TX_FAR _SilphCo6Text_1a24f - db "@" + text_far _SilphCo6Text_1a24f + text_end SilphCo6Text2: - TX_ASM + text_asm ld hl, SilphCo6Text_1a261 ld de, SilphCo6Text_1a266 call SilphCo6Script_1a22f jp TextScriptEnd SilphCo6Text_1a261: - TX_FAR _SilphCo6Text_1a261 - db "@" + text_far _SilphCo6Text_1a261 + text_end SilphCo6Text_1a266: - TX_FAR _SilphCo6Text_1a266 - db "@" + text_far _SilphCo6Text_1a266 + text_end SilphCo6Text3: - TX_ASM + text_asm ld hl, SilphCo6Text_1a278 ld de, SilphCo6Text_1a27d call SilphCo6Script_1a22f jp TextScriptEnd SilphCo6Text_1a278: - TX_FAR _SilphCo6Text_1a278 - db "@" + text_far _SilphCo6Text_1a278 + text_end SilphCo6Text_1a27d: - TX_FAR _SilphCo6Text_1a27d - db "@" + text_far _SilphCo6Text_1a27d + text_end SilphCo6Text4: - TX_ASM + text_asm ld hl, SilphCo6Text_1a28f ld de, SilphCo6Text_1a294 call SilphCo6Script_1a22f jp TextScriptEnd SilphCo6Text_1a28f: - TX_FAR _SilphCo6Text_1a28f - db "@" + text_far _SilphCo6Text_1a28f + text_end SilphCo6Text_1a294: - TX_FAR _SilphCo6Text_1a294 - db "@" + text_far _SilphCo6Text_1a294 + text_end SilphCo6Text5: - TX_ASM + text_asm ld hl, SilphCo6Text_1a2a6 ld de, SilphCo6Text_1a2ab call SilphCo6Script_1a22f jp TextScriptEnd SilphCo6Text_1a2a6: - TX_FAR _SilphCo6Text_1a2a6 - db "@" + text_far _SilphCo6Text_1a2a6 + text_end SilphCo6Text_1a2ab: - TX_FAR _SilphCo6Text_1a2ab - db "@" + text_far _SilphCo6Text_1a2ab + text_end SilphCo6Text6: - TX_ASM + text_asm ld hl, SilphCo6TrainerHeader0 call TalkToTrainer jp TextScriptEnd SilphCo6BattleText2: - TX_FAR _SilphCo6BattleText2 - db "@" + text_far _SilphCo6BattleText2 + text_end SilphCo6EndBattleText2: - TX_FAR _SilphCo6EndBattleText2 - db "@" + text_far _SilphCo6EndBattleText2 + text_end SilphCo6AfterBattleText2: - TX_FAR _SilphCo6AfterBattleText2 - db "@" + text_far _SilphCo6AfterBattleText2 + text_end SilphCo6Text7: - TX_ASM + text_asm ld hl, SilphCo6TrainerHeader1 call TalkToTrainer jp TextScriptEnd SilphCo6BattleText3: - TX_FAR _SilphCo6BattleText3 - db "@" + text_far _SilphCo6BattleText3 + text_end SilphCo6EndBattleText3: - TX_FAR _SilphCo6EndBattleText3 - db "@" + text_far _SilphCo6EndBattleText3 + text_end SilphCo6AfterBattleText3: - TX_FAR _SilphCo6AfterBattleText3 - db "@" + text_far _SilphCo6AfterBattleText3 + text_end SilphCo6Text8: - TX_ASM + text_asm ld hl, SilphCo6TrainerHeader2 call TalkToTrainer jp TextScriptEnd SilphCo6BattleText4: - TX_FAR _SilphCo6BattleText4 - db "@" + text_far _SilphCo6BattleText4 + text_end SilphCo6EndBattleText4: - TX_FAR _SilphCo6EndBattleText4 - db "@" + text_far _SilphCo6EndBattleText4 + text_end SilphCo6AfterBattleText4: - TX_FAR _SilphCo6AfterBattleText4 - db "@" + text_far _SilphCo6AfterBattleText4 + text_end diff --git a/scripts/SilphCo7F.asm b/scripts/SilphCo7F.asm index a8dc032d..b32f967b 100755 --- a/scripts/SilphCo7F.asm +++ b/scripts/SilphCo7F.asm @@ -42,10 +42,10 @@ SilphCo7Script_51b77: predef_jump ReplaceTileBlock SilphCo7GateCoords: - db $03,$05 - db $02,$0A - db $06,$0A - db $FF + dbmapcoord 5, 3 + dbmapcoord 10, 2 + dbmapcoord 10, 6 + db -1 ; end SilphCo7Text_51bc8: push hl @@ -55,14 +55,14 @@ SilphCo7Text_51bc8: ld a, [hl] ld c, a xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_51bd4 ld a, [hli] cp $ff jr z, .asm_51bf0 push hl - ld hl, $ffe0 + ld hl, hUnlockedSilphCoDoors inc [hl] pop hl cp b @@ -80,12 +80,12 @@ SilphCo7Text_51bc8: ret .asm_51bf0 xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo7Text_51bf4: EventFlagAddress hl, EVENT_SILPH_CO_7_UNLOCKED_DOOR1 - ld a, [$ffe0] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 @@ -125,7 +125,7 @@ SilphCo7Script0: call ArePlayerCoordsInArray jp nc, CheckFightingMapTrainers xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $f0 ld [wJoyIgnore], a ld a, PLAYER_DIR_DOWN @@ -135,10 +135,10 @@ SilphCo7Script0: ld a, MUSIC_MEET_RIVAL call PlayMusic ld a, $9 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, $9 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteMovementBytesToFF ld de, MovementData_51c7d ld a, [wCoordIndex] @@ -148,22 +148,22 @@ SilphCo7Script0: inc de .asm_51c6c ld a, $9 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite ld a, $3 jp SilphCo7Text_51c10 CoordsData_51c78: - db $02,$03 - db $03,$03 - db $FF + dbmapcoord 3, 2 + dbmapcoord 3, 3 + db -1 ; end MovementData_51c7d: db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP db NPC_MOVEMENT_UP - db $FF + db -1 ; end SilphCo7Script3: ld a, [wd730] @@ -172,7 +172,7 @@ SilphCo7Script3: xor a ld [wJoyIgnore], a ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 ld hl, wd72d @@ -181,7 +181,7 @@ SilphCo7Script3: ld hl, SilphCo7Text14 ld de, SilphCo7Text_51ecd call SaveEndBattleTextPointers - ld a, OPP_SONY2 + ld a, OPP_RIVAL2 ld [wCurOpponent], a ld a, [wRivalStarter] add 4 @@ -200,15 +200,15 @@ SilphCo7Script4: ld a, PLAYER_DIR_DOWN ld [wPlayerMovingDirection], a ld a, $9 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $f - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call StopAllMusic - callba Music_RivalAlternateStart + farcall Music_RivalAlternateStart ld de, MovementData_51d1d ld a, [wcf0d] cp $1 @@ -216,7 +216,7 @@ SilphCo7Script4: ld de, MovementData_51d1a .asm_51d0e ld a, $9 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call MoveSprite ld a, $5 jp SilphCo7Text_51c10 @@ -224,7 +224,7 @@ SilphCo7Script4: MovementData_51d1a: db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT - db $FF + db -1 ; end MovementData_51d1d: db NPC_MOVEMENT_LEFT @@ -234,7 +234,7 @@ MovementData_51d1d: db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_DOWN - db $FF + db -1 ; end SilphCo7Script5: ld a, [wd730] @@ -266,46 +266,18 @@ SilphCo7F_TextPointers: dw SilphCo7Text15 SilphCo7TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_0 - dw SilphCo7BattleText1 ; TextBeforeBattle - dw SilphCo7AfterBattleText1 ; TextAfterBattle - dw SilphCo7EndBattleText1 ; TextEndBattle - dw SilphCo7EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_0, 2, SilphCo7BattleText1, SilphCo7EndBattleText1, SilphCo7AfterBattleText1 SilphCo7TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_1 - dw SilphCo7BattleText2 ; TextBeforeBattle - dw SilphCo7AfterBattleText2 ; TextAfterBattle - dw SilphCo7EndBattleText2 ; TextEndBattle - dw SilphCo7EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_1, 3, SilphCo7BattleText2, SilphCo7EndBattleText2, SilphCo7AfterBattleText2 SilphCo7TrainerHeader2: - dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_2 - dw SilphCo7BattleText3 ; TextBeforeBattle - dw SilphCo7AfterBattleText3 ; TextAfterBattle - dw SilphCo7EndBattleText3 ; TextEndBattle - dw SilphCo7EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_2, 3, SilphCo7BattleText3, SilphCo7EndBattleText3, SilphCo7AfterBattleText3 SilphCo7TrainerHeader3: - dbEventFlagBit EVENT_BEAT_SILPH_CO_7F_TRAINER_3, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_7F_TRAINER_3, 1 - dw SilphCo7BattleText4 ; TextBeforeBattle - dw SilphCo7AfterBattleText4 ; TextAfterBattle - dw SilphCo7EndBattleText4 ; TextEndBattle - dw SilphCo7EndBattleText4 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SILPH_CO_7F_TRAINER_3, 1, 4, SilphCo7BattleText4, SilphCo7EndBattleText4, SilphCo7AfterBattleText4 + db -1 ; end SilphCo7Text1: ; lapras guy - TX_ASM + text_asm ld a, [wd72e] bit 0, a ; got lapras? jr z, .givelapras @@ -336,23 +308,23 @@ SilphCo7Text1: jp TextScriptEnd .MeetLaprasGuyText - TX_FAR _MeetLaprasGuyText - db "@" + text_far _MeetLaprasGuyText + text_end .HeresYourLaprasText - TX_FAR _HeresYourLaprasText - db "@" + text_far _HeresYourLaprasText + text_end .LaprasGuyText - TX_FAR _LaprasGuyText - db "@" + text_far _LaprasGuyText + text_end .LaprasGuySavedText - TX_FAR _LaprasGuySavedText - db "@" + text_far _LaprasGuySavedText + text_end SilphCo7Text2: - TX_ASM + text_asm CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .savedsilph ld hl, .rockettext @@ -365,15 +337,15 @@ SilphCo7Text2: jp TextScriptEnd .rockettext - TX_FAR _SilphCo7Text_51e00 - db "@" + text_far _SilphCo7Text_51e00 + text_end .savedtext - TX_FAR _CanceledMasterBallText - db "@" + text_far _CanceledMasterBallText + text_end SilphCo7Text3: - TX_ASM + text_asm CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .savedsilph ld hl, .rockettext @@ -386,15 +358,15 @@ SilphCo7Text3: jp TextScriptEnd .rockettext - TX_FAR _SilphCo7Text_51e23 - db "@" + text_far _SilphCo7Text_51e23 + text_end .savedtext - TX_FAR _SilphCo7Text_51e28 - db "@" + text_far _SilphCo7Text_51e28 + text_end SilphCo7Text4: - TX_ASM + text_asm CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .savedsilph ld hl, .rockettext @@ -407,107 +379,107 @@ SilphCo7Text4: jp TextScriptEnd .rockettext - TX_FAR _SilphCo7Text_51e46 - db "@" + text_far _SilphCo7Text_51e46 + text_end .savedtext - TX_FAR _SilphCo7Text_51e4b - db "@" + text_far _SilphCo7Text_51e4b + text_end SilphCo7Text5: - TX_ASM + text_asm ld hl, SilphCo7TrainerHeader0 call TalkToTrainer jp TextScriptEnd SilphCo7BattleText1: - TX_FAR _SilphCo7BattleText1 - db "@" + text_far _SilphCo7BattleText1 + text_end SilphCo7EndBattleText1: - TX_FAR _SilphCo7EndBattleText1 - db "@" + text_far _SilphCo7EndBattleText1 + text_end SilphCo7AfterBattleText1: - TX_FAR _SilphCo7AfterBattleText1 - db "@" + text_far _SilphCo7AfterBattleText1 + text_end SilphCo7Text6: - TX_ASM + text_asm ld hl, SilphCo7TrainerHeader1 call TalkToTrainer jp TextScriptEnd SilphCo7BattleText2: - TX_FAR _SilphCo7BattleText2 - db "@" + text_far _SilphCo7BattleText2 + text_end SilphCo7EndBattleText2: - TX_FAR _SilphCo7EndBattleText2 - db "@" + text_far _SilphCo7EndBattleText2 + text_end SilphCo7AfterBattleText2: - TX_FAR _SilphCo7AfterBattleText2 - db "@" + text_far _SilphCo7AfterBattleText2 + text_end SilphCo7Text7: - TX_ASM + text_asm ld hl, SilphCo7TrainerHeader2 call TalkToTrainer jp TextScriptEnd SilphCo7BattleText3: - TX_FAR _SilphCo7BattleText3 - db "@" + text_far _SilphCo7BattleText3 + text_end SilphCo7EndBattleText3: - TX_FAR _SilphCo7EndBattleText3 - db "@" + text_far _SilphCo7EndBattleText3 + text_end SilphCo7AfterBattleText3: - TX_FAR _SilphCo7AfterBattleText3 - db "@" + text_far _SilphCo7AfterBattleText3 + text_end SilphCo7Text8: - TX_ASM + text_asm ld hl, SilphCo7TrainerHeader3 call TalkToTrainer jp TextScriptEnd SilphCo7BattleText4: - TX_FAR _SilphCo7BattleText4 - db "@" + text_far _SilphCo7BattleText4 + text_end SilphCo7EndBattleText4: - TX_FAR _SilphCo7EndBattleText4 - db "@" + text_far _SilphCo7EndBattleText4 + text_end SilphCo7AfterBattleText4: - TX_FAR _SilphCo7AfterBattleText4 - db "@" + text_far _SilphCo7AfterBattleText4 + text_end SilphCo7Text9: - TX_ASM + text_asm ld hl, SilphCo7Text_51ebe call PrintText jp TextScriptEnd SilphCo7Text_51ebe: - TX_FAR _SilphCo7Text_51ebe - db "@" + text_far _SilphCo7Text_51ebe + text_end SilphCo7Text13: - TX_FAR _SilphCo7Text_51ec3 - db "@" + text_far _SilphCo7Text_51ec3 + text_end SilphCo7Text14: - TX_FAR _SilphCo7Text_51ec8 - db "@" + text_far _SilphCo7Text_51ec8 + text_end SilphCo7Text_51ecd: - TX_FAR _SilphCo7Text_51ecd - db "@" + text_far _SilphCo7Text_51ecd + text_end SilphCo7Text15: - TX_FAR _SilphCo7Text_51ed2 - db "@" + text_far _SilphCo7Text_51ed2 + text_end diff --git a/scripts/SilphCo8F.asm b/scripts/SilphCo8F.asm index ce6579f7..c4e022d4 100755 --- a/scripts/SilphCo8F.asm +++ b/scripts/SilphCo8F.asm @@ -24,8 +24,8 @@ SilphCo8Script_5651a: predef_jump ReplaceTileBlock SilphCo8GateCoords: - db $04,$03 - db $FF + dbmapcoord 3, 4 + db -1 ; end SilphCo8Script_56541: push hl @@ -35,14 +35,14 @@ SilphCo8Script_56541: ld a, [hl] ld c, a xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_5654d ld a, [hli] cp $ff jr z, .asm_56569 push hl - ld hl, $ffe0 + ld hl, hUnlockedSilphCoDoors inc [hl] pop hl cp b @@ -60,11 +60,11 @@ SilphCo8Script_56541: ret .asm_56569 xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo8Script_5656d: - ld a, [$ffe0] + ldh a, [hUnlockedSilphCoDoors] and a ret z SetEvent EVENT_SILPH_CO_8_UNLOCKED_DOOR @@ -82,36 +82,15 @@ SilphCo8F_TextPointers: dw SilphCo8Text4 SilphCo8TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SILPH_CO_8F_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_8F_TRAINER_0 - dw SilphCo8BattleText1 ; TextBeforeBattle - dw SilphCo8AfterBattleText1 ; TextAfterBattle - dw SilphCo8EndBattleText1 ; TextEndBattle - dw SilphCo8EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_0, 4, SilphCo8BattleText1, SilphCo8EndBattleText1, SilphCo8AfterBattleText1 SilphCo8TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SILPH_CO_8F_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_8F_TRAINER_1 - dw SilphCo8BattleText2 ; TextBeforeBattle - dw SilphCo8AfterBattleText2 ; TextAfterBattle - dw SilphCo8EndBattleText2 ; TextEndBattle - dw SilphCo8EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_1, 4, SilphCo8BattleText2, SilphCo8EndBattleText2, SilphCo8AfterBattleText2 SilphCo8TrainerHeader2: - dbEventFlagBit EVENT_BEAT_SILPH_CO_8F_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_8F_TRAINER_2 - dw SilphCo8BattleText3 ; TextBeforeBattle - dw SilphCo8AfterBattleText3 ; TextAfterBattle - dw SilphCo8EndBattleText3 ; TextEndBattle - dw SilphCo8EndBattleText3 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SILPH_CO_8F_TRAINER_2, 4, SilphCo8BattleText3, SilphCo8EndBattleText3, SilphCo8AfterBattleText3 + db -1 ; end SilphCo8Text1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ld hl, SilphCo8Text_565c3 jr nz, .asm_565b8 @@ -121,63 +100,63 @@ SilphCo8Text1: jp TextScriptEnd SilphCo8Text_565be: - TX_FAR _SilphCo8Text_565be - db "@" + text_far _SilphCo8Text_565be + text_end SilphCo8Text_565c3: - TX_FAR _SilphCo8Text_565c3 - db "@" + text_far _SilphCo8Text_565c3 + text_end SilphCo8Text2: - TX_ASM + text_asm ld hl, SilphCo8TrainerHeader0 call TalkToTrainer jp TextScriptEnd SilphCo8Text3: - TX_ASM + text_asm ld hl, SilphCo8TrainerHeader1 call TalkToTrainer jp TextScriptEnd SilphCo8Text4: - TX_ASM + text_asm ld hl, SilphCo8TrainerHeader2 call TalkToTrainer jp TextScriptEnd SilphCo8BattleText1: - TX_FAR _SilphCo8BattleText1 - db "@" + text_far _SilphCo8BattleText1 + text_end SilphCo8EndBattleText1: - TX_FAR _SilphCo8EndBattleText1 - db "@" + text_far _SilphCo8EndBattleText1 + text_end SilphCo8AfterBattleText1: - TX_FAR _SilphCo8AfterBattleText1 - db "@" + text_far _SilphCo8AfterBattleText1 + text_end SilphCo8BattleText2: - TX_FAR _SilphCo8BattleText2 - db "@" + text_far _SilphCo8BattleText2 + text_end SilphCo8EndBattleText2: - TX_FAR _SilphCo8EndBattleText2 - db "@" + text_far _SilphCo8EndBattleText2 + text_end SilphCo8AfterBattleText2: - TX_FAR _SilphCo8AfterBattleText2 - db "@" + text_far _SilphCo8AfterBattleText2 + text_end SilphCo8BattleText3: - TX_FAR _SilphCo8BattleText3 - db "@" + text_far _SilphCo8BattleText3 + text_end SilphCo8EndBattleText3: - TX_FAR _SilphCo8EndBattleText3 - db "@" + text_far _SilphCo8EndBattleText3 + text_end SilphCo8AfterBattleText3: - TX_FAR _SilphCo8AfterBattleText3 - db "@" + text_far _SilphCo8AfterBattleText3 + text_end diff --git a/scripts/SilphCo9F.asm b/scripts/SilphCo9F.asm index 66291e98..1efb3d78 100755 --- a/scripts/SilphCo9F.asm +++ b/scripts/SilphCo9F.asm @@ -51,11 +51,11 @@ SilphCo9Script_5d7d1: predef_jump ReplaceTileBlock SilphCo9GateCoords: - db $04,$01 - db $02,$09 - db $05,$09 - db $06,$05 - db $FF + dbmapcoord 1, 4 + dbmapcoord 9, 2 + dbmapcoord 9, 5 + dbmapcoord 5, 6 + db -1 ; end SilphCo9Script_5d837: push hl @@ -65,14 +65,14 @@ SilphCo9Script_5d837: ld a, [hl] ld c, a xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a pop hl .asm_5d843 ld a, [hli] cp $ff jr z, .asm_5d85f push hl - ld hl, $ffe0 + ld hl, hUnlockedSilphCoDoors inc [hl] pop hl cp b @@ -90,12 +90,12 @@ SilphCo9Script_5d837: ret .asm_5d85f xor a - ld [$ffe0], a + ldh [hUnlockedSilphCoDoors], a ret SilphCo9Script_5d863: EventFlagAddress hl, EVENT_SILPH_CO_9_UNLOCKED_DOOR1 - ld a, [$ffe0] + ldh a, [hUnlockedSilphCoDoors] and a ret z cp $1 @@ -130,36 +130,15 @@ SilphCo9F_TextPointers: dw SilphCo9Text4 SilphCo9TrainerHeader0: - dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_0 - dw SilphCo9BattleText1 ; TextBeforeBattle - dw SilphCo9AfterBattleText1 ; TextAfterBattle - dw SilphCo9EndBattleText1 ; TextEndBattle - dw SilphCo9EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_0, 4, SilphCo9BattleText1, SilphCo9EndBattleText1, SilphCo9AfterBattleText1 SilphCo9TrainerHeader1: - dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_1 - dw SilphCo9BattleText2 ; TextBeforeBattle - dw SilphCo9AfterBattleText2 ; TextAfterBattle - dw SilphCo9EndBattleText2 ; TextEndBattle - dw SilphCo9EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_1, 2, SilphCo9BattleText2, SilphCo9EndBattleText2, SilphCo9AfterBattleText2 SilphCo9TrainerHeader2: - dbEventFlagBit EVENT_BEAT_SILPH_CO_9F_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_SILPH_CO_9F_TRAINER_2 - dw SilphCo9BattleText3 ; TextBeforeBattle - dw SilphCo9AfterBattleText3 ; TextAfterBattle - dw SilphCo9EndBattleText3 ; TextEndBattle - dw SilphCo9EndBattleText3 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_SILPH_CO_9F_TRAINER_2, 4, SilphCo9BattleText3, SilphCo9EndBattleText3, SilphCo9AfterBattleText3 + db -1 ; end SilphCo9Text1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI jr nz, .asm_5d8dc ld hl, SilphCo9Text_5d8e5 @@ -178,67 +157,67 @@ SilphCo9Text1: jp TextScriptEnd SilphCo9Text_5d8e5: - TX_FAR _SilphCo9Text_5d8e5 - db "@" + text_far _SilphCo9Text_5d8e5 + text_end SilphCo9Text_5d8ea: - TX_FAR _SilphCo9Text_5d8ea - db "@" + text_far _SilphCo9Text_5d8ea + text_end SilphCo9Text_5d8ef: - TX_FAR _SilphCo9Text_5d8ef - db "@" + text_far _SilphCo9Text_5d8ef + text_end SilphCo9Text2: - TX_ASM + text_asm ld hl, SilphCo9TrainerHeader0 call TalkToTrainer jp TextScriptEnd SilphCo9Text3: - TX_ASM + text_asm ld hl, SilphCo9TrainerHeader1 call TalkToTrainer jp TextScriptEnd SilphCo9Text4: - TX_ASM + text_asm ld hl, SilphCo9TrainerHeader2 call TalkToTrainer jp TextScriptEnd SilphCo9BattleText1: - TX_FAR _SilphCo9BattleText1 - db "@" + text_far _SilphCo9BattleText1 + text_end SilphCo9EndBattleText1: - TX_FAR _SilphCo9EndBattleText1 - db "@" + text_far _SilphCo9EndBattleText1 + text_end SilphCo9AfterBattleText1: - TX_FAR _SilphCo9AfterBattleText1 - db "@" + text_far _SilphCo9AfterBattleText1 + text_end SilphCo9BattleText2: - TX_FAR _SilphCo9BattleText2 - db "@" + text_far _SilphCo9BattleText2 + text_end SilphCo9EndBattleText2: - TX_FAR _SilphCo9EndBattleText2 - db "@" + text_far _SilphCo9EndBattleText2 + text_end SilphCo9AfterBattleText2: - TX_FAR _SilphCo9AfterBattleText2 - db "@" + text_far _SilphCo9AfterBattleText2 + text_end SilphCo9BattleText3: - TX_FAR _SilphCo9BattleText3 - db "@" + text_far _SilphCo9BattleText3 + text_end SilphCo9EndBattleText3: - TX_FAR _SilphCo9EndBattleText3 - db "@" + text_far _SilphCo9EndBattleText3 + text_end SilphCo9AfterBattleText3: - TX_FAR _SilphCo9AfterBattleText3 - db "@" + text_far _SilphCo9AfterBattleText3 + text_end diff --git a/scripts/SilphCoElevator.asm b/scripts/SilphCoElevator.asm index 49de6b27..c898cbd1 100755 --- a/scripts/SilphCoElevator.asm +++ b/scripts/SilphCoElevator.asm @@ -41,7 +41,7 @@ SilphCoElevatorScript_457f1: ret SilphCoElevatorFloors: - db $0B ; num elements in list + db 11 ; # db FLOOR_1F db FLOOR_2F db FLOOR_3F @@ -53,35 +53,34 @@ SilphCoElevatorFloors: db FLOOR_9F db FLOOR_10F db FLOOR_11F - db $FF ; terminator + db -1 ; end -SilphCoElevatorWarpMaps: -; first byte is warp number -; second byte is map number ; These specify where the player goes after getting out of the elevator. - db $03, SILPH_CO_1F - db $02, SILPH_CO_2F - db $02, SILPH_CO_3F - db $02, SILPH_CO_4F - db $02, SILPH_CO_5F - db $02, SILPH_CO_6F - db $02, SILPH_CO_7F - db $02, SILPH_CO_8F - db $02, SILPH_CO_9F - db $02, SILPH_CO_10F - db $01, SILPH_CO_11F +SilphCoElevatorWarpMaps: + ; warp number, map id + db 3, SILPH_CO_1F + db 2, SILPH_CO_2F + db 2, SILPH_CO_3F + db 2, SILPH_CO_4F + db 2, SILPH_CO_5F + db 2, SILPH_CO_6F + db 2, SILPH_CO_7F + db 2, SILPH_CO_8F + db 2, SILPH_CO_9F + db 2, SILPH_CO_10F + db 1, SILPH_CO_11F SilphCoElevatorWarpMapsEnd: SilphCoElevatorScript_45827: call Delay3 - callba ShakeElevator + farcall ShakeElevator ret SilphCoElevator_TextPointers: dw SilphCoElevatorText1 SilphCoElevatorText1: - TX_ASM + text_asm call SilphCoElevatorScript_457f1 ld hl, SilphCoElevatorWarpMaps predef DisplayElevatorFloorMenu diff --git a/scripts/TradeCenter.asm b/scripts/TradeCenter.asm index ddb3061e..dbed79c1 100644 --- a/scripts/TradeCenter.asm +++ b/scripts/TradeCenter.asm @@ -1,38 +1,38 @@ TradeCenter_Script: call EnableAutoTextBoxDrawing - ld a, [hSerialConnectionStatus] + ldh a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK ld a, SPRITE_FACING_LEFT jr z, .next ld a, SPRITE_FACING_RIGHT .next - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a ld a, $1 - ld [H_SPRITEINDEX], a + ldh [hSpriteIndex], a call SetSpriteFacingDirection ld hl, wd72d bit 0, [hl] set 0, [hl] ret nz - ld hl, wSpriteStateData2 + $14 - ld a, $8 + ld hl, wSprite01StateData2MapY + ld a, 8 ; y ld [hli], a - ld a, $a + ld a, 10 ; x ld [hl], a ld a, SPRITE_FACING_LEFT - ld [wSpriteStateData1 + $19], a - ld a, [hSerialConnectionStatus] + ld [wSprite01StateData1FacingDirection], a + ldh a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK ret z - ld a, $7 - ld [wSpriteStateData2 + $15], a + ld a, 7 ; x + ld [wSprite01StateData2MapX], a ld a, SPRITE_FACING_RIGHT - ld [wSpriteStateData1 + $19], a + ld [wSprite01StateData1FacingDirection], a ret TradeCenter_TextPointers: dw TradeCenterText1 TradeCenterText1: - TX_FAR _TradeCenterText1 - db "@" + text_far _TradeCenterText1 + text_end diff --git a/scripts/UndergroundPathNorthSouth.asm b/scripts/UndergroundPathNorthSouth.asm index 52b3d8bf..00a7ef90 100755 --- a/scripts/UndergroundPathNorthSouth.asm +++ b/scripts/UndergroundPathNorthSouth.asm @@ -2,4 +2,5 @@ UndergroundPathNorthSouth_Script: jp EnableAutoTextBoxDrawing UndergroundPathNorthSouth_TextPointers: - db "@" + + text_end ; unused diff --git a/scripts/UndergroundPathRoute5.asm b/scripts/UndergroundPathRoute5.asm index 23d72569..5c078050 100755 --- a/scripts/UndergroundPathRoute5.asm +++ b/scripts/UndergroundPathRoute5.asm @@ -3,16 +3,16 @@ UndergroundPathRoute5_Script: ld [wLastMap], a ret -UndergroundPathEntranceRoute5_5d6af: - db "@" +UndergroundPathEntranceRoute5_TextScriptEndingText: + text_end UndergroundPathRoute5_TextPointers: dw UndergroundPathEntranceRoute5Text1 UndergroundPathEntranceRoute5Text1: - TX_ASM - ld a, $9 + text_asm + ld a, TRADE_FOR_SPOT ld [wWhichTrade], a predef DoInGameTradeDialogue - ld hl, UndergroundPathEntranceRoute5_5d6af + ld hl, UndergroundPathEntranceRoute5_TextScriptEndingText ret diff --git a/scripts/UndergroundPathRoute6.asm b/scripts/UndergroundPathRoute6.asm index 0a690518..e3994e33 100755 --- a/scripts/UndergroundPathRoute6.asm +++ b/scripts/UndergroundPathRoute6.asm @@ -7,5 +7,5 @@ UndergroundPathRoute6_TextPointers: dw UndergroundPathEntranceRoute6Text1 UndergroundPathEntranceRoute6Text1: - TX_FAR _UndergrdTunnelEntRoute6Text1 - db "@" + text_far _UndergrdTunnelEntRoute6Text1 + text_end diff --git a/scripts/UndergroundPathRoute7.asm b/scripts/UndergroundPathRoute7.asm index 3a1f14c7..c311b409 100755 --- a/scripts/UndergroundPathRoute7.asm +++ b/scripts/UndergroundPathRoute7.asm @@ -7,5 +7,5 @@ UndergroundPathRoute7_TextPointers: dw UndergroundPathEntranceRoute7Text1 UndergroundPathEntranceRoute7Text1: - TX_FAR _UndergroundPathEntRoute7Text1 - db "@" + text_far _UndergroundPathEntRoute7Text1 + text_end diff --git a/scripts/UndergroundPathRoute7Copy.asm b/scripts/UndergroundPathRoute7Copy.asm index 8a494caf..2eb74fce 100755 --- a/scripts/UndergroundPathRoute7Copy.asm +++ b/scripts/UndergroundPathRoute7Copy.asm @@ -8,17 +8,17 @@ UndergroundPathRoute7Copy_TextPointers: dw UGPathRoute7EntranceUnusedText_5d77d UGPathRoute7EntranceUnusedText_5d773: - TX_FAR _UGPathRoute7EntranceUnusedText_5d773 - db "@" + text_far _UGPathRoute7EntranceUnusedText_5d773 + text_end UGPathRoute7EntranceUnusedText_5d778: - TX_FAR _UGPathRoute7EntranceUnusedText_5d778 - db "@" + text_far _UGPathRoute7EntranceUnusedText_5d778 + text_end UGPathRoute7EntranceUnusedText_5d77d: - TX_FAR _UGPathRoute7EntranceUnusedText_5d77d - db "@" + text_far _UGPathRoute7EntranceUnusedText_5d77d + text_end UGPathRoute7EntranceUnusedText_5d782: - TX_FAR _UGPathRoute7EntranceUnusedText_5d782 - db "@" + text_far _UGPathRoute7EntranceUnusedText_5d782 + text_end diff --git a/scripts/UndergroundPathRoute8.asm b/scripts/UndergroundPathRoute8.asm index ab0a9977..6eab58c2 100755 --- a/scripts/UndergroundPathRoute8.asm +++ b/scripts/UndergroundPathRoute8.asm @@ -7,5 +7,5 @@ UndergroundPathRoute8_TextPointers: dw UndergroundPathEntranceRoute8Text1 UndergroundPathEntranceRoute8Text1: - TX_FAR _UndergroundPathEntRoute8Text1 - db "@" + text_far _UndergroundPathEntRoute8Text1 + text_end diff --git a/scripts/UndergroundPathWestEast.asm b/scripts/UndergroundPathWestEast.asm index cb1a7bd8..98571e17 100755 --- a/scripts/UndergroundPathWestEast.asm +++ b/scripts/UndergroundPathWestEast.asm @@ -2,4 +2,5 @@ UndergroundPathWestEast_Script: jp EnableAutoTextBoxDrawing UndergroundPathWestEast_TextPointers: - db "@" + + text_end ; unused diff --git a/scripts/VermilionCity.asm b/scripts/VermilionCity.asm index a9336970..8a93b6da 100755 --- a/scripts/VermilionCity.asm +++ b/scripts/VermilionCity.asm @@ -27,9 +27,9 @@ VermilionCity_Script: .setFirstLockTrashCanIndex call Random - ld a, [hRandomAdd] + ldh a, [hRandomAdd] ld b, a - ld a, [hRandomSub] + ldh a, [hRandomSub] adc b and $e ld [wFirstLockTrashCanIndex], a @@ -60,10 +60,10 @@ VermilionCityScript0: call ArePlayerCoordsInArray jr nc, .return xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld [wcf0d], a ld a, $3 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID CheckEvent EVENT_SS_ANNE_LEFT jr nz, .shipHasDeparted @@ -86,8 +86,8 @@ VermilionCityScript0: ret SSAnneTicketCheckCoords: - db $1e,$12 ; y, x - db $ff + dbmapcoord 18, 30 + db -1 ; end VermilionCityScript4: ld hl, SSAnneTicketCheckCoords @@ -116,7 +116,7 @@ VermilionCityScript3: ret nz xor a ld [wJoyIgnore], a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $0 ld [wVermilionCityCurScript], a ret @@ -148,11 +148,11 @@ VermilionCity_TextPointers: dw VermilionCityText14 VermilionCityText1: - TX_FAR _VermilionCityText1 - db "@" + text_far _VermilionCityText1 + text_end VermilionCityText2: - TX_ASM + text_asm CheckEvent EVENT_SS_ANNE_LEFT jr nz, .shipHasDeparted ld hl, VermilionCityTextDidYouSee @@ -165,15 +165,15 @@ VermilionCityText2: jp TextScriptEnd VermilionCityTextDidYouSee: - TX_FAR _VermilionCityTextDidYouSee - db "@" + text_far _VermilionCityTextDidYouSee + text_end VermilionCityTextSSAnneDeparted: - TX_FAR _VermilionCityTextSSAnneDeparted - db "@" + text_far _VermilionCityTextSSAnneDeparted + text_end VermilionCityText3: - TX_ASM + text_asm CheckEvent EVENT_SS_ANNE_LEFT jr nz, .shipHasDeparted ld a, [wSpritePlayerStateData1FacingDirection] @@ -210,37 +210,37 @@ VermilionCityText3: jp TextScriptEnd .inFrontOfOrBehindGuardCoords - db $1d,$13 ; y, x of tile in front of guard - db $1f,$13 ; y, x of tile behind guard - db $ff + dbmapcoord 19, 29 ; in front of guard + dbmapcoord 19, 31 ; behind guard + db -1 ; end SSAnneWelcomeText4: - TX_FAR _SSAnneWelcomeText4 - db "@" + text_far _SSAnneWelcomeText4 + text_end SSAnneWelcomeText9: - TX_FAR _SSAnneWelcomeText9 - db "@" + text_far _SSAnneWelcomeText9 + text_end SSAnneFlashedTicketText: - TX_FAR _SSAnneFlashedTicketText - db "@" + text_far _SSAnneFlashedTicketText + text_end SSAnneNoTicketText: - TX_FAR _SSAnneNoTicketText - db "@" + text_far _SSAnneNoTicketText + text_end SSAnneNotHereText: - TX_FAR _SSAnneNotHereText - db "@" + text_far _SSAnneNotHereText + text_end VermilionCityText4: - TX_FAR _VermilionCityText4 - db "@" + text_far _VermilionCityText4 + text_end VermilionCityText5: - TX_FAR _VermilionCityText5 - TX_ASM + text_far _VermilionCityText5 + text_asm ld a, MACHOP call PlayCry call WaitForSoundToFinish @@ -248,39 +248,39 @@ VermilionCityText5: ret VermilionCityText15: - TX_FAR _VermilionCityText15 - db "@" + text_far _VermilionCityText15 + text_end VermilionCityText6: - TX_FAR _VermilionCityText6 - db "@" + text_far _VermilionCityText6 + text_end VermilionCityText8: - TX_ASM - callba Func_f1a8a + text_asm + farcall Func_f1a8a jp TextScriptEnd VermilionCityText9: - TX_ASM - callba Func_f1a96 + text_asm + farcall Func_f1a96 jp TextScriptEnd VermilionCityText12: - TX_ASM - callba Func_f1aa2 + text_asm + farcall Func_f1aa2 jp TextScriptEnd VermilionCityText13: - TX_ASM - callba Func_f1aae + text_asm + farcall Func_f1aae jp TextScriptEnd VermilionCityText14: - TX_ASM - callba Func_f1aba + text_asm + farcall Func_f1aba jp TextScriptEnd VermilionCityText7: - TX_ASM - callba Func_f1a0f + text_asm + farcall Func_f1a0f jp TextScriptEnd diff --git a/scripts/VermilionCity2.asm b/scripts/VermilionCity2.asm index eb7ea37a..93aa8df5 100755 --- a/scripts/VermilionCity2.asm +++ b/scripts/VermilionCity2.asm @@ -1,4 +1,4 @@ -Func_f1a0f: +Func_f1a0f:: CheckEvent EVENT_GOT_SQUIRTLE_FROM_OFFICER_JENNY jr nz, .asm_f1a69 ld a, [wBeatGymFlags] @@ -45,67 +45,67 @@ Func_f1a0f: ret OfficerJennyText1: - TX_FAR _OfficerJennyText1 - db "@" + text_far _OfficerJennyText1 + text_end OfficerJennyText2: - TX_FAR _OfficerJennyText2 - db "@" + text_far _OfficerJennyText2 + text_end OfficerJennyText3: - TX_FAR _OfficerJennyText3 - db $d - db "@" + text_far _OfficerJennyText3 + text_waitbutton + text_end OfficerJennyText4: - TX_FAR _OfficerJennyText4 - db "@" + text_far _OfficerJennyText4 + text_end OfficerJennyText5: - TX_FAR _OfficerJennyText5 - db "@" + text_far _OfficerJennyText5 + text_end -Func_f1a8a: +Func_f1a8a:: ld hl, VermilionCityText_f1a91 call PrintText ret VermilionCityText_f1a91: - TX_FAR _VermilionCityText8 - db "@" + text_far _VermilionCityText8 + text_end -Func_f1a96: +Func_f1a96:: ld hl, VermilionCityText_f1a9d call PrintText ret VermilionCityText_f1a9d: - TX_FAR _VermilionCityText9 - db "@" + text_far _VermilionCityText9 + text_end -Func_f1aa2: +Func_f1aa2:: ld hl, VermilionCityText_f1aa9 call PrintText ret VermilionCityText_f1aa9: - TX_FAR _VermilionCityText12 - db "@" + text_far _VermilionCityText12 + text_end -Func_f1aae: +Func_f1aae:: ld hl, VermilionCityText_f1ab5 call PrintText ret VermilionCityText_f1ab5: - TX_FAR _VermilionCityText13 - db "@" + text_far _VermilionCityText13 + text_end -Func_f1aba: +Func_f1aba:: ld hl, VermilionCityText_f1ac1 call PrintText ret VermilionCityText_f1ac1: - TX_FAR _VermilionCityText14 - db "@" + text_far _VermilionCityText14 + text_end diff --git a/scripts/VermilionDock.asm b/scripts/VermilionDock.asm index f5807dd4..0263669f 100755 --- a/scripts/VermilionDock.asm +++ b/scripts/VermilionDock.asm @@ -21,7 +21,7 @@ VermilionDock_Script: ld a, $3 ld [wSimulatedJoypadStatesIndex], a xor a - ld [wSpriteStateData2 + $06], a + ld [wSpritePlayerStateData2MovementByte1], a ld [wOverrideSimulatedJoypadStatesMask], a dec a ld [wJoyIgnore], a @@ -44,24 +44,24 @@ VermilionDock_1db9b: ld c, BANK(Music_Surfing) ld a, MUSIC_SURFING call PlayMusic - callba LoadSmokeTileFourTimes + farcall LoadSmokeTileFourTimes xor a - ld [wSpriteStateData1 + 2], a + ld [wSpritePlayerStateData1ImageIndex], a ld c, 120 call DelayFrames ld b, $9c call CopyScreenTileBufferToVRAM - coord hl, 0, 10 + hlcoord 0, 10 ld bc, SCREEN_WIDTH * 6 ld a, $14 ; water tile call FillMemory ld a, 1 - ld [H_AUTOBGTRANSFERENABLED], a + ldh [hAutoBGTransferEnabled], a call Delay3 xor a - ld [H_AUTOBGTRANSFERENABLED], a + ldh [hAutoBGTransferEnabled], a ld [wSSAnneSmokeDriftAmount], a - ld [rOBP1], a + ldh [rOBP1], a call UpdateGBCPal_OBP1 ld a, 88 ld [wSSAnneSmokeX], a @@ -78,7 +78,7 @@ VermilionDock_1db9b: ld d, $0 ld e, $8 .asm_1dbfa - ld hl, $0002 + ld hl, $2 add hl, bc ld a, l ld [wMapViewVRAMPointer], a @@ -104,11 +104,11 @@ VermilionDock_1db9b: dec e jr nz, .asm_1dbfa xor a - ld [rWY], a - ld [hWY], a + ldh [rWY], a + ldh [hWY], a call VermilionDock_EraseSSAnne ld a, $90 - ld [hWY], a + ldh [hWY], a ld a, $1 ld [wUpdateSpritesEnabled], a pop hl @@ -155,6 +155,7 @@ VermilionDock_EmitSmokePuff: ret VermilionDockOAMBlock: + ; tile id, attribute db $fc, $10 db $fd, $10 db $fe, $10 @@ -167,13 +168,13 @@ VermilionDock_1dc7c: ld h, $0 ld l, $80 .asm_1dc86 - ld a, [rLY] + ldh a, [rLY] cp l jr nz, .asm_1dc86 ld a, h - ld [rSCX], a + ldh [rSCX], a .asm_1dc8e - ld a, [rLY] + ldh a, [rLY] cp h jr z, .asm_1dc8e ret @@ -184,7 +185,7 @@ VermilionDock_EraseSSAnne: ld bc, (5 * BG_MAP_WIDTH) + SCREEN_WIDTH ld a, $14 ; water tile call FillMemory - ld hl, vBGMap0 + 10 * BG_MAP_WIDTH + hlbgcoord 0, 10 ld de, wVermilionDockTileMapBuffer ld bc, (6 * BG_MAP_WIDTH) / 16 call CopyVideoData @@ -194,7 +195,7 @@ VermilionDock_EraseSSAnne: ; the blocks is unnecessary because the blocks the ship occupies are south of ; the player and won't be redrawn when the player automatically walks north and ; exits the map. This code could be removed without affecting anything. - overworldMapCoord hl, 5, 2, VERMILION_DOCK_WIDTH + hlowcoord 5, 2, VERMILION_DOCK_WIDTH ld a, $d ; water block ld [hli], a ld [hli], a @@ -211,5 +212,5 @@ VermilionDock_TextPointers: dw VermilionDockText1 VermilionDockText1: - TX_FAR _VermilionDockText1 - db "@" + text_far _VermilionDockText1 + text_end diff --git a/scripts/VermilionGym.asm b/scripts/VermilionGym.asm index 0af37945..7343f37f 100755 --- a/scripts/VermilionGym.asm +++ b/scripts/VermilionGym.asm @@ -3,7 +3,7 @@ VermilionGym_Script: bit 5, [hl] res 5, [hl] push hl - call nz, VermilionGymLoadName + call nz, .LoadNames pop hl bit 6, [hl] res 6, [hl] @@ -16,15 +16,15 @@ VermilionGym_Script: ld [wVermilionGymCurScript], a ret -VermilionGymLoadName: - ld hl, Gym3CityName - ld de, Gym3LeaderName +.LoadNames: + ld hl, .CityName + ld de, .LeaderName jp LoadGymLeaderAndCityName -Gym3CityName: +.CityName: db "VERMILION CITY@" -Gym3LeaderName: +.LeaderName: db "LT.SURGE@" VermilionGymSetDoorTile: @@ -63,26 +63,26 @@ VermilionGymLTSurgePostBattle: VermilionGymReceiveTM24: ld a, $6 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_LT_SURGE - lb bc, TM_24, 1 + lb bc, TM_THUNDERBOLT, 1 call GiveItem jr nc, .BagFull ld a, $7 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM24 jr .gymVictory .BagFull ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges - set 2, [hl] + set BIT_THUNDERBADGE, [hl] ld hl, wBeatGymFlags - set 2, [hl] + set BIT_THUNDERBADGE, [hl] ; deactivate gym trainers SetEventRange EVENT_BEAT_VERMILION_GYM_TRAINER_0, EVENT_BEAT_VERMILION_GYM_TRAINER_2 @@ -100,36 +100,15 @@ VermilionGym_TextPointers: dw TM24NoRoomText VermilionGymTrainerHeader0: - dbEventFlagBit EVENT_BEAT_VERMILION_GYM_TRAINER_0 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VERMILION_GYM_TRAINER_0 - dw VermilionGymBattleText1 ; TextBeforeBattle - dw VermilionGymAfterBattleText1 ; TextAfterBattle - dw VermilionGymEndBattleText1 ; TextEndBattle - dw VermilionGymEndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_VERMILION_GYM_TRAINER_0, 3, VermilionGymBattleText1, VermilionGymEndBattleText1, VermilionGymAfterBattleText1 VermilionGymTrainerHeader1: - dbEventFlagBit EVENT_BEAT_VERMILION_GYM_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VERMILION_GYM_TRAINER_1 - dw VermilionGymBattleText2 ; TextBeforeBattle - dw VermilionGymAfterBattleText2 ; TextAfterBattle - dw VermilionGymEndBattleText2 ; TextEndBattle - dw VermilionGymEndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_VERMILION_GYM_TRAINER_1, 2, VermilionGymBattleText2, VermilionGymEndBattleText2, VermilionGymAfterBattleText2 VermilionGymTrainerHeader2: - dbEventFlagBit EVENT_BEAT_VERMILION_GYM_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VERMILION_GYM_TRAINER_2 - dw VermilionGymBattleText3 ; TextBeforeBattle - dw VermilionGymAfterBattleText3 ; TextAfterBattle - dw VermilionGymEndBattleText3 ; TextEndBattle - dw VermilionGymEndBattleText3 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_VERMILION_GYM_TRAINER_2, 3, VermilionGymBattleText3, VermilionGymEndBattleText3, VermilionGymAfterBattleText3 + db -1 ; end LTSurgeText: - TX_ASM + text_asm CheckEvent EVENT_BEAT_LT_SURGE jr z, .beforeBeat CheckEventReuseA EVENT_GOT_TM24 @@ -150,14 +129,14 @@ LTSurgeText: ld hl, ReceivedThunderbadgeText ld de, ReceivedThunderbadgeText call SaveEndBattleTextPointers - ld a, [H_SPRITEINDEX] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $3 ld [wGymLeaderNo], a xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $3 ; set script index to LT Surge post-battle script ld [wVermilionGymCurScript], a ld [wCurMapScript], a @@ -165,89 +144,89 @@ LTSurgeText: jp TextScriptEnd LTSurgePreBattleText: - TX_FAR _LTSurgePreBattleText - db "@" + text_far _LTSurgePreBattleText + text_end LTSurgePostBattleAdviceText: - TX_FAR _LTSurgePostBattleAdviceText - db "@" + text_far _LTSurgePostBattleAdviceText + text_end LTSurgeThunderbadgeInfoText: - TX_FAR _LTSurgeThunderbadgeInfoText - db "@" + text_far _LTSurgeThunderbadgeInfoText + text_end ReceivedTM24Text: - TX_FAR _ReceivedTM24Text - TX_SFX_KEY_ITEM - TX_FAR _TM24ExplanationText - db "@" + text_far _ReceivedTM24Text + sound_get_key_item + text_far _TM24ExplanationText + text_end TM24NoRoomText: - TX_FAR _TM24NoRoomText - db "@" + text_far _TM24NoRoomText + text_end ReceivedThunderbadgeText: - TX_FAR _ReceivedThunderbadgeText - db "@" + text_far _ReceivedThunderbadgeText + text_end VermilionGymTrainerText1: - TX_ASM + text_asm ld hl, VermilionGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd VermilionGymBattleText1: - TX_FAR _VermilionGymBattleText1 - db "@" + text_far _VermilionGymBattleText1 + text_end VermilionGymEndBattleText1: - TX_FAR _VermilionGymEndBattleText1 - db "@" + text_far _VermilionGymEndBattleText1 + text_end VermilionGymAfterBattleText1: - TX_FAR _VermilionGymAfterBattleText1 - db "@" + text_far _VermilionGymAfterBattleText1 + text_end VermilionGymTrainerText2: - TX_ASM + text_asm ld hl, VermilionGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd VermilionGymBattleText2: - TX_FAR _VermilionGymBattleText2 - db "@" + text_far _VermilionGymBattleText2 + text_end VermilionGymEndBattleText2: - TX_FAR _VermilionGymEndBattleText2 - db "@" + text_far _VermilionGymEndBattleText2 + text_end VermilionGymAfterBattleText2: - TX_FAR _VermilionGymAfterBattleText2 - db "@" + text_far _VermilionGymAfterBattleText2 + text_end VermilionGymTrainerText3: - TX_ASM + text_asm ld hl, VermilionGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd VermilionGymBattleText3: - TX_FAR _VermilionGymBattleText3 - db "@" + text_far _VermilionGymBattleText3 + text_end VermilionGymEndBattleText3: - TX_FAR _VermilionGymEndBattleText3 - db "@" + text_far _VermilionGymEndBattleText3 + text_end VermilionGymAfterBattleText3: - TX_FAR _VermilionGymAfterBattleText3 - db "@" + text_far _VermilionGymAfterBattleText3 + text_end VermilionGymFanText: - TX_ASM + text_asm ld a, [wBeatGymFlags] - bit 2, a + bit BIT_THUNDERBADGE, a jr nz, .afterBeat ld hl, VermilionGymFanPreBattleText call PrintText @@ -259,9 +238,9 @@ VermilionGymFanText: jp TextScriptEnd VermilionGymFanPreBattleText: - TX_FAR _VermilionGymFanPreBattleText - db "@" + text_far _VermilionGymFanPreBattleText + text_end VermilionGymFanPostBattleText: - TX_FAR _VermilionGymFanPostBattleText - db "@" + text_far _VermilionGymFanPostBattleText + text_end diff --git a/scripts/VermilionMart.asm b/scripts/VermilionMart.asm index 00ba0c26..88a632c8 100755 --- a/scripts/VermilionMart.asm +++ b/scripts/VermilionMart.asm @@ -7,9 +7,9 @@ VermilionMart_TextPointers: dw VermilionMartText3 VermilionMartText2: - TX_FAR _VermilionMartText2 - db "@" + text_far _VermilionMartText2 + text_end VermilionMartText3: - TX_FAR _VermilionMartText3 - db "@" + text_far _VermilionMartText3 + text_end diff --git a/scripts/VermilionOldRodHouse.asm b/scripts/VermilionOldRodHouse.asm index 772158ff..524395d4 100755 --- a/scripts/VermilionOldRodHouse.asm +++ b/scripts/VermilionOldRodHouse.asm @@ -5,53 +5,53 @@ VermilionOldRodHouse_TextPointers: dw VermilionHouse2Text1 VermilionHouse2Text1: - TX_ASM + text_asm ld a, [wd728] - bit 3, a - jr nz, .asm_03ef5 + bit 3, a ; got old rod? + jr nz, .got_item ld hl, VermilionHouse2Text_560b1 call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_eb1b7 + jr nz, .refused lb bc, OLD_ROD, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, wd728 - set 3, [hl] + set 3, [hl] ; got old rod ld hl, VermilionHouse2Text_560b6 - jr .asm_5dd95 -.BagFull + jr .done +.bag_full ld hl, VermilionHouse2Text_560ca - jr .asm_5dd95 -.asm_eb1b7 + jr .done +.refused ld hl, VermilionHouse2Text_560c0 - jr .asm_5dd95 -.asm_03ef5 + jr .done +.got_item ld hl, VermilionHouse2Text_560c5 -.asm_5dd95 +.done call PrintText jp TextScriptEnd VermilionHouse2Text_560b1: - TX_FAR _VermilionHouse2Text_560b1 - db "@" + text_far _VermilionHouse2Text_560b1 + text_end VermilionHouse2Text_560b6: - TX_FAR _VermilionHouse2Text_560b6 - TX_SFX_ITEM_1 - TX_FAR _VermilionHouse2Text_560bb - db "@" + text_far _VermilionHouse2Text_560b6 + sound_get_item_1 + text_far _VermilionHouse2Text_560bb + text_end VermilionHouse2Text_560c0: - TX_FAR _VermilionHouse2Text_560c0 - db "@" + text_far _VermilionHouse2Text_560c0 + text_end VermilionHouse2Text_560c5: - TX_FAR _VermilionHouse2Text_560c5 - db "@" + text_far _VermilionHouse2Text_560c5 + text_end VermilionHouse2Text_560ca: - TX_FAR _VermilionHouse2Text_560ca - db "@" + text_far _VermilionHouse2Text_560ca + text_end diff --git a/scripts/VermilionPidgeyHouse.asm b/scripts/VermilionPidgeyHouse.asm index 5004d367..fef476d5 100755 --- a/scripts/VermilionPidgeyHouse.asm +++ b/scripts/VermilionPidgeyHouse.asm @@ -8,17 +8,17 @@ VermilionPidgeyHouse_TextPointers: dw VermilionHouse1Text3 VermilionHouse1Text1: - TX_FAR _VermilionHouse1Text1 - db "@" + text_far _VermilionHouse1Text1 + text_end VermilionHouse1Text2: - TX_FAR _VermilionHouse1Text2 - TX_ASM + text_far _VermilionHouse1Text2 + text_asm ld a, PIDGEY call PlayCry call WaitForSoundToFinish jp TextScriptEnd VermilionHouse1Text3: - TX_FAR _VermilionHouse1Text3 - db "@" + text_far _VermilionHouse1Text3 + text_end diff --git a/scripts/VermilionPokecenter.asm b/scripts/VermilionPokecenter.asm index e470b028..dd3b514e 100755 --- a/scripts/VermilionPokecenter.asm +++ b/scripts/VermilionPokecenter.asm @@ -10,20 +10,20 @@ VermilionPokecenter_TextPointers: dw VermilionPokecenterText5 VermilionHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse VermilionPokecenterText2: - TX_FAR _VermilionPokecenterText2 - db "@" + text_far _VermilionPokecenterText2 + text_end VermilionPokecenterText3: - TX_FAR _VermilionPokecenterText3 - db "@" + text_far _VermilionPokecenterText3 + text_end VermilionTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist VermilionPokecenterText5: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/VermilionTradeHouse.asm b/scripts/VermilionTradeHouse.asm index 7f720364..6cdd849a 100755 --- a/scripts/VermilionTradeHouse.asm +++ b/scripts/VermilionTradeHouse.asm @@ -5,5 +5,5 @@ VermilionTradeHouse_TextPointers: dw VermilionHouse3Text1 VermilionHouse3Text1: - TX_FAR TeachingHMsText - db "@" + text_far TeachingHMsText + text_end diff --git a/scripts/VictoryRoad1F.asm b/scripts/VictoryRoad1F.asm index 07f203b1..9d566e6f 100755 --- a/scripts/VictoryRoad1F.asm +++ b/scripts/VictoryRoad1F.asm @@ -29,7 +29,7 @@ VictoryRoad1Script0: ld hl, CoordsData_5da5c call CheckBoulderCoords jp nc, CheckFightingMapTrainers - ld a, [H_SPRITEINDEX] + ldh a, [hSpriteIndex] cp $f jp z, CheckFightingMapTrainers ld hl, wCurrentMapScriptFlags @@ -38,7 +38,8 @@ VictoryRoad1Script0: ret CoordsData_5da5c: - db $0D,$11,$FF + dbmapcoord 17, 13 + db -1 ; end VictoryRoad1F_TextPointers: dw VictoryRoad1Text1 @@ -50,57 +51,43 @@ VictoryRoad1F_TextPointers: dw BoulderText VictoryRoad1TrainerHeader0: - dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0 - dw VictoryRoad1BattleText1 ; TextBeforeBattle - dw VictoryRoad1AfterBattleText1 ; TextAfterBattle - dw VictoryRoad1EndBattleText1 ; TextEndBattle - dw VictoryRoad1EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_VICTORY_ROAD_1_TRAINER_0, 2, VictoryRoad1BattleText1, VictoryRoad1EndBattleText1, VictoryRoad1AfterBattleText1 VictoryRoad1TrainerHeader1: - dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1 - dw VictoryRoad1BattleText2 ; TextBeforeBattle - dw VictoryRoad1AfterBattleText2 ; TextAfterBattle - dw VictoryRoad1EndBattleText2 ; TextEndBattle - dw VictoryRoad1EndBattleText2 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_VICTORY_ROAD_1_TRAINER_1, 2, VictoryRoad1BattleText2, VictoryRoad1EndBattleText2, VictoryRoad1AfterBattleText2 + db -1 ; end VictoryRoad1Text1: - TX_ASM + text_asm ld hl, VictoryRoad1TrainerHeader0 call TalkToTrainer jp TextScriptEnd VictoryRoad1Text2: - TX_ASM + text_asm ld hl, VictoryRoad1TrainerHeader1 call TalkToTrainer jp TextScriptEnd VictoryRoad1BattleText1: - TX_FAR _VictoryRoad1BattleText1 - db "@" + text_far _VictoryRoad1BattleText1 + text_end VictoryRoad1EndBattleText1: - TX_FAR _VictoryRoad1EndBattleText1 - db "@" + text_far _VictoryRoad1EndBattleText1 + text_end VictoryRoad1AfterBattleText1: - TX_FAR _VictoryRoad1AfterBattleText1 - db "@" + text_far _VictoryRoad1AfterBattleText1 + text_end VictoryRoad1BattleText2: - TX_FAR _VictoryRoad1BattleText2 - db "@" + text_far _VictoryRoad1BattleText2 + text_end VictoryRoad1EndBattleText2: - TX_FAR _VictoryRoad1EndBattleText2 - db "@" + text_far _VictoryRoad1EndBattleText2 + text_end VictoryRoad1AfterBattleText2: - TX_FAR _VictoryRoad1AfterBattleText2 - db "@" + text_far _VictoryRoad1AfterBattleText2 + text_end diff --git a/scripts/VictoryRoad2F.asm b/scripts/VictoryRoad2F.asm index a09e6f04..e5255674 100755 --- a/scripts/VictoryRoad2F.asm +++ b/scripts/VictoryRoad2F.asm @@ -44,7 +44,7 @@ VictoryRoad2Script0: ld hl, CoordsData_51816 call CheckBoulderCoords jp nc, CheckFightingMapTrainers - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] cp $f jp z, CheckFightingMapTrainers EventFlagAddress hl, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1 @@ -65,9 +65,9 @@ VictoryRoad2Script0: ret CoordsData_51816: - db $10,$01 - db $10,$09 - db $FF + dbmapcoord 1, 16 + dbmapcoord 9, 16 + db -1 ; end VictoryRoad2F_TextPointers: dw VictoryRoad2Text1 @@ -85,161 +85,119 @@ VictoryRoad2F_TextPointers: dw BoulderText VictoryRoad2TrainerHeader0: - dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0 - dw VictoryRoad2BattleText1 ; TextBeforeBattle - dw VictoryRoad2AfterBattleText1 ; TextAfterBattle - dw VictoryRoad2EndBattleText1 ; TextEndBattle - dw VictoryRoad2EndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_0, 4, VictoryRoad2BattleText1, VictoryRoad2EndBattleText1, VictoryRoad2AfterBattleText1 VictoryRoad2TrainerHeader1: - dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1 - dw VictoryRoad2BattleText2 ; TextBeforeBattle - dw VictoryRoad2AfterBattleText2 ; TextAfterBattle - dw VictoryRoad2EndBattleText2 ; TextEndBattle - dw VictoryRoad2EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_1, 3, VictoryRoad2BattleText2, VictoryRoad2EndBattleText2, VictoryRoad2AfterBattleText2 VictoryRoad2TrainerHeader2: - dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2 - dw VictoryRoad2BattleText3 ; TextBeforeBattle - dw VictoryRoad2AfterBattleText3 ; TextAfterBattle - dw VictoryRoad2EndBattleText3 ; TextEndBattle - dw VictoryRoad2EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_2, 3, VictoryRoad2BattleText3, VictoryRoad2EndBattleText3, VictoryRoad2AfterBattleText3 VictoryRoad2TrainerHeader3: - dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3 - db ($1 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3 - dw VictoryRoad2BattleText4 ; TextBeforeBattle - dw VictoryRoad2AfterBattleText4 ; TextAfterBattle - dw VictoryRoad2EndBattleText4 ; TextEndBattle - dw VictoryRoad2EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_3, 1, VictoryRoad2BattleText4, VictoryRoad2EndBattleText4, VictoryRoad2AfterBattleText4 VictoryRoad2TrainerHeader4: - dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4 - dw VictoryRoad2BattleText5 ; TextBeforeBattle - dw VictoryRoad2AfterBattleText5 ; TextAfterBattle - dw VictoryRoad2EndBattleText5 ; TextEndBattle - dw VictoryRoad2EndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_VICTORY_ROAD_2_TRAINER_4, 3, VictoryRoad2BattleText5, VictoryRoad2EndBattleText5, VictoryRoad2AfterBattleText5 MoltresTrainerHeader: - dbEventFlagBit EVENT_BEAT_MOLTRES - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_MOLTRES - dw MoltresBattleText ; TextBeforeBattle - dw MoltresBattleText ; TextAfterBattle - dw MoltresBattleText ; TextEndBattle - dw MoltresBattleText ; TextEndBattle - - db $ff + trainer EVENT_BEAT_MOLTRES, 0, MoltresBattleText, MoltresBattleText, MoltresBattleText + db -1 ; end VictoryRoad2Text1: - TX_ASM + text_asm ld hl, VictoryRoad2TrainerHeader0 call TalkToTrainer jp TextScriptEnd VictoryRoad2Text2: - TX_ASM + text_asm ld hl, VictoryRoad2TrainerHeader1 call TalkToTrainer jp TextScriptEnd VictoryRoad2Text3: - TX_ASM + text_asm ld hl, VictoryRoad2TrainerHeader2 call TalkToTrainer jp TextScriptEnd VictoryRoad2Text4: - TX_ASM + text_asm ld hl, VictoryRoad2TrainerHeader3 call TalkToTrainer jp TextScriptEnd VictoryRoad2Text5: - TX_ASM + text_asm ld hl, VictoryRoad2TrainerHeader4 call TalkToTrainer jp TextScriptEnd MoltresText: - TX_ASM + text_asm ld hl, MoltresTrainerHeader call TalkToTrainer jp TextScriptEnd MoltresBattleText: - TX_FAR _MoltresBattleText - TX_ASM + text_far _MoltresBattleText + text_asm ld a, MOLTRES call PlayCry call WaitForSoundToFinish jp TextScriptEnd VictoryRoad2BattleText1: - TX_FAR _VictoryRoad2BattleText1 - db "@" + text_far _VictoryRoad2BattleText1 + text_end VictoryRoad2EndBattleText1: - TX_FAR _VictoryRoad2EndBattleText1 - db "@" + text_far _VictoryRoad2EndBattleText1 + text_end VictoryRoad2AfterBattleText1: - TX_FAR _VictoryRoad2AfterBattleText1 - db "@" + text_far _VictoryRoad2AfterBattleText1 + text_end VictoryRoad2BattleText2: - TX_FAR _VictoryRoad2BattleText2 - db "@" + text_far _VictoryRoad2BattleText2 + text_end VictoryRoad2EndBattleText2: - TX_FAR _VictoryRoad2EndBattleText2 - db "@" + text_far _VictoryRoad2EndBattleText2 + text_end VictoryRoad2AfterBattleText2: - TX_FAR _VictoryRoad2AfterBattleText2 - db "@" + text_far _VictoryRoad2AfterBattleText2 + text_end VictoryRoad2BattleText3: - TX_FAR _VictoryRoad2BattleText3 - db "@" + text_far _VictoryRoad2BattleText3 + text_end VictoryRoad2EndBattleText3: - TX_FAR _VictoryRoad2EndBattleText3 - db "@" + text_far _VictoryRoad2EndBattleText3 + text_end VictoryRoad2AfterBattleText3: - TX_FAR _VictoryRoad2AfterBattleText3 - db "@" + text_far _VictoryRoad2AfterBattleText3 + text_end VictoryRoad2BattleText4: - TX_FAR _VictoryRoad2BattleText4 - db "@" + text_far _VictoryRoad2BattleText4 + text_end VictoryRoad2EndBattleText4: - TX_FAR _VictoryRoad2EndBattleText4 - db "@" + text_far _VictoryRoad2EndBattleText4 + text_end VictoryRoad2AfterBattleText4: - TX_FAR _VictoryRoad2AfterBattleText4 - db "@" + text_far _VictoryRoad2AfterBattleText4 + text_end VictoryRoad2BattleText5: - TX_FAR _VictoryRoad2BattleText5 - db "@" + text_far _VictoryRoad2BattleText5 + text_end VictoryRoad2EndBattleText5: - TX_FAR _VictoryRoad2EndBattleText5 - db "@" + text_far _VictoryRoad2EndBattleText5 + text_end VictoryRoad2AfterBattleText5: - TX_FAR _VictoryRoad2AfterBattleText5 - db "@" + text_far _VictoryRoad2AfterBattleText5 + text_end diff --git a/scripts/VictoryRoad3F.asm b/scripts/VictoryRoad3F.asm index dc7a2aac..f63a71e5 100755 --- a/scripts/VictoryRoad3F.asm +++ b/scripts/VictoryRoad3F.asm @@ -36,7 +36,7 @@ VictoryRoad3Script0: ld a, [wCoordIndex] cp $1 jr nz, .asm_449dc - ld a, [hSpriteIndexOrTextID] + ldh a, [hSpriteIndexOrTextID] cp $f ; Pikachu jp z, .asm_449fe ld hl, wCurrentMapScriptFlags @@ -54,9 +54,9 @@ VictoryRoad3Script0: predef_jump ShowObject .coordsData_449f9: - db $05,$03 - db $0F,$17 - db $FF + dbmapcoord 3, 5 + dbmapcoord 23, 15 + db -1 ; end .asm_449fe ld a, VICTORY_ROAD_2F @@ -90,111 +90,83 @@ VictoryRoad3F_TextPointers: dw BoulderText VictoryRoad3TrainerHeader0: - dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0 - db ($1 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0 - dw VictoryRoad3BattleText2 ; TextBeforeBattle - dw VictoryRoad3AfterBattleText2 ; TextAfterBattle - dw VictoryRoad3EndBattleText2 ; TextEndBattle - dw VictoryRoad3EndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_0, 1, VictoryRoad3BattleText2, VictoryRoad3EndBattleText2, VictoryRoad3AfterBattleText2 VictoryRoad3TrainerHeader1: - dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1 - dw VictoryRoad3BattleText3 ; TextBeforeBattle - dw VictoryRoad3AfterBattleText3 ; TextAfterBattle - dw VictoryRoad3EndBattleText3 ; TextEndBattle - dw VictoryRoad3EndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_1, 4, VictoryRoad3BattleText3, VictoryRoad3EndBattleText3, VictoryRoad3AfterBattleText3 VictoryRoad3TrainerHeader2: - dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2 - dw VictoryRoad3BattleText4 ; TextBeforeBattle - dw VictoryRoad3AfterBattleText4 ; TextAfterBattle - dw VictoryRoad3EndBattleText4 ; TextEndBattle - dw VictoryRoad3EndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_2, 4, VictoryRoad3BattleText4, VictoryRoad3EndBattleText4, VictoryRoad3AfterBattleText4 VictoryRoad3TrainerHeader3: - dbEventFlagBit EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3 - dw VictoryRoad3BattleText5 ; TextBeforeBattle - dw VictoryRoad3AfterBattleText5 ; TextAfterBattle - dw VictoryRoad3EndBattleText5 ; TextEndBattle - dw VictoryRoad3EndBattleText5 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_VICTORY_ROAD_3_TRAINER_3, 4, VictoryRoad3BattleText5, VictoryRoad3EndBattleText5, VictoryRoad3AfterBattleText5 + db -1 ; end VictoryRoad3Text1: - TX_ASM + text_asm ld hl, VictoryRoad3TrainerHeader0 call TalkToTrainer jp TextScriptEnd VictoryRoad3Text2: - TX_ASM + text_asm ld hl, VictoryRoad3TrainerHeader1 call TalkToTrainer jp TextScriptEnd VictoryRoad3Text3: - TX_ASM + text_asm ld hl, VictoryRoad3TrainerHeader2 call TalkToTrainer jp TextScriptEnd VictoryRoad3Text4: - TX_ASM + text_asm ld hl, VictoryRoad3TrainerHeader3 call TalkToTrainer jp TextScriptEnd VictoryRoad3BattleText2: - TX_FAR _VictoryRoad3BattleText2 - db "@" + text_far _VictoryRoad3BattleText2 + text_end VictoryRoad3EndBattleText2: - TX_FAR _VictoryRoad3EndBattleText2 - db "@" + text_far _VictoryRoad3EndBattleText2 + text_end VictoryRoad3AfterBattleText2: - TX_FAR _VictoryRoad3AfterBattleText2 - db "@" + text_far _VictoryRoad3AfterBattleText2 + text_end VictoryRoad3BattleText3: - TX_FAR _VictoryRoad3BattleText3 - db "@" + text_far _VictoryRoad3BattleText3 + text_end VictoryRoad3EndBattleText3: - TX_FAR _VictoryRoad3EndBattleText3 - db "@" + text_far _VictoryRoad3EndBattleText3 + text_end VictoryRoad3AfterBattleText3: - TX_FAR _VictoryRoad3AfterBattleText3 - db "@" + text_far _VictoryRoad3AfterBattleText3 + text_end VictoryRoad3BattleText4: - TX_FAR _VictoryRoad3BattleText4 - db "@" + text_far _VictoryRoad3BattleText4 + text_end VictoryRoad3EndBattleText4: - TX_FAR _VictoryRoad3EndBattleText4 - db "@" + text_far _VictoryRoad3EndBattleText4 + text_end VictoryRoad3AfterBattleText4: - TX_FAR _VictoryRoad3AfterBattleText4 - db "@" + text_far _VictoryRoad3AfterBattleText4 + text_end VictoryRoad3BattleText5: - TX_FAR _VictoryRoad3BattleText5 - db "@" + text_far _VictoryRoad3BattleText5 + text_end VictoryRoad3EndBattleText5: - TX_FAR _VictoryRoad3EndBattleText5 - db "@" + text_far _VictoryRoad3EndBattleText5 + text_end VictoryRoad3AfterBattleText5: - TX_FAR _VictoryRoad3AfterBattleText5 - db "@" + text_far _VictoryRoad3AfterBattleText5 + text_end diff --git a/scripts/ViridianCity.asm b/scripts/ViridianCity.asm index 6dc68d4f..d960b9cb 100755 --- a/scripts/ViridianCity.asm +++ b/scripts/ViridianCity.asm @@ -33,11 +33,11 @@ ViridianCityScript_1905b: CheckEvent EVENT_VIRIDIAN_GYM_OPEN ret nz ld a, [wObtainedBadges] - cp %01111111 - jr nz, .gymClosed + cp $ff ^ (1 << BIT_EARTHBADGE) + jr nz, .gym_closed SetEvent EVENT_VIRIDIAN_GYM_OPEN ret -.gymClosed +.gym_closed ld a, [wYCoord] cp 8 ret nz @@ -45,7 +45,7 @@ ViridianCityScript_1905b: cp 32 ret nz ld a, $f - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID call StartSimulatingJoypadStates ld a, $1 @@ -55,7 +55,7 @@ ViridianCityScript_1905b: xor a ld [wSpritePlayerStateData1FacingDirection], a ld [wJoyIgnore], a - ld [hJoyHeld], a + ldh [hJoyHeld], a ld a, $6 ld [wViridianCityCurScript], a ret @@ -77,10 +77,10 @@ ViridianCityScript_190ab: cp 19 ret nz ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a - ld [hJoyHeld], a + ldh [hJoyHeld], a call ViridianCityScript_1914d ld a, $5 ld [wViridianCityCurScript], a @@ -106,14 +106,14 @@ ViridianCityScript_190db: ret ViridianCityScript_190ef: - ld a, [wSpriteStateData1 + 3 * $10 + 4] - ld [$ffeb], a - ld a, [wSpriteStateData1 + 3 * $10 + 6] - ld [$ffec], a - ld a, [wSpriteStateData2 + 3 * $10 + 4] - ld [$ffed], a - ld a, [wSpriteStateData2 + 3 * $10 + 5] - ld [$ffee], a + ld a, [wSprite03StateData1YPixels] + ldh [hSpriteScreenYCoord], a + ld a, [wSprite03StateData1XPixels] + ldh [hSpriteScreenXCoord], a + ld a, [wSprite03StateData2MapY] + ldh [hSpriteMapYCoord], a + ld a, [wSprite03StateData2MapX] + ldh [hSpriteMapXCoord], a ret ViridianCityScript4: @@ -124,7 +124,7 @@ ViridianCityScript4: xor a ld [wJoyIgnore], a ld a, $10 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wBattleType], a @@ -134,14 +134,14 @@ ViridianCityScript4: ret ViridianCityScript_1912a: - ld a, [$ffeb] - ld [wSpriteStateData1 + 3 * $10 + 4], a - ld a, [$ffec] - ld [wSpriteStateData1 + 3 * $10 + 6], a - ld a, [$ffed] - ld [wSpriteStateData2 + 3 * $10 + 4], a - ld a, [$ffee] - ld [wSpriteStateData2 + 3 * $10 + 5], a + ldh a, [hSpriteScreenYCoord] + ld [wSprite03StateData1YPixels], a + ldh a, [hSpriteScreenXCoord] + ld [wSprite03StateData1XPixels], a + ldh a, [hSpriteMapYCoord] + ld [wSprite03StateData2MapY], a + ldh a, [hSpriteMapXCoord] + ld [wSprite03StateData2MapX], a ret ViridianCityScript5: @@ -174,14 +174,14 @@ ViridianCityScript_19162: cp 19 ret nz ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a ld a, SPRITE_FACING_RIGHT - ld [hSpriteFacingDirection], a + ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, $8 ld [wSpritePlayerStateData1FacingDirection], a ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld a, D_UP | D_DOWN | D_LEFT | D_RIGHT | START | SELECT ld [wJoyIgnore], a @@ -205,7 +205,7 @@ ViridianCityScript8: ld a, D_UP | D_DOWN | D_LEFT | D_RIGHT | START | SELECT ld [wJoyIgnore], a ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID xor a ld [wBattleType], a @@ -220,11 +220,11 @@ ViridianCityScript9: ld a, [wXCoord] cp 19 jr z, .asm_191e4 - callab Func_f1a01 + callfar Func_f1a01 ld de, ViridianCityOldManMovementData1 .asm_191e4 ld a, $8 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call MoveSprite ld a, $a ld [wViridianCityCurScript], a @@ -273,46 +273,46 @@ ViridianCity_TextPointers: dw ViridianCityText_13 ViridianCityText_0: - TX_ASM - callba Func_f18bb + text_asm + farcall Func_f18bb jp TextScriptEnd ViridianCityText_1: - TX_ASM - callba Func_f18c7 + text_asm + farcall Func_f18c7 jp TextScriptEnd ViridianCityText_2: - TX_ASM - callba Func_f18e9 + text_asm + farcall Func_f18e9 jp TextScriptEnd ViridianCityText_3: - TX_ASM - callba Func_f1911 + text_asm + farcall Func_f1911 jp TextScriptEnd ViridianCityText_4: - TX_ASM - callba Func_f192c + text_asm + farcall Func_f192c jp TextScriptEnd ViridianCityText_5: - TX_ASM - callba Func_f194a + text_asm + farcall Func_f194a jp TextScriptEnd ViridianCityText_6: - TX_ASM - callba Func_f198e + text_asm + farcall Func_f198e jp TextScriptEnd ViridianCityText_13: - TX_FAR _ViridianCityText_19219 - db "@" + text_far _ViridianCityText_19219 + text_end ViridianCityText_7: - TX_ASM + text_asm CheckEvent EVENT_02D jr nz, .asm_192a6 ld hl, ViridianCityText_192af @@ -330,34 +330,34 @@ ViridianCityText_7: jp TextScriptEnd ViridianCityText_192af: - TX_FAR _ViridianCityText_1920a - db "@" + text_far _ViridianCityText_1920a + text_end ViridianCityText_192b4: - TX_FAR _OldManTextAfterBattle - db "@" + text_far _OldManTextAfterBattle + text_end ViridianCityText_8: - TX_ASM - callba Func_f19c5 + text_asm + farcall Func_f19c5 jp TextScriptEnd ViridianCityText_9: - TX_ASM - callba Func_f19d1 + text_asm + farcall Func_f19d1 jp TextScriptEnd ViridianCityText_10: - TX_ASM - callba Func_f19dd + text_asm + farcall Func_f19dd jp TextScriptEnd ViridianCityText_11: - TX_ASM - callba Func_f19e9 + text_asm + farcall Func_f19e9 jp TextScriptEnd ViridianCityText_12: - TX_ASM - callba Func_f19f5 + text_asm + farcall Func_f19f5 jp TextScriptEnd diff --git a/scripts/ViridianCity2.asm b/scripts/ViridianCity2.asm index ffaeb4e2..c2e8254e 100755 --- a/scripts/ViridianCity2.asm +++ b/scripts/ViridianCity2.asm @@ -1,33 +1,33 @@ -Func_f18bb: +Func_f18bb:: ld hl, ViridianCityText_f18c2 call PrintText ret ViridianCityText_f18c2: - TX_FAR _ViridianCityText1 - db "@" + text_far _ViridianCityText1 + text_end -Func_f18c7: - ld hl, ViridianCityText_f18e4 +Func_f18c7:: + ld hl, ViridianCityText_19127 ld a, [wObtainedBadges] - cp %01111111 - jr z, .printAndDone + cp $ff ^ (1 << BIT_EARTHBADGE) + jr z, .done CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI - jr nz, .printAndDone - ld hl, ViridianCityText_f18df -.printAndDone + jr nz, .done + ld hl, ViridianCityText_19122 +.done call PrintText ret -ViridianCityText_f18df: - TX_FAR _ViridianCityText_19122 - db "@" +ViridianCityText_19122: + text_far _ViridianCityText_19122 + text_end -ViridianCityText_f18e4: - TX_FAR _ViridianCityText_19127 - db "@" +ViridianCityText_19127: + text_far _ViridianCityText_19127 + text_end -Func_f18e9: +Func_f18e9:: ld hl, ViridianCityText_f1902 call PrintText call YesNoChoice @@ -41,18 +41,18 @@ Func_f18e9: ret ViridianCityText_f1902: - TX_FAR _ViridianCityText_1914d - db "@" + text_far _ViridianCityText_1914d + text_end ViridianCityText_f1907: - TX_FAR _ViridianCityText_19152 - db "@" + text_far _ViridianCityText_19152 + text_end ViridianCityText_f190c: - TX_FAR _ViridianCityText_19157 - db "@" + text_far _ViridianCityText_19157 + text_end -Func_f1911: +Func_f1911:: ld hl, ViridianCityText_f1927 CheckEvent EVENT_GOT_POKEDEX jr nz, .gotPokedex @@ -62,14 +62,14 @@ Func_f1911: ret ViridianCityText_f1922: - TX_FAR _ViridianCityText_19175 - db "@" + text_far _ViridianCityText_19175 + text_end ViridianCityText_f1927: - TX_FAR _ViridianCityText_1917a - db "@" + text_far _ViridianCityText_1917a + text_end -Func_f192c: +Func_f192c:: ld hl, ViridianCityText_f1945 call PrintText call StartSimulatingJoypadStates @@ -82,48 +82,48 @@ Func_f192c: ret ViridianCityText_f1945: - TX_FAR _ViridianCityText_19191 - db "@" + text_far _ViridianCityText_19191 + text_end -Func_f194a: +Func_f194a:: CheckEvent EVENT_GOT_TM42 - jr nz, .gotTm42 - ld hl, ViridianCityText_f1979 + jr nz, .got_item + ld hl, ViridianCityText_191ca call PrintText - lb bc, TM_42, 1 + lb bc, TM_DREAM_EATER, 1 call GiveItem - jr nc, .BagFull - ld hl, ViridianCityText_f197e + jr nc, .bag_full + ld hl, ReceivedTM42Text call PrintText SetEvent EVENT_GOT_TM42 ret -.BagFull - ld hl, ViridianCityText_f1989 +.bag_full + ld hl, TM42NoRoomText call PrintText ret -.gotTm42 - ld hl, ViridianCityText_f1984 +.got_item + ld hl, TM42Explanation call PrintText ret -ViridianCityText_f1979: - TX_FAR _ViridianCityText_191ca - db "@" +ViridianCityText_191ca: + text_far _ViridianCityText_191ca + text_end -ViridianCityText_f197e: - TX_FAR _ReceivedTM42Text - TX_SFX_ITEM_2 - db "@" +ReceivedTM42Text: + text_far _ReceivedTM42Text + sound_get_item_2 + text_end -ViridianCityText_f1984: - TX_FAR _TM42Explanation - db "@" +TM42Explanation: + text_far _TM42Explanation + text_end -ViridianCityText_f1989: - TX_FAR _TM42NoRoomText - db "@" +TM42NoRoomText: + text_far _TM42NoRoomText + text_end -Func_f198e: +Func_f198e:: ld hl, ViridianCityText_f19b6 call PrintText ld c, 2 @@ -131,77 +131,77 @@ Func_f198e: call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .hurry + jr nz, .refused ld hl, ViridianCityText_f19bb call PrintText ld a, $3 ld [wViridianCityCurScript], a jr .done -.hurry +.refused ld hl, ViridianCityText_f19c0 call PrintText .done ret ViridianCityText_f19b6: - TX_FAR _OldManAgainText1 - db "@" + text_far _OldManAgainText1 + text_end ViridianCityText_f19bb: - TX_FAR _OldManAgainText2 - db "@" + text_far _OldManAgainText2 + text_end ViridianCityText_f19c0: - TX_FAR _OldManAgainText3 - db "@" + text_far _OldManAgainText3 + text_end -Func_f19c5: +Func_f19c5:: ld hl, ViridianCityText_f19cc call PrintText ret ViridianCityText_f19cc: - TX_FAR _ViridianCityText8 - db "@" + text_far _ViridianCityText8 + text_end -Func_f19d1: +Func_f19d1:: ld hl, ViridianCityText_f19d8 call PrintText ret ViridianCityText_f19d8: - TX_FAR _ViridianCityText9 - db "@" + text_far _ViridianCityText9 + text_end -Func_f19dd: +Func_f19dd:: ld hl, ViridianCityText_f19e4 call PrintText ret ViridianCityText_f19e4: - TX_FAR _ViridianCityText10 - db "@" + text_far _ViridianCityText10 + text_end -Func_f19e9: +Func_f19e9:: ld hl, ViridianCityText_f19f0 call PrintText ret ViridianCityText_f19f0: - TX_FAR _ViridianCityText13 - db "@" + text_far _ViridianCityText13 + text_end -Func_f19f5: +Func_f19f5:: ld hl, ViridianCityText_f19fc call PrintText ret ViridianCityText_f19fc: - TX_FAR _ViridianCityText14 - db "@" + text_far _ViridianCityText14 + text_end -Func_f1a01: +Func_f1a01:: ld hl, Data_f1a0a ld b, SPRITE_FACING_RIGHT call TryApplyPikachuMovementData diff --git a/scripts/ViridianForest.asm b/scripts/ViridianForest.asm index fb9a71e3..ca212d8e 100755 --- a/scripts/ViridianForest.asm +++ b/scripts/ViridianForest.asm @@ -31,176 +31,141 @@ ViridianForest_TextPointers: dw ViridianForestText16 ViridianForestTrainerHeader0: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0 - dw ViridianForestBattleText1 ; TextBeforeBattle - dw ViridianForestAfterBattleText1 ; TextAfterBattle - dw ViridianForestEndBattleText1 ; TextEndBattle - dw ViridianForestEndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_0, 4, ViridianForestBattleText1, ViridianForestEndBattleText1, ViridianForestAfterBattleText1 ViridianForestTrainerHeader1: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1 - dw ViridianForestBattleText2 ; TextBeforeBattle - dw ViridianForestAfterBattleText2 ; TextAfterBattle - dw ViridianForestEndBattleText2 ; TextEndBattle - dw ViridianForestEndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_1, 4, ViridianForestBattleText2, ViridianForestEndBattleText2, ViridianForestAfterBattleText2 ViridianForestTrainerHeader2: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2 - db ($1 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2 - dw ViridianForestBattleText3 ; TextBeforeBattle - dw ViridianForestAfterBattleText3 ; TextAfterBattle - dw ViridianForestEndBattleText3 ; TextEndBattle - dw ViridianForestEndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_2, 1, ViridianForestBattleText3, ViridianForestEndBattleText3, ViridianForestAfterBattleText3 ViridianForestTrainerHeader3: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_3 - db ($0 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_3 - dw ViridianForestBattleText4 ; TextBeforeBattle - dw ViridianForestAfterBattleText4 ; TextAfterBattle - dw ViridianForestEndBattleText4 ; TextEndBattle - dw ViridianForestEndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_3, 0, ViridianForestBattleText4, ViridianForestEndBattleText4, ViridianForestAfterBattleText4 ViridianForestTrainerHeader4: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_4 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_4 - dw ViridianForestBattleText5 ; TextBeforeBattle - dw ViridianForestAfterBattleText5 ; TextAfterBattle - dw ViridianForestEndBattleText5 ; TextEndBattle - dw ViridianForestEndBattleText5 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_VIRIDIAN_FOREST_TRAINER_4, 4, ViridianForestBattleText5, ViridianForestEndBattleText5, ViridianForestAfterBattleText5 + db -1 ; end ViridianForestText1: - TX_FAR _ViridianForestText1 - db "@" + text_far _ViridianForestText1 + text_end ViridianForestText2: - TX_ASM + text_asm ld hl, ViridianForestTrainerHeader0 jr ViridianForestTalkToTrainer ViridianForestText3: - TX_ASM + text_asm ld hl, ViridianForestTrainerHeader1 jr ViridianForestTalkToTrainer ViridianForestText4: - TX_ASM + text_asm ld hl, ViridianForestTrainerHeader2 jr ViridianForestTalkToTrainer ViridianForestText5: - TX_ASM + text_asm ld hl, ViridianForestTrainerHeader3 jr ViridianForestTalkToTrainer ViridianForestText6: - TX_ASM + text_asm ld hl, ViridianForestTrainerHeader4 ViridianForestTalkToTrainer: call TalkToTrainer jp TextScriptEnd ViridianForestBattleText1: - TX_FAR _ViridianForestBattleText1 - db "@" + text_far _ViridianForestBattleText1 + text_end ViridianForestEndBattleText1: - TX_FAR _ViridianForestEndBattleText1 - db "@" + text_far _ViridianForestEndBattleText1 + text_end ViridianForestAfterBattleText1: - TX_FAR _ViridianFrstAfterBattleText1 - db "@" + text_far _ViridianFrstAfterBattleText1 + text_end ViridianForestBattleText2: - TX_FAR _ViridianForestBattleText2 - db "@" + text_far _ViridianForestBattleText2 + text_end ViridianForestEndBattleText2: - TX_FAR _ViridianForestEndBattleText2 - db "@" + text_far _ViridianForestEndBattleText2 + text_end ViridianForestAfterBattleText2: - TX_FAR _ViridianFrstAfterBattleText2 - db "@" + text_far _ViridianFrstAfterBattleText2 + text_end ViridianForestBattleText3: - TX_FAR _ViridianForestBattleText3 - db "@" + text_far _ViridianForestBattleText3 + text_end ViridianForestEndBattleText3: - TX_FAR _ViridianForestEndBattleText3 - db "@" + text_far _ViridianForestEndBattleText3 + text_end ViridianForestAfterBattleText3: - TX_FAR _ViridianFrstAfterBattleText3 - db "@" + text_far _ViridianFrstAfterBattleText3 + text_end ViridianForestBattleText4: - TX_FAR _ViridianForestBattleTextPikaGirl - db "@" + text_far _ViridianForestBattleTextPikaGirl + text_end ViridianForestEndBattleText4: - TX_FAR _ViridianForestEndBattleTextPikaGirl - db "@" + text_far _ViridianForestEndBattleTextPikaGirl + text_end ViridianForestAfterBattleText4: - TX_FAR _ViridianForestAfterBattleTextPikaGirl - db "@" + text_far _ViridianForestAfterBattleTextPikaGirl + text_end ViridianForestBattleText5: - TX_FAR _ViridianForestBattleTextSamurai - db "@" + text_far _ViridianForestBattleTextSamurai + text_end ViridianForestEndBattleText5: - TX_FAR _ViridianForestEndBattleTextSamurai - db "@" + text_far _ViridianForestEndBattleTextSamurai + text_end ViridianForestAfterBattleText5: - TX_FAR _ViridianForestAfterBattleTextSamurai - db "@" + text_far _ViridianForestAfterBattleTextSamurai + text_end ViridianForestText10: - TX_FAR _ViridianForestText8 - db "@" + text_far _ViridianForestText8 + text_end ViridianForestText11: - TX_ASM + text_asm ld hl, Func_f2528 jp ViridianForestScript_6120d ViridianForestText12: - TX_ASM + text_asm ld hl, Func_f2534 jp ViridianForestScript_6120d ViridianForestText13: - TX_ASM + text_asm ld hl, Func_f2540 jp ViridianForestScript_6120d ViridianForestText14: - TX_ASM + text_asm ld hl, Func_f254c jp ViridianForestScript_6120d ViridianForestText15: - TX_ASM + text_asm ld hl, Func_f2558 jp ViridianForestScript_6120d ViridianForestText16: - TX_ASM + text_asm ld hl, Func_f2528 -ViridianForestScript_6120d +ViridianForestScript_6120d: ld b, BANK(Func_f2528) call Bankswitch jp TextScriptEnd diff --git a/scripts/ViridianForest2.asm b/scripts/ViridianForest2.asm index 489db39c..e5f03ccb 100755 --- a/scripts/ViridianForest2.asm +++ b/scripts/ViridianForest2.asm @@ -1,47 +1,47 @@ -Func_f2528: +Func_f2528:: ld hl, Text_f252f call PrintText ret Text_f252f: - TX_FAR _ViridianForestText9 - db "@" + text_far _ViridianForestText9 + text_end -Func_f2534: +Func_f2534:: ld hl, Text_f253b call PrintText ret Text_f253b: - TX_FAR _ViridianForestText10 - db "@" + text_far _ViridianForestText10 + text_end -Func_f2540: +Func_f2540:: ld hl, Text_f254a call PrintText ret Text_f254a: - TX_FAR _ViridianForestText11 - db "@" + text_far _ViridianForestText11 + text_end -Func_f254c: +Func_f254c:: ld hl, Text_f2553 call PrintText ret Text_f2553: - TX_FAR _ViridianForestText12 - db "@" + text_far _ViridianForestText12 + text_end -Func_f2558: +Func_f2558:: ld hl, Text_f255f call PrintText ret Text_f255f: - TX_FAR _ViridianForestText13 - db "@" + text_far _ViridianForestText13 + text_end Func_f2564: ld hl, ViridianForestText_f256b @@ -49,5 +49,5 @@ Func_f2564: ret ViridianForestText_f256b: - TX_FAR _ViridianForestText14 - db "@" + text_far _ViridianForestText14 + text_end diff --git a/scripts/ViridianForestNorthGate.asm b/scripts/ViridianForestNorthGate.asm index e421bf5b..6aef26d3 100755 --- a/scripts/ViridianForestNorthGate.asm +++ b/scripts/ViridianForestNorthGate.asm @@ -6,9 +6,9 @@ ViridianForestNorthGate_TextPointers: dw ViridianForestExitText2 ViridianForestExitText1: - TX_FAR _ViridianForestExitText1 - db "@" + text_far _ViridianForestExitText1 + text_end ViridianForestExitText2: - TX_FAR _ViridianForestExitText2 - db "@" + text_far _ViridianForestExitText2 + text_end diff --git a/scripts/ViridianForestSouthGate.asm b/scripts/ViridianForestSouthGate.asm index 6eaaaace..7ef66b85 100755 --- a/scripts/ViridianForestSouthGate.asm +++ b/scripts/ViridianForestSouthGate.asm @@ -7,9 +7,9 @@ ViridianForestSouthGate_TextPointers: dw ViridianForestEntranceText2 ViridianForestEntranceText1: - TX_FAR _ViridianForestEntranceText1 - db "@" + text_far _ViridianForestEntranceText1 + text_end ViridianForestEntranceText2: - TX_FAR _ViridianForestEntranceText2 - db "@" + text_far _ViridianForestEntranceText2 + text_end diff --git a/scripts/ViridianGym.asm b/scripts/ViridianGym.asm index b0f94b9d..68da9301 100755 --- a/scripts/ViridianGym.asm +++ b/scripts/ViridianGym.asm @@ -1,6 +1,6 @@ ViridianGym_Script: - ld hl, Gym8CityName - ld de, Gym8LeaderName + ld hl, .CityName + ld de, .LeaderName call LoadGymLeaderAndCityName call EnableAutoTextBoxDrawing ld hl, ViridianGymTrainerHeader0 @@ -10,9 +10,10 @@ ViridianGym_Script: ld [wViridianGymCurScript], a ret -Gym8CityName: +.CityName: db "VIRIDIAN CITY@" -Gym8LeaderName: + +.LeaderName: db "GIOVANNI@" ViridianGymScript_748d6: @@ -49,72 +50,68 @@ ViridianGymScript0: ld [wCurMapScript], a ret -;format: -;db y,x -;dw pointer to movement ViridianGymArrowTilePlayerMovement: - db $b,$13 - dw ViridianGymArrowMovement1 - db $1,$13 - dw ViridianGymArrowMovement2 - db $2,$12 - dw ViridianGymArrowMovement3 - db $2,$b - dw ViridianGymArrowMovement4 - db $a,$10 - dw ViridianGymArrowMovement5 - db $6,$4 - dw ViridianGymArrowMovement6 - db $d,$5 - dw ViridianGymArrowMovement7 - db $e,$4 - dw ViridianGymArrowMovement8 - db $f,$0 - dw ViridianGymArrowMovement9 - db $f,$1 - dw ViridianGymArrowMovement10 - db $10,$d - dw ViridianGymArrowMovement11 - db $11,$d - dw ViridianGymArrowMovement12 - db $FF - -;format: direction, count + map_coord_movement 19, 11, ViridianGymArrowMovement1 + map_coord_movement 19, 1, ViridianGymArrowMovement2 + map_coord_movement 18, 2, ViridianGymArrowMovement3 + map_coord_movement 11, 2, ViridianGymArrowMovement4 + map_coord_movement 16, 10, ViridianGymArrowMovement5 + map_coord_movement 4, 6, ViridianGymArrowMovement6 + map_coord_movement 5, 13, ViridianGymArrowMovement7 + map_coord_movement 4, 14, ViridianGymArrowMovement8 + map_coord_movement 0, 15, ViridianGymArrowMovement9 + map_coord_movement 1, 15, ViridianGymArrowMovement10 + map_coord_movement 13, 16, ViridianGymArrowMovement11 + map_coord_movement 13, 17, ViridianGymArrowMovement12 + db -1 ; end + ViridianGymArrowMovement1: - db D_UP,$09,$FF + db D_UP, 9 + db -1 ; end ViridianGymArrowMovement2: - db D_LEFT,$08,$FF + db D_LEFT, 8 + db -1 ; end ViridianGymArrowMovement3: - db D_DOWN,$09,$FF + db D_DOWN, 9 + db -1 ; end ViridianGymArrowMovement4: - db D_RIGHT,$06,$FF + db D_RIGHT, 6 + db -1 ; end ViridianGymArrowMovement5: - db D_DOWN,$02,$FF + db D_DOWN, 2 + db -1 ; end ViridianGymArrowMovement6: - db D_DOWN,$07,$FF + db D_DOWN, 7 + db -1 ; end ViridianGymArrowMovement7: - db D_RIGHT,$08,$FF + db D_RIGHT, 8 + db -1 ; end ViridianGymArrowMovement8: - db D_RIGHT,$09,$FF + db D_RIGHT, 9 + db -1 ; end ViridianGymArrowMovement9: - db D_UP,$08,$FF + db D_UP, 8 + db -1 ; end ViridianGymArrowMovement10: - db D_UP,$06,$FF + db D_UP, 6 + db -1 ; end ViridianGymArrowMovement11: - db D_LEFT,$06,$FF + db D_LEFT, 6 + db -1 ; end ViridianGymArrowMovement12: - db D_LEFT,$0C,$FF + db D_LEFT, 12 + db -1 ; end ViridianGymScript4: ld a, [wSimulatedJoypadStatesIndex] @@ -128,7 +125,7 @@ ViridianGymScript4: ld [wCurMapScript], a ret .asm_74980 - jpba LoadSpinnerArrowTiles + farjp LoadSpinnerArrowTiles ViridianGymScript3: ld a, [wIsInBattle] @@ -138,26 +135,26 @@ ViridianGymScript3: ld [wJoyIgnore], a ViridianGymScript3_74995: ld a, $c - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI - lb bc, TM_27, 1 + lb bc, TM_FISSURE, 1 call GiveItem jr nc, .BagFull ld a, $d - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM27 jr .gymVictory .BagFull ld a, $e - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID .gymVictory ld hl, wObtainedBadges - set 7, [hl] + set BIT_EARTHBADGE, [hl] ld hl, wBeatGymFlags - set 7, [hl] + set BIT_EARTHBADGE, [hl] ; deactivate gym trainers SetEventRange EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0, EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7 @@ -185,81 +182,25 @@ ViridianGym_TextPointers: dw ViridianGymText14 ViridianGymTrainerHeader0: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0 - dw ViridianGymBattleText1 ; TextBeforeBattle - dw ViridianGymAfterBattleText1 ; TextAfterBattle - dw ViridianGymEndBattleText1 ; TextEndBattle - dw ViridianGymEndBattleText1 ; TextEndBattle - + trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_0, 4, ViridianGymBattleText1, ViridianGymEndBattleText1, ViridianGymAfterBattleText1 ViridianGymTrainerHeader1: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1 - dw ViridianGymBattleText2 ; TextBeforeBattle - dw ViridianGymAfterBattleText2 ; TextAfterBattle - dw ViridianGymEndBattleText2 ; TextEndBattle - dw ViridianGymEndBattleText2 ; TextEndBattle - + trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_1, 4, ViridianGymBattleText2, ViridianGymEndBattleText2, ViridianGymAfterBattleText2 ViridianGymTrainerHeader2: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2 - dw ViridianGymBattleText3 ; TextBeforeBattle - dw ViridianGymAfterBattleText3 ; TextAfterBattle - dw ViridianGymEndBattleText3 ; TextEndBattle - dw ViridianGymEndBattleText3 ; TextEndBattle - + trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_2, 4, ViridianGymBattleText3, ViridianGymEndBattleText3, ViridianGymAfterBattleText3 ViridianGymTrainerHeader3: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3 - db ($2 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3 - dw ViridianGymBattleText4 ; TextBeforeBattle - dw ViridianGymAfterBattleText4 ; TextAfterBattle - dw ViridianGymEndBattleText4 ; TextEndBattle - dw ViridianGymEndBattleText4 ; TextEndBattle - + trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_3, 2, ViridianGymBattleText4, ViridianGymEndBattleText4, ViridianGymAfterBattleText4 ViridianGymTrainerHeader4: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4 - dw ViridianGymBattleText5 ; TextBeforeBattle - dw ViridianGymAfterBattleText5 ; TextAfterBattle - dw ViridianGymEndBattleText5 ; TextEndBattle - dw ViridianGymEndBattleText5 ; TextEndBattle - + trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_4, 3, ViridianGymBattleText5, ViridianGymEndBattleText5, ViridianGymAfterBattleText5 ViridianGymTrainerHeader5: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5 - dw ViridianGymBattleText6 ; TextBeforeBattle - dw ViridianGymAfterBattleText6 ; TextAfterBattle - dw ViridianGymEndBattleText6 ; TextEndBattle - dw ViridianGymEndBattleText6 ; TextEndBattle - + trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5, 4, ViridianGymBattleText6, ViridianGymEndBattleText6, ViridianGymAfterBattleText6 ViridianGymTrainerHeader6: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6, 1 - db ($3 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6, 1 - dw ViridianGymBattleText7 ; TextBeforeBattle - dw ViridianGymAfterBattleText7 ; TextAfterBattle - dw ViridianGymEndBattleText7 ; TextEndBattle - dw ViridianGymEndBattleText7 ; TextEndBattle - + trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6, 1, 3, ViridianGymBattleText7, ViridianGymEndBattleText7, ViridianGymAfterBattleText7 ViridianGymTrainerHeader7: - dbEventFlagBit EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7, 1 - db ($4 << 4) ; trainer's view range - dwEventFlagAddress EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7, 1 - dw ViridianGymBattleText8 ; TextBeforeBattle - dw ViridianGymAfterBattleText8 ; TextAfterBattle - dw ViridianGymEndBattleText8 ; TextEndBattle - dw ViridianGymEndBattleText8 ; TextEndBattle - - db $ff + trainer EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7, 1, 4, ViridianGymBattleText8, ViridianGymEndBattleText8, ViridianGymAfterBattleText8 + db -1 ; end ViridianGymText1: - TX_ASM + text_asm CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI jr z, .beginBattle CheckEventReuseA EVENT_GOT_TM27 @@ -289,7 +230,7 @@ ViridianGymText1: ld hl, ViridianGymText_74ad3 ld de, ViridianGymText_74ad3 call SaveEndBattleTextPointers - ld a, [H_SPRITEINDEX] + ldh a, [hSpriteIndex] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters @@ -301,181 +242,181 @@ ViridianGymText1: jp TextScriptEnd ViridianGymText_74ace: - TX_FAR _ViridianGymText_74ace - db "@" + text_far _ViridianGymText_74ace + text_end ViridianGymText_74ad3: - TX_FAR _ViridianGymText_74ad3 - TX_SFX_LEVEL_UP ; probably supposed to play SFX_GET_ITEM_1 but the wrong music bank is loaded - db "@" + text_far _ViridianGymText_74ad3 + sound_level_up ; probably supposed to play SFX_GET_ITEM_1 but the wrong music bank is loaded + text_end ViridianGymText_74ad9: - TX_FAR _ViridianGymText_74ad9 - TX_WAIT - db "@" + text_far _ViridianGymText_74ad9 + text_waitbutton + text_end ViridianGymText12: - TX_FAR _ViridianGymText12 - db "@" + text_far _ViridianGymText12 + text_end ViridianGymText13: - TX_FAR _ReceivedTM27Text - TX_SFX_ITEM_1 + text_far _ReceivedTM27Text + sound_get_item_1 TM27ExplanationText: - TX_FAR _TM27ExplanationText - db "@" + text_far _TM27ExplanationText + text_end ViridianGymText14: - TX_FAR _TM27NoRoomText - db "@" + text_far _TM27NoRoomText + text_end ViridianGymText2: - TX_ASM + text_asm ld hl, ViridianGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd ViridianGymBattleText1: - TX_FAR _ViridianGymBattleText1 - db "@" + text_far _ViridianGymBattleText1 + text_end ViridianGymEndBattleText1: - TX_FAR _ViridianGymEndBattleText1 - db "@" + text_far _ViridianGymEndBattleText1 + text_end ViridianGymAfterBattleText1: - TX_FAR _ViridianGymAfterBattleText1 - db "@" + text_far _ViridianGymAfterBattleText1 + text_end ViridianGymText3: - TX_ASM + text_asm ld hl, ViridianGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd ViridianGymBattleText2: - TX_FAR _ViridianGymBattleText2 - db "@" + text_far _ViridianGymBattleText2 + text_end ViridianGymEndBattleText2: - TX_FAR _ViridianGymEndBattleText2 - db "@" + text_far _ViridianGymEndBattleText2 + text_end ViridianGymAfterBattleText2: - TX_FAR _ViridianGymAfterBattleText2 - db "@" + text_far _ViridianGymAfterBattleText2 + text_end ViridianGymText4: - TX_ASM + text_asm ld hl, ViridianGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd ViridianGymBattleText3: - TX_FAR _ViridianGymBattleText3 - db "@" + text_far _ViridianGymBattleText3 + text_end ViridianGymEndBattleText3: - TX_FAR _ViridianGymEndBattleText3 - db "@" + text_far _ViridianGymEndBattleText3 + text_end ViridianGymAfterBattleText3: - TX_FAR _ViridianGymAfterBattleText3 - db "@" + text_far _ViridianGymAfterBattleText3 + text_end ViridianGymText5: - TX_ASM + text_asm ld hl, ViridianGymTrainerHeader3 call TalkToTrainer jp TextScriptEnd ViridianGymBattleText4: - TX_FAR _ViridianGymBattleText4 - db "@" + text_far _ViridianGymBattleText4 + text_end ViridianGymEndBattleText4: - TX_FAR _ViridianGymEndBattleText4 - db "@" + text_far _ViridianGymEndBattleText4 + text_end ViridianGymAfterBattleText4: - TX_FAR _ViridianGymAfterBattleText4 - db "@" + text_far _ViridianGymAfterBattleText4 + text_end ViridianGymText6: - TX_ASM + text_asm ld hl, ViridianGymTrainerHeader4 call TalkToTrainer jp TextScriptEnd ViridianGymBattleText5: - TX_FAR _ViridianGymBattleText5 - db "@" + text_far _ViridianGymBattleText5 + text_end ViridianGymEndBattleText5: - TX_FAR _ViridianGymEndBattleText5 - db "@" + text_far _ViridianGymEndBattleText5 + text_end ViridianGymAfterBattleText5: - TX_FAR _ViridianGymAfterBattleText5 - db "@" + text_far _ViridianGymAfterBattleText5 + text_end ViridianGymText7: - TX_ASM + text_asm ld hl, ViridianGymTrainerHeader5 call TalkToTrainer jp TextScriptEnd ViridianGymBattleText6: - TX_FAR _ViridianGymBattleText6 - db "@" + text_far _ViridianGymBattleText6 + text_end ViridianGymEndBattleText6: - TX_FAR _ViridianGymEndBattleText6 - db "@" + text_far _ViridianGymEndBattleText6 + text_end ViridianGymAfterBattleText6: - TX_FAR _ViridianGymAfterBattleText6 - db "@" + text_far _ViridianGymAfterBattleText6 + text_end ViridianGymText8: - TX_ASM + text_asm ld hl, ViridianGymTrainerHeader6 call TalkToTrainer jp TextScriptEnd ViridianGymBattleText7: - TX_FAR _ViridianGymBattleText7 - db "@" + text_far _ViridianGymBattleText7 + text_end ViridianGymEndBattleText7: - TX_FAR _ViridianGymEndBattleText7 - db "@" + text_far _ViridianGymEndBattleText7 + text_end ViridianGymAfterBattleText7: - TX_FAR _ViridianGymAfterBattleText7 - db "@" + text_far _ViridianGymAfterBattleText7 + text_end ViridianGymText9: - TX_ASM + text_asm ld hl, ViridianGymTrainerHeader7 call TalkToTrainer jp TextScriptEnd ViridianGymBattleText8: - TX_FAR _ViridianGymBattleText8 - db "@" + text_far _ViridianGymBattleText8 + text_end ViridianGymEndBattleText8: - TX_FAR _ViridianGymEndBattleText8 - db "@" + text_far _ViridianGymEndBattleText8 + text_end ViridianGymAfterBattleText8: - TX_FAR _ViridianGymAfterBattleText8 - db "@" + text_far _ViridianGymAfterBattleText8 + text_end ViridianGymText10: - TX_ASM + text_asm CheckEvent EVENT_BEAT_VIRIDIAN_GYM_GIOVANNI jr nz, .asm_1abd1 ld hl, ViridianGymText_74bd4 @@ -488,9 +429,9 @@ ViridianGymText10: jp TextScriptEnd ViridianGymText_74bd4: - TX_FAR _ViridianGymText_74bd4 - db "@" + text_far _ViridianGymText_74bd4 + text_end ViridianGymText_74bd9: - TX_FAR _ViridianGymText_74bd9 - db "@" + text_far _ViridianGymText_74bd9 + text_end diff --git a/scripts/ViridianMart.asm b/scripts/ViridianMart.asm index d1145778..2d837018 100755 --- a/scripts/ViridianMart.asm +++ b/scripts/ViridianMart.asm @@ -8,12 +8,12 @@ ViridianMart_Script: ViridianMartScript_1d47d: CheckEvent EVENT_OAK_GOT_PARCEL - jr nz, .asm_1d489 + jr nz, .delivered_parcel ld hl, ViridianMart_TextPointers - jr .asm_1d48c -.asm_1d489 + jr .done +.delivered_parcel ld hl, ViridianMart_TextPointers2 -.asm_1d48c +.done ld a, l ld [wMapTextPtr], a ld a, h @@ -28,7 +28,7 @@ ViridianMart_ScriptPointers: ViridianMartScript0: call UpdateSprites ld a, $4 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID ld hl, wSimulatedJoypadStatesEnd ld de, RLEMovement1d4bb @@ -41,9 +41,9 @@ ViridianMartScript0: ret RLEMovement1d4bb: - db D_LEFT, $01 - db D_UP, $02 - db $ff + db D_LEFT, 1 + db D_UP, 2 + db -1 ; end ViridianMartScript1: ld a, [wSimulatedJoypadStatesIndex] @@ -51,7 +51,7 @@ ViridianMartScript1: ret nz call Delay3 ld a, $5 - ld [hSpriteIndexOrTextID], a + ldh [hSpriteIndexOrTextID], a call DisplayTextID lb bc, OAKS_PARCEL, 1 call GiveItem @@ -79,28 +79,29 @@ ViridianMart_TextPointers: dw ViridianMartText3 dw ViridianMartText4 dw ViridianMartText5 + ViridianMart_TextPointers2: dw ViridianCashierText dw ViridianMartText2 dw ViridianMartText3 ViridianMartText1: - TX_FAR _ViridianMartText1 - db "@" + text_far _ViridianMartText1 + text_end ViridianMartText4: - TX_FAR _ViridianMartText4 - db "@" + text_far _ViridianMartText4 + text_end ViridianMartText5: - TX_FAR ViridianMartParcelQuestText - TX_SFX_KEY_ITEM - db "@" + text_far ViridianMartParcelQuestText + sound_get_key_item + text_end ViridianMartText2: - TX_FAR _ViridianMartText2 - db "@" + text_far _ViridianMartText2 + text_end ViridianMartText3: - TX_FAR _ViridianMartText3 - db "@" + text_far _ViridianMartText3 + text_end diff --git a/scripts/ViridianNicknameHouse.asm b/scripts/ViridianNicknameHouse.asm index 000fe82b..df7482c2 100755 --- a/scripts/ViridianNicknameHouse.asm +++ b/scripts/ViridianNicknameHouse.asm @@ -8,15 +8,15 @@ ViridianNicknameHouse_TextPointers: dw ViridianHouseText4 ViridianHouseText1: - TX_FAR _ViridianHouseText1 - db "@" + text_far _ViridianHouseText1 + text_end ViridianHouseText2: - TX_FAR _ViridianHouseText2 - db "@" + text_far _ViridianHouseText2 + text_end ViridianHouseText3: - TX_ASM + text_asm ld hl, ViridianHouseText_1d5b1 call PrintText ld a, SPEAROW @@ -25,9 +25,9 @@ ViridianHouseText3: jp TextScriptEnd ViridianHouseText_1d5b1: - TX_FAR _ViridianHouseText_1d5b1 - db "@" + text_far _ViridianHouseText_1d5b1 + text_end ViridianHouseText4: - TX_FAR _ViridianHouseText4 - db "@" + text_far _ViridianHouseText4 + text_end diff --git a/scripts/ViridianPokecenter.asm b/scripts/ViridianPokecenter.asm index 5f324bf7..25f4d637 100755 --- a/scripts/ViridianPokecenter.asm +++ b/scripts/ViridianPokecenter.asm @@ -10,20 +10,20 @@ ViridianPokecenter_TextPointers: dw ViridianPokeCenterText5 ViridianHealNurseText: - TX_POKECENTER_NURSE + script_pokecenter_nurse ViridianPokeCenterText2: - TX_FAR _ViridianPokeCenterText2 - db "@" + text_far _ViridianPokeCenterText2 + text_end ViridianPokeCenterText3: - TX_FAR _ViridianPokeCenterText3 - db "@" + text_far _ViridianPokeCenterText3 + text_end ViridianTradeNurseText: - TX_CABLE_CLUB_RECEPTIONIST + script_cable_club_receptionist ViridianPokeCenterText5: - TX_ASM - callab PokecenterChanseyText + text_asm + callfar PokecenterChanseyText jp TextScriptEnd diff --git a/scripts/ViridianSchoolHouse.asm b/scripts/ViridianSchoolHouse.asm index ccfda145..77dffa38 100755 --- a/scripts/ViridianSchoolHouse.asm +++ b/scripts/ViridianSchoolHouse.asm @@ -8,15 +8,15 @@ ViridianSchoolHouse_TextPointers: dw SchoolText3 SchoolText1: - TX_FAR _SchoolText1 - db "@" + text_far _SchoolText1 + text_end SchoolText2: - TX_ASM - callba Func_f1c0f + text_asm + farcall Func_f1c0f jp TextScriptEnd SchoolText3: - TX_ASM - callba Func_f1c03 + text_asm + farcall Func_f1c03 jp TextScriptEnd diff --git a/scripts/ViridianSchoolHouse2.asm b/scripts/ViridianSchoolHouse2.asm index 677a43ec..e5644830 100755 --- a/scripts/ViridianSchoolHouse2.asm +++ b/scripts/ViridianSchoolHouse2.asm @@ -1,17 +1,17 @@ -Func_f1c03: +Func_f1c03:: ld hl, SchoolText_f1c0a call PrintText ret SchoolText_f1c0a: - TX_FAR _SchoolText3 - db "@" + text_far _SchoolText3 + text_end -Func_f1c0f: +Func_f1c0f:: ld hl, SchoolText_f1c16 call PrintText ret SchoolText_f1c16: - TX_FAR _SchoolText2 - db "@" + text_far _SchoolText2 + text_end diff --git a/scripts/WardensHouse.asm b/scripts/WardensHouse.asm index 69e199c9..2dd0410c 100755 --- a/scripts/WardensHouse.asm +++ b/scripts/WardensHouse.asm @@ -9,93 +9,93 @@ WardensHouse_TextPointers: dw FuchsiaHouse2Text5 FuchsiaHouse2Text1: - TX_ASM + text_asm CheckEvent EVENT_GOT_HM04 - jr nz, .subtract + jr nz, .got_item ld b, GOLD_TEETH call IsItemInBag - jr nz, .asm_3f30f + jr nz, .have_gold_teeth CheckEvent EVENT_GAVE_GOLD_TEETH - jr nz, .asm_60cba + jr nz, .gave_gold_teeth ld hl, WardenGibberishText1 call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a ld hl, WardenGibberishText3 - jr nz, .asm_61238 + jr nz, .refused ld hl, WardenGibberishText2 -.asm_61238 +.refused call PrintText - jr .asm_52039 -.asm_3f30f + jr .done +.have_gold_teeth ld hl, WardenTeethText1 call PrintText ld a, GOLD_TEETH - ld [$ffdb], a - callba RemoveItemByID + ldh [hItemToRemoveID], a + farcall RemoveItemByID SetEvent EVENT_GAVE_GOLD_TEETH -.asm_60cba +.gave_gold_teeth ld hl, WardenThankYouText call PrintText - lb bc, HM_04, 1 + lb bc, HM_STRENGTH, 1 call GiveItem - jr nc, .BagFull + jr nc, .bag_full ld hl, ReceivedHM04Text call PrintText SetEvent EVENT_GOT_HM04 - jr .asm_52039 -.subtract + jr .done +.got_item ld hl, HM04ExplanationText call PrintText - jr .asm_52039 -.BagFull + jr .done +.bag_full ld hl, HM04NoRoomText call PrintText -.asm_52039 +.done jp TextScriptEnd WardenGibberishText1: - TX_FAR _WardenGibberishText1 - db "@" + text_far _WardenGibberishText1 + text_end WardenGibberishText2: - TX_FAR _WardenGibberishText2 - db "@" + text_far _WardenGibberishText2 + text_end WardenGibberishText3: - TX_FAR _WardenGibberishText3 - db "@" + text_far _WardenGibberishText3 + text_end WardenTeethText1: - TX_FAR _WardenTeethText1 - TX_SFX_ITEM_1 + text_far _WardenTeethText1 + sound_get_item_1 WardenTeethText2: - TX_FAR _WardenTeethText2 - db "@" + text_far _WardenTeethText2 + text_end WardenThankYouText: - TX_FAR _WardenThankYouText - db "@" + text_far _WardenThankYouText + text_end ReceivedHM04Text: - TX_FAR _ReceivedHM04Text - TX_SFX_ITEM_1 - db "@" + text_far _ReceivedHM04Text + sound_get_item_1 + text_end HM04ExplanationText: - TX_FAR _HM04ExplanationText - db "@" + text_far _HM04ExplanationText + text_end HM04NoRoomText: - TX_FAR _HM04NoRoomText - db "@" + text_far _HM04NoRoomText + text_end FuchsiaHouse2Text5: FuchsiaHouse2Text4: - TX_ASM - ld a, [H_SPRITEINDEX] + text_asm + ldh a, [hSpriteIndex] cp $4 ld hl, FuchsiaHouse2Text_7517b jr nz, .asm_4c9a2 @@ -105,9 +105,9 @@ FuchsiaHouse2Text4: jp TextScriptEnd FuchsiaHouse2Text_75176: - TX_FAR _FuchsiaHouse2Text_75176 - db "@" + text_far _FuchsiaHouse2Text_75176 + text_end FuchsiaHouse2Text_7517b: - TX_FAR _FuchsiaHouse2Text_7517b - db "@" + text_far _FuchsiaHouse2Text_7517b + text_end |