[Scummvm-cvs-logs] CVS: scummvm/scumm bundle.cpp,1.35,1.36 script_v5.cpp,1.19,1.20 script_v8.cpp,2.147,2.148 scumm.h,1.161,1.162 string.cpp,1.95,1.96
Max Horn
fingolfin at users.sourceforge.net
Mon Apr 7 09:05:06 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv23876/scumm
Modified Files:
bundle.cpp script_v5.cpp script_v8.cpp scumm.h string.cpp
Log Message:
Patch #712493: CMI: Object line
Index: bundle.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/bundle.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- bundle.cpp 10 Mar 2003 20:38:33 -0000 1.35
+++ bundle.cpp 7 Apr 2003 16:04:25 -0000 1.36
@@ -361,7 +361,7 @@
return final_size;
}
}
- warning("Failed finding voice %s", name);
+ debug(2, "Failed finding voice %s", name);
return final_size;
}
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- script_v5.cpp 7 Apr 2003 14:38:26 -0000 1.19
+++ script_v5.cpp 7 Apr 2003 16:04:26 -0000 1.20
@@ -2346,7 +2346,7 @@
int Scumm_v5::getWordVararg(int *ptr) {
int i;
- for (i = 0; i < 16; i++)
+ for (i = 0; i < 15; i++)
ptr[i] = 0;
i = 0;
@@ -2494,6 +2494,7 @@
// that something is missing here :-)
if (a == 4) {
+printf("o5_oldRoomEffect ODDBALL: _opcode = 0x%x, a = 0x%x\n", _opcode, a);
// No idea what byte_2FCCF is, but it's a globale boolean flag.
// I only add it here as a temporary hack to make the pseudo code compile.
int byte_2FCCF = 0;
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.147
retrieving revision 2.148
diff -u -d -r2.147 -r2.148
--- script_v8.cpp 30 Mar 2003 12:52:22 -0000 2.147
+++ script_v8.cpp 7 Apr 2003 16:04:27 -0000 2.148
@@ -515,11 +515,14 @@
}
pointer[j] = 0;
- // Stop any talking that's still going on
- if (_sound->_talkChannel > -1)
- _mixer->stop(_sound->_talkChannel);
+ int new_sound = _sound->playBundleSound(pointer);
+ if (new_sound != -1) {
+ // Stop any talking that's still going on
+ if (_sound->_talkChannel > -1)
+ _mixer->stop(_sound->_talkChannel);
+ _sound->_talkChannel = new_sound;
+ }
- _sound->_talkChannel = _sound->playBundleSound(pointer);
_messagePtr = _transText;
}
@@ -607,10 +610,24 @@
_charset->_nextTop = _charset->_top;
}
} while (c);
+
+ _blastTextQueue[i].left = _charset->_strLeft;
+ _blastTextQueue[i].right = _charset->_strRight;
+ _blastTextQueue[i].top = _charset->_strTop;
+ _blastTextQueue[i].bottom = _charset->_strBottom;
}
_charset->_ignoreCharsetMask = false;
}
+void Scumm::removeBlastTexts() {
+ int i;
+
+ for (i = 0; i < _blastTextQueuePos; i++) {
+ restoreBG(_blastTextQueue[i].left, _blastTextQueue[i].top, _blastTextQueue[i].right, _blastTextQueue[i].bottom);
+ }
+ _blastTextQueuePos = 0;
+}
+
void Scumm_v8::o8_mod() {
int a = pop();
push(pop() % a);
@@ -1614,7 +1631,7 @@
// scripts. Probably a wrong push/pop somewhere. For now override to correct value.
array = 658;
ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, readVar(array));
- if (!strcmp((char *)ah->data, "Saveload Page"))
+ if (!strcmp((char *)ah->data, "Saveload Page") || !strcmp((char *)ah->data, "Object Names"))
push(1);
else
push(0);
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -d -r1.161 -r1.162
--- scumm.h 6 Apr 2003 19:41:34 -0000 1.161
+++ scumm.h 7 Apr 2003 16:04:29 -0000 1.162
@@ -116,6 +116,7 @@
struct BlastText {
int16 xpos, ypos;
+ int16 left, right, top, bottom;
byte color;
byte charset;
bool center;
@@ -877,7 +878,7 @@
void enqueueText(byte *text, int x, int y, byte color, byte charset, bool center);
void drawBlastTexts();
- void removeBlastTexts() { _blastTextQueuePos = 0; }
+ void removeBlastTexts();
void enqueueObject(int objectNumber, int objectX, int objectY, int objectWidth,
int objectHeight, int scaleX, int scaleY, int image, int mode);
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- string.cpp 30 Mar 2003 19:32:12 -0000 1.95
+++ string.cpp 7 Apr 2003 16:04:30 -0000 1.96
@@ -857,15 +857,22 @@
if (_gameId == GID_CMI) {
if ((text[0] == '/') && (_existLanguageFile == true)) {
struct langIndexNode target;
- struct langIndexNode *found;
+ struct langIndexNode *found = NULL;
// copy name from text /..../
for (l = 0; (l < 8) && (text[l + 1] != '/'); l++)
target.tag[l] = toupper(text[l + 1]);
target.tag[l] = 0;
- found = (struct langIndexNode *)bsearch(&target, _languageIndex, _languageStrCount, sizeof(struct langIndexNode), indexCompare);
+ // HACK: These are used for the object line when
+ // using one object on another. I don't know if the
+ // text in the language file is a placeholder or if
+ // we're supposed to use it, but at least in the
+ // English version things will work so much better if
+ // we can't find translations for these.
+ if (strcmp(target.tag, "PU_M001") != 0 && strcmp(target.tag, "PU_M002") != 0)
+ found = (struct langIndexNode *)bsearch(&target, _languageIndex, _languageStrCount, sizeof(struct langIndexNode), indexCompare);
if (found != NULL) {
File file;
More information about the Scummvm-git-logs
mailing list