Skip to content

Commit

Permalink
[#72] Start rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
Orchaldir committed Sep 17, 2023
1 parent d60ec4d commit 723a4d3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rpg_tools_rendering/src/rendering/equipment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ use crate::math::aabb2d::AABB;
use crate::renderer::Renderer;
use crate::rendering::config::RenderConfig;
use crate::rendering::equipment::pants::render_pants;
use crate::rendering::equipment::shirt::render_shirt;
use rpg_tools_core::model::character::appearance::body::Body;
use rpg_tools_core::model::equipment::appearance::Clothing;

pub mod pants;
pub mod shirt;

pub fn render_clothing(
renderer: &mut dyn Renderer,
config: &RenderConfig,
aabb: &AABB,
body: &Body,
) {
if let Clothing::Simple { pants, .. } = &body.clothing {
render_pants(renderer, config, aabb, body, pants)
if let Clothing::Simple { pants, shirt } = &body.clothing {
render_pants(renderer, config, aabb, body, pants);
render_shirt(renderer, config, aabb, body, shirt);
}
}
14 changes: 14 additions & 0 deletions rpg_tools_rendering/src/rendering/equipment/shirt.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
use crate::math::aabb2d::AABB;
use crate::renderer::Renderer;
use crate::rendering::config::RenderConfig;
use rpg_tools_core::model::character::appearance::body::Body;
use rpg_tools_core::model::equipment::appearance::shirt::Shirt;

pub fn render_shirt(
renderer: &mut dyn Renderer,
config: &RenderConfig,
aabb: &AABB,
body: &Body,
shirt: &Shirt,
) {
}

0 comments on commit 723a4d3

Please sign in to comment.