aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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