flan/test/programs/raylib-ffi.flan

13 lines
443 B
Plaintext

(import rl "vendor:raylib")
;; No window: GetColor and the enums are pure, so this exercises the whole
;; boundary — struct out-pointer, keyword->enum, string ptr+len — headlessly.
(defn main [] i32
(let [c (rl/get-color 0x11223344)]
(print-i64 (i64 (.r c))) (newline)
(print-i64 (i64 (.g c))) (newline)
(print-i64 (i64 (.b c))) (newline)
(print-i64 (i64 (.a c))) (newline)
(rl/set-trace-log-level :warning)
0))