Object masks

This commit is contained in:
PikalaxALT
2015-11-01 21:17:46 -05:00
parent 6b2d0ae841
commit 76e2ea534f
5 changed files with 30 additions and 29 deletions

View File

@@ -1170,33 +1170,33 @@ CoordinatesEventText:: ; 2702
; 2707
Function2707:: ; 2707
CheckObjectMask:: ; 2707
ld a, [hMapObjectIndexBuffer1]
ld e, a
ld d, $0
ld hl, wd81e
ld hl, wObjectMasks
add hl, de
ld a, [hl]
ret
; 2712
Function2712:: ; 2712
MaskObject:: ; 2712
ld a, [hMapObjectIndexBuffer1]
ld e, a
ld d, $0
ld hl, wd81e
ld hl, wObjectMasks
add hl, de
ld [hl], $ff
ld [hl], -1 ; ,masked
ret
; 271e
Function271e:: ; 271e
UnmaskObject:: ; 271e
ld a, [hMapObjectIndexBuffer1]
ld e, a
ld d, $0
ld hl, wd81e
ld hl, wObjectMasks
add hl, de
ld [hl], $0
ld [hl], 0 ; unmasked
ret
; 272a

View File

@@ -251,7 +251,7 @@ Function18de:: ; 18de
ret
; 18f5
Function18f5:: ; 18f5
CheckObjectTime:: ; 18f5
ld hl, MAPOBJECT_HOUR
add hl, bc
ld a, [hl]
@@ -336,7 +336,7 @@ Function194d:: ; 194d
_CopyObjectStruct:: ; 1956
ld [hMapObjectIndexBuffer1], a
call Function271e
call UnmaskObject
ld a, [hMapObjectIndexBuffer1]
call GetMapObject
callba CopyObjectStruct
@@ -378,7 +378,7 @@ Function1985:: ; 1985
DeleteObjectStruct:: ; 199f
call Function1967
call Function2712
call MaskObject
ret
; 19a6