Show effects of Lua in input display

This commit is contained in:
Ilari Liusvaara 2013-04-05 20:06:00 +03:00
parent f7b6602f10
commit bfaf627c66
3 changed files with 4 additions and 19 deletions

View file

@ -1006,20 +1006,12 @@ public:
* Returns: The current controls.
*/
controller_frame get(uint64_t framenum) throw();
/**
* Commit given controls (autohold/autofire is factored in).
*
* Parameter framenum: Number of current frame (for evaluating autofire).
* Returns: The committed controls.
*/
controller_frame commit(uint64_t framenum) throw();
/**
* Commit given controls (autohold/autofire is ignored).
*
* Parameter controls: The controls to commit
* Returns: The committed controls.
*/
controller_frame commit(controller_frame controls) throw();
void commit(controller_frame controls) throw();
/**
* Get status of committed controls.
* Returns: The committed controls.

View file

@ -712,22 +712,14 @@ controller_frame controller_state::get_blank() throw()
return _input.blank_frame();
}
controller_frame controller_state::commit(uint64_t framenum) throw()
{
controller_frame f = get(framenum);
_committed = f;
return _committed;
}
controller_frame controller_state::get_committed() throw()
{
return _committed;
}
controller_frame controller_state::commit(controller_frame controls) throw()
void controller_state::commit(controller_frame controls) throw()
{
_committed = controls;
return _committed;
}
bool controller_state::is_present(unsigned pcid) throw()

View file

@ -173,8 +173,9 @@ controller_frame movie_logic::update_controls(bool subframe) throw(std::bad_allo
controls.reset(pending_reset_cycles);
else if(!subframe)
controls.reset(-1);
controller_frame tmp = controls.commit(movb.get_movie().get_current_frame());
controller_frame tmp = controls.get(movb.get_movie().get_current_frame());
lua_callback_do_input(tmp, subframe);
controls.commit(tmp);
return tmp;
}