X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fdos%2Fmain.c;h=ee28dc9970fa3b749762c5b3956e6082d6e3b5b6;hb=390d3d37953897e5bd64fe7f1fe88e6a94c7e5dc;hp=b415bb4e31f72117a655e6975f9b1c35ea5df4e7;hpb=b49854e0980a030cc8338a7f4ee779ecde1aae38;p=dosdemo diff --git a/src/dos/main.c b/src/dos/main.c index b415bb4..ee28dc9 100644 --- a/src/dos/main.c +++ b/src/dos/main.c @@ -8,8 +8,10 @@ #include "logger.h" #include "cdpmi.h" #include "audio.h" +#include "mouse.h" #include "sball.h" #include "vmath.h" +#include "cpuid.h" static int handle_sball_event(sball_event *ev); static void recalc_sball_matrix(float *xform); @@ -40,6 +42,16 @@ int main(int argc, char **argv) init_logger("demo.log"); +#ifdef __WATCOMC__ + printf("watcom build\n"); +#elif defined(__DJGPP__) + printf("djgpp build\n"); +#endif + + if(read_cpuid(&cpuid) == 0) { + print_cpuid(&cpuid); + } + /* au_init needs to be called early, before init_timer, and also before * we enter graphics mode, to use the midas configuration tool if necessary */ @@ -54,7 +66,7 @@ int main(int argc, char **argv) return 1; } - if((vmidx = match_video_mode(640, 480, 16)) == -1) { + if((vmidx = match_video_mode(FB_WIDTH, FB_HEIGHT, FB_BPP)) == -1) { return 1; } if(!(vmem = set_video_mode(vmidx, 1))) { @@ -119,6 +131,15 @@ void demo_quit(void) quit = 1; } +void demo_abort(void) +{ + set_text_mode(); + stop_logger(); + printf("demo_abort called. see demo.log for details. Last lines:\n\n"); + print_tail("demo.log"); + abort(); +} + #define TX(ev) ((ev)->motion.motion[0]) #define TY(ev) ((ev)->motion.motion[1]) #define TZ(ev) ((ev)->motion.motion[2])