@@ -11,6 +11,8 @@ Type GraphicsOutput
11
11
Const c_MaxFrameCount:Int = 20
12
12
Field c_Magenta:Int [] = [255 , 0 , 255 ]
13
13
'Graphic Assets
14
+
15
+ Field m_MaxZoom:Int = 5 'Assume 1366px is the lowest resolution because it's not 1999. 1366px - 260px (left column) = 1106 / 192 (source image width) = 5 (floored)
14
16
Field m_SourceImage:TImage
15
17
Field m_SourceImageSize:SVec2I
16
18
'Output Settings
@@ -28,9 +30,11 @@ Type GraphicsOutput
28
30
29
31
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
30
32
31
- Method New ()
33
+ Method New (maxWorkspaceWidth: Int )
32
34
SetClsColor(m_BackgroundColor[ 0 ] , m_BackgroundColor[ 1 ] , m_BackgroundColor[ 2 ] )
33
35
SetMaskColor(c_Magenta[ 0 ] , c_Magenta[ 1 ] , c_Magenta[ 2 ] )
36
+
37
+ m_MaxZoom = Int (FloorF(maxWorkspaceWidth / 192 ))
34
38
EndMethod
35
39
36
40
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -56,7 +60,7 @@ Type GraphicsOutput
56
60
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
57
61
58
62
Method SetInputZoom :Int (newZoom:Int )
59
- Local clampedNewZoom:Int = Utility.Clamp(newZoom, 1 , c_MaxZoom )
63
+ Local clampedNewZoom:Int = Utility.Clamp(newZoom, 1 , m_MaxZoom )
60
64
If m_InputZoom <> clampedNewZoom Then
61
65
m_InputZoom = clampedNewZoom
62
66
m_TileSize = 24 * m_InputZoom
0 commit comments