blob: 8a190f6e64272f699163943347beb91408695f80 (
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
34
35
36
|
#include <stdlib.h>
#include <raylib.h>
#include "settings.h"
#include "physics.h"
#include "game.h"
#include "wall.h"
#include "assets.h"
#include "player.h"
struct settings settings;
extern struct game game;
int main() {
load_or_init_settings(&settings, "settings.ini");
InitWindow(settings.window_width, settings.window_height, "Platformer");
SetTargetFPS(settings.target_fps);
load_assets();
init_game();
load_level_from_tiled_tmj("assets/Maps/level1.tmj");
add_player(0.0, 200.0);
while (!WindowShouldClose()) {
update_game(GetFrameTime());
BeginDrawing();
ClearBackground(RAYWHITE);
draw_game();
DrawFPS(1, 1);
EndDrawing();
}
unload_assets();
return 0;
}
|