refactor
[carveJwlIkooP6JGAAIwe30JlM.git] / menu.h
diff --git a/menu.h b/menu.h
index 2945449fff77fdadad516a5d5281009dee813354..e52f3d7faa8265a34d37aea146ee7a55ea0085ca 100644 (file)
--- a/menu.h
+++ b/menu.h
@@ -7,10 +7,8 @@
 #include "player.h"
 
 #include "shaders/menu.h"
-#include "vg/vg_steam_friends.h"
-
-#define CUTE_FILES_IMPLEMENTATION
-#include "vg/dep/randygaul/cute_files.h"
+#include "vg_steam_friends.h"
+#include "submodules/tinydir/tinydir.h"
 
 VG_STATIC mdl_context menu_model;
 VG_STATIC glmesh      menu_glmesh;
@@ -194,7 +192,7 @@ VG_STATIC void menu_btn_reset( int event )
 
 VG_STATIC void menu_btn_fuckoff( int event )
 {
-   glfwSetWindowShouldClose( vg.window, 1 );
+   vg.window_should_close = 1;
 }
 
 VG_STATIC void menu_btn_quit( int event )
@@ -220,13 +218,13 @@ VG_STATIC void menu_btn_map( int event )
    game_menu.map_count = 0;
    game_menu.selected_map = 0;
 
-   cf_dir_t dir;
-   cf_dir_open( &dir, "maps" );
+   tinydir_dir dir;
+   tinydir_open( &dir, "maps" );
 
    while( dir.has_next )
    {
-      cf_file_t file;
-      cf_read_file( &dir, &file );
+      tinydir_file file;
+      tinydir_readfile( &dir, &file );
       
       if( file.is_reg )
       {
@@ -240,10 +238,10 @@ VG_STATIC void menu_btn_map( int event )
             break;
       }
 
-      cf_dir_next( &dir );
+      tinydir_next( &dir );
    }
 
-   cf_dir_close(&dir);
+   tinydir_close(&dir);
 }
 
 VG_STATIC void menu_crap_ui(void)