// Generated by kidlisp-to-pd.mjs // Do not edit - regenerate from source #include #include #include "pd_api.h" #include "kidlisp.h" // Temp string buffer for number display static char temp_str[32]; // Source code label static const char* source_name = "bop"; static const char* source_lines[] = { "ink black, line, scroll 1 -1, blur 5" }; static const int source_line_count = 1; // Forward declarations static int update(void* userdata); // === Variables === // === Main Loop === static void kidlisp_main(void) { kl_ink(KL_BLACK); kl_line_random(); kl_scroll(1, -1); kl_blur(5); } // Draw source code HUD directly with outlined text (after effects) static void draw_source_hud(void) { // Draw source lines (compact, 8px spacing) for (int i = 0; i < source_line_count && i < 5; i++) { kl_write_outlined(source_lines[i], 5, 4 + i * 8); } // Draw QR code in bottom right kl_draw_qr(); } // Playdate event handler #ifdef _WINDLL __declspec(dllexport) #endif int eventHandler(PlaydateAPI* pd, PDSystemEvent event, uint32_t arg) { (void)arg; if (event == kEventInit) { kl_init(pd); pd->system->setUpdateCallback(update, pd); } return 0; } // Frame update static int update(void* userdata) { (void)userdata; kl_update(); kidlisp_main(); draw_source_hud(); return 1; }