mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'Char-Selection' into 'master'
Char selection Closes #38 See merge request veloren/veloren!137 Former-commit-id: 9004df2856e00255167d639c051e46c2adc9785e
This commit is contained in:
commit
14b28a4a17
BIN
assets/voxygen/background/bg_creation.png
(Stored with Git LFS)
BIN
assets/voxygen/background/bg_creation.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/background/bg_selection.png
(Stored with Git LFS)
BIN
assets/voxygen/background/bg_selection.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/divider.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/divider.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/frames/mmap.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/mmap.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/selection.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/selection.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/selection.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/selection.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/frames/selection_frame.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/selection_frame.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/frames/server_frame.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/server_frame.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/frames/settings.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/settings.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/window.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/window.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/window_4.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/frames/window_4.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/frames/window_map.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/window_map.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/frames/window_old.png
(Stored with Git LFS)
BIN
assets/voxygen/element/frames/window_old.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/armor/chest/chest_blue.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/chest/chest_blue.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/chest/chest_brown.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/chest/chest_brown.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/chest/chest_green.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/chest/chest_green.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/chest/chest_orange.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/chest/chest_orange.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/pants/pants_blue.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/pants/pants_blue.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/pants/pants_brown.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/pants/pants_brown.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/pants/pants_green.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/pants/pants_green.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/pants/pants_orange.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/pants/pants_orange.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/shoulder/shoulder_l_brown.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/shoulder/shoulder_l_brown.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/armor/shoulder/shoulder_r_brown.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/armor/shoulder/shoulder_r_brown.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/body.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/body.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_body.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_body.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_lfoot.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_lfoot.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_rfoot.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_rfoot.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_tail.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_tail.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_wingL_in.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_wingL_in.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_wingL_out.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_wingL_out.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_wingR_in.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_wingR_in.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragon_wingR_out.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragon_wingR_out.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/dragonhead.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/dragonhead.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/belt.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/belt.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/chest.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/chest.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/foot.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/foot.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/hand.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/hand.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/head.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/head.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/pants.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/pants.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/elf/sword.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/elf/sword.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/belt_female.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/belt_female.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/belt_male.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/belt_male.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/chest_female.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/chest_female.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/chest_male.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/chest_male.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/foot.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/foot.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/hand.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/hand.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/pants_female.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/pants_female.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/body/pants_male.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/body/pants_male.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/eyes/eyes_male_1.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/eyes/eyes_male_1.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/figure/head.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/figure/head.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/fixture/selection_bg.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/fixture/selection_bg.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/voxel/foot_BL.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/foot_BL.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/foot_BR.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/foot_BR.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/foot_FL.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/foot_FL.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/foot_FR.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/foot_FR.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/hand.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/hand.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/lionhead.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/lionhead.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/sabremale.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/sabremale.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/shoulder_l.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/shoulder_l.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/shoulder_r.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/shoulder_r.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/shoulders.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/shoulders.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/sword.vox
(Stored with Git LFS)
BIN
assets/voxygen/voxel/sword.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/voxel/weapon/sword/sword_rusty_2h.vox
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/voxel/weapon/sword/sword_rusty_2h.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -28,16 +28,27 @@ pub enum Head {
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
pub enum Chest {
|
||||
Default,
|
||||
Blue,
|
||||
Brown,
|
||||
Dark,
|
||||
Green,
|
||||
Orange,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
pub enum Belt {
|
||||
Default,
|
||||
//Default,
|
||||
Dark,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
pub enum Pants {
|
||||
Default,
|
||||
Blue,
|
||||
Brown,
|
||||
Dark,
|
||||
Green,
|
||||
Orange,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
@ -48,6 +59,7 @@ pub enum Hand {
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
pub enum Foot {
|
||||
Default,
|
||||
Dark,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
@ -90,7 +102,7 @@ pub enum PigLegR {
|
||||
Default,
|
||||
}
|
||||
|
||||
const ALL_RACES: [Race; 6] = [
|
||||
pub const ALL_RACES: [Race; 6] = [
|
||||
Race::Danari,
|
||||
Race::Dwarf,
|
||||
Race::Elf,
|
||||
@ -98,14 +110,31 @@ const ALL_RACES: [Race; 6] = [
|
||||
Race::Orc,
|
||||
Race::Undead,
|
||||
];
|
||||
const ALL_BODY_TYPES: [BodyType; 3] = [BodyType::Female, BodyType::Male, BodyType::Unspecified];
|
||||
const ALL_HEADS: [Head; 1] = [Head::Default];
|
||||
const ALL_CHESTS: [Chest; 1] = [Chest::Default];
|
||||
const ALL_BELTS: [Belt; 1] = [Belt::Default];
|
||||
const ALL_PANTS: [Pants; 1] = [Pants::Default];
|
||||
const ALL_HANDS: [Hand; 1] = [Hand::Default];
|
||||
const ALL_FEET: [Foot; 1] = [Foot::Default];
|
||||
const ALL_WEAPONS: [Weapon; 7] = [
|
||||
pub const ALL_BODY_TYPES: [BodyType; 3] = [BodyType::Female, BodyType::Male, BodyType::Unspecified];
|
||||
pub const ALL_HEADS: [Head; 1] = [Head::Default];
|
||||
pub const ALL_CHESTS: [Chest; 6] = [
|
||||
Chest::Default,
|
||||
Chest::Blue,
|
||||
Chest::Brown,
|
||||
Chest::Dark,
|
||||
Chest::Green,
|
||||
Chest::Orange,
|
||||
];
|
||||
pub const ALL_BELTS: [Belt; 1] = [
|
||||
//Belt::Default,
|
||||
Belt::Dark,
|
||||
];
|
||||
pub const ALL_PANTS: [Pants; 6] = [
|
||||
Pants::Default,
|
||||
Pants::Blue,
|
||||
Pants::Brown,
|
||||
Pants::Dark,
|
||||
Pants::Green,
|
||||
Pants::Orange,
|
||||
];
|
||||
pub const ALL_HANDS: [Hand; 1] = [Hand::Default];
|
||||
pub const ALL_FEET: [Foot; 2] = [Foot::Default, Foot::Dark];
|
||||
pub const ALL_WEAPONS: [Weapon; 7] = [
|
||||
Weapon::Daggers,
|
||||
Weapon::SwordShield,
|
||||
Weapon::Sword,
|
||||
@ -114,8 +143,8 @@ const ALL_WEAPONS: [Weapon; 7] = [
|
||||
Weapon::Bow,
|
||||
Weapon::Staff,
|
||||
];
|
||||
const ALL_SHOULDERS: [Shoulder; 1] = [Shoulder::Default];
|
||||
const ALL_DRAW: [Draw; 1] = [Draw::Default];
|
||||
pub const ALL_SHOULDERS: [Shoulder; 1] = [Shoulder::Default];
|
||||
pub const ALL_DRAW: [Draw; 1] = [Draw::Default];
|
||||
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
pub struct HumanoidBody {
|
||||
|
@ -4,6 +4,7 @@
|
||||
trait_alias,
|
||||
bind_by_move_pattern_guards,
|
||||
option_flattening, // Converts Option<Option<Item>> into Option<Item> TODO: Remove this once this feature becomes stable
|
||||
copysign,
|
||||
)]
|
||||
|
||||
#[macro_use]
|
||||
|
@ -136,7 +136,6 @@ impl Server {
|
||||
body: comp::Body,
|
||||
) {
|
||||
state.write_component(entity, comp::Actor::Character { name, body });
|
||||
state.write_component(entity, comp::Stats::default());
|
||||
state.write_component(entity, comp::phys::Pos(Vec3::new(0.0, 0.0, 64.0)));
|
||||
state.write_component(entity, comp::phys::Vel(Vec3::zero()));
|
||||
state.write_component(entity, comp::phys::Dir(Vec3::unit_y()));
|
||||
|
40
voxygen/src/anim/fixture/mod.rs
Normal file
40
voxygen/src/anim/fixture/mod.rs
Normal file
@ -0,0 +1,40 @@
|
||||
// Crate
|
||||
use crate::render::FigureBoneData;
|
||||
|
||||
// Local
|
||||
use super::{Bone, Skeleton};
|
||||
|
||||
const SCALE: f32 = 44.0;
|
||||
|
||||
pub struct FixtureSkeleton;
|
||||
|
||||
impl FixtureSkeleton {
|
||||
pub fn new() -> Self {
|
||||
Self {}
|
||||
}
|
||||
}
|
||||
|
||||
impl Skeleton for FixtureSkeleton {
|
||||
fn compute_matrices(&self) -> [FigureBoneData; 16] {
|
||||
[
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
FigureBoneData::new(vek::Mat4::identity()),
|
||||
]
|
||||
}
|
||||
|
||||
fn interpolate(&mut self, target: &Self) {}
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
pub mod character;
|
||||
pub mod fixture;
|
||||
pub mod quadruped;
|
||||
|
||||
// Library
|
||||
use vek::*;
|
||||
|
||||
|
@ -111,14 +111,14 @@ impl<'a> Widget for EscMenu<'a> {
|
||||
.w_h(170.0, 50.0)
|
||||
.hover_image(self.imgs.button_hover)
|
||||
.press_image(self.imgs.button_press)
|
||||
.label("Servers")
|
||||
.label("Characters")
|
||||
.label_y(conrod_core::position::Relative::Scalar(2.0))
|
||||
.label_color(TEXT_COLOR)
|
||||
.label_font_size(17)
|
||||
.set(state.ids.menu_button_3, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
// TODO: Show servers window (needed in-game?).
|
||||
return Some(Event::Logout); // TODO: Open Character Selection
|
||||
};
|
||||
// Logout
|
||||
if Button::image(self.imgs.button)
|
||||
|
@ -127,7 +127,6 @@ image_ids! {
|
||||
charwindow_gradient:"/voxygen/element/misc_bg/charwindow.png",
|
||||
|
||||
// Spell Book Window
|
||||
spellbook_bg: "/voxygen/element/misc_bg/small_bg.png",
|
||||
spellbook_icon: "/voxygen/element/icons/spellbook.png",
|
||||
|
||||
// Bag
|
||||
@ -138,7 +137,6 @@ image_ids! {
|
||||
bag_open_hover: "/voxygen/element/buttons/bag/open_hover.png",
|
||||
bag_open_press: "/voxygen/element/buttons/bag/open_press.png",
|
||||
|
||||
map_bg: "/voxygen/element/misc_bg/small_bg.png",
|
||||
map_icon: "/voxygen/element/icons/map.png",
|
||||
|
||||
grid_button: "/voxygen/element/buttons/border.png",
|
||||
@ -159,10 +157,6 @@ image_ids! {
|
||||
|
||||
window_frame_2: "/voxygen/element/frames/window_2.png",
|
||||
|
||||
settings_bg: "/voxygen/element/frames/settings.png",
|
||||
settings_icon: "/voxygen/element/icons/settings.png",
|
||||
settings_button_mo: "/voxygen/element/buttons/blue_mo.png",
|
||||
|
||||
// Char Window
|
||||
charwindow: "/voxygen/element/misc_bg/charwindow.png",
|
||||
charwindow_icon: "/voxygen/element/icons/charwindow.png",
|
||||
@ -173,17 +167,12 @@ image_ids! {
|
||||
progress: "/voxygen/element/misc_bg/progress.png",
|
||||
|
||||
// Quest-Log Window
|
||||
questlog_bg: "/voxygen/element/misc_bg/small_bg.png",
|
||||
questlog_icon: "/voxygen/element/icons/questlog.png",
|
||||
|
||||
button_blue_mo: "/voxygen/element/buttons/blue_mo.png",
|
||||
button_blue_press: "/voxygen/element/buttons/blue_press.png",
|
||||
|
||||
// Window BG
|
||||
window_bg: "/voxygen/element/misc_bg/window_bg.png",
|
||||
|
||||
// Social Window
|
||||
social_bg: "/voxygen/element/misc_bg/small_bg.png",
|
||||
social_icon: "/voxygen/element/icons/social.png",
|
||||
|
||||
|
||||
|
@ -229,8 +229,8 @@ impl Hud {
|
||||
new_messages: VecDeque::new(),
|
||||
inventory_space: 0,
|
||||
show: Show {
|
||||
help: true,
|
||||
debug: false,
|
||||
help: false,
|
||||
debug: true,
|
||||
bag: false,
|
||||
esc_menu: false,
|
||||
open_windows: Windows::None,
|
||||
|
@ -2,6 +2,7 @@ mod scene;
|
||||
mod ui;
|
||||
|
||||
use crate::{
|
||||
render::Renderer,
|
||||
session::SessionState,
|
||||
window::{Event, Window},
|
||||
Direction, GlobalState, PlayState, PlayStateResult,
|
||||
@ -78,7 +79,7 @@ impl PlayState for CharSelectionState {
|
||||
.postbox
|
||||
.send_message(ClientMsg::Character {
|
||||
name: self.char_selection_ui.character_name.clone(),
|
||||
body: comp::Body::Humanoid(self.char_selection_ui.character_body), //body: comp::Body::Quadruped(comp::QuadrupedBody::random()),
|
||||
body: comp::Body::Humanoid(self.char_selection_ui.character_body),
|
||||
});
|
||||
return PlayStateResult::Switch(Box::new(SessionState::new(
|
||||
&mut global_state.window,
|
||||
@ -93,9 +94,12 @@ impl PlayState for CharSelectionState {
|
||||
self.scene
|
||||
.maintain(global_state.window.renderer_mut(), &self.client.borrow());
|
||||
|
||||
// Render the scene.
|
||||
self.scene
|
||||
.render(global_state.window.renderer_mut(), &self.client.borrow());
|
||||
// Render the scene
|
||||
self.scene.render(
|
||||
global_state.window.renderer_mut(),
|
||||
&self.client.borrow(),
|
||||
self.char_selection_ui.character_body,
|
||||
);
|
||||
|
||||
// Draw the UI to the screen.
|
||||
self.char_selection_ui
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::{
|
||||
anim::{
|
||||
character::{CharacterSkeleton, IdleAnimation},
|
||||
fixture::FixtureSkeleton,
|
||||
Animation, Skeleton,
|
||||
},
|
||||
render::{
|
||||
@ -13,6 +14,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use client::Client;
|
||||
use common::comp::HumanoidBody;
|
||||
use common::{comp, figure::Segment};
|
||||
use vek::*;
|
||||
|
||||
@ -33,7 +35,7 @@ pub struct Scene {
|
||||
skybox: Skybox,
|
||||
postprocess: PostProcess,
|
||||
backdrop_model: Model<FigurePipeline>,
|
||||
backdrop_state: FigureState<CharacterSkeleton>,
|
||||
backdrop_state: FigureState<FixtureSkeleton>,
|
||||
|
||||
figure_model_cache: FigureModelCache,
|
||||
figure_state: FigureState<CharacterSkeleton>,
|
||||
@ -61,18 +63,21 @@ impl Scene {
|
||||
figure_state: FigureState::new(renderer, CharacterSkeleton::new()),
|
||||
|
||||
backdrop_model: renderer
|
||||
.create_model(&FigureModelCache::load_mesh("knight.vox", Vec3::zero()))
|
||||
.create_model(&FigureModelCache::load_mesh(
|
||||
"fixture/selection_bg.vox",
|
||||
Vec3::new(-55.0, -50.0, -1.0),
|
||||
))
|
||||
.unwrap(),
|
||||
backdrop_state: FigureState::new(renderer, CharacterSkeleton::new()),
|
||||
backdrop_state: FigureState::new(renderer, FixtureSkeleton::new()),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn maintain(&mut self, renderer: &mut Renderer, client: &Client) {
|
||||
self.camera.set_focus_pos(Vec3::unit_z() * 1.75);
|
||||
self.camera.set_focus_pos(Vec3::unit_z() * 2.0);
|
||||
self.camera.update(client.state().get_time());
|
||||
self.camera.set_distance(4.0);
|
||||
self.camera.set_distance(4.2);
|
||||
self.camera
|
||||
.set_orientation(Vec3::new(client.state().get_time() as f32 * 0.2, 0.3, 0.0));
|
||||
.set_orientation(Vec3::new(client.state().get_time() as f32 * 0.0, 0.0, 0.0));
|
||||
|
||||
let (view_mat, proj_mat, cam_pos) = self.camera.compute_dependents(client);
|
||||
|
||||
@ -107,14 +112,15 @@ impl Scene {
|
||||
);
|
||||
}
|
||||
|
||||
pub fn render(&mut self, renderer: &mut Renderer, client: &Client) {
|
||||
pub fn render(&mut self, renderer: &mut Renderer, client: &Client, body: HumanoidBody) {
|
||||
renderer.render_skybox(&self.skybox.model, &self.globals, &self.skybox.locals);
|
||||
|
||||
let model = self.figure_model_cache.get_or_create_model(
|
||||
renderer,
|
||||
comp::Body::Humanoid(comp::HumanoidBody::random()),
|
||||
comp::Body::Humanoid(body),
|
||||
client.get_tick(),
|
||||
);
|
||||
|
||||
renderer.render_figure(
|
||||
model,
|
||||
&self.globals,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -137,6 +137,7 @@ impl MainMenuUi {
|
||||
Text::new(version)
|
||||
.top_left_with_margins_on(ui_widgets.window, 5.0, 5.0)
|
||||
.font_size(14)
|
||||
.font_id(self.fonts.opensans)
|
||||
.color(TEXT_COLOR)
|
||||
.set(self.ids.version, ui_widgets);
|
||||
|
||||
|
@ -34,7 +34,7 @@ impl Camera {
|
||||
ori: Vec3::zero(),
|
||||
tgt_dist: 10.0,
|
||||
dist: 10.0,
|
||||
fov: 1.3,
|
||||
fov: 1.1,
|
||||
aspect,
|
||||
last_time: None,
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ impl FigureModelCache {
|
||||
fn load_head(head: Head) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match head {
|
||||
Head::Default => "head.vox",
|
||||
Head::Default => "figure/head.vox",
|
||||
},
|
||||
Vec3::new(-7.0, -5.5, -6.0),
|
||||
)
|
||||
@ -141,7 +141,12 @@ impl FigureModelCache {
|
||||
fn load_chest(chest: Chest) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match chest {
|
||||
Chest::Default => "chest.vox",
|
||||
Chest::Default => "figure/body/chest_male.vox",
|
||||
Chest::Blue => "armor/chest/chest_blue.vox",
|
||||
Chest::Brown => "armor/chest/chest_brown.vox",
|
||||
Chest::Dark => "armor/chest/chest_dark.vox",
|
||||
Chest::Green => "armor/chest/chest_green.vox",
|
||||
Chest::Orange => "armor/chest/chest_orange.vox",
|
||||
},
|
||||
Vec3::new(-6.0, -3.5, 0.0),
|
||||
)
|
||||
@ -150,7 +155,8 @@ impl FigureModelCache {
|
||||
fn load_belt(belt: Belt) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match belt {
|
||||
Belt::Default => "belt.vox",
|
||||
//Belt::Default => "figure/body/belt_male.vox",
|
||||
Belt::Dark => "armor/belt/belt_dark.vox",
|
||||
},
|
||||
Vec3::new(-5.0, -3.5, 0.0),
|
||||
)
|
||||
@ -159,7 +165,12 @@ impl FigureModelCache {
|
||||
fn load_pants(pants: Pants) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match pants {
|
||||
Pants::Default => "pants.vox",
|
||||
Pants::Default => "figure/body/pants_male.vox",
|
||||
Pants::Blue => "armor/pants/pants_blue.vox",
|
||||
Pants::Brown => "armor/pants/pants_brown.vox",
|
||||
Pants::Dark => "armor/pants/pants_dark.vox",
|
||||
Pants::Green => "armor/pants/pants_green.vox",
|
||||
Pants::Orange => "armor/pants/pants_orange.vox",
|
||||
},
|
||||
Vec3::new(-5.0, -3.5, 0.0),
|
||||
)
|
||||
@ -168,7 +179,7 @@ impl FigureModelCache {
|
||||
fn load_left_hand(hand: Hand) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match hand {
|
||||
Hand::Default => "hand.vox",
|
||||
Hand::Default => "figure/body/hand.vox",
|
||||
},
|
||||
Vec3::new(2.0, 0.0, -7.0),
|
||||
)
|
||||
@ -177,7 +188,7 @@ impl FigureModelCache {
|
||||
fn load_right_hand(hand: Hand) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match hand {
|
||||
Hand::Default => "hand.vox",
|
||||
Hand::Default => "figure/body/hand.vox",
|
||||
},
|
||||
Vec3::new(2.0, 0.0, -7.0),
|
||||
)
|
||||
@ -186,7 +197,8 @@ impl FigureModelCache {
|
||||
fn load_left_foot(foot: Foot) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match foot {
|
||||
Foot::Default => "foot.vox",
|
||||
Foot::Default => "figure/body/foot.vox",
|
||||
Foot::Dark => "armor/foot/foot_dark.vox",
|
||||
},
|
||||
Vec3::new(2.5, -3.5, -9.0),
|
||||
)
|
||||
@ -195,7 +207,8 @@ impl FigureModelCache {
|
||||
fn load_right_foot(foot: Foot) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match foot {
|
||||
Foot::Default => "foot.vox",
|
||||
Foot::Default => "figure/body/foot.vox",
|
||||
Foot::Dark => "armor/foot/foot_dark.vox",
|
||||
},
|
||||
Vec3::new(2.5, -3.5, -9.0),
|
||||
)
|
||||
@ -204,9 +217,9 @@ impl FigureModelCache {
|
||||
fn load_weapon(weapon: Weapon) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match weapon {
|
||||
Weapon::Sword => "sword.vox",
|
||||
// TODO actually match against other weapons and set the right model.
|
||||
_ => "sword.vox",
|
||||
Weapon::Sword => "weapon/sword/sword_wood_2h.vox",
|
||||
// TODO actually match against other weapons and set the right model
|
||||
_ => "weapon/sword/sword_wood_2h.vox",
|
||||
},
|
||||
Vec3::new(0.0, 0.0, -4.0),
|
||||
)
|
||||
@ -215,24 +228,24 @@ impl FigureModelCache {
|
||||
fn load_left_shoulder(shoulder: Shoulder) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match shoulder {
|
||||
Shoulder::Default => "shoulder_l.vox",
|
||||
Shoulder::Default => "armor/shoulder/shoulder_l_brown.vox",
|
||||
},
|
||||
Vec3::new(2.5, 0.0, 0.0),
|
||||
Vec3::new(2.5, -0.5, 0.0),
|
||||
)
|
||||
}
|
||||
|
||||
fn load_right_shoulder(shoulder: Shoulder) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match shoulder {
|
||||
Shoulder::Default => "shoulder_r.vox",
|
||||
Shoulder::Default => "armor/shoulder/shoulder_r_brown.vox",
|
||||
},
|
||||
Vec3::new(2.5, 0.0, 0.0),
|
||||
Vec3::new(2.5, -0.5, 0.0),
|
||||
)
|
||||
}
|
||||
fn load_draw(draw: Draw) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match draw {
|
||||
Draw::Default => "glider.vox",
|
||||
Draw::Default => "object/glider.vox",
|
||||
},
|
||||
Vec3::new(-26.0, -26.0, -5.0),
|
||||
)
|
||||
@ -241,7 +254,7 @@ impl FigureModelCache {
|
||||
fn load_pig_head(pig_head: PigHead) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match pig_head {
|
||||
PigHead::Default => "pighead.vox",
|
||||
PigHead::Default => "npc/pig_purple/pighead.vox",
|
||||
},
|
||||
Vec3::new(-6.0, 4.5, 3.0),
|
||||
)
|
||||
@ -250,7 +263,7 @@ impl FigureModelCache {
|
||||
fn load_pig_chest(pig_chest: PigChest) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match pig_chest {
|
||||
PigChest::Default => "pigchest.vox",
|
||||
PigChest::Default => "npc/pig_purple/pigchest.vox",
|
||||
},
|
||||
Vec3::new(-5.0, 4.5, 0.0),
|
||||
)
|
||||
@ -259,7 +272,7 @@ impl FigureModelCache {
|
||||
fn load_pig_leg_lf(pig_leg_l: PigLegL) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match pig_leg_l {
|
||||
PigLegL::Default => "pigleg_l.vox",
|
||||
PigLegL::Default => "npc/pig_purple/pigleg_l.vox",
|
||||
},
|
||||
Vec3::new(0.0, -1.0, -1.5),
|
||||
)
|
||||
@ -268,7 +281,7 @@ impl FigureModelCache {
|
||||
fn load_pig_leg_rf(pig_leg_r: PigLegR) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match pig_leg_r {
|
||||
PigLegR::Default => "pigleg_r.vox",
|
||||
PigLegR::Default => "npc/pig_purple/pigleg_r.vox",
|
||||
},
|
||||
Vec3::new(0.0, -1.0, -1.5),
|
||||
)
|
||||
@ -277,7 +290,7 @@ impl FigureModelCache {
|
||||
fn load_pig_leg_lb(pigleg_l: PigLegL) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match pigleg_l {
|
||||
PigLegL::Default => "pigleg_l.vox",
|
||||
PigLegL::Default => "npc/pig_purple/pigleg_l.vox",
|
||||
},
|
||||
Vec3::new(0.0, -1.0, -1.5),
|
||||
)
|
||||
@ -286,7 +299,7 @@ impl FigureModelCache {
|
||||
fn load_pig_leg_rb(pig_leg_r: PigLegR) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match pig_leg_r {
|
||||
PigLegR::Default => "pigleg_r.vox",
|
||||
PigLegR::Default => "npc/pig_purple/pigleg_r.vox",
|
||||
},
|
||||
Vec3::new(0.0, -1.0, -1.5),
|
||||
)
|
||||
|
@ -108,7 +108,7 @@ impl FigureModelCache {
|
||||
fn load_head(head: Head) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match head {
|
||||
Head::Default => "head.vox",
|
||||
Head::Default => "figure/head.vox",
|
||||
},
|
||||
Vec3::new(-7.0, -5.5, -6.0),
|
||||
)
|
||||
|
@ -100,7 +100,7 @@ impl FigureModelCache {
|
||||
|
||||
// TODO: Don't make this public.
|
||||
pub fn load_mesh(filename: &str, position: Vec3<f32>) -> Mesh<FigurePipeline> {
|
||||
let full_path: String = ["/voxygen/voxel/", filename].concat();
|
||||
let full_path: String = ["/voxygen/voxel/npc/", filename].concat();
|
||||
Segment::from(assets::load_expect::<DotVoxData>(full_path.as_str()).as_ref())
|
||||
.generate_mesh(position)
|
||||
}
|
||||
@ -108,7 +108,7 @@ impl FigureModelCache {
|
||||
fn load_head(head: Head) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match head {
|
||||
Head::Default => "pighead.vox",
|
||||
Head::Default => "pig_purple/pighead.vox",
|
||||
},
|
||||
Vec3::new(0.0, 0.0, 0.0),
|
||||
)
|
||||
@ -117,7 +117,7 @@ impl FigureModelCache {
|
||||
fn load_chest(chest: Chest) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match chest {
|
||||
Chest::Default => "pigchest.vox",
|
||||
Chest::Default => "pig_purple/pigchest.vox",
|
||||
},
|
||||
Vec3::new(0.0, 0.0, 0.0),
|
||||
)
|
||||
@ -126,7 +126,7 @@ impl FigureModelCache {
|
||||
fn load_leg_lf(leg_l: Leg_l) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match belt {
|
||||
Belt::Default => "pigleg_l.vox",
|
||||
Belt::Default => "pig_purple/pigleg_l.vox",
|
||||
},
|
||||
Vec3::new(0.0, 0.0, 0.0),
|
||||
)
|
||||
@ -135,7 +135,7 @@ impl FigureModelCache {
|
||||
fn load_leg_rf(leg_r: Leg_r) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match pants {
|
||||
Pants::Default => "pigleg_r.vox",
|
||||
Pants::Default => "pig_purple/pigleg_r.vox",
|
||||
},
|
||||
Vec3::new(0.0, 0.0, 0.0),
|
||||
)
|
||||
@ -144,7 +144,7 @@ impl FigureModelCache {
|
||||
fn load_leg_lb(leg_l: Leg_l) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match hand {
|
||||
Hand::Default => "pigleg_l.vox",
|
||||
Hand::Default => "pig_purple/pigleg_l.vox",
|
||||
},
|
||||
Vec3::new(0.0, 0.0, 0.0),
|
||||
)
|
||||
@ -153,7 +153,7 @@ impl FigureModelCache {
|
||||
fn load_leg_rb(leg_r: Leg_r) -> Mesh<FigurePipeline> {
|
||||
Self::load_mesh(
|
||||
match hand {
|
||||
Hand::Default => "pigleg_r.vox",
|
||||
Hand::Default => "pig_purple/pigleg_r.vox",
|
||||
},
|
||||
Vec3::new(0.0, 0.0, 0.0),
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user