X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=eradicate;a=blobdiff_plain;f=src%2Fdos%2Fmain.c;fp=src%2Fdos%2Fmain.c;h=911781c2c8eacb55156fc4277afc940b4d230f58;hp=6031b6adf6a0a0cd909dceed7085378859735d4c;hb=1ee7845621c04020321fa8dfb6dcbf3d8c6c9b51;hpb=02e7611eefd46380cbce65ace9da8399c27e78e8 diff --git a/src/dos/main.c b/src/dos/main.c index 6031b6a..911781c 100644 --- a/src/dos/main.c +++ b/src/dos/main.c @@ -8,10 +8,8 @@ #include "logger.h" #include "cdpmi.h" -static void draw(void); - static struct video_mode *vmode; - +static int quit; int main(int argc, char **argv) { @@ -56,6 +54,8 @@ int main(int argc, char **argv) if(key == 27) goto break_evloop; } + if(quit) goto break_evloop; + time_msec = get_msec(); draw(); } @@ -68,17 +68,7 @@ break_evloop: return status; } -static void draw(void) +void game_quit(void) { - int i, j; - uint16_t *pptr = fb_pixels; - - for(i=0; i> 4) & 1) == ((j >> 4) & 1); - *pptr++ = chess ? 0xff00 : 0x00ff; - } - } - - blit_frame(fb_pixels, 1); + quit = 1; }