#include "all.h"


HGE *hge = NULL;
cGame *game = NULL;
HTEXTURE tex;
hgeSprite *logo;

bool RenderFunc()
{
    game->render();
    return false;
}

bool FrameFunc()
{
    return game->update();
}


void hgeinit(){
    hge = hgeCreate(HGE_VERSION);
    hge->System_SetState(HGE_TITLE, "Aquamorphs");
    hge->System_SetState(HGE_WINDOWED, true);
    hge->System_SetState(HGE_SCREENWIDTH, 1024);
    hge->System_SetState(HGE_SCREENHEIGHT, 768);
    hge->System_SetState(HGE_SHOWSPLASH, false);
    hge->System_SetState(HGE_HIDEMOUSE, true);
    hge->System_SetState(HGE_FPS, 60);
    hge->System_SetState(HGE_USESOUND, true);
    hge->System_SetState(HGE_RENDERFUNC, RenderFunc);
    hge->System_SetState(HGE_FRAMEFUNC, FrameFunc);
    hge->System_SetState(HGE_LOGFILE, "log.txt");
}

int main()
{
    hgeinit();

    if (hge->System_Initiate())
    {
        game = new cGame();
        hge->System_Start();
    }

    if (game != NULL) delete game;
    hge->System_Shutdown();
    return 0;
}
