|
|
| version 1.4, 2005/02/07 14:46:10 | version 1.7, 2005/04/01 15:06:30 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| #include "bmpdata.h" | #include "bmpdata.h" |
| #include "parts.h" | #include "parts.h" |
| #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | |
| #include "oemtext.h" | |
| #endif | |
| #include "dosio.h" | #include "dosio.h" |
| #include "fontmng.h" | #include "fontmng.h" |
| #include "font.h" | #include "font.h" |
| Line 138 const UINT8 *p; | Line 141 const UINT8 *p; |
| int height; | int height; |
| UINT8 bit; | UINT8 bit; |
| int i; | int i; |
| #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | |
| OEMCHAR oemwork[4]; | |
| #endif | |
| ptr += (2048 * (2048 / 8)) + from; | ptr += (2048 * (2048 / 8)) + from; |
| work[1] = '\0'; | work[1] = '\0'; |
| while(from < to) { | while(from < to) { |
| work[0] = (char)from; | work[0] = (char)from; |
| #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | |
| oemtext_sjistooem(oemwork, NELEMENTS(oemwork), work, -1); | |
| dat = fontmng_get(fnt, oemwork); | |
| #else | |
| dat = fontmng_get(fnt, work); | dat = fontmng_get(fnt, work); |
| #endif | |
| if (dat) { | if (dat) { |
| width = min(dat->width, 8); | width = min(dat->width, 8); |
| height = min(dat->height, 16); | height = min(dat->height, 16); |
| Line 198 const UINT8 *p; | Line 209 const UINT8 *p; |
| int height; | int height; |
| UINT16 bit; | UINT16 bit; |
| int i; | int i; |
| #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | |
| OEMCHAR oemwork[4]; | |
| #endif | |
| work[2] = '\0'; | work[2] = '\0'; |
| ptr += ((0x80 - 0x21) * 16 * (2048 / 8)) + 2; | ptr += ((0x80 - 0x21) * 16 * (2048 / 8)) + 2; |
| Line 210 const UINT8 *p; | Line 224 const UINT8 *p; |
| sjis = jis2sjis(jis); | sjis = jis2sjis(jis); |
| work[0] = (UINT8)(sjis >> 8); | work[0] = (UINT8)(sjis >> 8); |
| work[1] = (UINT8)sjis; | work[1] = (UINT8)sjis; |
| #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | |
| oemtext_sjistooem(oemwork, NELEMENTS(oemwork), work, -1); | |
| dat = fontmng_get(fnt, oemwork); | |
| #else | |
| dat = fontmng_get(fnt, work); | dat = fontmng_get(fnt, work); |
| #endif | |
| if (dat) { | if (dat) { |
| width = min(dat->width, 16); | width = min(dat->width, 16); |
| height = min(dat->height, 16); | height = min(dat->height, 16); |
| Line 263 static void patchextfnt(UINT8 *ptr, cons | Line 282 static void patchextfnt(UINT8 *ptr, cons |
| } while(--r); | } while(--r); |
| } | } |
| void makepc98bmp(const char *filename) { | void makepc98bmp(const OEMCHAR *filename) { |
| void *fnt; | void *fnt; |
| BMPFILE bf; | BMPFILE bf; |