aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2002-10-23 14:02:46 +0000
committerMax Horn2002-10-23 14:02:46 +0000
commit7a58ae782e1ed5f16e160dde87dcfb0d6b000b1c (patch)
tree0e77b5d85d8728ee05a47f516bb886c56a4515e4 /scumm
parent4585debc18aeb599b26ca90bb4005affc9450f31 (diff)
downloadscummvm-rg350-7a58ae782e1ed5f16e160dde87dcfb0d6b000b1c.tar.gz
scummvm-rg350-7a58ae782e1ed5f16e160dde87dcfb0d6b000b1c.tar.bz2
scummvm-rg350-7a58ae782e1ed5f16e160dde87dcfb0d6b000b1c.zip
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
svn-id: r5290
Diffstat (limited to 'scumm')
-rw-r--r--scumm/resource.cpp246
-rw-r--r--scumm/smush/scumm_renderer.cpp2
-rw-r--r--scumm/string.cpp16
3 files changed, 132 insertions, 132 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 1edbcd8b05..f5d39eeec0 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -159,7 +159,7 @@ void Scumm::readRoomsOffsets()
_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 @@ int Scumm::readSoundResource(int type, int idx)
_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 @@ int Scumm::readSoundResource(int type, int idx)
// 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 @@ void Scumm::resourceStats()
}
}
- 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)
diff --git a/scumm/smush/scumm_renderer.cpp b/scumm/smush/scumm_renderer.cpp
index 89cc8dadb5..f5e8dafd6d 100644
--- a/scumm/smush/scumm_renderer.cpp
+++ b/scumm/smush/scumm_renderer.cpp
@@ -111,7 +111,7 @@ bool ScummMixer::addChannel(_Channel * c) {
fprintf(stderr, "_nextIndex == %d\n", _nextIndex);
for(i = _mixer->_beginSlots; i < SoundMixer::NUM_CHANNELS; i++) {
- fprintf(stderr, "channel %d : %p(%ld, %d) %d %d\n", i, _channels[i].chan,
+ fprintf(stderr, "channel %d : %p(%d, %d) %d %d\n", i, _channels[i].chan,
_channels[i].chan ? _channels[i].chan->getTrackIdentifier() : -1,
_channels[i].chan ? _channels[i].chan->isTerminated() : 1,
_channels[i].first, _channels[i].mixer_index);
diff --git a/scumm/string.cpp b/scumm/string.cpp
index f574635dbd..a8e1dd2ff7 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -253,7 +253,7 @@ void Scumm::CHARSET_1()
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 @@ void Scumm::CHARSET_1()
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 @@ void Scumm::CHARSET_1()
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 @@ void Scumm::CHARSET_1()
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 @@ void Scumm::drawString(int a)
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 @@ void Scumm::initCharset(int charsetno)
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 @@ void Scumm::translateText(char * text, char * trans_buff) {
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;