[Scummvm-cvs-logs] CVS: scummvm/scumm scummvm.cpp,2.274,2.275 verbs.cpp,1.61,1.62
Max Horn
fingolfin at users.sourceforge.net
Sat Jul 12 05:17:12 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv28724
Modified Files:
scummvm.cpp verbs.cpp
Log Message:
fix existing ego actor change detection code
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.274
retrieving revision 2.275
diff -u -d -r2.274 -r2.275
--- scummvm.cpp 12 Jul 2003 10:35:37 -0000 2.274
+++ scummvm.cpp 12 Jul 2003 12:16:16 -0000 2.275
@@ -1034,6 +1034,12 @@
_talkDelay = 0;
}
+ // Record the current ego actor before any scripts (including input scripts)
+ // get a chance to run.
+ int oldEgo = 0;
+ if (VAR_EGO != 0xFF)
+ oldEgo = VAR(VAR_EGO);
+
processKbd();
if (_features & GF_NEW_CAMERA) {
@@ -1135,11 +1141,6 @@
_lastSaveTime = _system->get_msecs();
}
- int oldEgo = 0;
-
- if (VAR_EGO != 0xFF)
- oldEgo = VAR(VAR_EGO);
-
if (_completeScreenRedraw) {
_completeScreenRedraw = false;
gdi.clearCharsetMask();
@@ -1221,8 +1222,9 @@
if (_version <= 2) {
if (oldEgo != VAR(VAR_EGO)) {
- // FIXME: Reset and redraw the sentence line
+ // FIXME/TODO: Reset and redraw the sentence line
oldEgo = VAR(VAR_EGO);
+ _inventoryOffset = 0; // TODO: Record the _inventoryOffset for each ego actor?
redrawV2Inventory();
}
checkV2MouseOver(_mouse);
Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- verbs.cpp 12 Jul 2003 10:19:18 -0000 1.61
+++ verbs.cpp 12 Jul 2003 12:16:17 -0000 1.62
@@ -27,8 +27,6 @@
#include "scumm.h"
#include "verbs.h"
-int egoVar; // TODO: Put this in V2 class?
-
enum {
kInventoryUpArrow = 4,
kInventoryDownArrow = 5,
@@ -158,11 +156,6 @@
if ((y < 34) || !(_mouseButStat & MBS_LEFT_CLICK))
return;
- if (_scummVars[VAR_EGO] != egoVar) {
- egoVar = _scummVars[VAR_EGO];
- _inventoryOffset = 0;
- }
-
if (v2_mouseover_boxes[kInventoryUpArrow].rect.contains(x, y)) {
_inventoryOffset -= 2;
if (_inventoryOffset < 0)
@@ -208,11 +201,6 @@
return;
_string[1].charset = 1;
-
- if (_scummVars[VAR_EGO] != egoVar) {
- egoVar = _scummVars[VAR_EGO];
- _inventoryOffset = 0;
- }
max_inv = getInventoryCount(_scummVars[VAR_EGO]) - _inventoryOffset;
if (max_inv > 4)
More information about the Scummvm-git-logs
mailing list