commit 9731ff5a261396bdb117b822d955e77daa5ae400
parent 9e8cf77734755821b21fc69ba8b2d20c2fd883fb
Author: Henry Unite <unitehenry@gmail.com>
Date: Fri, 17 Apr 2026 05:25:48 +0000
feat: init raylib hello world
Diffstat:
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/main.c b/src/main.c
@@ -1,8 +1,25 @@
#include "raylib.h"
#include <stdio.h>
+#include <emscripten/emscripten.h>
+
+void draw(void) {
+ BeginDrawing();
+
+ ClearBackground(RAYWHITE);
+
+ DrawText(TextFormat("Hello World"), 190, 200, 20, DARKGRAY);
+
+ EndDrawing();
+}
int main() {
- printf("Hello World\n");
+ static const char *title = "rayflap";
+ static const int screenWidth = 480;
+ static const int screenHeight = 720;
+
+ InitWindow(screenWidth, screenHeight, title);
+
+ emscripten_set_main_loop(draw, 60, 1);
return 0;
}