aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorScott Thomas2011-04-15 21:40:51 +0930
committerScott Thomas2011-04-15 21:46:06 +0930
commit8e9dbe5c3dfde9e180cd1008cb888618f77c64fa (patch)
tree17add1befb181d93413769ac4688ce7befac9bf5 /engines
parent20e662e5a6a01930f773878b22a2a2be38b2ee67 (diff)
downloadscummvm-rg350-8e9dbe5c3dfde9e180cd1008cb888618f77c64fa.tar.gz
scummvm-rg350-8e9dbe5c3dfde9e180cd1008cb888618f77c64fa.tar.bz2
scummvm-rg350-8e9dbe5c3dfde9e180cd1008cb888618f77c64fa.zip
GROOVIE: Use uint32 when searching for a video id by name
This brings ResMan::getRef into line with the rest of the engine.
Diffstat (limited to 'engines')
-rw-r--r--engines/groovie/resource.cpp8
-rw-r--r--engines/groovie/resource.h6
-rw-r--r--engines/groovie/script.cpp6
-rw-r--r--engines/groovie/script.h2
4 files changed, 11 insertions, 11 deletions
diff --git a/engines/groovie/resource.cpp b/engines/groovie/resource.cpp
index 5d4ccf7d91..179d746ec2 100644
--- a/engines/groovie/resource.cpp
+++ b/engines/groovie/resource.cpp
@@ -92,7 +92,7 @@ ResMan_t7g::ResMan_t7g(Common::MacResManager *macResFork) : _macResFork(macResFo
}
}
-uint16 ResMan_t7g::getRef(Common::String name, Common::String scriptname) {
+uint32 ResMan_t7g::getRef(Common::String name, Common::String scriptname) {
// Get the name of the RL file
Common::String rlFileName(t7g_gjds[_lastGjd]);
rlFileName += ".rl";
@@ -110,7 +110,7 @@ uint16 ResMan_t7g::getRef(Common::String name, Common::String scriptname) {
if (!rlFile)
error("Groovie::Resource: Couldn't open %s", rlFileName.c_str());
- uint16 resNum;
+ uint32 resNum;
bool found = false;
for (resNum = 0; !found && !rlFile->err() && !rlFile->eos(); resNum++) {
// Read the resource name
@@ -134,7 +134,7 @@ uint16 ResMan_t7g::getRef(Common::String name, Common::String scriptname) {
// Verify we really found the resource
if (!found) {
error("Groovie::Resource: Couldn't find resource %s in %s", name.c_str(), rlFileName.c_str());
- return (uint16)-1;
+ return (uint32)-1;
}
return (_lastGjd << 10) | (resNum - 1);
@@ -217,7 +217,7 @@ ResMan_v2::ResMan_v2() {
indexfile.close();
}
-uint16 ResMan_v2::getRef(Common::String name, Common::String scriptname) {
+uint32 ResMan_v2::getRef(Common::String name, Common::String scriptname) {
return 0;
}
diff --git a/engines/groovie/resource.h b/engines/groovie/resource.h
index ca2ea177cb..37fa50f2ea 100644
--- a/engines/groovie/resource.h
+++ b/engines/groovie/resource.h
@@ -43,7 +43,7 @@ public:
virtual ~ResMan() {}
Common::SeekableReadStream *open(uint32 fileRef);
- virtual uint16 getRef(Common::String name, Common::String scriptname = "") = 0;
+ virtual uint32 getRef(Common::String name, Common::String scriptname = "") = 0;
protected:
Common::Array<Common::String> _gjds;
@@ -57,7 +57,7 @@ public:
ResMan_t7g(Common::MacResManager *macResFork = 0);
~ResMan_t7g() {}
- uint16 getRef(Common::String name, Common::String scriptname);
+ uint32 getRef(Common::String name, Common::String scriptname);
bool getResInfo(uint32 fileRef, ResInfo &resInfo);
private:
@@ -69,7 +69,7 @@ public:
ResMan_v2();
~ResMan_v2() {}
- uint16 getRef(Common::String name, Common::String scriptname);
+ uint32 getRef(Common::String name, Common::String scriptname);
bool getResInfo(uint32 fileRef, ResInfo &resInfo);
};
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 175a41b1de..9b58f8bd5a 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -320,7 +320,7 @@ uint8 Script::readScriptChar(bool allow7C, bool limitVal, bool limitVar) {
return result;
}
-uint16 Script::getVideoRefString() {
+uint32 Script::getVideoRefString() {
Common::String str;
byte c;
@@ -1015,7 +1015,7 @@ void Script::o_add() {
void Script::o_videofromstring1() {
uint16 instStart = _currentInstruction;
- uint16 fileref = getVideoRefString();
+ uint32 fileref = getVideoRefString();
// Show the debug information just when starting the playback
if (fileref != _videoRef) {
@@ -1031,7 +1031,7 @@ void Script::o_videofromstring1() {
void Script::o_videofromstring2() {
uint16 instStart = _currentInstruction;
- uint16 fileref = getVideoRefString();
+ uint32 fileref = getVideoRefString();
// Show the debug information just when starting the playback
if (fileref != _videoRef) {
diff --git a/engines/groovie/script.h b/engines/groovie/script.h
index cda87a8917..b959810bb6 100644
--- a/engines/groovie/script.h
+++ b/engines/groovie/script.h
@@ -137,7 +137,7 @@ private:
uint16 readScript8or16bits();
uint8 readScriptChar(bool allow7C, bool limitVal, bool limitVar);
uint8 readScriptVar();
- uint16 getVideoRefString();
+ uint32 getVideoRefString();
bool hotspot(Common::Rect rect, uint16 addr, uint8 cursor);