warning-free build without -Wno-missing-field-initializers
Also removes a GCC_WARN usage and the need for #pragma GCC diagnostic ignored "-Wmissing-braces" for src/decl.c when using gcc.
This commit is contained in:
+96
-93
@@ -140,10 +140,6 @@ const char *ARGV0;
|
|||||||
|
|
||||||
#define IVMAGIC 0xdeadbeef
|
#define IVMAGIC 0xdeadbeef
|
||||||
|
|
||||||
#ifdef GCC_WARN
|
|
||||||
#pragma GCC diagnostic ignored "-Wmissing-braces"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const struct Role urole_init_data = {
|
const struct Role urole_init_data = {
|
||||||
{ "Undefined", 0 },
|
{ "Undefined", 0 },
|
||||||
{ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
|
{ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
|
||||||
@@ -206,38 +202,45 @@ const struct instance_globals g_init = {
|
|||||||
|
|
||||||
/* botl.c */
|
/* botl.c */
|
||||||
0, /* mrank_sz */
|
0, /* mrank_sz */
|
||||||
UNDEFINED_VALUES, /* blstats */
|
{ { { NULL, NULL, 0L, FALSE, FALSE, 0, 0U, { 0 }, NULL, 0, 0, 0
|
||||||
|
#ifdef STATUS_HILITES
|
||||||
|
, UNDEFINED_PTR, UNDEFINED_PTR
|
||||||
|
#endif
|
||||||
|
} }
|
||||||
|
}, /* blstats */
|
||||||
FALSE, /* blinit */
|
FALSE, /* blinit */
|
||||||
FALSE, /* update_all */
|
FALSE, /* update_all */
|
||||||
UNDEFINED_VALUES, /* valset */
|
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* valset */
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
0, /* bl_hilite_moves */
|
0L, /* bl_hilite_moves */
|
||||||
#endif
|
#endif
|
||||||
UNDEFINED_VALUES, /* cond_hilites */
|
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0 }, /* cond_hilites */
|
||||||
0, /* now_or_before_idx */
|
0, /* now_or_before_idx */
|
||||||
0, /* condmenu_sortorder */
|
0, /* condmenu_sortorder */
|
||||||
|
|
||||||
/* cmd.c */
|
/* cmd.c */
|
||||||
UNDEFINED_VALUES, /* Cmd */
|
UNDEFINED_VALUES, /* Cmd */
|
||||||
UNDEFINED_VALUES, /* clicklook_cc */
|
{ 0, 0 }, /* clicklook_cc */
|
||||||
WIN_ERR, /* en_win */
|
WIN_ERR, /* en_win */
|
||||||
FALSE, /* en_via_menu */
|
FALSE, /* en_via_menu */
|
||||||
UNDEFINED_VALUE, /* last_command_count */
|
UNDEFINED_VALUE, /* last_command_count */
|
||||||
NULL, /* ext_tlist */
|
UNDEFINED_VALUE, /* ext_tlist */
|
||||||
|
|
||||||
/* dbridge.c */
|
/* dbridge.c */
|
||||||
UNDEFINED_VALUES, /* occupants */
|
{ { 0 } }, /* occupants */
|
||||||
|
|
||||||
/* decl.c */
|
/* decl.c */
|
||||||
UNDEFINED_PTR, /* occupation */
|
UNDEFINED_PTR, /* occupation */
|
||||||
UNDEFINED_PTR, /* afternmv */
|
UNDEFINED_PTR, /* afternmv */
|
||||||
UNDEFINED_PTR, /* hname */
|
NULL, /* hname */
|
||||||
0, /* hackpid */
|
0, /* hackpid */
|
||||||
UNDEFINED_VALUES, /* chosen_windowtype */
|
UNDEFINED_VALUES, /* chosen_windowtype */
|
||||||
DUMMY, /* bases */
|
DUMMY, /* bases */
|
||||||
0, /* multi */
|
0, /* multi */
|
||||||
UNDEFINED_VALUES, /* command_line */
|
UNDEFINED_VALUES, /* command_line */
|
||||||
0, /* command_count */
|
0L, /* command_count */
|
||||||
NULL, /* multi_reason */
|
NULL, /* multi_reason */
|
||||||
/* multi_reason usually points to a string literal (when not Null)
|
/* multi_reason usually points to a string literal (when not Null)
|
||||||
but multireasonbuf[] is available for when it needs to be dynamic */
|
but multireasonbuf[] is available for when it needs to be dynamic */
|
||||||
@@ -251,7 +254,7 @@ const struct instance_globals g_init = {
|
|||||||
(ROWNO - 1) & ~1, /* y_maze_max */
|
(ROWNO - 1) & ~1, /* y_maze_max */
|
||||||
UNDEFINED_VALUE, /* otg_temp */
|
UNDEFINED_VALUE, /* otg_temp */
|
||||||
0, /* in_doagain */
|
0, /* in_doagain */
|
||||||
NULL, /* stairs */
|
UNDEFINED_PTR, /* stairs */
|
||||||
DUMMY, /* smeq */
|
DUMMY, /* smeq */
|
||||||
0, /* doorindex */
|
0, /* doorindex */
|
||||||
0, /* done_money */
|
0, /* done_money */
|
||||||
@@ -273,44 +276,44 @@ const struct instance_globals g_init = {
|
|||||||
UNDEFINED_VALUES, /* dungeons */
|
UNDEFINED_VALUES, /* dungeons */
|
||||||
{ 0, 0, 0, 0, 0, 0, 0, 0 }, /* updest */
|
{ 0, 0, 0, 0, 0, 0, 0, 0 }, /* updest */
|
||||||
{ 0, 0, 0, 0, 0, 0, 0, 0 }, /* dndest */
|
{ 0, 0, 0, 0, 0, 0, 0, 0 }, /* dndest */
|
||||||
{ 0, 0} , /* inv_pos */
|
{ 0, 0 } , /* inv_pos */
|
||||||
FALSE, /* defer_see_monsters */
|
FALSE, /* defer_see_monsters */
|
||||||
FALSE, /* in_mklev */
|
FALSE, /* in_mklev */
|
||||||
FALSE, /* stoned */
|
FALSE, /* stoned */
|
||||||
FALSE, /* unweapon */
|
FALSE, /* unweapon */
|
||||||
FALSE, /* mrg_to_wielded */
|
FALSE, /* mrg_to_wielded */
|
||||||
NULL, /* plinemsg_types */
|
UNDEFINED_PTR, /* plinemsg_types */
|
||||||
UNDEFINED_VALUES, /* toplines */
|
UNDEFINED_VALUES, /* toplines */
|
||||||
DUMMY, /* bhitpos */
|
{ 0, 0 }, /* bhitpos */
|
||||||
FALSE, /* in_steed_dismounting */
|
FALSE, /* in_steed_dismounting */
|
||||||
DUMMY, /* doors */
|
{ { 0, 0 } }, /* doors */
|
||||||
NULL, /* menu_colorings */
|
UNDEFINED_PTR, /* menu_colorings */
|
||||||
DUMMY, /* lastseentyp */
|
{ { 0 } }, /* lastseentyp */
|
||||||
DUMMY, /* spl_book */
|
DUMMY, /* spl_book */
|
||||||
UNDEFINED_VALUES, /* level_info */
|
UNDEFINED_VALUES, /* level_info */
|
||||||
NULL, /* ftrap */
|
UNDEFINED_PTR, /* ftrap */
|
||||||
NULL, /* current_wand */
|
UNDEFINED_PTR, /* current_wand */
|
||||||
NULL, /* thrownobj */
|
UNDEFINED_PTR, /* thrownobj */
|
||||||
NULL, /* kickedobj */
|
UNDEFINED_PTR, /* kickedobj */
|
||||||
DUMMY, /* dungeon_topology */
|
DUMMY, /* dungeon_topology */
|
||||||
DUMMY, /* killer */
|
DUMMY, /* killer */
|
||||||
DUMMY, /* rooms */
|
DUMMY, /* rooms */
|
||||||
NULL, /* subrooms */
|
UNDEFINED_PTR, /* subrooms */
|
||||||
UNDEFINED_VALUES, /* level */
|
UNDEFINED_VALUES, /* level */
|
||||||
1L, /* moves; misnamed turn counter */
|
1L, /* moves; misnamed turn counter */
|
||||||
1L << 3, /* hero_seq: sequence number for hero movement, 'moves*8 + n'
|
1L << 3, /* hero_seq: sequence number for hero movement, 'moves*8 + n'
|
||||||
* where n is usually 1, sometimes 2 when Fast/Very_fast, maybe
|
* where n is usually 1, sometimes 2 when Fast/Very_fast, maybe
|
||||||
* higher if polymorphed into something that's even faster */
|
* higher if polymorphed into something that's even faster */
|
||||||
0L, /* wailmsg */
|
0L, /* wailmsg */
|
||||||
NULL, /* migrating_objs */
|
UNDEFINED_PTR, /* migrating_objs */
|
||||||
NULL, /* billobjs */
|
UNDEFINED_PTR, /* billobjs */
|
||||||
#if defined(MICRO) || defined(WIN32)
|
#if defined(MICRO) || defined(WIN32)
|
||||||
UNDEFINED_VALUES, /* hackdir */
|
UNDEFINED_VALUES, /* hackdir */
|
||||||
#endif /* MICRO || WIN32 */
|
#endif /* MICRO || WIN32 */
|
||||||
DUMMY, /* youmonst */
|
DUMMY, /* youmonst */
|
||||||
NULL, /* invent */
|
UNDEFINED_PTR, /* invent */
|
||||||
DUMMY, /* context */
|
DUMMY, /* context */
|
||||||
DUMMY, /* fqn_prefix */
|
{ NULL }, /* fqn_prefix */
|
||||||
DUMMY, /* tc_gbl_data */
|
DUMMY, /* tc_gbl_data */
|
||||||
#if defined(UNIX) || defined(VMS)
|
#if defined(UNIX) || defined(VMS)
|
||||||
0, /* locknum */
|
0, /* locknum */
|
||||||
@@ -330,7 +333,7 @@ const struct instance_globals g_init = {
|
|||||||
UNDEFINED_VALUE, /* did_dig_msg */
|
UNDEFINED_VALUE, /* did_dig_msg */
|
||||||
|
|
||||||
/* display.c */
|
/* display.c */
|
||||||
UNDEFINED_VALUES, /* gbuf */
|
{ { 0 } }, /* gbuf */
|
||||||
UNDEFINED_VALUES, /* gbuf_start */
|
UNDEFINED_VALUES, /* gbuf_start */
|
||||||
UNDEFINED_VALUES, /* gbug_stop */
|
UNDEFINED_VALUES, /* gbug_stop */
|
||||||
|
|
||||||
@@ -342,7 +345,7 @@ const struct instance_globals g_init = {
|
|||||||
{ 0, 0 }, /* save_dlevel */
|
{ 0, 0 }, /* save_dlevel */
|
||||||
|
|
||||||
/* do_name.c */
|
/* do_name.c */
|
||||||
NULL, /* gloc_filter_map */
|
UNDEFINED_PTR, /* gloc_filter_map */
|
||||||
UNDEFINED_VALUE, /* gloc_filter_floodfill_match_glyph */
|
UNDEFINED_VALUE, /* gloc_filter_floodfill_match_glyph */
|
||||||
|
|
||||||
/* do_wear.c */
|
/* do_wear.c */
|
||||||
@@ -351,26 +354,26 @@ const struct instance_globals g_init = {
|
|||||||
/* dog.c */
|
/* dog.c */
|
||||||
0, /* petname_used */
|
0, /* petname_used */
|
||||||
UNDEFINED_VALUE, /* gtyp */
|
UNDEFINED_VALUE, /* gtyp */
|
||||||
UNDEFINED_VALUE, /* gx */
|
0, /* gx */
|
||||||
UNDEFINED_VALUE, /* gy */
|
0, /* gy */
|
||||||
DUMMY, /* dogname */
|
DUMMY, /* dogname */
|
||||||
DUMMY, /* catname */
|
DUMMY, /* catname */
|
||||||
DUMMY, /* horsename */
|
DUMMY, /* horsename */
|
||||||
UNDEFINED_VALUE, /* preferred_pet */
|
UNDEFINED_VALUE, /* preferred_pet */
|
||||||
NULL, /* mydogs */
|
UNDEFINED_PTR, /* mydogs */
|
||||||
NULL, /* migrating_mons */
|
UNDEFINED_PTR, /* migrating_mons */
|
||||||
NULL, /* apelist */
|
UNDEFINED_PTR, /* apelist */
|
||||||
UNDEFINED_VALUES, /* mvitals */
|
UNDEFINED_VALUES, /* mvitals */
|
||||||
|
|
||||||
/* dokick.c */
|
/* dokick.c */
|
||||||
UNDEFINED_PTR, /* maploc */
|
UNDEFINED_PTR, /* maploc */
|
||||||
UNDEFINED_VALUES, /* nowhere */
|
UNDEFINED_VALUES, /* nowhere */
|
||||||
UNDEFINED_PTR, /* gate_str */
|
NULL, /* gate_str */
|
||||||
|
|
||||||
/* symbols.c */
|
/* symbols.c */
|
||||||
DUMMY, /* symset */
|
DUMMY, /* symset */
|
||||||
#ifdef ENHANCED_SYMBOLS
|
#ifdef ENHANCED_SYMBOLS
|
||||||
DUMMY, /* symset_customizations */
|
{ { 0 } }, /* symset_customizations */
|
||||||
#endif
|
#endif
|
||||||
0, /* currentgraphics */
|
0, /* currentgraphics */
|
||||||
DUMMY, /* showsyms */
|
DUMMY, /* showsyms */
|
||||||
@@ -382,21 +385,21 @@ const struct instance_globals g_init = {
|
|||||||
|
|
||||||
/* dungeon.c */
|
/* dungeon.c */
|
||||||
0, /* n_dgns */
|
0, /* n_dgns */
|
||||||
NULL, /* branches */
|
UNDEFINED_PTR, /* branches */
|
||||||
NULL, /* mapseenchn */
|
UNDEFINED_PTR, /* mapseenchn */
|
||||||
|
|
||||||
/* eat.c */
|
/* eat.c */
|
||||||
FALSE, /* force_save_hs */
|
FALSE, /* force_save_hs */
|
||||||
NULL, /* eatmbuf */
|
NULL, /* eatmbuf */
|
||||||
|
|
||||||
/* end.c */
|
/* end.c */
|
||||||
UNDEFINED_VALUES,
|
UNDEFINED_VALUES, /* gems */
|
||||||
UNDEFINED_VALUES,
|
UNDEFINED_VALUES, /* amulets */
|
||||||
UNDEFINED_VALUES,
|
UNDEFINED_VALUES, /* valuables */
|
||||||
VANQ_MLVL_MNDX,
|
VANQ_MLVL_MNDX, /* vanq_sortmode */
|
||||||
|
|
||||||
/* extralev.c */
|
/* extralev.c */
|
||||||
UNDEFINED_VALUES,
|
UNDEFINED_VALUES, /* r */
|
||||||
|
|
||||||
/* files.c */
|
/* files.c */
|
||||||
NULL, /* cmdline_rcfile */
|
NULL, /* cmdline_rcfile */
|
||||||
@@ -421,13 +424,13 @@ const struct instance_globals g_init = {
|
|||||||
/* hack.c */
|
/* hack.c */
|
||||||
UNDEFINED_VALUES, /* tmp_anything */
|
UNDEFINED_VALUES, /* tmp_anything */
|
||||||
UNDEFINED_VALUE, /* wc */
|
UNDEFINED_VALUE, /* wc */
|
||||||
NULL, /* travelmap */
|
UNDEFINED_PTR, /* travelmap */
|
||||||
|
|
||||||
/* invent.c */
|
/* invent.c */
|
||||||
51, /* lastinvr */
|
51, /* lastinvr */
|
||||||
0, /* sortloogmode */
|
0, /* sortloogmode */
|
||||||
NULL, /* invbuf */
|
NULL, /* invbuf */
|
||||||
0, /* inbufsize */
|
0U, /* invbufsize */
|
||||||
WIN_ERR, /* cached_pickinv_win */
|
WIN_ERR, /* cached_pickinv_win */
|
||||||
0, /* core_invent_state */
|
0, /* core_invent_state */
|
||||||
0, /* in_sync_perminvent */
|
0, /* in_sync_perminvent */
|
||||||
@@ -438,7 +441,7 @@ const struct instance_globals g_init = {
|
|||||||
UNDEFINED_VALUES, /* only (coord) */
|
UNDEFINED_VALUES, /* only (coord) */
|
||||||
|
|
||||||
/* light.c */
|
/* light.c */
|
||||||
NULL, /* light_source */
|
UNDEFINED_PTR, /* light_base */
|
||||||
|
|
||||||
/* lock.c */
|
/* lock.c */
|
||||||
UNDEFINED_VALUES,
|
UNDEFINED_VALUES,
|
||||||
@@ -455,10 +458,10 @@ const struct instance_globals g_init = {
|
|||||||
UNDEFINED_VALUE, /* mhitu_dieroll */
|
UNDEFINED_VALUE, /* mhitu_dieroll */
|
||||||
|
|
||||||
/* mklev.c */
|
/* mklev.c */
|
||||||
UNDEFINED_VALUES, /* luathemes[] */
|
{ UNDEFINED_PTR }, /* luathemes[] */
|
||||||
UNDEFINED_VALUE, /* vault_x */
|
UNDEFINED_VALUE, /* vault_x */
|
||||||
UNDEFINED_VALUE, /* vault_y */
|
UNDEFINED_VALUE, /* vault_y */
|
||||||
UNDEFINED_VALUE, /* made_branch */
|
FALSE, /* made_branch */
|
||||||
|
|
||||||
/* mkmap.c */
|
/* mkmap.c */
|
||||||
UNDEFINED_PTR, /* new_locations */
|
UNDEFINED_PTR, /* new_locations */
|
||||||
@@ -477,7 +480,7 @@ const struct instance_globals g_init = {
|
|||||||
UNDEFINED_VALUE, /* ymin */
|
UNDEFINED_VALUE, /* ymin */
|
||||||
UNDEFINED_VALUE, /* xmax */
|
UNDEFINED_VALUE, /* xmax */
|
||||||
UNDEFINED_VALUE, /* ymax */
|
UNDEFINED_VALUE, /* ymax */
|
||||||
0, /* ransacked */
|
FALSE, /* ransacked */
|
||||||
|
|
||||||
/* mkobj.c */
|
/* mkobj.c */
|
||||||
FALSE, /* mkcorpstat_norevive */
|
FALSE, /* mkcorpstat_norevive */
|
||||||
@@ -486,14 +489,14 @@ const struct instance_globals g_init = {
|
|||||||
FALSE, /* vamp_rise_msg */
|
FALSE, /* vamp_rise_msg */
|
||||||
FALSE, /* disintegested */
|
FALSE, /* disintegested */
|
||||||
FALSE, /* zombify */
|
FALSE, /* zombify */
|
||||||
NULL, /* animal_list */
|
UNDEFINED_PTR, /* animal_list */
|
||||||
UNDEFINED_VALUE, /* animal_list_count */
|
UNDEFINED_VALUE, /* animal_list_count */
|
||||||
FALSE, /* somebody_can_move */
|
FALSE, /* somebody_can_move */
|
||||||
|
|
||||||
/* mthrowu.c */
|
/* mthrowu.c */
|
||||||
UNDEFINED_VALUE, /* mesg_given */
|
UNDEFINED_VALUE, /* mesg_given */
|
||||||
NULL, /* mtarget */
|
UNDEFINED_PTR, /* mtarget */
|
||||||
NULL, /* marcher */
|
UNDEFINED_PTR, /* marcher */
|
||||||
|
|
||||||
/* muse.c */
|
/* muse.c */
|
||||||
FALSE, /* m_using */
|
FALSE, /* m_using */
|
||||||
@@ -537,24 +540,24 @@ const struct instance_globals g_init = {
|
|||||||
0, /* oldcap */
|
0, /* oldcap */
|
||||||
(struct obj *) 0, /* current_container */
|
(struct obj *) 0, /* current_container */
|
||||||
UNDEFINED_VALUE, /* abort_looting */
|
UNDEFINED_VALUE, /* abort_looting */
|
||||||
UNDEFINED_VALUE, /* val_for_n_or_more */
|
0L, /* val_for_n_or_more */
|
||||||
UNDEFINED_VALUES, /* valid_menu_classes */
|
UNDEFINED_VALUES, /* valid_menu_classes */
|
||||||
UNDEFINED_VALUE, /* class_filter */
|
FALSE, /* class_filter */
|
||||||
UNDEFINED_VALUE, /* bucx_filter */
|
FALSE, /* bucx_filter */
|
||||||
UNDEFINED_VALUE, /* shop_filter */
|
FALSE, /* shop_filter */
|
||||||
UNDEFINED_VALUE, /* picked_filter */
|
FALSE, /* picked_filter */
|
||||||
UNDEFINED_VALUE, /* loot_reset_justpicked */
|
FALSE, /* loot_reset_justpicked */
|
||||||
|
|
||||||
/* pline.c */
|
/* pline.c */
|
||||||
0, /* pline_flags */
|
0U, /* pline_flags */
|
||||||
UNDEFINED_VALUES, /* prevmsg */
|
UNDEFINED_VALUES, /* prevmsg */
|
||||||
#ifdef DUMPLOG
|
#ifdef DUMPLOG
|
||||||
0, /* saved_pline_index */
|
0U, /* saved_pline_index */
|
||||||
UNDEFINED_VALUES,
|
{ NULL },
|
||||||
#endif
|
#endif
|
||||||
(char *) 0, /* you_buf */
|
NULL, /* you_buf */
|
||||||
0, /* you_buf_siz */
|
0, /* you_buf_siz */
|
||||||
NULL, /* gamelog */
|
UNDEFINED_PTR, /* gamelog */
|
||||||
|
|
||||||
/* polyself.c */
|
/* polyself.c */
|
||||||
0, /* sex_change_ok */
|
0, /* sex_change_ok */
|
||||||
@@ -580,7 +583,7 @@ const struct instance_globals g_init = {
|
|||||||
UNDEFINED_VALUE, /* known */
|
UNDEFINED_VALUE, /* known */
|
||||||
|
|
||||||
/* region.c */
|
/* region.c */
|
||||||
NULL, /* regions */
|
UNDEFINED_PTR, /* regions */
|
||||||
0, /* n_regions */
|
0, /* n_regions */
|
||||||
0, /* max_regions */
|
0, /* max_regions */
|
||||||
FALSE, /* gas_cloud_diss_within */
|
FALSE, /* gas_cloud_diss_within */
|
||||||
@@ -588,9 +591,9 @@ const struct instance_globals g_init = {
|
|||||||
|
|
||||||
/* restore.c */
|
/* restore.c */
|
||||||
0, /* n_ids_mapped */
|
0, /* n_ids_mapped */
|
||||||
0, /* id_map */
|
UNDEFINED_PTR, /* id_map */
|
||||||
UNDEFINED_PTR, /* oldfruit */
|
UNDEFINED_PTR, /* oldfruit */
|
||||||
UNDEFINED_VALUE, /* omoves */
|
0L, /* omoves */
|
||||||
|
|
||||||
/* rip.c */
|
/* rip.c */
|
||||||
UNDEFINED_PTR, /* rip */
|
UNDEFINED_PTR, /* rip */
|
||||||
@@ -603,20 +606,20 @@ const struct instance_globals g_init = {
|
|||||||
UNDEFINED_VALUES, /* rfilter */
|
UNDEFINED_VALUES, /* rfilter */
|
||||||
|
|
||||||
/* rumors.c */
|
/* rumors.c */
|
||||||
0, /* true_rumor_size */
|
0L, /* true_rumor_size */
|
||||||
0, /* false_rumor_size */
|
0L, /* false_rumor_size */
|
||||||
UNDEFINED_VALUE, /* true_rumor_start*/
|
0UL, /* true_rumor_start*/
|
||||||
UNDEFINED_VALUE, /* false_rumor_start*/
|
0UL, /* false_rumor_start*/
|
||||||
UNDEFINED_VALUE, /* true_rumor_end */
|
0L, /* true_rumor_end */
|
||||||
UNDEFINED_VALUE, /* false_rumor_end */
|
0L, /* false_rumor_end */
|
||||||
0, /* oracle_flag */
|
0, /* oracle_flag */
|
||||||
0, /* oracle_cnt */
|
0U, /* oracle_cnt */
|
||||||
NULL, /* oracle_loc */
|
UNDEFINED_PTR, /* oracle_loc */
|
||||||
|
|
||||||
/* save.c */
|
/* save.c */
|
||||||
TRUE, /* havestate*/
|
TRUE, /* havestate*/
|
||||||
0, /* ustuck_id */
|
0U, /* ustuck_id */
|
||||||
0, /* usteed_id */
|
0U, /* usteed_id */
|
||||||
(struct obj *) 0, /* looseball */
|
(struct obj *) 0, /* looseball */
|
||||||
(struct obj *) 0, /* loosechain */
|
(struct obj *) 0, /* loosechain */
|
||||||
{ 0, 0 }, /* uz_save */
|
{ 0, 0 }, /* uz_save */
|
||||||
@@ -626,13 +629,13 @@ const struct instance_globals g_init = {
|
|||||||
SELL_NORMAL, /* sell_how */
|
SELL_NORMAL, /* sell_how */
|
||||||
FALSE, /* auto_credit */
|
FALSE, /* auto_credit */
|
||||||
UNDEFINED_VALUES, /* repo */
|
UNDEFINED_VALUES, /* repo */
|
||||||
UNDEFINED_VALUE, /* followmsg */
|
0L, /* followmsg */
|
||||||
|
|
||||||
/* sp_lev.c */
|
/* sp_lev.c */
|
||||||
NULL, /* lev_message */
|
NULL, /* lev_message */
|
||||||
NULL, /* lregions */
|
UNDEFINED_PTR, /* lregions */
|
||||||
0, /* num_lregions */
|
0, /* num_lregions */
|
||||||
NULL, /* coder */
|
UNDEFINED_PTR, /* coder */
|
||||||
UNDEFINED_VALUE, /* xstart */
|
UNDEFINED_VALUE, /* xstart */
|
||||||
UNDEFINED_VALUE, /* ystart */
|
UNDEFINED_VALUE, /* ystart */
|
||||||
UNDEFINED_VALUE, /* xsize */
|
UNDEFINED_VALUE, /* xsize */
|
||||||
@@ -642,24 +645,24 @@ const struct instance_globals g_init = {
|
|||||||
|
|
||||||
/* spells.c */
|
/* spells.c */
|
||||||
0, /* spl_sortmode */
|
0, /* spl_sortmode */
|
||||||
NULL, /* spl_orderindx */
|
UNDEFINED_PTR, /* spl_orderindx */
|
||||||
|
|
||||||
/* steal.c */
|
/* steal.c */
|
||||||
0, /* stealoid */
|
0U, /* stealoid */
|
||||||
0, /* stealmid */
|
0U, /* stealmid */
|
||||||
|
|
||||||
/* teleport.c */
|
/* teleport.c */
|
||||||
|
|
||||||
/* timeout.c */
|
/* timeout.c */
|
||||||
UNDEFINED_PTR, /* timer_base */
|
UNDEFINED_PTR, /* timer_base */
|
||||||
1, /* timer_id */
|
1UL, /* timer_id */
|
||||||
|
|
||||||
/* topten.c */
|
/* topten.c */
|
||||||
WIN_ERR, /* toptenwin */
|
WIN_ERR, /* toptenwin */
|
||||||
|
|
||||||
/* trap.c */
|
/* trap.c */
|
||||||
{ 0, 0, FALSE },
|
{ 0, 0, FALSE }, /* acid_ctx */
|
||||||
UNDEFINED_VALUES,
|
{ UNDEFINED_PTR, 0, 0 }, /* launchplace */
|
||||||
|
|
||||||
/* u_init.c */
|
/* u_init.c */
|
||||||
STRANGE_OBJECT, /* nocreate */
|
STRANGE_OBJECT, /* nocreate */
|
||||||
@@ -668,12 +671,12 @@ const struct instance_globals g_init = {
|
|||||||
STRANGE_OBJECT, /* nocreate4 */
|
STRANGE_OBJECT, /* nocreate4 */
|
||||||
|
|
||||||
/* uhitm.c */
|
/* uhitm.c */
|
||||||
UNDEFINED_VALUE, /* override_confirmation */
|
FALSE, /* override_confirmation */
|
||||||
|
|
||||||
/* vision.c */
|
/* vision.c */
|
||||||
NULL, /* viz_array */
|
UNDEFINED_PTR, /* viz_array */
|
||||||
NULL, /* viz_rmin */
|
UNDEFINED_PTR, /* viz_rmin */
|
||||||
NULL, /* viz_rmax */
|
UNDEFINED_PTR, /* viz_rmax */
|
||||||
FALSE, /* vision_full_recalc */
|
FALSE, /* vision_full_recalc */
|
||||||
0, /* seethru */
|
0, /* seethru */
|
||||||
|
|
||||||
@@ -681,11 +684,11 @@ const struct instance_globals g_init = {
|
|||||||
UNDEFINED_PTR, /* propellor */
|
UNDEFINED_PTR, /* propellor */
|
||||||
|
|
||||||
/* windows.c */
|
/* windows.c */
|
||||||
NULL, /* last_winchoice */
|
UNDEFINED_PTR, /* last_winchoice */
|
||||||
|
|
||||||
/* zap.c */
|
/* zap.c */
|
||||||
UNDEFINED_VALUE, /* poly_zap */
|
UNDEFINED_VALUE, /* poly_zap */
|
||||||
UNDEFINED_VALUE, /* obj_zapped */
|
FALSE, /* obj_zapped */
|
||||||
|
|
||||||
/* new */
|
/* new */
|
||||||
DUMMY, /* lua_ver[LUA_VER_BUFSIZ] */
|
DUMMY, /* lua_ver[LUA_VER_BUFSIZ] */
|
||||||
|
|||||||
+14
-1
@@ -3429,7 +3429,20 @@ get_table_objtype(lua_State *L)
|
|||||||
int
|
int
|
||||||
lspo_object(lua_State *L)
|
lspo_object(lua_State *L)
|
||||||
{
|
{
|
||||||
static object zeroobject = { DUMMY };
|
static object zeroobject = {
|
||||||
|
{ 0 }, /* Str_or_len name */
|
||||||
|
0, /* corpsenm */
|
||||||
|
0, 0, /* id, spe */
|
||||||
|
0, /* coord */
|
||||||
|
0, 0, /* coordxy x,y */
|
||||||
|
0, 0, /* class, containment */
|
||||||
|
0, /* curse_state */
|
||||||
|
0, /* quan */
|
||||||
|
0, /* buried */
|
||||||
|
0, /* lit */
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, /* eroded, locked, trapped, recharged,
|
||||||
|
invis, greased, broken, achievment */
|
||||||
|
};
|
||||||
#if 0
|
#if 0
|
||||||
int nparams = 0;
|
int nparams = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ endif # clang
|
|||||||
#CXX=clang++ -std=gnu++11
|
#CXX=clang++ -std=gnu++11
|
||||||
|
|
||||||
CFLAGS=$(CCFLAGS) -I../include -DNOTPARMDECL
|
CFLAGS=$(CCFLAGS) -I../include -DNOTPARMDECL
|
||||||
CFLAGS+=-Wall -Wextra -Wno-missing-field-initializers \
|
CFLAGS+=-Wall -Wextra \
|
||||||
-Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings
|
-Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings
|
||||||
CFLAGS+=-pedantic
|
CFLAGS+=-pedantic
|
||||||
CFLAGS+=-Wmissing-declarations
|
CFLAGS+=-Wmissing-declarations
|
||||||
@@ -67,7 +67,7 @@ CFLAGS+=-Wold-style-definition
|
|||||||
CFLAGS+=-Wstrict-prototypes
|
CFLAGS+=-Wstrict-prototypes
|
||||||
|
|
||||||
CCXXFLAGS = -g -I../include -DNOTPARMDECL
|
CCXXFLAGS = -g -I../include -DNOTPARMDECL
|
||||||
CCXXFLAGS+=-Wall -Wextra -Wno-missing-field-initializers \
|
CCXXFLAGS+=-Wall -Wextra \
|
||||||
-Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings
|
-Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wwrite-strings
|
||||||
CCXXFLAGS+=-pedantic
|
CCXXFLAGS+=-pedantic
|
||||||
CCXXFLAGS+=-Wmissing-declarations
|
CCXXFLAGS+=-Wmissing-declarations
|
||||||
|
|||||||
+13
-13
@@ -585,9 +585,9 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
|||||||
int flags; // 1 desktop, 2 handheld, 3 either/both
|
int flags; // 1 desktop, 2 handheld, 3 either/both
|
||||||
int (*funct)(void);
|
int (*funct)(void);
|
||||||
} item[] = {
|
} item[] = {
|
||||||
{ game, 0, 3},
|
{ game, 0, 3, (int (*)(void)) 0},
|
||||||
{ game, "Extended-commands", 3, doextcmd },
|
{ game, "Extended-commands", 3, doextcmd },
|
||||||
{ game, 0, 3},
|
{ game, 0, 3, (int (*)(void)) 0},
|
||||||
{ game, "Version", 3, doversion},
|
{ game, "Version", 3, doversion},
|
||||||
{ game, "Compilation", 3, doextversion},
|
{ game, "Compilation", 3, doextversion},
|
||||||
{ game, "History", 3, dohistory},
|
{ game, "History", 3, dohistory},
|
||||||
@@ -602,7 +602,7 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
|||||||
#endif
|
#endif
|
||||||
"Options", 3, doset},
|
"Options", 3, doset},
|
||||||
{ game, "Explore mode", 3, enter_explore_mode},
|
{ game, "Explore mode", 3, enter_explore_mode},
|
||||||
{ game, 0, 3},
|
{ game, 0, 3, (int (*)(void)) 0},
|
||||||
{ game, "Save-and-exit", 3, dosave},
|
{ game, "Save-and-exit", 3, dosave},
|
||||||
{ game,
|
{ game,
|
||||||
#ifdef MACOS
|
#ifdef MACOS
|
||||||
@@ -615,15 +615,15 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
|||||||
|
|
||||||
{ apparel, "Apparel off", 2, doddoremarm},
|
{ apparel, "Apparel off", 2, doddoremarm},
|
||||||
{ apparel, "Remove many", 1, doddoremarm},
|
{ apparel, "Remove many", 1, doddoremarm},
|
||||||
{ apparel, 0, 3},
|
{ apparel, 0, 3, (int (*)(void)) 0},
|
||||||
{ apparel, "Wield weapon", 3, dowield},
|
{ apparel, "Wield weapon", 3, dowield},
|
||||||
{ apparel, "Exchange weapons", 3, doswapweapon},
|
{ apparel, "Exchange weapons", 3, doswapweapon},
|
||||||
{ apparel, "Two weapon combat", 3, dotwoweapon},
|
{ apparel, "Two weapon combat", 3, dotwoweapon},
|
||||||
{ apparel, "Load quiver", 3, dowieldquiver},
|
{ apparel, "Load quiver", 3, dowieldquiver},
|
||||||
{ apparel, 0, 3},
|
{ apparel, 0, 3, (int (*)(void)) 0},
|
||||||
{ apparel, "Wear armor", 3, dowear},
|
{ apparel, "Wear armor", 3, dowear},
|
||||||
{ apparel, "Take off armor", 3, dotakeoff},
|
{ apparel, "Take off armor", 3, dotakeoff},
|
||||||
{ apparel, 0, 3},
|
{ apparel, 0, 3, (int (*)(void)) 0},
|
||||||
{ apparel, "Put on accessories", 3, doputon},
|
{ apparel, "Put on accessories", 3, doputon},
|
||||||
{ apparel, "Remove accessories", 3, doremring},
|
{ apparel, "Remove accessories", 3, doremring},
|
||||||
|
|
||||||
@@ -663,20 +663,20 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
|||||||
{ magic, "Dip", 3, dodip},
|
{ magic, "Dip", 3, dodip},
|
||||||
{ magic, "Rub", 3, dorub},
|
{ magic, "Rub", 3, dorub},
|
||||||
{ magic, "Invoke", 3, doinvoke},
|
{ magic, "Invoke", 3, doinvoke},
|
||||||
{ magic, 0, 3},
|
{ magic, 0, 3, (int (*)(void)) 0},
|
||||||
{ magic, "Offer", 3, dosacrifice},
|
{ magic, "Offer", 3, dosacrifice},
|
||||||
{ magic, "Pray", 3, dopray},
|
{ magic, "Pray", 3, dopray},
|
||||||
{ magic, 0, 3},
|
{ magic, 0, 3, (int (*)(void)) 0},
|
||||||
{ magic, "Teleport", 3, dotelecmd},
|
{ magic, "Teleport", 3, dotelecmd},
|
||||||
{ magic, "Monster action", 3, domonability},
|
{ magic, "Monster action", 3, domonability},
|
||||||
{ magic, "Turn undead", 3, doturn},
|
{ magic, "Turn undead", 3, doturn},
|
||||||
|
|
||||||
{ help, "Help", 3, dohelp},
|
{ help, "Help", 3, dohelp},
|
||||||
{ help, 0, 3},
|
{ help, 0, 3, (int (*)(void)) 0},
|
||||||
{ help, "What is here", 3, dolook},
|
{ help, "What is here", 3, dolook},
|
||||||
{ help, "What is there", 3, doquickwhatis},
|
{ help, "What is there", 3, doquickwhatis},
|
||||||
{ help, "What is...", 2, dowhatis},
|
{ help, "What is...", 2, dowhatis},
|
||||||
{ help, 0, 1},
|
{ help, 0, 1, (int (*)(void)) 0},
|
||||||
|
|
||||||
{ info, "Inventory", 3, ddoinv},
|
{ info, "Inventory", 3, ddoinv},
|
||||||
{ info, "Attributes (extended status)", 3, doattributes },
|
{ info, "Attributes (extended status)", 3, doattributes },
|
||||||
@@ -685,13 +685,13 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
|
|||||||
{ info, "Discoveries", 3, dodiscovered},
|
{ info, "Discoveries", 3, dodiscovered},
|
||||||
{ info, "List/reorder spells", 3, dovspell},
|
{ info, "List/reorder spells", 3, dovspell},
|
||||||
{ info, "Adjust inventory letters", 3, doorganize },
|
{ info, "Adjust inventory letters", 3, doorganize },
|
||||||
{ info, 0, 3},
|
{ info, 0, 3, (int (*)(void)) 0},
|
||||||
{ info, "Name object or creature", 3, docallcmd},
|
{ info, "Name object or creature", 3, docallcmd},
|
||||||
{ info, "Annotate level", 3, donamelevel },
|
{ info, "Annotate level", 3, donamelevel },
|
||||||
{ info, 0, 3},
|
{ info, 0, 3, (int (*)(void)) 0},
|
||||||
{ info, "Skills", 3, enhance_weapon_skill},
|
{ info, "Skills", 3, enhance_weapon_skill},
|
||||||
|
|
||||||
{ 0, 0, 0 }
|
{ 0, 0, 0, (int (*)(void)) 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
QAction *actn;
|
QAction *actn;
|
||||||
|
|||||||
Reference in New Issue
Block a user