Merge pull request #39 from jojo-kep/master

attempt to band-aide missable objects not hiding properly
This commit is contained in:
Martha Schilling 2024-01-11 12:20:20 +00:00 committed by GitHub
commit e699a3db4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,8 +142,21 @@ HideObject:
ld c, a ld c, a
ld b, FLAG_SET ld b, FLAG_SET
call MissableObjectFlagAction ; set "removed" flag call MissableObjectFlagAction ; set "removed" flag
call VerifyObjectState
jr z, HideObject
jp UpdateSprites jp UpdateSprites
;returns z flag set if shown and z flag cleared if hidden
VerifyObjectState:
ld hl, wMissableObjectFlags
ld a, [wMissableObjectIndex]
ld c, a
ld b, FLAG_TEST
call MissableObjectFlagAction
ld a, c
and a
ret
MissableObjectFlagAction: MissableObjectFlagAction:
; identical to FlagAction ; identical to FlagAction