Skip to content

Commit e814990

Browse files
committed
Implement ghost 029, 02A, 02D
1 parent f6189c1 commit e814990

File tree

2 files changed

+46
-4
lines changed

2 files changed

+46
-4
lines changed

Src/GBX.NET/Engines/Game/CGameCtnGhost.chunkl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ CGameCtnGhost 0x03092000 // A ghost.
7373
int
7474
string GhostNickname
7575

76-
0x00E [TMU, TMF, MP3, TMT, MP4, TM2020]
76+
0x00E [TMU, TMF, MP3, TMT, MP4, TM2020] // GhostUid
7777

7878
0x00F [TMU, TMF, MP3, TMT, MP4, TM2020] // ghost login
7979
string GhostLogin
@@ -167,9 +167,16 @@ CGameCtnGhost 0x03092000 // A ghost.
167167

168168
0x028 (skippable) [MP4, TM2020] // title id
169169

170-
0x029 (skippable, ignore) [TM2020]
170+
0x029 (skippable) [TM2020]
171+
version
172+
int
173+
string
174+
string
175+
string
171176

172-
0x02A (skippable, ignore) [TM2020]
177+
0x02A (skippable) [TM2020]
178+
int
179+
int
173180

174181
0x02B (skippable, ignore) [TM2020]
175182

@@ -178,7 +185,7 @@ CGameCtnGhost 0x03092000 // A ghost.
178185
unixtime? WalltimeStartTimestamp
179186
unixtime? WalltimeEndTimestamp
180187

181-
0x02D (skippable, ignore) [TM2020]
188+
0x02D (skippable) [TM2020]
182189

183190
0x02E (skippable) [TM2020]
184191
string

Src/GBX.NET/Engines/Game/CGameCtnGhost.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,41 @@ public override void ReadWrite(CGameCtnGhost n, GbxReaderWriter rw)
228228
}
229229
}
230230

231+
public partial class Chunk0309202D
232+
{
233+
private readonly Chunk03092019 chunk019 = new();
234+
235+
public int U01;
236+
public int U02; // same as 02A
237+
public int U03; // same as 02A
238+
public int U04;
239+
240+
public override void ReadWrite(CGameCtnGhost n, GbxReaderWriter rw)
241+
{
242+
rw.Int32(ref U01);
243+
244+
if (U01 >= 1)
245+
{
246+
throw new Exception("Inputs stored separately");
247+
//chunk019.ReadWriteInputs(n, rw);
248+
}
249+
250+
rw.String(ref n.validate_ExeVersion);
251+
rw.UInt32(ref n.validate_ExeChecksum);
252+
rw.Int32(ref n.validate_OsKind);
253+
rw.Int32(ref n.validate_CpuKind);
254+
rw.UnixTime(ref n.walltimeStartTimestamp);
255+
rw.UnixTime(ref n.walltimeEndTimestamp);
256+
rw.String(ref n.validate_TitleId);
257+
rw.UInt256(ref n.validate_TitleChecksum);
258+
rw.Int32(ref U02);
259+
rw.Int32(ref U03);
260+
rw.Int32(ref n.validate_ValidationSeed);
261+
rw.Int32(ref U04);
262+
rw.String(ref n.validate_RaceSettings);
263+
}
264+
}
265+
231266
public partial class Checkpoint
232267
{
233268
public override string ToString()

0 commit comments

Comments
 (0)