summaryrefslogtreecommitdiff
path: root/bpp.s
diff options
context:
space:
mode:
Diffstat (limited to 'bpp.s')
-rw-r--r--bpp.s17
1 files changed, 17 insertions, 0 deletions
diff --git a/bpp.s b/bpp.s
new file mode 100644
index 0000000..e775e97
--- /dev/null
+++ b/bpp.s
@@ -0,0 +1,17 @@
+.ifndef __BPP__
+.equ __BPP__, 1
+
+.ifndef BYTES_PER_PIXEL
+ .error "BYTES_PER_PIXEL not defined"
+.else
+ .if BYTES_PER_PIXEL == 4
+ .equ BPP_SHIFT, 2
+ .equ FULLBPP, 1
+ .elseif BYTES_PER_PIXEL == 2
+ .equ BPP_SHIFT, 1
+ .else
+ .error "BYTES_PER_PIXEL must be 2 or 4"
+ .endif
+.endif
+
+.endif