mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-11-14 00:56:40 +13:00
Merge pull request #236 from mattbruv/vermilion
label hardcoded HRAM address, start documenting Vermilion
This commit is contained in:
commit
2e44e4562f
BIN
pokered.sn1
Normal file
BIN
pokered.sn1
Normal file
Binary file not shown.
|
|
@ -4,23 +4,23 @@ VermilionCity_Script:
|
||||||
bit 6, [hl]
|
bit 6, [hl]
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
push hl
|
push hl
|
||||||
call nz, VermilionCityScript_197cb
|
call nz, .initCityScript
|
||||||
pop hl
|
pop hl
|
||||||
bit 5, [hl]
|
bit 5, [hl]
|
||||||
res 5, [hl]
|
res 5, [hl]
|
||||||
call nz, VermilionCityScript_197c0
|
call nz, .setFirstLockTrashCanIndex
|
||||||
ld hl, VermilionCity_ScriptPointers
|
ld hl, VermilionCity_ScriptPointers
|
||||||
ld a, [wVermilionCityCurScript]
|
ld a, [wVermilionCityCurScript]
|
||||||
jp CallFunctionInTable
|
jp CallFunctionInTable
|
||||||
|
|
||||||
VermilionCityScript_197c0:
|
.setFirstLockTrashCanIndex
|
||||||
call Random
|
call Random
|
||||||
ld a, [$ffd4]
|
ld a, [hRandomSub]
|
||||||
and $e
|
and $e
|
||||||
ld [wFirstLockTrashCanIndex], a
|
ld [wFirstLockTrashCanIndex], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
VermilionCityScript_197cb:
|
.initCityScript
|
||||||
CheckEventHL EVENT_SS_ANNE_LEFT
|
CheckEventHL EVENT_SS_ANNE_LEFT
|
||||||
ret z
|
ret z
|
||||||
CheckEventReuseHL EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT
|
CheckEventReuseHL EVENT_WALKED_PAST_GUARD_AFTER_SS_ANNE_LEFT
|
||||||
|
|
@ -41,7 +41,7 @@ VermilionCityScript0:
|
||||||
ld a, [wSpriteStateData1 + 9]
|
ld a, [wSpriteStateData1 + 9]
|
||||||
and a ; cp SPRITE_FACING_DOWN
|
and a ; cp SPRITE_FACING_DOWN
|
||||||
ret nz
|
ret nz
|
||||||
ld hl, CoordsData_19823
|
ld hl, SSAnneTicketCheckCoords
|
||||||
call ArePlayerCoordsInArray
|
call ArePlayerCoordsInArray
|
||||||
ret nc
|
ret nc
|
||||||
xor a
|
xor a
|
||||||
|
|
@ -51,13 +51,13 @@ VermilionCityScript0:
|
||||||
ld [hSpriteIndexOrTextID], a
|
ld [hSpriteIndexOrTextID], a
|
||||||
call DisplayTextID
|
call DisplayTextID
|
||||||
CheckEvent EVENT_SS_ANNE_LEFT
|
CheckEvent EVENT_SS_ANNE_LEFT
|
||||||
jr nz, .asm_19810
|
jr nz, .shipHasDeparted
|
||||||
ld b, S_S_TICKET
|
ld b, S_S_TICKET
|
||||||
predef GetQuantityOfItemInBag
|
predef GetQuantityOfItemInBag
|
||||||
ld a, b
|
ld a, b
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
.asm_19810
|
.shipHasDeparted
|
||||||
ld a, D_UP
|
ld a, D_UP
|
||||||
ld [wSimulatedJoypadStatesEnd], a
|
ld [wSimulatedJoypadStatesEnd], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
|
|
@ -67,12 +67,12 @@ VermilionCityScript0:
|
||||||
ld [wVermilionCityCurScript], a
|
ld [wVermilionCityCurScript], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CoordsData_19823:
|
SSAnneTicketCheckCoords:
|
||||||
db $1e,$12
|
db $1e,$12 ; y, x
|
||||||
db $ff
|
db $ff
|
||||||
|
|
||||||
VermilionCityScript4:
|
VermilionCityScript4:
|
||||||
ld hl, CoordsData_19823
|
ld hl, SSAnneTicketCheckCoords
|
||||||
call ArePlayerCoordsInArray
|
call ArePlayerCoordsInArray
|
||||||
ret c
|
ret c
|
||||||
ld a, $0
|
ld a, $0
|
||||||
|
|
@ -135,64 +135,64 @@ VermilionCityText1:
|
||||||
VermilionCityText2:
|
VermilionCityText2:
|
||||||
TX_ASM
|
TX_ASM
|
||||||
CheckEvent EVENT_SS_ANNE_LEFT
|
CheckEvent EVENT_SS_ANNE_LEFT
|
||||||
jr nz, .asm_1989e
|
jr nz, .shipHasDeparted
|
||||||
ld hl, VermilionCityText_198a7
|
ld hl, VermilionCityTextDidYouSee
|
||||||
call PrintText
|
call PrintText
|
||||||
jr .asm_198a4
|
jr .end
|
||||||
.asm_1989e
|
.shipHasDeparted
|
||||||
ld hl, VermilionCityText_198ac
|
ld hl, VermilionCityTextSSAnneDeparted
|
||||||
call PrintText
|
call PrintText
|
||||||
.asm_198a4
|
.end
|
||||||
jp TextScriptEnd
|
jp TextScriptEnd
|
||||||
|
|
||||||
VermilionCityText_198a7:
|
VermilionCityTextDidYouSee:
|
||||||
TX_FAR _VermilionCityText_198a7
|
TX_FAR _VermilionCityTextDidYouSee
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
VermilionCityText_198ac:
|
VermilionCityTextSSAnneDeparted:
|
||||||
TX_FAR _VermilionCityText_198ac
|
TX_FAR _VermilionCityTextSSAnneDeparted
|
||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
VermilionCityText3:
|
VermilionCityText3:
|
||||||
TX_ASM
|
TX_ASM
|
||||||
CheckEvent EVENT_SS_ANNE_LEFT
|
CheckEvent EVENT_SS_ANNE_LEFT
|
||||||
jr nz, .asm_198f6
|
jr nz, .shipHasDeparted
|
||||||
ld a, [wSpriteStateData1 + 9]
|
ld a, [wSpriteStateData1 + 9]
|
||||||
cp SPRITE_FACING_RIGHT
|
cp SPRITE_FACING_RIGHT
|
||||||
jr z, .asm_198c8
|
jr z, .greetPlayer
|
||||||
ld hl, VermilionCityCoords1
|
ld hl, .inFrontOfOrBehindGuardCoords
|
||||||
call ArePlayerCoordsInArray
|
call ArePlayerCoordsInArray
|
||||||
jr nc, .asm_198d0
|
jr nc, .greetPlayerAndCheckTicket
|
||||||
.asm_198c8
|
.greetPlayer
|
||||||
ld hl, SSAnneWelcomeText4
|
ld hl, SSAnneWelcomeText4
|
||||||
call PrintText
|
call PrintText
|
||||||
jr .asm_198fc
|
jr .end
|
||||||
.asm_198d0
|
.greetPlayerAndCheckTicket
|
||||||
ld hl, SSAnneWelcomeText9
|
ld hl, SSAnneWelcomeText9
|
||||||
call PrintText
|
call PrintText
|
||||||
ld b, S_S_TICKET
|
ld b, S_S_TICKET
|
||||||
predef GetQuantityOfItemInBag
|
predef GetQuantityOfItemInBag
|
||||||
ld a, b
|
ld a, b
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_198e9
|
jr nz, .playerHasTicket
|
||||||
ld hl, SSAnneNoTicketText
|
ld hl, SSAnneNoTicketText
|
||||||
call PrintText
|
call PrintText
|
||||||
jr .asm_198fc
|
jr .end
|
||||||
.asm_198e9
|
.playerHasTicket
|
||||||
ld hl, SSAnneFlashedTicketText
|
ld hl, SSAnneFlashedTicketText
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wVermilionCityCurScript], a
|
ld [wVermilionCityCurScript], a
|
||||||
jr .asm_198fc
|
jr .end
|
||||||
.asm_198f6
|
.shipHasDeparted
|
||||||
ld hl, SSAnneNotHereText
|
ld hl, SSAnneNotHereText
|
||||||
call PrintText
|
call PrintText
|
||||||
.asm_198fc
|
.end
|
||||||
jp TextScriptEnd
|
jp TextScriptEnd
|
||||||
|
|
||||||
VermilionCityCoords1:
|
.inFrontOfOrBehindGuardCoords
|
||||||
db $1d,$13
|
db $1d,$13 ; y, x of tile in front of guard
|
||||||
db $1f,$13
|
db $1f,$13 ; y, x of tile behind guard
|
||||||
db $ff
|
db $ff
|
||||||
|
|
||||||
SSAnneWelcomeText4:
|
SSAnneWelcomeText4:
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@ _VermilionCityText1::
|
||||||
cont "toxic sludge!"
|
cont "toxic sludge!"
|
||||||
done
|
done
|
||||||
|
|
||||||
_VermilionCityText_198a7::
|
_VermilionCityTextDidYouSee::
|
||||||
text "Did you see S.S."
|
text "Did you see S.S."
|
||||||
line "ANNE moored in"
|
line "ANNE moored in"
|
||||||
cont "the harbor?"
|
cont "the harbor?"
|
||||||
done
|
done
|
||||||
|
|
||||||
_VermilionCityText_198ac::
|
_VermilionCityTextSSAnneDeparted::
|
||||||
text "So, S.S.ANNE has"
|
text "So, S.S.ANNE has"
|
||||||
line "departed!"
|
line "departed!"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue