dos-vga-arena-shooter-game/timer.c

22 lines
305 B
C
Raw Normal View History

2024-02-15 13:34:50 +00:00
char canRenderFrame = 0;
char elapsedTicks = 0;
void far (interrupt *oldTimer());
void far interrupt timerInterrupt() {
_disable();
elapsedTicks++;
if (elapsedTicks > SOME_THRESHOLD_FOR_30FPS) {
canRenderFrame = 1;
elapsedTicks = 0;
}
oldTimer();
int(0x20, 0x20);
_enable()
}