MS-DOS: Support no-tiles and no-graphics builds
In previous versions of NetHack, setting -DUSE_TILES enabled the tile
support, while setting -DSUPPRESS_GRAPHICS produced a NetHack that
would write its TTY output to standard output, and rely on ANSI.SYS or
similar to do screen control. (USE_TILES is now TILES_IN_GLYPHMAP.)
This change ensures that the current NetHack can be built the same
ways.
One twist is that previous NetHacks would drop all support for graphical
modes when tiles were not supported. Thus sys/msdos/vid{vga,vesa}.c have
very disordered use of TILES_IN_GLYPHMAP. There was no need to check
this. But now, the graphical modes also support Unicode. A non-tiled
build should have the graphical modes, with only the text functions
present, provided that ENHANCED_SYMBOLS is defined.
Some unused and locally used symbols were cleaned up along the way.
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef TILES_IN_GLYPHMAP
|
||||
|
||||
#include "tileset.h"
|
||||
|
||||
/* First BMP file header */
|
||||
@@ -592,3 +595,5 @@ pixel_element(uint32 mask, uint32 color)
|
||||
color &= mask;
|
||||
return color * 255 / mask;
|
||||
}
|
||||
|
||||
#endif /* TILES_IN_GLYPHMAP */
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
* http://www.w3.org/Graphics/GIF/spec-gif89a.txt */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef TILES_IN_GLYPHMAP
|
||||
|
||||
#include "tileset.h"
|
||||
|
||||
#define MIN_LZW_BITS 3
|
||||
@@ -497,3 +500,5 @@ free_data_block(struct DataBlock *block)
|
||||
block->size = 0;
|
||||
block->data = NULL;
|
||||
}
|
||||
|
||||
#endif /* TILES_IN_GLYPHMAP */
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef TILES_IN_GLYPHMAP
|
||||
|
||||
#include "objclass.h"
|
||||
#include "flag.h"
|
||||
#include "tileset.h"
|
||||
@@ -348,3 +351,5 @@ read_png_tiles(const char *filename UNUSED, struct TileSetImage *image UNUSED)
|
||||
/* stub */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#endif /* TILES_IN_GLYPHMAP */
|
||||
|
||||
Reference in New Issue
Block a user