Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 298 → Rev 333

/programs/games/doom/trunk/r_data.c
27,19 → 27,11
static const char
rcsid[] = "$Id: r_data.c,v 1.4 1997/02/03 16:47:55 b1 Exp $";
 
#ifdef __BEOS__
#ifdef __GNUC__
extern void *alloca(int);
#else
#include <alloca.h>
#endif
#endif /* __BEOS__ */
#include "i_system.h"
#include "z_zone.h"
 
#include "m_swap.h"
 
#include "i_system.h"
#include "z_zone.h"
 
#include "w_wad.h"
 
#include "doomdef.h"
49,8 → 41,11
#include "doomstat.h"
#include "r_sky.h"
 
#include <malloc.h>
 
 
#include "r_data.h"
#include <malloc.h>
 
//
// Graphics.
// DOOM graphics for walls and sprites
122,7 → 117,7
// All the patches[patchcount]
// are drawn back to front into the cached texture.
short patchcount;
short int patchcount;
texpatch_t patches[1];
} texture_t;
291,6 → 286,8
Z_ChangeTag (block, PU_CACHE);
}
 
 
 
//
// R_GenerateLookup
//
531,17 → 528,7
texture->height = SHORT(mtexture->height);
texture->patchcount = SHORT(mtexture->patchcount);
 
// memcpy() generates a BUS error on Solaris with optimization on */
#if 1
memcpy (texture->name, mtexture->name, sizeof(texture->name));
#else
{ char *src; char *dst;
src = (char *)mtexture->name;
dst = (char *)texture->name;
for (j=0; j<sizeof(texture->name); ++j )
*dst++ = *src++;
}
#endif
mpatch = &mtexture->patches[0];
patch = &texture->patches[0];
 
665,13 → 652,13
void R_InitData (void)
{
R_InitTextures ();
printf ("\nInitTextures");
printf ("InitTextures\n\r");
R_InitFlats ();
printf ("\nInitFlats");
printf ("InitFlats\n\r");
R_InitSpriteLumps ();
printf ("\nInitSprites");
printf ("InitSprites\n\r");
R_InitColormaps ();
printf ("\nInitColormaps");
printf ("InitColormaps\n\r");
}
 
 
713,14 → 700,12
return 0;
for (i=0 ; i<numtextures ; i++)
if (!I_strncasecmp (textures[i]->name, name, 8) )
if (!strnicmp (textures[i]->name, name, 8) )
return i;
return -1;
}
 
 
 
//
// R_TextureNumForName
// Calls R_CheckTextureNumForName,