projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Add AO_STACK_CANARY to detect stack overflows sometimes
[fw/altos]
/
src
/
draw
/
ao_copy.c
diff --git
a/src/draw/ao_copy.c
b/src/draw/ao_copy.c
index 0e822932d652ebb7315214b92de829c8ad42ab0a..a506aed7737b203fefe17e919e0fe89bf0eddeb8 100644
(file)
--- a/
src/draw/ao_copy.c
+++ b/
src/draw/ao_copy.c
@@
-12,16
+12,16
@@
* General Public License for more details.
*/
* General Public License for more details.
*/
-#include
"ao_draw.h"
-#include
"ao_draw_int.h"
+#include
<ao_draw.h>
+#include
<ao_draw_int.h>
#define bound(val,max,other) do { \
if (val < 0) { \
#define bound(val,max,other) do { \
if (val < 0) { \
- other
-= val;
\
+ other
+= (typeof(other)) (-val);
\
val = 0; \
} \
if (val > max) { \
val = 0; \
} \
if (val > max) { \
- other -= (val - max); \
+ other -= (
typeof(other)) (
val - max); \
val = max; \
} \
} while (0)
val = max; \
} \
} while (0)
@@
-32,7
+32,7
@@
} while (0)
void
} while (0)
void
-ao_copy(
const struct ao_bitmap
*dst,
+ao_copy(
struct ao_bitmap
*dst,
int16_t dst_x,
int16_t dst_y,
int16_t width,
int16_t dst_x,
int16_t dst_y,
int16_t width,
@@
-57,6
+57,8
@@
ao_copy(const struct ao_bitmap *dst,
upsidedown = (dst_y > src_y);
}
upsidedown = (dst_y > src_y);
}
+ ao_damage(dst, dst_x, dst_y, dst_x2, dst_y2);
+
if (dst_x < dst_x2 && dst_y < dst_y2) {
ao_blt(src->base + src_y * src->stride,
src->stride,
if (dst_x < dst_x2 && dst_y < dst_y2) {
ao_blt(src->base + src_y * src->stride,
src->stride,