summaryrefslogtreecommitdiff
path: root/scripts/SilphCo7F.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
committerdannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
commit5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch)
treedde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /scripts/SilphCo7F.asm
parent53fcd05aa24693093d8af1dc8ec4fedd3957decc (diff)
Sync with pokered
Diffstat (limited to 'scripts/SilphCo7F.asm')
-rwxr-xr-xscripts/SilphCo7F.asm214
1 files changed, 93 insertions, 121 deletions
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