TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ checkMap()

bool Terraria.Main.checkMap ( int i,
int j )
inlineprotected

Definition at line 74133 of file Main.cs.

74134 {
74135 //IL_0089: Unknown result type (might be due to invalid IL or missing references)
74136 //IL_0091: Unknown result type (might be due to invalid IL or missing references)
74137 //IL_009b: Expected O, but got Unknown
74138 if (mapTarget[i, j] == null || ((GraphicsResource)mapTarget[i, j]).IsDisposed)
74139 {
74140 initMap[i, j] = false;
74141 }
74142 if (!initMap[i, j])
74143 {
74144 try
74145 {
74146 int width = textureMaxWidth;
74147 int height = textureMaxHeight;
74148 if (i == mapTargetX - 1)
74149 {
74150 width = 400;
74151 }
74152 if (j == mapTargetY - 1)
74153 {
74154 height = 600;
74155 }
74156 mapTarget[i, j] = new RenderTarget2D(((Game)this).GraphicsDevice, width, height, false, ((Game)this).GraphicsDevice.PresentationParameters.BackBufferFormat, (DepthFormat)0, 0, (RenderTargetUsage)1);
74157 }
74158 catch
74159 {
74160 mapEnabled = false;
74161 for (int k = 0; k < mapTargetX; k++)
74162 {
74163 for (int l = 0; l < mapTargetY; l++)
74164 {
74165 try
74166 {
74167 initMap[k, l] = false;
74168 ((GraphicsResource)mapTarget[k, l]).Dispose();
74169 }
74170 catch
74171 {
74172 }
74173 }
74174 }
74175 return false;
74176 }
74177 initMap[i, j] = true;
74178 }
74179 return true;
74180 }
static int mapTargetY
Definition Main.cs:959
RenderTarget2D[,] mapTarget
Definition Main.cs:961
static int textureMaxHeight
Definition Main.cs:939
static int textureMaxWidth
Definition Main.cs:937
static int mapTargetX
Definition Main.cs:957
static bool mapEnabled
Definition Main.cs:975
static bool[,] initMap
Definition Main.cs:965

References Terraria.Main.initMap, Terraria.Main.mapEnabled, Terraria.Main.mapTarget, Terraria.Main.mapTargetX, Terraria.Main.mapTargetY, Terraria.Main.textureMaxHeight, and Terraria.Main.textureMaxWidth.

Referenced by Terraria.Main.DrawToMap(), and Terraria.Main.DrawToMap_Section().

+ Here is the caller graph for this function: