diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-06-15 22:58:30 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-06-15 22:58:30 +0100 |
commit | a1de326ac5d89cbf9555c9a0a9a662af35c6dcf7 (patch) | |
tree | ffe56e86be4acefcee8b89753cf31f7a8c1db20d /src/main.c | |
parent | 07e829e591394fa182e75ecab86051f1fb850ce7 (diff) | |
download | gold-mine-run-a1de326ac5d89cbf9555c9a0a9a662af35c6dcf7.tar.gz gold-mine-run-a1de326ac5d89cbf9555c9a0a9a662af35c6dcf7.zip |
Implement a countdown clock in the timer
Updated the HUD to show the time.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -4,6 +4,7 @@ #include <stdio.h> #include <crt0.h> +#include "timer.h" #include "keyb.h" #include "vga.h" #include "data.h" @@ -12,10 +13,17 @@ /* disable paging because our int handlers are written in C */ int _crt0_startup_flags = _CRT0_FLAG_LOCK_MEMORY; +void free_all() +{ + timer_free(); + keyb_free(); +} + int main(int argc, char *argv[]) { + timer_init(); keyb_init(); - atexit(keyb_free); + atexit(free_all); /* set VGA 320x200, 256 col */ if (!set_mode(0x13)) |