[Scummvm-cvs-logs] CVS: scummvm/sword1 mouse.cpp,1.11,1.12 mouse.h,1.7,1.8
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Sun Dec 21 10:51:00 CET 2003
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1:/tmp/cvs-serv21334/sword1
Modified Files:
mouse.cpp mouse.h
Log Message:
fix mouse bugs (fixes chess puzzle)
Index: mouse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/mouse.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- mouse.cpp 21 Dec 2003 16:50:02 -0000 1.11
+++ mouse.cpp 21 Dec 2003 18:50:05 -0000 1.12
@@ -39,7 +39,7 @@
void SwordMouse::initialize(void) {
_numObjs = 0;
- _mouseStatus = 0; // mouse off and unlocked
+ SwordLogic::_scriptVars[MOUSE_STATUS] = 0; // mouse off and unlocked
_getOff = 0;
_specialPtrId = 0;
_inTopMenu = false;
@@ -99,7 +99,7 @@
_mouseX = x;
_mouseY = y;
- if (!(_mouseStatus & 1)) { // no human?
+ if (!(SwordLogic::_scriptVars[MOUSE_STATUS] & 1)) { // no human?
// if the mouse is turned off, I want the menu automatically removed,
// except while in conversation, while examining a menu object or while combining two menu objects!
/*if ((!subject_status)&&(!menu_looking)&&(!second_icon))
@@ -188,7 +188,7 @@
}
_frame = 0;
- if ((resId == 0) || (!(_mouseStatus & 1) && (!_mouseOverride))) {
+ if ((resId == 0) || (!(SwordLogic::_scriptVars[MOUSE_STATUS] & 1) && (!_mouseOverride))) {
_system->set_mouse_cursor(NULL, 0, 0, 0, 0);
_system->show_mouse(false);
} else {
@@ -206,7 +206,7 @@
void SwordMouse::animate(void) {
MousePtr *currentPtr;
- if ((_mouseStatus == 1) || _mouseOverride) {
+ if ((SwordLogic::_scriptVars[MOUSE_STATUS] == 1) || _mouseOverride) {
if (_specialPtrId)
currentPtr = _specialPtr;
else
@@ -219,18 +219,17 @@
}
void SwordMouse::fnNoHuman(void) {
- if (_mouseStatus & 2) // locked, can't do anything
+ if (SwordLogic::_scriptVars[MOUSE_STATUS] & 2) // locked, can't do anything
return ;
- _mouseStatus = 0; // off & unlocked
+ SwordLogic::_scriptVars[MOUSE_STATUS] = 0; // off & unlocked
setLuggage(0, 0);
setPointer(0, 0);
}
void SwordMouse::fnAddHuman(void) {
- if (_mouseStatus & 2) // locked, can't do anything
+ if (SwordLogic::_scriptVars[MOUSE_STATUS] & 2) // locked, can't do anything
return ;
- _mouseStatus = 1;
- // SwordLogic::_scriptVars[SPECIAL_ITEM] = -1;
+ SwordLogic::_scriptVars[MOUSE_STATUS] = 1;
SwordLogic::_scriptVars[SPECIAL_ITEM] = 0; // _scriptVars is unsigned...
_getOff = SCR_std_off;
setPointer(MSE_POINTER, 0);
@@ -247,11 +246,11 @@
}
void SwordMouse::fnLockMouse(void) {
- _mouseStatus |= 2;
+ SwordLogic::_scriptVars[MOUSE_STATUS] |= 2;
}
void SwordMouse::fnUnlockMouse(void) {
- _mouseStatus &= 1;
+ SwordLogic::_scriptVars[MOUSE_STATUS] &= 1;
}
void SwordMouse::giveCoords(uint16 *x, uint16 *y) {
Index: mouse.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/mouse.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- mouse.h 20 Dec 2003 17:55:09 -0000 1.7
+++ mouse.h 21 Dec 2003 18:50:05 -0000 1.8
@@ -95,7 +95,7 @@
uint16 _mouseX, _mouseY;
uint32 _currentPtrId, _frame;
- uint8 _mouseStatus, _mouseCount;
+ uint8 _mouseCount;
uint16 _numObjs;
uint16 _lastState, _state;
uint32 _getOff;
More information about the Scummvm-git-logs
mailing list