Make various instance stuff to take references to other instance objs
[lsnes.git] / include / core / subtitles.hpp
blob5353c386ece1cfaa88de6888785d0b222bed2645
1 #ifndef _subtitles__hpp__included__
2 #define _subtitles__hpp__included__
4 #include "lua/lua.hpp"
6 class moviefile_subtiming
8 public:
9 moviefile_subtiming(uint64_t frame);
10 moviefile_subtiming(uint64_t first, uint64_t length);
11 bool operator<(const moviefile_subtiming& a) const;
12 bool operator==(const moviefile_subtiming& a) const;
13 bool inrange(uint64_t x) const;
14 uint64_t get_frame() const;
15 uint64_t get_length() const;
16 private:
17 uint64_t frame;
18 uint64_t length;
19 bool position_only;
22 class movie_logic;
23 class emu_framebuffer;
25 struct subtitle_commentary
27 public:
28 subtitle_commentary(movie_logic& _mlogic, emu_framebuffer& _fbuf);
29 std::set<std::pair<uint64_t, uint64_t>> get_all();
30 std::string get(uint64_t f, uint64_t l);
31 void set(uint64_t f, uint64_t l, const std::string& x);
32 static std::string s_unescape(std::string x);
33 static std::string s_escape(std::string x);
34 void render(lua::render_context& ctx);
35 private:
36 movie_logic& mlogic;
37 emu_framebuffer& fbuf;
40 #endif