[Scummvm-cvs-logs] scummvm master -> da0490f9b296864e8826c63295e91515f8617839
wjp
wjp at usecode.org
Fri Nov 2 21:28:58 CET 2012
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
da0490f9b2 TONY: Fix endianness issue when saving/loading inventory
Commit: da0490f9b296864e8826c63295e91515f8617839
https://github.com/scummvm/scummvm/commit/da0490f9b296864e8826c63295e91515f8617839
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2012-11-02T13:26:34-07:00
Commit Message:
TONY: Fix endianness issue when saving/loading inventory
Changed paths:
engines/tony/inventory.cpp
diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp
index 12540e5..a1f98d8 100644
--- a/engines/tony/inventory.cpp
+++ b/engines/tony/inventory.cpp
@@ -677,8 +677,10 @@ int RMInventory::getSaveStateSize() {
void RMInventory::saveState(byte *state) {
WRITE_LE_UINT32(state, _nInv);
state += 4;
- Common::copy(_inv, _inv + 256, (uint32 *)state);
- state += 256 * 4;
+ for (int i = 0; i < 256; ++i) {
+ WRITE_LE_UINT32(state, _inv[i]);
+ state += 4;
+ }
int x;
for (int i = 0; i < 256; i++) {
@@ -695,8 +697,10 @@ void RMInventory::saveState(byte *state) {
int RMInventory::loadState(byte *state) {
_nInv = READ_LE_UINT32(state);
state += 4;
- Common::copy((uint32 *)state, (uint32 *)state + 256, _inv);
- state += 256 * 4;
+ for (int i = 0; i < 256; ++i) {
+ _inv[i] = READ_LE_UINT32(state);
+ state += 4;
+ }
int x;
for (int i = 0; i < 256; i++) {
More information about the Scummvm-git-logs
mailing list