Logo

index : jinit

---

  • summary
  • about
  • tree
  • log
  • branches
<< path: root/public/jinit.git/html/templates/raylib/rules_raylib.jai blob: 3b47bdbc9bd75cecc3ad4ef5bc754175989c1657 [raw] [clear marker]

        
0() -> Rules {
1 gitignore :: #string STR_END
2# Jai
3.build
4/bin
5 STR_END;
6
7 main_jai :: #string STR_END
8#import "Basic"()(
9 MEMORY_DEBUGGER = MEMORY_DEBUGGER_ENABLED
10);
11#import "Math";
12#import "raylib";
13
14
15main :: () {
16 #if MEMORY_DEBUGGER_ENABLED defer report_memory_leaks();
17
18 log("Hello, Sailor!");
19
20 //SetTraceLogLevel(.LOG_NONE);
21 //SetConfigFlags(.FLAG_MSAA_4X_HINT);
22
23 InitWindow(800, 600, "Template");
24 defer CloseWindow();
25
26 SetTargetFPS(60);
27
28 while !WindowShouldClose() {
29 {
30 BeginDrawing();
31 defer EndDrawing();
32
33 ClearBackground({ 42, 42, 60, 255 });
34
35 DrawFPS(10, 10);
36 DrawText(TextFormat("Frame Time: %f s", GetFrameTime()), 10, 30, 20, WHITE);
37 }
38
39 //reset_temporary_storage()
40 }
41}
42
43 STR_END;
44
45 return .{
46 arg_name = "ray",
47 description = "Raylib starter template",
48 template = "templates/raylib/template.jai",
49 dirs_in_workplace = .[ "src", "modules" ],
50 files = .[
51 .{ ".gitignore", gitignore },
52 .{ "src/main.jai", main_jai },
53 .{ "README.md", "" },
54 ],
55 };
56}();
57
Copyright 2026  E766CB298A6D1E64 | Git-Thing heavily inspired by cgit