#8046 closed patch
Save/load palManipulate data
Reported by: | SF/jamieson630 | Owned by: | SF/ender |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | ||
Cc: | Game: |
Description
The included patch addresses the problem of palManipulate data not being properly saved and loaded. The following problems currently occur as a result of this oversight:
1) When loading a game that was saved during a palette shift, the shift does not continue to completion.
2) When loading a game while the current game is in the middle of a palette shift, the palette for the newly loaded game may get corrupted.
This patch does the following:
1) It removes use of rtTemp resources to store palManipulate information, since such resources are never loaded or saved. Instead, all information is stored in new variables created in the Scumm class.
2) It adds stub serialization logic to include all necessary palManipulate information in savegames. (It uses a "smart" method whereby it does not save the largest chunks of information if there is no palette shift in progress.)
This patch does NOT currently implement save/load of palManipulate data, as this would render existing savegames incompatible with ScummVM. Rather, the appropriate additions have been added and commented out, with a note that they should be enabled whenever the savegame format is next changed.
Consequently, saving a game during a palManipulate operation will cause it to not resume when you load the game again.
On the other hand, the more common problem of interrupted palManipuate operations corrupting the palette of a newly loaded game have been addressed by reseting _palManipCounter on load, thus stopping any palette transition in progress.
This patch was made against the following snapshots:
scumm.h - v 1.15 resource_v2.cpp - v 1.3 resource_v2.cpp - v 1.2 saveload.cpp - v 1.8 gfx.cpp - v 1.17
These were the most recent snapshots at the time of this post.
Ticket imported from: #609334. Ticket imported from: patches/151.
Attachments (2)
Change History (10)
by , 22 years ago
Attachment: | savepalmanipulate.diff added |
---|
comment:1 by , 22 years ago
I just added saveload.diff, which corrects a problem with the patch that appears in that module. The problem is that _palManipCounter gets reset on SAVES as well as LOADS, so that if you save a game during a palette shift, the shift would stop.
comment:2 by , 22 years ago
Owner: | set to |
---|
comment:4 by , 22 years ago
Applied, but patch left open until the new save/load system is implemented...
REMINDER: Enable save/load data when new system is in place
(Hm, I had clicked submit on this last night, before I went to bed.. Guess it timed out ;)
comment:7 by , 22 years ago
Status: | new → closed |
---|
comment:8 by , 6 years ago
Component: | → Engine: SCUMM |
---|
Intermediate palManipulate load/save solution