|
@ -138,7 +138,7 @@ impl std::default::Default for Character { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
#[derive(Copy, Clone, Debug, PartialEq, Default)]
|
|
|
|
|
|
|
|
|
#[derive(Copy, Clone, PSOPacketData, Default)]
|
|
|
#[repr(C)]
|
|
|
#[repr(C)]
|
|
|
pub struct SelectScreenCharacter {
|
|
|
pub struct SelectScreenCharacter {
|
|
|
pub exp: u32,
|
|
|
pub exp: u32,
|
|
@ -169,20 +169,6 @@ pub struct SelectScreenCharacter { |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
impl SelectScreenCharacter {
|
|
|
impl SelectScreenCharacter {
|
|
|
pub const SIZE: usize = 0x7C;
|
|
|
|
|
|
|
|
|
|
|
|
pub fn from_le_bytes(bytes: [u8; 0x7C]) -> Result<SelectScreenCharacter, crate::PacketParseError> {
|
|
|
|
|
|
unsafe {
|
|
|
|
|
|
Ok(std::mem::transmute(bytes))
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn to_le_bytes(&self) -> [u8; 0x7C] {
|
|
|
|
|
|
unsafe {
|
|
|
|
|
|
std::mem::transmute(*self)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn as_character(&self) -> Character {
|
|
|
pub fn as_character(&self) -> Character {
|
|
|
Character {
|
|
|
Character {
|
|
|
exp: self.exp,
|
|
|
exp: self.exp,
|
|
|