Skip to content

Commit

Permalink
spiderBallWaypoint generic edit support
Browse files Browse the repository at this point in the history
  • Loading branch information
toasterparty committed Feb 26, 2024
1 parent a8df160 commit 3e61b82
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions structs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ pub mod scly_props
pub mod sound;
pub mod spawn_point;
pub mod special_function;
pub mod spider_ball_waypoint;
pub mod streamed_audio;
pub mod switch;
pub mod timer;
Expand Down Expand Up @@ -157,6 +158,7 @@ pub mod scly_props
pub use self::sound::*;
pub use self::spawn_point::*;
pub use self::special_function::*;
pub use self::spider_ball_waypoint::*;
pub use self::streamed_audio::*;
pub use self::switch::*;
pub use self::timer::*;
Expand Down Expand Up @@ -255,6 +257,7 @@ pub use scly_props::snake_weed_swarm::*;
pub use scly_props::sound::*;
pub use scly_props::spawn_point::*;
pub use scly_props::special_function::*;
pub use scly_props::spider_ball_waypoint::*;
pub use scly_props::streamed_audio::*;
pub use scly_props::switch::*;
pub use scly_props::timer::*;
Expand Down
1 change: 1 addition & 0 deletions structs/src/scly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@ build_scly_property!(
Sound, is_sound, as_sound, as_sound_mut,
SpawnPoint, is_spawn_point, as_spawn_point, as_spawn_point_mut,
SpecialFunction, is_special_function, as_special_function, as_special_function_mut,
SpiderBallWaypoint, is_spider_ball_waypoint, as_spider_ball_waypoint, as_spider_ball_waypoint_mut,
StreamedAudio, is_streamed_audio, as_streamed_audio, as_streamed_audio_mut,
Switch, is_switch, as_switch, as_switch_mut,
Timer, is_timer, as_timer, as_timer_mut,
Expand Down
29 changes: 29 additions & 0 deletions structs/src/scly_props/spider_ball_waypoint.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
use auto_struct_macros::auto_struct;

use reader_writer::CStr;
use reader_writer::typenum::*;
use reader_writer::generic_array::GenericArray;
use crate::SclyPropertyData;

#[auto_struct(Readable, Writable)]
#[derive(Debug, Clone)]
pub struct SpiderBallWaypoint<'r>
{
#[auto_struct(expect = 5)]
prop_count: u32,

pub name: CStr<'r>,

pub position: GenericArray<f32, U3>,
pub rotation: GenericArray<f32, U3>,
pub active: u8,
pub unknown2: u32,
}

use crate::{impl_position, impl_rotation};
impl<'r> SclyPropertyData for SpiderBallWaypoint<'r>
{
const OBJECT_TYPE: u8 = 0x2C;
impl_position!();
impl_rotation!();
}

0 comments on commit 3e61b82

Please sign in to comment.