Skip to content

Commit

Permalink
Merge pull request #9 from ogmage78/hex
Browse files Browse the repository at this point in the history
Show Guids as Hex and Display hex opcodes
  • Loading branch information
tfarley authored Apr 23, 2017
2 parents 416229b + d60935e commit 123192c
Show file tree
Hide file tree
Showing 14 changed files with 182 additions and 72 deletions.
10 changes: 6 additions & 4 deletions aclogview/CM_Combat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using aclogview;

public class CM_Combat : MessageProcessor {

Expand Down Expand Up @@ -72,7 +73,8 @@ public static TargetedMeleeAttack read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("i_targetID = " + i_targetID);
rootNode.Nodes.Add("i_targetID = " + Utility.FormatGuid(this.i_targetID));

rootNode.Nodes.Add("i_ah = " + i_ah);
rootNode.Nodes.Add("i_power_level = " + i_power_level);
treeView.Nodes.Add(rootNode);
Expand All @@ -96,7 +98,7 @@ public static TargetedMissileAttack read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("i_targetID = " + i_targetID);
rootNode.Nodes.Add("i_target_id = " + Utility.FormatGuid(this.i_targetID));
rootNode.Nodes.Add("i_ah = " + i_ah);
rootNode.Nodes.Add("i_accuracy_level = " + i_accuracy_level);
treeView.Nodes.Add(rootNode);
Expand Down Expand Up @@ -134,7 +136,7 @@ public static QueryHealth read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("i_target = " + i_target);
rootNode.Nodes.Add("i_target_ = " + Utility.FormatGuid(this.i_target));
treeView.Nodes.Add(rootNode);
}
}
Expand All @@ -154,7 +156,7 @@ public static QueryHealthResponse read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("target = " + target);
rootNode.Nodes.Add("target = " +Utility.FormatGuid(this.target));
rootNode.Nodes.Add("health = " + health);
treeView.Nodes.Add(rootNode);
}
Expand Down
13 changes: 7 additions & 6 deletions aclogview/CM_Communication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using aclogview;

public class CM_Communication : MessageProcessor {

Expand Down Expand Up @@ -252,8 +253,8 @@ public override void contributeToTreeView(TreeView treeView)
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("MessageText = " + MessageText.m_buffer);
rootNode.Nodes.Add("SenderName = " + SenderName.m_buffer);
rootNode.Nodes.Add("SenderID = " + SenderID);
rootNode.Nodes.Add("SenderName = " + SenderName.m_buffer);
rootNode.Nodes.Add("SenderID = " + Utility.FormatGuid(this.SenderID));
rootNode.Nodes.Add("ChatMessageType = " + ChatMessageType);
treeView.Nodes.Add(rootNode);
}
Expand Down Expand Up @@ -284,7 +285,7 @@ public override void contributeToTreeView(TreeView treeView)
rootNode.Expand();
rootNode.Nodes.Add("MessageText = " + MessageText.m_buffer);
rootNode.Nodes.Add("SenderName = " + SenderName.m_buffer);
rootNode.Nodes.Add("SenderID = " + SenderID);
rootNode.Nodes.Add("SenderID = " +Utility.FormatGuid(this.SenderID));
rootNode.Nodes.Add("Range = " + Range);
rootNode.Nodes.Add("ChatMessageType = " + ChatMessageType);
treeView.Nodes.Add(rootNode);
Expand Down Expand Up @@ -317,9 +318,9 @@ public override void contributeToTreeView(TreeView treeView)
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("MessageText = " + MessageText.m_buffer);
rootNode.Nodes.Add("SenderName = " + SenderName.m_buffer);
rootNode.Nodes.Add("SenderID = " + SenderID);
rootNode.Nodes.Add("TargetID = " + TargetID);
rootNode.Nodes.Add("SenderName = " + SenderName.m_buffer);
rootNode.Nodes.Add("SenderID = " + Utility.FormatGuid(this.SenderID));
rootNode.Nodes.Add("TargetID = " + Utility.FormatGuid(this.TargetID));
rootNode.Nodes.Add("ChatMessageType = " + ChatMessageType);
rootNode.Nodes.Add("Unknown = " + Unknown);
treeView.Nodes.Add(rootNode);
Expand Down
10 changes: 6 additions & 4 deletions aclogview/CM_Inventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Threading.Tasks;
using System.Windows.Forms;

using aclogview;

public class CM_Inventory : MessageProcessor {

public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView) {
Expand Down Expand Up @@ -167,8 +169,8 @@ public static UseWithTargetEvent read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("i_object = " + i_object);
rootNode.Nodes.Add("i_target = " + i_target);
rootNode.Nodes.Add("i_object = " + Utility.FormatGuid(this.i_object));
rootNode.Nodes.Add("i_target = " + Utility.FormatGuid(this.i_target));
treeView.Nodes.Add(rootNode);
}
}
Expand Down Expand Up @@ -275,8 +277,8 @@ public static GiveObjectRequest read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("i_targetID = " + i_targetID);
rootNode.Nodes.Add("i_objectID = " + i_objectID);
rootNode.Nodes.Add("i_targetID = " + Utility.FormatGuid(this.i_targetID));
rootNode.Nodes.Add("i_ObjectID = " + Utility.FormatGuid(this.i_objectID));
rootNode.Nodes.Add("i_amount = " + i_amount);
treeView.Nodes.Add(rootNode);
}
Expand Down
6 changes: 4 additions & 2 deletions aclogview/CM_Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Threading.Tasks;
using System.Windows.Forms;

using aclogview;

public class CM_Item : MessageProcessor {

public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView) {
Expand Down Expand Up @@ -54,7 +56,7 @@ public static QueryItemMana read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("target = " + target);
rootNode.Nodes.Add("target = " + Utility.FormatGuid(this.target));
treeView.Nodes.Add(rootNode);
}
}
Expand Down Expand Up @@ -109,7 +111,7 @@ public static QueryItemManaResponse read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("target = " + target);
rootNode.Nodes.Add("target = " + Utility.FormatGuid(this.target));
rootNode.Nodes.Add("mana = " + mana);
rootNode.Nodes.Add("fSuccess = " + fSuccess);
treeView.Nodes.Add(rootNode);
Expand Down
14 changes: 8 additions & 6 deletions aclogview/CM_Magic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Threading.Tasks;
using System.Windows.Forms;

using aclogview;

public class CM_Magic : MessageProcessor {

public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView) {
Expand Down Expand Up @@ -93,8 +95,8 @@ public static CastTargetedSpell read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("i_target = " + i_target);
rootNode.Nodes.Add("i_spell_id = " + i_spell_id);
rootNode.Nodes.Add("i_target = " + Utility.FormatGuid(this.i_target));
rootNode.Nodes.Add("i_spell_id = " + Utility.FormatGuid((uint)this.i_spell_id));
treeView.Nodes.Add(rootNode);
}
}
Expand All @@ -110,8 +112,8 @@ public static CastUntargetedSpell read(BinaryReader binaryReader) {

public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("i_spell_id = " + i_spell_id);
rootNode.Expand();
rootNode.Nodes.Add("i_spell_id = " + Utility.FormatGuid((uint)this.i_spell_id));
treeView.Nodes.Add(rootNode);
}
}
Expand All @@ -128,7 +130,7 @@ public static RemoveSpell read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("i_spell_id = " + i_spell_id);
rootNode.Nodes.Add("i_spell_id = " + Utility.FormatGuid((uint)this.i_spell_id));
treeView.Nodes.Add(rootNode);
}
}
Expand All @@ -145,7 +147,7 @@ public static UpdateSpell read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("i_spell_id = " + i_spell_id);
rootNode.Nodes.Add("i_spell_id = " + Utility.FormatGuid((uint)this.i_spell_id));
treeView.Nodes.Add(rootNode);
}
}
Expand Down
13 changes: 8 additions & 5 deletions aclogview/CM_Movement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Threading.Tasks;
using System.Windows.Forms;

using aclogview;

class CM_Movement : MessageProcessor {

public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView) {
Expand Down Expand Up @@ -268,8 +270,9 @@ public static UpdatePosition read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("flags = " + flags);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
rootNode.Nodes.Add("flags = " + Utility.FormatGuid(this.flags));

TreeNode positionNode = rootNode.Nodes.Add("position = ");
position.contributeToTreeNode(positionNode);
if ((flags & 0x1) != 0) {
Expand Down Expand Up @@ -478,7 +481,7 @@ public static MovementEvent read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
rootNode.Nodes.Add("instance_timestamp = " + instance_timestamp);
rootNode.Nodes.Add("server_control_timestamp = " + server_control_timestamp);
rootNode.Nodes.Add("movement_timestamp = " + movement_timestamp);
Expand All @@ -489,8 +492,8 @@ public override void contributeToTreeView(TreeView treeView) {
rootNode.Nodes.Add("style = " + style);
TreeNode motionStateNode = rootNode.Nodes.Add("motionState__guessedname = ");
motionState__guessedname.contributeToTreeNode(motionStateNode);
rootNode.Nodes.Add("stickToObject = " + stickToObject);
rootNode.Nodes.Add("moveToObject = " + moveToObject);
rootNode.Nodes.Add("stickToObject = " + Utility.FormatGuid(stickToObject));
rootNode.Nodes.Add("moveToObject = " + Utility.FormatGuid(moveToObject));
TreeNode posNode = rootNode.Nodes.Add("moveToPos = ");
moveToPos.contributeToTreeNode(posNode);
rootNode.Nodes.Add("my_run_rate = " + my_run_rate);
Expand Down
30 changes: 16 additions & 14 deletions aclogview/CM_Physics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Threading.Tasks;
using System.Windows.Forms;

using aclogview;

public class CM_Physics : MessageProcessor {

public override bool acceptMessageData(BinaryReader messageDataReader, TreeView outputTreeView) {
Expand Down Expand Up @@ -876,8 +878,8 @@ public static ObjDescEvent read(BinaryReader binaryReader) {

public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
TreeNode descNode = rootNode.Nodes.Add("desc = ");
desc.contributeToTreeNode(descNode);
TreeNode timestampsNode = rootNode.Nodes.Add("timestamps = ");
Expand All @@ -904,7 +906,7 @@ public static CreateObject read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
TreeNode objdescNode = rootNode.Nodes.Add("objdesc = ");
objdesc.contributeToTreeNode(objdescNode);
TreeNode physicsdescNode = rootNode.Nodes.Add("physicsdesc = ");
Expand All @@ -927,7 +929,7 @@ public static CreatePlayer read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
treeView.Nodes.Add(rootNode);
}
}
Expand All @@ -946,7 +948,7 @@ public static DeleteObject read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
rootNode.Nodes.Add("instance_timestamp = " + instance_timestamp);
treeView.Nodes.Add(rootNode);
}
Expand All @@ -972,8 +974,8 @@ public static ParentEvent read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("child_id = " + child_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
rootNode.Nodes.Add("child_id = " + Utility.FormatGuid(this.child_id));
rootNode.Nodes.Add("child_location = " + child_location);
rootNode.Nodes.Add("placement_id = " + placement_id);
TreeNode timestampsNode = rootNode.Nodes.Add("timestamps = ");
Expand All @@ -996,7 +998,7 @@ public static PickupEvent read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
TreeNode timestampsNode = rootNode.Nodes.Add("timestamps = ");
timestamps.contributeToTreeNode(timestampsNode);
treeView.Nodes.Add(rootNode);
Expand All @@ -1019,7 +1021,7 @@ public static SetState read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
rootNode.Nodes.Add("new_state = " + new_state);
TreeNode timestampsNode = rootNode.Nodes.Add("timestamps = ");
timestamps.contributeToTreeNode(timestampsNode);
Expand All @@ -1045,7 +1047,7 @@ public static VectorUpdate read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
rootNode.Nodes.Add("velocity = " + velocity);
rootNode.Nodes.Add("omega = " + omega);
TreeNode timestampsNode = rootNode.Nodes.Add("timestamps = ");
Expand All @@ -1070,7 +1072,7 @@ public static SoundEvent read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
rootNode.Nodes.Add("sound = " + sound);
rootNode.Nodes.Add("volume = " + volume);
treeView.Nodes.Add(rootNode);
Expand Down Expand Up @@ -1108,7 +1110,7 @@ public static PlayScriptID read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
rootNode.Nodes.Add("script_id = " + script_id);
treeView.Nodes.Add(rootNode);
}
Expand All @@ -1130,7 +1132,7 @@ public static PlayScriptType read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
rootNode.Nodes.Add("script_type = " + script_type);
rootNode.Nodes.Add("mod = " + mod);
treeView.Nodes.Add(rootNode);
Expand All @@ -1155,7 +1157,7 @@ public static UpdateObject read(BinaryReader binaryReader) {
public override void contributeToTreeView(TreeView treeView) {
TreeNode rootNode = new TreeNode(this.GetType().Name);
rootNode.Expand();
rootNode.Nodes.Add("object_id = " + object_id);
rootNode.Nodes.Add("object_id = " + Utility.FormatGuid(this.object_id));
TreeNode objdescNode = rootNode.Nodes.Add("objdesc = ");
objdesc.contributeToTreeNode(objdescNode);
TreeNode physicsdescNode = rootNode.Nodes.Add("physicsdesc = ");
Expand Down
Loading

0 comments on commit 123192c

Please sign in to comment.