From 238477bbe0a423204df0374d36b96a741990ee10 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sun, 11 Jul 2021 23:03:39 -0500 Subject: [PATCH] tiny changes --- site/js/js_events.js | 1 - src/main.onyx | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/site/js/js_events.js b/site/js/js_events.js index a60a716..8363914 100644 --- a/site/js/js_events.js +++ b/site/js/js_events.js @@ -140,7 +140,6 @@ window.ONYX_MODULES.push({ var path_memory = new Uint8Array(ONYX_MEMORY.buffer, filename_ptr, filename_len); var path = new TextDecoder("utf-8").decode(path_memory); - console.log(path); fetch(path) .then(response => response.arrayBuffer()) diff --git a/src/main.onyx b/src/main.onyx index 2aeedc1..31945e4 100644 --- a/src/main.onyx +++ b/src/main.onyx @@ -157,6 +157,11 @@ poll_events :: () -> bool { for ^entry: wasm_module.sections.entries { printf("Section: {}\nOffset: {}\n", entry.key, entry.value); } + + wasm_sections := wasm.parse_sections(^wasm_module); + for instr: wasm.instruction_iterator(^wasm_module, ^wasm_sections.code_section[1]) { + printf("{}\n", instr); + } } } } @@ -268,6 +273,8 @@ load_colors :: (event: ^events.Event) { assert(event.kind == .FileRequest, "Bad event type"); assert(event.file.status == .Success, "Failed to load color file"); + println("Reloading colorscheme..."); + color_data := memory.make_slice(u8, event.file.size); defer if color_data.count > 0 do cfree(color_data.data); events.get_requested_file_data(event.file.file_id, color_data); -- 2.25.1