[Scummvm-cvs-logs] CVS: scummvm/queen command.cpp,1.39,1.40 input.cpp,1.14,1.15 logic.cpp,1.132,1.133 logic.h,1.88,1.89 walk.cpp,1.31,1.32 walk.h,1.16,1.17
Gregory Montoir
cyx at users.sourceforge.net
Fri Dec 12 12:27:02 CET 2003
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv4033/queen
Modified Files:
command.cpp input.cpp logic.cpp logic.h walk.cpp walk.h
Log Message:
cleanup
Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- command.cpp 12 Dec 2003 10:33:34 -0000 1.39
+++ command.cpp 12 Dec 2003 20:26:20 -0000 1.40
@@ -847,7 +847,7 @@
if (_selCmd.action == VERB_NONE) {
_vm->graphics()->textClear(CmdText::COMMAND_Y_POS, CmdText::COMMAND_Y_POS);
}
- _vm->walk()->moveJoe(0, _selPosX, _selPosY, false); // XXX inCutaway parameter
+ _vm->walk()->moveJoe(0, _selPosX, _selPosY, false);
return true;
}
// check to see if one of the objects is hidden
@@ -1501,7 +1501,7 @@
if (i <= 0) {
_curCmd.oldNoun = _curCmd.noun;
_vm->graphics()->textClear(CmdText::COMMAND_Y_POS, CmdText::COMMAND_Y_POS);
- if (_selCmd.defaultVerb != VERB_NONE) {
+ if (_selCmd.defaultVerb != VERB_NONE) {
_cmdText.displayTemp(INK_CMD_LOCK, true, _selCmd.defaultVerb);
}
else if (_curCmd.action != VERB_NONE) {
Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/input.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- input.cpp 1 Dec 2003 20:48:40 -0000 1.14
+++ input.cpp 12 Dec 2003 20:26:20 -0000 1.15
@@ -132,31 +132,31 @@
switch (_inKey) {
case KEY_SPACE:
- _keyVerb = Verb(VERB_SKIP_TEXT);
+ _keyVerb = VERB_SKIP_TEXT;
break;
case KEY_COMMA:
- _keyVerb = Verb(VERB_SCROLL_UP);
+ _keyVerb = VERB_SCROLL_UP;
break;
case KEY_DOT:
- _keyVerb = Verb(VERB_SCROLL_DOWN);
+ _keyVerb = VERB_SCROLL_DOWN;
break;
case KEY_DIGIT_1:
- _keyVerb = Verb(VERB_DIGIT_1);
+ _keyVerb = VERB_DIGIT_1;
break;
case KEY_DIGIT_2:
- _keyVerb = Verb(VERB_DIGIT_2);
+ _keyVerb = VERB_DIGIT_2;
break;
case KEY_DIGIT_3:
- _keyVerb = Verb(VERB_DIGIT_3);
+ _keyVerb = VERB_DIGIT_3;
break;
case KEY_DIGIT_4:
- _keyVerb = Verb(VERB_DIGIT_4);
+ _keyVerb = VERB_DIGIT_4;
break;
case KEY_ESCAPE:
@@ -174,12 +174,12 @@
case KEY_F1: // Use Journal
if (_cutawayRunning) {
if (_canQuit) {
- _keyVerb = Verb(VERB_USE_JOURNAL);
+ _keyVerb = VERB_USE_JOURNAL;
_cutawayQuit = _talkQuit = true;
}
}
else {
- _keyVerb = Verb(VERB_USE_JOURNAL);
+ _keyVerb = VERB_USE_JOURNAL;
if (_canQuit)
_talkQuit = true;
}
@@ -195,21 +195,21 @@
default:
if(_inKey == _currentCommandKeys[0])
- _keyVerb = Verb(VERB_OPEN);
+ _keyVerb = VERB_OPEN;
else if(_inKey == _currentCommandKeys[1])
- _keyVerb = Verb(VERB_CLOSE);
+ _keyVerb = VERB_CLOSE;
else if(_inKey == _currentCommandKeys[2])
- _keyVerb = Verb(VERB_MOVE);
+ _keyVerb = VERB_MOVE;
else if(_inKey == _currentCommandKeys[3])
- _keyVerb = Verb(VERB_GIVE);
+ _keyVerb = VERB_GIVE;
else if(_inKey == _currentCommandKeys[4])
- _keyVerb = Verb(VERB_LOOK_AT);
+ _keyVerb = VERB_LOOK_AT;
else if(_inKey == _currentCommandKeys[5])
- _keyVerb = Verb(VERB_PICK_UP);
+ _keyVerb = VERB_PICK_UP;
else if(_inKey == _currentCommandKeys[6])
- _keyVerb = Verb(VERB_TALK_TO);
+ _keyVerb = VERB_TALK_TO;
else if(_inKey == _currentCommandKeys[7])
- _keyVerb = Verb(VERB_USE);
+ _keyVerb = VERB_USE;
break;
}
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- logic.cpp 12 Dec 2003 10:33:34 -0000 1.132
+++ logic.cpp 12 Dec 2003 20:26:20 -0000 1.133
@@ -41,25 +41,6 @@
namespace Queen {
-const Verb Logic::PANEL_VERBS[] = {
- VERB_NONE,
- VERB_OPEN,
- VERB_CLOSE,
- VERB_MOVE,
- VERB_GIVE,
- VERB_LOOK_AT,
- VERB_PICK_UP,
- VERB_TALK_TO,
- VERB_USE,
- VERB_SCROLL_UP,
- VERB_SCROLL_DOWN,
- VERB_DIGIT_1, // inventory item 1
- VERB_DIGIT_2, // inventory item 2
- VERB_DIGIT_3, // inventory item 3
- VERB_DIGIT_4, // inventory item 4
-};
-
-
Logic::Logic(QueenEngine *vm)
: _vm(vm) {
_joe.x = _joe.y = 0;
@@ -1789,8 +1770,24 @@
Verb Logic::findVerbUnderCursor(int16 cursorx, int16 cursory) const {
-
- return Verb(PANEL_VERBS[zoneIn(ZONE_PANEL, cursorx, cursory)]);
+ static const Verb pv[] = {
+ VERB_NONE,
+ VERB_OPEN,
+ VERB_CLOSE,
+ VERB_MOVE,
+ VERB_GIVE,
+ VERB_LOOK_AT,
+ VERB_PICK_UP,
+ VERB_TALK_TO,
+ VERB_USE,
+ VERB_SCROLL_UP,
+ VERB_SCROLL_DOWN,
+ VERB_INV_1,
+ VERB_INV_2,
+ VERB_INV_3,
+ VERB_INV_4,
+ };
+ return pv[zoneIn(ZONE_PANEL, cursorx, cursory)];
}
Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- logic.h 12 Dec 2003 10:33:34 -0000 1.88
+++ logic.h 12 Dec 2003 20:26:20 -0000 1.89
@@ -427,9 +427,6 @@
Debug *_dbg;
QueenEngine *_vm;
-
- //! Verbs (in order) available in panel
- static const Verb PANEL_VERBS[];
};
Index: walk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/walk.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- walk.cpp 11 Dec 2003 22:16:35 -0000 1.31
+++ walk.cpp 12 Dec 2003 20:26:20 -0000 1.32
@@ -298,11 +298,10 @@
int16 Walk::moveJoe(int direction, int16 endx, int16 endy, bool inCutaway) {
+ _joeInterrupted = false;
_joeMoveBlock = false;
int16 can = 0;
initWalkData();
-
- _joeInterrupted = false;
uint16 oldx = _vm->graphics()->bob(0)->x;
uint16 oldy = _vm->graphics()->bob(0)->y;
Index: walk.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/walk.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- walk.h 11 Dec 2003 22:16:35 -0000 1.16
+++ walk.h 12 Dec 2003 20:26:20 -0000 1.17
@@ -75,6 +75,7 @@
void stopJoe();
+
enum {
MAX_WALK_DATA = 16
};
@@ -122,12 +123,14 @@
uint16 _areaList[MAX_WALK_DATA];
uint16 _areaListCount;
+ //! set if stopJoe() is called
bool _joeInterrupted;
- //! set if customMoveJoe() is called in joeAnimate()
+ //! set if customMoveJoe() is called
bool _joeMoveBlock;
QueenEngine *_vm;
+
static const MovePersonData _moveData[];
};
More information about the Scummvm-git-logs
mailing list