aboutsummaryrefslogtreecommitdiff
path: root/saga/gfx.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2005-04-22 01:38:27 +0000
committerEugene Sandulenko2005-04-22 01:38:27 +0000
commit65ade039ecf14033ec114de0697ccb8cfa987673 (patch)
tree763ea04c183ef35282cabcca0b6954594987df83 /saga/gfx.cpp
parenta81fbc04d996152399857dd01e70dfb78d4d1f02 (diff)
downloadscummvm-rg350-65ade039ecf14033ec114de0697ccb8cfa987673.tar.gz
scummvm-rg350-65ade039ecf14033ec114de0697ccb8cfa987673.tar.bz2
scummvm-rg350-65ade039ecf14033ec114de0697ccb8cfa987673.zip
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
Diffstat (limited to 'saga/gfx.cpp')
-rw-r--r--saga/gfx.cpp19
1 files changed, 7 insertions, 12 deletions
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;
}