mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-06 09:48:39 +00:00
Restrict scene substitutes only to demos which actually use them
svn-id: r18597
This commit is contained in:
parent
e85519624d
commit
208815a811
@ -804,7 +804,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
&ITEMACDEMO_GameMusic,
|
&ITEMACDEMO_GameMusic,
|
||||||
ARRAYSIZE(ITEMacPatch_Files),
|
ARRAYSIZE(ITEMacPatch_Files),
|
||||||
ITEMacPatch_Files,
|
ITEMacPatch_Files,
|
||||||
GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP | GF_CD_FX
|
GF_BIG_ENDIAN_DATA | GF_MAC_RESOURCES | GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - early MAC Demo version
|
// Inherit the earth - early MAC Demo version
|
||||||
@ -868,7 +868,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
&ITELINDEMO_GameMusic,
|
&ITELINDEMO_GameMusic,
|
||||||
ARRAYSIZE(ITELinPatch_Files),
|
ARRAYSIZE(ITELinPatch_Files),
|
||||||
ITELinPatch_Files,
|
ITELinPatch_Files,
|
||||||
GF_WYRMKEEP | GF_CD_FX
|
GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - Win32 Demo version
|
// Inherit the earth - Win32 Demo version
|
||||||
@ -889,7 +889,7 @@ static GameDescription gameDescriptions[] = {
|
|||||||
NULL,
|
NULL,
|
||||||
ARRAYSIZE(ITEWinPatch2_Files),
|
ARRAYSIZE(ITEWinPatch2_Files),
|
||||||
ITEWinPatch2_Files,
|
ITEWinPatch2_Files,
|
||||||
GF_WYRMKEEP | GF_CD_FX
|
GF_WYRMKEEP | GF_CD_FX | GF_SCENE_SUBSTITUTES
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inherit the earth - early Win32 Demo version
|
// Inherit the earth - early Win32 Demo version
|
||||||
|
@ -304,7 +304,8 @@ enum GameFeatures {
|
|||||||
GF_MAC_RESOURCES = 1 << 1,
|
GF_MAC_RESOURCES = 1 << 1,
|
||||||
GF_LANG_DE = 1 << 2,
|
GF_LANG_DE = 1 << 2,
|
||||||
GF_WYRMKEEP = 1 << 3,
|
GF_WYRMKEEP = 1 << 3,
|
||||||
GF_CD_FX = 1 << 4
|
GF_CD_FX = 1 << 4,
|
||||||
|
GF_SCENE_SUBSTITUTES = 1 << 5
|
||||||
};
|
};
|
||||||
|
|
||||||
enum FontId {
|
enum FontId {
|
||||||
|
@ -364,30 +364,33 @@ static struct SceneSubstitutes {
|
|||||||
void Scene::changeScene(uint16 sceneNumber, int actorsEntrance, SceneTransitionType transitionType) {
|
void Scene::changeScene(uint16 sceneNumber, int actorsEntrance, SceneTransitionType transitionType) {
|
||||||
// This is used for latter demos where all places on world map except
|
// This is used for latter demos where all places on world map except
|
||||||
// Tent Faire are substituted with LBM picture and short description
|
// Tent Faire are substituted with LBM picture and short description
|
||||||
for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) {
|
if (_vm->getFeatures() & GF_SCENE_SUBSTITUTES) {
|
||||||
|
for (int i = 0; i < ARRAYSIZE(sceneSubstitutes); i++) {
|
||||||
|
if (sceneSubstitutes[i].sceneId == sceneNumber) {
|
||||||
|
Surface *backBuffer = _vm->_gfx->getBackBuffer();
|
||||||
|
Surface bbmBuffer;
|
||||||
|
byte *pal, *colors;
|
||||||
|
Common::File file;
|
||||||
|
Rect rect;
|
||||||
|
PalEntry cPal[PAL_ENTRIES];
|
||||||
|
|
||||||
if (sceneSubstitutes[i].sceneId == sceneNumber) {
|
|
||||||
Surface *backBuffer = _vm->_gfx->getBackBuffer();
|
|
||||||
Surface bbmBuffer;
|
|
||||||
byte *pal, *colors;
|
|
||||||
Common::File file;
|
|
||||||
Rect rect;
|
|
||||||
PalEntry cPal[PAL_ENTRIES];
|
|
||||||
|
|
||||||
if (file.open(sceneSubstitutes[i].image)) {
|
|
||||||
_vm->_interface->setMode(kPanelSceneSubstitute);
|
_vm->_interface->setMode(kPanelSceneSubstitute);
|
||||||
Graphics::decodeILBM(file, bbmBuffer, pal);
|
|
||||||
colors = pal;
|
if (file.open(sceneSubstitutes[i].image)) {
|
||||||
rect.setWidth(bbmBuffer.w);
|
Graphics::decodeILBM(file, bbmBuffer, pal);
|
||||||
rect.setHeight(bbmBuffer.h);
|
colors = pal;
|
||||||
backBuffer->blit(rect, (const byte*)bbmBuffer.pixels);
|
rect.setWidth(bbmBuffer.w);
|
||||||
for (int j = 0; j < PAL_ENTRIES; j++) {
|
rect.setHeight(bbmBuffer.h);
|
||||||
cPal[j].red = *pal++;
|
backBuffer->blit(rect, (const byte*)bbmBuffer.pixels);
|
||||||
cPal[j].green = *pal++;
|
for (int j = 0; j < PAL_ENTRIES; j++) {
|
||||||
cPal[j].blue = *pal++;
|
cPal[j].red = *pal++;
|
||||||
|
cPal[j].green = *pal++;
|
||||||
|
cPal[j].blue = *pal++;
|
||||||
|
}
|
||||||
|
free(colors);
|
||||||
|
_vm->_gfx->setPalette(cPal);
|
||||||
|
|
||||||
}
|
}
|
||||||
free(colors);
|
|
||||||
_vm->_gfx->setPalette(cPal);
|
|
||||||
|
|
||||||
_vm->_interface->setStatusText("Click or Press Return to continue. Press Q to quit.", 96);
|
_vm->_interface->setStatusText("Click or Press Return to continue. Press Q to quit.", 96);
|
||||||
_vm->_font->textDrawRect(kMediumFont, backBuffer, sceneSubstitutes[i].title,
|
_vm->_font->textDrawRect(kMediumFont, backBuffer, sceneSubstitutes[i].title,
|
||||||
|
Loading…
Reference in New Issue
Block a user