physis/layer/
exit_range.rs

1// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com>
2// SPDX-License-Identifier: GPL-3.0-or-later
3
4use binrw::{binread, binrw};
5
6use super::TriggerBoxInstanceObject;
7
8#[binrw]
9#[brw(repr = i32)]
10#[derive(Debug, PartialEq)]
11pub enum ExitType {
12    ZoneLine = 0x1,
13    Unk = 0x2, // seen in bg/ex5/02_ykt_y6/fld/y6f1/level/planmap.lgb
14}
15
16#[binread]
17#[derive(Debug)]
18#[br(little)]
19pub struct ExitRangeInstanceObject {
20    pub parent_data: TriggerBoxInstanceObject,
21    pub exit_type: ExitType,
22    pub zone_id: u16,
23    pub territory_type: u16,
24    pub index: i32,
25    pub destination_instance_id: u32,
26    pub return_instance_id: u32,
27    #[brw(pad_after = 4)] // padding
28    pub player_running_direction: f32,
29}