mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Add extra field to tilefromtexture
# Conflicts: # source/build/src/defs.cpp
This commit is contained in:
parent
ce43103ae9
commit
a90711f328
1 changed files with 13 additions and 1 deletions
|
@ -123,6 +123,7 @@ enum scripttoken_t
|
||||||
T_SHADEFACTOR,
|
T_SHADEFACTOR,
|
||||||
T_RFFDEFINEID,
|
T_RFFDEFINEID,
|
||||||
T_IFCRC,
|
T_IFCRC,
|
||||||
|
T_EXTRA,
|
||||||
T_NEWGAMECHOICES,
|
T_NEWGAMECHOICES,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -796,10 +797,11 @@ static int32_t defsparser(scriptfile *script)
|
||||||
char *texturetokptr = script->ltextptr, *textureend, *fn = NULL;
|
char *texturetokptr = script->ltextptr, *textureend, *fn = NULL;
|
||||||
int32_t tile = -1;
|
int32_t tile = -1;
|
||||||
int32_t alphacut = 255, flags = 0;
|
int32_t alphacut = 255, flags = 0;
|
||||||
int32_t havexoffset = 0, haveyoffset = 0;
|
int32_t havexoffset = 0, haveyoffset = 0, haveextra = 0;
|
||||||
int32_t xoffset = 0, yoffset = 0;
|
int32_t xoffset = 0, yoffset = 0;
|
||||||
int32_t istexture = 0;
|
int32_t istexture = 0;
|
||||||
int32_t tilecrc = 0, origcrc = 0;
|
int32_t tilecrc = 0, origcrc = 0;
|
||||||
|
int32_t extra = 0;
|
||||||
|
|
||||||
static const tokenlist tilefromtexturetokens[] =
|
static const tokenlist tilefromtexturetokens[] =
|
||||||
{
|
{
|
||||||
|
@ -814,6 +816,7 @@ static int32_t defsparser(scriptfile *script)
|
||||||
{ "nofullbright", T_NOFULLBRIGHT },
|
{ "nofullbright", T_NOFULLBRIGHT },
|
||||||
{ "texture", T_TEXTURE },
|
{ "texture", T_TEXTURE },
|
||||||
{ "ifcrc", T_IFCRC },
|
{ "ifcrc", T_IFCRC },
|
||||||
|
{ "extra", T_EXTRA },
|
||||||
};
|
};
|
||||||
|
|
||||||
if (scriptfile_getsymbol(script,&tile)) break;
|
if (scriptfile_getsymbol(script,&tile)) break;
|
||||||
|
@ -852,6 +855,10 @@ static int32_t defsparser(scriptfile *script)
|
||||||
case T_TEXTURE:
|
case T_TEXTURE:
|
||||||
istexture = 1;
|
istexture = 1;
|
||||||
break;
|
break;
|
||||||
|
case T_EXTRA:
|
||||||
|
haveextra = 1;
|
||||||
|
scriptfile_getsymbol(script, &extra);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -882,6 +889,8 @@ static int32_t defsparser(scriptfile *script)
|
||||||
picanm[tile].xofs = xoffset;
|
picanm[tile].xofs = xoffset;
|
||||||
if (haveyoffset)
|
if (haveyoffset)
|
||||||
picanm[tile].yofs = yoffset;
|
picanm[tile].yofs = yoffset;
|
||||||
|
if (haveextra)
|
||||||
|
picanm[tile].extra = extra;
|
||||||
|
|
||||||
if (EDUKE32_PREDICT_FALSE(flags == 0 && !havexoffset && !haveyoffset))
|
if (EDUKE32_PREDICT_FALSE(flags == 0 && !havexoffset && !haveyoffset))
|
||||||
initprintf("\nError: missing 'file name' for tilefromtexture definition near line %s:%d",
|
initprintf("\nError: missing 'file name' for tilefromtexture definition near line %s:%d",
|
||||||
|
@ -910,6 +919,9 @@ static int32_t defsparser(scriptfile *script)
|
||||||
picanm[tile].yofs = yoffset;
|
picanm[tile].yofs = yoffset;
|
||||||
else if (texstatus == 0)
|
else if (texstatus == 0)
|
||||||
picanm[tile].yofs = 0;
|
picanm[tile].yofs = 0;
|
||||||
|
|
||||||
|
if (haveextra)
|
||||||
|
picanm[tile].extra = extra;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case T_COPYTILE:
|
case T_COPYTILE:
|
||||||
|
|
Loading…
Reference in a new issue