mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
parent
d6820cdcbf
commit
d9db3d7495
|
@ -1,3 +1,6 @@
|
||||||
|
HIDE EQU $11
|
||||||
|
SHOW EQU $15
|
||||||
|
|
||||||
; this is a list of the sprites that can be enabled/disabled during the game
|
; this is a list of the sprites that can be enabled/disabled during the game
|
||||||
; sprites marked with an X are constants that are never used
|
; sprites marked with an X are constants that are never used
|
||||||
; because those sprites are not (de)activated in a map's script
|
; because those sprites are not (de)activated in a map's script
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -20,7 +20,7 @@ MarkTownVisitedAndLoadMissableObjects::
|
||||||
LoadMissableObjects:
|
LoadMissableObjects:
|
||||||
ld l, a
|
ld l, a
|
||||||
push hl
|
push hl
|
||||||
ld de, MapHS00 ; calculate difference between out pointer and the base pointer
|
ld de, MissableObjects ; calculate difference between out pointer and the base pointer
|
||||||
ld a, l
|
ld a, l
|
||||||
sub e
|
sub e
|
||||||
jr nc, .asm_f13c
|
jr nc, .asm_f13c
|
||||||
|
@ -49,7 +49,7 @@ LoadMissableObjects:
|
||||||
pop hl
|
pop hl
|
||||||
.writeMissableObjectsListLoop
|
.writeMissableObjectsListLoop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $ff
|
cp -1
|
||||||
jr z, .done ; end of list
|
jr z, .done ; end of list
|
||||||
cp b
|
cp b
|
||||||
jr nz, .done ; not for current map anymore
|
jr nz, .done ; not for current map anymore
|
||||||
|
@ -63,7 +63,7 @@ LoadMissableObjects:
|
||||||
inc de
|
inc de
|
||||||
jr .writeMissableObjectsListLoop
|
jr .writeMissableObjectsListLoop
|
||||||
.done
|
.done
|
||||||
ld a, $ff
|
ld a, -1
|
||||||
ld [de], a ; write sentinel
|
ld [de], a ; write sentinel
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -72,17 +72,17 @@ InitializeMissableObjectsFlags:
|
||||||
ld bc, wMissableObjectFlagsEnd - wMissableObjectFlags
|
ld bc, wMissableObjectFlagsEnd - wMissableObjectFlags
|
||||||
xor a
|
xor a
|
||||||
call FillMemory ; clear missable objects flags
|
call FillMemory ; clear missable objects flags
|
||||||
ld hl, MapHS00
|
ld hl, MissableObjects
|
||||||
xor a
|
xor a
|
||||||
ld [wMissableObjectCounter], a
|
ld [wMissableObjectCounter], a
|
||||||
.missableObjectsLoop
|
.missableObjectsLoop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $ff ; end of list
|
cp -1 ; end of list
|
||||||
ret z
|
ret z
|
||||||
push hl
|
push hl
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp Hide
|
cp HIDE
|
||||||
jr nz, .skip
|
jr nz, .skip
|
||||||
ld hl, wMissableObjectFlags
|
ld hl, wMissableObjectFlags
|
||||||
ld a, [wMissableObjectCounter]
|
ld a, [wMissableObjectCounter]
|
||||||
|
@ -105,7 +105,7 @@ IsObjectHidden:
|
||||||
ld hl, wMissableObjectList
|
ld hl, wMissableObjectList
|
||||||
.loop
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $ff
|
cp -1
|
||||||
jr z, .notHidden ; not missable -> not hidden
|
jr z, .notHidden ; not missable -> not hidden
|
||||||
cp b
|
cp b
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
|
|
Loading…
Reference in a new issue