Skip to content

Commit fb562fe

Browse files
committed
rename QuarterTileCls -> Autotile, PointStruct -> Point16i
1 parent 6561810 commit fb562fe

File tree

5 files changed

+36
-36
lines changed

5 files changed

+36
-36
lines changed

Framework/Intersect.Framework.Core/GameObjects/Maps/QuarterTileCls.cs renamed to Framework/Intersect.Framework.Core/GameObjects/Maps/Autotile.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
namespace Intersect.GameObjects.Maps;
22

3-
public partial class QuarterTileCls
3+
public partial class Autotile
44
{
5-
public PointStruct[] QuarterTile = new PointStruct[5];
5+
public Point16i[] QuarterTile = new Point16i[5];
66

77
public byte RenderState;
88

9-
public QuarterTileCls Copy()
9+
public Autotile Copy()
1010
{
11-
var autotile = new QuarterTileCls();
11+
var autotile = new Autotile();
1212

1313
autotile.RenderState = RenderState;
1414

1515
for (var z = 0; z < 5; z++)
1616
{
17-
autotile.QuarterTile[z] = new PointStruct()
17+
autotile.QuarterTile[z] = new Point16i()
1818
{
1919
X = QuarterTile[z].X,
2020
Y = QuarterTile[z].Y
@@ -24,7 +24,7 @@ public QuarterTileCls Copy()
2424
return autotile;
2525
}
2626

27-
public bool Equals(QuarterTileCls quarterTile)
27+
public bool Equals(Autotile quarterTile)
2828
{
2929
if (quarterTile.RenderState != RenderState)
3030
{

Framework/Intersect.Framework.Core/GameObjects/Maps/MapAutotiles.cs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -61,43 +61,43 @@ public partial class MapAutotiles
6161

6262
public const byte XPW = 10;
6363

64-
public static PointStruct[] AutoCxp = new PointStruct[6];
64+
public static Point16i[] AutoCxp = new Point16i[6];
6565

66-
public static PointStruct[] AutoExp = new PointStruct[6];
66+
public static Point16i[] AutoExp = new Point16i[6];
6767

68-
public static PointStruct[] AutoInner = new PointStruct[6];
68+
public static Point16i[] AutoInner = new Point16i[6];
6969

7070
// XP autotiling
71-
public static PointStruct[] AutoInnerXp = new PointStruct[6];
71+
public static Point16i[] AutoInnerXp = new Point16i[6];
7272

73-
public static PointStruct[] AutoNe = new PointStruct[6];
73+
public static Point16i[] AutoNe = new Point16i[6];
7474

75-
public static PointStruct[] AutoNeXp = new PointStruct[6];
75+
public static Point16i[] AutoNeXp = new Point16i[6];
7676

77-
public static PointStruct[] AutoNw = new PointStruct[6];
77+
public static Point16i[] AutoNw = new Point16i[6];
7878

79-
public static PointStruct[] AutoNwXp = new PointStruct[6];
79+
public static Point16i[] AutoNwXp = new Point16i[6];
8080

81-
public static PointStruct[] AutoNxp = new PointStruct[6];
81+
public static Point16i[] AutoNxp = new Point16i[6];
8282

83-
public static PointStruct[] AutoSe = new PointStruct[6];
83+
public static Point16i[] AutoSe = new Point16i[6];
8484

85-
public static PointStruct[] AutoSeXp = new PointStruct[6];
85+
public static Point16i[] AutoSeXp = new Point16i[6];
8686

87-
public static PointStruct[] AutoSw = new PointStruct[6];
87+
public static Point16i[] AutoSw = new Point16i[6];
8888

89-
public static PointStruct[] AutoSwXp = new PointStruct[6];
89+
public static Point16i[] AutoSwXp = new Point16i[6];
9090

91-
public static PointStruct[] AutoSxp = new PointStruct[6];
91+
public static Point16i[] AutoSxp = new Point16i[6];
9292

93-
public static PointStruct[] AutoWxp = new PointStruct[6];
93+
public static Point16i[] AutoWxp = new Point16i[6];
9494

9595
// autotiling
9696
private static bool sLoadedTemplates = false;
9797

9898
private readonly MapBase mMyMap;
9999

100-
public Dictionary<string, QuarterTileCls[,]> Layers;
100+
public Dictionary<string, Autotile[,]> Layers;
101101

102102
public MapAutotiles(MapBase map)
103103
{
@@ -372,15 +372,15 @@ private void InitXpAutotileTemplate()
372372

373373
private void CreateFields()
374374
{
375-
Layers = new Dictionary<string, QuarterTileCls[,]>();
375+
Layers = new Dictionary<string, Autotile[,]>();
376376
foreach (var layerName in Options.Instance.Map.Layers.All)
377377
{
378-
var layer = new QuarterTileCls[Options.Instance.Map.MapWidth, Options.Instance.Map.MapHeight];
378+
var layer = new Autotile[Options.Instance.Map.MapWidth, Options.Instance.Map.MapHeight];
379379
for (var x = 0; x < Options.Instance.Map.MapWidth; x++)
380380
{
381381
for (var y = 0; y < Options.Instance.Map.MapHeight; y++)
382382
{
383-
layer[x, y] = new QuarterTileCls() { QuarterTile = new PointStruct[5] };
383+
layer[x, y] = new Autotile() { QuarterTile = new Point16i[5] };
384384
}
385385
}
386386
Layers.Add(layerName, layer);
@@ -2314,7 +2314,7 @@ private int CalculateCliffHeight(string layerName, int x, int y, MapBase[,] surr
23142314

23152315
public void PlaceAutotile(string layerName, int x, int y, byte tileQuarter, string autoTileLetter)
23162316
{
2317-
var quarterTile = new PointStruct();
2317+
var quarterTile = new Point16i();
23182318
switch (autoTileLetter)
23192319
{
23202320
case "a":
@@ -2423,7 +2423,7 @@ public void PlaceAutotile(string layerName, int x, int y, byte tileQuarter, stri
24232423

24242424
public void PlaceAutotileXp(string layerName, int x, int y, byte tileQuarter, string autoTileLetter)
24252425
{
2426-
var quarterTile = new PointStruct();
2426+
var quarterTile = new Point16i();
24272427
switch (autoTileLetter)
24282428
{
24292429
case "a":
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace Intersect.GameObjects.Maps;
2+
3+
public partial struct Point16i
4+
{
5+
public short X;
6+
7+
public short Y;
8+
}

Framework/Intersect.Framework.Core/GameObjects/Maps/PointStruct.cs

Lines changed: 0 additions & 8 deletions
This file was deleted.

Intersect.Client.Core/Maps/MapInstance.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ private void DrawAutoTile(
10541054
GameTileBuffer buffer,
10551055
bool update = false,
10561056
Tile? layerTile = default,
1057-
QuarterTileCls? layerAutoTile = default
1057+
Autotile? layerAutoTile = default
10581058
)
10591059
{
10601060
if (layerTile == null)

0 commit comments

Comments
 (0)