1
0
Fork 0
mirror of https://codeberg.org/icewind/vbsp.git synced 2026-06-04 11:04:07 +02:00

some more sub-neighbour rework

This commit is contained in:
Robin Appelman 2022-12-23 23:51:29 +01:00
commit cc14c4e5d7
5 changed files with 110 additions and 64 deletions

View file

@ -54,6 +54,10 @@ impl From<binrw::Error> for BspError {
BspError::String(*err.downcast::<StringError>().unwrap())
} else if err.is::<UnsupportedLumpVersion>() {
BspError::LumpVersion(*err.downcast::<UnsupportedLumpVersion>().unwrap())
} else if err.is::<InvalidNeighbourError>() {
BspError::Validation(ValidationError::Neighbour(
*err.downcast::<InvalidNeighbourError>().unwrap(),
))
} else {
panic!("unexpected custom error")
}
@ -112,8 +116,6 @@ pub enum ValidationError {
#[derive(Debug, Error)]
pub enum InvalidNeighbourError {
#[error("Invalid neighbour span")]
InvalidNeighbourIndex,
#[error("Invalid neighbour span")]
InvalidNeighbourSpan(u8),
#[error("Invalid neighbour orientation")]