mirror of
https://github.com/pret/pokeyellow.git
synced 2026-09-14 13:35:51 -05:00
Refactor BillsHouse and Pikachu movement
- Rename wd471 to wPikachuSpawnStateFlags globally - Rename wd492 to wPikachuMapScriptFlags globally - Introduce pikachu_movement_constants.asm - Refactor BillsHouse scripts and Pikachu/Bill movement data
This commit is contained in:
11
constants/pikachu_movement_constants.asm
Normal file
11
constants/pikachu_movement_constants.asm
Normal file
@@ -0,0 +1,11 @@
|
||||
; Pikachu movement commands
|
||||
DEF PIKAMOVEMENT_DELAY EQU $00
|
||||
DEF PIKAMOVEMENT_STEP_DOWN EQU $1d
|
||||
DEF PIKAMOVEMENT_STEP_UP EQU $1e
|
||||
DEF PIKAMOVEMENT_STEP_LEFT EQU $1f
|
||||
DEF PIKAMOVEMENT_STEP_RIGHT EQU $20
|
||||
DEF PIKAMOVEMENT_LOOK_DOWN EQU $35
|
||||
DEF PIKAMOVEMENT_LOOK_UP EQU $36
|
||||
DEF PIKAMOVEMENT_LOOK_LEFT EQU $37
|
||||
DEF PIKAMOVEMENT_LOOK_RIGHT EQU $38
|
||||
DEF PIKAMOVEMENT_END EQU $3f
|
||||
@@ -3,7 +3,7 @@ ApplyOutOfBattlePoisonDamage:
|
||||
ASSERT BIT_SCRIPTED_MOVEMENT_STATE == 7
|
||||
add a ; overflows scripted movement state bit into carry flag
|
||||
jp c, .noBlackOut ; no black out if joypad states are being simulated
|
||||
ld a, [wd492]
|
||||
ld a, [wPikachuMapScriptFlags]
|
||||
bit 7, a
|
||||
jp nz, .noBlackOut
|
||||
ld a, [wStatusFlags4]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
TryApplyPikachuMovementData::
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 7, a
|
||||
ret z
|
||||
ld a, [wWalkBikeSurfState]
|
||||
|
||||
@@ -85,7 +85,7 @@ SurfingPikachuLoop:
|
||||
ret
|
||||
|
||||
SurfingPikachu_CheckPressedSelect:
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
bit 1, [hl]
|
||||
ret z
|
||||
ldh a, [hJoyPressed]
|
||||
|
||||
@@ -304,7 +304,7 @@ MapSpecificPikachuExpression:
|
||||
ld a, [wCurMap]
|
||||
cp POKEMON_FAN_CLUB
|
||||
jr nz, .notFanClub
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
bit 7, [hl]
|
||||
ldpikaemotion a, PikachuEmotion29
|
||||
jr z, .play_emotion
|
||||
@@ -323,7 +323,7 @@ MapSpecificPikachuExpression:
|
||||
jr .check_pikachu_status
|
||||
|
||||
.notPewterPokecenter
|
||||
callfar Func_f24ae
|
||||
callfar BillsHouse_CheckPikachuEmotion
|
||||
ld a, e
|
||||
cp $ff
|
||||
jr nz, .play_emotion
|
||||
|
||||
@@ -140,7 +140,7 @@ CalculatePikachuPlacementCoords::
|
||||
inc hl
|
||||
ld [hl], $fe
|
||||
push hl
|
||||
ld hl, wd471
|
||||
ld hl, wPikachuSpawnStateFlags
|
||||
set 5, [hl]
|
||||
pop hl
|
||||
ret
|
||||
@@ -1278,7 +1278,7 @@ Func_fcc23:
|
||||
ld a, [wPikachuOverworldStateFlags]
|
||||
bit 7, a
|
||||
jr nz, .asm_fcc40
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 7, a
|
||||
jr z, .asm_fcc40
|
||||
ld a, [wWalkBikeSurfState]
|
||||
|
||||
@@ -69,12 +69,12 @@ IsItemInBag::
|
||||
ret
|
||||
|
||||
IsSurfingPikachuInParty::
|
||||
; set bit 6 of wd471 if any Pikachu with Surf is in party
|
||||
; set bit 7 of wd471 if starter Pikachu is in party (with or without Surf)
|
||||
; set bit 6 of wPikachuSpawnStateFlags if any Pikachu with Surf is in party
|
||||
; set bit 7 of wPikachuSpawnStateFlags if starter Pikachu is in party (with or without Surf)
|
||||
; also performs a bankswitch to IsStarterPikachuAliveInOurParty
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
and $3f
|
||||
ld [wd471], a
|
||||
ld [wPikachuSpawnStateFlags], a
|
||||
ld hl, wPartyMon1
|
||||
ld c, PARTY_LENGTH
|
||||
ld b, SURF
|
||||
@@ -98,9 +98,9 @@ IsSurfingPikachuInParty::
|
||||
cp b
|
||||
jr nz, .noSurf
|
||||
.hasSurf
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
set 6, a
|
||||
ld [wd471], a
|
||||
ld [wPikachuSpawnStateFlags], a
|
||||
.noSurf
|
||||
pop hl
|
||||
.notPikachu
|
||||
@@ -118,9 +118,9 @@ IsSurfingPikachuInParty::
|
||||
pop bc
|
||||
pop hl
|
||||
ret nc
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
set 7, a
|
||||
ld [wd471], a
|
||||
ld [wPikachuSpawnStateFlags], a
|
||||
ret
|
||||
|
||||
DisplayPokedex::
|
||||
|
||||
@@ -1752,7 +1752,7 @@ LoadSurfingPlayerSpriteGraphics2::
|
||||
dec a
|
||||
jr z, .asm_0d7c
|
||||
.asm_0d75
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 6, a
|
||||
jr z, LoadSurfingPlayerSpriteGraphics
|
||||
.asm_0d7c
|
||||
|
||||
@@ -53,6 +53,7 @@ INCLUDE "constants/text_constants.asm"
|
||||
INCLUDE "constants/menu_constants.asm"
|
||||
INCLUDE "constants/sprite_anim_constants.asm"
|
||||
INCLUDE "constants/pikachu_emotion_constants.asm"
|
||||
INCLUDE "constants/pikachu_movement_constants.asm"
|
||||
|
||||
IF DEF(_YELLOW_VC)
|
||||
INCLUDE "vc/pokeyellow.constants.asm"
|
||||
|
||||
@@ -2068,14 +2068,14 @@ ENDU
|
||||
|
||||
wPikachuHappiness:: db
|
||||
wPikachuMood:: db
|
||||
wd471:: db
|
||||
wPikachuSpawnStateFlags:: db
|
||||
wd472:: db
|
||||
ds 1
|
||||
wd474:: db
|
||||
ds 4
|
||||
wd479:: db
|
||||
ds 24
|
||||
wd492:: db
|
||||
wPikachuMapScriptFlags:: db
|
||||
ds 1
|
||||
wSurfingMinigameHiScore:: dw ; little-endian BCD
|
||||
ds 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
BillsHouse_Script:
|
||||
call BillsHouseScript_1e09e
|
||||
call BillsHouse_CheckMetBill
|
||||
call EnableAutoTextBoxDrawing
|
||||
ld a, [wBillsHouseCurScript]
|
||||
ld hl, BillsHouse_ScriptPointers
|
||||
@@ -19,33 +19,33 @@ BillsHouse_ScriptPointers:
|
||||
dw_const BillsHouseScript8, SCRIPT_BILLSHOUSE_SCRIPT8
|
||||
dw_const BillsHouseScript9, SCRIPT_BILLSHOUSE_SCRIPT9
|
||||
|
||||
BillsHouseScript_1e09e:
|
||||
ld hl, wd492
|
||||
BillsHouse_CheckMetBill:
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
bit 7, [hl]
|
||||
set 7, [hl]
|
||||
ret nz
|
||||
CheckEventHL EVENT_MET_BILL_2
|
||||
jr z, .asm_1e0af
|
||||
jr .asm_1e0b3
|
||||
jr z, .notMetBill
|
||||
jr .metBill
|
||||
|
||||
.asm_1e0af
|
||||
.notMetBill
|
||||
ld a, SCRIPT_BILLSHOUSE_SCRIPT0
|
||||
jr .asm_1e0b5
|
||||
jr .setScript
|
||||
|
||||
.asm_1e0b3
|
||||
.metBill
|
||||
ld a, SCRIPT_BILLSHOUSE_SCRIPT9
|
||||
.asm_1e0b5
|
||||
.setScript
|
||||
ld [wBillsHouseCurScript], a
|
||||
ret
|
||||
|
||||
BillsHouseScript0:
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 7, a
|
||||
jr z, .asm_1e0d2
|
||||
jr z, .done
|
||||
callfar CheckPikachuStatusCondition
|
||||
jr c, .asm_1e0d2
|
||||
callfar Func_f24d5
|
||||
.asm_1e0d2
|
||||
jr c, .done
|
||||
callfar BillsHousePikachuConfused
|
||||
.done
|
||||
xor a
|
||||
ld [wJoyIgnore], a
|
||||
ld a, SCRIPT_BILLSHOUSE_SCRIPT1
|
||||
@@ -60,13 +60,13 @@ BillsHouseScript2:
|
||||
ld [wJoyIgnore], a
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
and a ; cp SPRITE_FACING_DOWN
|
||||
ld de, MovementData_1e79c
|
||||
ld de, BillMovement_WalkToCellSeparator
|
||||
jr nz, .notDown
|
||||
call CheckPikachuFollowingPlayer
|
||||
jr nz, .asm_1e0f8
|
||||
callfar Func_f250b
|
||||
.asm_1e0f8
|
||||
ld de, MovementData_1e7a0
|
||||
jr nz, .pikachuNotFollowing
|
||||
callfar BillsHousePikachuWatchPlayer
|
||||
.pikachuNotFollowing
|
||||
ld de, BillMovement_WalkAroundPlayer
|
||||
.notDown
|
||||
ld a, BILLSHOUSE_BILL_POKEMON
|
||||
ldh [hSpriteIndex], a
|
||||
@@ -75,14 +75,14 @@ BillsHouseScript2:
|
||||
ld [wBillsHouseCurScript], a
|
||||
ret
|
||||
|
||||
MovementData_1e79c:
|
||||
BillMovement_WalkToCellSeparator:
|
||||
db NPC_MOVEMENT_UP
|
||||
db NPC_MOVEMENT_UP
|
||||
db NPC_MOVEMENT_UP
|
||||
db -1 ; end
|
||||
|
||||
; make Bill walk around the player
|
||||
MovementData_1e7a0:
|
||||
BillMovement_WalkAroundPlayer:
|
||||
db NPC_MOVEMENT_RIGHT
|
||||
db NPC_MOVEMENT_UP
|
||||
db NPC_MOVEMENT_UP
|
||||
@@ -98,16 +98,16 @@ BillsHouseScript3:
|
||||
ld [wToggleableObjectIndex], a
|
||||
predef HideObject
|
||||
call CheckPikachuFollowingPlayer
|
||||
jr z, .asm_1e13e
|
||||
ld hl, PikachuMovementData_1e14d
|
||||
jr z, .pikachuNotFollowing
|
||||
ld hl, PikachuMovement_EnterCellSeparatorDown
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
and a ; cp SPRITE_FACING_DOWN
|
||||
jr nz, .asm_1e133
|
||||
ld hl, PikachuMovementData_1e152
|
||||
.asm_1e133
|
||||
jr nz, .applyPikachuMovement
|
||||
ld hl, PikachuMovement_EnterCellSeparatorNotDown
|
||||
.applyPikachuMovement
|
||||
call ApplyPikachuMovementData
|
||||
callfar InitializePikachuTextID
|
||||
.asm_1e13e
|
||||
.pikachuNotFollowing
|
||||
xor a
|
||||
ld [wJoyIgnore], a
|
||||
SetEvent EVENT_BILL_SAID_USE_CELL_SEPARATOR
|
||||
@@ -115,22 +115,22 @@ BillsHouseScript3:
|
||||
ld [wBillsHouseCurScript], a
|
||||
ret
|
||||
|
||||
PikachuMovementData_1e14d:
|
||||
db $00
|
||||
db $1e
|
||||
db $1e
|
||||
db $1e
|
||||
db $3f
|
||||
PikachuMovement_EnterCellSeparatorDown:
|
||||
db PIKAMOVEMENT_DELAY
|
||||
db PIKAMOVEMENT_STEP_UP
|
||||
db PIKAMOVEMENT_STEP_UP
|
||||
db PIKAMOVEMENT_STEP_UP
|
||||
db PIKAMOVEMENT_END
|
||||
|
||||
PikachuMovementData_1e152:
|
||||
db $00
|
||||
db $1e
|
||||
db $1f
|
||||
db $1e
|
||||
db $1e
|
||||
db $20
|
||||
db $36
|
||||
db $3f
|
||||
PikachuMovement_EnterCellSeparatorNotDown:
|
||||
db PIKAMOVEMENT_DELAY
|
||||
db PIKAMOVEMENT_STEP_UP
|
||||
db PIKAMOVEMENT_STEP_LEFT
|
||||
db PIKAMOVEMENT_STEP_UP
|
||||
db PIKAMOVEMENT_STEP_UP
|
||||
db PIKAMOVEMENT_STEP_RIGHT
|
||||
db PIKAMOVEMENT_LOOK_UP
|
||||
db PIKAMOVEMENT_END
|
||||
|
||||
BillsHouseScript4:
|
||||
CheckEvent EVENT_USED_CELL_SEPARATOR_ON_BILL
|
||||
@@ -158,17 +158,17 @@ BillsHouseScript5:
|
||||
predef ShowObject
|
||||
ld c, 8
|
||||
call DelayFrames
|
||||
ld hl, wd471
|
||||
ld hl, wPikachuSpawnStateFlags
|
||||
bit 7, [hl]
|
||||
jr z, .asm_1e1c6
|
||||
jr z, .pikachuNotFollowing
|
||||
call CheckPikachuFollowingPlayer
|
||||
jr z, .asm_1e1c6
|
||||
jr z, .pikachuNotFollowing
|
||||
ld a, BILLSHOUSE_BILL1
|
||||
ldh [hSpriteIndex], a
|
||||
ld a, SPRITE_FACING_DOWN
|
||||
ldh [hSpriteFacingDirection], a
|
||||
call SetSpriteFacingDirectionAndDelay
|
||||
ld hl, PikachuMovementData_1e1a9
|
||||
ld hl, PikachuMovement_ExitCellSeparator
|
||||
call ApplyPikachuMovementData
|
||||
ld a, $f
|
||||
ld [wEmotionBubbleSpriteIndex], a
|
||||
@@ -176,7 +176,7 @@ BillsHouseScript5:
|
||||
ld [wWhichEmotionBubble], a
|
||||
predef EmotionBubble
|
||||
callfar InitializePikachuTextID
|
||||
.asm_1e1c6
|
||||
.pikachuNotFollowing
|
||||
ld a, BILLSHOUSE_BILL1
|
||||
ldh [hSpriteIndex], a
|
||||
ld de, .BillExitMachineMovement
|
||||
@@ -193,10 +193,10 @@ BillsHouseScript5:
|
||||
db NPC_MOVEMENT_DOWN
|
||||
db -1 ; end
|
||||
|
||||
PikachuMovementData_1e1a9:
|
||||
db $00
|
||||
db $37
|
||||
db $3f
|
||||
PikachuMovement_ExitCellSeparator:
|
||||
db PIKAMOVEMENT_DELAY
|
||||
db PIKAMOVEMENT_LOOK_LEFT
|
||||
db PIKAMOVEMENT_END
|
||||
|
||||
BillsHouseScript6:
|
||||
ld a, [wStatusFlags5]
|
||||
|
||||
@@ -81,12 +81,12 @@ BillsHousePrintBillCheckOutMyRarePokemonText::
|
||||
text_far _BillsHouseBillCheckOutMyRarePokemonText
|
||||
text_end
|
||||
|
||||
Func_f24ae::
|
||||
BillsHouse_CheckPikachuEmotion::
|
||||
ld a, [wCurMap]
|
||||
cp BILLS_HOUSE
|
||||
jr nz, .asm_f24d2
|
||||
jr nz, .noEmotion
|
||||
call CheckPikachuFollowingPlayer
|
||||
jr z, .asm_f24d2
|
||||
jr z, .noEmotion
|
||||
ld a, [wBillsHouseCurScript]
|
||||
cp SCRIPT_BILLSHOUSE_SCRIPT5
|
||||
ldpikaemotion e, PikachuEmotion27
|
||||
@@ -100,18 +100,18 @@ Func_f24ae::
|
||||
ldpikaemotion e, PikachuEmotion31
|
||||
ret
|
||||
|
||||
.asm_f24d2
|
||||
.noEmotion
|
||||
ld e, $ff
|
||||
ret
|
||||
|
||||
Func_f24d5::
|
||||
BillsHousePikachuConfused::
|
||||
ld a, PAD_BUTTONS | PAD_CTRL_PAD
|
||||
ld [wJoyIgnore], a
|
||||
xor a
|
||||
ld [wPlayerMovingDirection], a
|
||||
call UpdateSprites
|
||||
call UpdateSprites
|
||||
ld hl, Data_f2505
|
||||
ld hl, PikachuMovement_Confused
|
||||
call ApplyPikachuMovementData
|
||||
ld a, $f ; pikachu
|
||||
ld [wEmotionBubbleSpriteIndex], a
|
||||
@@ -122,35 +122,35 @@ Func_f24d5::
|
||||
callfar InitializePikachuTextID
|
||||
ret
|
||||
|
||||
Data_f2505:
|
||||
db $00
|
||||
db $20
|
||||
db $20
|
||||
db $20
|
||||
db $1e
|
||||
db $3f
|
||||
PikachuMovement_Confused:
|
||||
db PIKAMOVEMENT_DELAY
|
||||
db PIKAMOVEMENT_STEP_RIGHT
|
||||
db PIKAMOVEMENT_STEP_RIGHT
|
||||
db PIKAMOVEMENT_STEP_RIGHT
|
||||
db PIKAMOVEMENT_STEP_UP
|
||||
db PIKAMOVEMENT_END
|
||||
|
||||
Func_f250b::
|
||||
ld hl, Data_f251c
|
||||
BillsHousePikachuWatchPlayer::
|
||||
ld hl, PikachuMovement_WatchPlayer1
|
||||
ld b, SPRITE_FACING_UP
|
||||
call TryApplyPikachuMovementData
|
||||
ld hl, Data_f2521
|
||||
ld hl, PikachuMovement_WatchPlayer2
|
||||
ld b, SPRITE_FACING_RIGHT
|
||||
call TryApplyPikachuMovementData
|
||||
ret
|
||||
|
||||
Data_f251c:
|
||||
db $00
|
||||
db $1f
|
||||
db $1d
|
||||
db $38
|
||||
db $3f
|
||||
PikachuMovement_WatchPlayer1:
|
||||
db PIKAMOVEMENT_DELAY
|
||||
db PIKAMOVEMENT_STEP_LEFT
|
||||
db PIKAMOVEMENT_STEP_DOWN
|
||||
db PIKAMOVEMENT_LOOK_RIGHT
|
||||
db PIKAMOVEMENT_END
|
||||
|
||||
Data_f2521:
|
||||
db $00
|
||||
db $1e
|
||||
db $1f
|
||||
db $1f
|
||||
db $1d
|
||||
db $38
|
||||
db $3f
|
||||
PikachuMovement_WatchPlayer2:
|
||||
db PIKAMOVEMENT_DELAY
|
||||
db PIKAMOVEMENT_STEP_UP
|
||||
db PIKAMOVEMENT_STEP_LEFT
|
||||
db PIKAMOVEMENT_STEP_LEFT
|
||||
db PIKAMOVEMENT_STEP_DOWN
|
||||
db PIKAMOVEMENT_LOOK_RIGHT
|
||||
db PIKAMOVEMENT_END
|
||||
|
||||
@@ -104,7 +104,7 @@ PikachuMovementData_74f9e:
|
||||
db $3f
|
||||
|
||||
CinnabarGymScript_74fa3:
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 7, a
|
||||
ret z
|
||||
push hl
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
MtMoonB2FScript_ApplyPikachuMovementData:
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 7, a
|
||||
ret z
|
||||
ld a, [wWalkBikeSurfState]
|
||||
|
||||
@@ -30,7 +30,7 @@ Museum2FBrunetteGirlText:
|
||||
|
||||
Museum2FHikerText:
|
||||
text_asm
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 7, a
|
||||
jr nz, .asm_5c1f6
|
||||
ld hl, Museum2FText_5c20e
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
PewterCity_Script:
|
||||
call EnableAutoTextBoxDrawing
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
res 7, [hl]
|
||||
ld hl, PewterCity_ScriptPointers
|
||||
ld a, [wPewterCityCurScript]
|
||||
|
||||
@@ -189,7 +189,7 @@ PewterGymGuideText:
|
||||
ld a, [wCurrentMenuItem]
|
||||
and a
|
||||
jr nz, .PewterGymGuideBeginAdviceText
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 7, a
|
||||
jp nz, .asm_5c3fa
|
||||
ld hl, PewterGymGuideBeginAdviceText
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PewterPokecenter_Script:
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
set 7, [hl]
|
||||
call Serial_TryEstablishingExternallyClockedConnection
|
||||
call EnableAutoTextBoxDrawing
|
||||
|
||||
@@ -59,7 +59,7 @@ PewterJigglypuff::
|
||||
ld c, 48
|
||||
call DelayFrames
|
||||
call PlayDefaultMusic
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 7, a
|
||||
ret z
|
||||
callfar CheckPikachuStatusCondition
|
||||
|
||||
@@ -11,18 +11,18 @@ PokemonFanClub_ScriptPointers:
|
||||
dw_const PokemonFanClubScript1, SCRIPT_POKEMONFANCLUB_SCRIPT1
|
||||
|
||||
PokemonFanClubScript0:
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
bit 7, [hl]
|
||||
call z, PokemonFanClubScript_59a44
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
set 7, [hl]
|
||||
ret
|
||||
|
||||
PokemonFanClubScript1:
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
bit 7, [hl]
|
||||
call z, PokemonFanClubScript_59a39
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
set 7, [hl]
|
||||
ret
|
||||
|
||||
@@ -34,7 +34,7 @@ PokemonFanClubScript_59a39:
|
||||
ret
|
||||
|
||||
PokemonFanClubScript_59a44:
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 7, a
|
||||
ret z
|
||||
callfar CheckPikachuStatusCondition
|
||||
|
||||
@@ -9,7 +9,7 @@ Route25_Script:
|
||||
ret
|
||||
|
||||
Route25ToggleBillsScript:
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
res 2, [hl]
|
||||
res 3, [hl]
|
||||
res 4, [hl]
|
||||
|
||||
@@ -13,7 +13,7 @@ SummerBeachHouse_TextPointers:
|
||||
|
||||
SummerBeachHouseSurfinDudeText:
|
||||
text_asm
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
vc_patch Bypass_need_Pikachu_with_Surf_for_minigame
|
||||
IF DEF (_YELLOW_VC)
|
||||
bit 7, a
|
||||
@@ -26,7 +26,7 @@ ENDC
|
||||
call PrintText
|
||||
jr .done
|
||||
.next
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
bit 0, [hl]
|
||||
set 0, [hl]
|
||||
jr nz, .next2
|
||||
@@ -43,7 +43,7 @@ ENDC
|
||||
ld a, 1
|
||||
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
||||
farcall SurfingPikachuMinigame
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
set 1, [hl]
|
||||
jr .done
|
||||
.asm_f226b
|
||||
@@ -81,7 +81,7 @@ SummerBeachHousePikachuText:
|
||||
SummerBeachHousePoster1Text:
|
||||
text_asm
|
||||
ld hl, .SummerBeachHousePoster1Text2
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 6, a
|
||||
jr z, .next
|
||||
ld hl, .SummerBeachHousePoster1Text1
|
||||
@@ -99,7 +99,7 @@ SummerBeachHousePoster1Text:
|
||||
SummerBeachHousePoster2Text:
|
||||
text_asm
|
||||
ld hl, .SummerBeachHousePoster2Text2
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 6, a
|
||||
jr z, .next
|
||||
ld hl, .SummerBeachHousePoster2Text1
|
||||
@@ -117,7 +117,7 @@ SummerBeachHousePoster2Text:
|
||||
SummerBeachHousePoster3Text:
|
||||
text_asm
|
||||
ld hl, .SummerBeachHousePoster3Text2
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
bit 6, a
|
||||
jr z, .next
|
||||
ld hl, .SummerBeachHousePoster3Text1
|
||||
@@ -136,7 +136,7 @@ SummerBeachHousePrinterText:
|
||||
text_asm
|
||||
ld a, 1
|
||||
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
||||
ld a, [wd471]
|
||||
ld a, [wPikachuSpawnStateFlags]
|
||||
vc_patch Bypass_need_Pikachu_with_Surf_for_high_score
|
||||
IF DEF(_YELLOW_VC)
|
||||
bit 7, a
|
||||
@@ -146,7 +146,7 @@ ENDC
|
||||
vc_patch_end
|
||||
jr z, .asm_f2369
|
||||
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
bit 1, [hl]
|
||||
jr z, .next2
|
||||
ld a, 0
|
||||
@@ -154,7 +154,7 @@ ENDC
|
||||
.next2
|
||||
ld hl, .SummerBeachHousePrinterText2
|
||||
call PrintText
|
||||
ld a, [wd492]
|
||||
ld a, [wPikachuMapScriptFlags]
|
||||
bit 1, a
|
||||
jr z, .asm_f236f
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
VermilionCity_Script:
|
||||
call EnableAutoTextBoxDrawing
|
||||
ld hl, wd492
|
||||
ld hl, wPikachuMapScriptFlags
|
||||
res 7, [hl]
|
||||
ld hl, wCurrentMapScriptFlags
|
||||
bit BIT_CUR_MAP_LOADED_2, [hl]
|
||||
|
||||
0
tools/unnamed.py
Executable file → Normal file
0
tools/unnamed.py
Executable file → Normal file
Reference in New Issue
Block a user