From ec3e79f8e1d9f985831ccb71bf5f7c02f1d76bdf Mon Sep 17 00:00:00 2001 From: Ray Koopa Date: Sun, 23 Apr 2017 17:24:02 +0200 Subject: [PATCH] Fix layout of ST1 files. --- src/Syroot.Worms/Gen2/Worms2/Team.cs | 86 +++++++++---------- src/Syroot.Worms/Gen2/Worms2/TeamContainer.cs | 44 +++++----- 2 files changed, 63 insertions(+), 67 deletions(-) diff --git a/src/Syroot.Worms/Gen2/Worms2/Team.cs b/src/Syroot.Worms/Gen2/Worms2/Team.cs index 530ed82..f78e5f6 100644 --- a/src/Syroot.Worms/Gen2/Worms2/Team.cs +++ b/src/Syroot.Worms/Gen2/Worms2/Team.cs @@ -61,38 +61,6 @@ namespace Syroot.Worms.Gen2.Worms2 /// public string Worm8Name; - /// - /// The number of games lost. - /// - public int GamesLost; - - /// - /// The number of games won. - /// - public int GamesWon; - - /// - /// The number of opponent worms killed by this team. - /// - public int WormsKilled; - - /// - /// The number of worms which got killed in this team. - /// - public int WormsLost; - - /// - /// The AI intelligence, from 0-64, where 0 is human-controlled. - /// - public int CpuLevel; - - public int KillsKilled; - - /// - /// The number of games played, always being 0 for AI controlled teams. - /// - public int GamesPlayed; - public int Unknown2; public int Unknown3; public int Unknown4; @@ -114,26 +82,52 @@ namespace Syroot.Worms.Gen2.Worms2 public int Unknown20; public int Unknown21; public int Unknown22; - - /// - /// The number of hits goaled by this team. - /// - public int Hits; - - /// - /// The number of hits by others on this team. - /// - public int HitsByOthers; - public int Unknown23; public int Unknown24; public int Unknown25; + + /// + /// The number of games lost. + /// + public int GamesLost; + + /// + /// The number of games won. + /// + public int GamesWon; + public int Unknown26; - - public int Difference; - public int Unknown27; + /// + /// The number of opponent worms killed by this team. + /// + public int WormsKilled; + + /// + /// The number of worms which got killed in this team. + /// + public int WormsLost; + + /// + /// The AI intelligence difficulty level, from 0-100, where 0 is human-controlled. + /// + public int CpuLevel; + + public int Unknown28; + public int Unknown29; + public int Unknown30; + + /// + /// The "difference" statistics value. + /// + public int Difference; + + /// + /// The number of games played, always being 0 for AI controlled teams. + /// + public int GamesPlayed; + /// /// The points gained by this team. /// diff --git a/src/Syroot.Worms/Gen2/Worms2/TeamContainer.cs b/src/Syroot.Worms/Gen2/Worms2/TeamContainer.cs index 9d76faa..2cdfca7 100644 --- a/src/Syroot.Worms/Gen2/Worms2/TeamContainer.cs +++ b/src/Syroot.Worms/Gen2/Worms2/TeamContainer.cs @@ -80,13 +80,6 @@ namespace Syroot.Worms.Gen2.Worms2 Worm6Name = ReadFixedString(reader, 20), Worm7Name = ReadFixedString(reader, 20), Worm8Name = ReadFixedString(reader, 20), - GamesLost = reader.ReadInt32(), - GamesWon = reader.ReadInt32(), - WormsKilled = reader.ReadInt32(), - WormsLost = reader.ReadInt32(), - CpuLevel = reader.ReadInt32(), - KillsKilled = reader.ReadInt32(), - GamesPlayed = reader.ReadInt32(), Unknown2 = reader.ReadInt32(), Unknown3 = reader.ReadInt32(), Unknown4 = reader.ReadInt32(), @@ -108,15 +101,22 @@ namespace Syroot.Worms.Gen2.Worms2 Unknown20 = reader.ReadInt32(), Unknown21 = reader.ReadInt32(), Unknown22 = reader.ReadInt32(), - Hits = reader.ReadInt32(), - HitsByOthers = reader.ReadInt32(), Unknown23 = reader.ReadInt32(), Unknown24 = reader.ReadInt32(), Unknown25 = reader.ReadInt32(), + GamesLost = reader.ReadInt32(), + GamesWon = reader.ReadInt32(), Unknown26 = reader.ReadInt32(), - Difference = reader.ReadInt32(), Unknown27 = reader.ReadInt32(), - Points = reader.ReadInt32() + WormsKilled = reader.ReadInt32(), + WormsLost = reader.ReadInt32(), + CpuLevel = reader.ReadInt32(), + Unknown28 = reader.ReadInt32(), + Unknown29 = reader.ReadInt32(), + Unknown30 = reader.ReadInt32(), + Difference = reader.ReadInt32(), + GamesPlayed = reader.ReadInt32(), + Points = reader.ReadInt32(), }); } } @@ -155,13 +155,6 @@ namespace Syroot.Worms.Gen2.Worms2 WriteFixedString(writer, team.Worm6Name, 20); WriteFixedString(writer, team.Worm7Name, 20); WriteFixedString(writer, team.Worm8Name, 20); - writer.Write(team.GamesLost); - writer.Write(team.GamesWon); - writer.Write(team.WormsKilled); - writer.Write(team.WormsLost); - writer.Write(team.CpuLevel); - writer.Write(team.KillsKilled); - writer.Write(team.GamesPlayed); writer.Write(team.Unknown2); writer.Write(team.Unknown3); writer.Write(team.Unknown4); @@ -183,14 +176,23 @@ namespace Syroot.Worms.Gen2.Worms2 writer.Write(team.Unknown20); writer.Write(team.Unknown21); writer.Write(team.Unknown22); - writer.Write(team.Hits); - writer.Write(team.HitsByOthers); writer.Write(team.Unknown23); writer.Write(team.Unknown24); writer.Write(team.Unknown25); + writer.Write(team.GamesLost); + writer.Write(team.GamesWon); writer.Write(team.Unknown26); - writer.Write(team.Difference); writer.Write(team.Unknown27); + writer.Write(team.WormsKilled); + writer.Write(team.WormsLost); + writer.Write(team.CpuLevel); + writer.Write(team.Unknown28); + writer.Write(team.Unknown29); + writer.Write(team.Unknown30); + writer.Write(team.WormsKilled); + writer.Write(team.WormsLost); + writer.Write(team.Difference); + writer.Write(team.GamesPlayed); writer.Write(team.Points); } }