static void NDECL(init_ttycolor);
static void NDECL(really_move_cursor);
static void NDECL(check_and_set_font);
+#if 0 /*JP*/
static boolean NDECL(check_font_widths);
+#endif
static void NDECL(set_known_good_console_font);
static void NDECL(restore_original_console_font);
extern void NDECL(safe_routines);
BACKGROUND_INTENSITY : FOREGROUND_INTENSITY;
cell.attribute = console.attr;
+#if 0 /*JP*/
cell.character = (console.has_unicode ? console.cpMap[ch] : ch);
+#else
+ cell.character = ch;
+#endif
#if 1 /*JP*//*\8fí\82É1\83o\83C\83g\95¶\8e\9a*/
cell.iskanji = 0;
#endif
cell_t cell;
cell.attribute = console.attr;
+#if 0 /*JP*/
cell.character = (console.has_unicode ? cp437[ch] : ch);
+#else
+ cell.character = ch;
+#endif
#if 1 /*JP*//*\8fí\82É1\83o\83C\83g\95¶\8e\9a*/
cell.iskanji = 0;
#endif
#endif
}
+#if 0 /*JP*/
/* check_font_widths returns TRUE if all glyphs in current console font
* fit within the width of a single console cell.
*/
return all_glyphs_fit;
}
+#endif
/* set_known_good_console_font sets the code page and font used by the console
* to settings know to work well with NetHack. It also saves the original
}
}
+#if 0 /*JP*/
/* set_cp_map() creates a mapping of every possible character of a code
* page to its corresponding WCHAR. This is necessary due to the high
* cost of making calls to MultiByteToWideChar() for every character we
}
}
+#endif
#if 0
/* early_raw_print() is used during early game intialization prior to the
/* check the font before we capture the code page map */
check_and_set_font();
+#if 0 /*JP*/
set_cp_map();
+#endif
/* Set console mode */
DWORD cmode, mask;
return cp437[c];
}
+#if 0 /*JP*/
BOOL winos_font_support_cp437(HFONT hFont)
{
BOOL allFound = FALSE;
return allFound;
}
+#endif
int
windows_early_options(window_opt)
#include "win32api.h"
+#if 0 /*JP*/
extern const WCHAR cp437[256];
+#endif
WCHAR *
winos_ascii_to_wide_str(const unsigned char * src, WCHAR * dst, size_t dstLength);
WCHAR
winos_ascii_to_wide(const unsigned char c);
+#if 0 /*JP*/
BOOL winos_font_support_cp437(HFONT hFont);
+#endif
#endif // WINOS_H
return font;
}
+#if 0 /*JP*/
BOOL
mswin_font_supports_unicode(HFONT hFont)
{
return FALSE;
}
+#endif
/* create font based on window type, charater attributes and
window device context */
font_table[font_index].code = NHFONT_CODE(win_type, attr);
font_table[font_index].hFont = fnt;
+#if 0 /*JP*/
font_table[font_index].supportsUnicode = winos_font_support_cp437(fnt);
+#endif
HGDIOBJ savedFont = SelectObject(hdc, fnt);
SIZE size;
typedef struct cached_font {
int code;
HFONT hFont;
+#if 0 /*JP*/
BOOL supportsUnicode;
+#endif
int width;
int height;
} cached_font;
+#if 0 /*JP*/
BOOL mswin_font_supports_unicode(HFONT hFont);
+#endif
cached_font * mswin_get_font(int win_type, int attr, HDC hdc, BOOL replace);
HFONT mswin_create_splashfont(HWND hWnd);
UINT mswin_charset(void);
POINT map_orig; /* map origin point */
HFONT hMapFont; /* font for ASCII mode */
+#if 0 /*JP*/
boolean bUnicodeFont; /* font supports unicode page 437 */
+#endif
int tileWidth; /* width of tile in pixels at 96 dpi */
int tileHeight; /* height of tile in pixels at 96 dpi */
data->hMapFont = font;
+#if 0 /*JP*/
data->bUnicodeFont = winos_font_support_cp437(data->hMapFont);
+#endif
// set tile size to match font metrics
OldFg = SetTextColor(data->backBufferDC, nhcolor_to_RGB(color));
}
#endif
+#if 0 /*JP*/
if (data->bUnicodeFont) {
wch = winos_ascii_to_wide(ch);
if (wch == 0x2591 || wch == 0x2592) {
| DT_SINGLELINE);
}
} else {
+#else
+ {
+#endif
DrawTextA(data->backBufferDC, &ch, 1, rect,
DT_CENTER | DT_VCENTER | DT_NOPREFIX
| DT_SINGLELINE);
onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam)
{
SIZE sz;
+#if 0 /*JP*/
WCHAR wbuf[BUFSZ];
+#endif
RECT rt;
PAINTSTRUCT ps;
PNHStatusWindow data;