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