[Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.20,1.21 string.cpp,1.33,1.34
Max Horn
fingolfin at users.sourceforge.net
Wed Oct 23 07:03:12 CEST 2002
Update of /cvsroot/scummvm/scummvm/scumm
In directory usw-pr-cvs1:/tmp/cvs-serv23572/scumm
Modified Files:
resource.cpp string.cpp
Log Message:
cleaning up scummsys.h a bit (in preparation of using configure eventually). Most notable, uint32 etc. will be 'unsigned int' not 'unsigned long'. Except for 16 bit systems that should be right, and configure will replace this by a proper check for data type sizes anyway
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- resource.cpp 21 Oct 2002 13:23:24 -0000 1.20
+++ resource.cpp 23 Oct 2002 14:02:45 -0000 1.21
@@ -159,7 +159,7 @@
_fileHandle.seek(16, SEEK_SET);
} else {
- _fileHandle.seek(12, SEEK_SET); // Directlry searching for the room offset block would be more generic...
+ _fileHandle.seek(12, SEEK_SET); // Directly searching for the room offset block would be more generic...
}
num = _fileHandle.readByte();
@@ -730,7 +730,7 @@
_fileHandle.read(createResource(type, idx, total_size), total_size - 8);
return 1;
} else {
- fprintf(stderr, "WARNING: Unrecognized base tag 0x%08lx in sound %d\n", basetag, idx);
+ fprintf(stderr, "WARNING: Unrecognized base tag 0x%08x in sound %d\n", basetag, idx);
}
res.roomoffs[type][idx] = 0xFFFFFFFF;
return 0;
@@ -738,126 +738,126 @@
// FIXME: some default MIDI instruments for INDY3/MI1
static char OLD256_MIDI_HACK[] =
- // 0
- "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
- "\x00\x00\x03" // part/channel
- "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
- "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
- "\x00" // part/channel
- "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
- "\x04\x06\x02\x02\x03\x07\x0f\x0d"
- "\x05\x04\x0c\x00\x03\x01\x01\x00"
- "\x00\x00\x01\x01\x0e\x00\x02\x02"
- "\x01\x00\x01\x00\x01\x02\x00\x01"
- "\x08\x00\x00\x00\x01\x02\x04\x00"
- "\x06\x02\x00\x00\x04\x00\x03\x02"
- "\x04\x00\x00\xf7"
- "\x00\xb0\x07\x64" // Controller 7 = 100
- // 1
- "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
- "\x01\x00\x03" // part/channel
- "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
- "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
- "\x01" // part/channel
- "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
- "\x04\x06\x02\x02\x03\x07\x0f\x0d"
- "\x05\x04\x0c\x00\x03\x01\x01\x00"
- "\x00\x00\x01\x01\x0e\x00\x02\x02"
- "\x01\x00\x01\x00\x01\x02\x00\x01"
- "\x08\x00\x00\x00\x01\x02\x04\x00"
- "\x06\x02\x00\x00\x04\x00\x03\x02"
- "\x04\x00\x00\xf7"
- "\x00\xb1\x07\x64" // Controller 7 = 100
- // 2
- "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
- "\x02\x00\x03" // part/channel
- "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
- "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
- "\x02" // part/channel
- "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
- "\x04\x06\x02\x02\x03\x07\x0f\x0d"
- "\x05\x04\x0c\x00\x03\x01\x01\x00"
- "\x00\x00\x01\x01\x0e\x00\x02\x02"
- "\x01\x00\x01\x00\x01\x02\x00\x01"
- "\x08\x00\x00\x00\x01\x02\x04\x00"
- "\x06\x02\x00\x00\x04\x00\x03\x02"
- "\x04\x00\x00\xf7"
- "\x00\xb2\x07\x64" // Controller 7 = 100
- // 3
- "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
- "\x03\x00\x03" // part/channel
- "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
- "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
- "\x03" // part/channel
- "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
- "\x04\x06\x02\x02\x03\x07\x0f\x0d"
- "\x05\x04\x0c\x00\x03\x01\x01\x00"
- "\x00\x00\x01\x01\x0e\x00\x02\x02"
- "\x01\x00\x01\x00\x01\x02\x00\x01"
- "\x08\x00\x00\x00\x01\x02\x04\x00"
- "\x06\x02\x00\x00\x04\x00\x03\x02"
- "\x04\x00\x00\xf7"
- "\x00\xb3\x07\x64" // Controller 7 = 100
- // 4
- "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
- "\x04\x00\x03" // part/channel
- "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
- "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
- "\x04" // part/channel
- "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
- "\x04\x06\x02\x02\x03\x07\x0f\x0d"
- "\x05\x04\x0c\x00\x03\x01\x01\x00"
- "\x00\x00\x01\x01\x0e\x00\x02\x02"
- "\x01\x00\x01\x00\x01\x02\x00\x01"
- "\x08\x00\x00\x00\x01\x02\x04\x00"
- "\x06\x02\x00\x00\x04\x00\x03\x02"
- "\x04\x00\x00\xf7"
- "\x00\xb4\x07\x64" // Controller 7 = 100
- // 5
- "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
- "\x05\x00\x03" // part/channel
- "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
- "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
- "\x05" // part/channel
- "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
- "\x04\x06\x02\x02\x03\x07\x0f\x0d"
- "\x05\x04\x0c\x00\x03\x01\x01\x00"
- "\x00\x00\x01\x01\x0e\x00\x02\x02"
- "\x01\x00\x01\x00\x01\x02\x00\x01"
- "\x08\x00\x00\x00\x01\x02\x04\x00"
- "\x06\x02\x00\x00\x04\x00\x03\x02"
- "\x04\x00\x00\xf7"
- "\x00\xb5\x07\x64" // Controller 7 = 100
- // 6
- "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
- "\x06\x00\x03" // part/channel
- "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
- "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
- "\x06" // part/channel
- "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
- "\x04\x06\x02\x02\x03\x07\x0f\x0d"
- "\x05\x04\x0c\x00\x03\x01\x01\x00"
- "\x00\x00\x01\x01\x0e\x00\x02\x02"
- "\x01\x00\x01\x00\x01\x02\x00\x01"
- "\x08\x00\x00\x00\x01\x02\x04\x00"
- "\x06\x02\x00\x00\x04\x00\x03\x02"
- "\x04\x00\x00\xf7"
- "\x00\xb6\x07\x64" // Controller 7 = 100
- // 7
- "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
- "\x07\x00\x03" // part/channel
- "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
- "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
- "\x07" // part/channel
- "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
- "\x04\x06\x02\x02\x03\x07\x0f\x0d"
- "\x05\x04\x0c\x00\x03\x01\x01\x00"
- "\x00\x00\x01\x01\x0e\x00\x02\x02"
- "\x01\x00\x01\x00\x01\x02\x00\x01"
- "\x08\x00\x00\x00\x01\x02\x04\x00"
- "\x06\x02\x00\x00\x04\x00\x03\x02"
- "\x04\x00\x00\xf7"
- "\x00\xb7\x07\x64"; // Controller 7 = 100
+ // 0
+ "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
+ "\x00\x00\x03" // part/channel
+ "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
+ "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
+ "\x00" // part/channel
+ "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
+ "\x04\x06\x02\x02\x03\x07\x0f\x0d"
+ "\x05\x04\x0c\x00\x03\x01\x01\x00"
+ "\x00\x00\x01\x01\x0e\x00\x02\x02"
+ "\x01\x00\x01\x00\x01\x02\x00\x01"
+ "\x08\x00\x00\x00\x01\x02\x04\x00"
+ "\x06\x02\x00\x00\x04\x00\x03\x02"
+ "\x04\x00\x00\xf7"
+ "\x00\xb0\x07\x64" // Controller 7 = 100
+ // 1
+ "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
+ "\x01\x00\x03" // part/channel
+ "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
+ "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
+ "\x01" // part/channel
+ "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
+ "\x04\x06\x02\x02\x03\x07\x0f\x0d"
+ "\x05\x04\x0c\x00\x03\x01\x01\x00"
+ "\x00\x00\x01\x01\x0e\x00\x02\x02"
+ "\x01\x00\x01\x00\x01\x02\x00\x01"
+ "\x08\x00\x00\x00\x01\x02\x04\x00"
+ "\x06\x02\x00\x00\x04\x00\x03\x02"
+ "\x04\x00\x00\xf7"
+ "\x00\xb1\x07\x64" // Controller 7 = 100
+ // 2
+ "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
+ "\x02\x00\x03" // part/channel
+ "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
+ "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
+ "\x02" // part/channel
+ "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
+ "\x04\x06\x02\x02\x03\x07\x0f\x0d"
+ "\x05\x04\x0c\x00\x03\x01\x01\x00"
+ "\x00\x00\x01\x01\x0e\x00\x02\x02"
+ "\x01\x00\x01\x00\x01\x02\x00\x01"
+ "\x08\x00\x00\x00\x01\x02\x04\x00"
+ "\x06\x02\x00\x00\x04\x00\x03\x02"
+ "\x04\x00\x00\xf7"
+ "\x00\xb2\x07\x64" // Controller 7 = 100
+ // 3
+ "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
+ "\x03\x00\x03" // part/channel
+ "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
+ "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
+ "\x03" // part/channel
+ "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
+ "\x04\x06\x02\x02\x03\x07\x0f\x0d"
+ "\x05\x04\x0c\x00\x03\x01\x01\x00"
+ "\x00\x00\x01\x01\x0e\x00\x02\x02"
+ "\x01\x00\x01\x00\x01\x02\x00\x01"
+ "\x08\x00\x00\x00\x01\x02\x04\x00"
+ "\x06\x02\x00\x00\x04\x00\x03\x02"
+ "\x04\x00\x00\xf7"
+ "\x00\xb3\x07\x64" // Controller 7 = 100
+ // 4
+ "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
+ "\x04\x00\x03" // part/channel
+ "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
+ "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
+ "\x04" // part/channel
+ "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
+ "\x04\x06\x02\x02\x03\x07\x0f\x0d"
+ "\x05\x04\x0c\x00\x03\x01\x01\x00"
+ "\x00\x00\x01\x01\x0e\x00\x02\x02"
+ "\x01\x00\x01\x00\x01\x02\x00\x01"
+ "\x08\x00\x00\x00\x01\x02\x04\x00"
+ "\x06\x02\x00\x00\x04\x00\x03\x02"
+ "\x04\x00\x00\xf7"
+ "\x00\xb4\x07\x64" // Controller 7 = 100
+ // 5
+ "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
+ "\x05\x00\x03" // part/channel
+ "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
+ "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
+ "\x05" // part/channel
+ "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
+ "\x04\x06\x02\x02\x03\x07\x0f\x0d"
+ "\x05\x04\x0c\x00\x03\x01\x01\x00"
+ "\x00\x00\x01\x01\x0e\x00\x02\x02"
+ "\x01\x00\x01\x00\x01\x02\x00\x01"
+ "\x08\x00\x00\x00\x01\x02\x04\x00"
+ "\x06\x02\x00\x00\x04\x00\x03\x02"
+ "\x04\x00\x00\xf7"
+ "\x00\xb5\x07\x64" // Controller 7 = 100
+ // 6
+ "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
+ "\x06\x00\x03" // part/channel
+ "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
+ "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
+ "\x06" // part/channel
+ "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
+ "\x04\x06\x02\x02\x03\x07\x0f\x0d"
+ "\x05\x04\x0c\x00\x03\x01\x01\x00"
+ "\x00\x00\x01\x01\x0e\x00\x02\x02"
+ "\x01\x00\x01\x00\x01\x02\x00\x01"
+ "\x08\x00\x00\x00\x01\x02\x04\x00"
+ "\x06\x02\x00\x00\x04\x00\x03\x02"
+ "\x04\x00\x00\xf7"
+ "\x00\xb6\x07\x64" // Controller 7 = 100
+ // 7
+ "\x00\xf0\x14\x7d\x00" // sysex 00: part on/off
+ "\x07\x00\x03" // part/channel
+ "\x00\x00\x07\x0f\x00\x00\x08\x00\x00\x00\x00\x02\x00\x00\xf7"
+ "\x04\xf0\x41\x7d\x10" // sysex 16: set instrument
+ "\x07" // part/channel
+ "\x01\x06\x02\x0a\x08\x09\x0d\x08\x04\x04"
+ "\x04\x06\x02\x02\x03\x07\x0f\x0d"
+ "\x05\x04\x0c\x00\x03\x01\x01\x00"
+ "\x00\x00\x01\x01\x0e\x00\x02\x02"
+ "\x01\x00\x01\x00\x01\x02\x00\x01"
+ "\x08\x00\x00\x00\x01\x02\x04\x00"
+ "\x06\x02\x00\x00\x04\x00\x03\x02"
+ "\x04\x00\x00\xf7"
+ "\x00\xb7\x07\x64"; // Controller 7 = 100
int Scumm::readSoundResourceSmallHeader(int type, int idx)
{
@@ -1483,7 +1483,7 @@
}
}
- printf("Total allocated size=%ld, locked=%ld(%ld)\n", _allocatedSize, lockedSize, lockedNum);
+ printf("Total allocated size=%d, locked=%d(%d)\n", _allocatedSize, lockedSize, lockedNum);
}
void Scumm::heapClear(int mode)
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- string.cpp 23 Oct 2002 07:16:42 -0000 1.33
+++ string.cpp 23 Oct 2002 14:02:46 -0000 1.34
@@ -253,7 +253,7 @@
if (!(_features & GF_OLD256)) // FIXME
for (i = 0; i < 4; i++)
if (_features & GF_SMALL_HEADER)
- charset._colorMap[i] = _charsetData[charset._curId][i - 12];
+ charset._colorMap[i] = _charsetData[charset._curId][i - 12]; // FIXME - do we really want to access index -12 to -9 ?
else
charset._colorMap[i] = _charsetData[charset._curId][i];
@@ -343,7 +343,7 @@
charset._xpos2 -= charset.getStringWidth(0, buffer, 0) >> 1;
}
if (_features & GF_SMALL_HEADER)
- charset._ypos2 += getResourceAddress(rtCharset, charset._curId)[18];
+ charset._ypos2 += getResourceAddress(rtCharset, charset._curId)[30 - 12];
else
charset._ypos2 += getResourceAddress(rtCharset, charset._curId)[30];
charset._disableOffsX = 1;
@@ -418,7 +418,7 @@
case 14: {
int oldy;
if (_features & GF_SMALL_HEADER)
- oldy = getResourceAddress(rtCharset, charset._curId)[18];
+ oldy = getResourceAddress(rtCharset, charset._curId)[30 - 12];
else
oldy = getResourceAddress(rtCharset, charset._curId)[30];
@@ -426,11 +426,11 @@
buffer += 2;
for (i = 0; i < 4; i++)
if (_features & GF_SMALL_HEADER)
- charset._colorMap[i] = _charsetData[charset._curId][i - 12];
+ charset._colorMap[i] = _charsetData[charset._curId][i - 12]; // FIXME - do we really want to access index -12 to -9 ?
else
charset._colorMap[i] = _charsetData[charset._curId][i];
if (_features & GF_SMALL_HEADER)
- charset._ypos2 -= getResourceAddress(rtCharset, charset._curId)[18] - oldy;
+ charset._ypos2 -= getResourceAddress(rtCharset, charset._curId)[30 - 12] - oldy;
else
charset._ypos2 -= getResourceAddress(rtCharset, charset._curId)[30] - oldy;
break;
@@ -596,7 +596,7 @@
for (i = 0; i < 4; i++)
if (_features & GF_SMALL_HEADER)
- charset._colorMap[i] = _charsetData[charset._curId][i - 12];
+ charset._colorMap[i] = _charsetData[charset._curId][i - 12]; // FIXME - do we really want to access index -12 to -9 ?
else
charset._colorMap[i] = _charsetData[charset._curId][i];
@@ -876,7 +876,7 @@
for (i = 0; i < 0x10; i++)
if (_features & GF_SMALL_HEADER)
- charset._colorMap[i] = _charsetData[charset._curId][i - 12];
+ charset._colorMap[i] = _charsetData[charset._curId][i - 12]; // FIXME - do we really want to access index -12 to -9 ?
else
charset._colorMap[i] = _charsetData[charset._curId][i];
}
@@ -1159,7 +1159,7 @@
number[2] = *(text + l + 3);
number[3] = 0;
num = atol(number);
- sprintf(num_s, "%ld", num);
+ sprintf(num_s, "%d", num);
char * buf = _languageBuffer;
pos = 0;
More information about the Scummvm-git-logs
mailing list