eliminate hack.h usage from win/share/*.c
Switch win/share/*.c from hack.h to config.h plus miscellaenous other headers. It's possible that there is conditional code that didn't get exercised in my testing. The Unix Makefiles don't deal with safeproc.c or tileset.c so I just compiled those without any attempt to link.
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
/* Copyright (c) Michael Allison, 2018 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#include "hack.h"
|
||||
#include <stdio.h>
|
||||
#define SAFEPROCS
|
||||
#include "config.h"
|
||||
#include "color.h"
|
||||
#include "wintype.h"
|
||||
#include "winprocs.h"
|
||||
|
||||
/*
|
||||
* ***********************************************************
|
||||
@@ -71,7 +74,7 @@ struct window_procs safe_procs = {
|
||||
safe_init_nhwindows, safe_player_selection, safe_askname, safe_get_nh_event,
|
||||
safe_exit_nhwindows, safe_suspend_nhwindows, safe_resume_nhwindows,
|
||||
safe_create_nhwindow, safe_clear_nhwindow, safe_display_nhwindow,
|
||||
safe_destroy_nhwindow, safe_curs, safe_putstr, genl_putmixed,
|
||||
safe_destroy_nhwindow, safe_curs, safe_putstr, safe_putmixed,
|
||||
safe_display_file, safe_start_menu, safe_add_menu, safe_end_menu,
|
||||
safe_select_menu, safe_message_menu, safe_update_inventory, safe_mark_synch,
|
||||
safe_wait_synch,
|
||||
@@ -91,7 +94,7 @@ struct window_procs safe_procs = {
|
||||
#endif
|
||||
safe_get_color_string,
|
||||
#endif
|
||||
safe_start_screen, safe_end_screen, genl_outrip,
|
||||
safe_start_screen, safe_end_screen, safe_outrip,
|
||||
safe_preference_update,
|
||||
safe_getmsghistory, safe_putmsghistory,
|
||||
safe_status_init,
|
||||
@@ -217,6 +220,15 @@ const char *str;
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_putmixed(window, attr, str)
|
||||
winid window;
|
||||
int attr;
|
||||
const char *str;
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
safe_display_file(fname, complain)
|
||||
const char *fname;
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
#include "win32api.h"
|
||||
#endif
|
||||
|
||||
#include "hack.h"
|
||||
#include "config.h"
|
||||
#include "tile.h"
|
||||
extern void NDECL(monst_globals_init);
|
||||
extern void NDECL(objects_globals_init);
|
||||
|
||||
#include <stdint.h>
|
||||
#if defined(UINT32_MAX) && defined(INT32_MAX) && defined(UINT16_MAX)
|
||||
@@ -160,7 +162,7 @@ static void FDECL(build_bmfh, (BITMAPFILEHEADER *));
|
||||
static void FDECL(build_bmih, (BITMAPINFOHEADER *));
|
||||
static void FDECL(build_bmptile, (pixel(*) [TILE_X]));
|
||||
|
||||
char *tilefiles[] = {
|
||||
const char *tilefiles[] = {
|
||||
#if (TILE_X == 32)
|
||||
"../win/share/mon32.txt", "../win/share/obj32.txt",
|
||||
"../win/share/oth32.txt",
|
||||
|
||||
@@ -8,7 +8,14 @@
|
||||
* then again with it defined to produce tiletxt.{o,obj}.
|
||||
*/
|
||||
|
||||
#include "hack.h"
|
||||
#include "config.h"
|
||||
#include "pm.h"
|
||||
#include "onames.h"
|
||||
#include "permonst.h"
|
||||
#include "objclass.h"
|
||||
#include "rm.h"
|
||||
#include "display.h"
|
||||
extern int FDECL(def_char_to_objclass, (CHAR_P));
|
||||
|
||||
#define Fprintf (void) fprintf
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
/* Copyright (c) Ray Chason, 2016. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#include "hack.h"
|
||||
#include "config.h"
|
||||
#include "objclass.h"
|
||||
#include "flag.h"
|
||||
#include "tileset.h"
|
||||
|
||||
static void FDECL(get_tile_map, (const char *));
|
||||
@@ -102,7 +104,7 @@ error:
|
||||
}
|
||||
|
||||
/* Free tile memory not required by the chosen display mode */
|
||||
boolean
|
||||
void
|
||||
set_tile_type(true_color)
|
||||
boolean true_color;
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user