From 1c88370563adec8e32d76d2633b77f9caa90bcbc Mon Sep 17 00:00:00 2001 From: stpohle Date: Tue, 6 May 2003 21:45:08 +0000 Subject: [PATCH] this should compile fornow --- src/menu.c | 70 +----------------------------------------------------- 1 file changed, 1 insertion(+), 69 deletions(-) diff --git a/src/menu.c b/src/menu.c index bf04da0..ce04495 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1,4 +1,4 @@ -/* $Id: menu.c,v 1.7 2003/05/06 20:48:54 stpohle Exp $ */ +/* $Id: menu.c,v 1.8 2003/05/06 21:45:08 stpohle Exp $ */ /* menu's for the game */ #include @@ -356,72 +356,4 @@ menu_displaymessage (char *title, char *text) #define DIRSCRMAX 10 static char menu_selectedfile[LEN_PATHFILENAME]; -/* draws the selection on the screen.. - dirstart - first entry do display - flags - flags what should be shown directorys or files - selected - Selected file in the list -*/ -int menu_dir_draw (_direntry *dirstart, signed char dirflags, _direntry *select) { - -} - -char *menu_dir_select (char *path, signed char dirflags) { - _direntry *destart, *de; - int max = 0, sel = -1, done = 0; - - /* get the directory list and count the numbers */ - destart = s_getdir (path); - for (max = 0, de = destart; de != NULL; de = de->next) - if (de->name[0] != '.' && (de->flags & dirflags) != 0) - max++; - if (max <= 0) - return NULL; - - while (done == 0 || (done == 1 && keypressed == 1)) { - - /* do the network loop if we have to */ - if (bman.gametype == GT_multi && bman.sock != -1) - network_loop (); - - if (SDL_PollEvent (&event) != 0) - switch (event.type) { - case (SDL_QUIT): - menuselect = -1; - bman.state = GS_quit; - done = 1; - } - - /* keyboard handling */ - keys = SDL_GetKeyState (NULL); - if (keys[SDLK_DOWN] && event.type == SDL_KEYDOWN && keypressed == 0) { - keypressed = 1; - menuselect++; - if (menuselect >= lastentry) - menuselect = 0; - } - - if (keys[SDLK_UP] && event.type == SDL_KEYDOWN && keypressed == 0) { - keypressed = 1; - menuselect--; - if (menuselect < 0) - menuselect = lastentry - 1; - } - - if (keys[SDLK_ESCAPE] && event.type == SDL_KEYDOWN) { - keypressed = 1; - return -1; - } - if (!keys[SDLK_ESCAPE] && event.type == SDL_KEYUP) - keypressed = 0; - - if (keys[SDLK_RETURN] && event.type == SDL_KEYDOWN) { - done = 1; - keypressed = 1; - } - if (!keys[SDLK_RETURN] && event.type == SDL_KEYUP) - keypressed = 0; - - s_delay (100); - } -}; #undef DIRSCRMAX