[Scummvm-cvs-logs] SF.net SVN: scummvm:[34791] scummvm/trunk/engines/kyra
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Mon Oct 13 08:29:15 CEST 2008
Revision: 34791
http://scummvm.svn.sourceforge.net/scummvm/?rev=34791&view=rev
Author: athrxx
Date: 2008-10-13 06:29:14 +0000 (Mon, 13 Oct 2008)
Log Message:
-----------
- fix installer file support for Kyra 2 and 3
- fix bug in pc98 audio driver
Modified Paths:
--------------
scummvm/trunk/engines/kyra/resource_intern.cpp
scummvm/trunk/engines/kyra/sound_towns.cpp
Modified: scummvm/trunk/engines/kyra/resource_intern.cpp
===================================================================
--- scummvm/trunk/engines/kyra/resource_intern.cpp 2008-10-13 04:24:18 UTC (rev 34790)
+++ scummvm/trunk/engines/kyra/resource_intern.cpp 2008-10-13 06:29:14 UTC (rev 34791)
@@ -84,6 +84,7 @@
entry.data = i->data;
entry.size = i->size;
+ i->name.toLowercase();
_files[i->name] = entry;
}
}
@@ -348,6 +349,7 @@
entry.size = stream.readUint32LE();
entry.offset = stream.pos();
entry.name = *file;
+ entry.name.toLowercase();
stream.seek(entry.size, SEEK_CUR);
files.push_back(entry);
@@ -696,9 +698,9 @@
}
void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex2, int cnt) {
- const uint8 *tbl1 = _tables[srcIndex];
+ uint8 *tbl1 = _tables[srcIndex];
uint8 *tbl2 = _tables[dstIndex];
- const uint8 *tbl3 = dstIndex2 == 0xff ? 0 : _tables[dstIndex2];
+ uint8 *tbl3 = dstIndex2 == 0xff ? 0 : _tables[dstIndex2];
if (!cnt)
return;
@@ -845,7 +847,7 @@
uint32 bytesleft = 0;
bool startFile = true;
- Common::String filenameBase =filename;
+ Common::String filenameBase = filename;
Common::String filenameTemp;
char filenameExt[4];
Modified: scummvm/trunk/engines/kyra/sound_towns.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound_towns.cpp 2008-10-13 04:24:18 UTC (rev 34790)
+++ scummvm/trunk/engines/kyra/sound_towns.cpp 2008-10-13 06:29:14 UTC (rev 34791)
@@ -1528,7 +1528,7 @@
uint8 _noiseGenerator;
uint8 _chanEnable;
- uint8 *const *_reg;
+ uint8 **_reg;
bool _ready;
};
@@ -1536,7 +1536,7 @@
class TownsPC98_OpnPercussionSource {
public:
TownsPC98_OpnPercussionSource(const uint32 timerbase);
- ~TownsPC98_OpnPercussionSource() {}
+ ~TownsPC98_OpnPercussionSource() { delete [] _reg; }
void init(const uint8 *instrData = 0);
void reset();
@@ -1577,7 +1577,7 @@
const uint32 _tickLength;
uint32 _timer;
- uint8 *const *_reg;
+ uint8 **_reg;
bool _ready;
};
@@ -2554,7 +2554,7 @@
_tleTable(0), _updateRequest(-1), _tickLength(timerbase * 27), _ready(0) {
memset(_channels, 0, sizeof(Channel) * 3);
- static uint8 *const reg [] = {
+ uint8 *reg[] = {
&_channels[0].frqL,
&_channels[0].frqH,
&_channels[1].frqL,
@@ -2568,7 +2568,8 @@
&_channels[2].vol,
};
- _reg = reg;
+ _reg = new uint8 *[ARRAYSIZE(reg)];
+ memcpy (_reg, reg, sizeof(uint8*) * ARRAYSIZE(reg));;
reset();
}
@@ -2576,6 +2577,7 @@
TownsPC98_OpnSquareSineSource::~TownsPC98_OpnSquareSineSource() {
delete [] _tlTable;
delete [] _tleTable;
+ delete [] _reg;
}
void TownsPC98_OpnSquareSineSource::init(const int *rsTable, const int *rseTable) {
@@ -2726,7 +2728,7 @@
_tickLength(timerbase * 2), _timer(0), _ready(false) {
memset(_rhChan, 0, sizeof(RhtChannel) * 6);
- static uint8 *const reg [] = {
+ uint8 *reg[] = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
&_rhChan[0].startPosL,
@@ -2755,7 +2757,8 @@
&_rhChan[5].endPosH,
};
- _reg = reg;
+ _reg = new uint8 *[ARRAYSIZE(reg)];
+ memcpy (_reg, reg, sizeof(uint8*) * ARRAYSIZE(reg));
}
void TownsPC98_OpnPercussionSource::init(const uint8 *instrData) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list