|
|
@ -5,7 +5,7 @@ use psopacket::PSOPacketData; |
|
|
|
use crate::{PSOPacketData, PacketParseError};
|
|
|
|
//use crate::PSOPacketData;
|
|
|
|
|
|
|
|
const DEFAULT_PALETTE_CONFIG: [u8; 0xE8] = [
|
|
|
|
pub const DEFAULT_PALETTE_CONFIG: [u8; 0xE8] = [
|
|
|
|
0, 0, 0, 0,
|
|
|
|
1, 0, 0, 0,
|
|
|
|
2, 0, 1, 0,
|
|
|
@ -66,7 +66,7 @@ const DEFAULT_PALETTE_CONFIG: [u8; 0xE8] = [ |
|
|
|
0, 0, 0, 0
|
|
|
|
];
|
|
|
|
|
|
|
|
const DEFAULT_TECH_MENU: [u8; 40] = [
|
|
|
|
pub const DEFAULT_TECH_MENU: [u8; 40] = [
|
|
|
|
0x00, 0x00,
|
|
|
|
0x06, 0x00,
|
|
|
|
0x03, 0x00,
|
|
|
@ -219,9 +219,7 @@ impl Character { |
|
|
|
|
|
|
|
impl std::default::Default for Character {
|
|
|
|
fn default() -> Character {
|
|
|
|
let mut c = Character::from_bytes(&mut std::io::Cursor::new([0; 0x190].to_vec())).unwrap();
|
|
|
|
c.config = DEFAULT_PALETTE_CONFIG;
|
|
|
|
c
|
|
|
|
Character::from_bytes(&mut std::io::Cursor::new([0; 0x190].to_vec())).unwrap()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
@ -402,6 +400,7 @@ pub struct FullCharacter { |
|
|
|
pub shortcuts: [u8; 2624],
|
|
|
|
pub autoreply: [u16; 172],
|
|
|
|
pub info_board: [u16; 172],
|
|
|
|
pub _unknown3: [u8; 28],
|
|
|
|
pub challenge_data: [u8; 320],
|
|
|
|
pub tech_menu: [u8; 40],
|
|
|
|
pub _unknown4: [u8; 44],
|
|
|
@ -411,9 +410,7 @@ pub struct FullCharacter { |
|
|
|
|
|
|
|
impl std::default::Default for FullCharacter {
|
|
|
|
fn default() -> FullCharacter {
|
|
|
|
let mut fc = FullCharacter::from_bytes(&mut std::io::Cursor::new([0; 0x3998].to_vec())).unwrap();
|
|
|
|
fc.tech_menu = DEFAULT_TECH_MENU;
|
|
|
|
fc
|
|
|
|
FullCharacter::from_bytes(&mut std::io::Cursor::new([0; 0x3998].to_vec())).unwrap()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|