projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed uninitialized color in flat untextured z-buffer rasterizer variant
[dosdemo]
/
src
/
dos
/
main.c
diff --git
a/src/dos/main.c
b/src/dos/main.c
index
d820c7b
..
ee28dc9
100644
(file)
--- a/
src/dos/main.c
+++ b/
src/dos/main.c
@@
-8,6
+8,7
@@
#include "logger.h"
#include "cdpmi.h"
#include "audio.h"
#include "logger.h"
#include "cdpmi.h"
#include "audio.h"
+#include "mouse.h"
#include "sball.h"
#include "vmath.h"
#include "cpuid.h"
#include "sball.h"
#include "vmath.h"
#include "cpuid.h"
@@
-39,12
+40,18
@@
int main(int argc, char **argv)
__djgpp_nearptr_enable();
#endif
__djgpp_nearptr_enable();
#endif
+ 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);
}
if(read_cpuid(&cpuid) == 0) {
print_cpuid(&cpuid);
}
- init_logger("demo.log");
-
/* 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
*/
/* 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
*/
@@
-124,6
+131,15
@@
void demo_quit(void)
quit = 1;
}
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])
#define TX(ev) ((ev)->motion.motion[0])
#define TY(ev) ((ev)->motion.motion[1])
#define TZ(ev) ((ev)->motion.motion[2])