mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Define more bit flag constants
This commit is contained in:
parent
f1366d615f
commit
3332305bb4
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user