diff --git a/lvd_lib/src/objects/damage_shape.rs b/lvd_lib/src/objects/damage_shape.rs
index 5df7405..01ad7cc 100644
--- a/lvd_lib/src/objects/damage_shape.rs
+++ b/lvd_lib/src/objects/damage_shape.rs
@@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
use crate::{
objects::base::Base,
- shape::LvdShape3,
+ shape::Shape3,
version::{Version, Versioned},
};
@@ -23,7 +23,7 @@ pub enum DamageShape {
base: Versioned,
/// Shape represented by the object.
- shape: Versioned,
+ shape: Versioned,
/// Boolean flag determining if the damage shape is an attack collision.
#[br(map = |b: u8| b != 0)]
diff --git a/lvd_lib/src/objects/enemy_generator.rs b/lvd_lib/src/objects/enemy_generator.rs
index de2bd99..ed1218a 100644
--- a/lvd_lib/src/objects/enemy_generator.rs
+++ b/lvd_lib/src/objects/enemy_generator.rs
@@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize};
use crate::{
array::LvdArray,
objects::base::Base,
- shape::LvdShape2Array,
+ shape::ShapeArray2,
tag::Tag,
version::{Version, Versioned},
};
@@ -26,13 +26,13 @@ pub enum EnemyGenerator {
base: Versioned,
/// Collection of shapes where enemies can appear from.
- appear_shapes: Versioned,
+ appear_shapes: Versioned,
/// Collection of shapes for responding to fighter presence.
- trigger_shapes: Versioned,
+ trigger_shapes: Versioned,
// TODO: Field documentation.
- unk1: Versioned,
+ unk1: Versioned,
/// Identifier for matching and filtering like objects.
tag: Versioned,
@@ -47,13 +47,13 @@ pub enum EnemyGenerator {
base: Versioned,
/// Collection of shapes where enemies can appear from.
- appear_shapes: Versioned,
+ appear_shapes: Versioned,
/// Collection of shapes for responding to fighter presence.
- trigger_shapes: Versioned,
+ trigger_shapes: Versioned,
// TODO: Field documentation.
- unk1: Versioned,
+ unk1: Versioned,
/// Identifier for matching and filtering like objects.
tag: Versioned,
@@ -73,13 +73,13 @@ pub enum EnemyGenerator {
base: Versioned,
/// Collection of shapes where enemies can appear from.
- appear_shapes: Versioned,
+ appear_shapes: Versioned,
/// Collection of shapes for responding to fighter presence.
- trigger_shapes: Versioned,
+ trigger_shapes: Versioned,
// TODO: Field documentation.
- unk1: Versioned,
+ unk1: Versioned,
/// Identifier for matching and filtering like objects.
tag: Versioned,
diff --git a/lvd_lib/src/objects/field_smash.rs b/lvd_lib/src/objects/field_smash.rs
index 6d14c8f..33ae31c 100644
--- a/lvd_lib/src/objects/field_smash.rs
+++ b/lvd_lib/src/objects/field_smash.rs
@@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize};
use crate::{
id::Id,
objects::{base::Base, region::Region},
- shape::{LvdPath, LvdShape2, LvdShape3, Rect},
+ shape::{LvdPath, Rect, Shape2, Shape3},
string::LvdFixedString32,
tag::Tag,
vector::Vector2,
@@ -27,7 +27,7 @@ pub enum FsItem {
base: Versioned,
/// Shape represented by the object.
- shape: Versioned,
+ shape: Versioned,
/// Identifier for matching and filtering like objects.
tag: Versioned,
@@ -207,7 +207,7 @@ pub enum AreaLight {
base: Versioned,
/// Shape represented by the object.
- shape: Versioned,
+ shape: Versioned,
},
/// `AreaLight` version 2.
@@ -218,7 +218,7 @@ pub enum AreaLight {
base: Versioned,
/// Shape represented by the object.
- shape: Versioned,
+ shape: Versioned,
// TODO: Field documentation.
unk1: Versioned,
@@ -279,7 +279,7 @@ pub enum AreaHint {
base: Versioned,
/// Shape represented by the object.
- shape: Versioned,
+ shape: Versioned,
// TODO: Field documentation.
unk1: i32,
@@ -303,7 +303,7 @@ pub enum AreaHint {
base: Versioned,
/// Shape represented by the object.
- shape: Versioned,
+ shape: Versioned,
// TODO: Field documentation.
unk1: i32,
@@ -329,7 +329,7 @@ pub enum AreaHint {
base: Versioned,
/// Shape represented by the object.
- shape: Versioned,
+ shape: Versioned,
// TODO: Field documentation.
unk1: i32,
@@ -377,7 +377,7 @@ pub enum SplitArea {
base: Versioned,
/// Shape represented by the object.
- shape: Versioned,
+ shape: Versioned,
},
}
diff --git a/lvd_lib/src/objects/general_shape.rs b/lvd_lib/src/objects/general_shape.rs
index 0888980..6fee1fa 100644
--- a/lvd_lib/src/objects/general_shape.rs
+++ b/lvd_lib/src/objects/general_shape.rs
@@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
use crate::{
objects::base::Base,
- shape::{LvdShape2, LvdShape3},
+ shape::{Shape2, Shape3},
tag::Tag,
version::{Version, Versioned},
};
@@ -27,7 +27,7 @@ pub enum GeneralShape2 {
tag: Versioned,
/// Shape represented by the object.
- shape: Versioned,
+ shape: Versioned,
},
}
@@ -55,7 +55,7 @@ pub enum GeneralShape3 {
tag: Versioned,
/// Shape represented by the object.
- shape: Versioned,
+ shape: Versioned,
},
}
diff --git a/lvd_lib/src/objects/item_popup.rs b/lvd_lib/src/objects/item_popup.rs
index 9e4afd6..d4009c7 100644
--- a/lvd_lib/src/objects/item_popup.rs
+++ b/lvd_lib/src/objects/item_popup.rs
@@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
use crate::{
objects::base::Base,
- shape::LvdShape2Array,
+ shape::ShapeArray2,
tag::Tag,
version::{Version, Versioned},
};
@@ -27,7 +27,7 @@ pub enum ItemPopup {
tag: Versioned,
/// Collection of shapes where items will appear from.
- shapes: Versioned,
+ shapes: Versioned,
},
}
diff --git a/lvd_lib/src/shape.rs b/lvd_lib/src/shape.rs
index feb8851..30a7250 100644
--- a/lvd_lib/src/shape.rs
+++ b/lvd_lib/src/shape.rs
@@ -1,7 +1,7 @@
//! Basic shape types.
//!
-//! This module contains the [`LvdShape2`], [`LvdShape2Array`] and [`LvdShape2Element`] types,
-//! the [`LvdShape3`] type, the [`LvdPath`] type, and the [`Rect`] type.
+//! This module contains the [`Shape2`], [`ShapeArray2`] and [`ShapeArrayElement2`] types,
+//! the [`Shape3`] type, the [`LvdPath`] type, and the [`Rect`] type.
use binrw::binrw;
#[cfg(feature = "serde")]
@@ -18,7 +18,7 @@ use crate::{
#[br(import(_version: u8))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug)]
-pub enum LvdShape2 {
+pub enum Shape2 {
/// Point shape type.
#[brw(magic = 1u32)]
Point {
@@ -81,42 +81,43 @@ pub enum LvdShape2 {
},
}
-impl Version for LvdShape2 {
+impl Version for Shape2 {
fn version(&self) -> u8 {
3
}
}
// TODO: Why is this type necessary for arrays?
-/// An element type for a [`LvdShape2Array`].
+/// An element type for a [`ShapeArray2`].
#[binrw]
#[br(import(_version: u8))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", serde(transparent))]
#[derive(Debug)]
-pub struct LvdShape2Element(Versioned);
+pub struct ShapeArrayElement2(Versioned);
-impl Version for LvdShape2Element {
+impl Version for ShapeArrayElement2 {
fn version(&self) -> u8 {
1
}
}
+// TODO: Why is this type necessary for collections of two-dimensional shapes?
/// A collection of two-dimensional shapes.
#[binrw]
#[br(import(version: u8))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug)]
-pub enum LvdShape2Array {
- /// `LvdShape2Array` version 1.
+pub enum ShapeArray2 {
+ /// `ShapeArray2` version 1.
#[br(pre_assert(version == 1))]
V1 {
/// Collection of two-dimensional shapes.
- shapes: Versioned>,
+ shapes: Versioned>,
},
}
-impl Version for LvdShape2Array {
+impl Version for ShapeArray2 {
fn version(&self) -> u8 {
match self {
Self::V1 { .. } => 1,
@@ -129,7 +130,7 @@ impl Version for LvdShape2Array {
#[br(import(_version: u8))]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug)]
-pub enum LvdShape3 {
+pub enum Shape3 {
/// Box shape type.
#[brw(magic = 1u32)]
Box {
@@ -210,7 +211,7 @@ pub enum LvdShape3 {
},
}
-impl Version for LvdShape3 {
+impl Version for Shape3 {
fn version(&self) -> u8 {
1
}