- Removed -fno-strict-aliasing from the GCC flags for ZDoom and fixed the

issues that caused its inclusion. Is an optimized GCC build any faster
  for being able to use strict aliasing rules? I dunno. It's still slower
  than a VC++ build.
  
  I did run into two cases where TAutoSegIterator caused intractable problems
  with breaking strict aliasing rules, so I removed the templating from it,
  and the caller is now responsible for casting the probe value from void *.
- Removed #include "autosegs.h" from several files that did not need it
  (in particular, dobject.h when not compiling with VC++).


SVN r1743 (trunk)
This commit is contained in:
Randy Heit 2009-08-02 03:38:57 +00:00
commit 93202a5488
35 changed files with 298 additions and 189 deletions

View file

@ -345,9 +345,9 @@ void R_InitSpriteDefs ()
for (i = 0; i < max; ++i)
{
FTexture *tex = TexMan.ByIndex(i);
if (tex->UseType == FTexture::TEX_Sprite && strlen (tex->Name) >= 6)
if (tex->UseType == FTexture::TEX_Sprite && strlen(tex->Name) >= 6)
{
DWORD bucket = *(DWORD *)tex->Name % max;
DWORD bucket = tex->dwName % max;
hashes[i].Next = hashes[bucket].Head;
hashes[bucket].Head = i;
}
@ -363,14 +363,14 @@ void R_InitSpriteDefs ()
}
maxframe = -1;
intname = *(DWORD *)sprites[i].name;
intname = sprites[i].dwName;
// scan the lumps, filling in the frames for whatever is found
int hash = hashes[intname % max].Head;
while (hash != -1)
{
FTexture *tex = TexMan[hash];
if (*(DWORD *)tex->Name == intname)
if (tex->dwName == intname)
{
R_InstallSpriteLump (FTextureID(hash), tex->Name[4] - 'A', tex->Name[5], false);
@ -673,7 +673,7 @@ void R_InitSkins (void)
{
char name[9];
Wads.GetLumpName (name, base+1);
intname = *(DWORD *)name;
memcpy(&intname, name, 4);
}
int basens = Wads.GetLumpNamespace(base);
@ -703,8 +703,10 @@ void R_InitSkins (void)
for (k = base + 1; Wads.GetLumpNamespace(k) == basens; k++)
{
char lname[9];
DWORD lnameint;
Wads.GetLumpName (lname, k);
if (*(DWORD *)lname == intname)
memcpy(&lnameint, lname, 4);
if (lnameint == intname)
{
FTextureID picnum = TexMan.CreateTexture(k, FTexture::TEX_SkinSprite);
R_InstallSpriteLump (picnum, lname[4] - 'A', lname[5], false);