summaryrefslogtreecommitdiff
path: root/bpp.s
diff options
context:
space:
mode:
authorMikhail Osipov <mike.osipov@gmail.com>2019-02-18 12:48:11 +0300
committerMikhail Osipov <mike.osipov@gmail.com>2019-02-18 12:48:11 +0300
commite0dd21d5405a2c0046cbf9818aaf7721cdc5a1d1 (patch)
treefad85287b09aa15e9ce7d4df47d34451beb0e981 /bpp.s
initial
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