Permalink
Browse files

STARTREK: Use AD_ENTRY1s for game detection

  • Loading branch information...
Drenn1 authored and sev- committed Jul 28, 2018
1 parent 9825026 commit a1107f0500e97782a69b6a2d3edac25d67fb75d6
Showing with 53 additions and 35 deletions.
  1. +49 −32 engines/startrek/detection.cpp
  2. +3 −3 engines/startrek/startrek.h
  3. +1 −0 engines/startrek/text.h
@@ -42,7 +42,7 @@ struct StarTrekGameDescription {

uint8 gameType;
uint32 features;
uint16 version;
bool isCDEdition;
};

uint32 StarTrekEngine::getFeatures() const {
@@ -53,15 +53,15 @@ Common::Platform StarTrekEngine::getPlatform() const {
return _gameDescription->desc.platform;
}

uint16 StarTrekEngine::getVersion() const {
return _gameDescription->version;
bool StarTrekEngine::isCDEdition() const {
return _gameDescription->isCDEdition;
}

uint8 StarTrekEngine::getGameType() {
uint8 StarTrekEngine::getGameType() const {
return _gameDescription->gameType;
}

Common::Language StarTrekEngine::getLanguage() {
Common::Language StarTrekEngine::getLanguage() const {
return _gameDescription->desc.language;
}

@@ -78,25 +78,42 @@ static const PlainGameDescriptor starTrekGames[] = {
namespace StarTrek {

static const StarTrekGameDescription gameDescriptions[] = {
{
// TODO: Replace AD_ENTRY1 with AD_ENTRY1s for game versions I don't have yet

{ // ST25 DOS CD-ROM edition (EN)
{
"st25",
"",
AD_ENTRY1("data.001", "57040928a0f374281aa86ba4e7db8444"),
"CD",
AD_ENTRY1s("data.001", "57040928a0f374281aa86ba4e7db8444", 7793814),
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
GType_ST25,
0,
true,
},

{ // ST25 DOS floppy edition (EN)
{
"st25",
"Floppy",
AD_ENTRY1s("data.001", "57040928a0f374281aa86ba4e7db8444", 7222630),
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
GType_ST25,
0,
false,
},

{
{ // ST25 Amiga ? (EN)
{
"st25",
"",
"Floppy",
AD_ENTRY1("data.000", "f0918b6d096455ce2ae6dd5ef973292e"),
Common::EN_ANY,
Common::kPlatformAmiga,
@@ -105,13 +122,13 @@ static const StarTrekGameDescription gameDescriptions[] = {
},
GType_ST25,
0,
0,
false,
},

{
{ // ST25 Amiga ? (GER)
{
"st25",
"",
"Floppy",
AD_ENTRY1("data.000", "70d0e374d5fa973e536dba0f42310672"),
Common::DE_DEU,
Common::kPlatformAmiga,
@@ -120,13 +137,13 @@ static const StarTrekGameDescription gameDescriptions[] = {
},
GType_ST25,
0,
0,
false,
},

{
{ // ST25 Amiga ? (FR)
{
"st25",
"",
"Floppy",
AD_ENTRY1("data.000", "d0299af1385edd7c7612ed453e417dd8"),
Common::FR_FRA,
Common::kPlatformAmiga,
@@ -135,13 +152,13 @@ static const StarTrekGameDescription gameDescriptions[] = {
},
GType_ST25,
0,
0,
false,
},

{
{ // ST25 Mac ? (EN)
{
"st25",
"",
"Floppy",
AD_ENTRY1("Star Trek Data", "871fa51c7680c0a43df9622128f1569f"),
Common::EN_ANY,
Common::kPlatformMacintosh,
@@ -150,25 +167,25 @@ static const StarTrekGameDescription gameDescriptions[] = {
},
GType_ST25,
0,
0,
false,
},

{
{ // ST25 Mac floppy edition (EN)
{
"st25",
"",
AD_ENTRY1("Star Trek Data", "d95eb00532b7082d53862c906c7ac3dc"),
"Floppy",
AD_ENTRY1s("Star Trek Data", "d95eb00532b7082d53862c906c7ac3dc", 39032),
Common::EN_ANY,
Common::kPlatformMacintosh,
ADGF_MACRESFORK,
GUIO0()
},
GType_ST25,
0,
0,
false,
},

{
{ // ST25 DOS demo ? (EN)
{
"st25",
"Demo",
@@ -180,10 +197,10 @@ static const StarTrekGameDescription gameDescriptions[] = {
},
GType_ST25,
GF_DEMO,
0,
false,
},

{
{ // ST25 MAC demo ? (EN)
{
"st25",
"Demo",
@@ -195,22 +212,22 @@ static const StarTrekGameDescription gameDescriptions[] = {
},
GType_ST25,
GF_DEMO,
0,
false,
},

{
{ // STJR DOS CD-ROM edition (EN)
{
"stjr",
"",
AD_ENTRY1("data.001", "1c8de3c02f69c07c582d59d3c29e4dd9"),
"CD",
AD_ENTRY1s("data.001", "1c8de3c02f69c07c582d59d3c29e4dd9", 3318644),
Common::EN_ANY,
Common::kPlatformDOS,
ADGF_NO_FLAGS,
GUIO0()
},
GType_STJR,
0,
0,
true,
},

{ AD_TABLE_END_MARKER, 0, 0, 0 }
@@ -639,10 +639,10 @@ class StarTrekEngine : public ::Engine {
public:
const StarTrekGameDescription *_gameDescription;
uint32 getFeatures() const;
uint16 getVersion() const;
bool isCDEdition() const;
Common::Platform getPlatform() const;
uint8 getGameType();
Common::Language getLanguage();
uint8 getGameType() const;
Common::Language getLanguage() const;

// Resource related functions
SharedPtr<FileStream> loadFile(Common::String filename, int fileIndex = 0);
@@ -32,6 +32,7 @@ namespace StarTrek {
typedef int32 TextRef;

// Text that's loaded from "GROUND.TXT". First 0x40 pieces of text are for items.
// TODO: Floppy version has different numbers for this.
enum GroundTextIDs {
// Generic "perform undefined action" text (ie. look at nothing, talk to wall)
GROUNDTX_LOOK_KIRK = 0x49,

0 comments on commit a1107f0

Please sign in to comment.