The game sets its own DEMO variable, so we might as well check that one as

checking the GF_DEMO flag. (There's still one "unnecessary" reference to
GF_DEMO in functions.cpp, but I plan on rewriting that function soon so I
don't want to touch it right now.)

svn-id: r12009
This commit is contained in:
Torbjörn Andersson 2003-12-29 15:30:10 +00:00
parent e559a32323
commit ea39ef6d7d
5 changed files with 9 additions and 9 deletions

View File

@ -714,7 +714,7 @@ int32 Logic::fnPlaySequence(int32 *params) {
MoviePlayer player(_vm);
if (_sequenceTextLines && !(_vm->_features & GF_DEMO))
if (_sequenceTextLines && !DEMO)
rv = player.play(filename, sequenceSpeechArray, leadOut);
else
rv = player.play(filename, NULL, leadOut);

View File

@ -576,7 +576,7 @@ void Sword2Engine::initialiseFontResourceFlags(void) {
// Get the text line - skip the 2 chars containing the wavId
if (_features & GF_DEMO)
if (DEMO)
textLine = fetchTextLine(textFile, 451) + 2;
else
textLine = fetchTextLine(textFile, 54) + 2;

View File

@ -431,7 +431,7 @@ uint8 *ResourceManager::openResource(uint32 res, bool dump) {
// playing a demo, then we're in trouble if the file
// can't be found!
if ((_vm->_features & GF_DEMO) || (_cdTab[parent_res_file] & LOCAL_PERM))
if (DEMO || (_cdTab[parent_res_file] & LOCAL_PERM))
error("Could not find '%s'", _resourceFiles[parent_res_file]);
getCd(_cdTab[parent_res_file] & 3);

View File

@ -361,7 +361,7 @@ int32 Logic::fnPlayMusic(int32 *params) {
// add the appropriate file extension & play it
if (_vm->_features & GF_DEMO) {
if (DEMO) {
// The demo I found didn't come with any music file, but you
// could use the music from the first CD of the complete game,
// I suppose...

View File

@ -247,10 +247,10 @@ int32 Sword2Engine::initialiseGame(void) {
initFxQueue();
// all demos (not just web)
if (_features & GF_DEMO) {
// set script variable
if (_features & GF_DEMO)
DEMO = 1;
}
else
DEMO = 0;
return 0;
}
@ -366,7 +366,7 @@ void Sword2Engine::go() {
pauseGame();
break;
case 'c':
if (!(_features & GF_DEMO))
if (!DEMO)
_logic->fnPlayCredits(NULL);
break;
#ifdef _SWORD2_DEBUG
@ -420,7 +420,7 @@ void Sword2Engine::startGame(void) {
debug(5, "startGame() STARTING:");
// all demos not just web
if (_features & GF_DEMO)
if (DEMO)
screen_manager_id = 19; // DOCKS SECTION START
else
screen_manager_id = 949; // INTRO & PARIS START