From: Eleni Maria Stea Date: Fri, 22 Feb 2013 18:14:28 +0000 (+0200) Subject: *in progress* X-Git-Url: http://git.mutantstargoat.com?p=winnie;a=commitdiff_plain;h=4047a2dc058e7e54e4ff95311fb556ae8eeeedb9 *in progress* some minor fixes --- diff --git a/src/geom.h b/src/geom.h index 8b596ce..9c00b41 100644 --- a/src/geom.h +++ b/src/geom.h @@ -2,7 +2,7 @@ #define GEOM_H_ struct Rect { - mutable int x, y; + int x, y; int width, height; }; diff --git a/src/gfx.cc b/src/gfx.cc index 45c918b..7d3595c 100644 --- a/src/gfx.cc +++ b/src/gfx.cc @@ -92,17 +92,19 @@ void clear_screen(int r, int g, int b) void fill_rect(const Rect &rect, int r, int g, int b) { - if(rect.x < 0) { - rect.x = 0; + Rect drect = rect; + + if(drect.x < 0) { + drect.x = 0; } - if(rect.y < 0) { - rect.y = 0; + if(drect.y < 0) { + drect.y = 0; } - unsigned char *fb = framebuffer + (rect.x + screen_rect.width * rect.y) * 4; - for(int i=0; i windows; - std::list frames; std::list dirty_rects;