summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/celadongamecorner.asm4
-rwxr-xr-xscripts/ceruleancity.asm6
-rwxr-xr-xscripts/fightingdojo.asm2
-rwxr-xr-xscripts/fuchsiahouse2.asm2
-rwxr-xr-xscripts/oakslab.asm2
-rwxr-xr-xscripts/pallettown.asm160
-rwxr-xr-xscripts/redshouse1f.asm8
-rwxr-xr-xscripts/redshouse2f.asm14
-rwxr-xr-xscripts/safarizoneentrance.asm90
9 files changed, 144 insertions, 144 deletions
diff --git a/scripts/celadongamecorner.asm b/scripts/celadongamecorner.asm
index 09d2df37..cc81b076 100755
--- a/scripts/celadongamecorner.asm
+++ b/scripts/celadongamecorner.asm
@@ -144,7 +144,7 @@ CeladonGameCornerText2:
ld a, [wCurrentMenuItem]
and a
jr nz, .asm_48d0f
- ld b,COIN_CASE
+ ld b, COIN_CASE
call IsItemInBag
jr z, .asm_48d19
call Has9990Coins
@@ -362,7 +362,7 @@ CeladonGameCornerText10:
jr nz, .asm_48e75
ld hl, CeladonGameCornerText_48e88
call PrintText
- ld b,COIN_CASE
+ ld b, COIN_CASE
call IsItemInBag
jr z, .asm_48e7f
call Has9990Coins
diff --git a/scripts/ceruleancity.asm b/scripts/ceruleancity.asm
index d6269a64..555e75f1 100755
--- a/scripts/ceruleancity.asm
+++ b/scripts/ceruleancity.asm
@@ -113,10 +113,10 @@ CeruleanCityMovement1:
db $FF
CeruleanCityScript_1955d:
- ld a,1
- ld [H_SPRITEINDEX],a
+ ld a, 1
+ ld [H_SPRITEINDEX], a
xor a ; SPRITE_FACING_DOWN
- ld [hSpriteFacingDirection],a
+ ld [hSpriteFacingDirection], a
jp SetSpriteFacingDirectionAndDelay ; face object
CeruleanCityScript1:
diff --git a/scripts/fightingdojo.asm b/scripts/fightingdojo.asm
index fa0cdca2..5c7704f5 100755
--- a/scripts/fightingdojo.asm
+++ b/scripts/fightingdojo.asm
@@ -302,7 +302,7 @@ FightingDojoText7:
jr nz, .done
ld a, [wcf91]
ld b, a
- ld c,30
+ ld c, 30
call GivePokemon
jr nc, .done
SetEvents EVENT_GOT_HITMONCHAN, EVENT_DEFEATED_FIGHTING_DOJO
diff --git a/scripts/fuchsiahouse2.asm b/scripts/fuchsiahouse2.asm
index f9307c04..6d49fb2f 100755
--- a/scripts/fuchsiahouse2.asm
+++ b/scripts/fuchsiahouse2.asm
@@ -12,7 +12,7 @@ FuchsiaHouse2Text1:
TX_ASM
CheckEvent EVENT_GOT_HM04
jr nz, .subtract
- ld b,GOLD_TEETH
+ ld b, GOLD_TEETH
call IsItemInBag
jr nz, .asm_3f30f
CheckEvent EVENT_GAVE_GOLD_TEETH
diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm
index e73d7cf8..aa84fab9 100755
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -981,7 +981,7 @@ OaksLabText5:
predef DisplayDexRating
jp .asm_1d2ed
.asm_1d279
- ld b,POKE_BALL
+ ld b, POKE_BALL
call IsItemInBag
jr nz, .asm_1d2e7
CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE
diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm
index a06dfd54..5b2d2a35 100755
--- a/scripts/pallettown.asm
+++ b/scripts/pallettown.asm
@@ -1,11 +1,11 @@
PalletTownScript:
CheckEvent EVENT_GOT_POKEBALLS_FROM_OAK
- jr z,.next
+ jr z, .next
SetEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS
.next
call EnableAutoTextBoxDrawing
- ld hl,PalletTownScriptPointers
- ld a,[wPalletTownCurScript]
+ ld hl, PalletTownScriptPointers
+ ld a, [wPalletTownCurScript]
jp CallFunctionInTable
PalletTownScriptPointers:
@@ -20,126 +20,126 @@ PalletTownScriptPointers:
PalletTownScript0:
CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB
ret nz
- ld a,[wYCoord]
+ ld a, [wYCoord]
cp 1 ; is player near north exit?
ret nz
xor a
- ld [hJoyHeld],a
- ld a,PLAYER_DIR_DOWN
- ld [wPlayerMovingDirection],a
- ld a,$FF
+ ld [hJoyHeld], a
+ ld a, PLAYER_DIR_DOWN
+ ld [wPlayerMovingDirection], a
+ ld a, $FF
call PlaySound ; stop music
ld a, BANK(Music_MeetProfOak)
- ld c,a
+ ld c, a
ld a, MUSIC_MEET_PROF_OAK ; “oak appears” music
call PlayMusic
- ld a,$FC
- ld [wJoyIgnore],a
+ ld a, $FC
+ ld [wJoyIgnore], a
SetEvent EVENT_OAK_APPEARED_IN_PALLET
; trigger the next script
- ld a,1
- ld [wPalletTownCurScript],a
+ ld a, 1
+ ld [wPalletTownCurScript], a
ret
PalletTownScript1:
xor a
- ld [wcf0d],a
- ld a,1
- ld [hSpriteIndexOrTextID],a
+ ld [wcf0d], a
+ ld a, 1
+ ld [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a,$FF
- ld [wJoyIgnore],a
- ld a,HS_PALLET_TOWN_OAK
- ld [wMissableObjectIndex],a
+ ld a, $FF
+ ld [wJoyIgnore], a
+ ld a, HS_PALLET_TOWN_OAK
+ ld [wMissableObjectIndex], a
predef ShowObject
; trigger the next script
- ld a,2
- ld [wPalletTownCurScript],a
+ ld a, 2
+ ld [wPalletTownCurScript], a
ret
PalletTownScript2:
- ld a,1
- ld [H_SPRITEINDEX],a
- ld a,SPRITE_FACING_UP
- ld [hSpriteFacingDirection],a
+ ld a, 1
+ ld [H_SPRITEINDEX], a
+ ld a, SPRITE_FACING_UP
+ ld [hSpriteFacingDirection], a
call SetSpriteFacingDirectionAndDelay
call Delay3
- ld a,1
- ld [wYCoord],a
- ld a,1
- ld [hNPCPlayerRelativePosPerspective],a
- ld a,1
+ ld a, 1
+ ld [wYCoord], a
+ ld a, 1
+ ld [hNPCPlayerRelativePosPerspective], a
+ ld a, 1
swap a
- ld [hNPCSpriteOffset],a
+ ld [hNPCSpriteOffset], a
predef CalcPositionOfPlayerRelativeToNPC
- ld hl,hNPCPlayerYDistance
+ ld hl, hNPCPlayerYDistance
dec [hl]
predef FindPathToPlayer ; load Oak’s movement into wNPCMovementDirections2
- ld de,wNPCMovementDirections2
- ld a,1 ; oak
- ld [H_SPRITEINDEX],a
+ ld de, wNPCMovementDirections2
+ ld a, 1 ; oak
+ ld [H_SPRITEINDEX], a
call MoveSprite
- ld a,$FF
- ld [wJoyIgnore],a
+ ld a, $FF
+ ld [wJoyIgnore], a
; trigger the next script
- ld a,3
- ld [wPalletTownCurScript],a
+ ld a, 3
+ ld [wPalletTownCurScript], a
ret
PalletTownScript3:
- ld a,[wd730]
- bit 0,a
+ ld a, [wd730]
+ bit 0, a
ret nz
xor a ; ld a, SPRITE_FACING_DOWN
- ld [wSpriteStateData1 + 9],a
- ld a,1
- ld [wcf0d],a
- ld a,$FC
- ld [wJoyIgnore],a
- ld a,1
- ld [hSpriteIndexOrTextID],a
+ ld [wSpriteStateData1 + 9], a
+ ld a, 1
+ ld [wcf0d], a
+ ld a, $FC
+ ld [wJoyIgnore], a
+ ld a, 1
+ ld [hSpriteIndexOrTextID], a
call DisplayTextID
; set up movement script that causes the player to follow Oak to his lab
- ld a,$FF
- ld [wJoyIgnore],a
- ld a,1
- ld [wSpriteIndex],a
+ ld a, $FF
+ ld [wJoyIgnore], a
+ ld a, 1
+ ld [wSpriteIndex], a
xor a
- ld [wNPCMovementScriptFunctionNum],a
- ld a,1
- ld [wNPCMovementScriptPointerTableNum],a
- ld a,[H_LOADEDROMBANK]
- ld [wNPCMovementScriptBank],a
+ ld [wNPCMovementScriptFunctionNum], a
+ ld a, 1
+ ld [wNPCMovementScriptPointerTableNum], a
+ ld a, [H_LOADEDROMBANK]
+ ld [wNPCMovementScriptBank], a
; trigger the next script
- ld a,4
- ld [wPalletTownCurScript],a
+ ld a, 4
+ ld [wPalletTownCurScript], a
ret
PalletTownScript4:
- ld a,[wNPCMovementScriptPointerTableNum]
+ ld a, [wNPCMovementScriptPointerTableNum]
and a ; is the movement script over?
ret nz
; trigger the next script
- ld a,5
- ld [wPalletTownCurScript],a
+ ld a, 5
+ ld [wPalletTownCurScript], a
ret
PalletTownScript5:
CheckEvent EVENT_DAISY_WALKING
- jr nz,.next
+ jr nz, .next
CheckBothEventsSet EVENT_GOT_TOWN_MAP, EVENT_ENTERED_BLUES_HOUSE, 1
- jr nz,.next
+ jr nz, .next
SetEvent EVENT_DAISY_WALKING
- ld a,HS_DAISY_SITTING
- ld [wMissableObjectIndex],a
+ ld a, HS_DAISY_SITTING
+ ld [wMissableObjectIndex], a
predef HideObject
- ld a,HS_DAISY_WALKING
- ld [wMissableObjectIndex],a
+ ld a, HS_DAISY_WALKING
+ ld [wMissableObjectIndex], a
predef_jump ShowObject
.next
CheckEvent EVENT_GOT_POKEBALLS_FROM_OAK
@@ -159,15 +159,15 @@ PalletTownTextPointers:
PalletTownText1:
TX_ASM
- ld a,[wcf0d]
+ ld a, [wcf0d]
and a
- jr nz,.next
- ld a,1
- ld [wDoNotWaitForButtonPressAfterDisplayingText],a
- ld hl,OakAppearsText
+ jr nz, .next
+ ld a, 1
+ ld [wDoNotWaitForButtonPressAfterDisplayingText], a
+ ld hl, OakAppearsText
jr .done
.next
- ld hl,OakWalksUpText
+ ld hl, OakWalksUpText
.done
call PrintText
jp TextScriptEnd
@@ -175,14 +175,14 @@ PalletTownText1:
OakAppearsText:
TX_FAR _OakAppearsText
TX_ASM
- ld c,10
+ ld c, 10
call DelayFrames
xor a
- ld [wEmotionBubbleSpriteIndex],a ; player's sprite
- ld [wWhichEmotionBubble],a ; EXCLAMATION_BUBBLE
+ ld [wEmotionBubbleSpriteIndex], a ; player's sprite
+ ld [wWhichEmotionBubble], a ; EXCLAMATION_BUBBLE
predef EmotionBubble
- ld a,PLAYER_DIR_DOWN
- ld [wPlayerMovingDirection],a
+ ld a, PLAYER_DIR_DOWN
+ ld [wPlayerMovingDirection], a
jp TextScriptEnd
OakWalksUpText:
diff --git a/scripts/redshouse1f.asm b/scripts/redshouse1f.asm
index cbfb35c8..59323b8e 100755
--- a/scripts/redshouse1f.asm
+++ b/scripts/redshouse1f.asm
@@ -51,11 +51,11 @@ MomHealText2:
RedsHouse1FText2: ; TV
TX_ASM
- ld a,[wSpriteStateData1 + 9]
+ ld a, [wSpriteStateData1 + 9]
cp SPRITE_FACING_UP
- ld hl,TVWrongSideText
- jr nz,.notUp
- ld hl,StandByMeText
+ ld hl, TVWrongSideText
+ jr nz, .notUp
+ ld hl, StandByMeText
.notUp
call PrintText
jp TextScriptEnd
diff --git a/scripts/redshouse2f.asm b/scripts/redshouse2f.asm
index 60c3ea67..0ec59077 100755
--- a/scripts/redshouse2f.asm
+++ b/scripts/redshouse2f.asm
@@ -1,7 +1,7 @@
RedsHouse2FScript:
call EnableAutoTextBoxDrawing
- ld hl,RedsHouse2FScriptPointers
- ld a,[wRedsHouse2CurScript]
+ ld hl, RedsHouse2FScriptPointers
+ ld a, [wRedsHouse2CurScript]
jp CallFunctionInTable
RedsHouse2FScriptPointers:
@@ -10,11 +10,11 @@ RedsHouse2FScriptPointers:
RedsHouse2FScript0:
xor a
- ld [hJoyHeld],a
- ld a,PLAYER_DIR_UP
- ld [wPlayerMovingDirection],a
- ld a,1
- ld [wRedsHouse2CurScript],a
+ ld [hJoyHeld], a
+ ld a, PLAYER_DIR_UP
+ ld [wPlayerMovingDirection], a
+ ld a, 1
+ ld [wRedsHouse2CurScript], a
ret
RedsHouse2FScript1:
diff --git a/scripts/safarizoneentrance.asm b/scripts/safarizoneentrance.asm
index 80551e69..5c6002a9 100755
--- a/scripts/safarizoneentrance.asm
+++ b/scripts/safarizoneentrance.asm
@@ -117,10 +117,10 @@ SafariZoneEntranceScriptPointers:
SafariZoneEntranceAutoWalk:
push af
- ld b,0
- ld a,c
- ld [wSimulatedJoypadStatesIndex],a
- ld hl,wSimulatedJoypadStatesEnd
+ ld b, 0
+ ld a, c
+ ld [wSimulatedJoypadStatesIndex], a
+ ld hl, wSimulatedJoypadStatesEnd
pop af
call FillMemory
jp StartSimulatingJoypadStates
@@ -146,64 +146,64 @@ SafariZoneEntranceTextPointers:
TX_FAR SafariZoneEntranceText_9e6e4
TX_ASM
ld a, MONEY_BOX
- ld [wTextBoxID],a
+ ld [wTextBoxID], a
call DisplayTextBoxID
call YesNoChoice
- ld a,[wCurrentMenuItem]
+ ld a, [wCurrentMenuItem]
and a
- jp nz,.PleaseComeAgain
+ jp nz, .PleaseComeAgain
xor a
- ld [hMoney],a
- ld a,$05
- ld [hMoney + 1],a
- ld a,$00
- ld [hMoney + 2],a
+ ld [hMoney], a
+ ld a, $05
+ ld [hMoney + 1], a
+ ld a, $00
+ ld [hMoney + 2], a
call HasEnoughMoney
- jr nc,.success
- ld hl,.NotEnoughMoneyText
+ jr nc, .success
+ ld hl, .NotEnoughMoneyText
call PrintText
jr .CantPayWalkDown
.success
xor a
- ld [wPriceTemp],a
- ld a,$05
- ld [wPriceTemp + 1],a
- ld a,$00
- ld [wPriceTemp + 2],a
- ld hl,wPriceTemp + 2
- ld de,wPlayerMoney + 2
- ld c,3
+ ld [wPriceTemp], a
+ ld a, $05
+ ld [wPriceTemp + 1], a
+ ld a, $00
+ ld [wPriceTemp + 2], a
+ ld hl, wPriceTemp + 2
+ ld de, wPlayerMoney + 2
+ ld c, 3
predef SubBCDPredef
- ld a,MONEY_BOX
- ld [wTextBoxID],a
+ ld a, MONEY_BOX
+ ld [wTextBoxID], a
call DisplayTextBoxID
- ld hl,.MakePaymentText
+ ld hl, .MakePaymentText
call PrintText
- ld a,30
- ld [wNumSafariBalls],a
- ld a,502 / $100
- ld [wSafariSteps],a
+ ld a, 30
+ ld [wNumSafariBalls], a
+ ld a, 502 / $100
+ ld [wSafariSteps], a
ld a, 502 % $100
- ld [wSafariSteps + 1],a
- ld a,D_UP
- ld c,3
+ ld [wSafariSteps + 1], a
+ ld a, D_UP
+ ld c, 3
call SafariZoneEntranceAutoWalk
SetEvent EVENT_IN_SAFARI_ZONE
ResetEventReuseHL EVENT_SAFARI_GAME_OVER
- ld a,3
- ld [wSafariZoneEntranceCurScript],a
+ ld a, 3
+ ld [wSafariZoneEntranceCurScript], a
jr .done
.PleaseComeAgain
- ld hl,.PleaseComeAgainText
+ ld hl, .PleaseComeAgainText
call PrintText
.CantPayWalkDown
- ld a,D_DOWN
- ld c,1
+ ld a, D_DOWN
+ ld c, 1
call SafariZoneEntranceAutoWalk
- ld a,4
- ld [wSafariZoneEntranceCurScript],a
+ ld a, 4
+ ld [wSafariZoneEntranceCurScript], a
.done
jp TextScriptEnd
@@ -225,7 +225,7 @@ SafariZoneEntranceTextPointers:
TX_FAR SafariZoneEntranceText_9e814
TX_ASM
call YesNoChoice
- ld a,[wCurrentMenuItem]
+ ld a, [wCurrentMenuItem]
and a
jr nz, .asm_7539c
ld hl, .SafariZoneEntranceText_753bb
@@ -268,14 +268,14 @@ SafariZoneEntranceTextPointers:
.SafariZoneEntranceText2
TX_ASM
- ld hl,.FirstTimeQuestionText
+ ld hl, .FirstTimeQuestionText
call PrintText
call YesNoChoice
- ld a,[wCurrentMenuItem]
+ ld a, [wCurrentMenuItem]
and a
- ld hl,.RegularText
- jr nz,.Explanation
- ld hl,.ExplanationText
+ ld hl, .RegularText
+ jr nz, .Explanation
+ ld hl, .ExplanationText
.Explanation
call PrintText
jp TextScriptEnd