[Scummvm-cvs-logs] CVS: scummvm/scumm script_v2.cpp,2.89,2.90 scummvm.cpp,2.169,2.170 scumm.h,1.203,1.204
James Brown
ender at users.sourceforge.net
Wed May 21 00:23:08 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv21934/scumm
Modified Files:
script_v2.cpp scummvm.cpp scumm.h
Log Message:
Fix this damn userface stuff properly :)
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v2.cpp,v
retrieving revision 2.89
retrieving revision 2.90
diff -u -d -r2.89 -r2.90
--- script_v2.cpp 21 May 2003 06:18:30 -0000 2.89
+++ script_v2.cpp 21 May 2003 07:22:43 -0000 2.90
@@ -877,7 +877,7 @@
static char sentence[80];
int slot = getVerbSlot(_scummVars[VAR_SENTENCE_VERB],0);
- if (_userPut < 1)
+ if (!(_userState & 32))
return;
strcpy(sentence, (char*)getResourceAddress(rtVerb, slot));
@@ -1189,7 +1189,7 @@
// FIXME: Ender Quick Hack to allow further Zak testing.
// In reality, we should probably stuff the inventory into verbs
// as later games do. Easier hotspot tracking :)
- if (_userPut < 1)
+ if (!(_userState & 64))
return;
{
int i, items = 0, curInventoryCount = 0;
@@ -1271,24 +1271,18 @@
runHook(0);
}
-void Scumm_v2::o2_cursorCommand() {
+void Scumm_v2::o2_cursorCommand() { // TODO: Define the magic numbers
int cmd = getVarOrDirectWord(0x80);
int a2 = cmd >> 8;
- if (cmd & 0xFF) {
+ if (cmd & 0xFF) { // (?)
_scummVars[21] = cmd & 0xFF;
printf("Set cmd %d\n", cmd & 0xFF);
}
- if (a2 & 4) {
- if (a2 & 32) {
- _userPut = 1;
- printf("sentence\n");
- } else
- _userPut = 0;
-
- warning("TODO: o2_cursorCommand(userface) -> %d", _userPut);
- } // Toggle verbs on/off, etc
+ if (a2 & 4) { // Userface
+ _userState = a2 & (32 | 64 | 128);
+ }
if (a2 & 1) { // Freeze
if (a2 & 8)
@@ -1298,11 +1292,14 @@
}
if (a2 & 2) { // Cursor Show/Hide
- if (a2 & 16)
+ if (a2 & 16) {
+ _userPut = 1;
_cursor.state = 1;
- else
+ } else {
+ _userPut = 0;
_cursor.state = 0;
-
+ }
+
verbMouseOver(0);
}
}
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scummvm.cpp,v
retrieving revision 2.169
retrieving revision 2.170
diff -u -d -r2.169 -r2.170
--- scummvm.cpp 20 May 2003 20:58:26 -0000 2.169
+++ scummvm.cpp 21 May 2003 07:22:43 -0000 2.170
@@ -260,6 +260,7 @@
memset(&_objectIDMap,0,sizeof(ObjectIDMap));
_numObjectsInRoom = 0;
_userPut = 0;
+ _userState = 0;
_resourceHeaderSize = 0;
_saveLoadFlag = 0;
_saveLoadSlot = 0;
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -d -r1.203 -r1.204
--- scumm.h 20 May 2003 20:58:25 -0000 1.203
+++ scumm.h 21 May 2003 07:22:43 -0000 1.204
@@ -697,6 +697,7 @@
uint16 _verbMouseOver;
int _inventoryOffset;
int8 _userPut;
+ uint16 _userState;
void redrawVerbs();
void checkExecVerbs();
More information about the Scummvm-git-logs
mailing list