Identify USE_OBP1_F

This commit is contained in:
Rangi 2018-05-23 20:44:32 -04:00
parent 50ea6d6e22
commit 85f7328bf8
3 changed files with 11 additions and 9 deletions

View File

@ -58,10 +58,12 @@ EMOTE_OBJECT EQU 1 << EMOTE_OBJECT_F
LOW_PRIORITY_F EQU 0 LOW_PRIORITY_F EQU 0
HIGH_PRIORITY_F EQU 1 HIGH_PRIORITY_F EQU 1
OVERHEAD_F EQU 3 OVERHEAD_F EQU 3
USE_OBP1_F EQU 4
LOW_PRIORITY EQU 1 << LOW_PRIORITY_F LOW_PRIORITY EQU 1 << LOW_PRIORITY_F
HIGH_PRIORITY EQU 1 << HIGH_PRIORITY_F HIGH_PRIORITY EQU 1 << HIGH_PRIORITY_F
OVERHEAD EQU 1 << OVERHEAD_F OVERHEAD EQU 1 << OVERHEAD_F
USE_OBP1 EQU 1 << USE_OBP1_F
; object_struct OBJECT_PALETTE bit flags ; object_struct OBJECT_PALETTE bit flags
SWIMMING_F EQU 5 SWIMMING_F EQU 5

View File

@ -198,7 +198,7 @@ SpriteMovementData:: ; 4273
db DOWN ; facing db DOWN ; facing
db OBJECT_ACTION_STAND ; action db OBJECT_ACTION_STAND ; action
db 1 << 1 | FIXED_FACING | SLIDING | 1 << 5 ; flags1 db 1 << 1 | FIXED_FACING | SLIDING | 1 << 5 ; flags1
db 1 << 4 ; flags2 db USE_OBP1 ; flags2
db 0 ; palette flags db 0 ; palette flags
; SPRITEMOVEDATA_STRENGTH_BOULDER ; SPRITEMOVEDATA_STRENGTH_BOULDER

View File

@ -2973,35 +2973,35 @@ InitSprites: ; 5991
ld hl, OBJECT_SPRITE_TILE ld hl, OBJECT_SPRITE_TILE
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
and %01111111 and $ff ^ (1 << 7)
ld [hFFC1], a ld [hFFC1], a
xor a xor a
bit 7, [hl] bit 7, [hl]
jr nz, .skip1 jr nz, .skip1
or %00001000 or VRAM_BANK_1
.skip1 .skip1
ld hl, OBJECT_FLAGS2 ld hl, OBJECT_FLAGS2
add hl, bc add hl, bc
ld e, [hl] ld e, [hl]
bit 7, e bit 7, e
jr z, .skip2 jr z, .skip2
or %10000000 or PRIORITY
.skip2 .skip2
bit 4, e bit USE_OBP1_F, e
jr z, .skip3 jr z, .skip3
or %00010000 or OBP_NUM
.skip3 .skip3
ld hl, OBJECT_PALETTE ld hl, OBJECT_PALETTE
add hl, bc add hl, bc
ld d, a ld d, a
ld a, [hl] ld a, [hl]
and %00000111 and PALETTE_MASK
or d or d
ld d, a ld d, a
xor a xor a
bit 3, e bit OVERHEAD_F, e
jr z, .skip4 jr z, .skip4
or %10000000 or PRIORITY
.skip4 .skip4
ld [hFFC2], a ld [hFFC2], a
ld hl, OBJECT_SPRITE_X ld hl, OBJECT_SPRITE_X