diff options
author | Max Horn | 2003-06-26 00:47:39 +0000 |
---|---|---|
committer | Max Horn | 2003-06-26 00:47:39 +0000 |
commit | 3c296b36b7a2cbf9bd049e65810f1d5c43fe6573 (patch) | |
tree | 7ff5ab22bd2e6476d14156040505738dbc80f309 /scumm/resource.h | |
parent | 7f3118f8d864f6d0beec385cb5776979581d6e2a (diff) | |
download | scummvm-rg350-3c296b36b7a2cbf9bd049e65810f1d5c43fe6573.tar.gz scummvm-rg350-3c296b36b7a2cbf9bd049e65810f1d5c43fe6573.tar.bz2 scummvm-rg350-3c296b36b7a2cbf9bd049e65810f1d5c43fe6573.zip |
added ResourceIterator, replacing two of the old findResource/findResourceSmall function - contraty to those, this approach is thread safe
svn-id: r8650
Diffstat (limited to 'scumm/resource.h')
-rw-r--r-- | scumm/resource.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scumm/resource.h b/scumm/resource.h index a3be6a74a3..d89c5266cf 100644 --- a/scumm/resource.h +++ b/scumm/resource.h @@ -50,9 +50,18 @@ enum { }; -const byte *findResource(uint32 tag, const byte *searchin, int index); -const byte *findResourceSmall(uint32 tag, const byte *searchin, int index); const byte *findResource(uint32 tag, const byte *searchin); const byte *findResourceSmall(uint32 tag, const byte *searchin); +class ResourceIterator { + uint32 _size; + uint32 _pos; + const byte *_ptr; + bool _smallHeader; +public: + ResourceIterator(const byte *searchin, bool smallHeader); + const byte *findNext(uint32 tag); +}; + + #endif |