Enforced the inclusion of windows headers before nethack headers.

Moved the code page 437 mapping table to winnt.c so that it could be
used in window and console clients.
Added check that fonts support unicode values we use from code page 437.
Use unicode to draw text if font supports it otherwise use ASCII.
This commit is contained in:
Bart House
2018-11-12 01:58:56 -08:00
parent e87496b897
commit 8944235282
17 changed files with 276 additions and 124 deletions
+20
View File
@@ -0,0 +1,20 @@
/* NetHack 3.6 winos.h $NHDT-Date: 1524321419 2018/04/21 14:36:59 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.30 $ */
/* Copyright (c) NetHack PC Development Team 2018 */
/* NetHack may be freely redistributed. See license for details. */
#ifndef WINOS_H
#define WINOS_H
#include "win32api.h"
extern const WCHAR cp437[256];
WCHAR *
winos_ascii_to_wide_str(const unsigned char * src, WCHAR * dst, size_t dstLength);
WCHAR
winos_ascii_to_wide(const unsigned char c);
BOOL winos_font_support_cp437(HFONT hFont);
#endif // WINOS_H