aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-09-12 20:46:12 +0000
committerMax Horn2003-09-12 20:46:12 +0000
commit54f284fb3bf569ec5c9064290e0a453e3309e220 (patch)
tree8ea74cfa9d42048b75f5b0b7caac8241191ff8b0
parent2ce7c27f0b6bd7fc5166de0dcdedde7dea984655 (diff)
downloadscummvm-rg350-54f284fb3bf569ec5c9064290e0a453e3309e220.tar.gz
scummvm-rg350-54f284fb3bf569ec5c9064290e0a453e3309e220.tar.bz2
scummvm-rg350-54f284fb3bf569ec5c9064290e0a453e3309e220.zip
No need to have convertEndian member of class resMan
svn-id: r10194
-rw-r--r--sword2/resman.cpp6
-rw-r--r--sword2/resman.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/sword2/resman.cpp b/sword2/resman.cpp
index 87a67162b6..e97ca28dca 100644
--- a/sword2/resman.cpp
+++ b/sword2/resman.cpp
@@ -255,6 +255,8 @@ void resMan::Close_ResMan(void) { //Tony29May96
free(count);
}
+static void convertEndian(uint8 *file, uint32 len);
+
uint8 *resMan::Res_open(uint32 res) { //BHTony30May96
// returns ad of resource. Loads if not in memory
// retains a count
@@ -370,7 +372,7 @@ uint8 *resMan::Res_open(uint32 res) { //BHTony30May96
file.close();
#ifdef SCUMM_BIG_ENDIAN
- convertEndian((uint8 *) resList[res]->ad);
+ convertEndian((uint8 *)resList[res]->ad, len);
#endif
} else {
// Zdebug("RO %d, already open count=%d", res, count[res]);
@@ -390,7 +392,7 @@ uint8 *resMan::Res_open(uint32 res) { //BHTony30May96
return (uint8 *) resList[res]->ad;
}
-void resMan::convertEndian(uint8 *file) {
+static void convertEndian(uint8 *file, uint32 len) {
_standardHeader *hdr = (_standardHeader *)file;
hdr->compSize = SWAP_BYTES_32(hdr->compSize);
diff --git a/sword2/resman.h b/sword2/resman.h
index ec09fe639e..22e54b1534 100644
--- a/sword2/resman.h
+++ b/sword2/resman.h
@@ -44,8 +44,6 @@ class resMan
void Res_close(uint32 res); //decrements the count
//----
- void convertEndian(uint8 *ad);
-
uint8 Res_check_valid( uint32 res ); // returns '0' if resource out of range or null, otherwise '1' for ok
//resource floats when count=0