mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00

oh my god plague thank you for figuring this out this took me like 2 months to get working properly
66 lines
1.1 KiB
NASM
66 lines
1.1 KiB
NASM
SilphCo1F_Script:
|
|
call EnableAutoTextBoxDrawing
|
|
ld hl, SilphCo1F_ScriptPointers
|
|
ld a, [wSilphCo1FCurScript]
|
|
jp CallFunctionInTable
|
|
|
|
SilphCo1F_ScriptPointers:
|
|
dw SilphCo1FScript0
|
|
dw SilphCo1FScript1
|
|
|
|
SilphCo1FScript0:
|
|
ld b, SILPHLETTER
|
|
call IsItemInBag
|
|
ret nz
|
|
ld a, [wYCoord]
|
|
cp 3
|
|
ret nz
|
|
ld a, [wXCoord]
|
|
cp 15
|
|
ret nz
|
|
ld a, PLAYER_DIR_LEFT
|
|
ld [wPlayerMovingDirection], a
|
|
ld a, $3
|
|
ldh [hSpriteIndexOrTextID], a
|
|
call DisplayTextID
|
|
xor a
|
|
ldh [hJoyHeld], a
|
|
ld a, $1
|
|
ld [wSimulatedJoypadStatesIndex], a
|
|
ld a, D_DOWN
|
|
ld [wSimulatedJoypadStatesEnd], a
|
|
call StartSimulatingJoypadStates
|
|
xor a
|
|
ld [wSpritePlayerStateData1FacingDirection], a
|
|
ld [wJoyIgnore], a
|
|
ld a, $1
|
|
ld [wSilphCo1FCurScript], a
|
|
ret
|
|
|
|
SilphCo1FScript1:
|
|
ld a, [wSimulatedJoypadStatesIndex]
|
|
and a
|
|
ret nz
|
|
call Delay3
|
|
ld a, $0
|
|
ld [wSilphCo1FCurScript], a
|
|
ret
|
|
|
|
SilphCo1F_TextPointers:
|
|
dw SilphCo1Text1
|
|
dw SilphCo1Text2
|
|
dw SilphCo1Text3
|
|
|
|
SilphCo1Text1:
|
|
text_far _SilphCo1Text1
|
|
text_end
|
|
|
|
SilphCo1Text2:
|
|
text_far _SilphCo1Text2
|
|
text_end
|
|
|
|
SilphCo1Text3:
|
|
text_far _SilphCo1Text3
|
|
text_end
|
|
|