|
|
| version 1.16, 2007/01/12 16:41:25 | version 1.20, 2008/03/13 16:27:39 |
|---|---|
| Line 181 inirdsnddrv(const char *src, const INITB | Line 181 inirdsnddrv(const char *src, const INITB |
| *(UINT8 *)ini->value = snddrv_drv2num(src); | *(UINT8 *)ini->value = snddrv_drv2num(src); |
| } | } |
| static void | |
| inirdinterp(const char *src, const INITBL *ini) | |
| { | |
| if (!milstr_cmp(src, "NEAREST")) { | |
| *(UINT8 *)ini->value = INTERP_NEAREST; | |
| } else if (!milstr_cmp(src, "TILES")) { | |
| *(UINT8 *)ini->value = INTERP_TILES; | |
| } else if (!milstr_cmp(src, "HYPER")) { | |
| *(UINT8 *)ini->value = INTERP_HYPER; | |
| } else { | |
| *(UINT8 *)ini->value = INTERP_BILINEAR; | |
| } | |
| } | |
| static void update_iniread_flag(const INITBL *p); | static void update_iniread_flag(const INITBL *p); |
| static BOOL | static BOOL |
| Line 265 inireadcb(void *arg, const char *para, c | Line 280 inireadcb(void *arg, const char *para, c |
| inirdsnddrv(work, p); | inirdsnddrv(work, p); |
| break; | break; |
| case INITYPE_INTERP: | |
| milstr_ncpy(work, data, 512); | |
| inirdinterp(work, p); | |
| break; | |
| default: | default: |
| rv = FALSE; | rv = FALSE; |
| break; | break; |
| Line 339 iwss_extend: | Line 359 iwss_extend: |
| } | } |
| } | } |
| static const char * | |
| iniwrinterp(UINT8 interp) | |
| { | |
| if (interp == INTERP_NEAREST) | |
| return "NEAREST"; | |
| else if (interp == INTERP_TILES) | |
| return "TILES"; | |
| else if (interp == INTERP_HYPER) | |
| return "HYPER"; | |
| else | |
| return "BILINEAR"; | |
| } | |
| static BOOL read_iniread_flag(const INITBL *p); | static BOOL read_iniread_flag(const INITBL *p); |
| void | void |
| Line 437 ini_write(const char *path, const char * | Line 471 ini_write(const char *path, const char * |
| SPRINTF(work, "%s", snddrv_num2drv(*(UINT8 *)p->value)); | SPRINTF(work, "%s", snddrv_num2drv(*(UINT8 *)p->value)); |
| break; | break; |
| case INITYPE_INTERP: | |
| SPRINTF(work, "%s", iniwrinterp(*(UINT8 *)p->value)); | |
| break; | |
| default: | default: |
| set = FAILURE; | set = FAILURE; |
| break; | break; |
| Line 590 static const INITBL iniitem[] = { | Line 628 static const INITBL iniitem[] = { |
| {"com3mmdl", INITYPE_STR, np2oscfg.com[2].mdl, 64}, | {"com3mmdl", INITYPE_STR, np2oscfg.com[2].mdl, 64}, |
| {"com3mdef", INITYPE_STR, np2oscfg.com[2].def, MAX_PATH}, | {"com3mdef", INITYPE_STR, np2oscfg.com[2].def, MAX_PATH}, |
| #if defined(SUPPORT_RESUME) | |
| {"e_resume", INITYPE_BOOL, &np2oscfg.resume, 0}, | {"e_resume", INITYPE_BOOL, &np2oscfg.resume, 0}, |
| #endif | |
| #if defined(SUPPORT_STATSAVE) | |
| {"STATSAVE", INIRO_BOOL, &np2oscfg.statsave, 0}, | {"STATSAVE", INIRO_BOOL, &np2oscfg.statsave, 0}, |
| #endif | |
| #if defined(GCC_CPU_ARCH_IA32) | #if defined(GCC_CPU_ARCH_IA32) |
| {"nousemmx", INITYPE_BOOL, &np2oscfg.disablemmx, 0}, | {"nousemmx", INITYPE_BOOL, &np2oscfg.disablemmx, 0}, |
| #endif | #endif |
| Line 601 static const INITBL iniitem[] = { | Line 643 static const INITBL iniitem[] = { |
| {"jast_snd", INITYPE_BOOL, &np2oscfg.jastsnd, 0}, | {"jast_snd", INITYPE_BOOL, &np2oscfg.jastsnd, 0}, |
| {"sounddrv", INITYPE_SNDDRV, &np2oscfg.snddrv, 0}, | {"sounddrv", INITYPE_SNDDRV, &np2oscfg.snddrv, 0}, |
| {"audiodev", INITYPE_STR, &np2oscfg.audiodev, MAX_PATH}, | |
| {"MIDIOUTd", INITYPE_STR, &np2oscfg.MIDIDEV[0], MAX_PATH}, | {"MIDIOUTd", INITYPE_STR, &np2oscfg.MIDIDEV[0], MAX_PATH}, |
| {"MIDIIN_d", INITYPE_STR, &np2oscfg.MIDIDEV[1], MAX_PATH}, | {"MIDIIN_d", INITYPE_STR, &np2oscfg.MIDIDEV[1], MAX_PATH}, |
| {"MIDIWAIT", INITYPE_UINT32, &np2oscfg.MIDIWAIT, 0}, | {"MIDIWAIT", INITYPE_UINT32, &np2oscfg.MIDIWAIT, 0}, |
| {"I286SAVE", INIRO_BOOL, &np2oscfg.I286SAVE, 0} | {"dinterp_", INITYPE_INTERP, &np2oscfg.drawinterp, 0}, |
| {"fullscrn", INITYPE_UINT32, &ignore_fullscreen_mode,0}, | |
| {"F11_KEY_", INITYPE_UINT8, &np2oscfg.F11KEY, 0}, | |
| {"I286SAVE", INIRO_BOOL, &np2oscfg.I286SAVE, 0}, | |
| }; | }; |
| #define INIITEMS (sizeof(iniitem) / sizeof(iniitem[0])) | #define INIITEMS (sizeof(iniitem) / sizeof(iniitem[0])) |