aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--saga/game.cpp2
-rw-r--r--saga/resnames.h1
-rw-r--r--saga/script.cpp19
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);