Define more bit flag constants

This commit is contained in:
Rangi 2018-01-26 12:27:02 -05:00
parent f1366d615f
commit 3332305bb4
3 changed files with 11 additions and 6 deletions

View File

@ -52,6 +52,11 @@ FIXED_FACING EQU 2
SLIDING EQU 3
EMOTE_OBJECT EQU 7
; object_struct OBJECT_FLAGS2 bit flags
LOW_PRIORITY EQU 0
HIGH_PRIORITY EQU 1
OVERHEAD EQU 3
; map_object struct members (see macros/wram.asm)
const_def

View File

@ -233,7 +233,7 @@ Function462a: ; 462a
UpdateTallGrassFlags: ; 463f
ld hl, OBJECT_FLAGS2
add hl, bc
bit 3, [hl] ; is current tile grass?
bit OVERHEAD, [hl]
jr z, .ok
ld hl, OBJECT_NEXT_TILE
add hl, bc
@ -260,13 +260,13 @@ SetTallGrassFlags: ; 4661
.set
ld hl, OBJECT_FLAGS2
add hl, bc
set 3, [hl]
set OVERHEAD, [hl]
ret
.reset
ld hl, OBJECT_FLAGS2
add hl, bc
res 3, [hl]
res OVERHEAD, [hl]
ret
; 4679
@ -2918,10 +2918,10 @@ InitSprites: ; 5991
ld e, PRIORITY_LOW
ld hl, OBJECT_FLAGS2
add hl, bc
bit 0, [hl]
bit LOW_PRIORITY, [hl]
jr nz, .add
ld e, PRIORITY_NORM
bit 1, [hl]
bit HIGH_PRIORITY, [hl]
jr z, .add
ld e, PRIORITY_HIGH
jr .add

View File

@ -838,7 +838,7 @@ JumpStep: ; 548a
ld hl, OBJECT_FLAGS2
add hl, bc
res 3, [hl]
res OVERHEAD, [hl]
ld hl, OBJECT_ACTION
add hl, bc