summaryrefslogtreecommitdiff
path: root/scripts/SilphCo11F.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/SilphCo11F.asm
parent53fcd05aa24693093d8af1dc8ec4fedd3957decc (diff)
Sync with pokered
Diffstat (limited to 'scripts/SilphCo11F.asm')
-rwxr-xr-xscripts/SilphCo11F.asm158
1 files changed, 75 insertions, 83 deletions
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