summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2013-12-01 16:40:56 -0500
committeryenatch <yenatch@gmail.com>2013-12-01 16:40:56 -0500
commitc0e2170f01366bca77e35d562f9f98b3a560a82c (patch)
treec2f3114084a8191d21530a4e5c63e20fc2c8d54d
parente538027c822863e95004ef99c90b2c338b92184c (diff)
some oam constants
-rw-r--r--gbhw.asm9
-rw-r--r--main.asm6
2 files changed, 12 insertions, 3 deletions
diff --git a/gbhw.asm b/gbhw.asm
index 0f12e4842..a2156c5b8 100644
--- a/gbhw.asm
+++ b/gbhw.asm
@@ -28,6 +28,15 @@ TIMER EQU 2
SERIAL EQU 3
JOYPAD EQU 4
+; OAM attribute flags
+OAM_PALETTE EQU %111
+OAM_TILE_BANK EQU 3
+OAM_OBP_NUM EQU 4 ; Non CGB Mode Only
+OAM_X_FLIP EQU 5
+OAM_Y_FLIP EQU 6
+OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3)
+
+
; Hardware registers
rJOYP EQU $ff00 ; Joypad (R/W)
rSB EQU $ff01 ; Serial transfer data (R/W)
diff --git a/main.asm b/main.asm
index 3d7611c63..7fbfa5412 100644
--- a/main.asm
+++ b/main.asm
@@ -101,9 +101,9 @@ NUM_FACINGS EQU (FacingsEnd - Facings) / 2
; db y, x, attributes, tile index
; Attributes:
-X_FLIP EQU 1 << 5
-Y_FLIP EQU 1 << 6
-BEHIND_BG EQU 1 << 7
+X_FLIP EQU 1 << OAM_X_FLIP
+Y_FLIP EQU 1 << OAM_Y_FLIP
+BEHIND_BG EQU 1 << OAM_PRIORITY
Facing00: