blob: 41d1b05ede5f81b30cc0a871e8b69d30ce75bff2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "graphics.h"
#include "game.h"
#include "config.h"
void update(float ms){
Game * game = reinterpret_cast<Game *>(graphics::getUserData());
game -> update();
}
void draw(){
Game * game = reinterpret_cast<Game *>(graphics::getUserData());
game -> draw();
}
int main()
{
graphics::createWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "Star Wars Episode 0: Return of the Developer");
graphics::setCanvasSize(WINDOW_WIDTH, WINDOW_HEIGHT);
graphics::setCanvasScaleMode(graphics::CANVAS_SCALE_FIT);
graphics::setDrawFunction(draw);
graphics::setUpdateFunction(update);
Game game;
graphics::setUserData(&game);
graphics::startMessageLoop();
return 0;
}
|