eco2d/code/apps/client/source/platform_raylib.c

26 lines
507 B
C
Raw Normal View History

2021-01-11 20:11:03 +00:00
#include "platform.h"
2021-01-10 16:42:01 +00:00
#include "raylib.h"
2021-01-10 16:52:20 +00:00
const uint16_t screenWidth = 800;
const uint16_t screenHeight = 450;
2021-01-10 16:42:01 +00:00
2021-01-11 20:11:03 +00:00
void platform_init() {
2021-01-11 13:47:14 +00:00
InitWindow(screenWidth, screenHeight, "eco2d - client");
2021-01-10 16:42:01 +00:00
SetTargetFPS(60);
}
2021-01-11 20:11:03 +00:00
void platform_shutdown() {
2021-01-10 16:42:01 +00:00
CloseWindow();
}
2021-01-11 20:11:03 +00:00
uint8_t platform_is_running() {
2021-01-11 20:08:16 +00:00
return !WindowShouldClose();
}
2021-01-11 20:11:03 +00:00
void platform_render() {
2021-01-10 16:42:01 +00:00
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("NOBODY EXPECTS SPANISH INQUISITION!", 190, 200, 20, RED);
EndDrawing();
}