mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
defs.c: in check_tile(), pass 'tile' by value.
git-svn-id: https://svn.eduke32.com/eduke32@4186 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
67c1157b64
commit
4d8071e6b3
1 changed files with 7 additions and 7 deletions
|
@ -156,10 +156,10 @@ static int32_t check_tile_range(const char *defcmd, int32_t *tilebeg, int32_t *t
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t check_tile(const char *defcmd, int32_t *tile, const scriptfile *script,
|
static int32_t check_tile(const char *defcmd, int32_t tile, const scriptfile *script,
|
||||||
const char *cmdtokptr)
|
const char *cmdtokptr)
|
||||||
{
|
{
|
||||||
if ((unsigned)*tile >= MAXTILES)
|
if ((unsigned)tile >= MAXTILES)
|
||||||
{
|
{
|
||||||
initprintf("Error: %s: Invalid tile number on line %s:%d\n", defcmd,
|
initprintf("Error: %s: Invalid tile number on line %s:%d\n", defcmd,
|
||||||
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
script->filename, scriptfile_getlinum(script,cmdtokptr));
|
||||||
|
@ -655,7 +655,7 @@ static int32_t defsparser(scriptfile *script)
|
||||||
if (xsiz <= 0 || ysiz <= 0) // XXX: kpzload isn't robust against that!
|
if (xsiz <= 0 || ysiz <= 0) // XXX: kpzload isn't robust against that!
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (check_tile("importtile", &tile, script, cmdtokptr))
|
if (check_tile("importtile", tile, script, cmdtokptr))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
set_tilesiz(tile, xsiz, ysiz);
|
set_tilesiz(tile, xsiz, ysiz);
|
||||||
|
@ -1401,7 +1401,7 @@ static int32_t defsparser(scriptfile *script)
|
||||||
case T_TILE:
|
case T_TILE:
|
||||||
scriptfile_getsymbol(script,&tilex);
|
scriptfile_getsymbol(script,&tilex);
|
||||||
|
|
||||||
if (check_tile("voxel", &tilex, script, voxeltokptr))
|
if (check_tile("voxel", tilex, script, voxeltokptr))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
tiletovox[tilex] = lastvoxid;
|
tiletovox[tilex] = lastvoxid;
|
||||||
|
@ -1949,7 +1949,7 @@ static int32_t defsparser(scriptfile *script)
|
||||||
{
|
{
|
||||||
r1 = r0;
|
r1 = r0;
|
||||||
|
|
||||||
if (check_tile("undefmodel", &r0, script, cmdtokptr))
|
if (check_tile("undefmodel", r0, script, cmdtokptr))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
|
@ -1968,7 +1968,7 @@ static int32_t defsparser(scriptfile *script)
|
||||||
|
|
||||||
if (scriptfile_getsymbol(script,&r0)) break;
|
if (scriptfile_getsymbol(script,&r0)) break;
|
||||||
|
|
||||||
if (check_tile("undefmodelof", &r0, script, cmdtokptr))
|
if (check_tile("undefmodelof", r0, script, cmdtokptr))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// XXX: See comment of md_undefinemodel()
|
// XXX: See comment of md_undefinemodel()
|
||||||
|
@ -2004,7 +2004,7 @@ static int32_t defsparser(scriptfile *script)
|
||||||
{
|
{
|
||||||
r1 = r0;
|
r1 = r0;
|
||||||
|
|
||||||
if (check_tile("undeftexture", &r0, script, cmdtokptr))
|
if (check_tile("undeftexture", r0, script, cmdtokptr))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue