Update to ZDoom r3088:

* Added "special" console command for executing action specials.
    * Fixed buffer overflow attack for DEM_RUNSCRIPT(2).
    * Fixed: FMODSoundRenderer::DrawWaveDebug() only allocated enough space for the wavearray based on the window_size, so for large numbers of output channels, it would not allocate enough space for the spectrum data (which is definied by SPECTRUM_SIZE, not the window_size) and write junk on the stack when drawing the spectrums, causing a crash.
    * Merge voxels back into trunk. Even if it needs further tweaking, it should at least be stable now.
    * Added 'player.flechettetype' property so that the appropriate flechette type can be set per player class.
    * bumped savegame version for flechette type changes.
    * Added Chris's KDE IWAD picker submission.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1153 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2011-01-02 22:29:16 +00:00
parent 3cbdbdf01f
commit 95f966faf5
38 changed files with 2745 additions and 252 deletions

View file

@ -106,7 +106,6 @@ static fixed_t MaxVisForFloor;
static FRandom pr_torchflicker ("TorchFlicker");
static FRandom pr_hom;
static TArray<InterpolationViewer> PastViewers;
static int centerxwide;
static bool polyclipped;
static bool r_showviewer;
bool r_dontmaplines;
@ -138,6 +137,7 @@ float LastFOV;
int WidescreenRatio;
fixed_t GlobVis;
fixed_t viewingrangerecip;
fixed_t FocalTangent;
fixed_t FocalLengthX;
fixed_t FocalLengthY;
@ -154,6 +154,8 @@ float WallTMapScale2;
extern "C" {
int centerx;
int centery;
int centerxwide;
}
DCanvas *RenderTarget; // [RH] canvas to render to
@ -162,6 +164,7 @@ fixed_t globaluclip, globaldclip;
fixed_t centerxfrac;
fixed_t centeryfrac;
fixed_t yaspectmul;
fixed_t baseyaspectmul; // yaspectmul without a forced aspect ratio
float iyaspectmulfloat;
fixed_t InvZtoScale;
@ -461,6 +464,9 @@ void R_InitTextureMapping ()
FocalLengthY = Scale (centerxfrac, yaspectmul, hitan);
FocalLengthXfloat = (float)FocalLengthX / 65536.f;
// This is 1/FocalTangent before the widescreen extension of FOV.
viewingrangerecip = DivScale32(1, finetangent[FINEANGLES/4+(FieldOfView/2)]);
// Now generate xtoviewangle for sky texture mapping.
// [RH] Do not generate viewangletox, because texture mapping is no
// longer done with trig, so it's not needed.
@ -603,7 +609,7 @@ void R_SetViewSize (int blocks)
void R_SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight)
{
int virtheight, virtwidth;
int virtheight, virtwidth, trueratio, virtwidth2, virtheight2;
if (windowSize >= 11)
{
@ -624,7 +630,7 @@ void R_SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight)
}
// If the screen is approximately 16:9 or 16:10, consider it widescreen.
WidescreenRatio = CheckRatio (fullWidth, fullHeight);
WidescreenRatio = CheckRatio (fullWidth, fullHeight, &trueratio);
DrawFSHUD = (windowSize == 11);
@ -647,8 +653,18 @@ void R_SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight)
centerxfrac = centerx<<FRACBITS;
centeryfrac = centery<<FRACBITS;
virtwidth = fullWidth;
virtheight = fullHeight;
virtwidth = virtwidth2 = fullWidth;
virtheight = virtheight2 = fullHeight;
if (trueratio & 4)
{
virtheight2 = virtheight2 * BaseRatioSizes[trueratio][3] / 48;
}
else
{
virtwidth2 = virtwidth2 * BaseRatioSizes[trueratio][3] / 48;
}
if (WidescreenRatio & 4)
{
virtheight = virtheight * BaseRatioSizes[WidescreenRatio][3] / 48;
@ -660,6 +676,7 @@ void R_SetWindow (int windowSize, int fullWidth, int fullHeight, int stHeight)
centerxwide = centerx * BaseRatioSizes[WidescreenRatio][3] / 48;
}
baseyaspectmul = Scale(320 << FRACBITS, virtheight2, r_Yaspect * virtwidth2);
yaspectmul = Scale ((320<<FRACBITS), virtheight, r_Yaspect * virtwidth);
iyaspectmulfloat = (float)virtwidth * r_Yaspect / 320.f / (float)virtheight;
InvZtoScale = yaspectmul * centerx;