mirror of
https://github.com/redstrate/Kawari.git
synced 2025-04-25 16:27:46 +00:00
Add more IPC data types to the size test
It doesn't pass for some, but it's a start.
This commit is contained in:
parent
29954be1a6
commit
60e4713b96
1 changed files with 12 additions and 3 deletions
15
src/ipc.rs
15
src/ipc.rs
|
@ -395,8 +395,8 @@ impl IPCSegment {
|
||||||
IPCStructData::InitResponse { .. } => 16,
|
IPCStructData::InitResponse { .. } => 16,
|
||||||
IPCStructData::InitZone { .. } => 103,
|
IPCStructData::InitZone { .. } => 103,
|
||||||
IPCStructData::ActorControlSelf { .. } => 32,
|
IPCStructData::ActorControlSelf { .. } => 32,
|
||||||
IPCStructData::PlayerStats { .. } => 228,
|
IPCStructData::PlayerStats { .. } => 224,
|
||||||
IPCStructData::PlayerSetup { .. } => 2544,
|
IPCStructData::PlayerSetup { .. } => 2545,
|
||||||
IPCStructData::UpdateClassInfo { .. } => 48,
|
IPCStructData::UpdateClassInfo { .. } => 48,
|
||||||
IPCStructData::FinishLoading { .. } => todo!(),
|
IPCStructData::FinishLoading { .. } => todo!(),
|
||||||
IPCStructData::PlayerSpawn { .. } => 656,
|
IPCStructData::PlayerSpawn { .. } => 656,
|
||||||
|
@ -454,6 +454,10 @@ mod tests {
|
||||||
},
|
},
|
||||||
IPCStructData::ActorControlSelf(ActorControlSelf::default()),
|
IPCStructData::ActorControlSelf(ActorControlSelf::default()),
|
||||||
IPCStructData::InitializeChat { unk: [0; 8] },
|
IPCStructData::InitializeChat { unk: [0; 8] },
|
||||||
|
IPCStructData::PlayerStats(PlayerStats::default()),
|
||||||
|
IPCStructData::PlayerSetup(PlayerSetup::default()),
|
||||||
|
IPCStructData::UpdateClassInfo(UpdateClassInfo::default()),
|
||||||
|
IPCStructData::PlayerSpawn(PlayerSpawn::default()),
|
||||||
];
|
];
|
||||||
|
|
||||||
for ipc in &ipc_types {
|
for ipc in &ipc_types {
|
||||||
|
@ -471,7 +475,12 @@ mod tests {
|
||||||
|
|
||||||
let buffer = cursor.into_inner();
|
let buffer = cursor.into_inner();
|
||||||
|
|
||||||
assert_eq!(buffer.len(), ipc_segment.calc_size() as usize);
|
assert_eq!(
|
||||||
|
buffer.len(),
|
||||||
|
ipc_segment.calc_size() as usize,
|
||||||
|
"{:?} did not match size!",
|
||||||
|
ipc
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue