Skip to content

Commit cb87f50

Browse files
committed
flash models
1 parent b721f35 commit cb87f50

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

CathodeLib/Scripts/CATHODE/SoundFlashModels.cs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ namespace CATHODE
88
/* DATA/ENV/PRODUCTION/x/WORLD/SOUNDFLASHMODELS.DAT */
99
public class SoundFlashModels : CathodeFile
1010
{
11+
//This stores the models which use flash textures, along with the flash texture ID
12+
1113
public List<FlashModel> Entries = new List<FlashModel>();
12-
public static new Implementation Implementation = Implementation.NONE;
14+
public static new Implementation Implementation = Implementation.CREATE | Implementation.LOAD | Implementation.SAVE;
1315
public SoundFlashModels(string path) : base(path) { }
1416

1517
#region FILE_IO
@@ -22,11 +24,10 @@ override protected bool LoadInternal()
2224
for (int i = 0; i < entryCount; i++)
2325
{
2426
FlashModel f = new FlashModel();
25-
f.unk1 = reader.ReadInt16();
26-
f.unk2 = reader.ReadInt16();
27-
int count = reader.ReadInt32();
28-
for (int x = 0; x < count; x++)
29-
f.unk3.Add(reader.ReadInt32());
27+
f.flash_texture_id = reader.ReadInt32(); //flash textures end in [FLASH]
28+
int modelCount = reader.ReadInt32();
29+
for (int x = 0; x < modelCount; x++)
30+
f.model_indexes.Add(reader.ReadInt32());
3031
Entries.Add(f);
3132
}
3233
}
@@ -42,10 +43,9 @@ override protected bool SaveInternal()
4243
writer.Write(Entries.Count);
4344
for (int i = 0; i < Entries.Count; i++)
4445
{
45-
writer.Write((Int16)Entries[i].unk1);
46-
writer.Write((Int16)Entries[i].unk2);
47-
for (int x = 0; x < Entries[i].unk3.Count; x++)
48-
writer.Write(Entries[i].unk3[x]);
46+
writer.Write(Entries[i].flash_texture_id);
47+
for (int x = 0; x < Entries[i].model_indexes.Count; x++)
48+
writer.Write(Entries[i].model_indexes[x]);
4949
}
5050
}
5151
return true;
@@ -55,9 +55,8 @@ override protected bool SaveInternal()
5555
#region STRUCTURES
5656
public class FlashModel
5757
{
58-
public int unk1;
59-
public int unk2;
60-
public List<int> unk3 = new List<int>();
58+
public int flash_texture_id;
59+
public List<int> model_indexes = new List<int>();
6160
}
6261
#endregion
6362
}

0 commit comments

Comments
 (0)