aboutsummaryrefslogtreecommitdiff
path: root/snake.jai
diff options
context:
space:
mode:
authordam <dam@gudinoff>2024-05-03 00:32:06 +0100
committerdam <dam@gudinoff>2024-05-03 00:32:06 +0100
commit8b312bad33617f9b718232141d2855d80cb8b912 (patch)
tree61880bef9e6b2c8200091cc365927b68878f9996 /snake.jai
parent66dfee359cbe2c18ce8400edeb801a2373a771f4 (diff)
downloadtask-time-tracker-8b312bad33617f9b718232141d2855d80cb8b912.tar.zst
task-time-tracker-8b312bad33617f9b718232141d2855d80cb8b912.zip
WIP : Cleaning up TUI module.
Diffstat (limited to 'snake.jai')
-rw-r--r--snake.jai6
1 files changed, 3 insertions, 3 deletions
diff --git a/snake.jai b/snake.jai
index 465ae4d..b35c0fb 100644
--- a/snake.jai
+++ b/snake.jai
@@ -1,6 +1,6 @@
#import "Basic";
#import "Random";
-TUI :: #import "TUI"(COLOR_MODE = 8);
+TUI :: #import "TUI"(COLOR_MODE_BITS = 8);
Vec2D :: struct {
x: int;
@@ -140,7 +140,7 @@ main :: () {
seed: u64 = xx to_milliseconds(current_time_monotonic()) | 0x01; // Seed must be odd.
random_seed(seed);
- assert(TUI.start(), "Failed to start TUI.");
+ assert(TUI.setup_terminal(), "Failed to setup TUI.");
TUI.set_cursor_position(1, 1);
write_string("Please enter player name: ");
@@ -161,5 +161,5 @@ main :: () {
if TUI.get_key() == TUI.Keys.Escape then break;
}
- assert(TUI.stop(), "Failed to stop TUI.");
+ assert(TUI.reset_terminal(), "Failed to reset TUI.");
}