diff options
author | Nicola Mettifogo | 2007-08-12 13:47:19 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-08-12 13:47:19 +0000 |
commit | a3e19078372f8ca062fa5504eaaa9d0edec5ca65 (patch) | |
tree | 4e5e8fb034d16ddc569aba964ca86afa21eb5597 /engines/parallaction/disk_br.cpp | |
parent | c408e30bb93ba37c13b3f84577ec454b871a8a5f (diff) | |
download | scummvm-rg350-a3e19078372f8ca062fa5504eaaa9d0edec5ca65.tar.gz scummvm-rg350-a3e19078372f8ca062fa5504eaaa9d0edec5ca65.tar.bz2 scummvm-rg350-a3e19078372f8ca062fa5504eaaa9d0edec5ca65.zip |
Added more resource loading.
svn-id: r28563
Diffstat (limited to 'engines/parallaction/disk_br.cpp')
-rw-r--r-- | engines/parallaction/disk_br.cpp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp index f9ba2c2295..63ec2e3667 100644 --- a/engines/parallaction/disk_br.cpp +++ b/engines/parallaction/disk_br.cpp @@ -46,6 +46,28 @@ Common::String DosDisk_br::selectArchive(const Common::String& name) { void DosDisk_br::setLanguage(uint16 language) { debugC(5, kDebugDisk, "DosDisk_br::setLanguage"); + switch (language) { + case 0: + strcpy(_languageDir, "it"); + break; + + case 1: + strcpy(_languageDir, "fr"); + break; + + case 2: + strcpy(_languageDir, "en"); + break; + + case 3: + strcpy(_languageDir, "ge"); + break; + + default: + error("unknown language"); + + } + return; } @@ -64,7 +86,17 @@ Cnv* DosDisk_br::loadTalk(const char *name) { Script* DosDisk_br::loadLocation(const char *name) { debugC(5, kDebugDisk, "DosDisk_br::loadLocation"); - return 0; + + char path[PATH_LEN]; + sprintf(path, "%s/%s/%s.loc", _partPath, _languageDir, name); + + debugC(3, kDebugDisk, "DosDisk_br::loadLocation(%s): trying '%s'", name, path); + + Common::File stream; + if (!stream.open(path)) + errorFileNotFound(path); + + return new Script(&stream, false); } Script* DosDisk_br::loadScript(const char* name) { |