NEVERHOOD: Simplified detection tables
This commit is contained in:
parent
4d0530117e
commit
1aa0367b8a
3 changed files with 81 additions and 107 deletions
|
@ -28,33 +28,30 @@
|
||||||
|
|
||||||
#include "neverhood/neverhood.h"
|
#include "neverhood/neverhood.h"
|
||||||
|
|
||||||
|
enum NeverhoodGameFeatures {
|
||||||
|
GF_BIG_DEMO = (1 << 0)
|
||||||
|
};
|
||||||
|
|
||||||
namespace Neverhood {
|
namespace Neverhood {
|
||||||
|
|
||||||
struct NeverhoodGameDescription {
|
|
||||||
ADGameDescription desc;
|
|
||||||
|
|
||||||
uint32 features;
|
|
||||||
};
|
|
||||||
|
|
||||||
const char *NeverhoodEngine::getGameId() const {
|
const char *NeverhoodEngine::getGameId() const {
|
||||||
return _gameDescription->desc.gameId;
|
return _gameDescription->gameId;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::Platform NeverhoodEngine::getPlatform() const {
|
Common::Platform NeverhoodEngine::getPlatform() const {
|
||||||
return _gameDescription->desc.platform;
|
return _gameDescription->platform;
|
||||||
}
|
}
|
||||||
|
|
||||||
Common::Language NeverhoodEngine::getLanguage() const {
|
Common::Language NeverhoodEngine::getLanguage() const {
|
||||||
return _gameDescription->desc.language;
|
return _gameDescription->language;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NeverhoodEngine::isDemo() const {
|
bool NeverhoodEngine::isDemo() const {
|
||||||
return _gameDescription->desc.flags & ADGF_DEMO;
|
return _gameDescription->flags & ADGF_DEMO;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NeverhoodEngine::isBigDemo() const {
|
bool NeverhoodEngine::isBigDemo() const {
|
||||||
return _gameDescription->features & GF_BIG_DEMO;
|
return _gameDescription->flags & GF_BIG_DEMO;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NeverhoodEngine::applyResourceFixes() const {
|
bool NeverhoodEngine::applyResourceFixes() const {
|
||||||
|
@ -70,93 +67,75 @@ static const PlainGameDescriptor neverhoodGames[] = {
|
||||||
|
|
||||||
namespace Neverhood {
|
namespace Neverhood {
|
||||||
|
|
||||||
static const NeverhoodGameDescription gameDescriptions[] = {
|
static const ADGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
|
// Neverhood English version
|
||||||
{
|
{
|
||||||
// Neverhood English version
|
"neverhood",
|
||||||
{
|
|
||||||
"neverhood",
|
|
||||||
0,
|
|
||||||
AD_ENTRY1s("hd.blb", "22958d968458c9ff221aee38577bb2b2", 4279716),
|
|
||||||
Common::EN_ANY,
|
|
||||||
Common::kPlatformWindows,
|
|
||||||
ADGF_DROPPLATFORM,
|
|
||||||
GUIO1(GUIO_NONE)
|
|
||||||
},
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
// Neverhood English big demo version
|
|
||||||
{
|
|
||||||
"neverhood",
|
|
||||||
"Big Demo",
|
|
||||||
AD_ENTRY1s("nevdemo.blb", "e637221d296f9a25ff22eaed96b07519", 117274189),
|
|
||||||
Common::EN_ANY,
|
|
||||||
Common::kPlatformWindows,
|
|
||||||
ADGF_DEMO | ADGF_DROPPLATFORM,
|
|
||||||
GUIO1(GUIO_NONE)
|
|
||||||
},
|
|
||||||
GF_BIG_DEMO
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
// Neverhood English demo version
|
|
||||||
{
|
|
||||||
"neverhood",
|
|
||||||
"Demo",
|
|
||||||
AD_ENTRY1s("nevdemo.blb", "05b735cfb1086892bec79b54dca5545b", 22564568),
|
|
||||||
Common::EN_ANY,
|
|
||||||
Common::kPlatformWindows,
|
|
||||||
ADGF_DEMO | ADGF_DROPPLATFORM,
|
|
||||||
GUIO1(GUIO_NONE)
|
|
||||||
},
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
// Neverhood earlier English demo version
|
|
||||||
{
|
|
||||||
"neverhood",
|
|
||||||
"Demo",
|
|
||||||
AD_ENTRY1s("nevdemo.blb", "9cbc33bc8ebacacfc8071f3e26a9c85f", 22357020),
|
|
||||||
Common::EN_ANY,
|
|
||||||
Common::kPlatformWindows,
|
|
||||||
ADGF_DEMO | ADGF_DROPPLATFORM,
|
|
||||||
GUIO1(GUIO_NONE)
|
|
||||||
},
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
// Neverhood Russian version. Dyadyushka Risech
|
|
||||||
{
|
|
||||||
"neverhood",
|
|
||||||
"DR",
|
|
||||||
AD_ENTRY1s("hd.blb", "787951bf094aad9962291e69a707bdde", 4248635),
|
|
||||||
Common::RU_RUS,
|
|
||||||
Common::kPlatformWindows,
|
|
||||||
ADGF_DROPPLATFORM,
|
|
||||||
GUIO1(GUIO_NONE)
|
|
||||||
},
|
|
||||||
0
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
// Neverhood Russian version. Fargus
|
|
||||||
{
|
|
||||||
"neverhood",
|
|
||||||
"Fargus",
|
|
||||||
AD_ENTRY1s("hd.blb", "c87c69db423f560d3708e9de78751a7f", 4425816),
|
|
||||||
Common::RU_RUS,
|
|
||||||
Common::kPlatformWindows,
|
|
||||||
ADGF_DROPPLATFORM,
|
|
||||||
GUIO1(GUIO_NONE)
|
|
||||||
},
|
|
||||||
0,
|
0,
|
||||||
|
AD_ENTRY1s("hd.blb", "22958d968458c9ff221aee38577bb2b2", 4279716),
|
||||||
|
Common::EN_ANY,
|
||||||
|
Common::kPlatformWindows,
|
||||||
|
ADGF_DROPPLATFORM,
|
||||||
|
GUIO1(GUIO_NONE)
|
||||||
},
|
},
|
||||||
|
|
||||||
{ AD_TABLE_END_MARKER, 0 }
|
// Neverhood English big demo version
|
||||||
|
{
|
||||||
|
"neverhood",
|
||||||
|
"Big Demo",
|
||||||
|
AD_ENTRY1s("nevdemo.blb", "e637221d296f9a25ff22eaed96b07519", 117274189),
|
||||||
|
Common::EN_ANY,
|
||||||
|
Common::kPlatformWindows,
|
||||||
|
GF_BIG_DEMO | ADGF_DEMO | ADGF_DROPPLATFORM,
|
||||||
|
GUIO1(GUIO_NONE)
|
||||||
|
},
|
||||||
|
|
||||||
|
// Neverhood English demo version
|
||||||
|
{
|
||||||
|
"neverhood",
|
||||||
|
"Demo",
|
||||||
|
AD_ENTRY1s("nevdemo.blb", "05b735cfb1086892bec79b54dca5545b", 22564568),
|
||||||
|
Common::EN_ANY,
|
||||||
|
Common::kPlatformWindows,
|
||||||
|
ADGF_DEMO | ADGF_DROPPLATFORM,
|
||||||
|
GUIO1(GUIO_NONE)
|
||||||
|
},
|
||||||
|
|
||||||
|
// Neverhood earlier English demo version
|
||||||
|
{
|
||||||
|
"neverhood",
|
||||||
|
"Demo",
|
||||||
|
AD_ENTRY1s("nevdemo.blb", "9cbc33bc8ebacacfc8071f3e26a9c85f", 22357020),
|
||||||
|
Common::EN_ANY,
|
||||||
|
Common::kPlatformWindows,
|
||||||
|
ADGF_DEMO | ADGF_DROPPLATFORM,
|
||||||
|
GUIO1(GUIO_NONE)
|
||||||
|
},
|
||||||
|
|
||||||
|
// Neverhood Russian version. Dyadyushka Risech
|
||||||
|
{
|
||||||
|
"neverhood",
|
||||||
|
"DR",
|
||||||
|
AD_ENTRY1s("hd.blb", "787951bf094aad9962291e69a707bdde", 4248635),
|
||||||
|
Common::RU_RUS,
|
||||||
|
Common::kPlatformWindows,
|
||||||
|
ADGF_DROPPLATFORM,
|
||||||
|
GUIO1(GUIO_NONE)
|
||||||
|
},
|
||||||
|
|
||||||
|
// Neverhood Russian version. Fargus
|
||||||
|
{
|
||||||
|
"neverhood",
|
||||||
|
"Fargus",
|
||||||
|
AD_ENTRY1s("hd.blb", "c87c69db423f560d3708e9de78751a7f", 4425816),
|
||||||
|
Common::RU_RUS,
|
||||||
|
Common::kPlatformWindows,
|
||||||
|
ADGF_DROPPLATFORM,
|
||||||
|
GUIO1(GUIO_NONE)
|
||||||
|
},
|
||||||
|
|
||||||
|
AD_TABLE_END_MARKER
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End of namespace Neverhood
|
} // End of namespace Neverhood
|
||||||
|
@ -185,7 +164,7 @@ static const ExtraGuiOption neverhoodExtraGuiOption3 = {
|
||||||
|
|
||||||
class NeverhoodMetaEngine : public AdvancedMetaEngine {
|
class NeverhoodMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
NeverhoodMetaEngine() : AdvancedMetaEngine(Neverhood::gameDescriptions, sizeof(Neverhood::NeverhoodGameDescription), neverhoodGames) {
|
NeverhoodMetaEngine() : AdvancedMetaEngine(Neverhood::gameDescriptions, sizeof(ADGameDescription), neverhoodGames) {
|
||||||
_guiOptions = GUIO2(GUIO_NOSUBTITLES, GUIO_NOMIDI);
|
_guiOptions = GUIO2(GUIO_NOSUBTITLES, GUIO_NOMIDI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,11 +210,10 @@ bool Neverhood::NeverhoodEngine::hasFeature(EngineFeature f) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NeverhoodMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
bool NeverhoodMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
|
||||||
const Neverhood::NeverhoodGameDescription *gd = (const Neverhood::NeverhoodGameDescription *)desc;
|
if (desc) {
|
||||||
if (gd) {
|
*engine = new Neverhood::NeverhoodEngine(syst, desc);
|
||||||
*engine = new Neverhood::NeverhoodEngine(syst, gd);
|
|
||||||
}
|
}
|
||||||
return gd != 0;
|
return desc != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ExtraGuiOptions NeverhoodMetaEngine::getExtraGuiOptions(const Common::String &target) const {
|
const ExtraGuiOptions NeverhoodMetaEngine::getExtraGuiOptions(const Common::String &target) const {
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
namespace Neverhood {
|
namespace Neverhood {
|
||||||
|
|
||||||
NeverhoodEngine::NeverhoodEngine(OSystem *syst, const NeverhoodGameDescription *gameDesc) :
|
NeverhoodEngine::NeverhoodEngine(OSystem *syst, const ADGameDescription *gameDesc) :
|
||||||
Engine(syst), _gameDescription(gameDesc) {
|
Engine(syst), _gameDescription(gameDesc) {
|
||||||
// Setup mixer
|
// Setup mixer
|
||||||
if (!_mixer->isReady()) {
|
if (!_mixer->isReady()) {
|
||||||
|
|
|
@ -35,14 +35,10 @@
|
||||||
#include "neverhood/console.h"
|
#include "neverhood/console.h"
|
||||||
#include "neverhood/messages.h"
|
#include "neverhood/messages.h"
|
||||||
|
|
||||||
|
struct ADGameDescription;
|
||||||
|
|
||||||
namespace Neverhood {
|
namespace Neverhood {
|
||||||
|
|
||||||
enum NeverhoodGameFeatures {
|
|
||||||
GF_BIG_DEMO = (1 << 0)
|
|
||||||
};
|
|
||||||
|
|
||||||
struct NeverhoodGameDescription;
|
|
||||||
|
|
||||||
class GameModule;
|
class GameModule;
|
||||||
class GameVars;
|
class GameVars;
|
||||||
class ResourceMan;
|
class ResourceMan;
|
||||||
|
@ -64,11 +60,11 @@ protected:
|
||||||
void mainLoop();
|
void mainLoop();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NeverhoodEngine(OSystem *syst, const NeverhoodGameDescription *gameDesc);
|
NeverhoodEngine(OSystem *syst, const ADGameDescription *gameDesc);
|
||||||
~NeverhoodEngine() override;
|
~NeverhoodEngine() override;
|
||||||
|
|
||||||
// Detection related functions
|
// Detection related functions
|
||||||
const NeverhoodGameDescription *_gameDescription;
|
const ADGameDescription *_gameDescription;
|
||||||
const char *getGameId() const;
|
const char *getGameId() const;
|
||||||
Common::Platform getPlatform() const;
|
Common::Platform getPlatform() const;
|
||||||
Common::Language getLanguage() const;
|
Common::Language getLanguage() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue