mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-21 22:52:15 +13:00
Split up engine/events/hidden_object_functions
This commit is contained in:
parent
6bd86e10c3
commit
e882708b85
29 changed files with 1174 additions and 1173 deletions
48
engine/events/hidden_objects/gym_statues.asm
Normal file
48
engine/events/hidden_objects/gym_statues.asm
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
GymStatues:
|
||||
; if in a gym and have the corresponding badge, a = GymStatueText2_id and jp PrintPredefTextID
|
||||
; if in a gym and don’t have the corresponding badge, a = GymStatueText1_id and jp PrintPredefTextID
|
||||
; else ret
|
||||
call EnableAutoTextBoxDrawing
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
ld hl, .BadgeFlags
|
||||
ld a, [wCurMap]
|
||||
ld b, a
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp $ff
|
||||
ret z
|
||||
cp b
|
||||
jr z, .match
|
||||
inc hl
|
||||
jr .loop
|
||||
.match
|
||||
ld b, [hl]
|
||||
ld a, [wBeatGymFlags]
|
||||
and b
|
||||
cp b
|
||||
tx_pre_id GymStatueText2
|
||||
jr z, .haveBadge
|
||||
tx_pre_id GymStatueText1
|
||||
.haveBadge
|
||||
jp PrintPredefTextID
|
||||
|
||||
.BadgeFlags:
|
||||
db PEWTER_GYM, %00000001
|
||||
db CERULEAN_GYM, %00000010
|
||||
db VERMILION_GYM,%00000100
|
||||
db CELADON_GYM, %00001000
|
||||
db FUCHSIA_GYM, %00010000
|
||||
db SAFFRON_GYM, %00100000
|
||||
db CINNABAR_GYM, %01000000
|
||||
db VIRIDIAN_GYM, %10000000
|
||||
db $ff
|
||||
|
||||
GymStatueText1::
|
||||
TX_FAR _GymStatueText1
|
||||
db "@"
|
||||
|
||||
GymStatueText2::
|
||||
TX_FAR _GymStatueText2
|
||||
db "@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue