2012-05-19 14:37:49 +03:00
|
|
|
#ifndef _lua__unsaferewind__hpp__included__
|
|
|
|
#define _lua__unsaferewind__hpp__included__
|
|
|
|
|
2013-12-20 02:02:12 +02:00
|
|
|
#include "library/lua-base.hpp"
|
2013-09-27 10:36:19 +03:00
|
|
|
#include "library/string.hpp"
|
2015-04-25 13:04:05 +03:00
|
|
|
#include "core/moviefile.hpp"
|
2013-08-21 23:19:20 +03:00
|
|
|
|
2012-05-19 14:37:49 +03:00
|
|
|
struct lua_unsaferewind
|
|
|
|
{
|
2013-12-20 02:02:12 +02:00
|
|
|
lua_unsaferewind(lua::state& L);
|
2014-03-31 11:31:25 +03:00
|
|
|
static size_t overcommit() { return 0; }
|
2015-04-25 13:04:05 +03:00
|
|
|
//The console state.
|
|
|
|
dynamic_state console_state;
|
|
|
|
//Extra state variable involved in fast movie restore. It is not part of normal console state.
|
2012-05-19 14:37:49 +03:00
|
|
|
uint64_t ptr;
|
2013-09-27 10:36:19 +03:00
|
|
|
std::string print()
|
|
|
|
{
|
2015-04-25 13:04:05 +03:00
|
|
|
return (stringfmt() << "to frame " << console_state.save_frame).str();
|
2013-09-27 10:36:19 +03:00
|
|
|
}
|
2012-05-19 14:37:49 +03:00
|
|
|
};
|
|
|
|
|
2013-05-30 04:13:59 +03:00
|
|
|
#endif
|