|
|
| version 1.6, 2005/02/07 14:46:14 | version 1.8, 2005/03/19 18:54:58 |
|---|---|
| Line 12 | Line 12 |
| #include "np2info.h" | #include "np2info.h" |
| static char cr[] = "\\n"; | static const OEMCHAR cr[] = OEMTEXT("\\n"); |
| // ---- np2info extend | // ---- np2info extend |
| static const char str_jwinclr[] = | static const OEMCHAR str_jwinclr[] = |
| "256色\0ハイカラー\0フルカラー\0トゥルーカラー"; | OEMTEXT("256色\0ハイカラー\0フルカラー\0トゥルーカラー"); |
| static const char str_jwinmode[] = | static const OEMCHAR str_jwinmode[] = |
| " (窓モード)\0 (フルスクリーン)"; | OEMTEXT(" (窓モード)\0 (フルスクリーン)"); |
| static void info_progtitle(char *str, int maxlen, NP2INFOEX *ex) { | static void info_progtitle(OEMCHAR *str, int maxlen, const NP2INFOEX *ex) { |
| milstr_ncpy(str, np2oscfg.titles, maxlen); | milstr_ncpy(str, np2oscfg.titles, maxlen); |
| } | } |
| static void info_jsound(char *str, int maxlen, NP2INFOEX *ex) { | static void info_jsound(OEMCHAR *str, int maxlen, const NP2INFOEX *ex) { |
| const char *p; | const OEMCHAR *p; |
| switch(usesound) { | switch(usesound) { |
| case 0x01: | case 0x01: |
| p = "14ボード"; | p = OEMTEXT("14ボード"); |
| break; | break; |
| case 0x02: | case 0x02: |
| p = "26音源"; | p = OEMTEXT("26音源"); |
| break; | break; |
| case 0x04: | case 0x04: |
| p = "86音源"; | p = OEMTEXT("86音源"); |
| break; | break; |
| case 0x06: | case 0x06: |
| p = "2枚刺し"; | p = OEMTEXT("2枚刺し"); |
| break; | break; |
| case 0x08: | case 0x08: |
| p = "118音源"; | p = OEMTEXT("118音源"); |
| break; | break; |
| case 0x14: | case 0x14: |
| p = "86音源(ちびおと付)"; | p = OEMTEXT("86音源(ちびおと付)"); |
| break; | break; |
| case 0x20: | case 0x20: |
| p = "スピークボード"; | p = OEMTEXT("スピークボード"); |
| break; | break; |
| case 0x40: | case 0x40: |
| p = "スパークボード"; | p = OEMTEXT("スパークボード"); |
| break; | break; |
| case 0x80: | case 0x80: |
| p = "AMD-98"; | p = OEMTEXT("AMD-98"); |
| break; | break; |
| default: | default: |
| p = "なし"; | p = OEMTEXT("なし"); |
| break; | break; |
| } | } |
| milstr_ncpy(str, p, maxlen); | milstr_ncpy(str, p, maxlen); |
| } | } |
| static void info_jdisp(char *str, int maxlen, NP2INFOEX *ex) { | static void info_jdisp(OEMCHAR *str, int maxlen, const NP2INFOEX *ex) { |
| UINT bpp; | UINT bpp; |
| Line 87 static void info_jdisp(char *str, int ma | Line 87 static void info_jdisp(char *str, int ma |
| (void)ex; | (void)ex; |
| } | } |
| static void info_jbios(char *str, int maxlen, NP2INFOEX *ex) { | static void info_jbios(OEMCHAR *str, int maxlen, const NP2INFOEX *ex) { |
| str[0] = '\0'; | str[0] = '\0'; |
| if (pccore.rom & PCROM_BIOS) { | if (pccore.rom & PCROM_BIOS) { |
| Line 95 static void info_jbios(char *str, int ma | Line 95 static void info_jbios(char *str, int ma |
| } | } |
| if (soundrom.name[0]) { | if (soundrom.name[0]) { |
| if (str[0]) { | if (str[0]) { |
| milstr_ncat(str, "と", maxlen); | milstr_ncat(str, OEMTEXT("と"), maxlen); |
| } | } |
| milstr_ncat(str, soundrom.name, maxlen); | milstr_ncat(str, soundrom.name, maxlen); |
| } | } |
| if (str[0] == '\0') { | if (str[0] == '\0') { |
| milstr_ncat(str, "なし", maxlen); | milstr_ncat(str, OEMTEXT("なし"), maxlen); |
| } | } |
| } | } |
| static void info_jrhythm(char *str, int maxlen, NP2INFOEX *ex) { | static void info_jrhythm(OEMCHAR *str, int maxlen, const NP2INFOEX *ex) { |
| const char *p; | const OEMCHAR *p; |
| char jrhythmstr[16]; | OEMCHAR jrhythmstr[16]; |
| UINT exist; | UINT exist; |
| UINT i; | UINT i; |
| if (!(usesound & 0x6c)) { | if (!(usesound & 0x6c)) { |
| p = "不要やで"; | p = OEMTEXT("不要やで"); |
| } | } |
| else { | else { |
| exist = rhythm_getcaps(); | exist = rhythm_getcaps(); |
| if (exist == 0) { | if (exist == 0) { |
| p = "用意されてないんか…"; | p = OEMTEXT("用意されてないんか…"); |
| } | } |
| else if (exist == 0x3f) { | else if (exist == 0x3f) { |
| p = "全部あるで"; | p = OEMTEXT("全部あるで"); |
| } | } |
| else { | else { |
| milstr_ncpy(jrhythmstr, "BSCHTRや", sizeof(jrhythmstr)); | milstr_ncpy(jrhythmstr, OEMTEXT("BSCHTRや"), NELEMENTS(jrhythmstr)); |
| for (i=0; i<6; i++) { | for (i=0; i<6; i++) { |
| if (!(exist & (1 << i))) { | if (!(exist & (1 << i))) { |
| jrhythmstr[i] = '_'; | jrhythmstr[i] = '_'; |
| Line 136 const char *p; | Line 136 const char *p; |
| } | } |
| typedef struct { | typedef struct { |
| char key[8]; | OEMCHAR key[8]; |
| void (*proc)(char *str, int maxlen, NP2INFOEX *ex); | void (*proc)(OEMCHAR *str, int maxlen, const NP2INFOEX *ex); |
| } INFOPROC; | } INFOPROC; |
| static const INFOPROC infoproc[] = { | static const INFOPROC infoproc[] = { |
| {"PROG", info_progtitle}, | {OEMTEXT("PROG"), info_progtitle}, |
| {"JSND", info_jsound}, | {OEMTEXT("JSND"), info_jsound}, |
| {"JBIOS", info_jbios}, | {OEMTEXT("JBIOS"), info_jbios}, |
| {"JDISP", info_jdisp}, | {OEMTEXT("JDISP"), info_jdisp}, |
| {"JRHYTHM", info_jrhythm}}; | {OEMTEXT("JRHYTHM"), info_jrhythm}}; |
| static BOOL sstpext(char *dst, const char *key, int maxlen, NP2INFOEX *ex) { | static BOOL sstpext(OEMCHAR *dst, const OEMCHAR *key, int maxlen, |
| const NP2INFOEX *ex) { | |
| const INFOPROC *inf; | const INFOPROC *inf; |
| const INFOPROC *infterm; | const INFOPROC *infterm; |
| Line 164 const INFOPROC *infterm; | Line 165 const INFOPROC *infterm; |
| return(FALSE); | return(FALSE); |
| } | } |
| static const NP2INFOEX sstpex = {"\\n", sstpext}; | static const NP2INFOEX sstpex = {OEMTEXT("\\n"), sstpext}; |
| // ---- | // ---- |
| Line 227 static char *sstpsolve(char *buf, const | Line 228 static char *sstpsolve(char *buf, const |
| ms -= 10; | ms -= 10; |
| } | } |
| if (ms) { | if (ms) { |
| wsprintf(buf, "\\w%u", ms); | SPRINTF(buf, "\\w%1u", ms); |
| buf += 3; | buf += 3; |
| } | } |
| } | } |
| Line 514 void sstpmsg_config(void) { | Line 515 void sstpmsg_config(void) { |
| static char *get_code(char *buf, int *ret) { | static char *get_code(char *buf, int *ret) { |
| int stat; | int stat; |
| stat = 0; | stat = 0; |
| if (!memcmp(buf, "SSTP", 4)) { | if (!memcmp(buf, "SSTP", 4)) { |