91 if (x < 0 || x >=
width)
104 for (
int i = 0; i <
data.Length; i++)
116 if (x < 0 || x >=
width)
129 if (x < 0 || x >=
width)
142 if (x < 0 || x >=
width)
155 for (
int i = 0; i <
data.Length; i++)
165 if (x >= 0 && x < width && y >= 0 && y <
height)
168 if (bitsByte[0] && !bitsByte[1])
179 if (x >= 0 && x < width && y >= 0 && y <
height)
201 for (
int i = 0; i <
data.Length; i++)
207 public void SetTilesLoaded(
int startX,
int startY,
int endXInclusive,
int endYInclusive)
213 for (
int i = sectionX; i <= sectionX2; i++)
215 for (
int j = sectionY; j <= sectionY2; j++)
235 playerPos *= 0.0625f;
241 if (num3 != sectionX || num4 != sectionY)
258 int num6 = (int)(playerPos.
X - ((
float)num3 + 0.5f) * 200f);
259 int num7 = (int)(playerPos.
Y - ((
float)num4 + 0.5f) * 150f);
262 num = ((num6 <= 0) ? 1 : (-1));
263 num2 = ((num7 <= 0) ? 1 : (-1));
274 throw new Exception(
"Infinite loop in WorldSections.GetNextMapDraw");
279 num6 = (int)(vector.
X - ((
float)num3 + 0.5f) * 200f);
280 num7 = (int)(vector.
Y - ((
float)num4 + 0.5f) * 150f);
281 num = ((num6 <= 0) ? 1 : (-1));
282 num2 = ((num7 <= 0) ? 1 : (-1));
286 if (y >= 0 && y < height && x >= 0 && x <
width)
295 int num10 = y - num4;
296 if (num9 == 0 || num10 == 0)
300 if (num9 == 0 && num10 == 0)
330 num = ((num9 <= 0) ? 1 : (-1));
334 num2 = ((num10 <= 0) ? 1 : (-1));
357 prevMap.centerPos = playerPos;
static double Abs(double value)
static int GetSectionX(int x)
static int GetSectionY(int y)
bool AnyUnfinishedSections
void SetSectionFramed(int x, int y)
bool GetNextMapDraw(Vector2 playerPos, out int x, out int y)
void SetTilesLoaded(int startX, int startY, int endXInclusive, int endYInclusive)
const int BitIndex_SectionMapDrawn
WorldSections(int numSectionsX, int numSectionsY)
const int BitIndex_SectionFramed
void SetAllSectionsLoaded()
int _sectionsNeedingRefresh
bool SectionNeedsRefresh(int x, int y)
bool MapSectionDrawn(int x, int y)
void SetSectionLoaded(ref BitsByte section)
void SetAllFramedSectionsAsNeedingRefresh()
void SetSectionAsRefreshed(int x, int y)
const int BitIndex_SectionLoaded
const int BitIndex_SectionNeedsRefresh
bool SectionLoaded(int x, int y)
bool SectionFramed(int x, int y)
void SetSectionLoaded(int x, int y)