45 lines
443 B
C
45 lines
443 B
C
#include "SDL.h"
|
|
|
|
#include "../doomdef.h"
|
|
|
|
#include "../ib_system.h"
|
|
|
|
|
|
//
|
|
// IB_GetTime
|
|
// returns time in 1/70th second tics
|
|
//
|
|
int IB_GetTime (void)
|
|
{
|
|
return SDL_GetTicks() * TICRATE / 1000;
|
|
}
|
|
|
|
|
|
//
|
|
// IB_Init
|
|
//
|
|
void IB_Init (void)
|
|
{
|
|
SDL_Init(SDL_INIT_TIMER);
|
|
}
|
|
|
|
|
|
//
|
|
// IB_Quit
|
|
//
|
|
void IB_Quit (void)
|
|
{
|
|
SDL_Quit();
|
|
}
|
|
|
|
|
|
void IB_WaitVBL(int count)
|
|
{
|
|
SDL_Delay(count * 1000 / 70);
|
|
}
|
|
|
|
|
|
void IB_Sleep(void)
|
|
{
|
|
SDL_Delay(1);
|
|
}
|