diff options
author | RichieSams | 2014-12-30 15:19:29 -0600 |
---|---|---|
committer | RichieSams | 2014-12-30 15:40:29 -0600 |
commit | 97c35714ce3986b99848a780f6b195a63f8910b7 (patch) | |
tree | b36042a01b0563b29804141798664173afc0c59d /engines | |
parent | a188b31d15711bd86725ca4feb0dc36fb2ab71ac (diff) | |
download | scummvm-rg350-97c35714ce3986b99848a780f6b195a63f8910b7.tar.gz scummvm-rg350-97c35714ce3986b99848a780f6b195a63f8910b7.tar.bz2 scummvm-rg350-97c35714ce3986b99848a780f6b195a63f8910b7.zip |
SWORD25: Rename lua serialization functions to use 'persist' in order to match the rest of the engine
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sword25/module.mk | 6 | ||||
-rw-r--r-- | engines/sword25/script/luascript.cpp | 6 | ||||
-rw-r--r-- | engines/sword25/util/lua_persist.cpp (renamed from engines/sword25/util/lua_serializer.cpp) | 6 | ||||
-rw-r--r-- | engines/sword25/util/lua_persistence.h (renamed from engines/sword25/util/lua_serialization.h) | 4 | ||||
-rw-r--r-- | engines/sword25/util/lua_persistence_util.cpp (renamed from engines/sword25/util/lua_serialization_util.cpp) | 2 | ||||
-rw-r--r-- | engines/sword25/util/lua_persistence_util.h (renamed from engines/sword25/util/lua_serialization_util.h) | 0 | ||||
-rw-r--r-- | engines/sword25/util/lua_unpersist.cpp (renamed from engines/sword25/util/lua_unserializer.cpp) | 6 |
7 files changed, 15 insertions, 15 deletions
diff --git a/engines/sword25/module.mk b/engines/sword25/module.mk index 0135f53783..129b4f040e 100644 --- a/engines/sword25/module.mk +++ b/engines/sword25/module.mk @@ -83,9 +83,9 @@ MODULE_OBJS := \ util/lua/lzio.o \ util/lua/scummvm_file.o \ util/double_serializer.o \ - util/lua_serialization_util.o \ - util/lua_serializer.o \ - util/lua_unserializer.o + util/lua_persistence_util.o \ + util/lua_persist.o \ + util/lua_unpersist.o # This module can be built as a plugin ifeq ($(ENABLE_SWORD25), DYNAMIC_PLUGIN) diff --git a/engines/sword25/script/luascript.cpp b/engines/sword25/script/luascript.cpp index 6cf287c643..e93289596b 100644 --- a/engines/sword25/script/luascript.cpp +++ b/engines/sword25/script/luascript.cpp @@ -43,7 +43,7 @@ #include "sword25/util/lua/lua.h" #include "sword25/util/lua/lualib.h" #include "sword25/util/lua/lauxlib.h" -#include "sword25/util/lua_serialization.h" +#include "sword25/util/lua_persistence.h" namespace Sword25 { @@ -396,7 +396,7 @@ bool LuaScriptEngine::persist(OutputPersistenceBlock &writer) { // Lua persists and stores the data in a WriteStream Common::MemoryWriteStreamDynamic writeStream; - Lua::serializeLua(_state, &writeStream); + Lua::persistLua(_state, &writeStream); // Persistenzdaten in den Writer schreiben. writer.write(writeStream.getData(), writeStream.size()); @@ -482,7 +482,7 @@ bool LuaScriptEngine::unpersist(InputPersistenceBlock &reader) { reader.readByteArray(chunkData); Common::MemoryReadStream readStream(&chunkData[0], chunkData.size(), DisposeAfterUse::NO); - Lua::unserializeLua(_state, &readStream); + Lua::unpersistLua(_state, &readStream); // Permanents-Table is removed from stack lua_remove(_state, -2); diff --git a/engines/sword25/util/lua_serializer.cpp b/engines/sword25/util/lua_persist.cpp index 55b6257324..b9c0b13e11 100644 --- a/engines/sword25/util/lua_serializer.cpp +++ b/engines/sword25/util/lua_persist.cpp @@ -20,10 +20,10 @@ * */ -#include "sword25/util/lua_serialization.h" +#include "sword25/util/lua_persistence.h" #include "sword25/util/double_serializer.h" -#include "sword25/util/lua_serialization_util.h" +#include "sword25/util/lua_persistence_util.h" #include "common/stream.h" @@ -55,7 +55,7 @@ static void serializeUpValue(SerializationInfo *info); static void serializeUserData(SerializationInfo *info); -void serializeLua(lua_State *luaState, Common::WriteStream *writeStream) { +void persistLua(lua_State *luaState, Common::WriteStream *writeStream) { SerializationInfo info; info.luaState = luaState; info.writeStream = writeStream; diff --git a/engines/sword25/util/lua_serialization.h b/engines/sword25/util/lua_persistence.h index 549ea7968d..cf7d7e03ca 100644 --- a/engines/sword25/util/lua_serialization.h +++ b/engines/sword25/util/lua_persistence.h @@ -36,8 +36,8 @@ namespace Lua { #define PERMANENT_TYPE 101 -void serializeLua(lua_State *luaState, Common::WriteStream *writeStream); -void unserializeLua(lua_State *luaState, Common::ReadStream *readStream); +void persistLua(lua_State *luaState, Common::WriteStream *writeStream); +void unpersistLua(lua_State *luaState, Common::ReadStream *readStream); } // End of namespace Lua diff --git a/engines/sword25/util/lua_serialization_util.cpp b/engines/sword25/util/lua_persistence_util.cpp index fc3f73eca6..8365f5d483 100644 --- a/engines/sword25/util/lua_serialization_util.cpp +++ b/engines/sword25/util/lua_persistence_util.cpp @@ -20,7 +20,7 @@ * */ -#include "sword25/util/lua_serialization_util.h" +#include "sword25/util/lua_persistence_util.h" #include "common/scummsys.h" diff --git a/engines/sword25/util/lua_serialization_util.h b/engines/sword25/util/lua_persistence_util.h index 345996f606..345996f606 100644 --- a/engines/sword25/util/lua_serialization_util.h +++ b/engines/sword25/util/lua_persistence_util.h diff --git a/engines/sword25/util/lua_unserializer.cpp b/engines/sword25/util/lua_unpersist.cpp index 803c79c8c2..aa924ff7c5 100644 --- a/engines/sword25/util/lua_unserializer.cpp +++ b/engines/sword25/util/lua_unpersist.cpp @@ -20,10 +20,10 @@ * */ -#include "sword25/util/lua_serialization.h" +#include "sword25/util/lua_persistence.h" #include "sword25/util/double_serializer.h" -#include "sword25/util/lua_serialization_util.h" +#include "sword25/util/lua_persistence_util.h" #include "common/stream.h" @@ -54,7 +54,7 @@ static void unserializeUserData(UnSerializationInfo *info, int index); static void unserializePermanent(UnSerializationInfo *info, int index); -void unserializeLua(lua_State *luaState, Common::ReadStream *readStream) { +void unpersistLua(lua_State *luaState, Common::ReadStream *readStream) { UnSerializationInfo info; info.luaState = luaState; info.readStream = readStream; |