This commit is contained in:
@@ -33,6 +33,8 @@ void timeUpdate(void) {
|
||||
TIME.dynamicTime += TIME.dynamicDelta;
|
||||
TIME.dynamicUpdate = true;
|
||||
|
||||
printf("Time delta: %f\n", TIME.dynamicDelta);
|
||||
|
||||
assertTrue(TIME.dynamicDelta >= 0.0f, "Time delta is negative");
|
||||
|
||||
// Is within 1ms of a full step?
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include "timesdl2.h"
|
||||
#include "assert/assert.h"
|
||||
|
||||
void timeTickSDL2(void) {
|
||||
TIME_TICKS_LAST_SDL2 = TIME_TICKS_SDL2;
|
||||
@@ -13,5 +14,6 @@ void timeTickSDL2(void) {
|
||||
}
|
||||
|
||||
float_t timeGetDeltaSDL2(void) {
|
||||
assertTrue(TIME_TICKS_SDL2 >= TIME_TICKS_LAST_SDL2, "Ticks went backwards?");
|
||||
return (float_t)(TIME_TICKS_SDL2 - TIME_TICKS_LAST_SDL2) / 1000.0f;
|
||||
}
|
||||
Reference in New Issue
Block a user