Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ set(LCF_SOURCES
src/generated/ldb_skill.cpp
src/generated/ldb_sound.cpp
src/generated/ldb_state.cpp
src/generated/ldb_stringvariable.cpp
src/generated/ldb_switch.cpp
src/generated/ldb_system.cpp
src/generated/ldb_terms.cpp
Expand Down Expand Up @@ -125,6 +126,7 @@ set(LCF_SOURCES
src/generated/lsd_savepicture_flags.h
src/generated/lsd_savescreen.cpp
src/generated/lsd_savesystem.cpp
src/generated/lsd_savesystem_maniac_message_hook_flags.h
src/generated/lsd_savetarget.cpp
src/generated/lsd_savetitle.cpp
src/generated/lsd_savevehiclelocation.cpp
Expand Down Expand Up @@ -185,6 +187,7 @@ set(LCF_SOURCES
src/generated/rpg_sound.cpp
src/generated/rpg_start.cpp
src/generated/rpg_state.cpp
src/generated/rpg_stringvariable.cpp
src/generated/rpg_switch.cpp
src/generated/rpg_system.cpp
src/generated/rpg_terms.cpp
Expand Down Expand Up @@ -283,6 +286,7 @@ set(LCF_HEADERS
src/generated/lcf/rpg/sound.h
src/generated/lcf/rpg/start.h
src/generated/lcf/rpg/state.h
src/generated/lcf/rpg/stringvariable.h
src/generated/lcf/rpg/switch.h
src/generated/lcf/rpg/system.h
src/generated/lcf/rpg/terms.h
Expand Down
4 changes: 4 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ liblcf_la_SOURCES = \
src/generated/ldb_skill.cpp \
src/generated/ldb_sound.cpp \
src/generated/ldb_state.cpp \
src/generated/ldb_stringvariable.cpp \
src/generated/ldb_switch.cpp \
src/generated/ldb_system.cpp \
src/generated/ldb_terms.cpp \
Expand Down Expand Up @@ -142,6 +143,7 @@ liblcf_la_SOURCES = \
src/generated/lsd_savepicture_flags.h \
src/generated/lsd_savescreen.cpp \
src/generated/lsd_savesystem.cpp \
src/generated/lsd_savesystem_maniac_message_hook_flags.h \
src/generated/lsd_savetarget.cpp \
src/generated/lsd_savetitle.cpp \
src/generated/lsd_savevehiclelocation.cpp \
Expand Down Expand Up @@ -202,6 +204,7 @@ liblcf_la_SOURCES = \
src/generated/rpg_sound.cpp \
src/generated/rpg_start.cpp \
src/generated/rpg_state.cpp \
src/generated/rpg_stringvariable.cpp \
src/generated/rpg_switch.cpp \
src/generated/rpg_system.cpp \
src/generated/rpg_terms.cpp \
Expand Down Expand Up @@ -314,6 +317,7 @@ lcfrpginclude_HEADERS = \
src/generated/lcf/rpg/sound.h \
src/generated/lcf/rpg/start.h \
src/generated/lcf/rpg/state.h \
src/generated/lcf/rpg/stringvariable.h \
src/generated/lcf/rpg/switch.h \
src/generated/lcf/rpg/system.h \
src/generated/lcf/rpg/terms.h \
Expand Down
2 changes: 2 additions & 0 deletions generator/csv/enums_easyrpg.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Structure,Entry,Value,Index
CommonEvent,Trigger,maniac_battle_start,6
CommonEvent,Trigger,maniac_battle_parallel,7
EventCommand,Code,EasyRpg_TriggerEventAt,2002
EventCommand,Code,EasyRpg_Pathfinder,2003
EventCommand,Code,EasyRpg_CallMovementAction,2050
Expand Down
2 changes: 1 addition & 1 deletion generator/csv/fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Class,attribute_ranks,t,Vector<UInt8>,0x49,,0,0,Integer
Class,attribute_ranks,f,Vector<UInt8>,0x4A,,1,0,Array - Short
Class,battle_commands,f,Vector<Ref<BattleCommand:Int32>>,0x50,,1,0,Array - Uint32
CommonEvent,name,f,DBString,0x01,,0,0,String
CommonEvent,trigger,f,Enum<CommonEvent_Trigger>,0x0B,5,0,0,Integer
CommonEvent,trigger,f,Enum<CommonEvent_Trigger>,0x0B,5,1,0,Integer
CommonEvent,switch_flag,f,Boolean,0x0C,False,0,0,Flag
CommonEvent,switch_id,f,Ref<Switch>,0x0D,1,0,0,Integer
CommonEvent,event_commands,t,Vector<EventCommand>,0x15,,1,0,Integer
Expand Down
20 changes: 20 additions & 0 deletions generator/csv/fields_easyrpg.csv
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,22 @@ SaveMapEventBase,easyrpg_runtime_flags,f,EasyRpgEventRuntime_Flags,0xCC,0,0,0,Ru
SavePartyLocation,maniac_horizontal_pan_speed,f,Double,0x8D,0,0,0,horizontal speed in the scrolls of the screen
SavePartyLocation,maniac_vertical_pan_speed,f,Double,0x8E,0,0,0,vertical speed in the scrolls of the screen
SaveSystem,maniac_strings,f,Vector<DBString>,0x24,,0,0,rpg::Strings
SaveSystem,maniac_message_window_width,f,Int32,0x2D,0,0,0,Width of the message window in pixels
SaveSystem,maniac_message_window_height,f,Int32,0x2E,0,0,0,Height of the message window in pixels
SaveSystem,maniac_message_font_name,f,DBString,0x2F,,0,0,Font to use in the message window
SaveSystem,maniac_message_font_size,f,Int32,0x30,0,0,0,Size of the font in the message window
SaveSystem,maniac_message_hook_flags,f,ManiacMessageHook_Flags,0x32,0,0,0,Situations when to invoke the callbacks
SaveSystem,maniac_message_hook_common_event_id,f,Int32,0x42,0,0,0,Common Event to call for a hook
SaveSystem,maniac_message_hook_callback_system_variable,f,Int32,0x43,0,0,0,Variable (starting range) populated when hook is invoked
SaveSystem,maniac_message_hook_callback_system_string_variable,f,Int32,0x44,0,0,0,String Variable populated when hook is invoked
SaveSystem,maniac_message_hook_callback_user_variable,f,Int32,0x45,0,0,0,Variable (starting range) populated when hook is invoked
SaveSystem,maniac_message_hook_callback_user_string_variable,f,Int32,0x46,0,0,0,String Variable populated when hook is invoked (TODO: Difference between System and User callback)
SaveSystem,maniac_frameskip,,Int32,0x88,0,0,0,"FatalMix Frameskip (0=None, 1=1/5, 2=1/3, 3=1/2)"
SaveSystem,maniac_picture_limit,,Int32,0x89,0,0,0,FatalMix Picture Limit
SaveSystem,maniac_options,,Vector<UInt8>,0x8A,,0,0,"Various FatalMix options (XX XA XB XC). A: MsgSkip OFF/RShift (0/4) B: TestPlay Keep/ON/OFF (0/2/4), C: Pause focus lost Wait/Run (0/1)"
SaveSystem,maniac_joypad_bindings,,Vector<UInt8>,0x8B,,0,0,"JoyLeft, JoyRight, JoyUp, JoyDown, Joy1, ... Joy12"
SaveSystem,maniac_message_spacing_char,f,Int32,0x8E,0,0,0,Additional spacing between characters in the message window (Editor value - 1)
SaveSystem,maniac_message_spacing_line,f,Int32,0x8F,0,0,0,Additional spacing between lines in the message window (Editor value - 1)
BattleCommands,easyrpg_default_atb_mode,f,Enum<SaveSystem_AtbMode>,0xC8,0,0,1,Default ATB mode of RPG 2003 battle system
BattleCommands,easyrpg_enable_battle_row_command,f,Boolean,0xC9,True,0,1,If the row command should be enabled in RPG Maker 2003 battles
BattleCommands,easyrpg_sequential_order,f,Boolean,0xCA,False,0,1,If alternative and gauge style battles should behave like traditional style battles
Expand Down Expand Up @@ -95,6 +107,12 @@ State,easyrpg_immune_states,t,DBBitArray,0xC8,,0,0,States cleared on infliction
State,easyrpg_immune_states,f,DBBitArray,0xC9,,0,0,States cleared on infliction by this state
Terrain,easyrpg_damage_in_percent,f,Boolean,0xC8,False,0,0,If the terrain damage is a percentage
Terrain,easyrpg_damage_can_kill,f,Boolean,0xC9,False,0,0,If the terrain damage can kill the actors
Terms,maniac_item_received_a,f,DBString,0xA1,,0,0,Part 1 of item received message (item_received is part 2)
Terms,maniac_level_up_a,f,DBString,0xA2,,0,0,Part 1 of level up message
Terms,maniac_level_up_b,f,DBString,0xA3,,0,0,Part 3 of level up message (level_up is part 2)
Terms,maniac_level_up_c,f,DBString,0xA4,,0,0,Part 4 of level up message
Terms,maniac_exp_received_a,f,DBString,0xA5,,0,0,Part 1 of exp message (exp_received is part 2)
Terms,maniac_skill_learned_a,f,DBString,0xA6,,0,0,Part 1 of skill learning message (skill_learned is part 2)
Terms,easyrpg_item_number_separator,f,DBString,0xC8,DBString(kDefaultTerm),0,0,Item number separator
Terms,easyrpg_skill_cost_separator,f,DBString,0xC9,DBString(kDefaultTerm),0,0,Skill cost separator
Terms,easyrpg_equipment_arrow,f,DBString,0xCA,DBString(kDefaultTerm),0,0,Equipment window arrow
Expand Down Expand Up @@ -135,3 +153,5 @@ System,easyrpg_battle_use_rpg2ke_strings,f,Boolean,0xD8,False,0,1,If RPG Maker 2
System,easyrpg_use_rpg2k_battle_commands,f,Boolean,0xD9,False,0,1,If the RPG Maker 2000 battle commands should be used in RPG Maker 2003 games
System,easyrpg_default_actorai,f,Int32,0xDA,-1,0,0,System default actor AI
System,easyrpg_default_enemyai,f,Int32,0xDB,-1,0,0,System default enemy AI
Database,maniac_string_variables,f,Array<StringVariable>,0x21,,0,0,
StringVariable,name,f,DBString,0x01,,0,0,String
4 changes: 4 additions & 0 deletions generator/csv/flags_easyrpg.csv
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ EasyRpgStateRuntime,patch_rpg2k3_cmds_on,0
EasyRpgStateRuntime,patch_rpg2k3_cmds_off,0
EasyRpgStateRuntime,use_rpg2k_battle_system_on,0
EasyRpgStateRuntime,use_rpg2k_battle_system_off,0
ManiacMessageHook,user_event,0
ManiacMessageHook,create_window,0
ManiacMessageHook,destroy_window,0
ManiacMessageHook,text_rendering,0
1 change: 1 addition & 0 deletions generator/csv/structs_easyrpg.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Type,Structure,Base,Index available?
ldb,StringVariable,,1
lsd,SaveEasyRpgData,,0
lsd,SaveEasyRpgWindow,,1
lsd,SaveEasyRpgText,,0
2 changes: 2 additions & 0 deletions src/generated/fwd_flags_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "lcf/rpg/trooppagecondition.h"
#include "lcf/rpg/terrain.h"
#include "lcf/rpg/eventpagecondition.h"
#include "lcf/rpg/savesystem.h"
#include "lcf/rpg/savepicture.h"
#include "lcf/rpg/saveeventexecframe.h"
#include "lcf/rpg/saveeventexecstate.h"
Expand All @@ -21,6 +22,7 @@
template <> struct lcf::TypeCategory<lcf::rpg::TroopPageCondition::Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
template <> struct lcf::TypeCategory<lcf::rpg::Terrain::Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
template <> struct lcf::TypeCategory<lcf::rpg::EventPageCondition::Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
template <> struct lcf::TypeCategory<lcf::rpg::SaveSystem::ManiacMessageHook_Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
template <> struct lcf::TypeCategory<lcf::rpg::SavePicture::Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
template <> struct lcf::TypeCategory<lcf::rpg::SaveEventExecFrame::EasyRpgFrameRuntime_Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
template <> struct lcf::TypeCategory<lcf::rpg::SaveEventExecState::EasyRpgStateRuntime_Flags> { static const lcf::Category::Index value = lcf::Category::Flags; };
Expand Down
2 changes: 2 additions & 0 deletions src/generated/fwd_flags_instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "ldb_trooppagecondition_flags.h"
#include "ldb_terrain_special_flags.h"
#include "lmu_eventpagecondition_flags.h"
#include "lsd_savesystem_maniac_message_hook_flags.h"
#include "lsd_savepicture_flags.h"
#include "lsd_saveeventexecframe_easyrpg_runtime_flags.h"
#include "lsd_saveeventexecstate_easyrpg_runtime_flags.h"
Expand All @@ -23,6 +24,7 @@ namespace lcf {
template class Flags<rpg::TroopPageCondition::Flags>;
template class Flags<rpg::Terrain::Flags>;
template class Flags<rpg::EventPageCondition::Flags>;
template class Flags<rpg::SaveSystem::ManiacMessageHook_Flags>;
template class Flags<rpg::SavePicture::Flags>;
template class Flags<rpg::SaveEventExecFrame::EasyRpgFrameRuntime_Flags>;
template class Flags<rpg::SaveEventExecState::EasyRpgStateRuntime_Flags>;
Expand Down
5 changes: 5 additions & 0 deletions src/generated/fwd_struct_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ const char* const Struct<rpg::State>::name;
template <>
Field<rpg::State> const* Struct<rpg::State>::fields[];

template <>
const char* const Struct<rpg::StringVariable>::name;
template <>
Field<rpg::StringVariable> const* Struct<rpg::StringVariable>::fields[];

template <>
const char* const Struct<rpg::Switch>::name;
template <>
Expand Down
22 changes: 21 additions & 1 deletion src/generated/lcf/ldb/chunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,18 @@ namespace LDB_Reader {
yes = 0x98,
/** String */
no = 0x99,
/** Part 1 of item received message (item_received is part 2) */
maniac_item_received_a = 0xA1,
/** Part 1 of level up message */
maniac_level_up_a = 0xA2,
/** Part 3 of level up message (level_up is part 2) */
maniac_level_up_b = 0xA3,
/** Part 4 of level up message */
maniac_level_up_c = 0xA4,
/** Part 1 of exp message (exp_received is part 2) */
maniac_exp_received_a = 0xA5,
/** Part 1 of skill learning message (skill_learned is part 2) */
maniac_skill_learned_a = 0xA6,
/** Item number separator */
easyrpg_item_number_separator = 0xC8,
/** Skill cost separator */
Expand Down Expand Up @@ -1535,7 +1547,15 @@ namespace LDB_Reader {
/** Duplicated? - Not used - RPG2003 */
classD1 = 0x1F,
/** rpg::BattlerAnimation - RPG2003 */
battleranimations = 0x20
battleranimations = 0x20,
/** */
maniac_string_variables = 0x21
};
};
struct ChunkStringVariable {
enum Index {
/** String */
name = 0x01
};
};
}
Expand Down
26 changes: 25 additions & 1 deletion src/generated/lcf/lsd/chunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,38 @@ namespace LSD_Reader {
atb_mode = 0x8C,
/** rpg::Strings */
maniac_strings = 0x24,
/** Width of the message window in pixels */
maniac_message_window_width = 0x2D,
/** Height of the message window in pixels */
maniac_message_window_height = 0x2E,
/** Font to use in the message window */
maniac_message_font_name = 0x2F,
/** Size of the font in the message window */
maniac_message_font_size = 0x30,
/** Situations when to invoke the callbacks */
maniac_message_hook_flags = 0x32,
/** Common Event to call for a hook */
maniac_message_hook_common_event_id = 0x42,
/** Variable (starting range) populated when hook is invoked */
maniac_message_hook_callback_system_variable = 0x43,
/** String Variable populated when hook is invoked */
maniac_message_hook_callback_system_string_variable = 0x44,
/** Variable (starting range) populated when hook is invoked */
maniac_message_hook_callback_user_variable = 0x45,
/** String Variable populated when hook is invoked (TODO: Difference between System and User callback) */
maniac_message_hook_callback_user_string_variable = 0x46,
/** FatalMix Frameskip (0=None, 1=1/5, 2=1/3, 3=1/2) */
maniac_frameskip = 0x88,
/** FatalMix Picture Limit */
maniac_picture_limit = 0x89,
/** Various FatalMix options (XX XA XB XC). A: MsgSkip OFF/RShift (0/4) B: TestPlay Keep/ON/OFF (0/2/4), C: Pause focus lost Wait/Run (0/1) */
maniac_options = 0x8A,
/** JoyLeft, JoyRight, JoyUp, JoyDown, Joy1, ... Joy12 */
maniac_joypad_bindings = 0x8B
maniac_joypad_bindings = 0x8B,
/** Additional spacing between characters in the message window (Editor value - 1) */
maniac_message_spacing_char = 0x8E,
/** Additional spacing between lines in the message window (Editor value - 1) */
maniac_message_spacing_line = 0x8F
};
};
struct ChunkSaveScreen {
Expand Down
8 changes: 6 additions & 2 deletions src/generated/lcf/rpg/commonevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ namespace rpg {
enum Trigger {
Trigger_automatic = 3,
Trigger_parallel = 4,
Trigger_call = 5
Trigger_call = 5,
Trigger_maniac_battle_start = 6,
Trigger_maniac_battle_parallel = 7
};
static constexpr auto kTriggerTags = lcf::EnumTags{
Trigger_automatic, "automatic",
Trigger_parallel, "parallel",
Trigger_call, "call"
Trigger_call, "call",
Trigger_maniac_battle_start, "maniac_battle_start",
Trigger_maniac_battle_parallel, "maniac_battle_parallel"
};

int ID = 0;
Expand Down
9 changes: 8 additions & 1 deletion src/generated/lcf/rpg/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "lcf/rpg/item.h"
#include "lcf/rpg/skill.h"
#include "lcf/rpg/state.h"
#include "lcf/rpg/stringvariable.h"
#include "lcf/rpg/switch.h"
#include "lcf/rpg/system.h"
#include "lcf/rpg/terms.h"
Expand Down Expand Up @@ -64,6 +65,7 @@ namespace rpg {
BattleCommands battlecommands;
std::vector<Class> classes;
std::vector<BattlerAnimation> battleranimations;
std::vector<StringVariable> maniac_string_variables;
};

inline bool operator==(const Database& l, const Database& r) {
Expand All @@ -85,7 +87,8 @@ namespace rpg {
&& l.version == r.version
&& l.battlecommands == r.battlecommands
&& l.classes == r.classes
&& l.battleranimations == r.battleranimations;
&& l.battleranimations == r.battleranimations
&& l.maniac_string_variables == r.maniac_string_variables;
}

inline bool operator!=(const Database& l, const Database& r) {
Expand Down Expand Up @@ -162,6 +165,10 @@ namespace rpg {
const auto ctx19 = Context<Database, ParentCtx>{ "battleranimations", i, &obj, parent_ctx };
ForEachString(obj.battleranimations[i], f, &ctx19);
}
for (int i = 0; i < static_cast<int>(obj.maniac_string_variables.size()); ++i) {
const auto ctx20 = Context<Database, ParentCtx>{ "maniac_string_variables", i, &obj, parent_ctx };
ForEachString(obj.maniac_string_variables[i], f, &ctx20);
}
(void)obj;
(void)f;
(void)parent_ctx;
Expand Down
1 change: 1 addition & 0 deletions src/generated/lcf/rpg/fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ namespace rpg {
class Sound;
class Start;
class State;
class StringVariable;
class Switch;
class System;
class Terms;
Expand Down
Loading