- IHNM Mac loads correctly again
- Removed isBigEndian from GameSoundInfo - Removed GF_BIG_ENDIAN_DATA - Stopped loading the options panel for non-interactive ITE demos (it doesn't exist) - Fixed crash when exiting from non-interactive ITE demos svn-id: r35615
This commit is contained in:
parent
842af1ee4a
commit
9a5f45a40c
7 changed files with 41 additions and 36 deletions
|
@ -56,7 +56,7 @@ struct SAGAGameDescription {
|
|||
const GamePatchDescription *patchDescriptions;
|
||||
};
|
||||
|
||||
bool SagaEngine::isBigEndian() const { return (_gameDescription->features & GF_BIG_ENDIAN_DATA) != 0; }
|
||||
bool SagaEngine::isBigEndian() const { return isMacResources() && getGameId() == GID_ITE; }
|
||||
bool SagaEngine::isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); }
|
||||
const GameResourceDescription *SagaEngine::getResourceDescription() { return _gameDescription->resourceDescription; }
|
||||
const GameSoundInfo *SagaEngine::getVoiceInfo() const { return _gameDescription->voiceInfo; }
|
||||
|
@ -65,7 +65,6 @@ const GameSoundInfo *SagaEngine::getMusicInfo() const {
|
|||
static GameSoundInfo musicInfo;
|
||||
musicInfo.resourceType = kSoundPCM;
|
||||
musicInfo.sampleBits = 16;
|
||||
musicInfo.isBigEndian = false;
|
||||
musicInfo.isSigned = true;
|
||||
|
||||
return &musicInfo;
|
||||
|
|
|
@ -112,14 +112,14 @@ static const GameFontDescription IHNMDEMO_GameFonts[] = { {2}, {3}, {4} };
|
|||
// Font 6 is kIHNMFont8, font 8 is kIHNMMainFont
|
||||
static const GameFontDescription IHNMCD_GameFonts[] = { {2}, {3}, {4}, {5}, {6}, {7}, {8} };
|
||||
|
||||
// sampleBits, isBigEndian, isSigned
|
||||
static const GameSoundInfo ITEPC_GameSound = { kSoundPCM, 16, false, true };
|
||||
static const GameSoundInfo ITEWINDEMO1_GameSound = { kSoundPCM, 8, false, false };
|
||||
static const GameSoundInfo ITEMACCD_G_GameSound = { kSoundMacPCM, 8, false, false };
|
||||
static const GameSoundInfo ITEDISK_GameSound = { kSoundVOC, -1, false, true };
|
||||
static const GameSoundInfo ITEDEMO_GameVoice = { kSoundVOX, 16, false, true };
|
||||
static const GameSoundInfo IHNM_GameSound = { kSoundWAV, -1, false, true };
|
||||
static const GameSoundInfo MAC_GameSound = { kSoundPCM, 16, true, true };
|
||||
// sampleBits, isSigned
|
||||
static const GameSoundInfo ITEPC_GameSound = { kSoundPCM, 16, true };
|
||||
static const GameSoundInfo ITEWINDEMO1_GameSound = { kSoundPCM, 8, false };
|
||||
static const GameSoundInfo ITEMACCD_G_GameSound = { kSoundMacPCM, 8, false };
|
||||
static const GameSoundInfo ITEDISK_GameSound = { kSoundVOC, -1, true };
|
||||
static const GameSoundInfo ITEDEMO_GameVoice = { kSoundVOX, 16, true };
|
||||
static const GameSoundInfo IHNM_GameSound = { kSoundWAV, -1, true };
|
||||
static const GameSoundInfo MAC_GameSound = { kSoundPCM, 16, true };
|
||||
|
||||
// Patch files. Files not found will be ignored
|
||||
static const GamePatchDescription ITEPatch_Files[] = {
|
||||
|
@ -230,7 +230,7 @@ static const SAGAGameDescription gameDescriptions[] = {
|
|||
Common::ADGF_DEMO
|
||||
},
|
||||
GID_ITE,
|
||||
GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_SCENE_SUBSTITUTES | GF_MONO_MUSIC,
|
||||
GF_WYRMKEEP | GF_SCENE_SUBSTITUTES | GF_MONO_MUSIC,
|
||||
ITE_DEFAULT_SCENE,
|
||||
&ITE_Resources,
|
||||
ARRAYSIZE(ITEWINDEMO_GameFonts),
|
||||
|
@ -257,7 +257,7 @@ static const SAGAGameDescription gameDescriptions[] = {
|
|||
Common::ADGF_DEMO
|
||||
},
|
||||
GID_ITE,
|
||||
GF_BIG_ENDIAN_DATA | GF_WYRMKEEP | GF_NON_INTERACTIVE,
|
||||
GF_WYRMKEEP | GF_NON_INTERACTIVE,
|
||||
ITE_DEFAULT_SCENE,
|
||||
&ITE_Resources,
|
||||
ARRAYSIZE(ITEWINDEMO_GameFonts),
|
||||
|
@ -345,7 +345,7 @@ static const SAGAGameDescription gameDescriptions[] = {
|
|||
Common::ADGF_NO_FLAGS
|
||||
},
|
||||
GID_ITE,
|
||||
GF_BIG_ENDIAN_DATA,
|
||||
0,
|
||||
ITE_DEFAULT_SCENE,
|
||||
&ITE_Resources,
|
||||
ARRAYSIZE(ITEWINDEMO_GameFonts),
|
||||
|
@ -370,7 +370,7 @@ static const SAGAGameDescription gameDescriptions[] = {
|
|||
Common::ADGF_NO_FLAGS
|
||||
},
|
||||
GID_ITE,
|
||||
GF_BIG_ENDIAN_DATA | GF_WYRMKEEP,
|
||||
GF_WYRMKEEP,
|
||||
ITE_DEFAULT_SCENE,
|
||||
&ITE_Resources,
|
||||
ARRAYSIZE(ITEWINDEMO_GameFonts),
|
||||
|
@ -825,7 +825,7 @@ static const SAGAGameDescription gameDescriptions[] = {
|
|||
Common::ADGF_NO_FLAGS
|
||||
},
|
||||
GID_IHNM,
|
||||
0, // GF_BIG_ENDIAN_DATA
|
||||
0,
|
||||
IHNM_DEFAULT_SCENE,
|
||||
&IHNM_Resources,
|
||||
ARRAYSIZE(IHNMCD_GameFonts),
|
||||
|
|
|
@ -166,6 +166,7 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
|
|||
free(resource);
|
||||
|
||||
// Option panel
|
||||
if (!(_vm->getFeatures() & GF_NON_INTERACTIVE)) {
|
||||
_optionPanel.buttons = _vm->getDisplayInfo().optionPanelButtons;
|
||||
_optionPanel.buttonsCount = _vm->getDisplayInfo().optionPanelButtonsCount;
|
||||
|
||||
|
@ -173,6 +174,11 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
|
|||
_vm->decodeBGImage(resource, resourceLength, &_optionPanel.image,
|
||||
&_optionPanel.imageLength, &_optionPanel.imageWidth, &_optionPanel.imageHeight);
|
||||
free(resource);
|
||||
} else {
|
||||
_optionPanel.buttons = NULL;
|
||||
_optionPanel.buttonsCount = 0;
|
||||
_optionPanel.sprites.spriteCount = 0;
|
||||
}
|
||||
|
||||
// Quit panel
|
||||
if (_vm->getGameId() == GID_IHNM) {
|
||||
|
|
|
@ -433,7 +433,7 @@ bool Resource::createContexts() {
|
|||
} else if (!soundFileInArray && i == soundFileIndex) {
|
||||
context->fileName = soundFileName;
|
||||
context->fileType = GAME_SOUNDFILE;
|
||||
} else if (_vm->_voiceFilesExist && i == voicesFileIndex) {
|
||||
} else if (_vm->_voiceFilesExist && i == voicesFileIndex && !(_vm->getGameId() == GID_IHNM && _vm->isMacResources())) {
|
||||
context->fileName = _voicesFileName[0];
|
||||
// can be GAME_VOICEFILE or GAME_SOUNDFILE | GAME_VOICEFILE or GAME_VOICEFILE | GAME_SWAPENDIAN
|
||||
context->fileType = voiceFileType;
|
||||
|
|
|
@ -116,16 +116,15 @@ enum GameFileTypes {
|
|||
};
|
||||
|
||||
enum GameFeatures {
|
||||
GF_BIG_ENDIAN_DATA = 1 << 0,
|
||||
GF_WYRMKEEP = 1 << 1,
|
||||
GF_ITE_FLOPPY = 1 << 2,
|
||||
GF_SCENE_SUBSTITUTES = 1 << 3,
|
||||
GF_COMPRESSED_SOUNDS = 1 << 4,
|
||||
GF_NON_INTERACTIVE = 1 << 5,
|
||||
GF_OLD_ITE_DOS = 1 << 6,
|
||||
GF_MONO_MUSIC = 1 << 7,
|
||||
GF_EXTRA_ITE_CREDITS = 1 << 8,
|
||||
GF_IHNM_DEMO = 1 << 9
|
||||
GF_WYRMKEEP = 1 << 0,
|
||||
GF_ITE_FLOPPY = 1 << 1,
|
||||
GF_SCENE_SUBSTITUTES = 1 << 2,
|
||||
GF_COMPRESSED_SOUNDS = 1 << 3,
|
||||
GF_NON_INTERACTIVE = 1 << 4,
|
||||
GF_OLD_ITE_DOS = 1 << 5,
|
||||
GF_MONO_MUSIC = 1 << 6,
|
||||
GF_EXTRA_ITE_CREDITS = 1 << 7,
|
||||
GF_IHNM_DEMO = 1 << 8
|
||||
};
|
||||
|
||||
enum VerbTypeIds {
|
||||
|
@ -293,7 +292,6 @@ struct GameDisplayInfo;
|
|||
struct GameSoundInfo {
|
||||
GameSoundTypes resourceType;
|
||||
int sampleBits;
|
||||
bool isBigEndian;
|
||||
bool isSigned;
|
||||
};
|
||||
|
||||
|
|
|
@ -270,7 +270,7 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
|
|||
|
||||
}
|
||||
|
||||
buffer.isBigEndian = soundInfo->isBigEndian;
|
||||
buffer.isBigEndian = _vm->isMacResources();
|
||||
buffer.soundType = resourceType;
|
||||
buffer.originalSize = 0;
|
||||
|
||||
|
|
|
@ -49,8 +49,10 @@ struct SpriteList {
|
|||
SpriteInfo *infoList;
|
||||
|
||||
void freeMem() {
|
||||
int i;
|
||||
for (i = 0; i < spriteCount; i++) {
|
||||
if (!spriteListResourceId)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < spriteCount; i++) {
|
||||
free(infoList[i].decodedBuffer);
|
||||
}
|
||||
free(infoList);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue