mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-14 16:31:38 +00:00
Add the n64 texinfo flags from the q2 remaster.
This commit is contained in:
parent
f4330d765d
commit
9c96ab9b31
5 changed files with 29 additions and 2 deletions
|
@ -649,6 +649,12 @@ typedef struct
|
|||
//#define TI_KINGPIN_WNDW33 0x4000
|
||||
//#define TI_KINGPIN_WNDW64 0x8000
|
||||
|
||||
#define TI_Q2EX_ALPHATEST (1u<<25)
|
||||
#define TI_N64_UV (1u<<28)
|
||||
#define TI_N64_SCROLL_X (1u<<29)
|
||||
#define TI_N64_SCROLL_Y (1u<<30)
|
||||
#define TI_N64_SCROLL_FLIP (1u<<31)
|
||||
|
||||
//Surface flags
|
||||
//#define Q3SURFACEFLAG_NODAMAGE 0x1 // never give falling damage
|
||||
//#define Q3SURFACEFLAG_SLICK 0x2 // effects game physics
|
||||
|
|
|
@ -1428,7 +1428,7 @@ static texture_t *Mod_LoadWall(model_t *loadmodel, char *mapname, char *texname,
|
|||
if (wal->offsets[0])
|
||||
base = R_LoadReplacementTexture(wal->name, "bmodels", imageflags, (qbyte *)wal+wal->offsets[0], wal->width, wal->height, TF_SOLID8);
|
||||
else
|
||||
base = R_LoadReplacementTexture(wal->name, "bmodels", imageflags, NULL, 0, 0, TF_INVALID);
|
||||
base = R_LoadHiResTexture(wal->name, "bmodels", imageflags);
|
||||
}
|
||||
else
|
||||
base = NULL;
|
||||
|
@ -1529,11 +1529,20 @@ static qboolean CModQ2_LoadTexInfo (model_t *mod, qbyte *mod_base, lump_t *l, ch
|
|||
Q_strncatz(sname, "#WARP", sizeof(sname));
|
||||
if (out->flags & TI_FLOWING)
|
||||
Q_strncatz(sname, "#FLOW", sizeof(sname));
|
||||
if (out->flags & (TI_N64_SCROLL_X | TI_N64_SCROLL_Y | TI_N64_SCROLL_FLIP))
|
||||
{
|
||||
Q_snprintfz(sname+strlen(sname), sizeof(sname)-strlen(sname), "#FLOWV=%s%s,%s%s",
|
||||
(out->flags&TI_N64_SCROLL_FLIP)?"":"-",
|
||||
(out->flags&TI_N64_SCROLL_X)?"1.0":"0.0",
|
||||
(out->flags&TI_N64_SCROLL_FLIP)?"-":"",
|
||||
(out->flags&TI_N64_SCROLL_Y)?"1.0":"0.0"
|
||||
);
|
||||
}
|
||||
if (out->flags & TI_TRANS66)
|
||||
Q_strncatz(sname, "#ALPHA=0.66", sizeof(sname));
|
||||
else if (out->flags & TI_TRANS33)
|
||||
Q_strncatz(sname, "#ALPHA=0.33", sizeof(sname));
|
||||
else if (out->flags & TI_KINGPIN_ALPHATEST) //kingpin...
|
||||
else if (out->flags & (TI_KINGPIN_ALPHATEST|TI_Q2EX_ALPHATEST)) //kingpin...
|
||||
Q_strncatz(sname, "#MASK=0.666#MASKLT", sizeof(sname));
|
||||
else if (out->flags & (TI_WARP))
|
||||
Q_strncatz(sname, "#ALPHA=1", sizeof(sname));
|
||||
|
|
|
@ -2556,6 +2556,12 @@ void ModQ1_Batches_BuildQ1Q2Poly(model_t *mod, msurface_t *surf, builddata_t *co
|
|||
mesh->st_array[i][0] /= surf->texinfo->texture->vwidth;
|
||||
if (surf->texinfo->texture->vheight)
|
||||
mesh->st_array[i][1] /= surf->texinfo->texture->vheight;
|
||||
|
||||
if (surf->texinfo->flags & TI_N64_UV)
|
||||
{
|
||||
mesh->st_array[i][0] /= 2;
|
||||
mesh->st_array[i][1] /= 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (flmv)
|
||||
|
|
|
@ -78,6 +78,9 @@ void main ()
|
|||
invsurface = mat3(v_svector, v_tvector, v_normal);
|
||||
#endif
|
||||
tc = v_texcoord;
|
||||
#ifdef FLOWV
|
||||
tc.st += e_time * vec2(FLOWV);
|
||||
#endif
|
||||
#ifdef FLOW
|
||||
tc.s += e_time * -0.5;
|
||||
#endif
|
||||
|
|
|
@ -17,6 +17,9 @@ varying vec2 lm0;
|
|||
void main ()
|
||||
{
|
||||
tc = v_texcoord.st;
|
||||
#ifdef FLOWV
|
||||
tc.st += e_time * vec2(FLOWV);
|
||||
#endif
|
||||
#ifdef FLOW
|
||||
tc.s += e_time * -0.5;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue