luminol_data/rmxp/map.rs
1// Copyright (C) 2024 Melody Madeline Lyons
2//
3// This file is part of Luminol.
4//
5// Luminol is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// Luminol is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with Luminol. If not, see <http://www.gnu.org/licenses/>.
17use crate::rpg::{AudioFile, Event};
18use crate::{id_alox, id_serde, option_vec, Table3};
19
20#[derive(Default, Debug, serde::Deserialize, serde::Serialize)]
21#[derive(alox_48::Deserialize, alox_48::Serialize)]
22#[marshal(class = "RPG::Map")]
23pub struct Map {
24 #[serde(with = "id_serde")]
25 #[marshal(with = "id_alox")]
26 pub tileset_id: usize,
27 pub width: usize,
28 pub height: usize,
29 pub autoplay_bgm: bool,
30 pub bgm: AudioFile,
31 pub autoplay_bgs: bool,
32 pub bgs: AudioFile,
33 pub encounter_list: Vec<i32>,
34 pub encounter_step: i32,
35 pub data: Table3,
36 pub events: option_vec::OptionVec<Event>,
37
38 #[marshal(skip)]
39 #[serde(skip)]
40 pub modified: bool,
41}