GLK: HUGO: Cleanup

This commit is contained in:
Paul Gilbert 2019-11-17 14:46:53 -08:00
parent 42191ddbd1
commit 397c9a0755
6 changed files with 46 additions and 61 deletions

View File

@ -70,7 +70,7 @@ bool HugoMetaEngine::detectGames(const Common::FSList &fslist, DetectedGames &ga
gameFile.close();
// Check for known games
const HugoGameDescription *p = HUGO_GAMES;
const GlkDetectionEntry *p = HUGO_GAMES;
while (p->_gameId && (md5 != p->_md5 || filesize != p->_filesize))
++p;

View File

@ -27,17 +27,6 @@
namespace Glk {
namespace Hugo {
/**
* Game description
*/
struct HugoGameDescription {
const char *const _gameId;
const char *const _extra;
const char *const _md5;
size_t _filesize;
Common::Language _language;
};
const PlainGameDescriptor HUGO_GAME_LIST[] = {
{ "hugo", "Hugo IF Game" },
@ -84,52 +73,48 @@ const PlainGameDescriptor HUGO_GAME_LIST[] = {
{ nullptr, nullptr }
};
#define ENTRY0(ID, MD5, FILESIZE) { ID, nullptr, MD5, FILESIZE, Common::EN_ANY }
#define ENTRY1(ID, EXTRA, MD5, FILESIZE) { ID, EXTRA, MD5, FILESIZE, Common::EN_ANY }
#define TABLE_END_MARKER { nullptr, nullptr, nullptr, 0, Common::EN_ANY }
const GlkDetectionEntry HUGO_GAMES[] = {
DT_ENTRY1("acs", "Text Only", "37682bc8cbcc6706b8bd81d0d0b6745e", 371811),
DT_ENTRY0("acs", "1daad86bee94f4519681c441d4f0f2bc", 371658),
DT_ENTRY0("annoyotron2", "944056721054fd1c9af9d1e95e63ce52", 66762),
DT_ENTRY0("cb2", "232827c10abd45c98d77ceffaf9ac9fa", 155732),
DT_ENTRY0("hugoclock", "53a0b99011ccb14ddc45cfeb8c23d417", 120887),
DT_ENTRY0("adv350h", "d6735640ca21797f24e3cadb12be4ae2", 124148),
DT_ENTRY0("down", "4bc119c61d3cdf5d796c36b1d9a023c6", 99561),
DT_ENTRY0("dragonhunt", "93db9cdf1d2d2800715c93fff0d48a59", 68944),
DT_ENTRY0("eastofeastwood", "ebc4e37c66fca8a07b5782b57686ce07", 42445),
DT_ENTRY0("fallacyofdawn", "8821566e2d3b301c6dc705f2bea54eb1", 729176),
DT_ENTRY1("futureboy", "Demo", "cfce7ee7893bb5adc9ba4ea198f38201", 827396),
DT_ENTRY1("guiltybastards", "Text Only", "77efc9a102a406a3b123172bb37e87e7", 246971),
DT_ENTRY0("guiltybastards", "77efc9a102a406a3b123172bb37e87e7", 246971),
DT_ENTRY0("halloweenhorror1", "db76f8a419767ebe6d1ad304e8001cba", 68923),
DT_ENTRY0("halloweenhorror2", "34bb57521acd33f1f985f0898d8104a8", 55574),
DT_ENTRY0("hammurabi", "738739f9dc7ffa041a13445b23e77e37", 46905),
DT_ENTRY0("htgessay", "c3b5bce395f3f54097077f830dad70ac", 142921),
DT_ENTRY0("hugozork", "b525f8bc83bc735fb5c62edd1b486499", 172150),
DT_ENTRY0("ish", "023c9083378fcd1a08d97e60910b54da", 113958),
DT_ENTRY0("ndrift", "fea92564f4ae4c626841aa4c93fcb31e", 556591),
DT_ENTRY0("nextday", "2c5a9b95f6fb079986f8a4b178c9fcb4", 136844),
DT_ENTRY0("nmnl", "cee4e1ffae1fd562d507d65c143739ef", 171732),
DT_ENTRY0("partyarty", "62dac43addf6ea21e5759e098998773b", 86845),
DT_ENTRY0("paxless", "db00b1242a4a0898c2d0d2d1c77103f4", 61973),
DT_ENTRY0("pirateadv", "81c961f121e4465adb4592eee2bcc2d5", 53915),
DT_ENTRY0("pantomime", "1067b09fda08eafb09d53b51ffe73e7d", 248466),
DT_ENTRY1("pom", "15feb99", "ba86e162ba30e6dbe82abc96648486da", 95577),
DT_ENTRY0("renga", "c79032bdc349863f02a4fab30beafd35", 64373),
DT_ENTRY0("retronemesis", "517908b4503c653a0d9bb326d00b22ab", 101526),
DT_ENTRY0("scavhunt", "665dce1a0f552e95590b983a3f2106da", 129514),
DT_ENTRY0("spinning", "487d0a0cdcf55407a09cafdf6ca32237", 99140),
DT_ENTRY0("spur", "77968cf043ecc012b4938c690b81227c", 185338),
DT_ENTRY0("squest", "3e91849c6e8ea3072aa58e96010b6078", 36322),
DT_ENTRY0("teleporttest", "4cc54ad4d5b8f3628aa3925272311efb", 100723),
DT_ENTRY0("tetrish", "da1299e86f9fcded1f9a41979685ec02", 6464),
DT_ENTRY0("tradingpunches", "b31b2eed49e788429cd9c5c641a3e713", 315934),
DT_ENTRY0("tripkey", "f76297d8ff7658752aa5a29417bbb274", 188058),
DT_ENTRY0("wfte", "695233c271d6e355652bd11d0cc8da5e", 73099),
DT_ENTRY0("worldbuilder", "031ff1a1364cd0d42600dc1bac967255", 90382),
const HugoGameDescription HUGO_GAMES[] = {
ENTRY1("acs", "Text Only", "37682bc8cbcc6706b8bd81d0d0b6745e", 371811),
ENTRY0("acs", "1daad86bee94f4519681c441d4f0f2bc", 371658),
ENTRY0("annoyotron2", "944056721054fd1c9af9d1e95e63ce52", 66762),
ENTRY0("cb2", "232827c10abd45c98d77ceffaf9ac9fa", 155732),
ENTRY0("hugoclock", "53a0b99011ccb14ddc45cfeb8c23d417", 120887),
ENTRY0("adv350h", "d6735640ca21797f24e3cadb12be4ae2", 124148),
ENTRY0("down", "4bc119c61d3cdf5d796c36b1d9a023c6", 99561),
ENTRY0("dragonhunt", "93db9cdf1d2d2800715c93fff0d48a59", 68944),
ENTRY0("eastofeastwood", "ebc4e37c66fca8a07b5782b57686ce07", 42445),
ENTRY0("fallacyofdawn", "8821566e2d3b301c6dc705f2bea54eb1", 729176),
ENTRY1("futureboy", "Demo", "cfce7ee7893bb5adc9ba4ea198f38201", 827396),
ENTRY1("guiltybastards", "Text Only", "77efc9a102a406a3b123172bb37e87e7", 246971),
ENTRY0("guiltybastards", "77efc9a102a406a3b123172bb37e87e7", 246971),
ENTRY0("halloweenhorror1", "db76f8a419767ebe6d1ad304e8001cba", 68923),
ENTRY0("halloweenhorror2", "34bb57521acd33f1f985f0898d8104a8", 55574),
ENTRY0("hammurabi", "738739f9dc7ffa041a13445b23e77e37", 46905),
ENTRY0("htgessay", "c3b5bce395f3f54097077f830dad70ac", 142921),
ENTRY0("hugozork", "b525f8bc83bc735fb5c62edd1b486499", 172150),
ENTRY0("ish", "023c9083378fcd1a08d97e60910b54da", 113958),
ENTRY0("ndrift", "fea92564f4ae4c626841aa4c93fcb31e", 556591),
ENTRY0("nextday", "2c5a9b95f6fb079986f8a4b178c9fcb4", 136844),
ENTRY0("nmnl", "cee4e1ffae1fd562d507d65c143739ef", 171732),
ENTRY0("partyarty", "62dac43addf6ea21e5759e098998773b", 86845),
ENTRY0("paxless", "db00b1242a4a0898c2d0d2d1c77103f4", 61973),
ENTRY0("pirateadv", "81c961f121e4465adb4592eee2bcc2d5", 53915),
ENTRY0("pantomime", "1067b09fda08eafb09d53b51ffe73e7d", 248466),
ENTRY1("pom", "15feb99", "ba86e162ba30e6dbe82abc96648486da", 95577),
ENTRY0("renga", "c79032bdc349863f02a4fab30beafd35", 64373),
ENTRY0("retronemesis", "517908b4503c653a0d9bb326d00b22ab", 101526),
ENTRY0("scavhunt", "665dce1a0f552e95590b983a3f2106da", 129514),
ENTRY0("spinning", "487d0a0cdcf55407a09cafdf6ca32237", 99140),
ENTRY0("spur", "77968cf043ecc012b4938c690b81227c", 185338),
ENTRY0("squest", "3e91849c6e8ea3072aa58e96010b6078", 36322),
ENTRY0("teleporttest", "4cc54ad4d5b8f3628aa3925272311efb", 100723),
ENTRY0("tetrish", "da1299e86f9fcded1f9a41979685ec02", 6464),
ENTRY0("tradingpunches", "b31b2eed49e788429cd9c5c641a3e713", 315934),
ENTRY0("tripkey", "f76297d8ff7658752aa5a29417bbb274", 188058),
ENTRY0("wfte", "695233c271d6e355652bd11d0cc8da5e", 73099),
ENTRY0("worldbuilder", "031ff1a1364cd0d42600dc1bac967255", 90382),
TABLE_END_MARKER
DT_END_MARKER
};
} // End of namespace Hugo

View File

@ -79,6 +79,8 @@ Hugo::Hugo(OSystem *syst, const GlkGameDescription &gameDesc) : GlkAPI(syst, gam
active_screen(0), step_nest(0), history_last(0)
#endif
{
strcpy(gamefile, "");
// heexpr
Common::fill(&eval[0], &eval[MAX_EVAL_ELEMENTS], 0);
Common::fill(&var[0], &var[MAXLOCALS + MAXGLOBALS], 0);

View File

@ -20,6 +20,8 @@
*
*/
/* Based on the Hugo interpreter version 3.3.0 */
#ifndef GLK_HUGO_HUGO
#define GLK_HUGO_HUGO

View File

@ -25,9 +25,6 @@
namespace Glk {
namespace Hugo {
/* LEFT */
char *StringFunctions::Left(char a[], int l) {
static char *temp;
int i;

View File

@ -62,7 +62,6 @@ public:
char *strupr(char *s);
};
} // End of namespace Hugo
} // End of namespace Glk