[Scummvm-cvs-logs] SF.net SVN: scummvm: [28748] scummvm/trunk/engines/saga
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Aug 26 17:57:30 CEST 2007
Revision: 28748
http://scummvm.svn.sourceforge.net/scummvm/?rev=28748&view=rev
Author: thebluegr
Date: 2007-08-26 08:57:30 -0700 (Sun, 26 Aug 2007)
Log Message:
-----------
Cleanup
Modified Paths:
--------------
scummvm/trunk/engines/saga/detection.cpp
scummvm/trunk/engines/saga/detection_tables.h
scummvm/trunk/engines/saga/interface.cpp
scummvm/trunk/engines/saga/saga.h
scummvm/trunk/engines/saga/saveload.cpp
Modified: scummvm/trunk/engines/saga/detection.cpp
===================================================================
--- scummvm/trunk/engines/saga/detection.cpp 2007-08-26 15:08:44 UTC (rev 28747)
+++ scummvm/trunk/engines/saga/detection.cpp 2007-08-26 15:57:30 UTC (rev 28748)
@@ -49,7 +49,6 @@
const GameFontDescription *fontDescriptions;
const GameSoundInfo *voiceInfo;
const GameSoundInfo *sfxInfo;
- const GameSoundInfo *musicInfo;
int patchesCount;
const GamePatchDescription *patchDescriptions;
};
@@ -59,8 +58,19 @@
const GameResourceDescription *SagaEngine::getResourceDescription() { return _gameDescription->resourceDescription; }
const GameSoundInfo *SagaEngine::getVoiceInfo() const { return _gameDescription->voiceInfo; }
const GameSoundInfo *SagaEngine::getSfxInfo() const { return _gameDescription->sfxInfo; }
-const GameSoundInfo *SagaEngine::getMusicInfo() const { return _gameDescription->musicInfo; }
+const GameSoundInfo *SagaEngine::getMusicInfo() const {
+ static GameSoundInfo musicInfo;
+ musicInfo.resourceType = kSoundPCM;
+ musicInfo.frequency = 11025;
+ musicInfo.sampleBits = 16;
+ // The digital music in the ITE Mac demo version is not stereo
+ musicInfo.stereo = _gameDescription->gameType == GID_ITE_MACDEMO2 ? false : true;
+ musicInfo.isBigEndian = false;
+ musicInfo.isSigned = true;
+ return &musicInfo;
+}
+
const GameFontDescription *SagaEngine::getFontDescription(int index) {
assert(index < _gameDescription->fontsCount);
return &_gameDescription->fontDescriptions[index];
Modified: scummvm/trunk/engines/saga/detection_tables.h
===================================================================
--- scummvm/trunk/engines/saga/detection_tables.h 2007-08-26 15:08:44 UTC (rev 28747)
+++ scummvm/trunk/engines/saga/detection_tables.h 2007-08-26 15:57:30 UTC (rev 28748)
@@ -105,12 +105,10 @@
// frequency, sampleBits, stereo, isBigEndian, isSigned
static const GameSoundInfo ITEPC_GameSound = { kSoundPCM, 22050, 16, false, false, true };
static const GameSoundInfo ITEMAC_GameSound = { kSoundPCM, 22050, 16, false, true, true };
-static const GameSoundInfo ITEMACCD_G_GameSound = { kSoundMacPCM, 22050, 8, false, false, false };
static const GameSoundInfo ITEWINDEMO1_GameSound = { kSoundPCM, 22050, 8, false, false, false };
+static const GameSoundInfo ITEMACCD_G_GameSound = { kSoundMacPCM, 22050, 8, false, false, false };
static const GameSoundInfo ITEDISK_GameSound = { kSoundVOC, -1, -1, false, false, true };
static const GameSoundInfo ITEDEMO_GameVoice = { kSoundVOX, 22050, 16, false, false, true };
-static const GameSoundInfo ITEMACDEMO_GameMusic = { kSoundPCM, 11025, 16, false, false, true };
-static const GameSoundInfo ITEMACCD_GameMusic = { kSoundPCM, 11025, 16, true, false, true };
static const GameSoundInfo IHNM_GameSound = { kSoundWAV, -1, -1, false, false, true };
// Patch files. Files not found will be ignored
@@ -201,7 +199,6 @@
ITEDEMO_GameFonts,
&ITEDISK_GameSound,
&ITEDISK_GameSound,
- &ITEMACCD_GameMusic, // note: this version did not originally have digital music
0,
NULL,
},
@@ -233,7 +230,6 @@
ITEWINDEMO_GameFonts,
&ITEDEMO_GameVoice,
&ITEMAC_GameSound,
- &ITEMACDEMO_GameMusic,
ARRAYSIZE(ITEMacPatch_Files),
ITEMacPatch_Files,
},
@@ -268,7 +264,6 @@
ITEWINDEMO_GameFonts,
&ITEDEMO_GameVoice,
&ITEMAC_GameSound,
- &ITEMACCD_GameMusic,
ARRAYSIZE(ITEMacPatch_Files),
ITEMacPatch_Files,
},
@@ -301,7 +296,6 @@
ITEWINDEMO_GameFonts,
&ITEDEMO_GameVoice,
&ITEPC_GameSound,
- &ITEMACCD_GameMusic,
ARRAYSIZE(ITEPatch_Files),
ITEPatch_Files,
},
@@ -335,7 +329,6 @@
ITEWINDEMO_GameFonts,
&ITEWINDEMO1_GameSound,
&ITEWINDEMO1_GameSound,
- &ITEMACCD_GameMusic, // note: this version did not originally have digital music
ARRAYSIZE(ITEPatch_Files),
ITEPatch_Files,
},
@@ -372,7 +365,6 @@
ITEWINDEMO_GameFonts,
&ITEMACCD_G_GameSound,
&ITEMACCD_G_GameSound,
- &ITEMACCD_GameMusic, // note: this version did not originally have digital music
0,
NULL,
},
@@ -403,7 +395,6 @@
ITEWINDEMO_GameFonts,
&ITEMAC_GameSound,
&ITEMAC_GameSound,
- &ITEMACCD_GameMusic,
ARRAYSIZE(ITEMacPatch_Files),
ITEMacPatch_Files,
},
@@ -442,7 +433,6 @@
ITE_GameFonts,
&ITEMAC_GameSound,
&ITEPC_GameSound,
- &ITEMACCD_GameMusic,
0,
NULL,
},
@@ -473,7 +463,6 @@
ITE_GameFonts,
&ITEPC_GameSound,
&ITEPC_GameSound,
- &ITEMACCD_GameMusic,
ARRAYSIZE(ITEPatch_Files),
ITEPatch_Files,
},
@@ -503,7 +492,6 @@
ITE_GameFonts,
&ITEPC_GameSound,
&ITEPC_GameSound,
- &ITEMACCD_GameMusic, // note: this version did not originally have digital music
ARRAYSIZE(ITEPatch_Files),
ITEPatch_Files,
},
@@ -534,7 +522,6 @@
ITE_GameFonts,
&ITEPC_GameSound,
&ITEPC_GameSound,
- &ITEMACCD_GameMusic, // note: this version did not originally have digital music
0,
NULL,
},
@@ -566,7 +553,6 @@
ITE_GameFonts,
&ITEDISK_GameSound,
&ITEDISK_GameSound,
- &ITEMACCD_GameMusic, // note: this version did not originally have digital music
0,
NULL,
},
@@ -595,7 +581,6 @@
ITE_GameFonts,
&ITEDISK_GameSound,
&ITEDISK_GameSound,
- &ITEMACCD_GameMusic, // note: this version did not originally have digital music
ARRAYSIZE(ITEPatch_Files),
ITEPatch_Files,
},
@@ -634,7 +619,6 @@
IHNMDEMO_GameFonts,
&IHNM_GameSound,
&IHNM_GameSound,
- NULL,
0,
NULL,
},
@@ -673,7 +657,6 @@
IHNMCD_GameFonts,
&IHNM_GameSound,
&IHNM_GameSound,
- NULL,
0,
NULL,
},
@@ -713,7 +696,6 @@
IHNMCD_GameFonts,
&IHNM_GameSound,
&IHNM_GameSound,
- NULL,
0,
NULL,
},
@@ -752,7 +734,6 @@
IHNMCD_GameFonts,
&IHNM_GameSound,
&IHNM_GameSound,
- NULL,
0,
NULL,
},
@@ -791,7 +772,6 @@
IHNMCD_GameFonts,
&IHNM_GameSound,
&IHNM_GameSound,
- NULL,
0,
NULL,
},
@@ -830,11 +810,10 @@
IHNMCD_GameFonts,
&IHNM_GameSound,
&IHNM_GameSound,
- NULL,
0,
NULL,
},
- { AD_TABLE_END_MARKER, 0, 0, 0, 0, NULL, 0, NULL, NULL, NULL, NULL, 0, NULL }
+ { AD_TABLE_END_MARKER, 0, 0, 0, 0, NULL, 0, NULL, NULL, NULL, 0, NULL }
};
} // End of namespace Saga
Modified: scummvm/trunk/engines/saga/interface.cpp
===================================================================
--- scummvm/trunk/engines/saga/interface.cpp 2007-08-26 15:08:44 UTC (rev 28747)
+++ scummvm/trunk/engines/saga/interface.cpp 2007-08-26 15:57:30 UTC (rev 28748)
@@ -1154,10 +1154,9 @@
uint tempWidth;
memset(tempString, 0, SAVE_TITLE_SIZE);
ch[1] = 0;
- // ITE has a maximum save title size of SAVE_TITLE_SIZE (28), but IHNM has a slightly smaller
- // save title size (21). We only limit the save title size during text input, to preserve
- // backwards compatibility with older save games
- uint save_title_size = _vm->getGameType() == GType_ITE ? SAVE_TITLE_SIZE : SAVE_TITLE_SIZE - 6;
+ // IHNM has a smaller save title size than ITE. We only limit the save title size during text input
+ // in IHNM, to preserve backwards compatibility with older save games
+ uint save_title_size = _vm->getGameType() == GType_ITE ? SAVE_TITLE_SIZE : IHNM_SAVE_TITLE_SIZE;
switch (ascii) {
case 13:
Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h 2007-08-26 15:08:44 UTC (rev 28747)
+++ scummvm/trunk/engines/saga/saga.h 2007-08-26 15:57:30 UTC (rev 28748)
@@ -69,7 +69,12 @@
#define MAXPATH 512 //TODO: remove
+// Note that IHNM has a smaller save title size than ITE
+// We allocate the ITE save title size in savegames, to
+// preserve savegame backwards compatibility. We only check
+// for IHNM's save title during text input
#define SAVE_TITLE_SIZE 28
+#define IHNM_SAVE_TITLE_SIZE 22
#define MAX_SAVES 96
#define MAX_FILE_NAME 256
Modified: scummvm/trunk/engines/saga/saveload.cpp
===================================================================
--- scummvm/trunk/engines/saga/saveload.cpp 2007-08-26 15:08:44 UTC (rev 28747)
+++ scummvm/trunk/engines/saga/saveload.cpp 2007-08-26 15:57:30 UTC (rev 28748)
@@ -169,6 +169,9 @@
_saveHeader.type = MKID_BE('SAGA');
_saveHeader.size = 0;
_saveHeader.version = CURRENT_SAGA_VER;
+ // Note that IHNM has a smaller save title size than ITE
+ // We allocate the ITE save title size here, to preserve
+ // savegame backwards compatibility
strncpy(_saveHeader.name, saveName, SAVE_TITLE_SIZE);
out->writeUint32BE(_saveHeader.type);
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