aboutsummaryrefslogtreecommitdiff
path: root/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'resource.cpp')
-rw-r--r--resource.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/resource.cpp b/resource.cpp
index bb7db92c04..b080ee06b7 100644
--- a/resource.cpp
+++ b/resource.cpp
@@ -17,6 +17,9 @@
*
* Change Log:
* $Log$
+ * Revision 1.6 2001/10/24 20:12:52 strigeus
+ * fixed some bugs related to string handling
+ *
* Revision 1.5 2001/10/23 19:51:50 strigeus
* recompile not needed when switching games
* debugger skeleton implemented
@@ -575,6 +578,16 @@ byte *Scumm::getResourceAddress(int type, int index) {
return ptr + sizeof(ResHeader);
}
+byte *Scumm::getStringAddress(int i) {
+ byte *b = getResourceAddress(7, i);
+ if (!b)
+ return b;
+
+ if (_majorScummVersion==6)
+ return ((ArrayHeader*)b)->data;
+ return b;
+}
+
void Scumm::setResourceFlags(int type, int index, byte flag) {
res.flags[type][index] &= 0x80;
res.flags[type][index] |= flag;