Reviewing automation events on web...
This commit is contained in:
parent
16b79f2c70
commit
e4ea116857
3 changed files with 16 additions and 3 deletions
|
@ -211,6 +211,8 @@ int main(void)
|
||||||
eventRecording = false;
|
eventRecording = false;
|
||||||
|
|
||||||
ExportAutomationEventList(aelist, "automation.rae");
|
ExportAutomationEventList(aelist, "automation.rae");
|
||||||
|
|
||||||
|
TraceLog(LOG_INFO, "RECORDED FRAMES: %i", aelist.count);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -245,6 +247,9 @@ int main(void)
|
||||||
// NOTE: Multiple events could be executed in a single frame
|
// NOTE: Multiple events could be executed in a single frame
|
||||||
while (playFrameCounter == aelist.events[currentPlayFrame].frame)
|
while (playFrameCounter == aelist.events[currentPlayFrame].frame)
|
||||||
{
|
{
|
||||||
|
TraceLog(LOG_INFO, "PLAYING: PlayFrameCount: %i | currentPlayFrame: %i | Event Frame: %i, param: %i | current Time: %f",
|
||||||
|
playFrameCounter, currentPlayFrame, aelist.events[currentPlayFrame].frame, aelist.events[currentPlayFrame].params[0]);
|
||||||
|
|
||||||
PlayAutomationEvent(aelist.events[currentPlayFrame]);
|
PlayAutomationEvent(aelist.events[currentPlayFrame]);
|
||||||
currentPlayFrame++;
|
currentPlayFrame++;
|
||||||
|
|
||||||
|
@ -253,6 +258,9 @@ int main(void)
|
||||||
eventPlaying = false;
|
eventPlaying = false;
|
||||||
currentPlayFrame = 0;
|
currentPlayFrame = 0;
|
||||||
playFrameCounter = 0;
|
playFrameCounter = 0;
|
||||||
|
|
||||||
|
TraceLog(LOG_INFO, "FINISH PLAYING!");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1106,12 +1106,12 @@ void PollInputEvents(void)
|
||||||
// Reset keys/chars pressed registered
|
// Reset keys/chars pressed registered
|
||||||
CORE.Input.Keyboard.keyPressedQueueCount = 0;
|
CORE.Input.Keyboard.keyPressedQueueCount = 0;
|
||||||
CORE.Input.Keyboard.charPressedQueueCount = 0;
|
CORE.Input.Keyboard.charPressedQueueCount = 0;
|
||||||
// Reset key repeats
|
|
||||||
for (int i = 0; i < MAX_KEYBOARD_KEYS; i++) CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
|
for (int i = 0; i < MAX_KEYBOARD_KEYS; i++) CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
|
||||||
|
|
||||||
// Reset last gamepad button/axis registered state
|
// Reset last gamepad button/axis registered state
|
||||||
CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN
|
CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN
|
||||||
//CORE.Input.Gamepad.axisCount = 0;
|
//CORE.Input.Gamepad.axisCount = 0;
|
||||||
|
|
||||||
// Keyboard/Mouse input polling (automatically managed by GLFW3 through callback)
|
// Keyboard/Mouse input polling (automatically managed by GLFW3 through callback)
|
||||||
|
|
||||||
// Register previous keys states
|
// Register previous keys states
|
||||||
|
|
|
@ -559,12 +559,12 @@ void PollInputEvents(void)
|
||||||
// Reset keys/chars pressed registered
|
// Reset keys/chars pressed registered
|
||||||
CORE.Input.Keyboard.keyPressedQueueCount = 0;
|
CORE.Input.Keyboard.keyPressedQueueCount = 0;
|
||||||
CORE.Input.Keyboard.charPressedQueueCount = 0;
|
CORE.Input.Keyboard.charPressedQueueCount = 0;
|
||||||
// Reset key repeats
|
|
||||||
for (int i = 0; i < MAX_KEYBOARD_KEYS; i++) CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
|
for (int i = 0; i < MAX_KEYBOARD_KEYS; i++) CORE.Input.Keyboard.keyRepeatInFrame[i] = 0;
|
||||||
|
|
||||||
// Reset last gamepad button/axis registered state
|
// Reset last gamepad button/axis registered state
|
||||||
CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN
|
CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN
|
||||||
//CORE.Input.Gamepad.axisCount = 0;
|
//CORE.Input.Gamepad.axisCount = 0;
|
||||||
|
|
||||||
// Keyboard/Mouse input polling (automatically managed by GLFW3 through callback)
|
// Keyboard/Mouse input polling (automatically managed by GLFW3 through callback)
|
||||||
|
|
||||||
// Register previous keys states
|
// Register previous keys states
|
||||||
|
@ -592,7 +592,6 @@ void PollInputEvents(void)
|
||||||
// so, if mouse is not moved it returns a (0, 0) position... this behaviour should be reviewed!
|
// so, if mouse is not moved it returns a (0, 0) position... this behaviour should be reviewed!
|
||||||
//for (int i = 0; i < MAX_TOUCH_POINTS; i++) CORE.Input.Touch.position[i] = (Vector2){ 0, 0 };
|
//for (int i = 0; i < MAX_TOUCH_POINTS; i++) CORE.Input.Touch.position[i] = (Vector2){ 0, 0 };
|
||||||
|
|
||||||
CORE.Window.resizedLastFrame = false;
|
|
||||||
|
|
||||||
// Gamepad support using emscripten API
|
// Gamepad support using emscripten API
|
||||||
// NOTE: GLFW3 joystick functionality not available in web
|
// NOTE: GLFW3 joystick functionality not available in web
|
||||||
|
@ -661,6 +660,12 @@ void PollInputEvents(void)
|
||||||
CORE.Input.Gamepad.axisCount[i] = gamepadState.numAxes;
|
CORE.Input.Gamepad.axisCount[i] = gamepadState.numAxes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CORE.Window.resizedLastFrame = false;
|
||||||
|
|
||||||
|
// This code does not seem to do anything??
|
||||||
|
//if (CORE.Window.eventWaiting) glfwWaitEvents(); // Wait for in input events before continue (drawing is paused)
|
||||||
|
//else glfwPollEvents(); // Poll input events: keyboard/mouse/window events (callbacks)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue