projects
/
gbajam22
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
destroy enemies, increment counters, detect victory
[gbajam22]
/
src
/
util.h
diff --git
a/src/util.h
b/src/util.h
index
6902d64
..
264367b
100644
(file)
--- a/
src/util.h
+++ b/
src/util.h
@@
-6,7
+6,9
@@
#include "gba.h"
#define RGB555(r, g, b) \
- (((r) >> 3) | (((g) << 2) & 0x3e0) | (((b) << 7) & 0x7c00))
+ ((((uint16_t)(r) >> 3) & 0x1f) | \
+ (((uint16_t)(g) << 2) & 0x3e0) | \
+ (((uint16_t)(b) << 7) & 0x7c00))
#ifdef BUILD_GBA