|
8 | 8 | import org.runejs.client.cache.media.TypeFace;
|
9 | 9 | import org.runejs.client.cache.media.gameInterface.GameInterface;
|
10 | 10 | import org.runejs.client.frame.Minimap;
|
| 11 | +import org.runejs.client.io.Buffer; |
| 12 | +import org.runejs.client.media.renderable.actor.Actor; |
11 | 13 | import org.runejs.client.node.Node;
|
12 | 14 | import org.runejs.client.frame.ScreenController;
|
13 | 15 | import org.runejs.client.frame.console.Console;
|
|
19 | 21 | import org.runejs.client.media.renderable.Item;
|
20 | 22 | import org.runejs.client.media.renderable.actor.Npc;
|
21 | 23 | import org.runejs.client.media.renderable.actor.PlayerAppearance;
|
| 24 | +import org.runejs.client.scene.GroundItemTile; |
22 | 25 | import org.runejs.client.scene.Scene;
|
23 | 26 | import org.runejs.client.scene.tile.FloorDecoration;
|
24 | 27 | import org.runejs.client.scene.tile.WallDecoration;
|
25 | 28 | import org.runejs.client.scene.util.CollisionMap;
|
26 | 29 | import org.runejs.client.sound.MusicSystem;
|
27 | 30 | import org.runejs.client.sound.SoundSystem;
|
| 31 | +import org.runejs.client.util.BitUtils; |
28 | 32 |
|
29 | 33 | public class Class40_Sub3 extends Node {
|
30 | 34 | public static int ticksPerLoop;
|
@@ -183,39 +187,39 @@ public static void startup() {
|
183 | 187 | else
|
184 | 188 | MovedStatics.mapSceneIcons = IndexedImage.getMultipleIndexedImages(CacheArchive.gameImageCacheArchive, Native.mapScene, "");
|
185 | 189 | if (MovedStatics.mapFunctionIcons == null)
|
186 |
| - MovedStatics.mapFunctionIcons = MovedStatics.method526(CacheArchive.gameImageCacheArchive, Native.mapFunction, ""); |
| 190 | + MovedStatics.mapFunctionIcons = method526(CacheArchive.gameImageCacheArchive, Native.mapFunction, ""); |
187 | 191 | else
|
188 | 192 | i++;
|
189 | 193 | if (AnimationSequence.aClass40_Sub5_Sub14_Sub4Array2474 != null)
|
190 | 194 | i++;
|
191 | 195 | else
|
192 |
| - AnimationSequence.aClass40_Sub5_Sub14_Sub4Array2474 = MovedStatics.method526(CacheArchive.gameImageCacheArchive, Native.hitmarks, ""); |
| 196 | + AnimationSequence.aClass40_Sub5_Sub14_Sub4Array2474 = method526(CacheArchive.gameImageCacheArchive, Native.hitmarks, ""); |
193 | 197 | if (FloorDecoration.aClass40_Sub5_Sub14_Sub4Array603 == null)
|
194 |
| - FloorDecoration.aClass40_Sub5_Sub14_Sub4Array603 = MovedStatics.method526(CacheArchive.gameImageCacheArchive, Native.headiconsPK, ""); |
| 198 | + FloorDecoration.aClass40_Sub5_Sub14_Sub4Array603 = method526(CacheArchive.gameImageCacheArchive, Native.headiconsPK, ""); |
195 | 199 | else
|
196 | 200 | i++;
|
197 | 201 | if (ProducingGraphicsBuffer_Sub1.headIconSprites != null)
|
198 | 202 | i++;
|
199 | 203 | else
|
200 |
| - ProducingGraphicsBuffer_Sub1.headIconSprites = MovedStatics.method526(CacheArchive.gameImageCacheArchive, Native.headiconsPrayer, ""); |
| 204 | + ProducingGraphicsBuffer_Sub1.headIconSprites = method526(CacheArchive.gameImageCacheArchive, Native.headiconsPrayer, ""); |
201 | 205 | if (MovedStatics.hintIconSprites == null)
|
202 |
| - MovedStatics.hintIconSprites = MovedStatics.method526(CacheArchive.gameImageCacheArchive, Native.headiconsHint, ""); |
| 206 | + MovedStatics.hintIconSprites = method526(CacheArchive.gameImageCacheArchive, Native.headiconsHint, ""); |
203 | 207 | else
|
204 | 208 | i++;
|
205 | 209 | if (LinkedList.aClass40_Sub5_Sub14_Sub4_1057 == null)
|
206 | 210 | LinkedList.aClass40_Sub5_Sub14_Sub4_1057 = HuffmanEncoding.method1028(CacheArchive.gameImageCacheArchive, Native.overlayMultiway, "");
|
207 | 211 | else
|
208 | 212 | i++;
|
209 | 213 | if (Minimap.minimapMarkers == null)
|
210 |
| - Minimap.minimapMarkers = MovedStatics.method526(CacheArchive.gameImageCacheArchive, Native.mapMarker, ""); |
| 214 | + Minimap.minimapMarkers = method526(CacheArchive.gameImageCacheArchive, Native.mapMarker, ""); |
211 | 215 | else
|
212 | 216 | i++;
|
213 | 217 | if (Class37.cursorCross != null)
|
214 | 218 | i++;
|
215 | 219 | else
|
216 |
| - Class37.cursorCross = MovedStatics.method526(CacheArchive.gameImageCacheArchive, Native.cursorCross, ""); |
| 220 | + Class37.cursorCross = method526(CacheArchive.gameImageCacheArchive, Native.cursorCross, ""); |
217 | 221 | if (Minimap.mapDots == null)
|
218 |
| - Minimap.mapDots = MovedStatics.method526(CacheArchive.gameImageCacheArchive, Native.mapDots, ""); |
| 222 | + Minimap.mapDots = method526(CacheArchive.gameImageCacheArchive, Native.mapDots, ""); |
219 | 223 | else
|
220 | 224 | i++;
|
221 | 225 | if (MovedStatics.scrollbarArrowImages == null)
|
@@ -300,21 +304,54 @@ public static void startup() {
|
300 | 304 | }
|
301 | 305 | }
|
302 | 306 |
|
303 |
| - public static void initializeIdentityKitDefinitionCache(CacheArchive definitionCache, CacheArchive arg2) { |
| 307 | + private static void initializeIdentityKitDefinitionCache(CacheArchive definitionCache, CacheArchive arg2) { |
304 | 308 | MovedStatics.aCacheArchive_654 = arg2;
|
305 | 309 | Class49.definitionCache = definitionCache;
|
306 | 310 | PlayerAppearance.identityKitLength = Class49.definitionCache.fileLength(3);
|
307 | 311 | }
|
308 | 312 |
|
309 |
| - public static void initializeGameObjectDefinitionCache(CacheArchive arg1, boolean arg2, CacheArchive definitionCache) { |
| 313 | + private static void initializeGameObjectDefinitionCache(CacheArchive arg1, boolean arg2, CacheArchive definitionCache) { |
310 | 314 | CacheArchive.definitionCache = definitionCache;
|
311 | 315 | GameObjectDefinition.count = CacheArchive.definitionCache.fileLength(6);
|
312 | 316 |
|
313 | 317 | Class35.aBoolean1734 = arg2;
|
314 | 318 | RSString.aCacheArchive_1705 = arg1;
|
315 | 319 | }
|
316 | 320 |
|
317 |
| - public static int method288() { |
| 321 | + private static int method288() { |
318 | 322 | return 5;
|
319 | 323 | }
|
| 324 | + |
| 325 | + private static ImageRGB[] method319() { |
| 326 | + ImageRGB[] class40_sub5_sub14_sub4s = new ImageRGB[MovedStatics.anInt2581]; |
| 327 | + for(int i = 0; i < MovedStatics.anInt2581; i++) { |
| 328 | + ImageRGB class40_sub5_sub14_sub4 = class40_sub5_sub14_sub4s[i] = new ImageRGB(); |
| 329 | + class40_sub5_sub14_sub4.maxWidth = ItemDefinition.imageMaxWidth; |
| 330 | + class40_sub5_sub14_sub4.maxHeight = MovedStatics.imageMaxHeight; |
| 331 | + class40_sub5_sub14_sub4.offsetX = Class57.anIntArray1347[i]; |
| 332 | + class40_sub5_sub14_sub4.offsetY = Actor.anIntArray3111[i]; |
| 333 | + class40_sub5_sub14_sub4.imageWidth = Class17.anIntArray456[i]; |
| 334 | + class40_sub5_sub14_sub4.imageHeight = Npc.anIntArray3312[i]; |
| 335 | + byte[] is = GroundItemTile.aByteArrayArray1370[i]; |
| 336 | + int i_4_ = class40_sub5_sub14_sub4.imageHeight * class40_sub5_sub14_sub4.imageWidth; |
| 337 | + class40_sub5_sub14_sub4.pixels = new int[i_4_]; |
| 338 | + for(int i_5_ = 0; i_5_ < i_4_; i_5_++) |
| 339 | + class40_sub5_sub14_sub4.pixels[i_5_] = Buffer.anIntArray1972[BitUtils.bitWiseAND(255, is[i_5_])]; |
| 340 | + } |
| 341 | + ActorDefinition.method569(); |
| 342 | + return class40_sub5_sub14_sub4s; |
| 343 | + } |
| 344 | + |
| 345 | + private static ImageRGB[] method944(byte arg0, int arg1, CacheArchive arg2, int arg3) { |
| 346 | + if(!ImageRGB.spriteExists(arg3, arg1, arg2)) |
| 347 | + return null; |
| 348 | + int i = -59 % ((-60 - arg0) / 34); |
| 349 | + return method319(); |
| 350 | + } |
| 351 | + |
| 352 | + private static ImageRGB[] method526(CacheArchive arg0, String arg2, String arg3) { |
| 353 | + int i = arg0.getHash(arg2); |
| 354 | + int i_4_ = arg0.method179(i, arg3); |
| 355 | + return method944((byte) -3, i, arg0, i_4_); |
| 356 | + } |
320 | 357 | }
|
0 commit comments