pub consts are hard
This commit is contained in:
parent
b8e420fa7b
commit
8b96b0833e
@ -5,7 +5,7 @@ use psopacket::PSOPacketData;
|
|||||||
use crate::{PSOPacketData, PacketParseError};
|
use crate::{PSOPacketData, PacketParseError};
|
||||||
//use crate::PSOPacketData;
|
//use crate::PSOPacketData;
|
||||||
|
|
||||||
const DEFAULT_PALETTE_CONFIG: [u8; 0xE8] = [
|
pub const DEFAULT_PALETTE_CONFIG: [u8; 0xE8] = [
|
||||||
0, 0, 0, 0,
|
0, 0, 0, 0,
|
||||||
1, 0, 0, 0,
|
1, 0, 0, 0,
|
||||||
2, 0, 1, 0,
|
2, 0, 1, 0,
|
||||||
@ -66,7 +66,7 @@ const DEFAULT_PALETTE_CONFIG: [u8; 0xE8] = [
|
|||||||
0, 0, 0, 0
|
0, 0, 0, 0
|
||||||
];
|
];
|
||||||
|
|
||||||
const DEFAULT_TECH_MENU: [u8; 40] = [
|
pub const DEFAULT_TECH_MENU: [u8; 40] = [
|
||||||
0x00, 0x00,
|
0x00, 0x00,
|
||||||
0x06, 0x00,
|
0x06, 0x00,
|
||||||
0x03, 0x00,
|
0x03, 0x00,
|
||||||
@ -219,9 +219,7 @@ impl Character {
|
|||||||
|
|
||||||
impl std::default::Default for Character {
|
impl std::default::Default for Character {
|
||||||
fn default() -> Character {
|
fn default() -> Character {
|
||||||
let mut c = Character::from_bytes(&mut std::io::Cursor::new([0; 0x190].to_vec())).unwrap();
|
Character::from_bytes(&mut std::io::Cursor::new([0; 0x190].to_vec())).unwrap()
|
||||||
c.config = DEFAULT_PALETTE_CONFIG;
|
|
||||||
c
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,6 +400,7 @@ pub struct FullCharacter {
|
|||||||
pub shortcuts: [u8; 2624],
|
pub shortcuts: [u8; 2624],
|
||||||
pub autoreply: [u16; 172],
|
pub autoreply: [u16; 172],
|
||||||
pub info_board: [u16; 172],
|
pub info_board: [u16; 172],
|
||||||
|
pub _unknown3: [u8; 28],
|
||||||
pub challenge_data: [u8; 320],
|
pub challenge_data: [u8; 320],
|
||||||
pub tech_menu: [u8; 40],
|
pub tech_menu: [u8; 40],
|
||||||
pub _unknown4: [u8; 44],
|
pub _unknown4: [u8; 44],
|
||||||
@ -411,9 +410,7 @@ pub struct FullCharacter {
|
|||||||
|
|
||||||
impl std::default::Default for FullCharacter {
|
impl std::default::Default for FullCharacter {
|
||||||
fn default() -> FullCharacter {
|
fn default() -> FullCharacter {
|
||||||
let mut fc = FullCharacter::from_bytes(&mut std::io::Cursor::new([0; 0x3998].to_vec())).unwrap();
|
FullCharacter::from_bytes(&mut std::io::Cursor::new([0; 0x3998].to_vec())).unwrap()
|
||||||
fc.tech_menu = DEFAULT_TECH_MENU;
|
|
||||||
fc
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user