summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconstants/oam_constants.asm1
-rw-r--r--engine/gfx/sprite_oam.asm4
-rwxr-xr-xengine/movie/splash.asm8
-rwxr-xr-xengine/overworld/cut.asm4
-rwxr-xr-xengine/overworld/healing_machine.asm14
5 files changed, 16 insertions, 15 deletions
diff --git a/constants/oam_constants.asm b/constants/oam_constants.asm
index be63dc24..0b783d8b 100755
--- a/constants/oam_constants.asm
+++ b/constants/oam_constants.asm
@@ -11,6 +11,7 @@ OAM_Y_FLIP EQU 6
OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3)
; OAM attribute masks
+OAM_HIGH_PALS EQU 1 << 2 ; palettes %100-%111 are OBP1
OAM_OBP1 EQU 1 << OAM_OBP_NUM ; OBJ palette 1
OAM_HFLIP EQU 1 << OAM_X_FLIP ; horizontal flip
OAM_VFLIP EQU 1 << OAM_Y_FLIP ; vertical flip
diff --git a/engine/gfx/sprite_oam.asm b/engine/gfx/sprite_oam.asm
index 136e3afb..85db1b53 100644
--- a/engine/gfx/sprite_oam.asm
+++ b/engine/gfx/sprite_oam.asm
@@ -119,9 +119,9 @@ PrepareOAMData::
or [hl]
.skipPriority
and $f0
- bit 4, a ; OBP0 or OBP1
+ bit OAM_OBP_NUM, a
jr z, .spriteusesOBP0
- or %100 ; palettes 4-7 are OBP1
+ or OAM_HIGH_PALS
.spriteusesOBP0
ld [de], a
inc hl
diff --git a/engine/movie/splash.asm b/engine/movie/splash.asm
index 4cb0a59a..0b14dcaa 100755
--- a/engine/movie/splash.asm
+++ b/engine/movie/splash.asm
@@ -248,10 +248,10 @@ GameFreakLogoOAMData:
GameFreakLogoOAMDataEnd:
GameFreakShootingStarOAMData:
- dbsprite 20, 0, 0, 0, $a0, OAM_OBP1 | %100
- dbsprite 21, 0, 0, 0, $a0, OAM_OBP1 | OAM_HFLIP | %100
- dbsprite 20, 1, 0, 0, $a1, OAM_OBP1 | %100
- dbsprite 21, 1, 0, 0, $a1, OAM_OBP1 | OAM_HFLIP | %100
+ dbsprite 20, 0, 0, 0, $a0, OAM_OBP1 | OAM_HIGH_PALS
+ dbsprite 21, 0, 0, 0, $a0, OAM_OBP1 | OAM_HIGH_PALS | OAM_HFLIP
+ dbsprite 20, 1, 0, 0, $a1, OAM_OBP1 | OAM_HIGH_PALS
+ dbsprite 21, 1, 0, 0, $a1, OAM_OBP1 | OAM_HIGH_PALS | OAM_HFLIP
GameFreakShootingStarOAMDataEnd:
FallingStar:
diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm
index e36b8d88..564ad65a 100755
--- a/engine/overworld/cut.asm
+++ b/engine/overworld/cut.asm
@@ -124,8 +124,8 @@ WriteCutOrBoulderDustAnimationOAMBlock:
jp WriteOAMBlock
CutOrBoulderDustAnimationTilesAndAttributes:
- dbsprite 2, -1, 4, 4, $fd, OAM_OBP1 | %100
- dbsprite 2, -1, 4, 6, $ff, OAM_OBP1 | %100
+ dbsprite 2, -1, 4, 4, $fd, OAM_OBP1 | OAM_HIGH_PALS
+ dbsprite 2, -1, 4, 6, $ff, OAM_OBP1 | OAM_HIGH_PALS
GetCutOrBoulderDustAnimationOffsets:
ld hl, wSpritePlayerStateData1YPixels
diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm
index 84891353..a081811b 100755
--- a/engine/overworld/healing_machine.asm
+++ b/engine/overworld/healing_machine.asm
@@ -65,14 +65,14 @@ PokeCenterFlashingMonitorAndHealBall:
PokeCenterOAMData:
; heal machine monitor
- dbsprite 6, 4, 4, 4, $7c, OAM_OBP1 | %100
+ dbsprite 6, 4, 4, 4, $7c, OAM_OBP1 | OAM_HIGH_PALS
; poke balls 1-6
- dbsprite 6, 5, 0, 3, $7d, OAM_OBP1 | %100
- dbsprite 7, 5, 0, 3, $7d, OAM_OBP1 | OAM_HFLIP | %100
- dbsprite 6, 6, 0, 0, $7d, OAM_OBP1 | %100
- dbsprite 7, 6, 0, 0, $7d, OAM_OBP1 | OAM_HFLIP | %100
- dbsprite 6, 6, 0, 5, $7d, OAM_OBP1 | %100
- dbsprite 7, 6, 0, 5, $7d, OAM_OBP1 | OAM_HFLIP | %100
+ dbsprite 6, 5, 0, 3, $7d, OAM_OBP1 | OAM_HIGH_PALS
+ dbsprite 7, 5, 0, 3, $7d, OAM_OBP1 | OAM_HIGH_PALS | OAM_HFLIP
+ dbsprite 6, 6, 0, 0, $7d, OAM_OBP1 | OAM_HIGH_PALS
+ dbsprite 7, 6, 0, 0, $7d, OAM_OBP1 | OAM_HIGH_PALS | OAM_HFLIP
+ dbsprite 6, 6, 0, 5, $7d, OAM_OBP1 | OAM_HIGH_PALS
+ dbsprite 7, 6, 0, 5, $7d, OAM_OBP1 | OAM_HIGH_PALS | OAM_HFLIP
; d = value to xor with palette
FlashSprite8Times: