mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- Fixed: D_ReadUserInfoString() parsed the final element of a compact string
as the empty string. Since that was the player class, this meant that any games with more than one class would pick a random class in multiplayer. - Fixed: FCanvasTexture::RenderView() should not have color 0 in its output. SVN r735 (trunk)
This commit is contained in:
parent
22df389ad7
commit
0bb9fc1e2d
7 changed files with 15 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
|||
February 8, 2008
|
||||
- Fixed: D_ReadUserInfoString() parsed the final element of a compact string
|
||||
as the empty string. Since that was the player class, this meant that any
|
||||
games with more than one class would pick a random class in multiplayer.
|
||||
- Fixed: FCanvasTexture::RenderView() should not have color 0 in its output.
|
||||
|
||||
February 5, 2008
|
||||
- Updated the GCC-targeted makefiles to turn off two optimizations that cause
|
||||
fmopl.cpp to compile incorrectly: tree-dominator-opts and tree-fre
|
||||
|
|
|
@ -642,7 +642,7 @@ void D_ReadUserInfoStrings (int i, BYTE **stream, bool update)
|
|||
|
||||
if (compact)
|
||||
{
|
||||
value = D_UnescapeUserInfo(ptr, breakpt - ptr);
|
||||
value = D_UnescapeUserInfo(ptr, breakpt != NULL ? breakpt - ptr : strlen(ptr));
|
||||
infotype++;
|
||||
}
|
||||
else
|
||||
|
@ -676,7 +676,6 @@ void D_ReadUserInfoStrings (int i, BYTE **stream, bool update)
|
|||
infotype = j;
|
||||
}
|
||||
}
|
||||
|
||||
switch (infotype)
|
||||
{
|
||||
case INFO_Autoaim: {
|
||||
|
@ -749,7 +748,7 @@ void D_ReadUserInfoStrings (int i, BYTE **stream, bool update)
|
|||
break;
|
||||
|
||||
case INFO_NeverSwitchOnPickup:
|
||||
if (*value >= '0' && *value <= '9')
|
||||
if (value[0] >= '0' && value[0] <= '9')
|
||||
{
|
||||
info->neverswitch = atoi (value) ? true : false;
|
||||
}
|
||||
|
|
|
@ -741,7 +741,7 @@ protected:
|
|||
static void FlipSquareBlock (BYTE *block, int x, int y);
|
||||
static void FlipSquareBlockRemap (BYTE *block, int x, int y, const BYTE *remap);
|
||||
static void FlipNonSquareBlock (BYTE *blockto, const BYTE *blockfrom, int x, int y, int srcpitch);
|
||||
static void FlipNonSquareBlockRemap (BYTE *blockto, const BYTE *blockfrom, int x, int y, const BYTE *remap);
|
||||
static void FlipNonSquareBlockRemap (BYTE *blockto, const BYTE *blockfrom, int x, int y, int srcpitch, const BYTE *remap);
|
||||
|
||||
friend class D3DTex;
|
||||
};
|
||||
|
|
|
@ -154,11 +154,11 @@ void FCanvasTexture::RenderView (AActor *viewpoint, int fov)
|
|||
R_SetFOV (savedfov);
|
||||
if (Pixels == Canvas->GetBuffer())
|
||||
{
|
||||
FlipSquareBlock (Pixels, Width, Height);
|
||||
FlipSquareBlockRemap (Pixels, Width, Height, GPalette.Remap);
|
||||
}
|
||||
else
|
||||
{
|
||||
FlipNonSquareBlock (Pixels, Canvas->GetBuffer(), Width, Height, Canvas->GetPitch());
|
||||
FlipNonSquareBlockRemap (Pixels, Canvas->GetBuffer(), Width, Height, Canvas->GetPitch(), GPalette.Remap);
|
||||
}
|
||||
bNeedsUpdate = false;
|
||||
bDidUpdate = true;
|
||||
|
|
|
@ -387,7 +387,7 @@ void FPCXTexture::MakeTexture()
|
|||
else
|
||||
{
|
||||
BYTE *newpix = new BYTE[Width*Height];
|
||||
FlipNonSquareBlockRemap (newpix, Pixels, Width, Height, PaletteMap);
|
||||
FlipNonSquareBlockRemap (newpix, Pixels, Width, Height, Width, PaletteMap);
|
||||
BYTE *oldpix = Pixels;
|
||||
Pixels = newpix;
|
||||
delete[] oldpix;
|
||||
|
|
|
@ -391,7 +391,7 @@ void FPNGTexture::MakeTexture ()
|
|||
BYTE *newpix = new BYTE[Width*Height];
|
||||
if (PaletteMap != NULL)
|
||||
{
|
||||
FlipNonSquareBlockRemap (newpix, Pixels, Width, Height, PaletteMap);
|
||||
FlipNonSquareBlockRemap (newpix, Pixels, Width, Height, Width, PaletteMap);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -393,7 +393,7 @@ void FTexture::FlipNonSquareBlock (BYTE *dst, const BYTE *src, int x, int y, int
|
|||
}
|
||||
}
|
||||
|
||||
void FTexture::FlipNonSquareBlockRemap (BYTE *dst, const BYTE *src, int x, int y, const BYTE *remap)
|
||||
void FTexture::FlipNonSquareBlockRemap (BYTE *dst, const BYTE *src, int x, int y, int srcpitch, const BYTE *remap)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
@ -401,7 +401,7 @@ void FTexture::FlipNonSquareBlockRemap (BYTE *dst, const BYTE *src, int x, int y
|
|||
{
|
||||
for (j = 0; j < y; ++j)
|
||||
{
|
||||
dst[i*y+j] = remap[src[i+j*x]];
|
||||
dst[i*y+j] = remap[src[i+j*srcpitch]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue