2011-09-16 03:49:04 +03:00
|
|
|
#ifndef _moviedata__hpp__included__
|
|
|
|
#define _moviedata__hpp__included__
|
|
|
|
|
|
|
|
#include "moviefile.hpp"
|
2011-09-16 06:13:33 +03:00
|
|
|
#include "movie.hpp"
|
2011-09-16 03:49:04 +03:00
|
|
|
|
2011-09-16 06:13:33 +03:00
|
|
|
#define LOAD_STATE_RW 0
|
|
|
|
#define LOAD_STATE_RO 1
|
|
|
|
#define LOAD_STATE_PRESERVE 2
|
|
|
|
#define LOAD_STATE_MOVIE 3
|
|
|
|
#define LOAD_STATE_DEFAULT 4
|
2011-10-03 22:32:43 +03:00
|
|
|
#define LOAD_STATE_CURRENT 5
|
2012-01-13 07:25:02 +02:00
|
|
|
#define LOAD_STATE_BEGINNING 6
|
2012-07-09 01:08:08 +03:00
|
|
|
#define LOAD_STATE_ROMRELOAD 7
|
2012-09-23 19:14:12 +03:00
|
|
|
#define LOAD_STATE_INITIAL 8
|
2011-09-16 06:13:33 +03:00
|
|
|
#define SAVE_STATE 0
|
|
|
|
#define SAVE_MOVIE 1
|
2011-09-16 03:49:04 +03:00
|
|
|
|
2011-09-16 06:13:33 +03:00
|
|
|
extern struct moviefile our_movie;
|
2013-09-22 17:39:52 +03:00
|
|
|
extern struct loaded_rom our_rom;
|
2011-09-16 06:13:33 +03:00
|
|
|
extern bool system_corrupt;
|
2011-09-16 03:49:04 +03:00
|
|
|
std::vector<char>& get_host_memory();
|
2011-09-16 06:13:33 +03:00
|
|
|
movie& get_movie();
|
|
|
|
|
2013-04-13 22:04:49 +03:00
|
|
|
std::string resolve_relative_path(const std::string& path);
|
2011-09-17 10:15:35 +03:00
|
|
|
std::pair<std::string, std::string> split_author(const std::string& author) throw(std::bad_alloc,
|
|
|
|
std::runtime_error);
|
|
|
|
|
2013-07-29 22:16:23 +03:00
|
|
|
void do_save_state(const std::string& filename, int binary) throw(std::bad_alloc, std::runtime_error);
|
|
|
|
void do_save_movie(const std::string& filename, int binary) throw(std::bad_alloc, std::runtime_error);
|
2012-07-09 01:08:08 +03:00
|
|
|
void do_load_beginning(bool reloading = false) throw(std::bad_alloc, std::runtime_error);
|
2011-09-17 01:05:41 +03:00
|
|
|
void do_load_state(struct moviefile& _movie, int lmode);
|
2011-09-18 10:06:05 +03:00
|
|
|
bool do_load_state(const std::string& filename, int lmode);
|
2014-01-18 11:50:19 +02:00
|
|
|
std::string translate_name_mprefix(std::string original, int& binary, int save);
|
2011-09-16 06:13:33 +03:00
|
|
|
|
2012-01-17 00:31:17 +02:00
|
|
|
extern std::string last_save;
|
2011-09-16 06:13:33 +03:00
|
|
|
extern movie_logic movb;
|
2011-09-16 03:49:04 +03:00
|
|
|
|
2012-05-19 14:37:49 +03:00
|
|
|
/**
|
|
|
|
* Restore the actual core state from quicksave. Only call in rewind callback.
|
|
|
|
*
|
|
|
|
* Parameter state: The state to restore.
|
|
|
|
* Parameter secs: The seconds counter.
|
|
|
|
* Parameter ssecs: The subsecond counter.
|
|
|
|
*/
|
|
|
|
void mainloop_restore_state(const std::vector<char>& state, uint64_t secs, uint64_t ssecs);
|
|
|
|
|
2013-02-09 18:35:13 +02:00
|
|
|
std::string get_mprefix_for_project();
|
|
|
|
void set_mprefix_for_project(const std::string& pfx);
|
|
|
|
void set_mprefix_for_project(const std::string& prjid, const std::string& pfx);
|
2013-02-09 21:22:24 +02:00
|
|
|
|
2012-05-19 14:37:49 +03:00
|
|
|
|
2011-09-16 03:49:04 +03:00
|
|
|
#endif
|