1 /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 * -------------------------------------- 3 * 4 * This file is part of liblcf. Copyright (c) 2021 liblcf authors. 5 * https://github.com/EasyRPG/liblcf - https://easyrpg.org 6 * 7 * liblcf is Free/Libre Open Source Software, released under the MIT License. 8 * For the full copyright and license information, please view the COPYING 9 * file that was distributed with this source code. 10 */ 11 12 #ifndef LCF_RPG_SAVEEVENTEXECFRAME_H 13 #define LCF_RPG_SAVEEVENTEXECFRAME_H 14 15 // Headers 16 #include <stdint.h> 17 #include <vector> 18 #include "lcf/rpg/eventcommand.h" 19 #include "lcf/context.h" 20 #include <ostream> 21 #include <type_traits> 22 23 /** 24 * rpg::SaveEventExecFrame class. 25 */ 26 namespace lcf { 27 namespace rpg { 28 class SaveEventExecFrame { 29 public: 30 int ID = 0; 31 std::vector<EventCommand> commands; 32 int32_t current_command = 0; 33 int32_t event_id = 0; 34 bool triggered_by_decision_key = false; 35 std::vector<uint8_t> subcommand_path; 36 int32_t maniac_event_info = 0; 37 int32_t maniac_event_id = 0; 38 int32_t maniac_event_page_id = 0; 39 int32_t maniac_loop_info_size = 0; 40 std::vector<int32_t> maniac_loop_info; 41 }; 42 43 inline bool operator==(const SaveEventExecFrame& l, const SaveEventExecFrame& r) { 44 return l.commands == r.commands 45 && l.current_command == r.current_command 46 && l.event_id == r.event_id 47 && l.triggered_by_decision_key == r.triggered_by_decision_key 48 && l.subcommand_path == r.subcommand_path 49 && l.maniac_event_info == r.maniac_event_info 50 && l.maniac_event_id == r.maniac_event_id 51 && l.maniac_event_page_id == r.maniac_event_page_id 52 && l.maniac_loop_info_size == r.maniac_loop_info_size 53 && l.maniac_loop_info == r.maniac_loop_info; 54 } 55 56 inline bool operator!=(const SaveEventExecFrame& l, const SaveEventExecFrame& r) { 57 return !(l == r); 58 } 59 60 std::ostream& operator<<(std::ostream& os, const SaveEventExecFrame& obj); 61 62 template <typename F, typename ParentCtx = Context<void,void>> 63 void ForEachString(SaveEventExecFrame& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 64 for (int i = 0; i < static_cast<int>(obj.commands.size()); ++i) { 65 const auto ctx1 = Context<SaveEventExecFrame, ParentCtx>{ "commands", i, &obj, parent_ctx }; 66 ForEachString(obj.commands[i], f, &ctx1); 67 } 68 (void)obj; 69 (void)f; 70 (void)parent_ctx; 71 } 72 73 } // namespace rpg 74 } // namespace lcf 75 76 #endif 77