use std::fs::File;
use std::io::prelude::*;
use bloke::Bloke;
fn main() -> std::io::Result<()> {
let bloke = Bloke {
version: 32768,
height_arch: 32768,
height_leg: 32768,
height_body: 32768,
height_neck: 32768,
height_head: 32768,
height_hair: 32768,
length_foot: 32768,
length_toes: 32768,
size_legs: 32768,
size_knee: 32768,
size_calf: 32768,
size_hamstring: 32768,
size_butt: 32768,
size_body: 32768,
size_belly: 32768,
size_chest: 32768,
size_spine: 32768,
size_hunch: 32768,
size_shoulder: 32768,
size_arm_muscle: 32768,
size_arm_fat: 32768,
size_elbow: 32768,
size_hand: 32768,
size_finger: 32768,
size_head: 32768,
size_nose: 32768,
size_nosepoint: 32768,
size_nostril: 32768,
size_mouth: 32768,
size_lips: 32768,
size_eyes: 32768,
size_eyelid: 32768,
size_eyearea: 32768,
size_eyelash: 32768,
size_eyelashcurve: 32768,
size_ear: 32768,
size_chin: 32768,
size_face: 32768,
size_forehead: 32768,
size_cheek: 32768,
size_mustache: 32768,
size_beard: 32768,
size_sidehair: 32768,
size_bodyhair: 32768,
size_chinextend: 32768,
size_backhead: 32768,
size_longhair: 32768,
size_hips: 32768,
size_waist: 32768,
size_ankle: 32768,
size_foothair: 32768,
size_armpithair: 32768,
size_nosehair: 32768,
thickness_eyebrow: 32768,
width_eyebrow: 32768,
roundness_body: 32768,
roundness_finger: 32768,
roundness_head: 32768,
roundness_ear: 32768,
len_nail: 32768,
len_arm: 32768,
dist_eye: 32768,
skin: 32768,
has_freckles: 32768,
has_teeth: 32768,
color_teeth: 32768,
color_lip: 32768,
color_skinhue: 32768,
color_skinshade: 32768,
color_headhair1: 0xA0A000,
color_headhair2: 0xA0A000,
color_headhair3: 0xA0A000,
color_bodyhair: 0xA0A000,
color_mustache: 0xA0A000,
color_beard: 0xA0A000,
color_foothair: 0xA0A000,
color_armpithair: 0xA0A000,
color_eyelash: 0xA0A000,
color_eyebrow: 0xA0A000,
color_eye: 0xA0A000,
color_fingertoenail: 0xA0B0FF,
voice_pitch: 32768,
voice_waveform: 0,
};
let data = bloke.save();
let new_bloke = Bloke::load(data.as_slice());
assert_eq!(bloke, new_bloke);
let mut file = File::create("test.bloke")?;
file.write_all(data.as_slice())?;
Ok(())
}