--- np2/font/font.c 2003/11/15 07:10:02 1.4 +++ np2/font/font.c 2005/02/07 14:46:10 1.8 @@ -1,31 +1,32 @@ #include "compiler.h" #include "strres.h" #include "dosio.h" -#include "memory.h" +#include "cpucore.h" #include "font.h" #include "fontdata.h" #include "fontmake.h" #ifndef FONTMEMORYBIND - BYTE __font[0x84000]; + UINT8 __font[0x84000]; #endif static const char fonttmpname[] = "font.tmp"; -void font_init(void) { +void font_initialize(void) { - BYTE *p; - BYTE *q; + UINT8 *p; + UINT8 *q; UINT i; UINT j; UINT32 dbit; ZeroMemory(fontrom, sizeof(fontrom)); p = fontrom + 0x81000; - q = fontrom + 0x82800; + q = fontrom + 0x82000; for (i=0; i<256; i++) { + q += 8; for (j=0; j<4; j++) { dbit = 0; if (i & (0x01 << j)) { @@ -42,7 +43,7 @@ void font_init(void) { } } -static BYTE fonttypecheck(const char *fname) { +static UINT8 fonttypecheck(const char *fname) { const char *p; @@ -74,15 +75,15 @@ const char *p; return(FONTTYPE_NONE); } -BYTE font_load(const char *filename, BOOL force) { +UINT8 font_load(const char *filename, BOOL force) { UINT i; - BYTE *q; -const BYTE *p; +const UINT8 *p; + UINT8 *q; UINT j; char fname[MAX_PATH]; - BYTE type; - BYTE loading; + UINT8 type; + UINT8 loading; if (filename) { file_cpyname(fname, filename, sizeof(fname)); @@ -103,7 +104,7 @@ const BYTE *p; ZeroMemory(q + 0xd80, 0x1000 - 0xd80); } - CopyMemory(fontrom + 0x82000, fontdata_8, 0x800); + fontdata_ank8store(fontdata_8, 0, 256); p = fontdata_8; q = fontrom + 0x80000; for (i=0; i<256; i++) {