diff options
author | Eugene Sandulenko | 2015-01-04 19:47:17 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-01-04 19:47:17 +0100 |
commit | 2587852c88e2fbc52bf702f71738e80628eb43fe (patch) | |
tree | d2efd31596411669890a12ad43771a500fd6d7a1 /engines/sword25/util/lua_persistence.h | |
parent | 7da48233ce9a0154364bf26c1e419d24e70f2a26 (diff) | |
parent | e4f74b6c346023608841d9f871b16069e5b54194 (diff) | |
download | scummvm-rg350-2587852c88e2fbc52bf702f71738e80628eb43fe.tar.gz scummvm-rg350-2587852c88e2fbc52bf702f71738e80628eb43fe.tar.bz2 scummvm-rg350-2587852c88e2fbc52bf702f71738e80628eb43fe.zip |
Merge pull request #557 from RichieSams/replace_pluto
SWORD25: Replace 'Pluto' lua persistance code with re-written, platform-agnostic code
Diffstat (limited to 'engines/sword25/util/lua_persistence.h')
-rw-r--r-- | engines/sword25/util/lua_persistence.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/engines/sword25/util/lua_persistence.h b/engines/sword25/util/lua_persistence.h new file mode 100644 index 0000000000..53e3dee02e --- /dev/null +++ b/engines/sword25/util/lua_persistence.h @@ -0,0 +1,67 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +/** + * This code is heavily based on the Pluto code base. Copyright below + */ + +/* Tamed Pluto - Heavy-duty persistence for Lua + * Copyright (C) 2004 by Ben Sunshine-Hill, and released into the public + * domain. People making use of this software as part of an application + * are politely requested to email the author at sneftel@gmail.com + * with a brief description of the application, primarily to satisfy his + * curiosity. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Instrumented by Stefan Reich (info@luaos.net) + * for Mobile Lua (http://luaos.net/pages/mobile-lua.php) + */ + +#ifndef LUA_PERSISTENCE_H +#define LUA_PERSISTENCE_H + +#include "sword25/util/lua/lua.h" + + +namespace Common { +class WriteStream; +class ReadStream; +} + + +namespace Lua { + +#define PERMANENT_TYPE 101 + +void persistLua(lua_State *luaState, Common::WriteStream *writeStream); +void unpersistLua(lua_State *luaState, Common::ReadStream *readStream); + +} // End of namespace Lua + +#endif |