}
else
{
maptex2 = NULL; numtextures2 = 0; maxoff2 = 0;
}
numtextures = numtextures1 + numtextures2;
textures = Z_Malloc (numtextures*4, PU_STATIC, 0); texturecolumnlump = Z_Malloc (numtextures*4, PU_STATIC, 0); texturecolumnofs = Z_Malloc (numtextures*4, PU_STATIC, 0); texturecomposite = Z_Malloc (numtextures*4, PU_STATIC, 0); texturecompositesize = Z_Malloc (numtextures*4, PU_STATIC, 0); texturewidthmask = Z_Malloc (numtextures*4, PU_STATIC, 0); textureheight = Z_Malloc (numtextures*4, PU_STATIC, 0);
totalwidth = 0;
//Really complex printing shit...
temp1 = W_GetNumForName ("S_START"); // P_???????
temp2 = W_GetNumForName ("S_END") - 1;
temp3 = ((temp2-temp1+63)/64) + ((numtextures+63)/64); printf("[");
for (i = 0; i < temp3; i++)
printf(" ");
printf(" |
]"); |
for (i = |
0; i < temp3; i++) |
printf("\x8");
printf("\x8\x8\x8\x8\x8\x8\x8\x8\x8\x8");
for (i=0 ; i<numtextures ; i++, directory++)
{
if (!(i&63)) printf (".");
if (i == numtextures1)
{
// Start looking in second texture file. maptex = maptex2;
maxoff = maxoff2; directory = maptex+1;
}
offset = LONG(*directory);
if (offset > maxoff)
I_Error ("R_InitTextures: bad texture directory");
mtexture = (maptexture_t *) ( (byte *)maptex + offset);
texture = textures[i] = Z_Malloc (sizeof(texture_t)
+ sizeof(texpatch_t)*(SHORT(mtexture->patchcount)-1), PU_STATIC, 0);
texture->width = SHORT(mtexture->width); texture->height = SHORT(mtexture->height); texture->patchcount = SHORT(mtexture->patchcount);
memcpy (texture->name, mtexture->name, sizeof(texture->name)); mpatch = &mtexture->patches[0];
patch = &texture->patches[0];
for (j=0 ; j<texture->patchcount ; j++, mpatch++, patch++)