From 1ae2933bcbda43d16d2583a28c3c5a74adaaa9e4 Mon Sep 17 00:00:00 2001 From: dam Date: Sun, 5 May 2024 03:22:42 +0100 Subject: Implemented default background and foreground colors. --- ttt.jai | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'ttt.jai') diff --git a/ttt.jai b/ttt.jai index f3f1905..0715544 100644 --- a/ttt.jai +++ b/ttt.jai @@ -17,7 +17,12 @@ // - release : jai ttt.jai -quiet -x64 -release // - debug : jai ttt.jai -quiet -x64 +DEBUG_MEMORY :: true; +#if DEBUG_MEMORY { #import "Basic"()(MEMORY_DEBUGGER=true); // TODO Remove after final debug sessions. This takes up ~30MB of RAM. +} else { +#import "Basic"; +} #import "System"; #import "Sort"; #import "Math"; @@ -1157,8 +1162,10 @@ prompt_user_key :: (y: int, message: string) -> TUI.Key { } main :: () { - + +#if DEBUG_MEMORY { defer report_memory_leaks(); // TODO Remove after final debug sessions. +} defer free_memory(); @@ -1774,7 +1781,11 @@ main :: () { } assert(TUI.reset_terminal(), "Failed to reset TUI."); - + +#if DEBUG_MEMORY { + return; +} else { exit(xx ifx error_saving then 1 else 0); } +} -- cgit v1.2.3