From 65ade039ecf14033ec114de0697ccb8cfa987673 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 22 Apr 2005 01:38:27 +0000 Subject: o Fix save/load. Now it restores game properly but still at exit #0. o Proper background for inset rooms. Crowd is gone now. o Draw black border around inset rooms. svn-id: r17744 --- saga/gfx.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'saga/gfx.cpp') diff --git a/saga/gfx.cpp b/saga/gfx.cpp index 450284b89d..072205f456 100644 --- a/saga/gfx.cpp +++ b/saga/gfx.cpp @@ -87,7 +87,7 @@ int drawPalette(SURFACE *dst_s) { pal_rect.left = (x * 8) + 4; pal_rect.right = pal_rect.left + 8; - drawRect(dst_s, &pal_rect, color); + drawRect(dst_s, pal_rect, color); color++; } } @@ -355,20 +355,15 @@ int bufToBuffer(byte *dst_buf, int dst_w, int dst_h, const byte *src, // Fills a rectangle in the surface ds from point 'p1' to point 'p2' using // the specified color. -int drawRect(SURFACE *ds, const Rect *dst_rect, int color) { - Rect r(ds->w, ds->h); +int drawRect(SURFACE *ds, Rect &dst_rect, int color) { + dst_rect.clip(ds->w, ds->h); - if (dst_rect != NULL) { - r = *dst_rect; - r.clip(ds->w, ds->h); - - if (!r.isValidRect()) { - // Empty or negative region - return FAILURE; - } + if (!dst_rect.isValidRect()) { + // Empty or negative region + return FAILURE; } - ds->fillRect(r, color); + ds->fillRect(dst_rect, color); return SUCCESS; } -- cgit v1.2.3