aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Apers2003-09-08 08:54:37 +0000
committerChris Apers2003-09-08 08:54:37 +0000
commit3156f0dd2f1e936d1d0d0e61229cb8efecc184b6 (patch)
tree4876353ed2838cf66a3b5a0e03a5da4428cd6fff
parent18ddf05a7af8fd82cfe6cbe89ff14fca96f83df4 (diff)
downloadscummvm-rg350-3156f0dd2f1e936d1d0d0e61229cb8efecc184b6.tar.gz
scummvm-rg350-3156f0dd2f1e936d1d0d0e61229cb8efecc184b6.tar.bz2
scummvm-rg350-3156f0dd2f1e936d1d0d0e61229cb8efecc184b6.zip
Reduce PalmOS data segement
svn-id: r10083
-rw-r--r--scumm/player_v2.cpp39
-rw-r--r--scumm/scummvm.cpp4
2 files changed, 41 insertions, 2 deletions
diff --git a/scumm/player_v2.cpp b/scumm/player_v2.cpp
index 78631f11c3..6a24e5acf0 100644
--- a/scumm/player_v2.cpp
+++ b/scumm/player_v2.cpp
@@ -37,6 +37,16 @@
#define FB_WNOISE 0x12000 /* feedback for white noise */
#define FB_PNOISE 0x08000 /* feedback for periodic noise */
+#ifdef __PALM_OS__
+const uint8 *note_lengths;
+static const uint16 *hull_offsets;
+static const int16 *hulls;
+static const uint16 *freqmod_lengths;
+static const uint16 *freqmod_offsets;
+static const int8 *freqmod_table;
+static const uint16 *spk_freq_table;
+static const uint16 *pcjr_freq_table;
+#else
const uint8 note_lengths[] = {
0,
0, 0, 2,
@@ -310,6 +320,7 @@ static const int8 freqmod_table[0x502] = {
-90, 102, 83, 51, 11, -53, -95, 16
};
+
static const uint16 spk_freq_table[12] = {
36484, 34436, 32503, 30679, 28957, 27332,
25798, 24350, 22983, 21693, 20476, 19326
@@ -319,7 +330,7 @@ static const uint16 pcjr_freq_table[12] = {
65472, 61760, 58304, 55040, 52032, 49024,
46272, 43648, 41216, 38912, 36736, 34624
};
-
+#endif
////////////////////////////////////////
//
@@ -962,3 +973,29 @@ void Player_V2::generatePCjrSamples(int16 *data, uint len) {
lowPassFilter(data, len);
}
+#ifdef __PALM_OS__
+#include "scumm_globals.h"
+
+_GINIT(PlayerV2)
+_GSETPTR(note_lengths, GBVARS_NOTELENGTHS_INDEX, uint8, GBVARS_SCUMM)
+_GSETPTR(hull_offsets, GBVARS_HULLOFFSETS_INDEX, uint16, GBVARS_SCUMM)
+_GSETPTR(hulls, GBVARS_HULLS_INDEX, int16, GBVARS_SCUMM)
+_GSETPTR(freqmod_lengths, GBVARS_FREQMODLENGTHS_INDEX, uint16, GBVARS_SCUMM)
+_GSETPTR(freqmod_offsets, GBVARS_FREQMODOFFSETS_INDEX, uint16, GBVARS_SCUMM)
+_GSETPTR(freqmod_table, GBVARS_FREQMODTABLE_INDEX, int8, GBVARS_SCUMM)
+_GSETPTR(spk_freq_table, GBVARS_SPKFREQTABLE_INDEX, uint16, GBVARS_SCUMM)
+_GSETPTR(pcjr_freq_table, GBVARS_PCJRFREQTABLE_INDEX, uint16, GBVARS_SCUMM)
+_GEND
+
+_GRELEASE(PlayerV2)
+_GRELEASEPTR(GBVARS_NOTELENGTHS_INDEX, GBVARS_SCUMM)
+_GRELEASEPTR(GBVARS_HULLOFFSETS_INDEX, GBVARS_SCUMM)
+_GRELEASEPTR(GBVARS_HULLS_INDEX, GBVARS_SCUMM)
+_GRELEASEPTR(GBVARS_FREQMODLENGTHS_INDEX, GBVARS_SCUMM)
+_GRELEASEPTR(GBVARS_FREQMODOFFSETS_INDEX, GBVARS_SCUMM)
+_GRELEASEPTR(GBVARS_FREQMODTABLE_INDEX, GBVARS_SCUMM)
+_GRELEASEPTR(GBVARS_SPKFREQTABLE_INDEX, GBVARS_SCUMM)
+_GRELEASEPTR(GBVARS_PCJRFREQTABLE_INDEX, GBVARS_SCUMM)
+_GEND
+
+#endif
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index e4306c2c8e..cfa6caf7a9 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -164,6 +164,7 @@ static const VersionSettings scumm_settings[] = {
{"dig", "The Dig", GID_DIG, 7, MDT_NONE,
GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE, 0},
+#ifndef __PALM_OS__ // these are SVGA games not supported under PalmOS
/* Scumm Version 8 */
{"comi", "The Curse of Monkey Island", GID_CMI, 8, MDT_NONE,
GF_NEW_OPCODES | GF_NEW_COSTUMES | GF_NEW_CAMERA | GF_DIGI_IMUSE | GF_DEFAULT_TO_1X_SCALER, 0},
@@ -222,7 +223,8 @@ static const VersionSettings scumm_settings[] = {
{"pj3-demo", "Pajama Sam 3: You Are What You Eat (Demo)", GID_PJSDEMO, 6, MDT_NONE,
GF_NEW_OPCODES | GF_AFTER_HEV7 | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
// bunch of backyard sports games...
-
+
+#endif
{NULL, NULL, 0, 0, MDT_NONE, 0, NULL}
};