diff options
author | Max Horn | 2011-05-13 14:02:53 +0200 |
---|---|---|
committer | Max Horn | 2011-05-13 14:02:53 +0200 |
commit | 649f8e0a84804a9d1272ba16b146ea2b9da501fe (patch) | |
tree | 4e257a06140c69abb043d5c9a2eb3d23e5ff9e1b /engines/scumm/he | |
parent | aaf2c0e6ebe373afd06cbf8ebca334710a4ed15d (diff) | |
download | scummvm-rg350-649f8e0a84804a9d1272ba16b146ea2b9da501fe.tar.gz scummvm-rg350-649f8e0a84804a9d1272ba16b146ea2b9da501fe.tar.bz2 scummvm-rg350-649f8e0a84804a9d1272ba16b146ea2b9da501fe.zip |
SCUMM: Rename ResTypes->ResType, introduce ResId typedef, change code to use both
Diffstat (limited to 'engines/scumm/he')
-rw-r--r-- | engines/scumm/he/intern_he.h | 11 | ||||
-rw-r--r-- | engines/scumm/he/resource_he.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/he/script_v100he.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/he/script_v72he.cpp | 5 |
4 files changed, 15 insertions, 12 deletions
diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h index e1d7beec82..c49217b650 100644 --- a/engines/scumm/he/intern_he.h +++ b/engines/scumm/he/intern_he.h @@ -129,8 +129,8 @@ public: protected: virtual void allocateArrays(); - virtual int readResTypeList(int id); - virtual uint32 getResourceRoomOffset(int type, int idx); + virtual int readResTypeList(ResType type); + virtual uint32 getResourceRoomOffset(ResType type, ResId idx); virtual void setupOpcodes(); virtual void setupScummVars(); @@ -265,7 +265,7 @@ protected: virtual void resetScummVars(); virtual void readArrayFromIndexFile(); - virtual byte *getStringAddress(int i); + virtual byte *getStringAddress(ResId idx); virtual void readMAXS(int blockSize); virtual void redrawBGAreas(); @@ -289,7 +289,7 @@ protected: void copyScriptString(byte *dst, int dstSize); int findObject(int x, int y, int num, int *args); - int getSoundResourceSize(int id); + int getSoundResourceSize(ResId idx); virtual bool handleNextCharsetCode(Actor *a, int *c); virtual int convertMessageToString(const byte *msg, byte *dst, int dstSize); @@ -554,7 +554,8 @@ protected: class ScummEngine_v100he : public ScummEngine_v99he { protected: - int32 _heResId, _heResType; + ResType _heResType; + int32 _heResId; byte _debugInputBuffer[256]; public: diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp index 70b5543add..1dce01ae5a 100644 --- a/engines/scumm/he/resource_he.cpp +++ b/engines/scumm/he/resource_he.cpp @@ -341,14 +341,14 @@ void ScummEngine_v72he::readMAXS(int blockSize) { ScummEngine_v6::readMAXS(blockSize); } -byte *ScummEngine_v72he::getStringAddress(int i) { - byte *addr = getResourceAddress(rtString, i); +byte *ScummEngine_v72he::getStringAddress(ResId idx) { + byte *addr = getResourceAddress(rtString, idx); if (addr == NULL) return NULL; return ((ScummEngine_v72he::ArrayHeader *)addr)->data; } -int ScummEngine_v72he::getSoundResourceSize(int id) { +int ScummEngine_v72he::getSoundResourceSize(ResId id) { const byte *ptr; int offs, size; diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index 8ff28a1068..b6f92942a1 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -2380,7 +2380,8 @@ void ScummEngine_v100he::o100_isResourceLoaded() { void ScummEngine_v100he::o100_getResourceSize() { const byte *ptr; - int size, type; + int size; + ResType type; int resid = pop(); byte subOp = fetchScriptByte(); @@ -2399,7 +2400,7 @@ void ScummEngine_v100he::o100_getResourceSize() { type = rtScript; break; case 72: - push (getSoundResourceSize(resid)); + push(getSoundResourceSize(resid)); return; default: error("o100_getResourceSize: default type %d", subOp); diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index dfcfa32df4..0e25fe4849 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -1911,7 +1911,8 @@ void ScummEngine_v72he::o72_writeINI() { void ScummEngine_v72he::o72_getResourceSize() { const byte *ptr; - int size, type; + int size; + ResType type; int resid = pop(); if (_game.heversion == 72) { @@ -1923,7 +1924,7 @@ void ScummEngine_v72he::o72_getResourceSize() { switch (subOp) { case 13: - push (getSoundResourceSize(resid)); + push(getSoundResourceSize(resid)); return; case 14: type = rtRoomImage; |