From d2d3a9a9eb821346632c46c26b0d750fea0d575e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 22 Nov 2009 18:16:25 +0000 Subject: - 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 --- engines/kyra/resource.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'engines/kyra/resource.h') 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 _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 DataMap; + DataMap _dataTable; }; } // End of namespace Kyra -- cgit v1.2.3