aboutsummaryrefslogtreecommitdiff
path: root/sword2/save_rest.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-11-08 15:47:51 +0000
committerTorbjörn Andersson2003-11-08 15:47:51 +0000
commit688c80b0620ae5765355a4048864bb3de84ebf74 (patch)
tree497d8efc73b08f5a4d58c45c52b7a6bafa1975ff /sword2/save_rest.cpp
parentb04ddef7506bfa08527da9e79040c583fb765b2e (diff)
downloadscummvm-rg350-688c80b0620ae5765355a4048864bb3de84ebf74.tar.gz
scummvm-rg350-688c80b0620ae5765355a4048864bb3de84ebf74.tar.bz2
scummvm-rg350-688c80b0620ae5765355a4048864bb3de84ebf74.zip
Moved more stuff into classes, changed some static allocation to dynamic,
and removed some of the references to global variables. At this point I believe everything in the main game engine has been moved into classes - not necessarily the correct ones, but still... However, there is some stuff in the driver directory that need to be taken care of as well. svn-id: r11207
Diffstat (limited to 'sword2/save_rest.cpp')
-rw-r--r--sword2/save_rest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/sword2/save_rest.cpp b/sword2/save_rest.cpp
index 169d5af1a9..9760658bc8 100644
--- a/sword2/save_rest.cpp
+++ b/sword2/save_rest.cpp
@@ -560,9 +560,9 @@ int32 Logic::fnPassPlayerSaveData(int32 *params) {
// copy from player object to savegame header
- memcpy(&g_sword2->g_header.logic, (uint8 *) params[0], sizeof(Object_logic));
- memcpy(&g_sword2->g_header.graphic, (uint8 *) params[1], sizeof(Object_graphic));
- memcpy(&g_sword2->g_header.mega, (uint8 *) params[2], sizeof(Object_mega));
+ memcpy(&_vm->g_header.logic, (uint8 *) params[0], sizeof(Object_logic));
+ memcpy(&_vm->g_header.graphic, (uint8 *) params[1], sizeof(Object_graphic));
+ memcpy(&_vm->g_header.mega, (uint8 *) params[2], sizeof(Object_mega));
// makes no odds
return IR_CONT;
@@ -584,9 +584,9 @@ int32 Logic::fnGetPlayerSaveData(int32 *params) {
// copy from savegame header to player object
- memcpy((uint8 *) ob_logic, &g_sword2->g_header.logic, sizeof(Object_logic));
- memcpy((uint8 *) ob_graphic, &g_sword2->g_header.graphic, sizeof(Object_graphic));
- memcpy((uint8 *) ob_mega, &g_sword2->g_header.mega, sizeof(Object_mega));
+ memcpy((uint8 *) ob_logic, &_vm->g_header.logic, sizeof(Object_logic));
+ memcpy((uint8 *) ob_graphic, &_vm->g_header.graphic, sizeof(Object_graphic));
+ memcpy((uint8 *) ob_mega, &_vm->g_header.mega, sizeof(Object_mega));
// any walk-data must be cleared - the player will be set to stand if
// he was walking when saved