[Scummvm-cvs-logs] SF.net SVN: scummvm: [26126] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Tue Mar 13 21:47:59 CET 2007
Revision: 26126
http://scummvm.svn.sourceforge.net/scummvm/?rev=26126&view=rev
Author: peres001
Date: 2007-03-13 13:47:59 -0700 (Tue, 13 Mar 2007)
Log Message:
-----------
removed special case of Graphics::copyRect in favor of more general code
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/graphics.cpp
scummvm/trunk/engines/parallaction/graphics.h
scummvm/trunk/engines/parallaction/inventory.cpp
Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp 2007-03-13 20:47:11 UTC (rev 26125)
+++ scummvm/trunk/engines/parallaction/graphics.cpp 2007-03-13 20:47:59 UTC (rev 26126)
@@ -310,7 +310,7 @@
return;
}
-
+/*
void Gfx::copyRect(Gfx::Buffers srcbuffer, uint16 sx, uint16 sy, Gfx::Buffers dstbuffer, uint16 dx, uint16 dy, uint16 w, uint16 h) {
byte *s = _buffers[srcbuffer] + (sx + sy * SCREEN_WIDTH);
@@ -328,8 +328,8 @@
return;
}
+*/
-
void Gfx::floodFill(byte color, uint16 left, uint16 top, uint16 right, uint16 bottom, Gfx::Buffers buffer) {
// printf("Gfx::floodFill(%i, %i, %i, %i, %i)\n", color, left, top, right, bottom);
@@ -794,7 +794,6 @@
void Gfx::restoreBackground(const Common::Rect& r) {
-// printf("restoreBackground(%i, %i, %i, %i)\n", left, top, width, height);
int16 left = r.left;
int16 top = r.top;
@@ -810,7 +809,12 @@
if (left+width >= SCREEN_WIDTH) width = SCREEN_WIDTH - left;
if (top+height >= SCREEN_HEIGHT) height = SCREEN_HEIGHT - top;
- copyRect(kBit2, left, top, kBitBack, left, top, width, height);
+ copyRect(
+ kBitBack,
+ left, top, width, height,
+ _buffers[kBit2] + left + top * SCREEN_WIDTH,
+ SCREEN_WIDTH
+ );
return;
}
Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h 2007-03-13 20:47:11 UTC (rev 26125)
+++ scummvm/trunk/engines/parallaction/graphics.h 2007-03-13 20:47:59 UTC (rev 26126)
@@ -112,7 +112,6 @@
void updateScreen();
void clearScreen(Gfx::Buffers buffer);
void copyScreen(Gfx::Buffers srcbuffer, Gfx::Buffers dstbuffer);
- void copyRect(Gfx::Buffers srcbuffer, uint16 sx, uint16 sy, Gfx::Buffers dstbuffer, uint16 dx, uint16 dy, uint16 w, uint16 h);
void copyRect(Gfx::Buffers dstbuffer, uint16 x, uint16 y, uint16 w, uint16 h, byte *src, uint16 pitch);
void grabRect(Gfx::Buffers srcbuffer, byte *dst, uint16 x, uint16 y, uint16 w, uint16 h, uint16 pitch);
void drawBorder(Gfx::Buffers buffer, uint16 x, uint16 y, uint16 w, uint16 h, byte color);
Modified: scummvm/trunk/engines/parallaction/inventory.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/inventory.cpp 2007-03-13 20:47:11 UTC (rev 26125)
+++ scummvm/trunk/engines/parallaction/inventory.cpp 2007-03-13 20:47:59 UTC (rev 26126)
@@ -297,17 +297,11 @@
_engineFlags &= ~kEngineMouse;
}
- _vm->_gfx->copyRect(
- Gfx::kBit2,
- _invPosition._x,
- _invPosition._y,
- Gfx::kBitBack,
- _invPosition._x,
- _invPosition._y,
- INVENTORY_WIDTH,
- _numInvLines * INVENTORYITEM_HEIGHT
- );
+ Common::Rect r(INVENTORY_WIDTH, _numInvLines * INVENTORYITEM_HEIGHT);
+ r.moveTo(_invPosition._x, _invPosition._y);
+ _vm->_gfx->restoreBackground(r);
+
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list