- Turned on warning level 4 just to see what it would produce: a lot of

warnings. At first, I was going to try and clean them all up. Then I decided
  that was a worthless cause and went about just acting on the ones that
  might actually be helpful:
   C4189 (local variable is initialized but not referenced)
   C4702 (unreachable code)
   C4512 (assignment operator could not be generated)


SVN r420 (trunk)
This commit is contained in:
Randy Heit 2006-12-21 04:34:43 +00:00
commit e1bd63e876
47 changed files with 131 additions and 128 deletions

View file

@ -211,7 +211,7 @@ D3DFB::D3DFB (int width, int height, bool fullscreen)
for (i = 0; i < 256; i++)
{
GammaTable[i] = i;
GammaTable[i] = (BYTE)i;
}
memcpy (SourcePalette, GPalette.BaseColors, sizeof(PalEntry)*256);
@ -439,9 +439,9 @@ void D3DFB::DoOffByOneCheck ()
{
for (i = 0; i < 256; ++i)
{
Pal32[i][0] = (i & 0x03) << 6; // blue
Pal32[i][1] = (i & 0x1C) << 3; // green
Pal32[i][2] = (i & 0xE0); // red;
Pal32[i][0] = BYTE(i & 0x03) << 6; // blue
Pal32[i][1] = BYTE(i & 0x1C) << 3; // green
Pal32[i][2] = BYTE(i & 0xE0); // red;
Pal32[i][3] = 255;
}
}
@ -449,9 +449,9 @@ void D3DFB::DoOffByOneCheck ()
{
for (i = 0; i < 256; ++i)
{
Pal16[i] = ((i & 0xE0) << 8) | // red
((i & 0x1C) << 6) | // green
((i & 0x03) << 3); // blue
Pal16[i] = WORD((i & 0xE0) << 8) | // red
((i & 0x1C) << 6) | // green
((i & 0x03) << 3); // blue
}
}
// Upload the palette
@ -469,7 +469,7 @@ void D3DFB::DoOffByOneCheck ()
{
for (i = 0; i < 256; ++i)
{
((BYTE *)lockrect.pBits)[i] = i;
((BYTE *)lockrect.pBits)[i] = (BYTE)i;
}
FBTexture->UnlockRect (0);
}
@ -713,10 +713,6 @@ void D3DFB::Unlock ()
void D3DFB::Update ()
{
bool pchanged = false;
LOG3 ("Update <%d,%c:%d>\n", LockCount, AppActive?'Y':'N', SessionState);
if (LockCount != 1)
{
//I_FatalError ("Framebuffer must have exactly 1 lock to be updated");