aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 6f5034b..798dc18 100644
--- a/src/main.c
+++ b/src/main.c
@@ -3,6 +3,7 @@
3#include "common.h" 3#include "common.h"
4#include "bitmap.h" 4#include "bitmap.h"
5#include "bd-font.c" 5#include "bd-font.c"
6#include "filesystem.c"
6 7
7#include "uxn/uxn.h" 8#include "uxn/uxn.h"
8#include "uxn/uxn.c" 9#include "uxn/uxn.c"
@@ -266,6 +267,25 @@ int main(void) {
266 }, &ppu.fg); 267 }, &ppu.fg);
267 txt_position(0,0); 268 txt_position(0,0);
268 269
270 fs_init();
271
272 // DEBUG:...
273 int file_idx;
274 if ((file_idx = fs_open_file("HELLO_FILE")) >= 0) {
275 fs_write("HEY", 3, file_idx, 0, false);
276 fs_write("THERE", 3, file_idx, 1, true);
277 txt_printf("nam: %s\n", filesystem.files[file_idx].name);
278 txt_printf("num: %d\n", filesystem.num_files);
279 txt_printf("size: %d\n", filesystem.files[file_idx].size);
280 }
281 if ((file_idx = fs_open_file("HELLO_FOLKS")) >= 0) {
282 fs_write("BY GOD", 6, file_idx, 0, false);
283 fs_write("XXX", 3, file_idx, 1, true);
284 txt_printf("nam: %s\n", filesystem.files[file_idx].name);
285 txt_printf("num: %d\n", filesystem.num_files);
286 txt_printf("size: %d\n", filesystem.files[file_idx].size);
287 }
288
269 // Main loop. 289 // Main loop.
270 int frame_counter = 0; 290 int frame_counter = 0;
271 evaluxn(&u, 0x0100); 291 evaluxn(&u, 0x0100);