Blob Blame Raw
#ifndef HELI_WORLD_H
#define HELI_WORLD_H


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


typedef void (*Callback)();


void drawSprites();

void playSound(const char *path, int loop);
void stopSound(const char *path);

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);

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