https://floooh.github.io/tiny8bit/kc85/jungle.kcc
https://floooh.github.io/tiny8bit/kc85/pengo.kcc
https://floooh.github.io/tiny8bit/kc85/house.kcc
| { | |
| "id": "0x7f8a1780fe08", | |
| "kind": "TranslationUnitDecl", | |
| "loc": {}, | |
| "range": { | |
| "begin": {}, | |
| "end": {} | |
| }, | |
| "inner": [ | |
| { |
| const std = @import("std"); | |
| const warn = std.debug.warn; | |
| const sg = @import("sokol_gfx.zig"); | |
| pub fn main() void { | |
| var pass_action = make_pass_action(.{ | |
| .colors = .{ | |
| .{ .action = .CLEAR, .val = .{ 1.0, 0.0, 0.0, 1.0 } }, | |
| .{ .action = .CLEAR, .val = .{ 0.0, 1.0, 0.0, 1.0 } }, | |
| .{ .action = .DONTCARE } |
| { | |
| "module": "sokol_gfx", | |
| "prefix": "sg_", | |
| "decls": [ | |
| { | |
| "kind": "struct", | |
| "name": "sg_buffer", | |
| "fields": [ | |
| { | |
| "name": "id", |
| STRUCT sg_buffer: | |
| uint32_t id | |
| TYPEDEF sg_buffer = struct sg_buffer | |
| STRUCT sg_image: | |
| uint32_t id | |
| TYPEDEF sg_image = struct sg_image | |
| // dynamic vertex- and index-buffers for imgui-generated geometry | |
| bind.vertex_buffers[0] = sg_make_buffer({ | |
| .size = MaxVertices * sizeof(ImDrawVert), | |
| .usage = SG_USAGE_STREAM | |
| }); | |
| bind.index_buffer = sg_make_buffer({ | |
| .size = MaxIndices * sizeof(ImDrawIdx), | |
| .type = SG_BUFFERTYPE_INDEXBUFFER, | |
| .usage = SG_USAGE_STREAM | |
| }); |
| if (FIPS_EMSCRIPTEN) | |
| add_definitions(-DSOKOL_GLES2) | |
| set(slang "glsl100") | |
| elseif (FIPS_WINDOWS) | |
| add_definitions(-DSOKOL_D3D11) | |
| set(slang "hlsl5") | |
| elseif (FIPS_OSX) | |
| add_definitions(-DSOKOL_METAL) | |
| if (FIPS_IOS) | |
| set(slang "metal_ios:metal_sim") |
| #!/bin/sh | |
| # | |
| # usage on Mac (assuming 'chmod u+x c64.sh'): | |
| # | |
| # ./c64.sh [PRG filename] | |
| # | |
| open $(base64 $1 | php -r "echo 'https://floooh.github.com/tiny8bit/c64.html?prg='.urlencode(fgets(STDIN));") |