[Scummvm-cvs-logs] SF.net SVN: scummvm:[39222] scummvm/trunk/engines/agos
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Sun Mar 8 14:18:08 CET 2009
Revision: 39222
http://scummvm.svn.sourceforge.net/scummvm/?rev=39222&view=rev
Author: Kirben
Date: 2009-03-08 13:18:07 +0000 (Sun, 08 Mar 2009)
Log Message:
-----------
Cleanup.
Modified Paths:
--------------
scummvm/trunk/engines/agos/agos.cpp
scummvm/trunk/engines/agos/agos.h
scummvm/trunk/engines/agos/cursor.cpp
scummvm/trunk/engines/agos/verb.cpp
scummvm/trunk/engines/agos/vga.cpp
scummvm/trunk/engines/agos/vga_pn.cpp
scummvm/trunk/engines/agos/vga_s2.cpp
Modified: scummvm/trunk/engines/agos/agos.cpp
===================================================================
--- scummvm/trunk/engines/agos/agos.cpp 2009-03-08 13:11:06 UTC (rev 39221)
+++ scummvm/trunk/engines/agos/agos.cpp 2009-03-08 13:18:07 UTC (rev 39222)
@@ -291,7 +291,6 @@
_initMouse = 0;
_leftButtonDown = 0;
- _mouseDown = 0;
_rightButtonDown = 0;
_clickOnly = 0;
_oneClick = 0;
Modified: scummvm/trunk/engines/agos/agos.h
===================================================================
--- scummvm/trunk/engines/agos/agos.h 2009-03-08 13:11:06 UTC (rev 39221)
+++ scummvm/trunk/engines/agos/agos.h 2009-03-08 13:18:07 UTC (rev 39222)
@@ -409,11 +409,10 @@
uint16 _mouseHideCount;
bool _mouseToggle;
- byte _leftButtonDown;
+ byte _leftButtonDown, _rightButtonDown;
byte _leftButton, _leftButtonCount, _leftButtonOld;
- byte _mouseDown;
- byte _rightButtonDown;
- bool _clickOnly, _oneClick;
+ byte _oneClick;
+ bool _clickOnly;
bool _leftClick, _rightClick;
bool _noRightClick;
Modified: scummvm/trunk/engines/agos/cursor.cpp
===================================================================
--- scummvm/trunk/engines/agos/cursor.cpp 2009-03-08 13:11:06 UTC (rev 39221)
+++ scummvm/trunk/engines/agos/cursor.cpp 2009-03-08 13:18:07 UTC (rev 39222)
@@ -497,7 +497,7 @@
} else {
_hitCalled = 1;
}
- _mouseDown = 0;
+ _dragCount = 0;
}
if (_rightClick == true) {
@@ -510,9 +510,9 @@
_needHitAreaRecalc++;
if (_leftButton != 0) {
- if (_mouseDown <= 20) {
- _mouseDown++;
- if (_mouseDown > 20) {
+ if (_dragCount <= 20) {
+ _dragCount++;
+ if (_dragCount > 20) {
if (_videoLockOut & 0x10) {
if (_oneClick == 0)
_hitCalled = 3;
Modified: scummvm/trunk/engines/agos/verb.cpp
===================================================================
--- scummvm/trunk/engines/agos/verb.cpp 2009-03-08 13:11:06 UTC (rev 39221)
+++ scummvm/trunk/engines/agos/verb.cpp 2009-03-08 13:18:07 UTC (rev 39222)
@@ -1112,7 +1112,7 @@
_dragFlag = 0;
_hitCalled = 0;
_oneClick = 0;
- _mouseDown = 0;
+ _dragCount = 0;
_needHitAreaRecalc++;
if (ha != 0) {
if (ha->flags & kOBFInventoryBox)
Modified: scummvm/trunk/engines/agos/vga.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga.cpp 2009-03-08 13:11:06 UTC (rev 39221)
+++ scummvm/trunk/engines/agos/vga.cpp 2009-03-08 13:18:07 UTC (rev 39222)
@@ -177,27 +177,6 @@
}
}
-bool AGOSEngine_PN::ifObjectHere(uint16 a) {
- if (getFeatures() & GF_DEMO)
- return 0;
- else
- return _variableArray[39] == getptr(_quickptr[11] + a * _quickshort[4] + 2);
-}
-
-bool AGOSEngine_PN::ifObjectAt(uint16 a, uint16 b) {
- if (getFeatures() & GF_DEMO)
- return 0;
- else
- return b == getptr(_quickptr[11] + a * _quickshort[4] + 2);
-}
-
-bool AGOSEngine_PN::ifObjectState(uint16 a, int16 b) {
- if (getFeatures() & GF_DEMO)
- return 0;
- else
- return b == getptr(_quickptr[0] + a * _quickshort[0] + 2);
-}
-
bool AGOSEngine::ifObjectHere(uint16 a) {
Item *item;
@@ -1247,38 +1226,6 @@
}
}
-void AGOSEngine_PN::clearVideoWindow(uint16 num, uint16 color) {
- const uint16 *vlut = &_videoWindows[num * 4];
- uint16 xoffs = vlut[0] * 16;
- uint16 yoffs = vlut[1];
-
- Graphics::Surface *screen = _system->lockScreen();
- byte *dst = (byte *)screen->pixels + xoffs + yoffs * screen->pitch;
- for (uint h = 0; h < vlut[3]; h++) {
- memset(dst, color, vlut[2] * 16);
- dst += screen->pitch;
- }
- _system->unlockScreen();
-}
-
-void AGOSEngine_Simon2::clearVideoWindow(uint16 num, uint16 color) {
- const uint16 *vlut = &_videoWindows[num * 4];
-
- uint16 xoffs = vlut[0] * 16;
- uint16 yoffs = vlut[1];
- uint16 dstWidth = _videoWindows[18] * 16;
- byte *dst = _window4BackScn + xoffs + yoffs * dstWidth;
-
- setMoveRect(0, 0, vlut[2] * 16, vlut[3]);
-
- for (uint h = 0; h < vlut[3]; h++) {
- memset(dst, color, vlut[2] * 16);
- dst += dstWidth;
- }
-
- _window4Flag = 1;
-}
-
void AGOSEngine::clearVideoWindow(uint16 num, uint16 color) {
if (getGameType() == GType_ELVIRA1) {
if (num == 2 || num == 6)
Modified: scummvm/trunk/engines/agos/vga_pn.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_pn.cpp 2009-03-08 13:11:06 UTC (rev 39221)
+++ scummvm/trunk/engines/agos/vga_pn.cpp 2009-03-08 13:18:07 UTC (rev 39222)
@@ -88,6 +88,27 @@
op[55] = &AGOSEngine::vc55_scanFlag;
}
+bool AGOSEngine_PN::ifObjectHere(uint16 a) {
+ if (getFeatures() & GF_DEMO)
+ return 0;
+ else
+ return _variableArray[39] == getptr(_quickptr[11] + a * _quickshort[4] + 2);
+}
+
+bool AGOSEngine_PN::ifObjectAt(uint16 a, uint16 b) {
+ if (getFeatures() & GF_DEMO)
+ return 0;
+ else
+ return b == getptr(_quickptr[11] + a * _quickshort[4] + 2);
+}
+
+bool AGOSEngine_PN::ifObjectState(uint16 a, int16 b) {
+ if (getFeatures() & GF_DEMO)
+ return 0;
+ else
+ return b == getptr(_quickptr[0] + a * _quickshort[0] + 2);
+}
+
void AGOSEngine::vc36_pause() {
const char *message1 = "Press any key to continue";
bool oldWiped = _wiped;
@@ -185,4 +206,18 @@
_scanFlag = 1;
}
+void AGOSEngine_PN::clearVideoWindow(uint16 num, uint16 color) {
+ const uint16 *vlut = &_videoWindows[num * 4];
+ uint16 xoffs = vlut[0] * 16;
+ uint16 yoffs = vlut[1];
+
+ Graphics::Surface *screen = _system->lockScreen();
+ byte *dst = (byte *)screen->pixels + xoffs + yoffs * screen->pitch;
+ for (uint h = 0; h < vlut[3]; h++) {
+ memset(dst, color, vlut[2] * 16);
+ dst += screen->pitch;
+ }
+ _system->unlockScreen();
+}
+
} // End of namespace AGOS
Modified: scummvm/trunk/engines/agos/vga_s2.cpp
===================================================================
--- scummvm/trunk/engines/agos/vga_s2.cpp 2009-03-08 13:11:06 UTC (rev 39221)
+++ scummvm/trunk/engines/agos/vga_s2.cpp 2009-03-08 13:18:07 UTC (rev 39222)
@@ -217,4 +217,22 @@
_marks &= ~(1 << vcReadNextWord());
}
+void AGOSEngine_Simon2::clearVideoWindow(uint16 num, uint16 color) {
+ const uint16 *vlut = &_videoWindows[num * 4];
+
+ uint16 xoffs = vlut[0] * 16;
+ uint16 yoffs = vlut[1];
+ uint16 dstWidth = _videoWindows[18] * 16;
+ byte *dst = _window4BackScn + xoffs + yoffs * dstWidth;
+
+ setMoveRect(0, 0, vlut[2] * 16, vlut[3]);
+
+ for (uint h = 0; h < vlut[3]; h++) {
+ memset(dst, color, vlut[2] * 16);
+ dst += dstWidth;
+ }
+
+ _window4Flag = 1;
+}
+
} // End of namespace AGOS
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