#include "mondata.h" /* for mindless() */
#endif
+/* types of explosions */
+enum explosion_types {
+ EXPL_DARK = 0,
+ EXPL_NOXIOUS = 1,
+ EXPL_MUDDY = 2,
+ EXPL_WET = 3,
+ EXPL_MAGICAL = 4,
+ EXPL_FIERY = 5,
+ EXPL_FROSTY = 6,
+ EXPL_MAX = 7
+};
+
/*
* vobj_at()
*
* explosions A set of nine for each of the following seven explosion types:
* dark, noxious, muddy, wet, magical, fiery, frosty.
* The nine positions represent those surrounding the hero.
- * Count: MAXEXPCHARS * EXPL_MAX (EXPL_MAX is defined in hack.h)
+ * Count: MAXEXPCHARS * EXPL_MAX
*
* zap beam A set of four (there are four directions) for each beam type.
* The beam type is shifted over 2 positions and the direction
#define LAUNCH_UNSEEN 0x40 /* hero neither caused nor saw it */
#define LAUNCH_KNOWN 0x80 /* the hero caused this by explicit action */
-/* Macros for explosion types */
-enum explosion_types {
- EXPL_DARK = 0,
- EXPL_NOXIOUS = 1,
- EXPL_MUDDY = 2,
- EXPL_WET = 3,
- EXPL_MAGICAL = 4,
- EXPL_FIERY = 5,
- EXPL_FROSTY = 6,
- EXPL_MAX = 7
-};
-
/* enlightenment control flags */
#define BASICENLIGHTENMENT 1 /* show mundane stuff */
#define MAGICENLIGHTENMENT 2 /* show intrinsics and such */
boolean FDECL(read_tiles, (const char *filename, BOOLEAN_P true_color));
const struct Pixel *NDECL(get_palette);
-boolean FDECL(set_tile_type, (BOOLEAN_P true_color));
+void FDECL(set_tile_type, (BOOLEAN_P true_color));
void NDECL(free_tiles);
const struct TileImage *FDECL(get_tile, (unsigned tile_index));
unsigned tile_width, tile_height;
};
-boolean FDECL(read_bmp_tiles, (const char *filename, struct TileSetImage *image));
-boolean FDECL(read_gif_tiles, (const char *filename, struct TileSetImage *image));
-boolean FDECL(read_png_tiles, (const char *filename, struct TileSetImage *image));
+boolean FDECL(read_bmp_tiles, (const char *filename,
+ struct TileSetImage *image));
+boolean FDECL(read_gif_tiles, (const char *filename,
+ struct TileSetImage *image));
+boolean FDECL(read_png_tiles, (const char *filename,
+ struct TileSetImage *image));
#endif
void NDECL((*win_status_finish));
void FDECL((*win_status_enablefield),
(int, const char *, const char *, BOOLEAN_P));
- void FDECL((*win_status_update), (int, genericptr_t, int, int, int, unsigned long *));
+ void FDECL((*win_status_update), (int, genericptr_t, int, int, int,
+ unsigned long *));
boolean NDECL((*win_can_suspend));
};
#define WC2_RESET_STATUS 0x0100L /* 09 call status_update(BL_RESET) to
* indicate 'draw everything' */
#define WC2_TERM_SIZE 0x0200L /* 10 support setting terminal size */
-#define WC2_STATUSLINES 0x0400L /* 16 switch between 2 or 3 lines of status */
-#define WC2_WINDOWBORDERS 0x0800L /* 11 display borders on nh windows */
-#define WC2_PETATTR 0x1000L /* 12 attributes for hilite_pet */
-#define WC2_GUICOLOR 0x2000L /* 13 display colours outside map win */
+#define WC2_STATUSLINES 0x0400L /* 11 switch between 2|3 lines of status */
+#define WC2_WINDOWBORDERS 0x0800L /* 12 display borders on nh windows */
+#define WC2_PETATTR 0x1000L /* 13 attributes for hilite_pet */
+#define WC2_GUICOLOR 0x2000L /* 14 display colours outside map win */
/* pline() can overload the display attributes argument passed to putstr()
with one or more flags and at most one of bold/blink/inverse/&c */
-#define WC2_URGENT_MESG 0x4000L /* 14 putstr(WIN_MESSAGE) supports urgency
+#define WC2_URGENT_MESG 0x4000L /* 15 putstr(WIN_MESSAGE) supports urgency
* via non-display attribute flag */
-#define WC2_SUPPRESS_HIST 0x8000L /* 15 putstr(WIN_MESSAGE) supports history
+#define WC2_SUPPRESS_HIST 0x8000L /* 16 putstr(WIN_MESSAGE) supports history
* suppression via non-disp attr */
/* 16 free bits */
void FDECL((*win_status_finish), (CARGS));
void FDECL((*win_status_enablefield),
(CARGS, int, const char *, const char *, BOOLEAN_P));
- void FDECL((*win_status_update), (CARGS, int, genericptr_t, int, int, int, unsigned long *));
+ void FDECL((*win_status_update), (CARGS, int, genericptr_t, int, int, int,
+ unsigned long *));
boolean FDECL((*win_can_suspend), (CARGS));
};
#endif /* WINCHAIN */
extern void FDECL(safe_putmsghistory, (const char *, BOOLEAN_P));
extern void NDECL(safe_status_init);
extern void NDECL(safe_status_finish);
-extern void FDECL(safe_status_enablefield,
- (int, const char *, const char *, BOOLEAN_P));
-extern void FDECL(safe_status_update, (int, genericptr_t, int, int, int, unsigned long *));
+extern void FDECL(safe_status_enablefield, (int, const char *, const char *,
+ BOOLEAN_P));
+extern void FDECL(safe_status_update, (int, genericptr_t, int, int, int,
+ unsigned long *));
extern boolean NDECL(safe_can_suspend);
extern void FDECL(stdio_raw_print, (const char *));
extern void FDECL(stdio_nonl_raw_print, (const char *));
extern int NDECL(stdio_nhgetch);
#endif /* SAFEPROCS */
#endif /* WINPROCS_H */
-
/* 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"
/*
* ***********************************************************
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,
#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,
return;
}
+void
+safe_putmixed(window, attr, str)
+winid window;
+int attr;
+const char *str;
+{
+ return;
+}
+
void
safe_display_file(fname, complain)
const char *fname;
#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)
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",
* 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
/* 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 *));
}
/* Free tile memory not required by the chosen display mode */
-boolean
+void
set_tile_type(true_color)
boolean true_color;
{