diff options
author | Max Horn | 2003-06-14 18:52:30 +0000 |
---|---|---|
committer | Max Horn | 2003-06-14 18:52:30 +0000 |
commit | f7a8cbf7c73479ff086276ef04b0fea15085a13a (patch) | |
tree | 681f750d30d6e128bdeee471df0472a8d3cb6be3 /scumm/object.cpp | |
parent | 9658dd6ea367ce71e1928003236c1801c5e3b1ee (diff) | |
download | scummvm-rg350-f7a8cbf7c73479ff086276ef04b0fea15085a13a.tar.gz scummvm-rg350-f7a8cbf7c73479ff086276ef04b0fea15085a13a.tar.bz2 scummvm-rg350-f7a8cbf7c73479ff086276ef04b0fea15085a13a.zip |
Patch #754151: Removed READ_*_UNALIGNED and always read stuff bytewise; augmented by some more changes of mine
svn-id: r8482
Diffstat (limited to 'scumm/object.cpp')
-rw-r--r-- | scumm/object.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index 8b10881c22..6f60297f54 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -973,7 +973,7 @@ void Scumm::addObjectToInventory(uint obj, uint room) { if (whereIsObject(obj) == WIO_FLOBJECT) { i = getObjectIndex(obj); ptr = getResourceAddress(rtFlObject, _objs[i].fl_object_index) + 8; - size = READ_BE_UINT32_UNALIGNED(ptr + 4); + size = READ_BE_UINT32(ptr + 4); } else { findObjectInRoom(&foir, foCodeHeader, obj, room); if (_features & GF_OLD_BUNDLE) @@ -981,7 +981,7 @@ void Scumm::addObjectToInventory(uint obj, uint room) { else if (_features & GF_SMALL_HEADER) size = READ_LE_UINT32(foir.obcd); else - size = READ_BE_UINT32_UNALIGNED(foir.obcd + 4); + size = READ_BE_UINT32(foir.obcd + 4); ptr = foir.obcd; } @@ -1352,7 +1352,7 @@ void Scumm::setCursorImg(uint img, uint room, uint imgindex) { if (dataptr == NULL) error("setCursorImg: No such image"); - size = READ_BE_UINT32_UNALIGNED(dataptr + 4); + size = READ_BE_UINT32(dataptr + 4); if (size > sizeof(_grabbedCursor)) error("setCursorImg: Cursor image too large"); @@ -1628,10 +1628,10 @@ void Scumm::loadFlObject(uint object, uint room) { } // Setup sizes - obcd_size = READ_BE_UINT32_UNALIGNED(foir.obcd + 4); + obcd_size = READ_BE_UINT32(foir.obcd + 4); od->OBCDoffset = 8; od->OBIMoffset = obcd_size + 8; - obim_size = READ_BE_UINT32_UNALIGNED(foir.obim + 4); + obim_size = READ_BE_UINT32(foir.obim + 4); flob_size = obcd_size + obim_size + 8; // Lock room/roomScripts for the given room. They contains the OBCD/OBIM |