Browse Source

move defaults from character.rs to settings.rs. rename key_config -> keyboard_config. rename joystick_config -> controller_config. fix packet sizes

andy 3 years ago
parent
commit
ea686b4bdf
  1. 89
      src/character/character.rs
  2. 302
      src/character/settings.rs
  3. 6
      src/packet/ship.rs

89
src/character/character.rs

@ -3,91 +3,6 @@
// TODO: techniques to enum // TODO: techniques to enum
use psopacket::PSOPacketData; use psopacket::PSOPacketData;
use crate::{PSOPacketData, PacketParseError}; use crate::{PSOPacketData, PacketParseError};
//use crate::PSOPacketData;
pub const DEFAULT_PALETTE_CONFIG: [u8; 0xE8] = [
0, 0, 0, 0,
1, 0, 0, 0,
2, 0, 1, 0,
2, 1, 1, 0,
4, 0, 1, 0,
0, 0, 1, 0,
0, 0, 1, 0,
0, 0, 1, 0,
0, 0, 1, 0,
0, 0, 1, 0,
0, 0, 1, 0,
0, 0, 1, 0,
0, 0, 1, 0,
0, 0, 1, 0,
0, 0, 1, 0,
1, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0
];
pub const DEFAULT_TECH_MENU: [u8; 40] = [
0x00, 0x00,
0x06, 0x00,
0x03, 0x00,
0x01, 0x00,
0x07, 0x00,
0x04, 0x00,
0x02, 0x00,
0x08, 0x00,
0x05, 0x00,
0x09, 0x00,
0x12, 0x00,
0x0f, 0x00,
0x10, 0x00,
0x11, 0x00,
0x0d, 0x00,
0x0a, 0x00,
0x0b, 0x00,
0x0c, 0x00,
0x0e, 0x00,
0x00, 0x00,
];
#[repr(u32)] #[repr(u32)]
#[derive(Copy, Clone, Hash, PartialEq, Eq)] #[derive(Copy, Clone, Hash, PartialEq, Eq)]
@ -357,7 +272,7 @@ impl std::default::Default for Bank {
#[derive(PSOPacketData, Copy, Clone)] #[derive(PSOPacketData, Copy, Clone)]
pub struct KeyTeamConfig { pub struct KeyTeamConfig {
pub _unknown: [u8; 0x114], pub _unknown: [u8; 0x114],
pub key_config: [u8; 0x16C],
pub keyboard_config: [u8; 0x16C],
pub joystick_config: [u8; 0x38], pub joystick_config: [u8; 0x38],
pub guildcard: u32, pub guildcard: u32,
pub team_id: u32, pub team_id: u32,
@ -438,7 +353,7 @@ pub struct DBChar {
#[derive(PSOPacketData, Copy, Clone)] #[derive(PSOPacketData, Copy, Clone)]
pub struct DBOpts { pub struct DBOpts {
pub blocked: [u32; 30], pub blocked: [u32; 30],
pub key_config: [u8; 0x16C],
pub keyboard_config: [u8; 0x16C],
pub joystick_config: [u8; 0x38], pub joystick_config: [u8; 0x38],
pub option_flags: u32, pub option_flags: u32,
pub shortcuts: [u8; 0xA40], pub shortcuts: [u8; 0xA40],

302
src/character/settings.rs

@ -176,11 +176,309 @@ const DEFAULT_SYMBOLCHATS: [u8; 0x4E0] = [
0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00
]; ];
pub const DEFAULT_PALETTE_CONFIG: [u8; 0xE8] = [
0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00,
0x02, 0x00, 0x01, 0x00,
0x02, 0x01, 0x01, 0x00,
0x04, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x01, 0x00,
0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
];
pub const DEFAULT_TECH_MENU: [u8; 40] = [
0x00, 0x00,
0x06, 0x00,
0x03, 0x00,
0x01, 0x00,
0x07, 0x00,
0x04, 0x00,
0x02, 0x00,
0x08, 0x00,
0x05, 0x00,
0x09, 0x00,
0x12, 0x00,
0x0f, 0x00,
0x10, 0x00,
0x11, 0x00,
0x0d, 0x00,
0x0a, 0x00,
0x0b, 0x00,
0x0c, 0x00,
0x0e, 0x00,
0x00, 0x00,
];
pub const DEFAULT_KEYBOARD_CONFIG1: [u8; 364] = [
0x00,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5e,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5d,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5c,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5f,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5d,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5c,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5f,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5e,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x4a,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x4b,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2b,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2d,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
];
pub const DEFAULT_KEYBOARD_CONFIG2: [u8; 364] = [
0x00,0x00,0x00,0x00,0x26,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x22,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x61,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x59,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5e,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5d,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5c,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x5f,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x1a,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x19,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x1b,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x56,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x41,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x42,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x43,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x44,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x45,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x47,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x48,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x49,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x4a,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x4b,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2a,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2b,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2d,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2e,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x2f,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x31,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x32,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x33,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,
];
pub const DEFAULT_KEYBOARD_CONFIG3: [u8; 364] = [
0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00,
];
pub const DEFAULT_KEYBOARD_CONFIG4: [u8; 364] = [
0x00, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x73, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x4b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00,
];
pub const DEFAULT_CONTROLLER_CONFIG: [u8; 56] = [
0x00, 0x01, 0xff, 0xff,
0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x02, 0x00,
0x00, 0x00, 0x04, 0x00,
0x00, 0x00, 0x08, 0x00,
0x01, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00,
0x00, 0x02, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00,
];
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
#[repr(C)] #[repr(C)]
pub struct UserSettings { pub struct UserSettings {
pub blocked_users: [u32; 0x1E], pub blocked_users: [u32; 0x1E],
pub key_config: [u8; 0x16C],
pub keyboard_config: [u8; 0x16C],
pub joystick_config: [u8; 0x38], pub joystick_config: [u8; 0x38],
pub option_flags: u32, pub option_flags: u32,
pub shortcuts: [u8; 0xA40], pub shortcuts: [u8; 0xA40],
@ -193,7 +491,7 @@ impl Default for UserSettings {
fn default() -> UserSettings { fn default() -> UserSettings {
UserSettings { UserSettings {
blocked_users: [0; 0x1E], blocked_users: [0; 0x1E],
key_config: DEFAULT_KEY_CONFIG,
keyboard_config: DEFAULT_KEY_CONFIG,
joystick_config: DEFAULT_JOYSTICK_CONFIG, joystick_config: DEFAULT_JOYSTICK_CONFIG,
option_flags: 0, option_flags: 0,
shortcuts: [0; 0xA40], shortcuts: [0; 0xA40],

6
src/packet/ship.rs

@ -637,10 +637,10 @@ impl std::default::Default for TradeSuccessful {
#[pso_packet(0x4ED)] #[pso_packet(0x4ED)]
pub struct KeyboardConfig { pub struct KeyboardConfig {
pub keyboard_config: [u8; 372],
pub keyboard_config: [u8; 364],
} }
#[pso_packet(0x7ED)]
#[pso_packet(0x5ED)]
pub struct ControllerConfig { pub struct ControllerConfig {
pub controller_config: [u8; 64],
pub controller_config: [u8; 56],
} }
Loading…
Cancel
Save