If anyone has a refactored render animation class i'd need it, in exchange i can give a refactored soundbox class
Printable View
If anyone has a refactored render animation class i'd need it, in exchange i can give a refactored soundbox class
You mean BASType :whistle: not render animation anyone who has it refactored already has 'soundbox' refactored :)
Guessing it is in the config archive? If so what file # is it within the archive? Otherwise what index is it?
Im guessing Index 2, config 32?
Yes its in the config archive(client.config.js5)(archive 2), archive 32
Thanks for the 592 by the way. Here is the class from 812.
Code:package r812;
/* Class535 - Decompiled by JODE
* Visit http://jode.sourceforge.net/
*/
import java.util.Iterator;
import com.jagex.runescape.fs.RSByteBuffer;
import com.jagex.runescape.node.IterableNodeMap;
import com.jagex.runescape.node.Node;
import com.jagex.runescape.util.Util;
import com.jagex.runescape.vector.TransformationMatrix;
public class RenderEmoteDefinition {
public int[][] equipment_transforms;
RenderEmoteDefinitionLoader loader;
public int[] inv_item_slots;
public int[][] spot_anim_offsets;
public int[] max_equipment_rotation;
TransformationMatrix[] transformations;
public int stand_animation = -1;
public int[] idle_anims = null;
public int[] idle_anim_weight = null;
int total_weight = 0;
public int standing_ccw_turn = -1;
public int standing_cw_turn = -1;
public int walk_animation = -1;
public int walk_follow_full_turn_anim = -1;
public int walk_follow_ccw_turn_anim = -1;
public int walk_follow_cw_turn_anim = -1;
public int run_anim = -1;
public int run_follow_full_turn_anim = -1;
public int run_follow_ccw_turn_anim = -1;
public int run_follow_cw_turn_anim = -1;
public int slow_walk_anim = -1;
public int slow_walk_follow_full_turn_anim = -1;
public int slow_walk_follow_ccw_turn_anim = -1;
public int slow_walk_follow_cw_turn_anim = -1;
public int slow_walk_ccw_turn_anim = -1;
public int slow_walk_cw_turn_anim = -1;
public int run_ccw_turn_anim = -1;
public int run_cw_turn_anim = -1;
public int walk_ccw_turn_anim = -1;
public int walk_cw_turn_anim = -1;
public int hill_width = 0;
public int hill_height = 0;
public int hill_max_angle_x = 0;
public int hill_max_angle_z = 0;
public int yaw_acceleration = 0;
public int yaw_max_speed = 0;
public int roll_acceleration = 0;
public int roll_max_speed = 0;
public int roll_target_angle = 0;
public int pitch_acceleration = 0;
public int pitch_max_speed = 0;
public int pitch_target_angle = 0;
public int movement_acceleration = -1;
public int character_height = -1;
public boolean animate_shadow = true;
RenderEmoteDefinition() {
/* empty */
}
public int randomIdleAnimation() {
if (stand_animation != -1)
return stand_animation;
if (idle_anims != null) {
int i = (int) (Math.random() * total_weight);
int i_0_;
for (i_0_ = 0; i >= idle_anim_weight[i_0_]; i_0_++)
i -= idle_anim_weight[i_0_];
return idle_anims[i_0_];
}
return -1;
}
public TransformationMatrix[] transformations() {
if (transformations != null)
return transformations;
if (equipment_transforms == null)
return null;
transformations = new TransformationMatrix[equipment_transforms.length];
for (int i = 0; i < equipment_transforms.length; i++) {
int i_1_ = 0;
int i_2_ = 0;
int i_3_ = 0;
int i_4_ = 0;
int i_5_ = 0;
int i_6_ = 0;
if (equipment_transforms[i] != null) {
i_1_ = equipment_transforms[i][0];
i_2_ = equipment_transforms[i][1];
i_3_ = equipment_transforms[i][2];
i_4_ = equipment_transforms[i][3] << 3;
i_5_ = equipment_transforms[i][4] << 3;
i_6_ = equipment_transforms[i][5] << 3;
}
if (i_1_ != 0 || i_2_ != 0 || i_3_ != 0 || i_4_ != 0 || i_5_ != 0 || i_6_ != 0) {
TransformationMatrix t = transformations[i] = new TransformationMatrix();
if (i_6_ != 0)
t.rotateLocal(0.0F, 0.0F, 1.0F, SineTable.method4187(i_6_));
if (i_4_ != 0)
t.rotateLocal(1.0F, 0.0F, 0.0F, SineTable.method4187(i_4_));
if (i_5_ != 0)
t.rotateLocal(0.0F, 1.0F, 0.0F, SineTable.method4187(i_5_));
t.translate(i_1_, i_2_, i_3_);
}
}
return transformations;
}
public int[] animations() {
IterableNodeMap iterablehashmap = new IterableNodeMap(16);
Util.putIfNotContains(stand_animation, iterablehashmap);
if (idle_anims != null) {
int[] is = idle_anims;
for (int i = 0; i < is.length; i++) {
Util.putIfNotContains(is[i], iterablehashmap);
}
}
Util.putIfNotContains(standing_ccw_turn, iterablehashmap);
Util.putIfNotContains(standing_cw_turn, iterablehashmap);
Util.putIfNotContains(walk_animation, iterablehashmap);
Util.putIfNotContains(walk_follow_full_turn_anim, iterablehashmap);
Util.putIfNotContains(walk_follow_ccw_turn_anim, iterablehashmap);
Util.putIfNotContains(walk_follow_cw_turn_anim, iterablehashmap);
Util.putIfNotContains(run_anim, iterablehashmap);
Util.putIfNotContains(run_follow_full_turn_anim, iterablehashmap);
Util.putIfNotContains(run_follow_ccw_turn_anim, iterablehashmap);
Util.putIfNotContains(run_follow_cw_turn_anim, iterablehashmap);
Util.putIfNotContains(slow_walk_anim, iterablehashmap);
Util.putIfNotContains(slow_walk_follow_full_turn_anim, iterablehashmap);
Util.putIfNotContains(slow_walk_follow_ccw_turn_anim, iterablehashmap);
Util.putIfNotContains(slow_walk_follow_cw_turn_anim, iterablehashmap);
Util.putIfNotContains(slow_walk_ccw_turn_anim, iterablehashmap);
Util.putIfNotContains(slow_walk_cw_turn_anim, iterablehashmap);
Util.putIfNotContains(run_ccw_turn_anim, iterablehashmap);
Util.putIfNotContains(run_cw_turn_anim, iterablehashmap);
Util.putIfNotContains(walk_ccw_turn_anim, iterablehashmap);
Util.putIfNotContains(walk_cw_turn_anim, iterablehashmap);
int[] anims = new int[iterablehashmap.size()];
int write = 0;
Iterator iterator = iterablehashmap.iterator();
while (iterator.hasNext()) {
Node node = (Node) iterator.next();
anims[write++] = (int) node.uid;
}
return anims;
}
public boolean lowPriority(int i) {
if (i == -1)
return false;
if (stand_animation == i)
return true;
if (idle_anims != null) {
for (int i_8_ = 0; i_8_ < idle_anims.length; i_8_++) {
if (i == idle_anims[i_8_])
return true;
}
}
return false;
}
void unpack(RSByteBuffer rsbytebuffer) {
for (;;) {
int opcode = rsbytebuffer.readUnsignedByte();
if (opcode == 0)
break;
readOpcode(rsbytebuffer, opcode);
}
}
void readOpcode(RSByteBuffer buf, int opcode) {
if (opcode == 1) {
stand_animation = buf.readUnsignedSmart32_ex();
walk_animation = buf.readUnsignedSmart32_ex();
}
else if (opcode == 2)
slow_walk_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 3)
slow_walk_follow_full_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 4)
slow_walk_follow_ccw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 5)
slow_walk_follow_cw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 6)
run_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 7)
run_follow_full_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 8)
run_follow_ccw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 9)
run_follow_cw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 26) {
hill_width = (short) (buf.readUnsignedByte() * 4);
hill_height = (short) (buf.readUnsignedByte() * 4);
}
else if (opcode == 27) {
if (equipment_transforms == null)
equipment_transforms = new int[loader.bodydata.partsData.length][];
int i_9_ = buf.readUnsignedByte();
equipment_transforms[i_9_] = new int[6];
for (int i_10_ = 0; i_10_ < 6; i_10_++)
equipment_transforms[i_9_][i_10_] = buf.readSignedShort();
}
else if (opcode == 28) {
int i_11_ = buf.readUnsignedByte();
inv_item_slots = new int[i_11_];
for (int i_12_ = 0; i_12_ < i_11_; i_12_++) {
inv_item_slots[i_12_] = buf.readUnsignedByte();
if (inv_item_slots[i_12_] == 255)
inv_item_slots[i_12_] = -1;
}
}
else if (opcode == 29)
yaw_acceleration = buf.readUnsignedByte();
else if (opcode == 30)
yaw_max_speed = buf.readUnsignedShort();
else if (opcode == 31)
roll_acceleration = buf.readUnsignedByte();
else if (opcode == 32)
roll_max_speed = buf.readUnsignedShort();
else if (opcode == 33)
roll_target_angle = buf.readSignedShort();
else if (opcode == 34)
pitch_acceleration = buf.readUnsignedByte();
else if (opcode == 35)
pitch_max_speed = buf.readUnsignedShort();
else if (opcode == 36)
pitch_target_angle = buf.readSignedShort();
else if (opcode == 37)
movement_acceleration = buf.readUnsignedByte();
else if (opcode == 38)
standing_ccw_turn = buf.readUnsignedSmart32_ex();
else if (opcode == 39)
standing_cw_turn = buf.readUnsignedSmart32_ex();
else if (opcode == 40)
walk_follow_full_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 41)
walk_follow_ccw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 42)
walk_follow_cw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 43)
buf.readUnsignedShort();
else if (opcode == 44)
buf.readUnsignedShort();
else if (opcode == 45)
character_height = buf.readUnsignedShort();
else if (opcode == 46)
slow_walk_ccw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 47)
slow_walk_cw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 48)
run_ccw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 49)
run_cw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 50)
walk_ccw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 51)
walk_cw_turn_anim = buf.readUnsignedSmart32_ex();
else if (opcode == 52) {
int i_13_ = buf.readUnsignedByte();
idle_anims = new int[i_13_];
idle_anim_weight = new int[i_13_];
for (int i_14_ = 0; i_14_ < i_13_; i_14_++) {
idle_anims[i_14_] = buf.readUnsignedSmart32_ex();
int weight = buf.readUnsignedByte();
idle_anim_weight[i_14_] = weight;
total_weight += weight;
}
}
else if (opcode == 53)
animate_shadow = false;
else if (opcode == 54) {
hill_max_angle_x = buf.readUnsignedByte() << 6;
hill_max_angle_z = buf.readUnsignedByte() << 6;
}
else if (opcode == 55) {
if (max_equipment_rotation == null)
max_equipment_rotation = new int[loader.bodydata.partsData.length];
int ptr = buf.readUnsignedByte();
max_equipment_rotation[ptr] = buf.readUnsignedShort();
}
else if (opcode == 56) {
if (spot_anim_offsets == null)
spot_anim_offsets = new int[loader.bodydata.partsData.length][];
int slot = buf.readUnsignedByte();
spot_anim_offsets[slot] = new int[3];
for (int index = 0; index < 3; index++)
spot_anim_offsets[slot][index] = buf.readSignedShort();
}
}
}
Absolutely lovely, thank you.Quote:
Originally Posted by Advocatus [Only registered and activated users can see links. Click Here To Register...]
Check my client refactor on my github and feel free to contribute the soundbox class to it if you want.Quote:
Originally Posted by Teemuzz [Only registered and activated users can see links. Click Here To Register...]
I'll get my 667 refactor client on a public repo too.