Blame src/world.h

Ivan Mahonin 3f9996
#ifndef HELI_WORLD_H
Ivan Mahonin 3f9996
#define HELI_WORLD_H
Ivan Mahonin 3f9996
Ivan Mahonin 3f9996
Ivan Mahonin 3f9996
#include "common.h"
Ivan Mahonin 3f9996
#include "sprite.h"
Ivan Mahonin 3f9996
Ivan Mahonin 3f9996
typedef void (*Callback)();
Ivan Mahonin 3f9996
Ivan Mahonin 1015c5
typedef enum _KeyEvent {
Ivan Mahonin 1015c5
	KEYEVENT_KEY_DOWN,
Ivan Mahonin 1015c5
	KEYEVENT_KEY_WENTDOWN,
Ivan Mahonin 1015c5
	KEYEVENT_KEY_WENTUP,
Ivan Mahonin 1015c5
	KEYEVENT_MOUSE_DOWN,
Ivan Mahonin 1015c5
	KEYEVENT_MOUSE_WENTDOWN,
Ivan Mahonin 1015c5
	KEYEVENT_MOUSE_WENTUP,
Ivan Mahonin 1015c5
} KeyEvent;
Ivan Mahonin 1015c5
Ivan Mahonin 3f9996
Ivan Mahonin 3f9996
void drawSprites();
Ivan Mahonin 3f9996
Ivan Mahonin 8535a3
int keyDown(const char *code);
Ivan Mahonin 8535a3
int keyWentDown(const char *code);
Ivan Mahonin 8535a3
int keyWentUp(const char *code);
Ivan Mahonin 3f9996
Ivan Mahonin 1015c5
int keyEventGetCount(KeyEvent mode);
Ivan Mahonin 1015c5
const char *keyEventGet(KeyEvent mode, int i);
Ivan Mahonin 1015c5
Ivan Mahonin 3f9996
int mouseDidMove();
Ivan Mahonin 8535a3
int mouseDown(const char *code);
Ivan Mahonin 8535a3
int mouseWentDown(const char *code);
Ivan Mahonin 8535a3
int mouseWentUp(const char *code);
bw aaf750
int mouseScrolledX();
bw aaf750
int mouseScrolledY();
Ivan Mahonin 3f9996
double mouseX();
Ivan Mahonin 3f9996
double mouseY();
Ivan Mahonin 3f9996
Ivan Mahonin 8bc1f1
double transformedMouseX();
Ivan Mahonin 8bc1f1
double transformedMouseY();
Ivan Mahonin 8bc1f1
Ivan Mahonin 546e3a
void messageBox(const char *message);
Ivan Mahonin f8dca4
int questionBox(const char *question, const char *answer0, const char *answer1);
Ivan Mahonin f8dca4
int questionBox3(const char *question, const char *answer0, const char *answer1, const char *answer2);
Ivan Mahonin dba3fc
int askText(const char *question, char *answer, int maxAnswerSize);
Ivan Mahonin dba3fc
int askTextEx(const char *question, char *answer, int maxAnswerSize, int multiline, int password);
Ivan Mahonin 3f9996
Ivan Mahonin 3f9996
int worldGetSpriteCount();
Ivan Mahonin 3f9996
Sprite worldGetSprite(int i);
Ivan Mahonin 3f9996
Ivan Mahonin 3f9996
int worldGetWidth();
Ivan Mahonin 3f9996
void worldSetWidth(int width);
Ivan Mahonin 3f9996
Ivan Mahonin 3f9996
int worldGetHeight();
Ivan Mahonin 3f9996
void worldSetHeight(int height);
Ivan Mahonin 3f9996
Ivan Mahonin ca6bde
void worldSetSize(int width, int height);
Ivan Mahonin ca6bde
Ivan Mahonin 8eb855
int worldGetResizable();
Ivan Mahonin 8eb855
void worldSetResizable(int resizable);
Ivan Mahonin 8eb855
Ivan Mahonin 8eb855
const char* worldGetTitle();
Ivan Mahonin 8eb855
void worldSetTitle(const char *title);
Ivan Mahonin 8eb855
Ivan Mahonin 8bc1f1
double worldGetMinFrameRate();
Ivan Mahonin 8bc1f1
double worldGetMaxFrameRate();
Ivan Mahonin 8bc1f1
void worldSetFrameRateEx(double minFrameRate, double maxFrameRate);
Ivan Mahonin 3f9996
void worldSetFrameRate(double frameRate);
Ivan Mahonin ca6bde
void worldSetVariableFrameRate();
Ivan Mahonin 8bc1f1
double worldGetFrameTime();
Ivan Mahonin 981405
Ivan Mahonin 3f9996
int worldGetFrameCount();
Ivan Mahonin 3f9996
double worldGetSeconds();
Ivan Mahonin 3f9996
Ivan Mahonin 3f9996
void worldSetInit(Callback init);
Ivan Mahonin 3f9996
void worldSetDraw(Callback draw);
Ivan Mahonin 1015c5
void worldSetDeinit(Callback deinit);
Ivan Mahonin 3f9996
void worldRun();
Ivan Mahonin 3f9996
void worldStop();
Ivan Mahonin 3f9996
Ivan Mahonin 3f9996
Ivan Mahonin 3f9996
#endif