|
|
| version 1.5, 2004/06/21 15:19:15 | version 1.7, 2005/02/09 20:11:36 |
|---|---|
| Line 12 | Line 12 |
| #include "font.h" | #include "font.h" |
| static const char fontui_title[] = "Select font file"; | static const OEMCHAR fontui_title[] = OEMTEXT("Select font file"); |
| static const char fontui_filter[] = \ | static const OEMCHAR fontui_filter[] = OEMTEXT("PC-98 BMP font (*.bmp)\0*.bmp\0Virtual98 font\0font.rom\0All supported files\0*.bmp;pc88.fnt;kanji1.rom;kanji2.rom;font.rom;subsys_c.rom;kanji.rom;fnt0808.x1;fnt0816.x1;fnt1616.x1;cgrom.dat\0"); |
| "PC-98 BMP font (*.bmp)\0" \ | |
| "*.bmp\0" \ | |
| "Virtual98 font\0" \ | |
| "font.rom\0" \ | |
| "All supported files\0" \ | |
| "*.bmp;" \ | |
| "pc88.fnt;kanji1.rom;kanji2.rom;" \ | |
| "font.rom;" \ | |
| "subsys_c.rom;kanji.rom;" \ | |
| "fnt0808.x1;fnt0816.x1;fnt1616.x1;" \ | |
| "cgrom.dat\0"; | |
| static const FILESEL fontui = {fontui_title, str_bmp, fontui_filter, 3}; | static const FILESEL fontui = {fontui_title, str_bmp, fontui_filter, 3}; |
| static const char bmpui_file[] = "NP2_%04d.BMP"; | static const OEMCHAR bmpui_file[] = OEMTEXT("NP2_%04d.BMP"); |
| static const char bmpui_title[] = "Save as bitmap file"; | static const OEMCHAR bmpui_title[] = OEMTEXT("Save as bitmap file"); |
| static const char bmpui_filter1[] = "1bit-bitmap (*.bmp)\0*.bmp\0"; | static const OEMCHAR bmpui_filter1[] = OEMTEXT("1bit-bitmap (*.bmp)\0*.bmp\0Graphics Interchange Format (*.gif)\0*.gif\0"); |
| static const char bmpui_filter4[] = "4bit-bitmap (*.bmp)\0*.bmp\0"; | static const OEMCHAR bmpui_filter4[] = OEMTEXT("4bit-bitmap (*.bmp)\0*.bmp\0Graphics Interchange Format (*.gif)\0*.gif\0"); |
| static const char bmpui_filter8[] = "8bit-bitmap (*.bmp)\0*.bmp\0"; | static const OEMCHAR bmpui_filter8[] = OEMTEXT("8bit-bitmap (*.bmp)\0*.bmp\0Graphics Interchange Format (*.gif)\0*.gif\0"); |
| static const char bmpui_filter24[] = "24bit-bitmap (*.bmp)\0*.bmp\0"; | static const OEMCHAR bmpui_filter24[] = OEMTEXT("24bit-bitmap (*.bmp)\0*.bmp\0"); |
| static const char *bmpui_filter[4] = { | static const OEMCHAR *bmpui_filter[4] = { |
| bmpui_filter1, bmpui_filter4, bmpui_filter8, bmpui_filter24}; | bmpui_filter1, bmpui_filter4, bmpui_filter8, bmpui_filter24}; |
| void dialog_font(HWND hWnd) { | void dialog_font(HWND hWnd) { |
| char path[MAX_PATH]; | OEMCHAR path[MAX_PATH]; |
| file_cpyname(path, np2cfg.fontfile, sizeof(path)); | file_cpyname(path, np2cfg.fontfile, NELEMENTS(path)); |
| if ((dlgs_selectfile(hWnd, &fontui, path, sizeof(path), NULL)) && | if ((dlgs_selectfile(hWnd, &fontui, path, NELEMENTS(path), NULL)) && |
| (font_load(path, FALSE))) { | (font_load(path, FALSE))) { |
| gdcs.textdisp |= GDCSCRN_ALLDRAW2; | gdcs.textdisp |= GDCSCRN_ALLDRAW2; |
| milstr_ncpy(np2cfg.fontfile, path, sizeof(np2cfg.fontfile)); | milstr_ncpy(np2cfg.fontfile, path, NELEMENTS(np2cfg.fontfile)); |
| sysmng_update(SYS_UPDATECFG); | sysmng_update(SYS_UPDATECFG); |
| } | } |
| } | } |
| Line 54 void dialog_writebmp(HWND hWnd) { | Line 43 void dialog_writebmp(HWND hWnd) { |
| SCRNSAVE ss; | SCRNSAVE ss; |
| FILESEL bmpui; | FILESEL bmpui; |
| char path[MAX_PATH]; | OEMCHAR path[MAX_PATH]; |
| const char *ext; | const OEMCHAR *ext; |
| ss = scrnsave_get(); | ss = scrnsave_get(); |
| if (ss == NULL) { | if (ss == NULL) { |
| Line 65 const char *ext; | Line 54 const char *ext; |
| bmpui.ext = str_bmp; | bmpui.ext = str_bmp; |
| bmpui.filter = bmpui_filter[ss->type]; | bmpui.filter = bmpui_filter[ss->type]; |
| bmpui.defindex = 1; | bmpui.defindex = 1; |
| file_cpyname(path, bmpfilefolder, sizeof(path)); | file_cpyname(path, bmpfilefolder, NELEMENTS(path)); |
| file_cutname(path); | file_cutname(path); |
| file_catname(path, bmpui_file, sizeof(path)); | file_catname(path, bmpui_file, NELEMENTS(path)); |
| if (dlgs_selectwritenum(hWnd, &bmpui, path, sizeof(path))) { | if (dlgs_selectwritenum(hWnd, &bmpui, path, NELEMENTS(path))) { |
| file_cpyname(bmpfilefolder, path, sizeof(bmpfilefolder)); | file_cpyname(bmpfilefolder, path, NELEMENTS(bmpfilefolder)); |
| sysmng_update(SYS_UPDATEOSCFG); | sysmng_update(SYS_UPDATEOSCFG); |
| ext = file_getext(path); | ext = file_getext(path); |
| if ((ss->type <= SCRNSAVE_8BIT) && | if ((ss->type <= SCRNSAVE_8BIT) && |
| (!file_cmpname(ext, "gif"))) { | (!file_cmpname(ext, OEMTEXT("gif")))) { |
| scrnsave_writegif(ss, path, SCRNSAVE_AUTO); | scrnsave_writegif(ss, path, SCRNSAVE_AUTO); |
| } | } |
| else if (!file_cmpname(ext, str_bmp)) { | else if (!file_cmpname(ext, str_bmp)) { |