aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/resource.h
diff options
context:
space:
mode:
authorJohannes Schickel2009-11-22 18:16:25 +0000
committerJohannes Schickel2009-11-22 18:16:25 +0000
commitd2d3a9a9eb821346632c46c26b0d750fea0d575e (patch)
treec361c54c3259c80dfe873618504e980edfb2b080 /engines/kyra/resource.h
parent45856206e6eea615da78a00ba086cb2a1291c6d7 (diff)
downloadscummvm-rg350-d2d3a9a9eb821346632c46c26b0d750fea0d575e.tar.gz
scummvm-rg350-d2d3a9a9eb821346632c46c26b0d750fea0d575e.tar.bz2
scummvm-rg350-d2d3a9a9eb821346632c46c26b0d750fea0d575e.zip
- Store ID map for static resources in kyra.dat instead of hardcoding it in the main KYRA source
- Changed how static resource types are specified - Rebuilt kyra.dat svn-id: r46091
Diffstat (limited to 'engines/kyra/resource.h')
-rw-r--r--engines/kyra/resource.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h
index 294cb932f7..81987306e0 100644
--- a/engines/kyra/resource.h
+++ b/engines/kyra/resource.h
@@ -103,7 +103,7 @@ enum KyraResources {
kLoadAll = -1,
// This list has to match orderwise (and thus value wise) the static data list of "tools/create_kyradat/create_kyradat.h"!
- k1ForestSeq,
+ k1ForestSeq = 1,
k1KallakWritingSeq,
k1KyrandiaLogoSeq,
k1KallakMalcolmSeq,
@@ -348,7 +348,7 @@ class StaticResource {
public:
static const Common::String staticDataFilename() { return "KYRA.DAT"; }
- StaticResource(KyraEngine_v1 *vm) : _vm(vm), _resList(), _fileLoader(0), _dataTable(0) {}
+ StaticResource(KyraEngine_v1 *vm) : _vm(vm), _resList(), _fileLoader(0), _dataTable() {}
~StaticResource() { deinit(); }
bool loadStaticResourceFile();
@@ -469,7 +469,16 @@ private:
Common::List<ResData> _resList;
const FileType *_fileLoader;
- const int *_dataTable;
+
+ struct DataDescriptor {
+ DataDescriptor() : filename(0), type(0) {}
+ DataDescriptor(uint32 f, uint8 t) : filename(f), type(t) {}
+
+ uint32 filename;
+ uint8 type;
+ };
+ typedef Common::HashMap<uint16, DataDescriptor> DataMap;
+ DataMap _dataTable;
};
} // End of namespace Kyra