diff options
author | Torbjörn Andersson | 2005-06-08 13:49:56 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-06-08 13:49:56 +0000 |
commit | 064bfed378934be8b7c175edcf589f34095929b1 (patch) | |
tree | a8a4dcf1fb5ee5dc4f420900549b7a3f199b0d27 | |
parent | 60806b90e82badacda88544824a30f97cde880d8 (diff) | |
download | scummvm-rg350-064bfed378934be8b7c175edcf589f34095929b1.tar.gz scummvm-rg350-064bfed378934be8b7c175edcf589f34095929b1.tar.bz2 scummvm-rg350-064bfed378934be8b7c175edcf589f34095929b1.zip |
Added IHNM "main strings" resource. It's trial-and-error, so it may be the
wrong one, but it does contain the verb strings. Unlike IHNM, it does not
contain the object names. We'll need to do something about that eventually.
svn-id: r18365
-rw-r--r-- | saga/game.cpp | 2 | ||||
-rw-r--r-- | saga/resnames.h | 1 | ||||
-rw-r--r-- | saga/script.cpp | 19 |
3 files changed, 18 insertions, 4 deletions
diff --git a/saga/game.cpp b/saga/game.cpp index 0bb09efccd..f4e0d67dc1 100644 --- a/saga/game.cpp +++ b/saga/game.cpp @@ -397,7 +397,7 @@ static GameResourceDescription IHNM_Resources = { 0, 0, 0, - 0, + RID_IHNM_MAIN_STRINGS, 0 }; diff --git a/saga/resnames.h b/saga/resnames.h index 9667b47500..a3e2171ece 100644 --- a/saga/resnames.h +++ b/saga/resnames.h @@ -68,6 +68,7 @@ namespace Saga { #define RID_IHNM_MAIN_PANEL 9 #define RID_IHNM_CONVERSE_PANEL 10 +#define RID_IHNM_MAIN_STRINGS 21 // Puzzle portraits #define RID_ITE_SAKKA_APPRAISING 6 diff --git a/saga/script.cpp b/saga/script.cpp index 92216eb8ae..e085144de3 100644 --- a/saga/script.cpp +++ b/saga/script.cpp @@ -138,8 +138,21 @@ Script::Script(SagaEngine *vm) : _vm(vm){ } RSC_FreeResource(resourcePointer); - - result = RSC_LoadResource(resourceContext, _vm->getResourceDescription()->mainStringsResourceId, &stringsPointer, &stringsLength); // fixme: IHNM + + // TODO + // + // In ITE, the "main strings" resource contains both the verb strings + // and the object names. + // + // In IHNM, the "main strings" does not contain the verb strings. + // Instead, it looks as if the object names are divided over several + // different string lists. One per character, perhaps? + // + // Or maybe I'm looking at the wrong resource. I found the IHNM one by + // trial and error... + + result = RSC_LoadResource(resourceContext, _vm->getResourceDescription()->mainStringsResourceId, &stringsPointer, &stringsLength); + if ((result != SUCCESS) || (stringsLength == 0)) { error("Error loading strings list resource"); } @@ -200,7 +213,7 @@ void Script::loadModule(int scriptModuleNumber) { if ((result != SUCCESS) || (resourceLength == 0)) { error("Script::loadModule() Error loading strings list resource"); } - + _vm->loadStrings(_modules[scriptModuleNumber].strings, resourcePointer, resourceLength); RSC_FreeResource(resourcePointer); |