From 58319f04f239ab4a81b4eb878ad987fe453fef9e Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:20 +0100 Subject: feat(levels): coord system types and swizzling the room is now the right way up! yay! --- examples/render-bsp/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/render-bsp/src/main.rs b/examples/render-bsp/src/main.rs index f2310e6..ac1415e 100644 --- a/examples/render-bsp/src/main.rs +++ b/examples/render-bsp/src/main.rs @@ -25,6 +25,7 @@ extern crate image; use image::load_from_memory; use std::time::SystemTime; +use stockton_levels::prelude::*; use stockton_levels::q3::Q3BSPFile; use stockton_types::{World, Vector3}; use stockton_render::Renderer; @@ -91,7 +92,9 @@ fn main() { let event_loop = EventLoop::new(); let window = WindowBuilder::new().build(&event_loop).unwrap(); let data = include_bytes!("../data/test.bsp").to_vec().into_boxed_slice(); - let bsp = Q3BSPFile::new(&data).unwrap(); + let bsp: Result, stockton_levels::types::ParseError> = Q3BSPFile::parse_file(&data); + let bsp: Q3BSPFile = bsp.unwrap(); + let bsp: Q3BSPFile = bsp.swizzle_to(); let world = World::new(bsp); let mut renderer = Renderer::new(world, &window).unwrap(); -- cgit v1.2.3