|
|
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)();
|
|
|
09c823 |
typedef struct _Sound *Sound;
|
|
|
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 |
|
|
|
09c823 |
Sound createSound(const char *path);
|
|
|
09c823 |
void soundDestroy(Sound sound);
|
|
|
09c823 |
void soundPlay(Sound sound, int loop);
|
|
|
09c823 |
void soundStop(Sound sound);
|
|
|
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 |
|
|
|
3f9996 |
int mouseIsOver(Sprite sprite);
|
|
|
3f9996 |
int mousePressedOver(Sprite sprite);
|
|
|
3f9996 |
|
|
|
546e3a |
void messageBox(const char *message);
|
|
|
1015c5 |
void askText(const char *question, char *answer, int maxAnswerSize);
|
|
|
1015c5 |
void 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 |
|
|
|
8eb855 |
int worldGetResizable();
|
|
|
8eb855 |
void worldSetResizable(int resizable);
|
|
|
8eb855 |
|
|
|
8eb855 |
const char* worldGetTitle();
|
|
|
8eb855 |
void worldSetTitle(const char *title);
|
|
|
8eb855 |
|
|
|
3f9996 |
double worldGetFrameRate();
|
|
|
3f9996 |
void worldSetFrameRate(double frameRate);
|
|
|
3f9996 |
|
|
|
981405 |
double worldGetTimeStep();
|
|
|
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 |
void cameraOn();
|
|
|
3f9996 |
void cameraOff();
|
|
|
3f9996 |
int cameraIsActive();
|
|
|
3f9996 |
|
|
|
3f9996 |
double cameraMouseX();
|
|
|
3f9996 |
double cameraMouseY();
|
|
|
3f9996 |
|
|
|
3f9996 |
double cameraGetX();
|
|
|
3f9996 |
void cameraSetX(double x);
|
|
|
3f9996 |
|
|
|
3f9996 |
double cameraGetY();
|
|
|
3f9996 |
void cameraSetY(double y);
|
|
|
3f9996 |
|
|
|
3f9996 |
double cameraGetZoom();
|
|
|
3f9996 |
void cameraSetZoom(double zoom);
|
|
|
3f9996 |
|
|
|
3f9996 |
|
|
|
3f9996 |
#endif
|