mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-21 06:38:40 +13:00
why why why why why won't you work
I'm committing this for someone to have a look at my apparently-garbage code and figure out what I'm doing wrong because i CANNOT figure this out on my own
This commit is contained in:
parent
7c5c2a3047
commit
013dc271fb
4 changed files with 89 additions and 2 deletions
|
|
@ -7,10 +7,73 @@ SilphCo1F_Script:
|
|||
ld a, HS_SILPH_CO_1F_RECEPTIONIST
|
||||
ld [wMissableObjectIndex], a
|
||||
predef_jump ShowObject
|
||||
ld hl, SilphCo1F_ScriptPointers
|
||||
ld a, [wSilphCo1FCurScript]
|
||||
jp CallFunctionInTable
|
||||
|
||||
SilphCo1F_ScriptPointers:
|
||||
dw SilphCo1FScript0
|
||||
dw SilphCo1FScript1
|
||||
|
||||
SilphCo1FScript0:
|
||||
call SilphCo1FScript_CheckForLetter
|
||||
|
||||
SilphCo1FScript_CheckForLetter:
|
||||
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
|
||||
call SilphCo1FScript_ForceDown
|
||||
ld a, $1
|
||||
ld [wSilphCo1FCurScript], a
|
||||
ret
|
||||
|
||||
SilphCo1FScript_ForceDown:
|
||||
call StartSimulatingJoypadStates
|
||||
ld a, $1
|
||||
ld [wSimulatedJoypadStatesIndex], a
|
||||
ld a, D_DOWN
|
||||
ld [wSimulatedJoypadStatesEnd], a
|
||||
xor a
|
||||
ld [wSpritePlayerStateData1FacingDirection], a
|
||||
ld [wJoyIgnore], 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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue