* Updated to ZDoom r3636:

- Move player prediction calls into D_Display(). [Undid r1387-1388 as a consequence.]
- Changed FMultiPatchTexture::CopyTrueColorPixels() so that all parts use their copy info. Previously, "complex" parts would ignore it and use the copy info passed to the function instead. The copy info passed to the function is now only used to decide to if it should clear the destination image. I'm not sure if this really matters, since it itself is the only place aside from FTexture::FillBuffer() that ever calls CopyTrueColorPixels() with a copy info, and when it does so for a multipatch texture, it does so to a temporary buffer.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1390 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
gez 2012-05-10 22:08:33 +00:00
parent 1189fccae3
commit d1abf56649
6 changed files with 35 additions and 39 deletions

View file

@ -106,6 +106,7 @@
#include "po_man.h"
#include "resourcefiles/resourcefile.h"
#include "r_renderer.h"
#include "p_local.h"
#ifdef USE_POLYMOST
#include "r_polymost.h"
@ -773,7 +774,9 @@ void D_Display ()
screen->SetBlendingRect(viewwindowx, viewwindowy,
viewwindowx + viewwidth, viewwindowy + viewheight);
P_CheckPlayerSprites();
P_PredictPlayer(&players[consoleplayer]);
Renderer->RenderView(&players[consoleplayer]);
P_UnPredictPlayer();
if ((hw2d = screen->Begin2D(viewactive)))
{
// Redraw everything every frame when using 2D accel

View file

@ -886,7 +886,6 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo
gl_frameCount++; // This counter must be increased right before the interpolations are restored.
interpolator.RestoreInterpolations ();
P_UnPredictPlayer();
return retval;
}

View file

@ -34,7 +34,6 @@
#include "doomstat.h"
#include "m_random.h"
#include "m_bbox.h"
#include "p_local.h"
#include "r_local.h"
#include "r_plane.h"
#include "r_bsp.h"
@ -861,7 +860,6 @@ void R_RenderActorView (AActor *actor, bool dontmaplines)
}
WallMirrors.Clear ();
interpolator.RestoreInterpolations ();
P_UnPredictPlayer();
R_SetupBuffer ();
// If we don't want shadered colormaps, NULL it now so that the

View file

@ -744,10 +744,6 @@ void R_SetupFrame (AActor *actor)
{
camera = player->camera = player->mo;
}
if (camera == actor)
{
P_PredictPlayer (player);
}
}
else
{

View file

@ -3,5 +3,5 @@
// This file was automatically generated by the
// updaterevision tool. Do not edit by hand.
#define ZD_SVN_REVISION_STRING "3633"
#define ZD_SVN_REVISION_NUMBER 3633
#define ZD_SVN_REVISION_STRING "3636"
#define ZD_SVN_REVISION_NUMBER 3636

View file

@ -573,19 +573,10 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rota
// rotated multipatch parts cannot be composited directly
bool rotatedmulti = Parts[i].Rotate != 0 && Parts[i].Texture->bMultiPatch;
if ((!Parts[i].Texture->bComplex || inf == NULL) && !rotatedmulti)
{
memset (&info, 0, sizeof(info));
info.alpha = Parts[i].Alpha;
info.invalpha = FRACUNIT - info.alpha;
info.op = ECopyOp(Parts[i].op);
if (Parts[i].Translation != NULL)
{
// Using a translation forces downconversion to the base palette
ret = Parts[i].Texture->CopyTrueColorTranslated(bmp, x+Parts[i].OriginX, y+Parts[i].OriginY, Parts[i].Rotate, Parts[i].Translation, &info);
}
else
{
PalEntry b = Parts[i].Blend;
if (b.a == 0 && b != BLEND_NONE)
{
@ -606,10 +597,19 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rota
info.blendcolor[0] = b.r * (FRACUNIT-info.blendcolor[3]);
info.blendcolor[1] = b.g * (FRACUNIT-info.blendcolor[3]);
info.blendcolor[2] = b.b * (FRACUNIT-info.blendcolor[3]);
info.blend = BLEND_OVERLAY;
}
}
if (!Parts[i].Texture->bComplex && !rotatedmulti)
{
if (Parts[i].Translation != NULL)
{
// Using a translation forces downconversion to the base palette
ret = Parts[i].Texture->CopyTrueColorTranslated(bmp, x+Parts[i].OriginX, y+Parts[i].OriginY, Parts[i].Rotate, Parts[i].Translation, &info);
}
else
{
ret = Parts[i].Texture->CopyTrueColorPixels(bmp, x+Parts[i].OriginX, y+Parts[i].OriginY, Parts[i].Rotate, &info);
}
}
@ -625,7 +625,7 @@ int FMultiPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rota
bmp1.Zero();
Parts[i].Texture->CopyTrueColorPixels(&bmp1, 0, 0);
bmp->CopyPixelDataRGB(x+Parts[i].OriginX, y+Parts[i].OriginY, bmp1.GetPixels(),
bmp1.GetWidth(), bmp1.GetHeight(), 4, bmp1.GetPitch(), Parts[i].Rotate, CF_BGRA, inf);
bmp1.GetWidth(), bmp1.GetHeight(), 4, bmp1.GetPitch(), Parts[i].Rotate, CF_BGRA, &info);
}
}