|
Thanks!
For those who don't know map decoding also changed:
Code:public int readUnsignedIntSmartShortCompat() { int var1 = 0; int var2; for (var2 = this.readUSmart(); var2 == 32767; var2 = this.readUSmart()) { var1 += 32767; } var1 += var2; return var1; } public int readUSmart() { int peek = payload[pos] & 0xFF; return peek < 128 ? this.readUnsignedByte() : this.readUShort() - 0x8000; }Code:public void load(int block_x, CollisionMap[] map, int block_y, SceneGraph scene, byte[] data) { load: { Buffer buffer = new Buffer(data); int object_id = -1; do { int id_offset = buffer.readUnsignedIntSmartShortCompat(); if (id_offset == 0) break load; object_id += id_offset; int pos = 0; do { int pos_offset = buffer.readUSmart(); if (pos_offset == 0) break; pos += pos_offset - 1; int tile_y = pos & 0x3F; int tile_x = pos >> 6 & 0x3F; int plane = pos >> 12 & 0x3; int hash = buffer.readUByte(); int type = hash >> 2; int orientation = hash & 3; int x = tile_x + block_x; int y = tile_y + block_y; if (x > 0 && y > 0 && x < 103 && y < 103 && plane >= 0 && plane < 4) { int marking_plane = plane; if ((tile_flags[1][x][y] & 2) == 2) marking_plane--; CollisionMap collision = null; if (marking_plane >= 0/* && marking_plane < 4*/)//added for higher revisions collision = map[marking_plane]; render(y, scene, collision, type, plane, x, object_id, orientation); } } while (true); } while (true); } }
If someone could dump the xteas for the skotizo area, would greatly appreciate and share them with Mark. So we can get the Skotizo area working.
Hi, I've tried updating the model decoder but on doing so I am hit with an out of bounds error:
Here's my class:Code:java.lang.ArrayIndexOutOfBoundsException: 129 at com.client.ModelData.calculateVertexNormals(ModelData.java:2659) at com.client.ModelData.toModel(ModelData.java:2770) at com.client.definitions.ObjectDefinition.getEntity(ObjectDefinition.java:689) at com.client.ObjectManager.renderObject(ObjectManager.java:582) at com.client.ObjectManager.decodeLandscapes(ObjectManager.java:1328) at com.client.Client.method22(Client.java:1479) at com.client.Client.method54(Client.java:4292) at com.client.Client.loadingStages(Client.java:4244) at com.client.Client.mainGameProcessor(Client.java:4635) at com.client.Client.processGameLoop(Client.java:3637) at com.client.RSApplet.run(RSApplet.java:305) at com.client.Client.run(Client.java:6978) at java.lang.Thread.run(Thread.java:748)
https://pastebin.com/raw/xX4nCfax
Hi, I've tried updating the model decoder but on doing so I am hit with an out of bounds error:
Here's my class:Code:java.lang.ArrayIndexOutOfBoundsException: 129 at com.client.ModelData.calculateVertexNormals(ModelData.java:2659) at com.client.ModelData.toModel(ModelData.java:2770) at com.client.definitions.ObjectDefinition.getEntity(ObjectDefinition.java:689) at com.client.ObjectManager.renderObject(ObjectManager.java:582) at com.client.ObjectManager.decodeLandscapes(ObjectManager.java:1328) at com.client.Client.method22(Client.java:1479) at com.client.Client.method54(Client.java:4292) at com.client.Client.loadingStages(Client.java:4244) at com.client.Client.mainGameProcessor(Client.java:4635) at com.client.Client.processGameLoop(Client.java:3637) at com.client.RSApplet.run(RSApplet.java:305) at com.client.Client.run(Client.java:6978) at java.lang.Thread.run(Thread.java:748)
https://pastebin.com/raw/xX4nCfax
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |