[Scummvm-cvs-logs] SF.net SVN: scummvm: [28541] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Aug 12 11:10:10 CEST 2007
Revision: 28541
http://scummvm.svn.sourceforge.net/scummvm/?rev=28541&view=rev
Author: peres001
Date: 2007-08-12 02:10:10 -0700 (Sun, 12 Aug 2007)
Log Message:
-----------
Moved intro hack routines to Parallaction_ns callables, where they belonged from the beginning.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/callables_ns.cpp
scummvm/trunk/engines/parallaction/graphics.cpp
scummvm/trunk/engines/parallaction/graphics.h
Modified: scummvm/trunk/engines/parallaction/callables_ns.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/callables_ns.cpp 2007-08-12 08:47:45 UTC (rev 28540)
+++ scummvm/trunk/engines/parallaction/callables_ns.cpp 2007-08-12 09:10:10 UTC (rev 28541)
@@ -329,7 +329,8 @@
void Parallaction_ns::_c_setMask(void *parm) {
- _gfx->intGrottaHackMask();
+ memset(_backgroundInfo->mask.data + 3600, 0, 3600);
+ _gfx->_bgLayers[1] = 500;
return;
}
@@ -583,7 +584,13 @@
}
void zeroMask(int x, int y, int color, void *data) {
- _vm->_gfx->zeroMaskValue(x, y, color);
+ //_vm->_gfx->zeroMaskValue(x, y, color);
+
+ BackgroundInfo* info = (BackgroundInfo*)data;
+
+ uint16 _ax = x + y * info->width;
+ info->mask.data[_ax >> 2] &= ~(3 << ((_ax & 3) << 1));
+
}
void Parallaction_ns::_c_sketch(void *parm) {
@@ -596,7 +603,7 @@
uint16 oldy = _rightHandPositions[2*(index-1)+1];
uint16 oldx = _rightHandPositions[2*(index-1)];
- Graphics::drawLine(oldx, oldy, newx, newy, 0, zeroMask, NULL);
+ Graphics::drawLine(oldx, oldy, newx, newy, 0, zeroMask, _backgroundInfo);
_rightHandAnim->_left = newx;
_rightHandAnim->_top = newy - 20;
@@ -618,8 +625,13 @@
_rightHandAnim->_top
);
- _gfx->fillMaskRect(r, 0);
+ uint16 _di = r.left/4 + r.top * _backgroundInfo->mask.internalWidth;
+ for (uint16 _si = r.top; _si < r.bottom; _si++) {
+ memset(_backgroundInfo->mask.data + _di, 0, r.width()/4+1);
+ _di += _backgroundInfo->mask.internalWidth;
+ }
+
return;
}
Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp 2007-08-12 08:47:45 UTC (rev 28540)
+++ scummvm/trunk/engines/parallaction/graphics.cpp 2007-08-12 09:10:10 UTC (rev 28541)
@@ -730,37 +730,7 @@
return;
}
-/*
- the following 3 routines are hacks for Nippon Safes coming from the original code,
- so they shouldn't be modified when adding support for other games
-*/
-void Gfx::zeroMaskValue(uint16 x, uint16 y, byte color) {
-
- uint16 _ax = x + y * _backgroundWidth;
- _depthMask->data[_ax >> 2] &= ~(3 << ((_ax & 3) << 1));
-
- return;
-}
-void Gfx::fillMaskRect(const Common::Rect& r, byte color) {
-
- uint16 _di = r.left/4 + r.top * _depthMask->internalWidth;
-
- for (uint16 _si = r.top; _si < r.bottom; _si++) {
- memset(_depthMask->data + _di, color, r.width()/4+1);
- _di += _depthMask->internalWidth;
- }
-
- return;
-
-}
-void Gfx::intGrottaHackMask() {
- memset(_depthMask->data + 3600, 0, 3600);
- _bgLayers[1] = 500;
- return;
-}
-
-
int16 Gfx::queryMask(int16 v) {
for (uint16 _si = 0; _si < 3; _si++) {
Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h 2007-08-12 08:47:45 UTC (rev 28540)
+++ scummvm/trunk/engines/parallaction/graphics.h 2007-08-12 09:10:10 UTC (rev 28541)
@@ -202,10 +202,6 @@
void backupGetBackground(GetData *data, int16 x, int16 y);
void restoreGetBackground(const Common::Rect& r, byte *data);
- // hacks for Nippon Safes
- void intGrottaHackMask();
- void fillMaskRect(const Common::Rect& r, byte color);
- void zeroMaskValue(uint16 x, uint16 y, byte color);
// low level surfaces
void clearScreen(Gfx::Buffers buffer);
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