aboutsummaryrefslogtreecommitdiff
path: root/engines/sludge/function.cpp
diff options
context:
space:
mode:
authorSimei Yin2018-05-31 19:33:57 +0200
committerSimei Yin2018-05-31 23:15:09 +0200
commit56f0821876b20da1c20afde9799bb22829cc537d (patch)
tree0cf0adb042647ed22d59aa7895b182c40b284477 /engines/sludge/function.cpp
parent2ab7665e56b303e7d5311b4d88945cd2007bee3e (diff)
downloadscummvm-rg350-56f0821876b20da1c20afde9799bb22829cc537d.tar.gz
scummvm-rg350-56f0821876b20da1c20afde9799bb22829cc537d.tar.bz2
scummvm-rg350-56f0821876b20da1c20afde9799bb22829cc537d.zip
SLUDGE: Move save/loadVariable() to struct Variable
Diffstat (limited to 'engines/sludge/function.cpp')
-rw-r--r--engines/sludge/function.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sludge/function.cpp b/engines/sludge/function.cpp
index 7ed6207526..232a040417 100644
--- a/engines/sludge/function.cpp
+++ b/engines/sludge/function.cpp
@@ -749,14 +749,14 @@ void saveFunction(LoadedFunction *fun, Common::WriteStream *stream) {
stream->writeByte(fun->cancelMe);
stream->writeByte(fun->returnSomething);
stream->writeByte(fun->isSpeech);
- saveVariable(&(fun->reg), stream);
+ fun->reg.save(stream);
if (fun->freezerLevel) {
fatal(ERROR_GAME_SAVE_FROZEN);
}
saveStack(fun->stack, stream);
for (a = 0; a < fun->numLocals; a++) {
- saveVariable(&(fun->localVars[a]), stream);
+ fun->localVars[a].save(stream);
}
}
@@ -785,13 +785,13 @@ LoadedFunction *loadFunction(Common::SeekableReadStream *stream) {
buildFunc->cancelMe = stream->readByte();
buildFunc->returnSomething = stream->readByte();
buildFunc->isSpeech = stream->readByte();
- loadVariable(&(buildFunc->reg), stream);
+ buildFunc->reg.load(stream);
loadFunctionCode(buildFunc);
buildFunc->stack = loadStack(stream, NULL);
for (a = 0; a < buildFunc->numLocals; a++) {
- loadVariable(&(buildFunc->localVars[a]), stream);
+ buildFunc->localVars[a].load(stream);
}
return buildFunc;