Skip to content

Commit a2b15c9

Browse files
committed
refactor: move minimap constants to Minimap
1 parent ab39d1f commit a2b15c9

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

src/main/java/org/runejs/client/frame/Minimap.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ public class Minimap extends FramePieceRenderer {
3030
* Images for function icons on the minimap (e.g. quests, instructors)
3131
*/
3232
public static ImageRGB[] mapFunctionIcons;
33+
/**
34+
* Minimap tile rotations (move to Minimap class)
35+
*/
36+
public static int[][] anIntArrayArray121 = new int[][]{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, {12, 8, 4, 0, 13, 9, 5, 1, 14, 10, 6, 2, 15, 11, 7, 3}, {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}, {3, 7, 11, 15, 2, 6, 10, 14, 1, 5, 9, 13, 0, 4, 8, 12}};
37+
/**
38+
* Minimap tile masks (move to Minimap class)
39+
*/
40+
public static int[][] anIntArrayArray129 = new int[][]{new int[16], {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1}, {1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1}, {0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1}, {1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1}};
3341
private static int[] resizableMinimapOffsets1;
3442
private static int[] resizableMinimapOffsets2;
3543
private static ProducingGraphicsBuffer resizableMiniMapimage;

src/main/java/org/runejs/client/scene/Scene.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.runejs.client.Landscape;
44
import org.runejs.client.LinkedList;
55
import org.runejs.client.MovedStatics;
6+
import org.runejs.client.frame.Minimap;
67
import org.runejs.client.input.MouseHandler;
78
import org.runejs.client.media.Rasterizer3D;
89
import org.runejs.client.media.VertexNormal;
@@ -75,17 +76,9 @@ public class Scene {
7576
public int[][][] heightMap;
7677
public int mapSizeZ;
7778
public int mapSizeY;
78-
/**
79-
* Minimap tile rotations (move to Minimap class)
80-
*/
81-
public int[][] anIntArrayArray121;
8279
public int[] mergeIndexB;
8380
public int anInt126;
8481
public int[] mergeIndexA;
85-
/**
86-
* Minimap tile masks (move to Minimap class)
87-
*/
88-
public int[][] anIntArrayArray129;
8982

9083
private boolean clicked = false;
9184
private int clickX = 0;
@@ -114,11 +107,9 @@ public Scene(int[][][] heightMap) {
114107
final int width = 104;// was parameter
115108
final int height = 4;// was parameter
116109
sceneSpawnRequestsCacheCurrentPos = 0;
117-
anIntArrayArray121 = new int[][]{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, {12, 8, 4, 0, 13, 9, 5, 1, 14, 10, 6, 2, 15, 11, 7, 3}, {15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0}, {3, 7, 11, 15, 2, 6, 10, 14, 1, 5, 9, 13, 0, 4, 8, 12}};
118110
mergeIndexB = new int[10000];
119111
anInt126 = 0;
120112
mergeIndexA = new int[10000];
121-
anIntArrayArray129 = new int[][]{new int[16], {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1}, {1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1}, {0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0}, {1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1}, {1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1}};
122113
mapSizeZ = height;
123114
mapSizeX = width;
124115
mapSizeY = length;
@@ -365,8 +356,8 @@ public void drawMinimapTile(int[] destPixels, int offset, int step, int plane, i
365356
int rotation = complexTile.rotation;
366357
int underlayColor = complexTile.underlayRGB;
367358
int overlayColor = complexTile.overlayRGB;
368-
int[] is = anIntArrayArray129[shape];
369-
int[] is_19_ = anIntArrayArray121[rotation];
359+
int[] is = Minimap.anIntArrayArray129[shape];
360+
int[] is_19_ = Minimap.anIntArrayArray121[rotation];
370361
int pointer = 0;
371362
if (underlayColor == 0) {
372363
for (int i_22_ = 0; i_22_ < 4; i_22_++) {

0 commit comments

Comments
 (0)