@@ -46,21 +46,18 @@ public class Scene {
46
46
public static int mapBoundsX ;
47
47
public static int currentPositionY ;
48
48
public static int cameraPosZ ;
49
- public static int anInt90 = 4 ;
50
49
public static int currentPositionX ;
51
50
public static int activeOccluderCount = 0 ;
52
51
public static int cameraPosY ;
53
52
public static int renderCameraYawCosine ;
54
53
public static int cameraPositionTileY ;
55
- public static int [] cullingClusterPointer = new int [anInt90 ];
56
54
public static int renderCameraYawSine ;
57
55
public static InteractiveObject [] interactiveObjects = new InteractiveObject [100 ];
58
56
public static SceneCluster [] processedCullingClusters = new SceneCluster [500 ];
59
57
public static LinkedList tileList = new LinkedList ();
60
58
public static int anInt109 = 0 ;
61
59
public static int renderCameraPitchCosine ;
62
60
public static int mapBoundsY ;
63
- public static SceneCluster [][] cullingClusters = new SceneCluster [anInt90 ][500 ];
64
61
public static int drawWidthMidpoint ;
65
62
public static int drawHeight ;
66
63
public static int drawHeightMidpoint ;
@@ -108,6 +105,9 @@ public class Scene {
108
105
public int mapSizeY = 104 ;
109
106
public int mapSizeZ = 4 ;
110
107
108
+ private SceneCluster [][] cullingClusters = new SceneCluster [mapSizeZ ][500 ];
109
+ private int [] cullingClusterPointer = new int [mapSizeZ ];
110
+
111
111
public Scene (int [][][] heightMap ) {
112
112
tileArray = new SceneTile [mapSizeZ ][mapSizeX ][mapSizeY ];
113
113
tileOcclusionCycles = new int [mapSizeZ ][mapSizeX + 1 ][mapSizeY + 1 ];
@@ -255,7 +255,7 @@ public boolean isPointVisibleOnScreen(int x, int y, int z) {
255
255
}
256
256
257
257
258
- public static void createOccluder (int z , int searchMask , int lowestX , int highestX , int lowestY , int highestY , int highestZ , int lowestZ ) {
258
+ public void createOccluder (int z , int searchMask , int lowestX , int highestX , int lowestY , int highestY , int highestZ , int lowestZ ) {
259
259
SceneCluster sceneCluster = new SceneCluster ();
260
260
sceneCluster .tileStartX = lowestX / 128 ;
261
261
sceneCluster .tileEndX = highestX / 128 ;
@@ -568,7 +568,7 @@ public void initToNull() {
568
568
}
569
569
}
570
570
}
571
- for (int i = 0 ; i < anInt90 ; i ++) {
571
+ for (int i = 0 ; i < mapSizeZ ; i ++) {
572
572
for (int i_39_ = 0 ; i_39_ < cullingClusterPointer [i ]; i_39_ ++) {
573
573
cullingClusters [i ][i_39_ ] = null ;
574
574
}
0 commit comments