- Merge voxels back into trunk. Even if it needs further tweaking, it should at least be stable now.
SVN r3086 (trunk)
This commit is contained in:
parent
e90b86acce
commit
2add3fb381
24 changed files with 2555 additions and 205 deletions
|
|
@ -1313,6 +1313,21 @@ void DFrameBuffer::RenderView(player_t *player)
|
|||
FCanvasTextureInfo::UpdateAll ();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
extern TDeletingArray<FVoxel *> Voxels;
|
||||
|
||||
void DFrameBuffer::RemapVoxels()
|
||||
{
|
||||
for (unsigned i=0; i<Voxels.Size(); i++)
|
||||
{
|
||||
Voxels[i]->Remap();
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Render the view to a savegame picture
|
||||
|
|
@ -1689,6 +1704,7 @@ void V_Init2()
|
|||
Printf ("Resolution: %d x %d\n", SCREENWIDTH, SCREENHEIGHT);
|
||||
|
||||
screen->SetGamma (gamma);
|
||||
screen->RemapVoxels();
|
||||
FBaseCVar::ResetColors ();
|
||||
C_NewModeAdjust();
|
||||
M_InitVideoModesMenu();
|
||||
|
|
@ -1733,43 +1749,61 @@ CUSTOM_CVAR (Int, vid_aspect, 0, CVAR_GLOBALCONFIG|CVAR_ARCHIVE)
|
|||
// 1: 16:9
|
||||
// 2: 16:10
|
||||
// 4: 5:4
|
||||
int CheckRatio (int width, int height)
|
||||
int CheckRatio (int width, int height, int *trueratio)
|
||||
{
|
||||
int fakeratio = -1;
|
||||
int ratio;
|
||||
|
||||
if ((vid_aspect >=1) && (vid_aspect <=4))
|
||||
{
|
||||
// [SP] User wants to force aspect ratio; let them.
|
||||
return vid_aspect == 3? 0: int(vid_aspect);
|
||||
fakeratio = vid_aspect == 3? 0: int(vid_aspect);
|
||||
}
|
||||
if (vid_nowidescreen)
|
||||
{
|
||||
if (!vid_tft)
|
||||
{
|
||||
return 0;
|
||||
fakeratio = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
fakeratio = (height * 5/4 == width) ? 4 : 0;
|
||||
}
|
||||
return (height * 5/4 == width) ? 4 : 0;
|
||||
}
|
||||
// If the size is approximately 16:9, consider it so.
|
||||
if (abs (height * 16/9 - width) < 10)
|
||||
{
|
||||
return 1;
|
||||
ratio = 1;
|
||||
}
|
||||
// 16:10 has more variance in the pixel dimensions. Grr.
|
||||
if (abs (height * 16/10 - width) < 60)
|
||||
else if (abs (height * 16/10 - width) < 60)
|
||||
{
|
||||
// 320x200 and 640x400 are always 4:3, not 16:10
|
||||
if ((width == 320 && height == 200) || (width == 640 && height == 400))
|
||||
{
|
||||
return 0;
|
||||
ratio = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ratio = 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
// Unless vid_tft is set, 1280x1024 is 4:3, not 5:4.
|
||||
if (height * 5/4 == width && vid_tft)
|
||||
else if (height * 5/4 == width && vid_tft)
|
||||
{
|
||||
return 4;
|
||||
ratio = 4;
|
||||
}
|
||||
// Assume anything else is 4:3.
|
||||
return 0;
|
||||
else
|
||||
{
|
||||
ratio = 0;
|
||||
}
|
||||
|
||||
if (trueratio != NULL)
|
||||
{
|
||||
*trueratio = ratio;
|
||||
}
|
||||
return (fakeratio >= 0) ? fakeratio : ratio;
|
||||
}
|
||||
|
||||
// First column: Base width (unused)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue