blob: 75de22fe672cf37ff8885d80ffdaa0e4e440b1cb (
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
|
#include <stdlib.h>
#include <raylib.h>
#include "settings.h"
#include "physics.h"
#include "game.h"
#include "wall.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);
add_wall(50, 100, 200, 200);
add_wall(100, 200, 200, 50);
while (!WindowShouldClose()) {
update_game(GetFrameTime());
BeginDrawing();
ClearBackground(RAYWHITE);
draw_game();
EndDrawing();
}
return 0;
}
|