diff options
author | Ludvig Strigeus | 2001-10-11 11:49:51 +0000 |
---|---|---|
committer | Ludvig Strigeus | 2001-10-11 11:49:51 +0000 |
commit | 8f72d6f82caf7ac0de7c969d665213802db7fdbd (patch) | |
tree | 477af5f788a7e438bb091b121c705a2f3e0c9481 /scummvm.cpp | |
parent | d18d8bdb530a924e7acea399bf57599a26896895 (diff) | |
download | scummvm-rg350-8f72d6f82caf7ac0de7c969d665213802db7fdbd.tar.gz scummvm-rg350-8f72d6f82caf7ac0de7c969d665213802db7fdbd.tar.bz2 scummvm-rg350-8f72d6f82caf7ac0de7c969d665213802db7fdbd.zip |
Determine caption from file name.
svn-id: r3425
Diffstat (limited to 'scummvm.cpp')
-rw-r--r-- | scummvm.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scummvm.cpp b/scummvm.cpp index 84c6b4a680..c51846e708 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -17,6 +17,9 @@ * * Change Log: * $Log$ + * Revision 1.6 2001/10/11 11:49:51 strigeus + * Determine caption from file name. + * * Revision 1.5 2001/10/10 16:29:59 strigeus * temporary fix to prevent freeze in stan's room until sound is there * @@ -389,6 +392,29 @@ ShowHelpAndExit:; } } +struct GameNameList { + char *filename; + char *gamename; +}; + +static const GameNameList game_list[] = { + {"monkey1", "Monkey Island 1"}, + {"monkey2", "Monkey Island 2: LeChuck's revenge"}, + {"atlantis", "Indiana Jones 4 and the Fate of Atlantis"}, + {"fate", "Indiana Jones 4 and the Fate of Atlantis (Demo)"}, + {NULL,NULL} +}; + +char *Scumm::getGameName() { + const GameNameList *gnl = game_list; + char buf[256]; + do { + if (!strcmp(_exe_name, gnl->filename)) + return strdup(gnl->gamename); + } while ((++gnl)->filename); + sprintf(buf, "Unknown game: \"%s\"", _exe_name); + return strdup(buf); +} void Scumm::startScene(int room, Actor *a, int objectNr) { int i; |