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:
parent
46a03acd30
commit
cc14c4e5d7
5 changed files with 110 additions and 64 deletions
|
|
@ -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")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue