|
|
| version 1.27, 2007/01/23 15:48:20 | version 1.28, 2008/03/13 16:27:39 |
|---|---|
| Line 42 | Line 42 |
| #include "toolkit.h" | #include "toolkit.h" |
| #include "kdispwin.h" | #include "kdispwin.h" |
| #include "sysmenu.h" | |
| #include "toolwin.h" | #include "toolwin.h" |
| #include "viewer.h" | #include "viewer.h" |
| #include "debugwin.h" | #include "debugwin.h" |
| Line 50 | Line 49 |
| #include "commng.h" | #include "commng.h" |
| #include "fontmng.h" | #include "fontmng.h" |
| #include "inputmng.h" | |
| #include "joymng.h" | #include "joymng.h" |
| #include "kbdmng.h" | #include "kbdmng.h" |
| #include "mousemng.h" | #include "mousemng.h" |
| Line 61 | Line 59 |
| /* | /* |
| * resume | |
| */ | |
| static const char np2resumeext[] = "sav"; | |
| /* | |
| * failure signale handler | * failure signale handler |
| */ | */ |
| typedef void sigfunc(int); | typedef void sigfunc(int); |
| Line 100 sighandler(int signo) | Line 92 sighandler(int signo) |
| static struct option longopts[] = { | static struct option longopts[] = { |
| { "config", required_argument, 0, 'c' }, | { "config", required_argument, 0, 'c' }, |
| { "timidity-config", required_argument, 0, 'C' }, | { "timidity-config", required_argument, 0, 'C' }, |
| #if defined(USE_SDL) || defined(USE_SYSMENU) | |
| { "ttfont", required_argument, 0, 't' }, | |
| #endif | |
| { "help", no_argument, 0, 'h' }, | { "help", no_argument, 0, 'h' }, |
| { 0, 0, 0, 0 }, | { 0, 0, 0, 0 }, |
| }; | }; |
| Line 118 usage(void) | Line 107 usage(void) |
| printf("\t--help [-h] : print this message\n"); | printf("\t--help [-h] : print this message\n"); |
| printf("\t--config [-c] <file> : specify config file\n"); | printf("\t--config [-c] <file> : specify config file\n"); |
| printf("\t--timidity-config [-C] <file> : specify timidity config file\n"); | printf("\t--timidity-config [-C] <file> : specify timidity config file\n"); |
| #if defined(USE_SDL) || defined(USE_SYSMENU) | |
| printf("\t--ttfont [-t] <file> : specify TrueType font\n"); | |
| #endif | |
| exit(1); | exit(1); |
| } | } |
| Line 248 main(int argc, char *argv[]) | Line 234 main(int argc, char *argv[]) |
| rand_setseed((SINT32)time(NULL)); | rand_setseed((SINT32)time(NULL)); |
| #if defined(GCC_CPU_ARCH_IA32) | |
| mmxflag = havemmx() ? 0 : MMXFLAG_NOTSUPPORT; | mmxflag = havemmx() ? 0 : MMXFLAG_NOTSUPPORT; |
| mmxflag += np2oscfg.disablemmx ? MMXFLAG_DISABLE : 0; | mmxflag += np2oscfg.disablemmx ? MMXFLAG_DISABLE : 0; |
| #endif | |
| TRACEINIT(); | TRACEINIT(); |
| Line 265 main(int argc, char *argv[]) | Line 249 main(int argc, char *argv[]) |
| toolkit_widget_create(); | toolkit_widget_create(); |
| scrnmng_initialize(); | scrnmng_initialize(); |
| kbdmng_init(); | kbdmng_init(); |
| inputmng_init(); | |
| keystat_initialize(); | keystat_initialize(); |
| scrnmode = 0; | scrnmode = 0; |
| if (np2cfg.RASTER) { | if (np2cfg.RASTER) { |
| scrnmode |= SCRNMODE_HIGHCOLOR; | scrnmode |= SCRNMODE_HIGHCOLOR; |
| } | } |
| if (sysmenu_create() != SUCCESS) | |
| goto sysmenu_failure; | |
| if (scrnmng_create(scrnmode) != SUCCESS) | if (scrnmng_create(scrnmode) != SUCCESS) |
| goto scrnmng_failure; | goto scrnmng_failure; |
| Line 325 main(int argc, char *argv[]) | Line 306 main(int argc, char *argv[]) |
| } | } |
| } | } |
| #if !defined(CPUCORE_IA32) | #if defined(SUPPORT_RESUME) |
| if (np2oscfg.resume) { | if (np2oscfg.resume) { |
| flagload(np2resumeext, "Resume", FALSE); | flagload(np2resumeext, "Resume", FALSE); |
| } | } |
| Line 368 main(int argc, char *argv[]) | Line 349 main(int argc, char *argv[]) |
| scrnmng_destroy(); | scrnmng_destroy(); |
| scrnmng_failure: | scrnmng_failure: |
| sysmenu_destroy(); | |
| sysmenu_failure: | |
| fontmng_terminate(); | fontmng_terminate(); |
| fontmng_failure: | fontmng_failure: |