mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 12:55:24 +00:00
TRECISION: Initial support for the demo version of Nightlong
This commit is contained in:
parent
d0041dfcc5
commit
59d854e30b
@ -86,6 +86,16 @@ static const ADGameDescription gameDescriptions[] = {
|
|||||||
ADGF_NO_FLAGS,
|
ADGF_NO_FLAGS,
|
||||||
GUIO0()
|
GUIO0()
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"nl",
|
||||||
|
0,
|
||||||
|
AD_ENTRY1s("data.nl", "7665db13ad2a1ceb576531be3e1efb30", 392950),
|
||||||
|
Common::EN_ANY,
|
||||||
|
Common::kPlatformWindows,
|
||||||
|
ADGF_DEMO,
|
||||||
|
GUIO0()
|
||||||
|
},
|
||||||
|
|
||||||
AD_TABLE_END_MARKER
|
AD_TABLE_END_MARKER
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class TrecisionMetaEngine : public AdvancedMetaEngine {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Common::Error TrecisionMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
Common::Error TrecisionMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
*engine = new Trecision::TrecisionEngine(syst);
|
*engine = new Trecision::TrecisionEngine(syst, desc);
|
||||||
return Common::kNoError;
|
return Common::kNoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ namespace Trecision {
|
|||||||
|
|
||||||
TrecisionEngine *g_vm;
|
TrecisionEngine *g_vm;
|
||||||
|
|
||||||
TrecisionEngine::TrecisionEngine(OSystem *syst) : Engine(syst) {
|
TrecisionEngine::TrecisionEngine(OSystem *syst, const ADGameDescription *desc) : Engine(syst), _gameDescription(desc) {
|
||||||
const Common::FSNode gameDataDir(ConfMan.get("path"));
|
const Common::FSNode gameDataDir(ConfMan.get("path"));
|
||||||
SearchMan.addSubDirectoryMatching(gameDataDir, "AUTORUN");
|
SearchMan.addSubDirectoryMatching(gameDataDir, "AUTORUN");
|
||||||
SearchMan.addSubDirectoryMatching(gameDataDir, "DATA");
|
SearchMan.addSubDirectoryMatching(gameDataDir, "DATA");
|
||||||
@ -245,6 +245,10 @@ Common::Error TrecisionEngine::run() {
|
|||||||
return Common::kNoError;
|
return Common::kNoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TrecisionEngine::isDemo() const {
|
||||||
|
return _gameDescription->flags & ADGF_DEMO;
|
||||||
|
}
|
||||||
|
|
||||||
void TrecisionEngine::eventLoop() {
|
void TrecisionEngine::eventLoop() {
|
||||||
Common::Event event;
|
Common::Event event;
|
||||||
while (g_system->getEventManager()->pollEvent(event)) {
|
while (g_system->getEventManager()->pollEvent(event)) {
|
||||||
@ -419,12 +423,13 @@ void TrecisionEngine::openDataFiles() {
|
|||||||
if (!_dataFile.open("nldata.cd0"))
|
if (!_dataFile.open("nldata.cd0"))
|
||||||
error("openDataFiles() - Error opening nldata.cd0");
|
error("openDataFiles() - Error opening nldata.cd0");
|
||||||
|
|
||||||
if (!Common::File::exists("nlanim.cd1") ||
|
if (!isDemo()) {
|
||||||
!Common::File::exists("nlanim.cd2") ||
|
if (!Common::File::exists("nlanim.cd1") ||
|
||||||
!Common::File::exists("nlanim.cd3")
|
!Common::File::exists("nlanim.cd2") ||
|
||||||
)
|
!Common::File::exists("nlanim.cd3"))
|
||||||
error("openDataFiles() - nlanim.cd1 or nlanim.cd2 or nlanim.cd3 is missing");
|
error("openDataFiles() - nlanim.cd1 or nlanim.cd2 or nlanim.cd3 is missing");
|
||||||
|
}
|
||||||
|
|
||||||
_font = readData("nlfont.fnt");
|
_font = readData("nlfont.fnt");
|
||||||
int size;
|
int size;
|
||||||
_arrows = readData16("frecc.bm", size);
|
_arrows = readData16("frecc.bm", size);
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "common/str-array.h"
|
#include "common/str-array.h"
|
||||||
#include "common/keyboard.h"
|
#include "common/keyboard.h"
|
||||||
#include "common/str.h"
|
#include "common/str.h"
|
||||||
|
#include "engines/advancedDetector.h"
|
||||||
#include "engines/engine.h"
|
#include "engines/engine.h"
|
||||||
#include "graphics/surface.h"
|
#include "graphics/surface.h"
|
||||||
|
|
||||||
@ -118,11 +119,12 @@ class TrecisionEngine : public Engine {
|
|||||||
SCamera FCamera;
|
SCamera FCamera;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TrecisionEngine(OSystem *syst);
|
TrecisionEngine(OSystem *syst, const ADGameDescription *desc);
|
||||||
~TrecisionEngine() override;
|
~TrecisionEngine() override;
|
||||||
|
|
||||||
// ScummVM
|
// ScummVM
|
||||||
Common::Error run() override;
|
Common::Error run() override;
|
||||||
|
bool isDemo() const;
|
||||||
void eventLoop();
|
void eventLoop();
|
||||||
bool hasFeature(EngineFeature f) const override;
|
bool hasFeature(EngineFeature f) const override;
|
||||||
bool canLoadGameStateCurrently() override { return canPlayerInteract(); }
|
bool canLoadGameStateCurrently() override { return canPlayerInteract(); }
|
||||||
@ -212,6 +214,8 @@ public:
|
|||||||
bool isObjectVisible(uint16 objectId) const;
|
bool isObjectVisible(uint16 objectId) const;
|
||||||
void setObjectAnim(uint16 objectId, uint16 animId);
|
void setObjectAnim(uint16 objectId, uint16 animId);
|
||||||
|
|
||||||
|
const ADGameDescription *_gameDescription;
|
||||||
|
|
||||||
Graphics::Surface _thumbnail;
|
Graphics::Surface _thumbnail;
|
||||||
|
|
||||||
uint16 _curRoom;
|
uint16 _curRoom;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user