3 #include "core/movie.hpp"
10 movie_logic::movie_logic() throw()
17 void movie_logic::set_movie(movie
& _mov
, bool free_old
) throw()
21 if(free_old
) delete tmp
;
24 movie
& movie_logic::get_movie() throw(std::runtime_error
)
27 throw std::runtime_error("No movie");
31 void movie_logic::set_mfile(moviefile
& _mf
, bool free_old
) throw()
35 if(free_old
) delete tmp
;
38 moviefile
& movie_logic::get_mfile() throw(std::runtime_error
)
41 throw std::runtime_error("No movie");
45 void movie_logic::set_rrdata(rrdata_set
& _rrd
, bool free_old
) throw()
49 if(free_old
) delete tmp
;
52 rrdata_set
& movie_logic::get_rrdata() throw(std::runtime_error
)
55 throw std::runtime_error("No movie");
59 void movie_logic::new_frame_starting(bool dont_poll
) throw(std::bad_alloc
, std::runtime_error
)
62 portctrl::frame c
= update_controls(false);
63 if(!mov
->readonly_mode()) {
71 short movie_logic::input_poll(unsigned port
, unsigned dev
, unsigned id
) throw(std::bad_alloc
, std::runtime_error
)
75 //If this is for something else than 0-0-x, drop out of poll advance if any.
77 if(port
|| dev
) force
= notify_user_poll();
78 if(!mov
->get_DRDY(port
, dev
, id
) || force
) {
79 mov
->set_controls(update_controls(true, force
));
82 return mov
->next_input(port
, dev
, id
);
85 void movie_logic::release_memory()