diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm index 191b3af9c..6b9d3cacf 100644 --- a/constants/map_object_constants.asm +++ b/constants/map_object_constants.asm @@ -58,10 +58,12 @@ EMOTE_OBJECT EQU 1 << EMOTE_OBJECT_F LOW_PRIORITY_F EQU 0 HIGH_PRIORITY_F EQU 1 OVERHEAD_F EQU 3 +USE_OBP1_F EQU 4 LOW_PRIORITY EQU 1 << LOW_PRIORITY_F HIGH_PRIORITY EQU 1 << HIGH_PRIORITY_F OVERHEAD EQU 1 << OVERHEAD_F +USE_OBP1 EQU 1 << USE_OBP1_F ; object_struct OBJECT_PALETTE bit flags SWIMMING_F EQU 5 diff --git a/data/sprites/map_objects.asm b/data/sprites/map_objects.asm index ad712b967..c6070272b 100644 --- a/data/sprites/map_objects.asm +++ b/data/sprites/map_objects.asm @@ -198,7 +198,7 @@ SpriteMovementData:: ; 4273 db DOWN ; facing db OBJECT_ACTION_STAND ; action db 1 << 1 | FIXED_FACING | SLIDING | 1 << 5 ; flags1 - db 1 << 4 ; flags2 + db USE_OBP1 ; flags2 db 0 ; palette flags ; SPRITEMOVEDATA_STRENGTH_BOULDER diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm index 74b82880d..765f3f93c 100644 --- a/engine/overworld/map_objects.asm +++ b/engine/overworld/map_objects.asm @@ -2973,35 +2973,35 @@ InitSprites: ; 5991 ld hl, OBJECT_SPRITE_TILE add hl, bc ld a, [hl] - and %01111111 + and $ff ^ (1 << 7) ld [hFFC1], a xor a bit 7, [hl] jr nz, .skip1 - or %00001000 + or VRAM_BANK_1 .skip1 ld hl, OBJECT_FLAGS2 add hl, bc ld e, [hl] bit 7, e jr z, .skip2 - or %10000000 + or PRIORITY .skip2 - bit 4, e + bit USE_OBP1_F, e jr z, .skip3 - or %00010000 + or OBP_NUM .skip3 ld hl, OBJECT_PALETTE add hl, bc ld d, a ld a, [hl] - and %00000111 + and PALETTE_MASK or d ld d, a xor a - bit 3, e + bit OVERHEAD_F, e jr z, .skip4 - or %10000000 + or PRIORITY .skip4 ld [hFFC2], a ld hl, OBJECT_SPRITE_X