Blob Blame Raw
#ifndef HELI_WORLD_H
#define HELI_WORLD_H


#include "common.h"
#include "sprite.h"

typedef void (*Callback)();
typedef struct _Sound *Sound;


void drawSprites();

Sound createSound(const char *path);
void soundDestroy(Sound sound);
void soundPlay(Sound sound, int loop);
void soundStop(Sound sound);

int keyDown(const char *code);
int keyWentDown(const char *code);
int keyWentUp(const char *code);

int mouseDidMove();
int mouseDown(const char *code);
int mouseWentDown(const char *code);
int mouseWentUp(const char *code);
double mouseX();
double mouseY();

int mouseIsOver(Sprite sprite);
int mousePressedOver(Sprite sprite);


int worldGetSpriteCount();
Sprite worldGetSprite(int i);

int worldGetWidth();
void worldSetWidth(int width);

int worldGetHeight();
void worldSetHeight(int height);

double worldGetFrameRate();
void worldSetFrameRate(double frameRate);

double worldGetTimeStep();

int worldGetFrameCount();
double worldGetSeconds();

void worldSetInit(Callback init);
void worldSetDraw(Callback draw);
void worldRun();
void worldStop();


void cameraOn();
void cameraOff();
int cameraIsActive();

double cameraMouseX();
double cameraMouseY();

double cameraGetX();
void cameraSetX(double x);

double cameraGetY();
void cameraSetY(double y);

double cameraGetZoom();
void cameraSetZoom(double zoom);


#endif