Fix even more warnings
This commit is contained in:
98
src/sp_lev.c
98
src/sp_lev.c
@@ -32,6 +32,7 @@ static void FDECL(flip_drawbridge_horizontal, (struct rm *));
|
||||
static void FDECL(flip_drawbridge_vertical, (struct rm *));
|
||||
static void FDECL(flip_visuals, (int, int, int, int, int));
|
||||
static int FDECL(flip_encoded_direction_bits, (int, int));
|
||||
static void FDECL(sel_set_wall_property, (int, int, genericptr_t));
|
||||
static void FDECL(set_wall_property, (XCHAR_P, XCHAR_P, XCHAR_P, XCHAR_P,
|
||||
int));
|
||||
static void NDECL(count_features);
|
||||
@@ -96,6 +97,7 @@ static void FDECL(sel_set_ter, (int, int, genericptr_t));
|
||||
static void FDECL(sel_set_door, (int, int, genericptr_t));
|
||||
static void FDECL(sel_set_feature, (int, int, genericptr_t));
|
||||
static int FDECL(get_coord, (lua_State *, int, int *, int *));
|
||||
static void FDECL(levregion_add, (lev_region *));
|
||||
static void FDECL(get_table_xy_or_coord, (lua_State *, int *, int *));
|
||||
static int FDECL(get_table_region, (lua_State *, const char *,
|
||||
int *, int *, int *, int *, BOOLEAN_P));
|
||||
@@ -103,6 +105,20 @@ static void FDECL(set_wallprop_in_selection, (lua_State *, int));
|
||||
static int FDECL(floodfillchk_match_under, (int, int));
|
||||
static int FDECL(floodfillchk_match_accessible, (int, int));
|
||||
static void FDECL(l_push_wid_hei_table, (lua_State *, int, int));
|
||||
static int FDECL(get_table_align, (lua_State *));
|
||||
static int FDECL(get_table_monclass, (lua_State *));
|
||||
static int FDECL(find_montype, (lua_State *, const char *));
|
||||
static int FDECL(get_table_montype, (lua_State *));
|
||||
static int FDECL(get_table_int_or_random, (lua_State *, const char *, int));
|
||||
static int FDECL(get_table_buc, (lua_State *));
|
||||
static int FDECL(get_table_objclass, (lua_State *));
|
||||
static int FDECL(find_objtype, (lua_State *, const char *));
|
||||
static int FDECL(get_table_objtype, (lua_State *));
|
||||
static int FDECL(get_table_roomtype_opt, (lua_State *, const char *, int));
|
||||
static int FDECL(get_table_traptype_opt, (lua_State *, const char *, int));
|
||||
static int FDECL(get_traptype_byname, (const char *));
|
||||
static int FDECL(get_table_intarray_entry, (lua_State *, int, int));
|
||||
static struct sp_coder *NDECL(sp_level_coder_init);
|
||||
|
||||
/* lua_CFunction prototypes */
|
||||
int FDECL(lspo_altar, (lua_State *));
|
||||
@@ -842,7 +858,7 @@ boolean extras;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
sel_set_wall_property(x, y, arg)
|
||||
int x, y;
|
||||
genericptr_t arg;
|
||||
@@ -2985,7 +3001,7 @@ lua_State *L;
|
||||
return 0; /* number of results */
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
get_table_align(L)
|
||||
lua_State *L;
|
||||
{
|
||||
@@ -3003,7 +3019,7 @@ lua_State *L;
|
||||
return a;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
get_table_monclass(L)
|
||||
lua_State *L;
|
||||
{
|
||||
@@ -3016,7 +3032,7 @@ lua_State *L;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
find_montype(L, s)
|
||||
lua_State *L;
|
||||
const char *s;
|
||||
@@ -3030,7 +3046,7 @@ const char *s;
|
||||
return NON_PM;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
get_table_montype(L)
|
||||
lua_State *L;
|
||||
{
|
||||
@@ -3212,7 +3228,7 @@ lua_State *L;
|
||||
/* the hash key 'name' is an integer or "random",
|
||||
or if not existent, also return rndval.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
get_table_int_or_random(L, name, rndval)
|
||||
lua_State *L;
|
||||
const char *name;
|
||||
@@ -3244,7 +3260,7 @@ int rndval;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
get_table_buc(L)
|
||||
lua_State *L;
|
||||
{
|
||||
@@ -3258,7 +3274,7 @@ lua_State *L;
|
||||
return curse_state;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
get_table_objclass(L)
|
||||
lua_State *L;
|
||||
{
|
||||
@@ -3271,7 +3287,7 @@ lua_State *L;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
find_objtype(L, s)
|
||||
lua_State *L;
|
||||
const char *s;
|
||||
@@ -3311,7 +3327,7 @@ const char *s;
|
||||
return STRANGE_OBJECT;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
get_table_objtype(L)
|
||||
lua_State *L;
|
||||
{
|
||||
@@ -3695,7 +3711,7 @@ static const struct {
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
int
|
||||
static int
|
||||
get_table_roomtype_opt(L, name, defval)
|
||||
lua_State *L;
|
||||
const char *name;
|
||||
@@ -3962,7 +3978,7 @@ lua_State *L;
|
||||
int x, y;
|
||||
long acoord;
|
||||
int shrine;
|
||||
int align;
|
||||
int al;
|
||||
|
||||
create_des_coder();
|
||||
|
||||
@@ -3970,7 +3986,7 @@ lua_State *L;
|
||||
|
||||
get_table_xy_or_coord(L, &x, &y);
|
||||
|
||||
align = get_table_align(L);
|
||||
al = get_table_align(L);
|
||||
shrine = shrines2i[get_table_option(L, "type", "altar", shrines)];
|
||||
|
||||
if (x == -1 && y == -1)
|
||||
@@ -3979,7 +3995,7 @@ lua_State *L;
|
||||
acoord = SP_COORD_PACK(x, y);
|
||||
|
||||
tmpaltar.coord = acoord;
|
||||
tmpaltar.align = align;
|
||||
tmpaltar.align = al;
|
||||
tmpaltar.shrine = shrine;
|
||||
|
||||
create_altar(&tmpaltar, g.coder->croom);
|
||||
@@ -4016,7 +4032,7 @@ static const struct {
|
||||
{ "random", -1 },
|
||||
{ 0, NO_TRAP } };
|
||||
|
||||
int
|
||||
static int
|
||||
get_table_traptype_opt(L, name, defval)
|
||||
lua_State *L;
|
||||
const char *name;
|
||||
@@ -4049,7 +4065,7 @@ int ttyp;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
get_traptype_byname(trapname)
|
||||
const char *trapname;
|
||||
{
|
||||
@@ -4299,38 +4315,6 @@ struct selectionvar *s;
|
||||
return s;
|
||||
}
|
||||
|
||||
struct selectionvar *
|
||||
selection_logical_oper(s1, s2, oper)
|
||||
struct selectionvar *s1, *s2;
|
||||
char oper;
|
||||
{
|
||||
struct selectionvar *ov;
|
||||
int x, y;
|
||||
|
||||
ov = selection_new();
|
||||
if (!ov)
|
||||
return NULL;
|
||||
|
||||
for (x = 0; x < ov->wid; x++)
|
||||
for (y = 0; y < ov->hei; y++) {
|
||||
switch (oper) {
|
||||
default:
|
||||
case '|':
|
||||
if (selection_getpoint(x, y, s1)
|
||||
|| selection_getpoint(x, y, s2))
|
||||
selection_setpoint(x, y, ov, 1);
|
||||
break;
|
||||
case '&':
|
||||
if (selection_getpoint(x, y, s1)
|
||||
&& selection_getpoint(x, y, s2))
|
||||
selection_setpoint(x, y, ov, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ov;
|
||||
}
|
||||
|
||||
struct selectionvar *
|
||||
selection_filter_mapchar(ov, typ, lit)
|
||||
struct selectionvar *ov;
|
||||
@@ -5350,7 +5334,7 @@ ensure_way_out()
|
||||
selection_free(ov, TRUE);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
get_table_intarray_entry(L, tableidx, entrynum)
|
||||
lua_State *L;
|
||||
int tableidx, entrynum;
|
||||
@@ -5433,7 +5417,7 @@ int *x, *y;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
levregion_add(lregion)
|
||||
lev_region *lregion;
|
||||
{
|
||||
@@ -6009,8 +5993,6 @@ int
|
||||
lspo_map(L)
|
||||
lua_State *L;
|
||||
{
|
||||
xchar tmpxstart, tmpystart, tmpxsize, tmpysize;
|
||||
|
||||
/*
|
||||
TODO: allow passing an array of strings as map data
|
||||
TODO: handle if map lines aren't same length
|
||||
@@ -6062,11 +6044,6 @@ TODO: g.coder->croom needs to be updated
|
||||
return 0;
|
||||
}
|
||||
|
||||
tmpxsize = g.xsize;
|
||||
tmpysize = g.ysize;
|
||||
tmpxstart = g.xstart;
|
||||
tmpystart = g.ystart;
|
||||
|
||||
g.xsize = mf->wid;
|
||||
g.ysize = mf->hei;
|
||||
|
||||
@@ -6197,11 +6174,6 @@ TODO: g.coder->croom needs to be updated
|
||||
lua_call(L, 1, 0);
|
||||
}
|
||||
|
||||
tmpxsize = g.xsize;
|
||||
tmpysize = g.ysize;
|
||||
tmpxstart = g.xstart;
|
||||
tmpystart = g.ystart;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -6217,7 +6189,7 @@ update_croom()
|
||||
g.coder->croom = NULL;
|
||||
}
|
||||
|
||||
struct sp_coder *
|
||||
static struct sp_coder *
|
||||
sp_level_coder_init()
|
||||
{
|
||||
int tmpi;
|
||||
|
||||
Reference in New Issue
Block a user