TODO move functions and timer gestionnary
This commit is contained in:
parent
2b4d4cf2af
commit
b4ba8735a1
|
@ -1,5 +1,7 @@
|
|||
#include "FxEngine.h"
|
||||
|
||||
#include <display.h>
|
||||
|
||||
FE_Angle FxEngine::dh(0);
|
||||
FE_Angle FxEngine::dv(0);
|
||||
FE_Angle FxEngine::m_dh(0);
|
||||
|
@ -8,9 +10,40 @@ FE_Angle FxEngine::m_dv(0);
|
|||
FE_Position FxEngine::real(0,0,0);
|
||||
FE_Position FxEngine::m_virt(0,0,0);
|
||||
|
||||
int FxEngine::m_numChange=0;
|
||||
int FxEngine::numPublicChange=0;
|
||||
|
||||
FE_State FxEngine::m_state=FE_PASSIVE;
|
||||
|
||||
void FxEngine::newFrame()
|
||||
{
|
||||
numPublicChange=m_numChange;
|
||||
dh=m_dh;
|
||||
dv=m_dv;
|
||||
real=m_virt;
|
||||
dupdate();
|
||||
dclear(white);
|
||||
}
|
||||
|
||||
void FxEngine::setState(FE_State state)
|
||||
{
|
||||
if (m_moveActive==state)
|
||||
return;
|
||||
if (state==true)
|
||||
{
|
||||
// todo
|
||||
// gint timer
|
||||
m_moveActive=true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// todo
|
||||
// gint kill timer
|
||||
m_moveActive=false;
|
||||
}
|
||||
}
|
||||
|
||||
void FxEngine::move()
|
||||
{
|
||||
// todo with math functions, not implemented yet !
|
||||
}
|
|
@ -13,16 +13,17 @@ class FxEngine // regroupement des fonctions
|
|||
{
|
||||
public:
|
||||
static void newFrame(); // reloads coords
|
||||
static int getChangeNumber();
|
||||
static void setState(FE_State state);
|
||||
|
||||
static FE_Angle dh,dv;
|
||||
static FE_Position real;
|
||||
static int numPublicChange;
|
||||
private:
|
||||
static FE_Angle m_dh,m_dv;
|
||||
static FE_Position m_virt;
|
||||
|
||||
static FE_State m_state;
|
||||
static int m_numChange;
|
||||
|
||||
static void move(); // appelé à intervalles réguliers
|
||||
|
||||
|
|
Loading…
Reference in New Issue