aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/bitmap.cpp
diff options
context:
space:
mode:
authorAlyssa Milburn2011-08-19 14:55:44 +0200
committerAlyssa Milburn2011-08-19 14:55:44 +0200
commit43a41f5380228c62959374750667dadd175ea5ad (patch)
tree84aa9bd46f09f32be4b77d35230b2f8d72797050 /engines/cge/bitmap.cpp
parent2178d64cbe795ab839ecac3bdbb4d7dd0bf647bd (diff)
downloadscummvm-rg350-43a41f5380228c62959374750667dadd175ea5ad.tar.gz
scummvm-rg350-43a41f5380228c62959374750667dadd175ea5ad.tar.bz2
scummvm-rg350-43a41f5380228c62959374750667dadd175ea5ad.zip
CGE: Endian-swap VBM headers on load if needed.
Diffstat (limited to 'engines/cge/bitmap.cpp')
-rw-r--r--engines/cge/bitmap.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp
index ddab57eec8..e497828788 100644
--- a/engines/cge/bitmap.cpp
+++ b/engines/cge/bitmap.cpp
@@ -407,15 +407,19 @@ bool Bitmap::loadVBM(XFile *f) {
uint16 p = 0, n = 0;
if (f->_error == 0)
f->read((uint8 *)&p, sizeof(p));
+ p = FROM_LE_16(p);
if (f->_error == 0)
f->read((uint8 *)&n, sizeof(n));
+ n = FROM_LE_16(n);
if (f->_error == 0)
f->read((uint8 *)&_w, sizeof(_w));
+ _w = FROM_LE_16(_w);
if (f->_error == 0)
f->read((uint8 *)&_h, sizeof(_h));
+ _h = FROM_LE_16(_h);
if (f->_error == 0) {
if (p) {