private void addCharacterDlcExcelDataForEntry(String folder, int dlcObjectEntrySlot, String objectTableHashFileName, ObjectEntry entry, ExcelWorksheet ws, int excelRow) { ws.Cells["A"+excelRow].Value = dlcObjectEntrySlot; ws.Cells["B"+excelRow].Value = GlobalData.getInstance().getCharacterNameFromId(entry.characterId); ws.Cells["C"+excelRow].Value = entry.getFormattedObjectEntryType(); ws.Cells["D"+excelRow].Value = entry.id.ToString("X4"); ws.Cells["E"+excelRow].Value = entry.getFormattedCostumeSlot(); ws.Cells["F"+excelRow].Value = entry.modelName; ws.Cells["G"+excelRow].Value = entry.objxName; ws.Cells["H"+excelRow].Value = objectTableHashFileName; // Check if extra data exist, and print it ws.Cells["I"+excelRow].Value = getFileNameIfExists(null, folder, Hasher.hash(("obj/" + entry.modelName + ".gmo").ToLower()) + ".edat"); ws.Cells["J"+excelRow].Value = getFileNameIfExists(null, folder, Hasher.hash(("menu/JP/battle/chara_image/" + entry.modelName + ".gim").ToLower()) + ".edat"); ws.Cells["K"+excelRow].Value = getFileNameIfExists(null, folder, Hasher.hash(("menu/JP/battle/chara_image/" + entry.modelName + "_2.gim").ToLower()) + ".edat"); ws.Cells["L"+excelRow].Value = getFileNameIfExists(null, folder, Hasher.hash(("obj/" + entry.modelName + ".exex").ToLower()) + ".edat"); ws.Cells["M" + excelRow].Value = getFileNameIfExists(null, folder, Hasher.hash(("obj/" + entry.modelName + ".cosx").ToLower()) + ".edat"); ws.Cells["N"+excelRow].Value = getFileNameIfExists(null, folder, Hasher.hash(("obj/" + entry.modelName + ".objx").ToLower()) + ".edat"); }
private void createFromStream(Stream stream) { using (BinaryReader reader = new BinaryReader(stream)) { header = reader.ReadUInt32(); if (header != OBJECT_TABLE_HEADER_VALUE) { // Throw exception if needed throw new Exception("Not a valid Object table file"); } UInt32 entryNumber = reader.ReadUInt32(); for (int i = 0; i < entryNumber; i++) { ObjectEntry entry = new ObjectEntry(reader); entries.Add(entry); } } }
private String getCharacterDlcTextDataForEntry(String folder, int dlcObjectEntrySlot, String objectTableHashFileName, ObjectEntry entry) { StringBuilder builder = new StringBuilder(); builder.AppendLine("DLC Slot: " + dlcObjectEntrySlot); builder.AppendLine("Character: " + GlobalData.getInstance().getCharacterNameFromId(entry.characterId)); builder.AppendLine("Type: " + entry.getFormattedObjectEntryType()); builder.AppendLine("DLC ID: " + entry.id.ToString("X4")); builder.AppendLine("Costume slot: " + entry.getFormattedCostumeSlot()); builder.AppendLine("DLC Model name: " + entry.modelName); builder.AppendLine("DLC .objx name: " + entry.objxName); builder.AppendLine("Files:"); builder.AppendLine("\tController file: " + objectTableHashFileName); // Check if extra data exist, and print it addFileNameToStringBuilderIfExists("\tGMO File:", folder, Hasher.hash(("obj/" + entry.modelName + ".gmo").ToLower()) + ".edat", builder); addFileNameToStringBuilderIfExists("\tGIM File:", folder, Hasher.hash(("menu/JP/battle/chara_image/" + entry.modelName + ".gim").ToLower()) + ".edat", builder); addFileNameToStringBuilderIfExists("\tGIM Extra File:", folder, Hasher.hash(("menu/JP/battle/chara_image/" + entry.modelName + "_2.gim").ToLower()) + ".edat", builder); addFileNameToStringBuilderIfExists("\tEXEX File:", folder, Hasher.hash(("obj/" + entry.modelName + ".exex").ToLower()) + ".edat", builder); addFileNameToStringBuilderIfExists("\tCOSX File:", folder, Hasher.hash(("obj/" + entry.modelName + ".cosx").ToLower()) + ".edat", builder); addFileNameToStringBuilderIfExists("\tOBJX File:", folder, Hasher.hash(("obj/" + entry.modelName + ".objx").ToLower()) + ".edat", builder); builder.AppendLine("--------------------------------------"); return builder.ToString(); }