1v13d/src/FxEngine/FxEngine.c

38 lines
726 B
C

#include "FxEngine.h"
#include <libprof.h>
#include <display.h>
static uint32_t frame_interval=0; // in milliseconds
static bool loaded_before=false;
void FE_new_frame()
{
if (loaded_before)
prof_leave(0);
else
{
prof_init(1,0);
loaded_before=true;
}
frame_interval=prof_time(0);
prof_clear(0);
prof_enter(0);
// add frame changing -- with timeGR, wait answer on Planete Casio
FE_move(); // Not implemented yet !
FE_zbuffer_clear(); // Not implemented yet !
dupdate();
dclear();
}
int FE_get_fps()
{return 1000/frame_interval;}
static void FE_move() // call at each frame
{
// TODO with math functions, not implemented yet !
FE_set_matrice(FE_dh,FE_dv,FR_roulis);
// TODO insert physical engine
}