mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Zoom level now capped at 7, tiles outside the zoomed area shouldn't render anymore.
This commit is contained in:
@@ -132,7 +132,7 @@ void UserInputClass::Process_Input(KeyNumType& key, int& flags)
|
|||||||
|
|
||||||
if (state[SDL_SCANCODE_F6]) {
|
if (state[SDL_SCANCODE_F6]) {
|
||||||
ZoomLevel++;
|
ZoomLevel++;
|
||||||
ZoomLevel = min(ZoomLevel, 6);
|
ZoomLevel = min(ZoomLevel, 7);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -933,6 +933,10 @@ void Read_Setup_Options( RawFileClass *config_file )
|
|||||||
ScreenWidth = ini.Get_Int("Options", "Width", 1280);
|
ScreenWidth = ini.Get_Int("Options", "Width", 1280);
|
||||||
ScreenHeight = ini.Get_Int("Options", "Height", 720);
|
ScreenHeight = ini.Get_Int("Options", "Height", 720);
|
||||||
ZoomLevel = ini.Get_Int("Options", "ZoomLevel", 0);
|
ZoomLevel = ini.Get_Int("Options", "ZoomLevel", 0);
|
||||||
|
if (ZoomLevel > 7)
|
||||||
|
ZoomLevel = 7;
|
||||||
|
if (ZoomLevel < 0)
|
||||||
|
ZoomLevel = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** See if an alternative socket number has been specified
|
** See if an alternative socket number has been specified
|
||||||
|
|||||||
@@ -274,6 +274,18 @@ void __cdecl Buffer_Draw_Stamp_Clip2(GraphicViewPortClass& viewport, const void
|
|||||||
icon_index = 0;
|
icon_index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int renderTargetScale = ZoomLevel;
|
||||||
|
if (Debug_Map) {
|
||||||
|
renderTargetScale = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
double scale = ((((float)ScreenWidth / (float)ScreenHeight) * (float)renderTargetScale) * 0.05) + 1;
|
||||||
|
float xstart_zoom = xstart * scale;
|
||||||
|
float ystart_zoom = ystart * scale;
|
||||||
|
|
||||||
|
if (xstart_zoom >= ScreenWidth || ystart_zoom >= ScreenHeight)
|
||||||
|
return;
|
||||||
|
|
||||||
//GL_SetClipRect(xstart, ystart, blit_width, blit_height);
|
//GL_SetClipRect(xstart, ystart, blit_width, blit_height);
|
||||||
GL_RenderImage(iconImage, xstart, ystart, blit_width, blit_height, 0, icon_index);
|
GL_RenderImage(iconImage, xstart, ystart, blit_width, blit_height, 0, icon_index);
|
||||||
//GL_ResetClipRect();
|
//GL_ResetClipRect();
|
||||||
|
|||||||
+2
-2
@@ -7,7 +7,7 @@ VideoBackBuffer=Yes
|
|||||||
Resolution=400
|
Resolution=400
|
||||||
Width=1280
|
Width=1280
|
||||||
Height=720
|
Height=720
|
||||||
ZoomLevel=6
|
ZoomLevel=7
|
||||||
ShowAllMusic=Yes
|
ShowAllMusic=Yes
|
||||||
PlayEnglishIntro=Yes
|
PlayEnglishIntro=Yes
|
||||||
VideoInterlaceMode=2
|
VideoInterlaceMode=2
|
||||||
@@ -23,11 +23,11 @@ UseSmallInfantry=No
|
|||||||
NoCD=Yes
|
NoCD=Yes
|
||||||
CounterstrikeEnabled=Yes
|
CounterstrikeEnabled=Yes
|
||||||
AftermathEnabled=Yes
|
AftermathEnabled=Yes
|
||||||
ScoreVolume=0.5
|
|
||||||
GameSpeed=2
|
GameSpeed=2
|
||||||
ScrollRate=5
|
ScrollRate=5
|
||||||
Brightness=0.5
|
Brightness=0.5
|
||||||
Volume=0.375
|
Volume=0.375
|
||||||
|
ScoreVolume=0.5
|
||||||
MultiplayerScoreVolume=0.5
|
MultiplayerScoreVolume=0.5
|
||||||
Contrast=0.5
|
Contrast=0.5
|
||||||
Color=0.5
|
Color=0.5
|
||||||
|
|||||||
Reference in New Issue
Block a user