mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
o Proper implementation of sfPlaySound() which knows about CD<->floppy
difference o Fix regression in Mac titles where scene LUT wasn't conversed o Fix sound types in many games. Old Win demo is still wrong. svn-id: r16586
This commit is contained in:
parent
3211739728
commit
5200b8f1fa
@ -432,7 +432,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
ARRAYSIZE(ITEMACDEMO_GameFonts),
|
ARRAYSIZE(ITEMACDEMO_GameFonts),
|
||||||
ITEMACDEMO_GameFonts,
|
ITEMACDEMO_GameFonts,
|
||||||
&ITECD_GameSound,
|
&ITECD_GameSound,
|
||||||
GF_VOX_VOICES | GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP
|
GF_VOX_VOICES | GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP | GF_CD_FX
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - early MAC Demo version
|
// Inherit the earth - early MAC Demo version
|
||||||
@ -449,7 +449,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
ARRAYSIZE(ITEMACDEMO_GameFonts),
|
ARRAYSIZE(ITEMACDEMO_GameFonts),
|
||||||
ITEMACDEMO_GameFonts,
|
ITEMACDEMO_GameFonts,
|
||||||
&ITECD_GameSound,
|
&ITECD_GameSound,
|
||||||
GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP
|
GF_VOX_VOICES | GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP | GF_CD_FX
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - MAC CD Wyrmkeep version
|
// Inherit the earth - MAC CD Wyrmkeep version
|
||||||
@ -466,7 +466,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
ARRAYSIZE(ITEMACDEMO_GameFonts),
|
ARRAYSIZE(ITEMACDEMO_GameFonts),
|
||||||
ITEMACDEMO_GameFonts,
|
ITEMACDEMO_GameFonts,
|
||||||
&ITECD_GameSound,
|
&ITECD_GameSound,
|
||||||
GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP
|
GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP | GF_CD_FX
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - Linux Demo version
|
// Inherit the earth - Linux Demo version
|
||||||
@ -484,7 +484,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
ARRAYSIZE(ITECD_GameFonts),
|
ARRAYSIZE(ITECD_GameFonts),
|
||||||
ITECD_GameFonts,
|
ITECD_GameFonts,
|
||||||
&ITECD_GameSound,
|
&ITECD_GameSound,
|
||||||
GF_VOX_VOICES | GF_WYRMKEEP
|
GF_VOX_VOICES | GF_WYRMKEEP | GF_CD_FX
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - Linux Demo version
|
// Inherit the earth - Linux Demo version
|
||||||
@ -501,7 +501,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
ARRAYSIZE(ITECD_GameFonts),
|
ARRAYSIZE(ITECD_GameFonts),
|
||||||
ITECD_GameFonts,
|
ITECD_GameFonts,
|
||||||
&ITECD_GameSound,
|
&ITECD_GameSound,
|
||||||
GF_VOX_VOICES | GF_WYRMKEEP
|
GF_VOX_VOICES | GF_WYRMKEEP | GF_CD_FX
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - Win32 Demo version
|
// Inherit the earth - Win32 Demo version
|
||||||
@ -518,7 +518,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
ARRAYSIZE(ITEWINDEMO_GameFonts),
|
ARRAYSIZE(ITEWINDEMO_GameFonts),
|
||||||
ITEWINDEMO_GameFonts,
|
ITEWINDEMO_GameFonts,
|
||||||
&ITECD_GameSound,
|
&ITECD_GameSound,
|
||||||
GF_VOX_VOICES | GF_WYRMKEEP
|
GF_VOX_VOICES | GF_WYRMKEEP | GF_CD_FX
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - Wyrmkeep Linux CD version
|
// Inherit the earth - Wyrmkeep Linux CD version
|
||||||
@ -536,7 +536,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
ARRAYSIZE(ITECD_GameFonts),
|
ARRAYSIZE(ITECD_GameFonts),
|
||||||
ITECD_GameFonts,
|
ITECD_GameFonts,
|
||||||
&ITECD_GameSound,
|
&ITECD_GameSound,
|
||||||
GF_WYRMKEEP
|
GF_WYRMKEEP | GF_CD_FX
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - DOS CD version
|
// Inherit the earth - DOS CD version
|
||||||
@ -553,7 +553,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
ARRAYSIZE(ITECD_GameFonts),
|
ARRAYSIZE(ITECD_GameFonts),
|
||||||
ITECD_GameFonts,
|
ITECD_GameFonts,
|
||||||
&ITECD_GameSound,
|
&ITECD_GameSound,
|
||||||
0
|
GF_CD_FX
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - DOS CD German version
|
// Inherit the earth - DOS CD German version
|
||||||
@ -570,7 +570,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
ARRAYSIZE(ITECD_GameFonts),
|
ARRAYSIZE(ITECD_GameFonts),
|
||||||
ITECD_GameFonts,
|
ITECD_GameFonts,
|
||||||
&ITECD_GameSound,
|
&ITECD_GameSound,
|
||||||
GF_LANG_DE
|
GF_LANG_DE | GF_CD_FX
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - CD version
|
// Inherit the earth - CD version
|
||||||
@ -587,7 +587,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
ARRAYSIZE(ITECD_GameFonts),
|
ARRAYSIZE(ITECD_GameFonts),
|
||||||
ITECD_GameFonts,
|
ITECD_GameFonts,
|
||||||
&ITECD_GameSound,
|
&ITECD_GameSound,
|
||||||
0
|
GF_CD_FX
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - German Floppy version
|
// Inherit the earth - German Floppy version
|
||||||
|
@ -172,26 +172,27 @@ namespace Saga {
|
|||||||
#define FX_DOOR_OPEN_2 53
|
#define FX_DOOR_OPEN_2 53
|
||||||
#define FX_JAIL_DOOR 54
|
#define FX_JAIL_DOOR 54
|
||||||
#define FX_KILN_FIRE 55
|
#define FX_KILN_FIRE 55
|
||||||
|
#define FX_DUMMY 56
|
||||||
|
|
||||||
// These are only in the CD version
|
// These are only in the CD version
|
||||||
|
|
||||||
#define FX_CROWD_01 56
|
#define FX_CROWD_01 57
|
||||||
#define FX_CROWD_02 57
|
#define FX_CROWD_02 58
|
||||||
#define FX_CROWD_03 58
|
#define FX_CROWD_03 59
|
||||||
#define FX_CROWD_04 59
|
#define FX_CROWD_04 60
|
||||||
#define FX_CROWD_05 60
|
#define FX_CROWD_05 61
|
||||||
#define FX_CROWD_06 61
|
#define FX_CROWD_06 62
|
||||||
#define FX_CROWD_07 62
|
#define FX_CROWD_07 63
|
||||||
#define FX_CROWD_08 63
|
#define FX_CROWD_08 64
|
||||||
#define FX_CROWD_09 64
|
#define FX_CROWD_09 65
|
||||||
#define FX_CROWD_10 65
|
#define FX_CROWD_10 66
|
||||||
#define FX_CROWD_11 66
|
#define FX_CROWD_11 67
|
||||||
#define FX_CROWD_12 67
|
#define FX_CROWD_12 68
|
||||||
#define FX_CROWD_13 68
|
#define FX_CROWD_13 69
|
||||||
#define FX_CROWD_14 69
|
#define FX_CROWD_14 70
|
||||||
#define FX_CROWD_15 70
|
#define FX_CROWD_15 71
|
||||||
#define FX_CROWD_16 71
|
#define FX_CROWD_16 72
|
||||||
#define FX_CROWD_17 72
|
#define FX_CROWD_17 73
|
||||||
|
|
||||||
} // End of namespace Saga
|
} // End of namespace Saga
|
||||||
|
|
||||||
|
@ -271,7 +271,8 @@ enum GameFeatures {
|
|||||||
GF_BIG_ENDIAN_DATA = 1 << 1,
|
GF_BIG_ENDIAN_DATA = 1 << 1,
|
||||||
GF_MAC_RESOURCES = 1 << 2,
|
GF_MAC_RESOURCES = 1 << 2,
|
||||||
GF_LANG_DE = 1 << 3,
|
GF_LANG_DE = 1 << 3,
|
||||||
GF_WYRMKEEP = 1 << 4
|
GF_WYRMKEEP = 1 << 4,
|
||||||
|
GF_CD_FX = 1 << 5
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GameSoundInfo {
|
struct GameSoundInfo {
|
||||||
|
@ -66,8 +66,8 @@ Scene::Scene(SagaEngine *vm) : _vm(vm), _initialized(false) {
|
|||||||
|
|
||||||
|
|
||||||
// Load scene lookup table
|
// Load scene lookup table
|
||||||
debug(0, "Loading scene LUT from resource %u.", _vm->getResourceDescription()->scene_lut_rn);
|
debug(0, "Loading scene LUT from resource %u.", RSC_ConvertID(_vm->getResourceDescription()->scene_lut_rn));
|
||||||
result = RSC_LoadResource(_sceneContext, _vm->getResourceDescription()->scene_lut_rn, &scene_lut_p, &scene_lut_len);
|
result = RSC_LoadResource(_sceneContext, RSC_ConvertID(_vm->getResourceDescription()->scene_lut_rn), &scene_lut_p, &scene_lut_len);
|
||||||
if (result != SUCCESS) {
|
if (result != SUCCESS) {
|
||||||
warning("Scene::Scene(): Error: couldn't load scene LUT");
|
warning("Scene::Scene(): Error: couldn't load scene LUT");
|
||||||
return;
|
return;
|
||||||
|
@ -1453,12 +1453,18 @@ static struct {
|
|||||||
|
|
||||||
// Script function #70 (0x46)
|
// Script function #70 (0x46)
|
||||||
int Script::sfPlaySound(SCRIPTFUNC_PARAMS) {
|
int Script::sfPlaySound(SCRIPTFUNC_PARAMS) {
|
||||||
ScriptDataWord param = thread->pop() - 13;
|
int param = getSWord(thread->pop());
|
||||||
|
int res;
|
||||||
|
|
||||||
if (/* param >= 0 && */ param < ARRAYSIZE(sfxTable))
|
if (param < ARRAYSIZE(sfxTable)) {
|
||||||
_vm->_sndRes->playSound(sfxTable[param].res, sfxTable[param].vol, false);
|
res = sfxTable[param].res;
|
||||||
else
|
if (_vm->getFeatures() & GF_CD_FX)
|
||||||
|
res -= 14;
|
||||||
|
|
||||||
|
_vm->_sndRes->playSound(res, sfxTable[param].vol, false);
|
||||||
|
} else {
|
||||||
_vm->_sound->stopSound();
|
_vm->_sound->stopSound();
|
||||||
|
}
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user