- set this to a small value like 0.1 to emphasize the reflection and make\r
the water transparent; but if r_water is 0, alpha isn't used, so the water can\r
be very visible then too.\r
+- tcmod page <width> <height> <delay>\r
+ The texture is shifted by 1/<width> every <delay> seconds, and by 1/<height>\r
+ every <delay>*<width> seconds. It is some sort of animmap replacement that keeps\r
+ all animation frames in a single texture.\r
+ To use it, make a texture with the frames aligned in a grid like this:\r
+ 1 2 3 4\r
+ 5 6 7 8\r
+ then align it in Radiant so only one of the animation frames can be seen on\r
+ the surface, and specify "tcmod page 4 2 0.1". DP will then display the frames\r
+ in order and the cycle will repeat every 0.8 seconds.\r
void R_UpdateTextureInfo(const entity_render_t *ent, texture_t *t)
{
+ int w, h, idx;
int i;
dp_model_t *model = ent->model;
float f;
case Q3TCMOD_SCROLL:
Matrix4x4_CreateTranslate(&matrix, tcmod->parms[0] * r_refdef.scene.time, tcmod->parms[1] * r_refdef.scene.time, 0);
break;
+ case Q3TCMOD_PAGE: // poor man's animmap (to store animations into a single file, useful for HTTP downloaded textures)
+ w = tcmod->parms[0];
+ h = tcmod->parms[1];
+ f = r_refdef.scene.time / (tcmod->parms[2] * w * h);
+ f = f - floor(f);
+ idx = floor(f * w * h);
+ Matrix4x4_CreateTranslate(&matrix, (idx % w) / tcmod->parms[0], (idx / w) / tcmod->parms[1], 0);
+ break;
case Q3TCMOD_STRETCH:
f = 1.0f / R_EvaluateQ3WaveFunc(tcmod->wavefunc, tcmod->waveparms);
Matrix4x4_CreateFromQuakeEntity(&matrix, 0.5f * (1 - f), 0.5 * (1 - f), 0, 0, 0, 0, f);
else if (!strcasecmp(parameter[1], "rotate")) layer->tcmods[tcmodindex].tcmod = Q3TCMOD_ROTATE;
else if (!strcasecmp(parameter[1], "scale")) layer->tcmods[tcmodindex].tcmod = Q3TCMOD_SCALE;
else if (!strcasecmp(parameter[1], "scroll")) layer->tcmods[tcmodindex].tcmod = Q3TCMOD_SCROLL;
+ else if (!strcasecmp(parameter[1], "page")) layer->tcmods[tcmodindex].tcmod = Q3TCMOD_PAGE;
else if (!strcasecmp(parameter[1], "stretch"))
{
layer->tcmods[tcmodindex].tcmod = Q3TCMOD_STRETCH;
Q3TCMOD_STRETCH,
Q3TCMOD_TRANSFORM,
Q3TCMOD_TURBULENT,
+ Q3TCMOD_PAGE,
Q3TCMOD_COUNT
}
q3tcmod_t;