mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-25 05:34:27 +00:00
BS1 demo is basically fully supported now.
only some SFX are flipped. svn-id: r15819
This commit is contained in:
parent
38baf0a0d3
commit
17f23ad3d5
@ -981,6 +981,8 @@ void Control::doRestore(void) {
|
||||
Logic::_scriptVars[CHANGE_STANCE] = STAND;
|
||||
Logic::_scriptVars[CHANGE_PLACE] = cpt->o_place;
|
||||
SwordEngine::_systemVars.justRestoredGame = 1;
|
||||
if (SwordEngine::_systemVars.isDemo)
|
||||
Logic::_scriptVars[PLAYINGDEMO] = 1;
|
||||
}
|
||||
|
||||
void Control::delay(uint32 msecs) {
|
||||
|
@ -37,6 +37,8 @@
|
||||
|
||||
#include "sword1/debug.h"
|
||||
|
||||
#include "gui/message.h"
|
||||
|
||||
namespace Sword1 {
|
||||
|
||||
#define MAX_STACK_SIZE 10
|
||||
@ -1630,7 +1632,12 @@ int Logic::fnRestartGame(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32
|
||||
}
|
||||
|
||||
int Logic::fnQuitGame(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32 d, int32 z, int32 x) {
|
||||
error("fnQuitGame() called");
|
||||
if (SwordEngine::_systemVars.isDemo) {
|
||||
GUI::MessageDialog dialog("This is the end of the Broken Sword 1 Demo", "OK", NULL);
|
||||
dialog.runModal();
|
||||
SwordEngine::_systemVars.engineQuit = true;
|
||||
} else
|
||||
error("fnQuitGame() called");
|
||||
return SCRIPT_STOP;
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,10 @@ int Sound::addToQueue(int32 fxNo) {
|
||||
warning("Sound queue overflow");
|
||||
return 0;
|
||||
}
|
||||
if ((fxNo == 168) && (SwordEngine::_systemVars.isDemo)) {
|
||||
// this sound doesn't exist in demo
|
||||
return 0;
|
||||
}
|
||||
_resMan->resOpen(_fxList[fxNo].sampleId);
|
||||
_fxQueue[_endOfQueue].id = fxNo;
|
||||
if (_fxList[fxNo].type == FX_SPOT)
|
||||
@ -140,6 +144,8 @@ void Sound::quitScreen(void) {
|
||||
}
|
||||
|
||||
void Sound::playSample(QueueElement *elem) {
|
||||
//if (((elem->id == 11) || (elem->id == 12) || (elem->id == 224)) && SwordEngine::_systemVars.isDemo)
|
||||
// return;
|
||||
uint8 *sampleData = (uint8*)_resMan->fetchRes(_fxList[elem->id].sampleId);
|
||||
for (uint16 cnt = 0; cnt < MAX_ROOMS_PER_FX; cnt++) {
|
||||
if (_fxList[elem->id].roomVolList[cnt].roomNo) {
|
||||
|
@ -1116,6 +1116,7 @@ void SwordEngine::checkCdFiles(void) { // check if we're running from cd, hdd or
|
||||
} else { // speech1 & speech2 not present. are we running from cd?
|
||||
if (test.open("cows.mad")) {
|
||||
_systemVars.isDemo = true;
|
||||
Logic::_scriptVars[PLAYINGDEMO] = 1;
|
||||
test.close();
|
||||
}
|
||||
if (test.open("cd1.id")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user