summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorpikalaxalt <PikalaxALT@gmail.com>2016-06-08 00:35:33 -0400
committerpikalaxalt <PikalaxALT@gmail.com>2016-06-08 00:35:33 -0400
commit5da4ad3d5c62292f062d4f7b4382e6c09b7faaea (patch)
tree97319f45578efa0901fb1986678c16bbdeda6bcc /scripts
parente181c27c5e396aea254b471b182df3237eeb03ce (diff)
parent2bb64d11e6015e39e934e7359697c08636645994 (diff)
Merge branch 'master' of github.com:pret/pokeyellow
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/cinnabargym2.asm78
-rwxr-xr-xscripts/cinnabargym3.asm64
-rwxr-xr-xscripts/mtmoon3.asm8
-rwxr-xr-xscripts/mtmoon3_2.asm28
-rwxr-xr-xscripts/museum1f2.asm2
-rwxr-xr-xscripts/oakslab.asm4
-rwxr-xr-xscripts/pallettown.asm6
-rwxr-xr-xscripts/pokemontower7.asm8
-rwxr-xr-xscripts/rockethideout4.asm8
-rw-r--r--scripts/safarizoneentrance-yellow.asm255
-rwxr-xr-xscripts/safarizoneentrance2.asm6
-rwxr-xr-xscripts/silphco11.asm8
-rwxr-xr-xscripts/viridiancity2.asm4
13 files changed, 135 insertions, 344 deletions
diff --git a/scripts/cinnabargym2.asm b/scripts/cinnabargym2.asm
index a85a3206..00118fb5 100755
--- a/scripts/cinnabargym2.asm
+++ b/scripts/cinnabargym2.asm
@@ -1,64 +1,18 @@
-Func_f2133:
- CheckEvent EVENT_BEAT_BLAINE
- jr nz, .asm_627d9
- ld hl, CinnabarGymText_75ac2
- jr .asm_0b11d
-.asm_627d9
- ld hl, CinnabarGymText_75ac7
-.asm_0b11d
- call PrintText
+CinnabarGymScript_753de:
+ callab Func_f2150
+ jp TextScriptEnd
+
+CinnabarGymScript_753e9:
+ push hl
+ ld hl, wd475
+ bit 7, [hl]
+ res 7, [hl]
+ pop hl
ret
-CinnabarGymText_75ac2: ; 75ac2 (1d:5ac2)
- TX_FAR _CinnabarGymText_75ac2
- db "@"
-
-CinnabarGymText_75ac7: ; 75ac7 (1d:5ac7)
- TX_FAR _CinnabarGymText_75ac7
- db "@"
-
-Func_f2150:
- ld hl, TextPointers_f215d
- ld d, 0
- add hl, de
- add hl, de
- ld a, [hli]
- ld h, [hl]
- ld l, a
- jp PrintText
-
-TextPointers_f215d:
- dw CinnabarGymText_f2169
- dw CinnabarGymText_f216e
- dw CinnabarGymText_f2173
- dw CinnabarGymText_f2178
- dw CinnabarGymText_f217d
- dw CinnabarGymText_f2182
-
-CinnabarGymText_f2169:
- TX_FAR _CinnabarGymText_1
- db "@"
-
-CinnabarGymText_f216e:
- TX_FAR _CinnabarGymText_2
- db "@"
-
-CinnabarGymText_f2173:
- TX_FAR _CinnabarGymText_3
- db "@"
-
-CinnabarGymText_f2178:
- TX_FAR _CinnabarGymText_4
- db "@"
-
-CinnabarGymText_f217d:
- TX_FAR _CinnabarGymText_5
- db "@"
-
-CinnabarGymText_f2182:
- TX_FAR _CinnabarGymText_6
- db "@"
-
-CinnabarGymText_f2187:
- TX_FAR _CinnabarGymText_7 ; unused
- db "@"
+CinnabarGymScript_753f3:
+ push hl
+ ld hl, wd475
+ bit 7, [hl]
+ pop hl
+ ret
diff --git a/scripts/cinnabargym3.asm b/scripts/cinnabargym3.asm
new file mode 100755
index 00000000..a85a3206
--- /dev/null
+++ b/scripts/cinnabargym3.asm
@@ -0,0 +1,64 @@
+Func_f2133:
+ CheckEvent EVENT_BEAT_BLAINE
+ jr nz, .asm_627d9
+ ld hl, CinnabarGymText_75ac2
+ jr .asm_0b11d
+.asm_627d9
+ ld hl, CinnabarGymText_75ac7
+.asm_0b11d
+ call PrintText
+ ret
+
+CinnabarGymText_75ac2: ; 75ac2 (1d:5ac2)
+ TX_FAR _CinnabarGymText_75ac2
+ db "@"
+
+CinnabarGymText_75ac7: ; 75ac7 (1d:5ac7)
+ TX_FAR _CinnabarGymText_75ac7
+ db "@"
+
+Func_f2150:
+ ld hl, TextPointers_f215d
+ ld d, 0
+ add hl, de
+ add hl, de
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ jp PrintText
+
+TextPointers_f215d:
+ dw CinnabarGymText_f2169
+ dw CinnabarGymText_f216e
+ dw CinnabarGymText_f2173
+ dw CinnabarGymText_f2178
+ dw CinnabarGymText_f217d
+ dw CinnabarGymText_f2182
+
+CinnabarGymText_f2169:
+ TX_FAR _CinnabarGymText_1
+ db "@"
+
+CinnabarGymText_f216e:
+ TX_FAR _CinnabarGymText_2
+ db "@"
+
+CinnabarGymText_f2173:
+ TX_FAR _CinnabarGymText_3
+ db "@"
+
+CinnabarGymText_f2178:
+ TX_FAR _CinnabarGymText_4
+ db "@"
+
+CinnabarGymText_f217d:
+ TX_FAR _CinnabarGymText_5
+ db "@"
+
+CinnabarGymText_f2182:
+ TX_FAR _CinnabarGymText_6
+ db "@"
+
+CinnabarGymText_f2187:
+ TX_FAR _CinnabarGymText_7 ; unused
+ db "@"
diff --git a/scripts/mtmoon3.asm b/scripts/mtmoon3.asm
index 1de3445d..8aee239c 100755
--- a/scripts/mtmoon3.asm
+++ b/scripts/mtmoon3.asm
@@ -225,8 +225,8 @@ MtMoon3Script_49e15:
cp $5
ret nz
call StopAllMusic
- ld c, BANK(Music_JessieAndJames)
- ld a, MUSIC_JESSIE_AND_JAMES
+ ld c, BANK(Music_MeetJessieJames)
+ ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
xor a
ld [hJoyHeld], a
@@ -361,8 +361,8 @@ MtMoon3Script13:
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
call StopAllMusic
- ld c, BANK(Music_JessieAndJames)
- ld a, MUSIC_JESSIE_AND_JAMES
+ ld c, BANK(Music_MeetJessieJames)
+ ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
ld a, $ff
ld [wJoyIgnore], a
diff --git a/scripts/mtmoon3_2.asm b/scripts/mtmoon3_2.asm
new file mode 100755
index 00000000..c6ec92b4
--- /dev/null
+++ b/scripts/mtmoon3_2.asm
@@ -0,0 +1,28 @@
+MtMoon3Script_4a325: ; pikachu-related function?
+ ld a, [wd472]
+ bit 7, a
+ ret z
+ ld a, [wWalkBikeSurfState]
+ and a
+ ret nz
+
+ push hl
+ push bc
+ callab GetPikachuFacingDirectionAndReturnToE
+ pop bc
+ pop hl
+ ld a, b
+ cp e
+ ret nz
+
+ push hl
+ ld a, [wUpdateSpritesEnabled]
+ push af
+ ld a, $ff
+ ld [wUpdateSpritesEnabled], a
+ callab LoadPikachuShadowIntoVRAM
+ pop af
+ ld [wUpdateSpritesEnabled], a
+ pop hl
+ call ApplyPikachuMovementData
+ ret
diff --git a/scripts/museum1f2.asm b/scripts/museum1f2.asm
index f6dfa509..cefc0fce 100755
--- a/scripts/museum1f2.asm
+++ b/scripts/museum1f2.asm
@@ -104,7 +104,7 @@ Func_f1c1b:
call PrintText
.asm_f1cfc
ret
-
+
Museum1FText_f1cfd:
TX_FAR _Museum1FText_5c21a
db "@"
diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm
index 585d0ae4..71e900eb 100755
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -604,7 +604,7 @@ OaksLabScript20:
callba Music_RivalAlternateStart
ld a, $1
ld [hSpriteIndexOrTextID], a
- ld de, wNPCMovementDirections2
+ ld de, wNPCMovementDirections2
call MoveSprite
ld a, $15
ld [W_OAKSLABCURSCRIPT], a
@@ -887,7 +887,7 @@ OaksLabText3:
call PrintText
.asm_1ca6f
jp TextScriptEnd
-
+
OaksLabText_1ca72:
TX_FAR _OaksLabPikachuText
db "@"
diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm
index f29eacd1..41b3eb4f 100755
--- a/scripts/pallettown.asm
+++ b/scripts/pallettown.asm
@@ -127,7 +127,7 @@ PalletTownScript3: ; 18f12 (6:4f12)
ld a, SPRITE_FACING_LEFT
.asm_18f01
ld [wSpriteStateData1 + 1 * $10 + 9], a
-
+
; trigger the next script
ld a, 4
ld [W_PALLETTOWNCURSCRIPT], a
@@ -188,7 +188,7 @@ PalletTownScript6: ; 18f87 (6:4f87)
ld a, 7
ld [W_PALLETTOWNCURSCRIPT], a
ret
-
+
PalletTownScript7:
ld a, [wNPCMovementScriptPointerTableNum]
and a
@@ -198,7 +198,7 @@ PalletTownScript7:
ld a, 8
ld [W_PALLETTOWNCURSCRIPT], a
ret
-
+
PalletTownScript8:
CheckEvent EVENT_DAISY_WALKING
jr nz, .asm_18f9e
diff --git a/scripts/pokemontower7.asm b/scripts/pokemontower7.asm
index 77394447..32050e25 100755
--- a/scripts/pokemontower7.asm
+++ b/scripts/pokemontower7.asm
@@ -45,8 +45,8 @@ PokemonTower7Script_60d2a:
SetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
.asm_60d47
call StopAllMusic
- ld c, BANK(Music_JessieAndJames)
- ld a, MUSIC_JESSIE_AND_JAMES
+ ld c, BANK(Music_MeetJessieJames)
+ ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
xor a
ld [hJoyHeld], a
@@ -182,8 +182,8 @@ PokemonTower7Script8:
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
call StopAllMusic
- ld c, BANK(Music_JessieAndJames)
- ld a, MUSIC_JESSIE_AND_JAMES
+ ld c, BANK(Music_MeetJessieJames)
+ ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
ld a, $ff
ld [wJoyIgnore], a
diff --git a/scripts/rockethideout4.asm b/scripts/rockethideout4.asm
index 75cb7912..30ed3f24 100755
--- a/scripts/rockethideout4.asm
+++ b/scripts/rockethideout4.asm
@@ -93,8 +93,8 @@ RocketHideout4Script_455a5:
ld a, $fc
ld [wJoyIgnore], a
call StopAllMusic
- ld c, BANK(Music_JessieAndJames)
- ld a, MUSIC_JESSIE_AND_JAMES
+ ld c, BANK(Music_MeetJessieJames)
+ ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
call UpdateSprites
call Delay3
@@ -237,8 +237,8 @@ RocketHideout4Script11:
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
call StopAllMusic
- ld c, BANK(Music_JessieAndJames)
- ld a, MUSIC_JESSIE_AND_JAMES
+ ld c, BANK(Music_MeetJessieJames)
+ ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
ld a, $ff
ld [wJoyIgnore], a
diff --git a/scripts/safarizoneentrance-yellow.asm b/scripts/safarizoneentrance-yellow.asm
deleted file mode 100644
index da9a068e..00000000
--- a/scripts/safarizoneentrance-yellow.asm
+++ /dev/null
@@ -1,255 +0,0 @@
-.xf1f77
- ld hl,.ForJust500Text
- call PrintText
- ld a,MONEY_BOX
- ld [wTextBoxID],a
- call DisplayTextBoxID
- call YesNoChoice
- ld a,[wCurrentMenuItem]
- and a
- jp nz,.PleaseComeAgain
- ld hl,$d346 ; yellow d346
- ld a,[hli]
- or [hl]
- inc hl
- or [hl]
- jr nz,.xf1f9f
-.xf1f98
- call .xf20ce
- jr c,.CantPayWalkDown
- jr .xf1ff2
-
-.xf1f9f
- xor 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
- call PrintText
- call .xf2077
- jr c,.CantPayWalkDown
- jr .xf1ff2
-
-.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
- predef SubBCDPredef
- ld a,$b2
- call $3736
- call $373e
- ld a,MONEY_BOX
- ld [wTextBoxID],a
- call DisplayTextBoxID
- ld hl,.MakePaymentText
- call PrintText
- ld a,30
- lb hl, (502 / $100), (502 % $100)
-.xf1ff2
- ld [wNumSafariBalls],a
- ld a,h
- ld [wSafariSteps],a
- ld a,l
- 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
- jr .done
-
-.PleaseComeAgain
- ld hl,.PleaseComeAgainText
- call PrintText
-.CantPayWalkDown
- ld a,D_DOWN
- ld c,1
- call SafariZoneEntranceAutoWalk
- ld a,4
- ld [wSafariZoneEntranceCurScript],a
-.done
- ret
-
-.ForJust500Text
- TX_FAR SafariZoneEntranceText_9e6e4
- db "@"
-
-.MakePaymentText
- TX_FAR SafariZoneEntranceText_9e747
- db $b
- TX_FAR _SafariZoneEntranceText_75360
- db "@"
-
-.PleaseComeAgainText
- TX_FAR _SafariZoneEntranceText_75365
- db "@"
-
-.NotEnoughMoneyText
- TX_FAR _SafariZoneEntranceText_7536a
- db "@"
-
-.SafariZoneEntranceText2
- ld hl,.FirstTimeQuestionText
- call PrintText
- call YesNoChoice
- ld a,[wCurrentMenuItem]
- and a
- ld hl,.RegularText
- jr nz,.Explanation
- ld hl,.ExplanationText
-.Explanation
- call PrintText
- ret
-
-.FirstTimeQuestionText
- TX_FAR _SafariZoneEntranceText_753e6
- db "@"
-
-.ExplanationText
- TX_FAR _SafariZoneEntranceText_753eb
- db "@"
-
-.RegularText
- TX_FAR _SafariZoneEntranceText_753f0
- db "@"
-
-SafariZoneEntranceAutoWalk:
- push af
- ld b,0
- ld a,c
- ld [wSimulatedJoypadStatesIndex],a
- ld hl,wSimulatedJoypadStatesEnd
- pop af
- call FillMemory
- jp StartSimulatingJoypadStates
-
-.xf2077
- ld hl,wPlayerMoney
- ld de,$ff9f
- ld bc,3
- call $b1 ; yellow $00b1
- xor a
- ld [$ffa2],a
- ld [$ffa3],a
- ld a,$17 ; ¥17 per safari ball
- ld [$ffa4],a
- predef DivideBCDPredef3
- ld a,[$ffa4]
- call .xf211e
- pop af
- ld hl,$d346
- xor a
- ld bc,3
- call FillMemory
- ld hl,.OhAllRightText
- call PrintText_NoCreatingTextBox
- ld a,MONEY_BOX
- ld a,[$d124]
- call DisplayTextBoxID
- ld hl,.CantGive30BallsText
- call PrintText
- pop af
- inc a
- jr z,.xf20bd
- cp 29
- jr c,.xf20bf
-.xf20bd
- ld a,29
-.xf20bf
- ld hl,$1f6
- and a
- ret
-
-.OhAllRightText
- TX_FAR _SafariZoneLowCostText1
- db "@"
-
-.CantGive30BallsText
- TX_FAR _SafariZoneLowCostText2
- db "@"
-
-.xf20ce
- ld hl,$d70c
- ld a,[hl]
- push af
- inc [hl]
- ld e,a
- ld d,0
- ld hl,.lowcosttextpointers
- add hl,de
- add hl,de
- ld a,[hli]
- ld h,[hl]
- ld l,a
- call PrintText
- pop af
- cp 3
- jr z,.next
- scf
- ret
-
-.next
- ld hl,.xf20f6
- call $3c46
- ld a,1
- ld hl,$01f6
- and a
- ret
-
-.xf20f6
- TX_FAR _SafariZoneLowCostText3
- db $b
- TX_FAR _SafariZoneLowCostText4
- db "@"
-
-.lowcosttextpointers
- dw .xf210a
- dw .xf210f
- dw .xf2114
- dw .xf2119
- dw .xf2119
-
-.xf210a
- TX_FAR _SafariZoneLowCostText5
- db "@"
-
-.xf210f
- TX_FAR _SafariZoneLowCostText6
- db "@"
-
-.xf2114
- TX_FAR _SafariZoneLowCostText7
- db "@"
-
-.xf2119
- TX_FAR _SafariZoneLowCostText8
- db "@"
-
-.xf211e
- push hl
- ld c,a
- and $f
- ld l,a
- ld h,0
- ld a,c
- and $f0
- swap a
- ld bc,$a
- call $3a74
- ld a,l
- pop hl
- ret
-
-.xf2133
diff --git a/scripts/safarizoneentrance2.asm b/scripts/safarizoneentrance2.asm
index 0eb50790..4a6c23e6 100755
--- a/scripts/safarizoneentrance2.asm
+++ b/scripts/safarizoneentrance2.asm
@@ -62,7 +62,7 @@ Func_f1f77:
ld [wSafariSteps + 1], a
ld a, D_UP
ld c, 3
- call SafariZoneEntranceStartSimulatiingJoypadStates
+ call SafariZoneEntranceStartSimulatingJoypadStates
SetEvent EVENT_IN_SAFARI_ZONE
ResetEventReuseHL EVENT_SAFARI_GAME_OVER
ld a, $3
@@ -74,7 +74,7 @@ Func_f1f77:
.deny_entry
ld a, D_DOWN
ld c, 1
- call SafariZoneEntranceStartSimulatiingJoypadStates
+ call SafariZoneEntranceStartSimulatingJoypadStates
ld a, $4
ld [wSafariZoneEntranceCurScript], a
.asm_f2024
@@ -123,7 +123,7 @@ Func_f203e:
TX_FAR _SafariZoneEntranceText_753f0
db "@"
-SafariZoneEntranceStartSimulatiingJoypadStates:
+SafariZoneEntranceStartSimulatingJoypadStates:
push af
ld b, $0
ld a, c
diff --git a/scripts/silphco11.asm b/scripts/silphco11.asm
index a2354a69..42e8d574 100755
--- a/scripts/silphco11.asm
+++ b/scripts/silphco11.asm
@@ -229,8 +229,8 @@ SilphCo11Script_6229c:
SetEventReuseHL EVENT_781
.asm_622c3
call StopAllMusic
- ld c, BANK(Music_JessieAndJames)
- ld a, MUSIC_JESSIE_AND_JAMES
+ ld c, BANK(Music_MeetJessieJames)
+ ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
xor a
ld [hJoyHeld], a
@@ -417,8 +417,8 @@ SilphCo11Script12:
xor a
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
call StopAllMusic
- ld c, BANK(Music_JessieAndJames)
- ld a, MUSIC_JESSIE_AND_JAMES
+ ld c, BANK(Music_MeetJessieJames)
+ ld a, MUSIC_MEET_JESSIE_JAMES
call PlayMusic
ld a, $ff
ld [wJoyIgnore], a
diff --git a/scripts/viridiancity2.asm b/scripts/viridiancity2.asm
index 8e8b51db..2b6a4001 100755
--- a/scripts/viridiancity2.asm
+++ b/scripts/viridiancity2.asm
@@ -84,7 +84,7 @@ Func_f192c:
ViridianCityText_f1945:
TX_FAR _ViridianCityText_19191
db "@"
-
+
Func_f194a:
CheckEvent EVENT_GOT_TM42
jr nz, .asm_f1972
@@ -157,7 +157,7 @@ ViridianCityText_f19bb:
ViridianCityText_f19c0:
TX_FAR _OldManAgainText3
db "@"
-
+
Func_f19c5:
ld hl, ViridianCityText_f19cc
call PrintText