|
SuperTuxKart
|
A dummy Rewinder and EventRewinder class for unit testing and handle undo destruction of projectiles. More...
#include <dummy_rewinder.hpp>

Public Member Functions | |
| BareNetworkString * | saveState (std::vector< std::string > *ru) |
| Provides a copy of the state of the object in one memory buffer. More... | |
| virtual void | undoEvent (BareNetworkString *s) |
| Called when an event needs to be undone. More... | |
| virtual void | rewindToEvent (BareNetworkString *s) |
| Called when an event needs to be replayed. More... | |
| virtual void | restoreState (BareNetworkString *s, int count) |
| Called when a state needs to be replayed. More... | |
| virtual void | undoState (BareNetworkString *s) |
| Undo the effects of the given state, but do not rewind to that state (which is done by rewindTo). More... | |
| virtual void | undo (BareNetworkString *s) |
| Called when an event needs to be undone. More... | |
| virtual void | rewind (BareNetworkString *s) |
| Called when an event needs to be replayed. More... | |
| virtual void | saveTransform () |
| Called before a rewind. More... | |
| virtual void | computeError () |
| Called when a rewind is finished, and is used to compute the error caused by the rewind (which is then visually smoothed over time). | |
Public Member Functions inherited from Rewinder | |
| Rewinder (const std::string &ui="") | |
| virtual void | reset () |
| Nothing to do here. | |
| virtual std::function< void()> | getLocalStateRestoreFunction () |
| const std::string & | getUniqueIdentity () const |
| bool | rewinderAdd () |
| Add this object to the list of all rewindable objects in the rewind manager. | |
| template<typename T > | |
| std::shared_ptr< T > | getShared () |
Public Member Functions inherited from EventRewinder | |
| EventRewinder () | |
| Constructor. More... | |
| virtual | ~EventRewinder () |
| Destructor. | |
Additional Inherited Members | |
Protected Member Functions inherited from Rewinder | |
| void | setUniqueIdentity (const std::string &uid) |
A dummy Rewinder and EventRewinder class for unit testing and handle undo destruction of projectiles.
|
inlinevirtual |
Called when a state needs to be replayed.
This is called during rewind, i.e. when going forward in time again, and only for confirmed states.
Implements Rewinder.
|
inlinevirtual |
Called when an event needs to be replayed.
This is called during rewind, i.e. when going forward in time again.
Implements EventRewinder.
|
inlinevirtual |
Called when an event needs to be replayed.
This is called during rewind, i.e. when going forward in time again.
Implements Rewinder.
|
inlinevirtual |
Provides a copy of the state of the object in one memory buffer.
The memory is managed by the RewindManager.
| [out] | ru | The unique identity of rewinder writing to. |
Implements Rewinder.
|
inlinevirtual |
Called before a rewind.
Is used to save the previous position of an object before a rewind, so that the error due to a rewind can be computed.
Implements Rewinder.
|
inlinevirtual |
Called when an event needs to be undone.
This is called while going backwards for rewinding - all stored events will get an 'undo' call.
Implements EventRewinder.
|
inlinevirtual |
Called when an event needs to be undone.
This is called while going backwards for rewinding - all stored events will get an 'undo' call.
Implements Rewinder.
|
inlinevirtual |
Undo the effects of the given state, but do not rewind to that state (which is done by rewindTo).
This is called while going backwards for rewinding - all stored events will get an 'undo' call.
Implements Rewinder.