more cast style consistency
This commit is contained in:
@@ -1150,8 +1150,8 @@ makemap_prepost(boolean pre, boolean wiztower)
|
|||||||
/* escape from trap */
|
/* escape from trap */
|
||||||
reset_utrap(FALSE);
|
reset_utrap(FALSE);
|
||||||
check_special_room(TRUE); /* room exit */
|
check_special_room(TRUE); /* room exit */
|
||||||
(void) memset((genericptr_t)&gd.dndest, 0, sizeof (dest_area));
|
(void) memset((genericptr_t) &gd.dndest, 0, sizeof (dest_area));
|
||||||
(void) memset((genericptr_t)&gu.updest, 0, sizeof (dest_area));
|
(void) memset((genericptr_t) &gu.updest, 0, sizeof (dest_area));
|
||||||
u.ustuck = (struct monst *) 0;
|
u.ustuck = (struct monst *) 0;
|
||||||
u.uswallow = u.uswldtim = 0;
|
u.uswallow = u.uswldtim = 0;
|
||||||
set_uinwater(0); /* u.uinwater = 0 */
|
set_uinwater(0); /* u.uinwater = 0 */
|
||||||
@@ -5124,8 +5124,8 @@ movecmd(char sym, int mode)
|
|||||||
{
|
{
|
||||||
int d = DIR_ERR;
|
int d = DIR_ERR;
|
||||||
|
|
||||||
if (gc.Cmd.commands[(uchar)sym]) {
|
if (gc.Cmd.commands[(uchar) sym]) {
|
||||||
int (*fnc)(void) = gc.Cmd.commands[(uchar)sym]->ef_funct;
|
int (*fnc)(void) = gc.Cmd.commands[(uchar) sym]->ef_funct;
|
||||||
|
|
||||||
if (mode == MV_ANY) {
|
if (mode == MV_ANY) {
|
||||||
for (d = N_DIRS_Z - 1; d > DIR_ERR; d--)
|
for (d = N_DIRS_Z - 1; d > DIR_ERR; d--)
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ lib_dlb_fread(char *buf, int size, int quan, dlb *dp)
|
|||||||
dp->mark += nbytes;
|
dp->mark += nbytes;
|
||||||
dp->lib->fmark += nbytes;
|
dp->lib->fmark += nbytes;
|
||||||
|
|
||||||
return (int)nread;
|
return (int) nread;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|||||||
@@ -515,7 +515,7 @@ add_branch(
|
|||||||
|
|
||||||
branch_num = find_branch(gd.dungeons[dgn].dname, pd);
|
branch_num = find_branch(gd.dungeons[dgn].dname, pd);
|
||||||
new_branch = (branch *) alloc(sizeof(branch));
|
new_branch = (branch *) alloc(sizeof(branch));
|
||||||
(void) memset((genericptr_t)new_branch, 0, sizeof(branch));
|
(void) memset((genericptr_t) new_branch, 0, sizeof(branch));
|
||||||
new_branch->next = (branch *) 0;
|
new_branch->next = (branch *) 0;
|
||||||
new_branch->id = branch_id++;
|
new_branch->id = branch_id++;
|
||||||
new_branch->type = correct_branch_type(&pd->tmpbranch[branch_num]);
|
new_branch->type = correct_branch_type(&pd->tmpbranch[branch_num]);
|
||||||
@@ -568,7 +568,7 @@ init_level(int dgn, int proto_index, struct proto_dungeon *pd)
|
|||||||
|
|
||||||
pd->final_lev[proto_index] = new_level =
|
pd->final_lev[proto_index] = new_level =
|
||||||
(s_level *) alloc(sizeof(s_level));
|
(s_level *) alloc(sizeof(s_level));
|
||||||
(void) memset((genericptr_t)new_level, 0, sizeof(s_level));
|
(void) memset((genericptr_t) new_level, 0, sizeof(s_level));
|
||||||
/* load new level with data */
|
/* load new level with data */
|
||||||
Strcpy(new_level->proto, tlevel->name);
|
Strcpy(new_level->proto, tlevel->name);
|
||||||
new_level->boneid = tlevel->boneschar;
|
new_level->boneid = tlevel->boneschar;
|
||||||
|
|||||||
10
src/end.c
10
src/end.c
@@ -299,7 +299,7 @@ crashreport_init(int argc UNUSED, char *argv[] UNUSED){
|
|||||||
*p = '\0';
|
*p = '\0';
|
||||||
return;
|
return;
|
||||||
skip:
|
skip:
|
||||||
strncpy((char *)bid,"unknown",sizeof(bid)-1);
|
strncpy((char *) bid, "unknown", sizeof(bid) - 1);
|
||||||
HASH_PRAGMA_END
|
HASH_PRAGMA_END
|
||||||
}
|
}
|
||||||
#undef HASH_CONTEXT
|
#undef HASH_CONTEXT
|
||||||
@@ -388,7 +388,7 @@ submit_web_report(const char *msg, char *why){
|
|||||||
// detailrows min(actual,50) Guess since we can't know the
|
// detailrows min(actual,50) Guess since we can't know the
|
||||||
// width of the window.
|
// width of the window.
|
||||||
SWR_ADD("detailrows");
|
SWR_ADD("detailrows");
|
||||||
(void)snprintf(nbuf,sizeof(nbuf),"%d",count+prelines);
|
(void) snprintf(nbuf, sizeof nbuf,"%d",count+prelines);
|
||||||
SWR_ADD(nbuf);
|
SWR_ADD(nbuf);
|
||||||
xargv[xargc++] = 0; // terminate array
|
xargv[xargc++] = 0; // terminate array
|
||||||
|
|
||||||
@@ -402,7 +402,7 @@ submit_web_report(const char *msg, char *why){
|
|||||||
int status;
|
int status;
|
||||||
errno=0;
|
errno=0;
|
||||||
// XXX do we _really_ know this is the right pid?
|
// XXX do we _really_ know this is the right pid?
|
||||||
(void)waitpid(pid, &status, 0);
|
(void) waitpid(pid, &status, 0);
|
||||||
if (status) { // XXX check could be more precise
|
if (status) { // XXX check could be more precise
|
||||||
#if 0
|
#if 0
|
||||||
// Not useful at the moment. XXX
|
// Not useful at the moment. XXX
|
||||||
@@ -2207,7 +2207,7 @@ save_killers(NHFILE *nhfp)
|
|||||||
if (perform_bwrite(nhfp)) {
|
if (perform_bwrite(nhfp)) {
|
||||||
for (kptr = &gk.killer; kptr != (struct kinfo *) 0; kptr = kptr->next) {
|
for (kptr = &gk.killer; kptr != (struct kinfo *) 0; kptr = kptr->next) {
|
||||||
if (nhfp->structlevel)
|
if (nhfp->structlevel)
|
||||||
bwrite(nhfp->fd, (genericptr_t)kptr, sizeof(struct kinfo));
|
bwrite(nhfp->fd, (genericptr_t) kptr, sizeof(struct kinfo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (release_data(nhfp)) {
|
if (release_data(nhfp)) {
|
||||||
@@ -2226,7 +2226,7 @@ restore_killers(NHFILE *nhfp)
|
|||||||
|
|
||||||
for (kptr = &gk.killer; kptr != (struct kinfo *) 0; kptr = kptr->next) {
|
for (kptr = &gk.killer; kptr != (struct kinfo *) 0; kptr = kptr->next) {
|
||||||
if (nhfp->structlevel)
|
if (nhfp->structlevel)
|
||||||
mread(nhfp->fd, (genericptr_t)kptr, sizeof(struct kinfo));
|
mread(nhfp->fd, (genericptr_t) kptr, sizeof(struct kinfo));
|
||||||
if (kptr->next) {
|
if (kptr->next) {
|
||||||
kptr->next = (struct kinfo *) alloc(sizeof (struct kinfo));
|
kptr->next = (struct kinfo *) alloc(sizeof (struct kinfo));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1357,9 +1357,9 @@ save_engravings(NHFILE *nhfp)
|
|||||||
if (ep->engr_alloc
|
if (ep->engr_alloc
|
||||||
&& ep->engr_txt[actual_text][0] && perform_bwrite(nhfp)) {
|
&& ep->engr_txt[actual_text][0] && perform_bwrite(nhfp)) {
|
||||||
if (nhfp->structlevel) {
|
if (nhfp->structlevel) {
|
||||||
bwrite(nhfp->fd, (genericptr_t)&(ep->engr_alloc),
|
bwrite(nhfp->fd, (genericptr_t) &(ep->engr_alloc),
|
||||||
sizeof ep->engr_alloc);
|
sizeof ep->engr_alloc);
|
||||||
bwrite(nhfp->fd, (genericptr_t)ep,
|
bwrite(nhfp->fd, (genericptr_t) ep,
|
||||||
sizeof (struct engr) + ep->engr_alloc);
|
sizeof (struct engr) + ep->engr_alloc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1368,7 +1368,7 @@ save_engravings(NHFILE *nhfp)
|
|||||||
}
|
}
|
||||||
if (perform_bwrite(nhfp)) {
|
if (perform_bwrite(nhfp)) {
|
||||||
if (nhfp->structlevel)
|
if (nhfp->structlevel)
|
||||||
bwrite(nhfp->fd, (genericptr_t)&no_more_engr, sizeof no_more_engr);
|
bwrite(nhfp->fd, (genericptr_t) &no_more_engr, sizeof no_more_engr);
|
||||||
}
|
}
|
||||||
if (release_data(nhfp))
|
if (release_data(nhfp))
|
||||||
head_engr = 0;
|
head_engr = 0;
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ nh_basename(const char *fname, boolean keep_suffix)
|
|||||||
*
|
*
|
||||||
* Sample:
|
* Sample:
|
||||||
* The following call:
|
* The following call:
|
||||||
* (void)fname_encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
* (void) fname_encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
||||||
* '%', "This is a % test!", buf, 512);
|
* '%', "This is a % test!", buf, 512);
|
||||||
* results in this encoding:
|
* results in this encoding:
|
||||||
* "This%20is%20a%20%25%20test%21"
|
* "This%20is%20a%20%25%20test%21"
|
||||||
@@ -516,7 +516,7 @@ zero_nhfile(NHFILE *nhfp)
|
|||||||
static NHFILE *
|
static NHFILE *
|
||||||
new_nhfile(void)
|
new_nhfile(void)
|
||||||
{
|
{
|
||||||
NHFILE *nhfp = (NHFILE *)alloc(sizeof(NHFILE));
|
NHFILE *nhfp = (NHFILE *) alloc(sizeof(NHFILE));
|
||||||
|
|
||||||
zero_nhfile(nhfp);
|
zero_nhfile(nhfp);
|
||||||
return nhfp;
|
return nhfp;
|
||||||
|
|||||||
@@ -3593,7 +3593,7 @@ display_inventory(const char *lets, boolean want_reply)
|
|||||||
for (otmp = gi.invent; otmp; otmp = otmp->nobj)
|
for (otmp = gi.invent; otmp; otmp = otmp->nobj)
|
||||||
if (otmp->invlet == cmdq->key
|
if (otmp->invlet == cmdq->key
|
||||||
&& (!lets || !*lets
|
&& (!lets || !*lets
|
||||||
|| strchr(lets, def_oc_syms[(int)otmp->oclass].sym))) {
|
|| strchr(lets, def_oc_syms[(int) otmp->oclass].sym))) {
|
||||||
free(cmdq);
|
free(cmdq);
|
||||||
return otmp->invlet;
|
return otmp->invlet;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ nh_snprintf(const char *func UNUSED, int line UNUSED, char *str, size_t size,
|
|||||||
n = vsnprintf(str, size, fmt, ap);
|
n = vsnprintf(str, size, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
if (n < 0 || (size_t)n >= size) { /* is there a problem? */
|
if (n < 0 || (size_t) n >= size) { /* is there a problem? */
|
||||||
str[size-1] = 0; /* make sure it is nul terminated */
|
str[size-1] = 0; /* make sure it is nul terminated */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4107,7 +4107,7 @@ iter_mons_safe(boolean (*func)(struct monst *))
|
|||||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
||||||
nmons++;
|
nmons++;
|
||||||
|
|
||||||
monarr = (struct monst **)alloc(nmons * sizeof(struct monst *));
|
monarr = (struct monst **) alloc(nmons * sizeof(struct monst *));
|
||||||
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon)
|
||||||
monarr[i++] = mtmp;
|
monarr[i++] = mtmp;
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ l_obj_gc(lua_State *L)
|
|||||||
static struct _lua_obj *
|
static struct _lua_obj *
|
||||||
l_obj_push(lua_State *L, struct obj *otmp)
|
l_obj_push(lua_State *L, struct obj *otmp)
|
||||||
{
|
{
|
||||||
struct _lua_obj *lo = (struct _lua_obj *)lua_newuserdata(L, sizeof(struct _lua_obj));
|
struct _lua_obj *lo = (struct _lua_obj *) lua_newuserdata(L, sizeof(struct _lua_obj));
|
||||||
luaL_getmetatable(L, "obj");
|
luaL_getmetatable(L, "obj");
|
||||||
lua_setmetatable(L, -2);
|
lua_setmetatable(L, -2);
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ l_selection_gc(lua_State *L)
|
|||||||
static struct selectionvar *
|
static struct selectionvar *
|
||||||
l_selection_to(lua_State *L, int index)
|
l_selection_to(lua_State *L, int index)
|
||||||
{
|
{
|
||||||
struct selectionvar *sel = (struct selectionvar *)lua_touserdata(L, index);
|
struct selectionvar *sel = (struct selectionvar *) lua_touserdata(L, index);
|
||||||
|
|
||||||
if (!sel)
|
if (!sel)
|
||||||
nhl_error(L, "Selection error");
|
nhl_error(L, "Selection error");
|
||||||
|
|||||||
12
src/nhlua.c
12
src/nhlua.c
@@ -1335,7 +1335,7 @@ nhl_debug_flags(lua_State *L)
|
|||||||
/* disable monster generation */
|
/* disable monster generation */
|
||||||
val = get_table_boolean_opt(L, "mongen", -1);
|
val = get_table_boolean_opt(L, "mongen", -1);
|
||||||
if (val != -1) {
|
if (val != -1) {
|
||||||
iflags.debug_mongen = !(boolean)val; /* value in lua is negated */
|
iflags.debug_mongen = !(boolean) val; /* value in lua is negated */
|
||||||
if (iflags.debug_mongen) {
|
if (iflags.debug_mongen) {
|
||||||
register struct monst *mtmp, *mtmp2;
|
register struct monst *mtmp, *mtmp2;
|
||||||
|
|
||||||
@@ -1351,13 +1351,13 @@ nhl_debug_flags(lua_State *L)
|
|||||||
/* prevent hunger */
|
/* prevent hunger */
|
||||||
val = get_table_boolean_opt(L, "hunger", -1);
|
val = get_table_boolean_opt(L, "hunger", -1);
|
||||||
if (val != -1) {
|
if (val != -1) {
|
||||||
iflags.debug_hunger = !(boolean)val; /* value in lua is negated */
|
iflags.debug_hunger = !(boolean) val; /* value in lua is negated */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* allow overwriting stairs */
|
/* allow overwriting stairs */
|
||||||
val = get_table_boolean_opt(L, "overwrite_stairs", -1);
|
val = get_table_boolean_opt(L, "overwrite_stairs", -1);
|
||||||
if (val != -1) {
|
if (val != -1) {
|
||||||
iflags.debug_overwrite_stairs = (boolean)val;
|
iflags.debug_overwrite_stairs = (boolean) val;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1955,7 +1955,7 @@ nhl_loadlua(lua_State *L, const char *fname)
|
|||||||
* in use, and fseek(SEEK_END) only yields an upper bound on
|
* in use, and fseek(SEEK_END) only yields an upper bound on
|
||||||
* the actual amount of data in that situation.]
|
* the actual amount of data in that situation.]
|
||||||
*/
|
*/
|
||||||
if ((cnt = dlb_fread(bufin, 1, min((int)buflen, LOADCHUNKSIZE), fh)) < 0L)
|
if ((cnt = dlb_fread(bufin, 1, min((int) buflen, LOADCHUNKSIZE), fh)) < 0L)
|
||||||
break;
|
break;
|
||||||
buflen -= cnt; /* set up for next iteration, if any */
|
buflen -= cnt; /* set up for next iteration, if any */
|
||||||
if (cnt == 0L) {
|
if (cnt == 0L) {
|
||||||
@@ -2384,7 +2384,7 @@ opencheckpat(lua_State *L, const char *ename, int param)
|
|||||||
lua_pushstring(luapat, string); /* -0,+1 */
|
lua_pushstring(luapat, string); /* -0,+1 */
|
||||||
|
|
||||||
|
|
||||||
(void)lua_getfield(L, -1, ename); /* pattern -0,+1 */
|
(void) lua_getfield(L, -1, ename); /* pattern -0,+1 */
|
||||||
lua_pop(L, 1); /* -1,+0 */
|
lua_pop(L, 1); /* -1,+0 */
|
||||||
string = lua_tolstring(L, -1, NULL); /* -0,+0 */
|
string = lua_tolstring(L, -1, NULL); /* -0,+0 */
|
||||||
lua_pushstring(luapat, string); /* -0,+1 */
|
lua_pushstring(luapat, string); /* -0,+1 */
|
||||||
@@ -2511,7 +2511,7 @@ hook_open(lua_State *L)
|
|||||||
* doesn't have to work, but POSIX says it does. So it
|
* doesn't have to work, but POSIX says it does. So it
|
||||||
* _should_ work everywhere but all we can do without messing
|
* _should_ work everywhere but all we can do without messing
|
||||||
* around inside Lua is to try to keep the compiler quiet. */
|
* around inside Lua is to try to keep the compiler quiet. */
|
||||||
io_open = (int (*)(lua_State *))lua_topointer(L, -1);
|
io_open = (int (*)(lua_State *)) lua_topointer(L, -1);
|
||||||
lua_pushcfunction(L, hooked_open);
|
lua_pushcfunction(L, hooked_open);
|
||||||
lua_setfield(L, -1, "open");
|
lua_setfield(L, -1, "open");
|
||||||
rv = TRUE;
|
rv = TRUE;
|
||||||
|
|||||||
12
src/o_init.c
12
src/o_init.c
@@ -367,9 +367,9 @@ savenames(NHFILE* nhfp)
|
|||||||
|
|
||||||
if (perform_bwrite(nhfp)) {
|
if (perform_bwrite(nhfp)) {
|
||||||
if (nhfp->structlevel) {
|
if (nhfp->structlevel) {
|
||||||
bwrite(nhfp->fd, (genericptr_t)gb.bases, sizeof gb.bases);
|
bwrite(nhfp->fd, (genericptr_t) gb.bases, sizeof gb.bases);
|
||||||
bwrite(nhfp->fd, (genericptr_t)gd.disco, sizeof gd.disco);
|
bwrite(nhfp->fd, (genericptr_t) gd.disco, sizeof gd.disco);
|
||||||
bwrite(nhfp->fd, (genericptr_t)objects,
|
bwrite(nhfp->fd, (genericptr_t) objects,
|
||||||
sizeof(struct objclass) * NUM_OBJECTS);
|
sizeof(struct objclass) * NUM_OBJECTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -381,8 +381,8 @@ savenames(NHFILE* nhfp)
|
|||||||
if (perform_bwrite(nhfp)) {
|
if (perform_bwrite(nhfp)) {
|
||||||
len = Strlen(objects[i].oc_uname) + 1;
|
len = Strlen(objects[i].oc_uname) + 1;
|
||||||
if (nhfp->structlevel) {
|
if (nhfp->structlevel) {
|
||||||
bwrite(nhfp->fd, (genericptr_t)&len, sizeof len);
|
bwrite(nhfp->fd, (genericptr_t) &len, sizeof len);
|
||||||
bwrite(nhfp->fd, (genericptr_t)objects[i].oc_uname, len);
|
bwrite(nhfp->fd, (genericptr_t) objects[i].oc_uname, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (release_data(nhfp)) {
|
if (release_data(nhfp)) {
|
||||||
@@ -411,7 +411,7 @@ restnames(NHFILE* nhfp)
|
|||||||
}
|
}
|
||||||
objects[i].oc_uname = (char *) alloc(len);
|
objects[i].oc_uname = (char *) alloc(len);
|
||||||
if (nhfp->structlevel) {
|
if (nhfp->structlevel) {
|
||||||
mread(nhfp->fd, (genericptr_t)objects[i].oc_uname, len);
|
mread(nhfp->fd, (genericptr_t) objects[i].oc_uname, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ create_region(NhRect *rects, int nrect)
|
|||||||
NhRegion *reg;
|
NhRegion *reg;
|
||||||
|
|
||||||
reg = (NhRegion *) alloc(sizeof(NhRegion));
|
reg = (NhRegion *) alloc(sizeof(NhRegion));
|
||||||
(void) memset((genericptr_t)reg, 0, sizeof(NhRegion));
|
(void) memset((genericptr_t) reg, 0, sizeof(NhRegion));
|
||||||
/* Determines bounding box */
|
/* Determines bounding box */
|
||||||
if (nrect > 0) {
|
if (nrect > 0) {
|
||||||
reg->bounding_box = rects[0];
|
reg->bounding_box = rects[0];
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ rn2_on_display_rng(register int x)
|
|||||||
{
|
{
|
||||||
static unsigned seed = 1;
|
static unsigned seed = 1;
|
||||||
seed *= 2739110765;
|
seed *= 2739110765;
|
||||||
return (int)((seed >> 16) % (unsigned)x);
|
return (int) ((seed >> 16) % (unsigned) x);
|
||||||
}
|
}
|
||||||
#endif /* USE_ISAAC64 */
|
#endif /* USE_ISAAC64 */
|
||||||
|
|
||||||
|
|||||||
@@ -961,7 +961,7 @@ flip_level_rnd(int flp, boolean extras)
|
|||||||
static void
|
static void
|
||||||
sel_set_wall_property(coordxy x, coordxy y, genericptr_t arg)
|
sel_set_wall_property(coordxy x, coordxy y, genericptr_t arg)
|
||||||
{
|
{
|
||||||
int prop = *(int *)arg;
|
int prop = *(int *) arg;
|
||||||
|
|
||||||
if (IS_STWALL(levl[x][y].typ) || IS_TREE(levl[x][y].typ)
|
if (IS_STWALL(levl[x][y].typ) || IS_TREE(levl[x][y].typ)
|
||||||
/* 3.6.2: made iron bars eligible to be flagged nondiggable
|
/* 3.6.2: made iron bars eligible to be flagged nondiggable
|
||||||
@@ -984,7 +984,7 @@ set_wall_property(coordxy x1, coordxy y1, coordxy x2, coordxy y2, int prop)
|
|||||||
y2 = min(y2, ROWNO - 1);
|
y2 = min(y2, ROWNO - 1);
|
||||||
for (y = y1; y <= y2; y++)
|
for (y = y1; y <= y2; y++)
|
||||||
for (x = x1; x <= x2; x++) {
|
for (x = x1; x <= x2; x++) {
|
||||||
sel_set_wall_property(x, y, (genericptr_t)&prop);
|
sel_set_wall_property(x, y, (genericptr_t) &prop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6112,7 +6112,7 @@ lspo_exclusion(lua_State *L)
|
|||||||
static void
|
static void
|
||||||
sel_set_lit(coordxy x, coordxy y, genericptr_t arg)
|
sel_set_lit(coordxy x, coordxy y, genericptr_t arg)
|
||||||
{
|
{
|
||||||
int lit = *(int *)arg;
|
int lit = *(int *) arg;
|
||||||
|
|
||||||
levl[x][y].lit = (levl[x][y].typ == LAVAPOOL) ? 1 : lit;
|
levl[x][y].lit = (levl[x][y].typ == LAVAPOOL) ? 1 : lit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2315,7 +2315,7 @@ write_timer(NHFILE* nhfp, timer_element* timer)
|
|||||||
case TIMER_OBJECT:
|
case TIMER_OBJECT:
|
||||||
if (timer->needs_fixup) {
|
if (timer->needs_fixup) {
|
||||||
if (nhfp->structlevel)
|
if (nhfp->structlevel)
|
||||||
bwrite(nhfp->fd, (genericptr_t)timer, sizeof(timer_element));
|
bwrite(nhfp->fd, (genericptr_t) timer, sizeof(timer_element));
|
||||||
} else {
|
} else {
|
||||||
/* replace object pointer with id */
|
/* replace object pointer with id */
|
||||||
arg_save.a_obj = timer->arg.a_obj;
|
arg_save.a_obj = timer->arg.a_obj;
|
||||||
@@ -2323,7 +2323,7 @@ write_timer(NHFILE* nhfp, timer_element* timer)
|
|||||||
timer->arg.a_uint = (arg_save.a_obj)->o_id;
|
timer->arg.a_uint = (arg_save.a_obj)->o_id;
|
||||||
timer->needs_fixup = 1;
|
timer->needs_fixup = 1;
|
||||||
if (nhfp->structlevel)
|
if (nhfp->structlevel)
|
||||||
bwrite(nhfp->fd, (genericptr_t)timer, sizeof(timer_element));
|
bwrite(nhfp->fd, (genericptr_t) timer, sizeof(timer_element));
|
||||||
timer->arg.a_obj = arg_save.a_obj;
|
timer->arg.a_obj = arg_save.a_obj;
|
||||||
timer->needs_fixup = 0;
|
timer->needs_fixup = 0;
|
||||||
}
|
}
|
||||||
@@ -2332,7 +2332,7 @@ write_timer(NHFILE* nhfp, timer_element* timer)
|
|||||||
case TIMER_MONSTER:
|
case TIMER_MONSTER:
|
||||||
if (timer->needs_fixup) {
|
if (timer->needs_fixup) {
|
||||||
if (nhfp->structlevel)
|
if (nhfp->structlevel)
|
||||||
bwrite(nhfp->fd, (genericptr_t)timer, sizeof(timer_element));
|
bwrite(nhfp->fd, (genericptr_t) timer, sizeof(timer_element));
|
||||||
} else {
|
} else {
|
||||||
/* replace monster pointer with id */
|
/* replace monster pointer with id */
|
||||||
arg_save.a_monst = timer->arg.a_monst;
|
arg_save.a_monst = timer->arg.a_monst;
|
||||||
@@ -2340,7 +2340,7 @@ write_timer(NHFILE* nhfp, timer_element* timer)
|
|||||||
timer->arg.a_uint = (arg_save.a_monst)->m_id;
|
timer->arg.a_uint = (arg_save.a_monst)->m_id;
|
||||||
timer->needs_fixup = 1;
|
timer->needs_fixup = 1;
|
||||||
if (nhfp->structlevel)
|
if (nhfp->structlevel)
|
||||||
bwrite(nhfp->fd, (genericptr_t)timer, sizeof(timer_element));
|
bwrite(nhfp->fd, (genericptr_t) timer, sizeof(timer_element));
|
||||||
timer->arg.a_monst = arg_save.a_monst;
|
timer->arg.a_monst = arg_save.a_monst;
|
||||||
timer->needs_fixup = 0;
|
timer->needs_fixup = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -483,7 +483,7 @@ maketrap(coordxy x, coordxy y, int typ)
|
|||||||
} else {
|
} else {
|
||||||
oldplace = FALSE;
|
oldplace = FALSE;
|
||||||
ttmp = newtrap();
|
ttmp = newtrap();
|
||||||
(void) memset((genericptr_t)ttmp, 0, sizeof(struct trap));
|
(void) memset((genericptr_t) ttmp, 0, sizeof(struct trap));
|
||||||
ttmp->ntrap = 0;
|
ttmp->ntrap = 0;
|
||||||
ttmp->tx = x;
|
ttmp->tx = x;
|
||||||
ttmp->ty = y;
|
ttmp->ty = y;
|
||||||
|
|||||||
Reference in New Issue
Block a user