aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorLars Persson2005-06-21 22:08:21 +0000
committerLars Persson2005-06-21 22:08:21 +0000
commit1c69696a9a8878971c4fa925b074498dab757857 (patch)
treed8f4f2cfea1a3e01bb7f5f5c58fb812d8029ca96 /scumm
parent4564f0d3bf0d40f5a2ca125df0682969adc8431c (diff)
downloadscummvm-rg350-1c69696a9a8878971c4fa925b074498dab757857.tar.gz
scummvm-rg350-1c69696a9a8878971c4fa925b074498dab757857.tar.bz2
scummvm-rg350-1c69696a9a8878971c4fa925b074498dab757857.zip
Patches needed to build for SYMBIAN32 WINS/GCC added.
Test built for Symbian and run on P910i without any major problems. Test built for MSVC6. Changed parts seems to compile ok but there are some problems with MSVC6 and some of the targets which the EPOC build does n't support (KYRA,SAGA). svn-id: r18430
Diffstat (limited to 'scumm')
-rw-r--r--scumm/dialogs.cpp10
-rw-r--r--scumm/imuse.cpp6
-rw-r--r--scumm/logic_he.cpp19
-rw-r--r--scumm/player_nes.h8
-rw-r--r--scumm/smush/smush_player.cpp2
-rw-r--r--scumm/thumbnail.cpp2
6 files changed, 25 insertions, 22 deletions
diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp
index 3f79b18d65..cba5ed83d9 100644
--- a/scumm/dialogs.cpp
+++ b/scumm/dialogs.cpp
@@ -214,8 +214,8 @@ public:
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
const String &getResultString() const;
- void setList(const StringList& list) { GUI::ChooserDialog::setList(list); }
- int runModal() { return GUI::ChooserDialog::runModal(); }
+ void setList(const StringList& list) { GUI_ChooserDialog::setList(list); }
+ int runModal() { return GUI_ChooserDialog::runModal(); }
};
SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode)
@@ -316,7 +316,7 @@ void SaveLoadChooserEx::setList(const StringList& list) {
int SaveLoadChooserEx::runModal() {
_gfxWidget->setGfx(0);
- int ret = GUI::Dialog::runModal();
+ int ret = Dialog::runModal();
return ret;
}
@@ -339,7 +339,7 @@ void SaveLoadChooserEx::handleCommand(CommandSender *sender, uint32 cmd, uint32
close();
break;
case GUI::kListSelectionChangedCmd: {
- const Graphics::Surface *thumb;
+ Graphics::Surface *thumb;
thumb = _scumm->loadThumbnailFromSlot(_saveMode ? selItem + 1 : selItem);
_gfxWidget->setGfx(thumb);
delete thumb;
@@ -357,7 +357,7 @@ void SaveLoadChooserEx::handleCommand(CommandSender *sender, uint32 cmd, uint32
case kCloseCmd:
setResult(-1);
default:
- GUI::Dialog::handleCommand(sender, cmd, data);
+ Dialog::handleCommand(sender, cmd, data);
}
}
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index a06395b064..a27db42e00 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -1263,7 +1263,7 @@ void IMuseInternal::initMT32(MidiDriver *midi) {
void IMuseInternal::initGM(MidiDriver *midi) {
byte buffer[11];
-
+ int i=0;
// General MIDI System On message
// Resets all GM devices to default settings
memcpy(&buffer[0], "\xF0\x7E\x7F\x09\x01\xF7", 6);
@@ -1321,13 +1321,13 @@ void IMuseInternal::initGM(MidiDriver *midi) {
// Set Channels 1-16 Reverb to 64, which is the
// equivalent of MT-32 default Reverb Level 5
- for (int i = 0; i < 16; ++i)
+ for (i = 0; i < 16; ++i)
midi->send(( 64 << 16) | (91 << 8) | (0xB0 | i));
debug(2, "GM Controller 91 Change: Channels 1-16 Reverb Level is 64");
// Set Channels 1-16 Pitch Bend Sensitivity to
// 12 semitones; then lock the RPN by setting null.
- for (int i = 0; i < 16; ++i) {
+ for (i = 0; i < 16; ++i) {
midi->send(( 0 << 16) | (100 << 8) | (0xB0 | i));
midi->send(( 0 << 16) | (101 << 8) | (0xB0 | i));
midi->send(( 12 << 16) | (6 << 8) | (0xB0 | i));
diff --git a/scumm/logic_he.cpp b/scumm/logic_he.cpp
index db1a88ec85..9909fbb0a3 100644
--- a/scumm/logic_he.cpp
+++ b/scumm/logic_he.cpp
@@ -401,8 +401,9 @@ int32 LogicHEfunshop::dispatch(int op, int numArgs, int32 *args) {
void LogicHEfunshop::op_1004(int32 *args) {
double data[8], at, sq;
int32 x, y;
+ int i=0;
- for (int i = 0; i <= 6; i += 2) {
+ for (i = 0; i <= 6; i += 2) {
data[i] = getFromArray(args[0], 0, 519 + i);
data[i + 1] = getFromArray(args[0], 0, 519 + i + 1);
}
@@ -414,14 +415,14 @@ void LogicHEfunshop::op_1004(int32 *args) {
return;
}
- for (int i = 0; i <= 6; i += 2) {
+ for (i = 0; i <= 6; i += 2) {
data[i] -= (double)x;
data[i + 1] -= (double)y;
}
double a1 = (double)args[1] * DEG2RAD;
- for (int i = 0; i <= 6; i += 2) {
+ for (i = 0; i <= 6; i += 2) {
at = atan2(data[i + 1], data[i]);
sq = hypot(data[i + 1], data[i]);
@@ -435,14 +436,14 @@ void LogicHEfunshop::op_1004(int32 *args) {
int minx = 2;
int miny = 3;
- for (int i = 0; i <= 6; i += 2) {
+ for (i = 0; i <= 6; i += 2) {
if (data[i] < data[minx])
minx = i;
if (data[i + 1] < data[miny])
miny = i + 1;
}
- for (int i = 0; i <= 6; i += 2) {
+ for (i = 0; i <= 6; i += 2) {
data[i] -= data[minx];
data[i + 1] -= data[miny];
@@ -454,8 +455,8 @@ void LogicHEfunshop::op_1004(int32 *args) {
void LogicHEfunshop::op_1005(int32 *args) {
double data[8];
double args1, args2;
-
- for (int i = 520; i <= 526; i += 2) {
+ int i=0;
+ for (i = 520; i <= 526; i += 2) {
data[i - 520] = getFromArray(args[0], 0, i - 1);
data[i - 520 + 1] = getFromArray(args[0], 0, i);
}
@@ -463,12 +464,12 @@ void LogicHEfunshop::op_1005(int32 *args) {
args1 = args[1] * 0.01 + 1;
args2 = args[2] * 0.01 + 1;
- for (int i = 0; i < 4; i++) {
+ for (i = 0; i < 4; i++) {
data[2 * i] *= args1;
data[2 * i + 1] *= args2;
}
- for (int i = 520; i <= 526; i += 2) {
+ for (i = 520; i <= 526; i += 2) {
putInArray(args[0], 0, i - 1, scumm_round(data[i - 520]));
putInArray(args[0], 0, i, scumm_round(data[i - 520 + 1]));
}
diff --git a/scumm/player_nes.h b/scumm/player_nes.h
index 1c5ec00c5e..ed939b0ab7 100644
--- a/scumm/player_nes.h
+++ b/scumm/player_nes.h
@@ -35,6 +35,10 @@ namespace Scumm {
class ScummEngine;
+static const int MAXVOLUME = 0x7F;
+static const int NUMSLOTS = 3;
+static const int NUMCHANS = 4;
+
/**
* Scumm NES sound/music driver.
*/
@@ -77,10 +81,6 @@ private:
int _current_sample;
int _maxvol;
- static const int MAXVOLUME = 0x7F;
- static const int NUMSLOTS = 3;
- static const int NUMCHANS = 4;
-
struct slot {
int framesleft;
int id;
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index fd5bc55315..8f8645b5f5 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -1198,8 +1198,8 @@ void SmushPlayer::tryCmpFile(const char *filename) {
if (i == NULL) {
error("invalid filename : %s", filename);
}
- char fname[260];
#ifdef USE_MAD
+ char fname[260];
memcpy(fname, filename, i - filename);
strcpy(fname + (i - filename), ".mp3");
_compressedFile.open(fname);
diff --git a/scumm/thumbnail.cpp b/scumm/thumbnail.cpp
index 701b651b31..ac760afab7 100644
--- a/scumm/thumbnail.cpp
+++ b/scumm/thumbnail.cpp
@@ -103,7 +103,9 @@ Graphics::Surface *ScummEngine::loadThumbnail(Common::InSaveFile *file) {
void ScummEngine::saveThumbnail(Common::OutSaveFile *file) {
Graphics::Surface thumb;
+#ifndef DISABLE_HQ_SCALERS // fcn has dep on HQ_SCALERS: thumbnail gets created as empty
if (!createThumbnailFromScreen(&thumb))
+#endif
thumb.create(kThumbnailWidth, kThumbnailHeight2, sizeof(uint16));
ThumbnailHeader header;