diff options
Diffstat (limited to 'stockton-levels/src/q3/light_maps.rs')
-rw-r--r-- | stockton-levels/src/q3/light_maps.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stockton-levels/src/q3/light_maps.rs b/stockton-levels/src/q3/light_maps.rs index 605b7c2..6e07d33 100644 --- a/stockton-levels/src/q3/light_maps.rs +++ b/stockton-levels/src/q3/light_maps.rs @@ -15,10 +15,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -use super::Q3BSPFile; +use super::Q3BspFile; use crate::coords::CoordSystem; use crate::traits::light_maps::*; -use crate::types::{ParseError, Result, RGB}; +use crate::types::{ParseError, Result, Rgb}; /// The size of one LightMap const LIGHTMAP_SIZE: usize = 128 * 128 * 3; @@ -33,12 +33,12 @@ pub fn from_data(data: &[u8]) -> Result<Box<[LightMap]>> { let mut maps = Vec::with_capacity(length as usize); for n in 0..length { let raw = &data[n * LIGHTMAP_SIZE..(n + 1) * LIGHTMAP_SIZE]; - let mut map: [[RGB; 128]; 128] = [[RGB::white(); 128]; 128]; + let mut map: [[Rgb; 128]; 128] = [[Rgb::white(); 128]; 128]; for (x, outer) in map.iter_mut().enumerate() { for (y, inner) in outer.iter_mut().enumerate() { let offset = (x * 128 * 3) + (y * 3); - *inner = RGB::from_slice(&raw[offset..offset + 3]); + *inner = Rgb::from_slice(&raw[offset..offset + 3]); } } maps.push(LightMap { map }) @@ -47,7 +47,7 @@ pub fn from_data(data: &[u8]) -> Result<Box<[LightMap]>> { Ok(maps.into_boxed_slice()) } -impl<T: CoordSystem> HasLightMaps for Q3BSPFile<T> { +impl<T: CoordSystem> HasLightMaps for Q3BspFile<T> { type LightMapsIter<'a> = std::slice::Iter<'a, LightMap>; fn lightmaps_iter(&self) -> Self::LightMapsIter<'_> { |