MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / recordEvent

Function recordEvent

TheForceEngine/TFE_Input/replay.cpp:214–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 }
213
214 void recordEvent(int action, KeyboardCode keyCode, bool isPress)
215 {
216 // When recording, normally ignore the escape key unless the PDA is open
217 // Don't allow saving/reloading either as the state will become messed up.
218 if (isRecording() && (keyCode != KEY_ESCAPE || TFE_DarkForces::pda_isOpen())
219 && !(isBindingPressed(IAS_QUICK_SAVE) || isBindingPressed(IAS_QUICK_LOAD)))
220 {
221 int updateCounter = inputMapping_getCounter();
222 if (isPress)
223 {
224 inputEvents[updateCounter].keysPressed.push_back((InputAction)action);
225 }
226 else
227 {
228 inputEvents[updateCounter].keysDown.push_back((InputAction)action);
229 }
230 }
231 }
232
233 void replayEvent()
234 {

Callers 1

inputMapping_updateInputFunction · 0.85

Calls 5

isRecordingFunction · 0.85
pda_isOpenFunction · 0.85
isBindingPressedFunction · 0.85
inputMapping_getCounterFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected