Skip to content

Commit

Permalink
ParticleGenerationSystem: rename lists
Browse files Browse the repository at this point in the history
we really need to change this name lol
  • Loading branch information
hyperbx committed Aug 12, 2024
1 parent cdb9b91 commit 15ad654
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Marathon/Formats/Particle/ParticleGenerationSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public ParticleGenerationSystem(string file, bool serialise = false)

public class FormatData
{
public List<string> Effects { get; set; } = [];
public List<string> EffectBanks { get; set; } = [];

public List<string> Textures { get; set; } = [];
public List<string> TextureBanks { get; set; } = [];

public List<ParticleMaterial> Materials { get; set; } = [];
}
Expand All @@ -67,11 +67,11 @@ public override void Load(Stream stream)

reader.JumpTo(particleEffectBankOffset, true);
for (int i = 0; i < particleEffectBankCount; i++)
Data.Effects.Add(reader.ReadNullPaddedString(0x20));
Data.EffectBanks.Add(reader.ReadNullPaddedString(0x20));

reader.JumpTo(particleTextureBankOffset, true);
for (int i = 0; i < particleTextureBankCount; i++)
Data.Textures.Add(reader.ReadNullPaddedString(0x20));
Data.TextureBanks.Add(reader.ReadNullPaddedString(0x20));

reader.JumpTo(materialOffset, true);
for (int i = 0; i < materialCount; i++)
Expand All @@ -94,8 +94,8 @@ public override void Save(Stream stream)
writer.WriteSignature(Signature);

writer.WriteNulls(0x04);
writer.Write(Data.Effects.Count);
writer.Write(Data.Textures.Count);
writer.Write(Data.EffectBanks.Count);
writer.Write(Data.TextureBanks.Count);
writer.Write(Data.Materials.Count);
writer.Write(ParticleMaterial.Size);
writer.AddOffset("particleEffectBankOffset");
Expand All @@ -104,12 +104,12 @@ public override void Save(Stream stream)

writer.FillOffset("particleEffectBankOffset", true);

foreach (string effect in Data.Effects)
foreach (string effect in Data.EffectBanks)
writer.WriteNullPaddedString(effect, 0x20);

writer.FillOffset("particleTextureBankOffset", true);

foreach (string texture in Data.Textures)
foreach (string texture in Data.TextureBanks)
writer.WriteNullPaddedString(texture, 0x20);

writer.FillOffset("materialOffset", true);
Expand Down

0 comments on commit 15ad654

Please sign in to comment.