Skip to content

Commit de1bbea

Browse files
authored
Merge pull request #174 from runejs/more-jkm-refactors-statics
refactor: move most remaining statics into sensible places, delete some empty classes
2 parents d7121a8 + ce8cfc6 commit de1bbea

File tree

121 files changed

+4569
-4889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+4569
-4889
lines changed

src/main/java/org/runejs/OldEngine/MapDecompressor.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
* @ Author: Zee best
55
*/
66

7-
import org.runejs.client.Class26;
7+
import org.runejs.client.Game;
88
import org.runejs.client.Landscape;
99
import org.runejs.client.MovedStatics;
10-
import org.runejs.client.media.renderable.actor.Npc;
1110
import org.runejs.client.scene.util.CollisionMap;
1211

1312
import java.io.*;
@@ -120,7 +119,7 @@ public static void objectLoader(String file) {
120119
public static void spawnObject(int objectId, int x, int y, int z, int rotation, int type) {
121120
final CollisionMap[] groundData = Landscape.currentCollisionMap;
122121
int localX = x - MovedStatics.baseX;
123-
int localY = y - Class26.baseY; // ??? is this correct?
122+
int localY = y - MovedStatics.baseY; // ??? is this correct?
124123
int plane = z;
125124
if(localX > -1 && localY > -1) {
126125
if((MovedStatics.tile_flags[1][localY][localX] & 2) == 2) {
@@ -133,7 +132,7 @@ public static void spawnObject(int objectId, int x, int y, int z, int rotation,
133132
class20 = groundData[plane];
134133
}
135134
if(localY > 0 && localX > 0 && localY < 103 && localX < 103) {
136-
MovedStatics.addObject(objectId, localX, localY, z, rotation, type, Npc.currentScene, class20);
135+
Landscape.addObject(objectId, localX, localY, z, rotation, type, Game.currentScene, class20);
137136
}
138137
}
139138

src/main/java/org/runejs/OldEngine/ObjectDecompressor.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
* @ Author: Zee best
55
*/
66

7-
import org.runejs.client.Class26;
7+
import org.runejs.client.Game;
88
import org.runejs.client.Landscape;
99
import org.runejs.client.MovedStatics;
1010
import org.runejs.client.io.Buffer;
11-
import org.runejs.client.media.renderable.actor.Npc;
1211
import org.runejs.client.scene.util.CollisionMap;
1312

1413
import java.io.*;
@@ -123,7 +122,7 @@ public static void objectLoader(String file) {
123122
public static void spawnObject(int objectId, int x, int y, int z, int rotation, int type) {
124123
final CollisionMap[] groundData = Landscape.currentCollisionMap;
125124
int localX = x - MovedStatics.baseX;
126-
int localY = y - Class26.baseY; // ??? is this correct?
125+
int localY = y - MovedStatics.baseY; // ??? is this correct?
127126
int plane = z;
128127
if(localX > -1 && localY > -1) {
129128
if((MovedStatics.tile_flags[1][localY][localX] & 2) == 2) {
@@ -136,7 +135,7 @@ public static void spawnObject(int objectId, int x, int y, int z, int rotation,
136135
class20 = groundData[plane];
137136
}
138137
if(localY > 0 && localX > 0 && localY < 103 && localX < 103) {
139-
MovedStatics.addObject(objectId, localX, localY, z, rotation, type, Npc.currentScene, class20);
138+
Landscape.addObject(objectId, localX, localY, z, rotation, type, Game.currentScene, class20);
140139
}
141140
}
142141

src/main/java/org/runejs/client/Class12.java

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

src/main/java/org/runejs/client/Class13.java

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

src/main/java/org/runejs/client/Class17.java

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

src/main/java/org/runejs/client/Class18.java

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

src/main/java/org/runejs/client/Class24.java

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

src/main/java/org/runejs/client/Class26.java

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

0 commit comments

Comments
 (0)