diff options
Diffstat (limited to 'interface.c')
| -rw-r--r-- | interface.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/interface.c b/interface.c new file mode 100644 index 0000000..58d8721 --- /dev/null +++ b/interface.c | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #include "all.h" | ||
| 2 | |||
| 3 | void DrawCrosshair(void) { | ||
| 4 | int screenWidth = GetScreenWidth(); | ||
| 5 | int screenHeight = GetScreenHeight(); | ||
| 6 | DrawLine(screenWidth / 2 - 10, screenHeight / 2, screenWidth / 2 + 10, screenHeight / 2, GREEN); | ||
| 7 | DrawLine(screenWidth / 2, screenHeight / 2 - 10, screenWidth / 2, screenHeight / 2 + 10, GREEN); | ||
| 8 | } | ||
| 9 | |||
| 10 | void DrawDebugInfo(void) { | ||
| 11 | DrawTextEx(game.font_ui, TextFormat("%i FPS", GetFPS()), (Vector2){ 10, 10 }, 20, 2, GREEN); | ||
| 12 | DrawTextEx(game.font_ui, TextFormat("VSync: %s", game.vsync ? "ON" : "OFF"), (Vector2){ 10, 35 }, 20, 2, GREEN); | ||
| 13 | DrawTextEx(game.font_ui, TextFormat("Speed: %.0f", game.player.horizontal_speed), (Vector2){ 10, 60 }, 20, 2, GREEN); | ||
| 14 | } | ||
