blob: 8187ccfa1a4af23c869fdd85b4924f36be1fb169 (
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
|
#include <stdlib.h>
#include <raylib.h>
#include "settings.h"
#include "physics.h"
#include "game.h"
#include "player.h"
struct settings settings;
extern struct game game;
int main() {
load_or_init_settings(&settings, "settings.ini");
init_game();
InitWindow(settings.window_width, settings.window_height, "Platformer");
SetTargetFPS(settings.target_fps);
add_player(20.0, 20.0);
while (!WindowShouldClose()) {
update_game(GetFrameTime());
BeginDrawing();
ClearBackground(RAYWHITE);
draw_game();
EndDrawing();
}
return 0;
}
|