forked from Mirrors/openclonk
Add a config option for the highres landscape renderer
parent
8c21cfbb41
commit
a511828003
|
@ -113,6 +113,7 @@ class C4ConfigGraphics
|
|||
int32_t ShowStartupMessages;
|
||||
int32_t VerboseObjectLoading;
|
||||
int32_t ColorAnimation;
|
||||
int32_t HighResLandscape;
|
||||
int32_t SmokeLevel;
|
||||
int32_t VideoModule;
|
||||
int32_t MenuTransparency;
|
||||
|
|
|
@ -135,7 +135,8 @@ void C4ConfigGraphics::CompileFunc(StdCompiler *pComp)
|
|||
pComp->Value(mkNamingAdapt(ShowCommands, "ShowCommands", 1 ,false, true));
|
||||
pComp->Value(mkNamingAdapt(ShowCommandKeys, "ShowCommandKeys", 1 ,false, true));
|
||||
pComp->Value(mkNamingAdapt(ShowStartupMessages, "ShowStartupMessages", 1 ,false, true));
|
||||
pComp->Value(mkNamingAdapt(ColorAnimation, "ColorAnimation", 0 ,false,true));
|
||||
pComp->Value(mkNamingAdapt(ColorAnimation, "ColorAnimation", 0 ,false, true));
|
||||
pComp->Value(mkNamingAdapt(HighResLandscape, "HighResLandscape", 0 ,false, true));
|
||||
pComp->Value(mkNamingAdapt(SmokeLevel, "SmokeLevel", 200 ,false, true));
|
||||
pComp->Value(mkNamingAdapt(VerboseObjectLoading, "VerboseObjectLoading", 0 ));
|
||||
pComp->Value(mkNamingAdapt(VideoModule, "VideoModule", 0 ,false, true));
|
||||
|
|
|
@ -296,9 +296,12 @@ void C4Landscape::Draw(C4TargetFacet &cgo, int32_t iPlayer)
|
|||
else
|
||||
{
|
||||
const CSurface * Surfaces[C4M_MaxTexIndex];
|
||||
for (int i = 0; i < C4M_MaxTexIndex; ++i)
|
||||
Surfaces[i] = Game.TextureMap.GetEntry(i)->getPattern().getSurface();
|
||||
Application.DDraw->BlitLandscape(Surface32, cgo.TargetX, cgo.TargetY, cgo.Surface, cgo.X,cgo.Y,cgo.Wdt,cgo.Hgt, DDrawCfg.Shader ? Surfaces : 0);
|
||||
if (Config.Graphics.HighResLandscape)
|
||||
for (int i = 0; i < C4M_MaxTexIndex; ++i)
|
||||
Surfaces[i] = Game.TextureMap.GetEntry(i)->getPattern().getSurface();
|
||||
Application.DDraw->BlitLandscape(Surface32, cgo.TargetX, cgo.TargetY, cgo.Surface,
|
||||
cgo.X, cgo.Y, cgo.Wdt, cgo.Hgt,
|
||||
Config.Graphics.HighResLandscape ? Surfaces : 0);
|
||||
}
|
||||
if (Modulation) Application.DDraw->DeactivateBlitModulation();
|
||||
}
|
||||
|
@ -2477,6 +2480,14 @@ bool C4Landscape::ApplyLighting(C4Rect To)
|
|||
if (To.Wdt<=0 || To.Hgt<=0) return true;
|
||||
if (!Surface32->Lock()) return false;
|
||||
Surface32->ClearBoxDw(To.x, To.y, To.Wdt, To.Hgt);
|
||||
|
||||
if(lpDDraw->IsShaderific() && Config.Graphics.HighResLandscape)
|
||||
{
|
||||
for (int32_t iX=To.x; iX<To.x+To.Wdt; ++iX)
|
||||
for (int32_t iY=To.y; iY<To.y+To.Hgt; ++iY)
|
||||
Surface32->SetPixDw(iX, iY, _GetPix(iX, iY));
|
||||
}
|
||||
else
|
||||
// do lightning
|
||||
for (int32_t iX=To.x; iX<To.x+To.Wdt; ++iX)
|
||||
{
|
||||
|
@ -2493,11 +2504,6 @@ bool C4Landscape::ApplyLighting(C4Rect To)
|
|||
BelowDensity -= GetPlacement(iX, iY);
|
||||
BelowDensity += GetPlacement(iX, iY + 8);
|
||||
BYTE pix = _GetPix(iX, iY);
|
||||
|
||||
if(DDrawCfg.Shader) {
|
||||
Surface32->SetPixDw(iX, iY, pix);
|
||||
continue;
|
||||
};
|
||||
// Sky
|
||||
if(!pix)
|
||||
{
|
||||
|
|
|
@ -902,7 +902,7 @@ C4StartupOptionsDlg::C4StartupOptionsDlg() : C4StartupDlg(LoadResStrNoAmp("IDS_D
|
|||
pGroupEffects->SetColors(C4StartupEditBorderColor, C4StartupFontClr);
|
||||
pSheetGraphics->AddElement(pGroupEffects);
|
||||
C4GUI::ComponentAligner caGroupEffects(pGroupEffects->GetClientRect(), iIndentX1, iIndentY2, true);
|
||||
iNumGfxOptions = 2; iOpt=0;
|
||||
iNumGfxOptions = 3; iOpt=0;
|
||||
// effects level slider
|
||||
C4GUI::ComponentAligner caEffectsLevel(caGroupEffects.GetGridCell(0,1,iOpt++,iNumGfxOptions), 1,0,false);
|
||||
StdStrBuf sEffectsTxt; sEffectsTxt.Copy(LoadResStr("IDS_CTL_SMOKELOW"));
|
||||
|
@ -921,6 +921,11 @@ C4StartupOptionsDlg::C4StartupOptionsDlg() : C4StartupDlg(LoadResStrNoAmp("IDS_D
|
|||
pCheck->SetToolTip(LoadResStr("IDS_MSG_FIREPARTICLES_DESC"));
|
||||
pCheck->SetFont(pUseFont, C4StartupFontClr, C4StartupFontClrDisabled);
|
||||
pGroupEffects->AddElement(pCheck);
|
||||
// high resolution landscape
|
||||
pCheck = new BoolConfig(caGroupEffects.GetGridCell(0,1,iOpt++,iNumGfxOptions,-1,iCheckHgt,true), LoadResStr("[!]High resolution landscape"), NULL, &Config.Graphics.HighResLandscape);
|
||||
pCheck->SetToolTip(LoadResStr("[!]An expensive effect."));
|
||||
pCheck->SetFont(pUseFont, C4StartupFontClr, C4StartupFontClrDisabled);
|
||||
pGroupEffects->AddElement(pCheck);
|
||||
|
||||
// --- page sound
|
||||
C4GUI::ComponentAligner caSheetSound(pSheetSound->GetClientRect(), iIndentX1, iIndentY1, true);
|
||||
|
|
Loading…
Reference in New Issue