public void ConvertFiveByteControlCodeToTag(int startIndex)
{
short variable = 0;
string tagType = "";
string completeTag = "";
if ((byte)charData[startIndex + 2] == 0)
{
#region Type switch
switch ((byte)charData[startIndex + 4])
{
case (byte)FiveByteTypes.PlayerName:
tagType = "Player";
break;
case (byte)FiveByteTypes.CharDrawInstant:
tagType = "Draw:Instant";
break;
case (byte)FiveByteTypes.CharDrawByChar:
tagType = "Draw:ByChar";
break;
case (byte)FiveByteTypes.TwoChoices:
tagType = "Two Choices";
break;
case (byte)FiveByteTypes.ThreeChoices:
tagType = "Three Choices";
break;
case (byte)FiveByteTypes.AButtonIcon:
tagType = "A Button";
break;
case (byte)FiveByteTypes.BButtonIcon:
tagType = "B Button";
break;
case (byte)FiveByteTypes.CStickIcon:
tagType = "C-Stick";
break;
case (byte)FiveByteTypes.LTriggerIcon:
tagType = "L Trigger";
break;
case (byte)FiveByteTypes.RTriggerIcon:
tagType = "R Trigger";
break;
case (byte)FiveByteTypes.XButtonIcon:
tagType = "X Button";
break;
case (byte)FiveByteTypes.YButtonIcon:
tagType = "Y Button";
break;
case (byte)FiveByteTypes.ZButtonIcon:
tagType = "Z Button";
break;
case (byte)FiveByteTypes.DPadIcon:
tagType = "D Pad";
break;
case (byte)FiveByteTypes.StaticControlStickIcon:
tagType = "Control Stick";
break;
case (byte)FiveByteTypes.LeftArrowIcon:
tagType = "Left Arrow";
break;
case (byte)FiveByteTypes.RightArrowIcon:
tagType = "Right Arrow";
break;
case (byte)FiveByteTypes.UpArrowIcon:
tagType = "Up Arrow";
break;
case (byte)FiveByteTypes.DownArrowIcon:
tagType = "Down Arrow";
break;
case (byte)FiveByteTypes.ControlStickMovingUp:
tagType = "Control Stick:Up";
break;
case (byte)FiveByteTypes.ControlStickMovingDown:
tagType = "Control Stick:Down";
break;
case (byte)FiveByteTypes.ControlStickMovingLeft:
tagType = "Control Stick:Left";
break;
case (byte)FiveByteTypes.ControlStickMovingRight:
tagType = "Control Stick:Right";
break;
case (byte)FiveByteTypes.ControlStickMovingUpAndDown:
tagType = "Control Stick:Up+Down";
break;
case (byte)FiveByteTypes.ControlStickMovingLeftAndRight:
tagType = "Control Stick:Left+Right";
break;
case (byte)FiveByteTypes.ChoiceOne:
tagType = "Choice One";
break;
case (byte)FiveByteTypes.ChoiceTwo:
tagType = "Choice Two";
break;
case (byte)FiveByteTypes.CanonGameBalls:
tagType = "Canon Game Balls";
break;
case (byte)FiveByteTypes.BrokenVasePayment:
tagType = "Broken Vase Payment";
break;
case (byte)FiveByteTypes.AuctionCharacter:
tagType = "Auction Attendee";
break;
case (byte)FiveByteTypes.AuctionItemName:
tagType = "Auction Item Name";
break;
case (byte)FiveByteTypes.AuctionPersonBid:
tagType = "Auction Attendee Bid";
break;
case (byte)FiveByteTypes.AuctionStartingBid:
tagType = "Auction Starting Bid";
break;
case (byte)FiveByteTypes.PlayerAuctionBidSelector:
tagType = "Player Auction Bid Selector";
break;
case (byte)FiveByteTypes.StarburstAIcon:
tagType = "Starburst A Button";
break;
case (byte)FiveByteTypes.OrcaBlowCount:
tagType = "Orca Blow Count";
break;
case (byte)FiveByteTypes.PirateShipPassword:
tagType = "Pirate Ship Password";
break;
case (byte)FiveByteTypes.TargetStarburstIcon:
tagType = "Target Starburst";
break;
case (byte)FiveByteTypes.PostOfficeGamePlayerLetterCount:
tagType = "Player Letter Count";
break;
case (byte)FiveByteTypes.PostOfficeGameRupeeReward:
tagType = "Letter Rupee Reward";
break;
case (byte)FiveByteTypes.PostBoxLetterCount:
tagType = "Letters";
break;
case (byte)FiveByteTypes.RemainingKoroks:
tagType = "Remaining Koroks";
break;
case (byte)FiveByteTypes.RemainingForestWaterTime:
tagType = "Remaining Forest Water Time";
break;
case (byte)FiveByteTypes.FlightPlatformGameTime:
tagType = "Flight Control Game Time";
break;
case (byte)FiveByteTypes.FlightPlatformGameRecord:
tagType = "Flight Control Game Record";
break;
case (byte)FiveByteTypes.BeedlePointCount:
tagType = "Beedle Points";
break;
case (byte)FiveByteTypes.JoyPendantCountMsMarie:
tagType = "Joy Pendant Count (Ms. Marie)";
break;
case (byte)FiveByteTypes.MsMariePendantTotal:
tagType = "Pendant Total";
break;
case (byte)FiveByteTypes.PigGameTime:
tagType = "Pig Game Time";
break;
case (byte)FiveByteTypes.SailingGameRupeeReward:
tagType = "Sailing Game Rupee Reward";
break;
case (byte)FiveByteTypes.CurrentBombCapacity:
tagType = "Current Bomb Capacity";
break;
case (byte)FiveByteTypes.CurrentArrowCapacity:
tagType = "Current Arrow Capacity";
break;
case (byte)FiveByteTypes.HeartIcon:
tagType = "Heart Icon";
break;
case (byte)FiveByteTypes.MusicNoteIcon:
tagType = "Music Note Icon";
break;
case (byte)FiveByteTypes.TargetLetterCount:
tagType = "Target Letter Count";
break;
case (byte)FiveByteTypes.FishmanHitCount:
tagType = "Fishman Hit Count";
break;
case (byte)FiveByteTypes.FishmanRupeeReward:
tagType = "Fishman Rupee Reward";
break;
case (byte)FiveByteTypes.BokoBabaSeedCount:
tagType = "Boko Baba Seed Count";
break;
case (byte)FiveByteTypes.SkullNecklaceCount:
tagType = "Skull Necklace Count";
break;
case(byte)FiveByteTypes.ChuJellyCount:
tagType = "Chu Jelly Count";
break;
case (byte)FiveByteTypes.JoyPendantCountBeedle:
tagType = "Joy Pendant Count (Beedle)";
break;
case (byte)FiveByteTypes.GoldenFeatherCount:
tagType = "Golden Feather Count";
break;
case (byte)FiveByteTypes.KnightsCrestCount:
tagType = "Knight's Crest Count";
break;
case (byte)FiveByteTypes.BeedlePriceOffer:
tagType = "Beedle Price Offer";
break;
case (byte)FiveByteTypes.BokoBabaSeedSellSelector:
tagType = "Boko Baba Seed Sell Selector";
break;
case (byte)FiveByteTypes.SkullNecklaceSellSelector:
tagType = "Skull Necklace Sell Selector";
break;
case (byte)FiveByteTypes.ChuJellySellSelector:
tagType = "Chu Jelly Sell Selector";
break;
case (byte)FiveByteTypes.JoyPendantSellSelector:
tagType = "Joy Pendant Sell Selector";
break;
case (byte)FiveByteTypes.GoldenFeatherSellSelector:
tagType = "Golden Feather Sell Selector";
break;
case (byte)FiveByteTypes.KnightsCrestSellSelector:
tagType = "Knight's Crest Sell Selector";
break;
default:
tagType = "Unknown:" + (byte)charData[startIndex + 4];
break;
}
#endregion
completeTag = "<" + tagType + ">";
charData.InsertRange(startIndex + 5, Encoding.ASCII.GetBytes(completeTag));
charData.RemoveRange(startIndex, 5);
}
else if (((byte)charData[startIndex + 2] == 1))
{
tagType = "Sound";
byte[] byteBuffer = new byte[] { (byte)charData[startIndex + 4], (byte)charData[startIndex + 3] };
variable = BitConverter.ToInt16(byteBuffer, 0);
completeTag = "<" + tagType + ":" + variable + ">";
charData.InsertRange(startIndex + 5, Encoding.ASCII.GetBytes(completeTag));
charData.RemoveRange(startIndex, 5);
}
else if (((byte)charData[startIndex + 2] == 2))
{
tagType = "Camera Modifier";
byte[] byteBuffer = new byte[] { (byte)charData[startIndex + 4], (byte)charData[startIndex + 3] };
variable = BitConverter.ToInt16(byteBuffer, 0);
completeTag = "<" + tagType + ":" + variable + ">";
charData.InsertRange(startIndex + 5, Encoding.ASCII.GetBytes(completeTag));
charData.RemoveRange(startIndex, 5);
}
else if (((byte)charData[startIndex + 2] == 3))
{
tagType = "Anim";
byte[] byteBuffer = new byte[] { (byte)charData[startIndex + 4], (byte)charData[startIndex + 3] };
variable = BitConverter.ToInt16(byteBuffer, 0);
completeTag = "<" + tagType + ":" + variable + ">";
charData.InsertRange(startIndex + 5, Encoding.ASCII.GetBytes(completeTag));
charData.RemoveRange(startIndex, 5);
}
}