projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos]
/
src
/
draw
/
ao_draw_int.h
diff --git
a/src/draw/ao_draw_int.h
b/src/draw/ao_draw_int.h
index f353526d338be7558909cce1f2ec416eba7283f3..cd7be34eb5e8b427e5d9c4c10b9965e726161337 100644
(file)
--- a/
src/draw/ao_draw_int.h
+++ b/
src/draw/ao_draw_int.h
@@
-94,6
+94,18
@@
ao_bits_mask(int16_t x, int16_t w) {
} \
} while (0)
} \
} while (0)
+static inline int16_t
+ao_min16(int16_t a, int16_t b)
+{
+ return a < b ? a : b;
+}
+
+static inline int16_t
+ao_max16(int16_t a, int16_t b)
+{
+ return a > b ? a : b;
+}
+
static inline uint32_t
ao_do_mask_rrop(uint32_t dst, uint32_t and, uint32_t xor, uint32_t mask) {
return (dst & (and | ~mask)) ^ (xor & mask);
static inline uint32_t
ao_do_mask_rrop(uint32_t dst, uint32_t and, uint32_t xor, uint32_t mask) {
return (dst & (and | ~mask)) ^ (xor & mask);
@@
-104,6
+116,16
@@
ao_do_rrop(uint32_t dst, uint32_t and, uint32_t xor) {
return (dst & and) ^ xor;
}
return (dst & and) ^ xor;
}
+static inline void
+ao_damage(struct ao_bitmap *dst,
+ int16_t x1,
+ int16_t y1,
+ int16_t x2,
+ int16_t y2)
+{
+ ao_box_union(&dst->damage, x1, y1, x2, y2);
+}
+
void
ao_blt(uint32_t *src_line,
int16_t src_stride,
void
ao_blt(uint32_t *src_line,
int16_t src_stride,