New settings framework
[lsnes.git] / include / core / moviedata.hpp
blobda9a869206630da5f7bf2d7ae3f093c090391fa5
1 #ifndef _moviedata__hpp__included__
2 #define _moviedata__hpp__included__
4 #include "moviefile.hpp"
5 #include "movie.hpp"
7 #define LOAD_STATE_RW 0
8 #define LOAD_STATE_RO 1
9 #define LOAD_STATE_PRESERVE 2
10 #define LOAD_STATE_MOVIE 3
11 #define LOAD_STATE_DEFAULT 4
12 #define LOAD_STATE_CURRENT 5
13 #define LOAD_STATE_BEGINNING 6
14 #define LOAD_STATE_ROMRELOAD 7
15 #define LOAD_STATE_INITIAL 8
16 #define SAVE_STATE 0
17 #define SAVE_MOVIE 1
19 extern struct moviefile our_movie;
20 extern struct loaded_rom* our_rom;
21 extern bool system_corrupt;
22 std::vector<char>& get_host_memory();
23 movie& get_movie();
25 std::pair<std::string, std::string> split_author(const std::string& author) throw(std::bad_alloc,
26 std::runtime_error);
28 void do_save_state(const std::string& filename) throw(std::bad_alloc, std::runtime_error);
29 void do_save_movie(const std::string& filename) throw(std::bad_alloc, std::runtime_error);
30 void do_load_beginning(bool reloading = false) throw(std::bad_alloc, std::runtime_error);
31 void do_load_state(struct moviefile& _movie, int lmode);
32 bool do_load_state(const std::string& filename, int lmode);
33 std::string translate_name_mprefix(std::string original, bool forio = false);
35 extern std::string last_save;
36 extern movie_logic movb;
38 /**
39 * Restore the actual core state from quicksave. Only call in rewind callback.
41 * Parameter state: The state to restore.
42 * Parameter secs: The seconds counter.
43 * Parameter ssecs: The subsecond counter.
45 void mainloop_restore_state(const std::vector<char>& state, uint64_t secs, uint64_t ssecs);
47 std::string get_mprefix_for_project();
48 void set_mprefix_for_project(const std::string& pfx);
49 void set_mprefix_for_project(const std::string& prjid, const std::string& pfx);
52 #endif