[Scummvm-cvs-logs] CVS: scummvm/scumm input.cpp,2.26,2.27 intern.h,2.450,2.451 resource.cpp,1.318,1.319 scumm.cpp,1.450,1.451 scumm.h,1.595,1.596 verbs.cpp,1.129,1.130
Max Horn
fingolfin at users.sourceforge.net
Wed Apr 20 16:34:09 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/imuse_digi dimuse.cpp,1.125,1.126 dimuse.h,1.72,1.73 dimuse_music.cpp,1.36,1.37
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga interface.cpp,1.77,1.78 interface.h,1.41,1.42
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv613
Modified Files:
input.cpp intern.h resource.cpp scumm.cpp scumm.h verbs.cpp
Log Message:
Renamed _mouseButStat -> _mouseAndKeyboardStat (that's what it really is); moved _audioNames to class IMuseDigital
Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/input.cpp,v
retrieving revision 2.26
retrieving revision 2.27
diff -u -d -r2.26 -r2.27
--- input.cpp 20 Apr 2005 19:59:16 -0000 2.26
+++ input.cpp 20 Apr 2005 23:33:31 -0000 2.27
@@ -210,7 +210,7 @@
void ScummEngine::clearClickedStatus() {
_keyPressed = 0;
- _mouseButStat = 0;
+ _mouseAndKeyboardStat = 0;
_leftBtnPressed &= ~msClicked;
_rightBtnPressed &= ~msClicked;
}
@@ -251,15 +251,15 @@
//
// Determine the mouse button state.
//
- _mouseButStat = 0;
+ _mouseAndKeyboardStat = 0;
// Interpret 'return' as left click and 'tab' as right click
if (_lastKeyHit && _cursor.state > 0) {
if (_lastKeyHit == 9) {
- _mouseButStat = MBS_RIGHT_CLICK;
+ _mouseAndKeyboardStat = MBS_RIGHT_CLICK;
_lastKeyHit = 0;
} else if (_lastKeyHit == 13) {
- _mouseButStat = MBS_LEFT_CLICK;
+ _mouseAndKeyboardStat = MBS_LEFT_CLICK;
_lastKeyHit = 0;
}
}
@@ -269,19 +269,19 @@
// the cutscene exit key (i.e. ESC in most games). That mimicks
// the behaviour of the original engine where pressing both
// mouse buttons also skips the current cutscene.
- _mouseButStat = 0;
+ _mouseAndKeyboardStat = 0;
_lastKeyHit = (uint)VAR(VAR_CUTSCENEEXIT_KEY);
} else if (_rightBtnPressed & msClicked && (_version < 4 && _gameId != GID_LOOM)) {
// Pressing right mouse button is treated as if you pressed
// the cutscene exit key (i.e. ESC in most games). That mimicks
// the behaviour of the original engine where pressing right
// mouse button also skips the current cutscene.
- _mouseButStat = 0;
+ _mouseAndKeyboardStat = 0;
_lastKeyHit = (uint)VAR(VAR_CUTSCENEEXIT_KEY);
} else if (_leftBtnPressed & msClicked) {
- _mouseButStat = MBS_LEFT_CLICK;
+ _mouseAndKeyboardStat = MBS_LEFT_CLICK;
} else if (_rightBtnPressed & msClicked) {
- _mouseButStat = MBS_RIGHT_CLICK;
+ _mouseAndKeyboardStat = MBS_RIGHT_CLICK;
}
if (_version == 8) {
@@ -478,7 +478,7 @@
}
}
- _mouseButStat = _lastKeyHit;
+ _mouseAndKeyboardStat = _lastKeyHit;
}
} // End of namespace Scumm
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.450
retrieving revision 2.451
diff -u -d -r2.450 -r2.451
--- intern.h 20 Apr 2005 23:13:07 -0000 2.450
+++ intern.h 20 Apr 2005 23:33:31 -0000 2.451
@@ -1231,6 +1231,7 @@
virtual void readMAXS(int blockSize);
virtual void readGlobalObjects();
+ virtual void readIndexBlock(uint32 blocktype, uint32 itemsize);
virtual void setCameraAt(int pos_x, int pos_y);
virtual void setCameraFollows(Actor *a);
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.318
retrieving revision 1.319
diff -u -d -r1.318 -r1.319
--- resource.cpp 20 Apr 2005 18:20:58 -0000 1.318
+++ resource.cpp 20 Apr 2005 23:33:32 -0000 1.319
@@ -341,6 +341,23 @@
closeRoom();
}
+void ScummEngine_v7::readIndexBlock(uint32 blocktype, uint32 itemsize) {
+ int num;
+ char *ptr;
+ switch (blocktype) {
+ case MKID('ANAM'): // Used by: The Dig, FT
+ debug(9, "found ANAM block, reading audio names");
+ num = _fileHandle->readUint16LE();
+ ptr = (char*)malloc(num * 9);
+ _fileHandle->read(ptr, num * 9);
+ _imuseDigital->setAudioNames(num, ptr);
+ break;
+
+ default:
+ ScummEngine::readIndexBlock(blocktype, itemsize);
+ }
+}
+
void ScummEngine_v70he::readIndexBlock(uint32 blocktype, uint32 itemsize) {
int i;
switch (blocktype) {
@@ -421,13 +438,6 @@
readResTypeList(rtRoomImage, MKID('RMIM'), "room image");
break;
- case MKID('ANAM'): // Used by: The Dig, FT
- debug(9, "found ANAM block, reading audio names");
- _numAudioNames = _fileHandle->readUint16LE();
- _audioNames = (char*)malloc(_numAudioNames * 9);
- _fileHandle->read(_audioNames, _numAudioNames * 9);
- break;
-
case MKID('DIRR'):
case MKID('DROO'):
readResTypeList(rtRoom, MKID('ROOM'), "room");
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.450
retrieving revision 1.451
diff -u -d -r1.450 -r1.451
--- scumm.cpp 20 Apr 2005 23:13:08 -0000 1.450
+++ scumm.cpp 20 Apr 2005 23:33:32 -0000 1.451
@@ -755,8 +755,6 @@
_numTalkies = 0;
_numPalettes = 0;
_numUnk = 0;
- _audioNames = NULL;
- _numAudioNames = 0;
_curActor = 0;
_curVerb = 0;
_curVerbSlot = 0;
@@ -765,7 +763,7 @@
_egoPositioned = false;
_keyPressed = 0;
_lastKeyHit = 0;
- _mouseButStat = 0;
+ _mouseAndKeyboardStat = 0;
_leftBtnPressed = 0;
_rightBtnPressed = 0;
_bootParam = 0;
@@ -1173,7 +1171,6 @@
delete _sound;
free(_languageBuffer);
- free(_audioNames);
delete _costumeLoader;
delete _costumeRenderer;
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.595
retrieving revision 1.596
diff -u -d -r1.595 -r1.596
--- scumm.h 20 Apr 2005 23:13:09 -0000 1.595
+++ scumm.h 20 Apr 2005 23:33:33 -0000 1.596
@@ -524,9 +524,6 @@
int _NESStartStrip;
- char *_audioNames;
- int32 _numAudioNames;
-
protected:
/* Current objects - can go in their respective classes */
byte _curActor;
@@ -550,7 +547,7 @@
Common::Point _mouse;
Common::Point _virtualMouse;
- uint16 _mouseButStat;
+ uint16 _mouseAndKeyboardStat;
byte _leftBtnPressed, _rightBtnPressed;
/** The bootparam, to be passed to the script 1, the bootscript. */
Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -d -r1.129 -r1.130
--- verbs.cpp 20 Apr 2005 18:21:12 -0000 1.129
+++ verbs.cpp 20 Apr 2005 23:33:34 -0000 1.130
@@ -230,7 +230,7 @@
y -= virtscr[kVerbVirtScreen].topline;
- if ((y < inventoryArea) || !(_mouseButStat & MBS_LEFT_CLICK))
+ if ((y < inventoryArea) || !(_mouseAndKeyboardStat & MBS_LEFT_CLICK))
return;
if (v2_mouseover_boxes[kInventoryUpArrow].rect.contains(x, y)) {
@@ -356,18 +356,18 @@
if (VAR_MOUSE_STATE != 0xFF)
VAR(VAR_MOUSE_STATE) = 0;
- if (_userPut <= 0 || _mouseButStat == 0)
+ if (_userPut <= 0 || _mouseAndKeyboardStat == 0)
return;
if (VAR_MOUSE_STATE != 0xFF)
- VAR(VAR_MOUSE_STATE) = _mouseButStat;
+ VAR(VAR_MOUSE_STATE) = _mouseAndKeyboardStat;
- if (_mouseButStat < MBS_MAX_KEY) {
+ if (_mouseAndKeyboardStat < MBS_MAX_KEY) {
/* Check keypresses */
vs = &_verbs[1];
for (i = 1; i < _numVerbs; i++, vs++) {
if (vs->verbid && vs->saveid == 0 && vs->curmode == 1) {
- if (_mouseButStat == vs->key) {
+ if (_mouseAndKeyboardStat == vs->key) {
// Trigger verb as if the user clicked it
runInputScript(1, vs->verbid, 1);
return;
@@ -375,7 +375,7 @@
}
}
- if ((_gameId == GID_INDY4 || _gameId == GID_PASS) && _mouseButStat >= '0' && _mouseButStat <= '9') {
+ if ((_gameId == GID_INDY4 || _gameId == GID_PASS) && _mouseAndKeyboardStat >= '0' && _mouseAndKeyboardStat <= '9') {
// To support keyboard fighting in FOA, we need to remap the number keys.
// FOA apparently expects PC scancode values (see script 46 if you want
// to know where I got these numbers from). Oddly enough, the The Indy 3
@@ -387,14 +387,14 @@
331, 332, 333,
327, 328, 329
};
- _mouseButStat = numpad[_mouseButStat - '0'];
+ _mouseAndKeyboardStat = numpad[_mouseAndKeyboardStat - '0'];
}
// Generic keyboard input
- runInputScript(4, _mouseButStat, 1);
- } else if (_mouseButStat & MBS_MOUSE_MASK) {
+ runInputScript(4, _mouseAndKeyboardStat, 1);
+ } else if (_mouseAndKeyboardStat & MBS_MOUSE_MASK) {
VirtScreen *zone = findVirtScreen(_mouse.y);
- byte code = _mouseButStat & MBS_LEFT_CLICK ? 1 : 2;
+ byte code = _mouseAndKeyboardStat & MBS_LEFT_CLICK ? 1 : 2;
int inventoryArea = (_platform == Common::kPlatformNES) ? 48: 32;
if (_version <= 2 && zone->number == 2 && _mouse.y <= zone->topline + 8) {
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm/imuse_digi dimuse.cpp,1.125,1.126 dimuse.h,1.72,1.73 dimuse_music.cpp,1.36,1.37
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga interface.cpp,1.77,1.78 interface.h,1.41,1.42
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list