#pragma once

#include <QImage>
#include <VG/openvg.h>
#include <VG/vgu.h>
#include <stdlib.h>
#include <math.h>

#define TOUCH_PRESS Qt::TouchPointPressed
#define TOUCH_MOVE Qt::TouchPointMoved
#define TOUCH_RELEASE Qt::TouchPointReleased
#define TOUCH_STATIONARY Qt::TouchPointStationary

/** Simple C API for example code */
extern "C"
{
    /** allocate resources */
    void game_init();

    /** allocate OpenVG resources for display */
    void game_prepare();

    /** update game logic (no rendering here) */
    void game_update(float walltime);

    /** render actual game */
    void game_render();

    /** release OpenVG resources (opposite of game_prepare) */
    void game_release();

    /** deallocate resources (opposite of game_init) */
    void game_destroy();


    /** handle events, touch, sensors... */
    void game_event(int type, float x, float y, float z);

    // utility methods provided by utils.cpp
    extern VGImage loadVGImage(const char *filename);

}
