Some code for the intro only LoL demo. It is disabled currently though.

svn-id: r40187
This commit is contained in:
Johannes Schickel 2009-04-28 18:56:54 +00:00
parent bc3dcd468a
commit 7661d82ace
4 changed files with 26 additions and 3 deletions

View File

@ -71,6 +71,7 @@ namespace {
#define LOL_FLOPPY_FLAGS FLAGS(false, false, false, false, false, false, false, Kyra::GI_LOL)
#define LOL_FLOPPY_CMP_FLAGS FLAGS(false, false, false, false, false, false, true, Kyra::GI_LOL)
#define LOL_PC98_SJIS_FLAGS FLAGS(false, false, false, true, true, false, false, Kyra::GI_LOL)
#define LOL_DEMO_FLAGS FLAGS(true, false, false, false, false, false, false, Kyra::GI_LOL)
#define LOL_KYRA2_DEMO_FLAGS FLAGS(true, false, false, false, false, false, false, Kyra::GI_KYRA2)
const KYRAGameDescription adGameDescs[] = {
@ -1035,6 +1036,25 @@ const KYRAGameDescription adGameDescs[] = {
LOL_PC98_SJIS_FLAGS
},
// TODO: It looks like this demo version does not WSA v2 files, thus being
// quite old... Our TIM player does not support that currently, thus
// we disable the detection entry for now.
/*{
{
"lol",
"Demo",
{
{ "INTRO.PAK", 0, "4bc22a3b57f19a49212c5de58ab014d6", -1 },
{ "INTROVOC.PAK", 0, "7e578e4f1da31c1f294e14a8e8f3cc44", -1 },
{ 0, 0, 0, 0 }
},
Common::EN_ANY,
Common::kPlatformPC,
ADGF_DEMO
},
LOL_DEMO_FLAGS
},*/
{
{
"lol",

View File

@ -506,9 +506,12 @@ Common::Error LoLEngine::go() {
setupPrologueData(true);
_sound->setSoundList(&_soundData[kMusicIntro]);
if (!saveFileLoadable(0))
if (!saveFileLoadable(0) || _flags.isDemo)
showIntro();
if (_flags.isDemo)
return Common::kNoError;
preInit();
int processSelection = -1;

View File

@ -123,7 +123,7 @@ bool Resource::reset() {
if (_vm->gameFlags().useInstallerPackage)
_files.add("installer", loadInstallerArchive("WESTWOOD", "%d", 0), 2, false);
if (!_vm->gameFlags().isTalkie) {
if (!_vm->gameFlags().isTalkie && !_vm->gameFlags().isDemo) {
static const char * const list[] = {
"GENERAL.PAK", 0
};

View File

@ -92,7 +92,7 @@ void LoLEngine::setupPrologueData(bool load) {
} else {
delete _chargenWSA; _chargenWSA = 0;
if (!_res->loadFileList("FILEDATA.FDT"))
if (!_flags.isDemo && !_res->loadFileList("FILEDATA.FDT"))
error("Couldn't load file list: 'FILEDATA.FDT'");
uint8 *pal = _screen->getPalette(0);