├── .editorconfig ├── .gitattributes ├── .github └── workflows │ └── stable-compilation.yml ├── .gitignore ├── AUTHORS.md ├── CMakeLists.txt ├── CMakePresets.json ├── COPYING ├── Makefile.am ├── README.md ├── bench └── readldb.cpp ├── builds ├── Doxyfile ├── autoconf │ ├── liblcf-config-version.cmake.in │ ├── liblcf-config.cmake.in │ └── m4 │ │ └── ax_pkg_check_modules.m4 ├── cmake │ ├── CMakePresets.json.template │ ├── CMakePresetsBase.json │ ├── CMakePresetsUser.json │ ├── LinuxToolchain.cmake │ ├── Modules │ │ ├── ConfigureWindows.cmake │ │ ├── Findinih.cmake │ │ └── MiscUtils.cmake │ ├── gen-cmake-presets.py │ └── liblcf-config.cmake.in ├── config.h.in ├── liblcf.pc.in ├── release-helper.sh └── sources2buildsystem.pl ├── configure.ac ├── generator ├── README.md ├── csv │ ├── constants.csv │ ├── enums.csv │ ├── enums_easyrpg.csv │ ├── fields.csv │ ├── fields_easyrpg.csv │ ├── flags.csv │ ├── flags_easyrpg.csv │ ├── functions.csv │ ├── structs.csv │ └── structs_easyrpg.csv ├── generate.py └── templates │ ├── __init__.py │ ├── chunks.tmpl │ ├── copyright.tmpl │ ├── flag_fwd.tmpl │ ├── flag_instance.tmpl │ ├── flag_reader.tmpl │ ├── fwd.tmpl │ ├── fwd_struct.tmpl │ ├── reader.tmpl │ ├── rpg_header.tmpl │ └── rpg_source.tmpl ├── mime └── liblcf.xml ├── src ├── dbarray.cpp ├── dbstring_struct.cpp ├── encoder.cpp ├── generated │ ├── fwd_flags_impl.h │ ├── fwd_flags_instance.h │ ├── fwd_struct_impl.h │ ├── lcf │ │ ├── ldb │ │ │ └── chunks.h │ │ ├── lmt │ │ │ └── chunks.h │ │ ├── lmu │ │ │ └── chunks.h │ │ ├── lsd │ │ │ └── chunks.h │ │ └── rpg │ │ │ ├── actor.h │ │ │ ├── animation.h │ │ │ ├── animationcelldata.h │ │ │ ├── animationframe.h │ │ │ ├── animationtiming.h │ │ │ ├── attribute.h │ │ │ ├── battlecommand.h │ │ │ ├── battlecommands.h │ │ │ ├── battleranimation.h │ │ │ ├── battleranimationitemskill.h │ │ │ ├── battleranimationpose.h │ │ │ ├── battleranimationweapon.h │ │ │ ├── chipset.h │ │ │ ├── class.h │ │ │ ├── commonevent.h │ │ │ ├── database.h │ │ │ ├── encounter.h │ │ │ ├── enemy.h │ │ │ ├── enemyaction.h │ │ │ ├── equipment.h │ │ │ ├── event.h │ │ │ ├── eventcommand.h │ │ │ ├── eventpage.h │ │ │ ├── eventpagecondition.h │ │ │ ├── fwd.h │ │ │ ├── item.h │ │ │ ├── learning.h │ │ │ ├── map.h │ │ │ ├── mapinfo.h │ │ │ ├── movecommand.h │ │ │ ├── moveroute.h │ │ │ ├── music.h │ │ │ ├── parameters.h │ │ │ ├── rect.h │ │ │ ├── save.h │ │ │ ├── saveactor.h │ │ │ ├── savecommonevent.h │ │ │ ├── saveeasyrpgdata.h │ │ │ ├── saveeasyrpgtext.h │ │ │ ├── saveeasyrpgwindow.h │ │ │ ├── saveeventexecframe.h │ │ │ ├── saveeventexecstate.h │ │ │ ├── saveinventory.h │ │ │ ├── savemapevent.h │ │ │ ├── savemapeventbase.h │ │ │ ├── savemapinfo.h │ │ │ ├── savepanorama.h │ │ │ ├── savepartylocation.h │ │ │ ├── savepicture.h │ │ │ ├── savescreen.h │ │ │ ├── savesystem.h │ │ │ ├── savetarget.h │ │ │ ├── savetitle.h │ │ │ ├── savevehiclelocation.h │ │ │ ├── skill.h │ │ │ ├── sound.h │ │ │ ├── start.h │ │ │ ├── state.h │ │ │ ├── stringvariable.h │ │ │ ├── switch.h │ │ │ ├── system.h │ │ │ ├── terms.h │ │ │ ├── terrain.h │ │ │ ├── testbattler.h │ │ │ ├── treemap.h │ │ │ ├── troop.h │ │ │ ├── troopmember.h │ │ │ ├── trooppage.h │ │ │ ├── trooppagecondition.h │ │ │ └── variable.h │ ├── ldb_actor.cpp │ ├── ldb_animation.cpp │ ├── ldb_animationcelldata.cpp │ ├── ldb_animationframe.cpp │ ├── ldb_animationtiming.cpp │ ├── ldb_attribute.cpp │ ├── ldb_battlecommand.cpp │ ├── ldb_battlecommands.cpp │ ├── ldb_battleranimation.cpp │ ├── ldb_battleranimationitemskill.cpp │ ├── ldb_battleranimationpose.cpp │ ├── ldb_battleranimationweapon.cpp │ ├── ldb_chipset.cpp │ ├── ldb_class.cpp │ ├── ldb_commonevent.cpp │ ├── ldb_database.cpp │ ├── ldb_enemy.cpp │ ├── ldb_enemyaction.cpp │ ├── ldb_item.cpp │ ├── ldb_learning.cpp │ ├── ldb_music.cpp │ ├── ldb_skill.cpp │ ├── ldb_sound.cpp │ ├── ldb_state.cpp │ ├── ldb_stringvariable.cpp │ ├── ldb_switch.cpp │ ├── ldb_system.cpp │ ├── ldb_terms.cpp │ ├── ldb_terrain.cpp │ ├── ldb_terrain_special_flags.h │ ├── ldb_testbattler.cpp │ ├── ldb_troop.cpp │ ├── ldb_troopmember.cpp │ ├── ldb_trooppage.cpp │ ├── ldb_trooppagecondition.cpp │ ├── ldb_trooppagecondition_flags.h │ ├── ldb_variable.cpp │ ├── lmt_encounter.cpp │ ├── lmt_mapinfo.cpp │ ├── lmt_start.cpp │ ├── lmu_event.cpp │ ├── lmu_eventpage.cpp │ ├── lmu_eventpagecondition.cpp │ ├── lmu_eventpagecondition_flags.h │ ├── lmu_map.cpp │ ├── lmu_moveroute.cpp │ ├── lsd_save.cpp │ ├── lsd_saveactor.cpp │ ├── lsd_savecommonevent.cpp │ ├── lsd_saveeasyrpgdata.cpp │ ├── lsd_saveeasyrpgtext.cpp │ ├── lsd_saveeasyrpgtext_flags.h │ ├── lsd_saveeasyrpgwindow.cpp │ ├── lsd_saveeasyrpgwindow_flags.h │ ├── lsd_saveeventexecframe.cpp │ ├── lsd_saveeventexecframe_easyrpg_runtime_flags.h │ ├── lsd_saveeventexecstate.cpp │ ├── lsd_saveeventexecstate_easyrpg_runtime_flags.h │ ├── lsd_saveinventory.cpp │ ├── lsd_savemapevent.cpp │ ├── lsd_savemapeventbase.cpp │ ├── lsd_savemapeventbase_easyrpg_runtime_flags.h │ ├── lsd_savemapinfo.cpp │ ├── lsd_savepanorama.cpp │ ├── lsd_savepartylocation.cpp │ ├── lsd_savepicture.cpp │ ├── lsd_savepicture_flags.h │ ├── lsd_savescreen.cpp │ ├── lsd_savesystem.cpp │ ├── lsd_savesystem_maniac_message_hook_flags.h │ ├── lsd_savetarget.cpp │ ├── lsd_savetitle.cpp │ ├── lsd_savevehiclelocation.cpp │ ├── rpg_actor.cpp │ ├── rpg_animation.cpp │ ├── rpg_animationcelldata.cpp │ ├── rpg_animationframe.cpp │ ├── rpg_animationtiming.cpp │ ├── rpg_attribute.cpp │ ├── rpg_battlecommand.cpp │ ├── rpg_battlecommands.cpp │ ├── rpg_battleranimation.cpp │ ├── rpg_battleranimationitemskill.cpp │ ├── rpg_battleranimationpose.cpp │ ├── rpg_battleranimationweapon.cpp │ ├── rpg_chipset.cpp │ ├── rpg_class.cpp │ ├── rpg_commonevent.cpp │ ├── rpg_database.cpp │ ├── rpg_encounter.cpp │ ├── rpg_enemy.cpp │ ├── rpg_enemyaction.cpp │ ├── rpg_equipment.cpp │ ├── rpg_event.cpp │ ├── rpg_eventcommand.cpp │ ├── rpg_eventpage.cpp │ ├── rpg_eventpagecondition.cpp │ ├── rpg_item.cpp │ ├── rpg_learning.cpp │ ├── rpg_map.cpp │ ├── rpg_mapinfo.cpp │ ├── rpg_movecommand.cpp │ ├── rpg_moveroute.cpp │ ├── rpg_music.cpp │ ├── rpg_parameters.cpp │ ├── rpg_rect.cpp │ ├── rpg_save.cpp │ ├── rpg_saveactor.cpp │ ├── rpg_savecommonevent.cpp │ ├── rpg_saveeasyrpgdata.cpp │ ├── rpg_saveeasyrpgtext.cpp │ ├── rpg_saveeasyrpgwindow.cpp │ ├── rpg_saveeventexecframe.cpp │ ├── rpg_saveeventexecstate.cpp │ ├── rpg_saveinventory.cpp │ ├── rpg_savemapevent.cpp │ ├── rpg_savemapeventbase.cpp │ ├── rpg_savemapinfo.cpp │ ├── rpg_savepanorama.cpp │ ├── rpg_savepartylocation.cpp │ ├── rpg_savepicture.cpp │ ├── rpg_savescreen.cpp │ ├── rpg_savesystem.cpp │ ├── rpg_savetarget.cpp │ ├── rpg_savetitle.cpp │ ├── rpg_savevehiclelocation.cpp │ ├── rpg_skill.cpp │ ├── rpg_sound.cpp │ ├── rpg_start.cpp │ ├── rpg_state.cpp │ ├── rpg_stringvariable.cpp │ ├── rpg_switch.cpp │ ├── rpg_system.cpp │ ├── rpg_terms.cpp │ ├── rpg_terrain.cpp │ ├── rpg_testbattler.cpp │ ├── rpg_treemap.cpp │ ├── rpg_troop.cpp │ ├── rpg_troopmember.cpp │ ├── rpg_trooppage.cpp │ ├── rpg_trooppagecondition.cpp │ └── rpg_variable.cpp ├── inireader.cpp ├── lcf │ ├── context.h │ ├── dbarray.h │ ├── dbarrayalloc.h │ ├── dbbitarray.h │ ├── dbstring.h │ ├── encoder.h │ ├── enum_tags.h │ ├── flag_set.h │ ├── inireader.h │ ├── ldb │ │ └── reader.h │ ├── lmt │ │ └── reader.h │ ├── lmu │ │ └── reader.h │ ├── log_handler.h │ ├── lsd │ │ └── reader.h │ ├── reader_lcf.h │ ├── reader_util.h │ ├── reader_xml.h │ ├── saveopt.h │ ├── scope_guard.h │ ├── span.h │ ├── string_view.h │ ├── third_party │ │ └── span.h │ ├── writer_lcf.h │ └── writer_xml.h ├── ldb_equipment.cpp ├── ldb_eventcommand.cpp ├── ldb_parameters.cpp ├── ldb_reader.cpp ├── lmt_reader.cpp ├── lmt_rect.cpp ├── lmt_treemap.cpp ├── lmu_movecommand.cpp ├── lmu_reader.cpp ├── log.h ├── log_handler.cpp ├── lsd_reader.cpp ├── reader_flags.cpp ├── reader_lcf.cpp ├── reader_struct.h ├── reader_struct_impl.h ├── reader_util.cpp ├── reader_xml.cpp ├── rpg_setup.cpp ├── rpg_terms.cpp ├── saveopt.cpp ├── writer_lcf.cpp └── writer_xml.cpp ├── tests ├── dbarray.cpp ├── dbbitarray.cpp ├── dbstring.cpp ├── doctest.h ├── enum_tags.cpp ├── flag_set.cpp ├── ini.cpp ├── span.cpp ├── string_view.cpp ├── test_main.cpp └── time_stamp.cpp └── tools ├── lcf2xml.cpp └── lcfstrings.cpp /.editorconfig: -------------------------------------------------------------------------------- 1 | # https://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = tab 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.{md,py}] 11 | indent_style = space 12 | indent_size = 4 13 | 14 | [*.{sh,yml}] 15 | indent_style = space 16 | indent_size = 2 17 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.cpp text 3 | *.h text linguist-language=C++ 4 | *.md text 5 | *.csv text 6 | *.cmake text 7 | *.pc text 8 | *.in text 9 | *.tmpl text linguist-language=Jinja2 10 | *.py text 11 | *.ac text 12 | *.am text 13 | 14 | tests/doctest.h -diff linguist-vendored 15 | builds/autoconf/m4/ax_*.m4 -diff linguist-vendored 16 | src/lcf/third_party/*.h -diff linguist-vendored 17 | CMakePresets.json -diff linguist-generated 18 | 19 | src/generated/** -diff 20 | -------------------------------------------------------------------------------- /.github/workflows/stable-compilation.yml: -------------------------------------------------------------------------------- 1 | name: Stable Compilation 2 | 3 | on: 4 | push: 5 | pull_request: 6 | workflow_dispatch: 7 | 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.ref }} 10 | cancel-in-progress: true 11 | 12 | defaults: 13 | run: 14 | shell: bash 15 | 16 | jobs: 17 | docker: 18 | name: ${{ matrix.image }} 19 | runs-on: ubuntu-latest 20 | container: 21 | image: ${{ matrix.image }} 22 | 23 | strategy: 24 | fail-fast: false 25 | matrix: 26 | image: 27 | - ubuntu:20.04 # CMake 3.16.3 - g++ 9.3.0 - LTS 28 | - debian:11 # CMake 3.18.4 - g++ 10.2.1 - oldstable 29 | - ubuntu:22.04 # CMake 3.22.1 - g++ 11.2.0 - LTS 30 | - debian:12 # CMake 3.25.1 - g++ 12.2.0 - stable 31 | 32 | steps: 33 | - name: Install dependencies 34 | run: | 35 | export DEBIAN_FRONTEND="noninteractive" 36 | apt-get update 37 | apt-get install -y --no-install-recommends --no-install-suggests \ 38 | ca-certificates build-essential cmake ninja-build git \ 39 | libicu-dev libexpat1-dev libinih-dev 40 | 41 | - name: Clone Repository 42 | uses: actions/checkout@v4 43 | 44 | - name: Compile 45 | run: | 46 | cmake -G Ninja -B build . \ 47 | -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr 48 | cmake --build build 49 | 50 | - name: Install 51 | run: | 52 | cmake --install build 53 | 54 | - name: Test 55 | run: cmake --build build --target check 56 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # autotools build method 2 | /autom4te.cache/ 3 | /builds/autoconf/ 4 | !/builds/autoconf/m4/m4_ax_pkg_check_modules.m4 5 | !/builds/autoconf/liblcf-config.cmake.in 6 | /lcf2xml 7 | /liblcf-*/ 8 | .deps/ 9 | .libs/ 10 | .dirstamp 11 | Makefile.in 12 | aclocal.m4 13 | config.log 14 | config.status 15 | configure 16 | libtool 17 | stamp-h1 18 | *.la 19 | *.lo 20 | 21 | # cmake build method 22 | bin/ 23 | CMakeCache.txt 24 | CMakeFiles/ 25 | *.cmake 26 | !/builds/cmake/Modules/*.cmake 27 | CMakeDoxyfile.in 28 | install_manifest.txt 29 | Testing/ 30 | build/ 31 | 32 | # msvc / Windows 33 | *.vcxproj* 34 | *.sdf 35 | *.ncb 36 | *.psess 37 | *.suo 38 | *.user 39 | *.vsp* 40 | *.lib 41 | *.exe 42 | *.exp 43 | *.ilk 44 | *.pdb 45 | 46 | # ninja 47 | .ninja_* 48 | *.ninja 49 | 50 | # IntelliJ / CLion 51 | .idea/ 52 | 53 | # VS Code 54 | .vscode/ 55 | .cache/ 56 | compile_commands.json 57 | 58 | # doxygen generated files 59 | /doc/ 60 | 61 | # Python generated files 62 | *.pyc 63 | __pycache__/ 64 | 65 | # other generated files 66 | Makefile 67 | *~ 68 | *.a 69 | *.o 70 | *.pc 71 | config.h 72 | liblcf-config.cmake 73 | liblcf-config-version.cmake 74 | 75 | # tests 76 | test_runner* 77 | 78 | # distribution archives 79 | liblcf-*.tar.* 80 | 81 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | liblcf authors 2 | ============== 3 | 4 | * Alberto Leon Meaños (albeleon) 5 | * Alejandro Marzini (vgvgf) 6 | * Antidote 7 | * BSzili 8 | * Carsten Teibes (carstene1ns) 9 | * Christian Breitwieser (ChrisBreiti) 10 | * Diego Pedraza (zegeri) 11 | * Dmytro Kushnariov (rohkea) 12 | * Florian Ignaz "Spatzenfärber" Eßl (florianessl) 13 | * Gabriel Kind (Ghabry) 14 | * gameblabla 15 | * Glynn Clements (glynnc) 16 | * lumiscosity 17 | * Mariano Javier Suligoy (MarianoGNU) 18 | * Masanori Kakura (kakurasan) 19 | * Matthew Fioravante (mateofio) 20 | * Paulo "Zhek" Vizcaino (paulo_v) 21 | * Primekick 22 | * rueter37 23 | * scurest 24 | * SmiVan 25 | * Takeshi Watanabe (takecheeze) 26 | * ToolMan2k 27 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2025 liblcf authors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included 12 | in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 18 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 19 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 20 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /bench/readldb.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "lcf/ldb/reader.h" 3 | 4 | using namespace lcf; 5 | 6 | int main(int argc, char** argv) { 7 | if (argc < 2) { 8 | std::cerr << "Must specify a file!" << std::endl; 9 | return 1; 10 | } 11 | const auto& infile = argv[1]; 12 | auto db = LDB_Reader::Load(infile, ""); 13 | if (db == nullptr) { 14 | std::cerr << "Failed to load file : " << infile << std::endl; 15 | return 1; 16 | } 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /builds/autoconf/liblcf-config.cmake.in: -------------------------------------------------------------------------------- 1 | # For "simplicity" reasons depend on pkg-config when liblcf was compiled with autotools 2 | 3 | include(CMakeFindDependencyMacro) 4 | 5 | find_dependency(PkgConfig REQUIRED QUIET) 6 | 7 | pkg_check_modules(liblcf REQUIRED QUIET IMPORTED_TARGET liblcf=@PACKAGE_VERSION@) 8 | 9 | get_property(library_name TARGET PkgConfig::liblcf PROPERTY INTERFACE_LINK_LIBRARIES) 10 | 11 | if (library_name MATCHES ".a$") 12 | list(REMOVE_ITEM liblcf_STATIC_LIBRARIES lcf) 13 | set_property(TARGET PkgConfig::liblcf APPEND PROPERTY 14 | INTERFACE_LINK_LIBRARIES "${liblcf_STATIC_LIBRARIES}") 15 | set_property(TARGET PkgConfig::liblcf APPEND PROPERTY 16 | INTERFACE_LINK_DIRECTORIES "${liblcf_STATIC_LIBRARY_DIRS}") 17 | endif() 18 | 19 | add_library(liblcf::liblcf ALIAS PkgConfig::liblcf) 20 | -------------------------------------------------------------------------------- /builds/cmake/CMakePresetsBase.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 4, 3 | "configurePresets": [ 4 | { 5 | "name": "base", 6 | "displayName": "base preset", 7 | "hidden": true, 8 | "generator": "Ninja", 9 | "binaryDir": "${sourceDir}/build/${presetName}", 10 | "cacheVariables": { 11 | "BUILD_SHARED_LIBS": "OFF", 12 | "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" 13 | } 14 | }, 15 | { 16 | "name": "type-debug", 17 | "displayName": "build Debug", 18 | "hidden": true, 19 | "cacheVariables": { 20 | "CMAKE_BUILD_TYPE": "Debug", 21 | "CMAKE_CONFIGURATION_TYPES": "Debug" 22 | } 23 | }, 24 | { 25 | "name": "type-relwithdebinfo", 26 | "displayName": "build RelWithDebInfo", 27 | "hidden": true, 28 | "cacheVariables": { 29 | "CMAKE_BUILD_TYPE": "RelWithDebInfo", 30 | "CMAKE_CONFIGURATION_TYPES": "RelWithDebInfo" 31 | } 32 | }, 33 | { 34 | "name": "type-release", 35 | "displayName": "build release", 36 | "hidden": true, 37 | "cacheVariables": { 38 | "CMAKE_BUILD_TYPE": "Release", 39 | "CMAKE_CONFIGURATION_TYPES": "Release" 40 | } 41 | }, 42 | { 43 | "name": "win-base", 44 | "displayName": "windows base preset", 45 | "hidden": true, 46 | "toolchainFile": "$env{EASYRPG_BUILDSCRIPTS}/windows/vcpkg/scripts/buildsystems/vcpkg.cmake", 47 | "inherits": "base", 48 | "condition": { 49 | "type": "equals", 50 | "lhs": "${hostSystemName}", 51 | "rhs": "Windows" 52 | } 53 | }, 54 | { 55 | "name": "dkp", 56 | "displayName": "devkitPro base preset", 57 | "hidden": true, 58 | "inherits": "base", 59 | "cacheVariables": { 60 | "LIBLCF_ENABLE_TOOLS": "OFF" 61 | } 62 | }, 63 | { 64 | "name": "android", 65 | "displayName": "Android base preset", 66 | "hidden": true, 67 | "inherits": "base", 68 | "toolchainFile": "$env{$ANDROID_NDK}/build/cmake/android.toolchain.cmake", 69 | "cacheVariables": { 70 | "ANDROID_PLATFORM": "android-21", 71 | "LIBLCF_ENABLE_TOOLS": "OFF" 72 | }, 73 | "environment": { 74 | "ANDROID_NDK": "$env{EASYRPG_BUILDSCRIPTS}/android/android-sdk/ndk/21.4.7075529" 75 | } 76 | } 77 | ] 78 | } 79 | -------------------------------------------------------------------------------- /builds/cmake/LinuxToolchain.cmake: -------------------------------------------------------------------------------- 1 | # Required to prevent that system libraries are found when using buildscripts 2 | 3 | set(CMAKE_SYSTEM_NAME Linux) 4 | 5 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) 6 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 7 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 8 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 9 | 10 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_PREFIX_PATH}) 11 | -------------------------------------------------------------------------------- /builds/cmake/Modules/ConfigureWindows.cmake: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | # Target Unicode API 3 | add_definitions(-D_UNICODE) 4 | add_definitions(-DUNICODE) 5 | 6 | # Disable API deprecation warnings 7 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) 8 | 9 | # Prevent some Windows.h global namespace pollution 10 | add_definitions(-DNOMINMAX) 11 | add_definitions(-DWIN32_LEAN_AND_MEAN) 12 | endif() 13 | 14 | if(MSVC) 15 | if(${CMAKE_VERSION} VERSION_LESS "3.15.0") 16 | message(WARNING "Your CMake version is older than 3.15") 17 | message(WARNING "For proper MSVC runtime library support upgrade to a newer version") 18 | 19 | option(SHARED_RUNTIME "Windows: Build using the shared runtime library (/MD), disable for static runtime (/MT)" ON) 20 | 21 | # Set compiler options. 22 | set(variables 23 | CMAKE_C_FLAGS_DEBUG 24 | CMAKE_C_FLAGS_MINSIZEREL 25 | CMAKE_C_FLAGS_RELEASE 26 | CMAKE_C_FLAGS_RELWITHDEBINFO 27 | CMAKE_CXX_FLAGS_DEBUG 28 | CMAKE_CXX_FLAGS_MINSIZEREL 29 | CMAKE_CXX_FLAGS_RELEASE 30 | CMAKE_CXX_FLAGS_RELWITHDEBINFO 31 | ) 32 | if(SHARED_RUNTIME) 33 | message(STATUS "Windows: Using dynamic runtime library (/MD)") 34 | foreach(variable ${variables}) 35 | if(${variable} MATCHES "/MT") 36 | string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}") 37 | endif() 38 | endforeach() 39 | else() 40 | message(STATUS "Windows: Using static runtime library (/MT)") 41 | foreach(variable ${variables}) 42 | if(${variable} MATCHES "/MD") 43 | string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}") 44 | endif() 45 | endforeach() 46 | endif() 47 | else() 48 | # Depends on vcpkg but we don't support anything else 49 | set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>$<$:DLL>" CACHE STRING "") 50 | endif() 51 | 52 | option(MSVC_MULTICORE "MSVC: Build using multiple cores (/MP)" ON) 53 | if (MSVC_MULTICORE) 54 | add_compile_options("/MP") 55 | endif() 56 | 57 | # Interpret character literals as UTF-8 58 | add_compile_options("/utf-8") 59 | endif() 60 | -------------------------------------------------------------------------------- /builds/cmake/Modules/Findinih.cmake: -------------------------------------------------------------------------------- 1 | #.rst: 2 | # Findinih 3 | # -------- 4 | # 5 | # Find the inih Library 6 | # 7 | # Imported Targets 8 | # ^^^^^^^^^^^^^^^^ 9 | # 10 | # This module defines the following :prop_tgt:`IMPORTED` targets: 11 | # 12 | # ``inih::inih`` 13 | # The ``inih`` library, if found. 14 | # 15 | # Result Variables 16 | # ^^^^^^^^^^^^^^^^ 17 | # 18 | # This module will set the following variables in your project: 19 | # 20 | # ``INIH_INCLUDE_DIRS`` 21 | # where to find inih headers. 22 | # ``INIH_LIBRARIES`` 23 | # the libraries to link against to use inih. 24 | # ``INIH_FOUND`` 25 | # true if the inih headers and libraries were found. 26 | 27 | find_package(PkgConfig QUIET) 28 | 29 | pkg_check_modules(PC_INIH QUIET libinih) 30 | 31 | # Look for the header file. 32 | find_path(INIH_INCLUDE_DIR 33 | NAMES ini.h 34 | HINTS ${PC_INIH_INCLUDE_DIRS}) 35 | 36 | # Look for the library. 37 | # Allow INIH_LIBRARY to be set manually, as the location of the inih library 38 | if(NOT INIH_LIBRARY) 39 | find_library(INIH_LIBRARY 40 | NAMES libinih inih 41 | HINTS ${PC_INIH_LIBRARY_DIRS}) 42 | endif() 43 | 44 | include(FindPackageHandleStandardArgs) 45 | find_package_handle_standard_args(inih 46 | REQUIRED_VARS INIH_LIBRARY INIH_INCLUDE_DIR) 47 | 48 | if(INIH_FOUND) 49 | set(INIH_INCLUDE_DIRS ${INIH_INCLUDE_DIR}) 50 | 51 | if(NOT INIH_LIBRARIES) 52 | set(INIH_LIBRARIES ${INIH_LIBRARIES}) 53 | endif() 54 | 55 | if(NOT TARGET inih::inih) 56 | add_library(inih::inih UNKNOWN IMPORTED) 57 | set_target_properties(inih::inih PROPERTIES 58 | INTERFACE_INCLUDE_DIRECTORIES "${INIH_INCLUDE_DIRS}" 59 | IMPORTED_LOCATION "${INIH_LIBRARY}") 60 | endif() 61 | endif() 62 | 63 | mark_as_advanced(INIH_INCLUDE_DIR INIH_LIBRARY) 64 | -------------------------------------------------------------------------------- /builds/cmake/Modules/MiscUtils.cmake: -------------------------------------------------------------------------------- 1 | 2 | # check if we are a submodule 3 | if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR}) 4 | set(LIBLCF_MAIN_PROJECT ON) 5 | else() 6 | set(LIBLCF_MAIN_PROJECT OFF) 7 | endif() 8 | 9 | # prevent in-source builds 10 | if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) 11 | message(FATAL_ERROR "In-source builds are disabled.") 12 | endif() 13 | -------------------------------------------------------------------------------- /builds/cmake/liblcf-config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | include(CMakeFindDependencyMacro) 4 | 5 | # Required to find our installed Findinih.cmake 6 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") 7 | 8 | if(@LCF_SUPPORT_INI@) 9 | find_dependency(inih REQUIRED) 10 | endif() 11 | 12 | if(@LCF_SUPPORT_ICU@ EQUAL 1) 13 | find_dependency(ICU COMPONENTS i18n uc data REQUIRED) 14 | endif() 15 | 16 | if(@LCF_SUPPORT_XML@ EQUAL 1) 17 | find_dependency(expat CONFIG REQUIRED) 18 | elseif(@LCF_SUPPORT_XML@ EQUAL 2) 19 | # Fallback to old expat detection 20 | find_dependency(EXPAT REQUIRED) 21 | endif() 22 | 23 | ## Create aliases for common expat target names 24 | # The config file creates expat::expat 25 | if (TARGET expat::expat AND NOT TARGET EXPAT::EXPAT) 26 | add_library(EXPAT::EXPAT ALIAS expat::expat) 27 | endif() 28 | 29 | # The find module creates EXPAT::EXPAT 30 | if (TARGET EXPAT::EXPAT AND NOT TARGET expat::expat) 31 | add_library(expat::expat ALIAS EXPAT::EXPAT) 32 | endif() 33 | 34 | include(${CMAKE_CURRENT_LIST_DIR}/liblcf-targets.cmake) 35 | -------------------------------------------------------------------------------- /builds/config.h.in: -------------------------------------------------------------------------------- 1 | /* Generated by the buildsystem DO NOT EDIT */ 2 | 3 | /* Enable encoding detection (ICU) */ 4 | #define LCF_SUPPORT_ICU @LCF_SUPPORT_ICU@ 5 | 6 | /* Enable XML reading support (expat) */ 7 | #define LCF_SUPPORT_XML @LCF_SUPPORT_XML@ 8 | 9 | /* Enable INI reading support (INIH) */ 10 | #define LCF_SUPPORT_INI @LCF_SUPPORT_INI@ 11 | -------------------------------------------------------------------------------- /builds/liblcf.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: @PACKAGE_TARNAME@ 7 | Description: Library to handle RPG Maker 2000 and 2003 game data 8 | Version: @PACKAGE_VERSION@ 9 | URL: https://easyrpg.org/ 10 | Requires.private: @AX_PACKAGE_REQUIRES_PRIVATE@ 11 | Libs: -L${libdir} -llcf 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /builds/release-helper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # release-helper.sh - maintainer utility script to change 4 | # the library version and update all copyright dates 5 | # by carstene1ns 2021, released under the MIT license 6 | 7 | set -e 8 | 9 | year=$(date +%Y) 10 | version=$1 11 | verbose=${2:-quiet} 12 | 13 | # helpers 14 | reset="\e[0m" 15 | red="\e[31m" 16 | yellow="\e[33m" 17 | blue="\e[36m" 18 | bold="\e[1m" 19 | function print_file() { 20 | if [ $verbose == "verbose" ]; then 21 | echo -e "$yellow $file:$reset" 22 | else 23 | echo -e "$yellow $file$reset" 24 | fi 25 | } 26 | 27 | function print_verbose() { 28 | if [ $verbose == "verbose" ]; then 29 | echo -ne "$blue" 30 | grep "$1" $2 31 | echo -e "$reset" 32 | fi 33 | } 34 | 35 | if [[ ! -z $version ]]; then 36 | 37 | if [[ ! $version =~ ^[0-9](\.[0-9]){1,3}$ ]]; then 38 | 39 | echo "Invalid version argument. Only digits and dots allowed." 40 | echo "Example: 0.8 or 0.7.0.1" 41 | exit 1 42 | 43 | fi 44 | 45 | echo "Updating Version in:" 46 | 47 | file=CMakeLists.txt 48 | print_file 49 | sed -i "/liblcf VERSION/,1 s/[0-9]\(.[0-9]\)\{1,2\}/$version/" $file 50 | print_verbose 'liblcf VERSION' $file 51 | 52 | file=configure.ac 53 | print_file 54 | sed -i "/AC_INIT/,1 s/[0-9]\(.[0-9]\)\{1,2\}/$version/" $file 55 | print_verbose 'AC_INIT' $file 56 | 57 | file=README.md 58 | print_file 59 | sed -i "s/\(liblcf-\)[0-9]\(.[0-9]\)\{1,2\}/\1$version/g" $file 60 | print_verbose 'liblcf-' $file 61 | else 62 | 63 | echo "No new version argument, only updating copyright years!" 64 | 65 | fi 66 | 67 | echo "Updating License…" 68 | 69 | file=COPYING 70 | print_file 71 | sed -i "1,1 s/2014-2[0-9][0-9][0-9]/2014-$year/" $file 72 | print_verbose '2014-' $file 73 | 74 | echo -e "$( 75 | cat << EOM 76 | 77 | ${red}Please check ${bold}README.md${reset}${red} file for whitespace problems.${reset} 78 | 79 | If everything is ready and committed, use these commands to publish the git tag: 80 | $ git tag -a (-s) $version -m "Codename \"fancy codename\"" 81 | $ git push (-n) --tags upstream 82 | EOM 83 | )" 84 | -------------------------------------------------------------------------------- /generator/README.md: -------------------------------------------------------------------------------- 1 | # liblcf source code generator 2 | 3 | Files in the `generated` subdirectory of `src` directory are regenerated 4 | automatically when running the `generate.py` script. 5 | 6 | These source code files are generated with the `templates` subfolder 7 | structure based on the `csv` subfolder data files. 8 | 9 | 10 | ## Requirements 11 | 12 | * Python interpreter 3. 13 | * Jinja2 template engine. 14 | * pandas data analysis library 15 | * CSV files can be modified with any text editor or (at your option) any 16 | spreadsheet editor. 17 | 18 | 19 | ## Usage 20 | 21 | 1. Open one of the .csv files in the `csv` subdirectory to edit or add new 22 | data then save file changes. 23 | 2. Run the script file `generate.py` from the `generator` folder. 24 | 3. Add any newly created .cpp and .h files to project files if needed. 25 | 4. Recompile liblcf. 26 | -------------------------------------------------------------------------------- /generator/csv/constants.csv: -------------------------------------------------------------------------------- 1 | Structure,name,type,value,comment 2 | State,kDeathID,int,1,The ID of the special death state 3 | SavePartyLocation,kPanXDefault,int,9 * 256,Equal to 9 tiles in 1/16th pixels 4 | SavePartyLocation,kPanYDefault,int,7 * 256,Equal to 7 tiles in 1/16th pixels 5 | SavePartyLocation,kPanSpeedDefault,int,2 << 3,Frame speed in 1/16th pixels 6 | SaveActor,kEmptyName,const char*,"""\x1""",Sentinel name used to denote that the default LDB name should be used. 7 | Skill,kDefaultMessage,const char*,"""default_message""",Sentinel name used to denote that the default skill start message should be used. 8 | Item,kDefaultMessage,const char*,"""default_message""",Sentinel name used to denote that the default item start message should be used. 9 | Terms,kDefaultTerm,const char*,"""default_term""",Sentinel name used to denote that the default hardcoded term should be used. 10 | -------------------------------------------------------------------------------- /generator/csv/flags.csv: -------------------------------------------------------------------------------- 1 | Structure,Field,Is2k3 2 | TroopPageCondition,switch_a,0 3 | TroopPageCondition,switch_b,0 4 | TroopPageCondition,variable,0 5 | TroopPageCondition,turn,0 6 | TroopPageCondition,fatigue,0 7 | TroopPageCondition,enemy_hp,0 8 | TroopPageCondition,actor_hp,0 9 | TroopPageCondition,turn_enemy,1 10 | TroopPageCondition,turn_actor,1 11 | TroopPageCondition,command_actor,1 12 | Terrain,back_party,1 13 | Terrain,back_enemies,1 14 | Terrain,lateral_party,1 15 | Terrain,lateral_enemies,1 16 | EventPageCondition,switch_a,0 17 | EventPageCondition,switch_b,0 18 | EventPageCondition,variable,0 19 | EventPageCondition,item,0 20 | EventPageCondition,actor,0 21 | EventPageCondition,timer,0 22 | EventPageCondition,timer2,1 23 | SavePicture,erase_on_map_change,1 24 | SavePicture,erase_on_battle_end,1 25 | SavePicture,unused_bit,1 26 | SavePicture,unused_bit2,1 27 | SavePicture,affected_by_tint,1 28 | SavePicture,affected_by_flash,1 29 | SavePicture,affected_by_shake,1 30 | -------------------------------------------------------------------------------- /generator/csv/flags_easyrpg.csv: -------------------------------------------------------------------------------- 1 | Structure,Field,Is2k3 2 | SaveEasyRpgWindow,draw_frame,0 3 | SaveEasyRpgWindow,border_margin,0 4 | SaveEasyRpgText,draw_gradient,0 5 | SaveEasyRpgText,draw_shadow,0 6 | SaveEasyRpgText,bold,0 7 | SaveEasyRpgText,italic,0 8 | EasyRpgFrameRuntime,reserved_1,0 9 | EasyRpgEventRuntime,reserved_1,0 10 | EasyRpgStateRuntime,conf_override_active,0 11 | EasyRpgStateRuntime,reserved_1,0 12 | EasyRpgStateRuntime,reserved_2,0 13 | EasyRpgStateRuntime,reserved_3,0 14 | EasyRpgStateRuntime,patch_destiny_on,0 15 | EasyRpgStateRuntime,patch_destiny_off,0 16 | EasyRpgStateRuntime,patch_dynrpg_on,0 17 | EasyRpgStateRuntime,patch_dynrpg_off,0 18 | EasyRpgStateRuntime,patch_maniac_on,0 19 | EasyRpgStateRuntime,patch_maniac_off,0 20 | EasyRpgStateRuntime,patch_common_this_event_on,0 21 | EasyRpgStateRuntime,patch_common_this_event_off,0 22 | EasyRpgStateRuntime,patch_unlock_pics_on,0 23 | EasyRpgStateRuntime,patch_unlock_pics_off,0 24 | EasyRpgStateRuntime,patch_keypatch_on,0 25 | EasyRpgStateRuntime,patch_keypatch_off,0 26 | EasyRpgStateRuntime,patch_rpg2k3_cmds_on,0 27 | EasyRpgStateRuntime,patch_rpg2k3_cmds_off,0 28 | EasyRpgStateRuntime,use_rpg2k_battle_system_on,0 29 | EasyRpgStateRuntime,use_rpg2k_battle_system_off,0 30 | ManiacMessageHook,user_event,0 31 | ManiacMessageHook,create_window,0 32 | ManiacMessageHook,destroy_window,0 33 | ManiacMessageHook,text_rendering,0 34 | -------------------------------------------------------------------------------- /generator/csv/functions.csv: -------------------------------------------------------------------------------- 1 | Structure,Method,Static,Headers 2 | Actor,void Setup(bool is2k3),f, 3 | Parameters,void Setup(int final_level),f, 4 | Terms,"std::string TermOrDefault(const DBString& db_term, std::string_view default_term)",t, 5 | -------------------------------------------------------------------------------- /generator/csv/structs.csv: -------------------------------------------------------------------------------- 1 | Type,Structure,Base,Index available? 2 | ldb,Parameters,, 3 | ldb,Equipment,, 4 | ldb,EventCommand,, 5 | ldb,MoveCommand,, 6 | ldb,Learning,,1 7 | ldb,Actor,,1 8 | ldb,Sound,,0 9 | ldb,AnimationTiming,,1 10 | ldb,AnimationCellData,,1 11 | ldb,AnimationFrame,,1 12 | ldb,Animation,,1 13 | ldb,Attribute,,1 14 | ldb,BattleCommand,,1 15 | ldb,BattleCommands,,0 16 | ldb,BattlerAnimation,,1 17 | ldb,BattlerAnimationItemSkill,,1 18 | ldb,BattlerAnimationPose,,1 19 | ldb,BattlerAnimationWeapon,,1 20 | ldb,Chipset,,1 21 | ldb,Class,,1 22 | ldb,CommonEvent,,1 23 | ldb,Skill,,1 24 | ldb,Item,,1 25 | ldb,EnemyAction,,1 26 | ldb,Enemy,,1 27 | ldb,TroopMember,,1 28 | ldb,TroopPageCondition,,0 29 | ldb,TroopPage,,1 30 | ldb,Troop,,1 31 | ldb,Terrain,,1 32 | ldb,State,,1 33 | ldb,Terms,,0 34 | ldb,Music,,0 35 | ldb,TestBattler,,1 36 | ldb,System,,0 37 | ldb,Switch,,1 38 | ldb,Variable,,1 39 | ldb,Database,,0 40 | lmu,EventPageCondition,,0 41 | lmu,MoveRoute,,0 42 | lmu,EventPage,,1 43 | lmu,Event,,1 44 | lmu,Map,,0 45 | lsd,SaveTitle,,0 46 | lsd,SaveSystem,,0 47 | lsd,SaveScreen,,0 48 | lsd,SavePicture,,1 49 | lsd,SavePartyLocation,SaveMapEventBase,0 50 | lsd,SaveVehicleLocation,SaveMapEventBase,0 51 | lsd,SaveActor,,1 52 | lsd,SaveInventory,,0 53 | lsd,SaveTarget,,1 54 | lsd,SaveEventExecFrame,,1 55 | lsd,SaveEventExecState,,0 56 | lsd,SaveMapEventBase,,0 57 | lsd,SaveMapEvent,SaveMapEventBase,1 58 | lsd,SaveMapInfo,,0 59 | lsd,SaveCommonEvent,,1 60 | lsd,SavePanorama,,0 61 | lsd,Save,,0 62 | lmt,Rect,, 63 | lmt,Encounter,,1 64 | lmt,MapInfo,,1 65 | lmt,Start,,0 66 | lmt,TreeMap,, 67 | -------------------------------------------------------------------------------- /generator/csv/structs_easyrpg.csv: -------------------------------------------------------------------------------- 1 | Type,Structure,Base,Index available? 2 | ldb,StringVariable,,1 3 | lsd,SaveEasyRpgData,,0 4 | lsd,SaveEasyRpgWindow,,1 5 | lsd,SaveEasyRpgText,,0 6 | -------------------------------------------------------------------------------- /generator/templates/__init__.py: -------------------------------------------------------------------------------- 1 | # Required to make the Jinja2 Template Loader happy -------------------------------------------------------------------------------- /generator/templates/chunks.tmpl: -------------------------------------------------------------------------------- 1 | {# 2 | This template is used for the chunks.h files 3 | -#} 4 | {% include "copyright.tmpl" %} 5 | #ifndef LCF_{{ type|upper }}_CHUNKS_H 6 | #define LCF_{{ type|upper }}_CHUNKS_H 7 | 8 | namespace lcf { 9 | 10 | /** 11 | * {{ type|upper }} Reader namespace. 12 | */ 13 | namespace {{ type|upper }}_Reader { 14 | 15 | {%- for struct in structs[type]|struct_has_code %} 16 | struct Chunk{{ struct.name }} { 17 | enum Index { 18 | {%- for field in fields[struct.base] %} 19 | /** {{ field.comment }} */ 20 | {{ field.name }}{% if field.size %}_size{% endif %} = 0x{{ "%02X"|format(field.code) }}, 21 | {%- endfor %} 22 | {%- for field in fields[struct.name] %} 23 | /** {{ field.comment }} */ 24 | {{ field.name }}{% if field.size %}_size{% endif %} = 0x{{ "%02X"|format(field.code) }}{%- if not loop.last %},{% endif %} 25 | {%- endfor %} 26 | }; 27 | }; 28 | {%- endfor %} 29 | } 30 | 31 | } //namespace lcf 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /generator/templates/copyright.tmpl: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | -------------------------------------------------------------------------------- /generator/templates/flag_fwd.tmpl: -------------------------------------------------------------------------------- 1 | {# 2 | This template generates "fwd_flags_impl.h" which is included by "reader_struct.h" 3 | and is used to declare the templates used by "Flags" 4 | -#} 5 | {% include "copyright.tmpl" %} 6 | 7 | {%- for flag in flags %} 8 | #include "{{ flag.struct_header }}" 9 | {%- endfor %} 10 | 11 | {%- for flag in flags %} 12 | template <> struct lcf::TypeCategory { static const lcf::Category::Index value = lcf::Category::Flags; }; 13 | {%- endfor %} 14 | -------------------------------------------------------------------------------- /generator/templates/flag_instance.tmpl: -------------------------------------------------------------------------------- 1 | {# 2 | This template generates "fwd_flags_instance.h" which is included by "reader_flags.cpp" 3 | to instantiate the templates used by "Flags" 4 | -#} 5 | {% include "copyright.tmpl" %} 6 | 7 | {%- for flag in flags %} 8 | #include "{{ flag.flag_header }}" 9 | {%- endfor %} 10 | 11 | namespace lcf { 12 | {%- for flag in flags %} 13 | template class Flags; 14 | {%- endfor %} 15 | } 16 | -------------------------------------------------------------------------------- /generator/templates/flag_reader.tmpl: -------------------------------------------------------------------------------- 1 | {# 2 | This template generates "*_flags.h" which is used to define the classes used 3 | by flags. Flags are classes that encode bitfields using bools. 4 | -#} 5 | {% include "copyright.tmpl" %} 6 | /* 7 | * Headers 8 | */ 9 | #include "lcf/{{ type }}/reader.h" 10 | #include "lcf/{{ type }}/chunks.h" 11 | #include "reader_struct.h" 12 | 13 | namespace lcf { 14 | 15 | // Read {{ struct_name }}. 16 | 17 | template <> 18 | char const* const Flags::name = "{{ struct_name }}_{{ flag_name }}"; 19 | 20 | template <> 21 | decltype(Flags::flag_names) Flags::flag_names = { 22 | {%- for flag in flag_item %} 23 | "{{ flag.field }}"{%- if not loop.last %}, {%- endif %} 24 | {%- endfor %} 25 | }; 26 | 27 | template <> 28 | decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { 29 | {%- for flag in flag_item %} 30 | {{ flag.is2k3 }}{%- if not loop.last %}, {%- endif %} 31 | {%- endfor %} 32 | }; 33 | 34 | } //namespace lcf 35 | -------------------------------------------------------------------------------- /generator/templates/fwd.tmpl: -------------------------------------------------------------------------------- 1 | {# 2 | This template generates "fwd.h" which is installed as part of the library 3 | and is used to forward declare all classes generated by liblcf. 4 | -#} 5 | {% include "copyright.tmpl" %} 6 | #ifndef LCF_RPG_FWD_H 7 | #define LCF_RPG_FWD_H 8 | 9 | namespace lcf { 10 | namespace rpg { 11 | {%- for struct in structs %} 12 | class {{ struct }}; 13 | {%- endfor %} 14 | } // namespace rpg 15 | } // namespace lcf 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /generator/templates/fwd_struct.tmpl: -------------------------------------------------------------------------------- 1 | {# 2 | This template generates "fwd_struct_impl.h" which is included by "reader_struct_impl.h" 3 | and is used to forward declare Struct::fields[] to reduce compile times. 4 | -#} 5 | {% include "copyright.tmpl" %} 6 | // MSVC incorrectly treats these declarations as definitions and fails. 7 | #ifndef _MSC_VER 8 | namespace lcf { 9 | {% for struct in structs -%} 10 | template <> 11 | const char* const Struct::name; 12 | template <> 13 | Field const* Struct::fields[]; 14 | 15 | {% endfor -%} 16 | } //namespace lcf 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /generator/templates/rpg_source.tmpl: -------------------------------------------------------------------------------- 1 | {# 2 | This template generates the sources (*.cpp) for all the chunks in the "rpg" folder. 3 | These are files for chunks like Actor, Class and Event. 4 | -#} 5 | {% include "copyright.tmpl" %} 6 | // Headers 7 | #include "lcf/rpg/{{ filename }}.h" 8 | 9 | namespace lcf { 10 | namespace rpg { 11 | {%- for field in fields[struct_name]|field_is_used %} 12 | {%- if not field.size %} 13 | {%- if field.type.endswith("_Flags") %} 14 | 15 | std::ostream& operator<<(std::ostream& os, const {{ struct_name }}::{{ field|flag_type(struct_name) }}& obj) { 16 | for (size_t i = 0; i < obj.flags.size(); ++i) { 17 | os << (i == 0 ? "[" : ", ") << obj.flags[i]; 18 | } 19 | os << "]"; 20 | return os; 21 | } 22 | {%- endif %} 23 | {%- endif %} 24 | {%- endfor %} 25 | 26 | std::ostream& operator<<(std::ostream& os, const {{ struct_name }}& obj) { 27 | os << "{{ struct_name }}{"; 28 | {%- for field in fields[struct_name]|field_is_used|field_is_not_size -%} 29 | {% if loop.first %} 30 | os << "{{ field.name }}=" 31 | {%- else %} 32 | os << ", {{ field.name }}=" 33 | {%- endif -%} 34 | {%- if field.type is is_array -%} 35 | ; 36 | for (size_t i = 0; i < obj.{{ field.name }}.size(); ++i) { 37 | os << (i == 0 ? "[" : ", ") << obj.{{ field.name }}[i]; 38 | } 39 | os << "]"; 40 | {%- else -%} 41 | << obj.{{ field.name }}; 42 | {%- endif %} 43 | {%- endfor %} 44 | os << "}"; 45 | return os; 46 | } 47 | 48 | } // namespace rpg 49 | } // namespace lcf 50 | -------------------------------------------------------------------------------- /mime/liblcf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LCF Map Unit 5 | RPG Maker 2k(3) Map 6 | 7 | 8 | 9 | 10 | 11 | 12 | LCF Map Tree 13 | RPG Maker 2k(3) Map Tree 14 | 15 | 16 | 17 | 18 | 19 | 20 | LCF Database 21 | RPG Maker 2k(3) Database 22 | 23 | 24 | 25 | 26 | 27 | 28 | LCF Save Data 29 | RPG Maker 2k(3) Savegame 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/generated/fwd_flags_instance.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | #include "ldb_trooppagecondition_flags.h" 13 | #include "ldb_terrain_special_flags.h" 14 | #include "lmu_eventpagecondition_flags.h" 15 | #include "lsd_savesystem_maniac_message_hook_flags.h" 16 | #include "lsd_savepicture_flags.h" 17 | #include "lsd_saveeventexecframe_easyrpg_runtime_flags.h" 18 | #include "lsd_saveeventexecstate_easyrpg_runtime_flags.h" 19 | #include "lsd_savemapeventbase_easyrpg_runtime_flags.h" 20 | #include "lsd_saveeasyrpgwindow_flags.h" 21 | #include "lsd_saveeasyrpgtext_flags.h" 22 | 23 | namespace lcf { 24 | template class Flags; 25 | template class Flags; 26 | template class Flags; 27 | template class Flags; 28 | template class Flags; 29 | template class Flags; 30 | template class Flags; 31 | template class Flags; 32 | template class Flags; 33 | template class Flags; 34 | } 35 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/animationcelldata.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_ANIMATIONCELLDATA_H 13 | #define LCF_RPG_ANIMATIONCELLDATA_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::AnimationCellData class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class AnimationCellData { 27 | public: 28 | int ID = 0; 29 | int32_t valid = 1; 30 | int32_t cell_id = 0; 31 | int32_t x = 0; 32 | int32_t y = 0; 33 | int32_t zoom = 100; 34 | int32_t tone_red = 100; 35 | int32_t tone_green = 100; 36 | int32_t tone_blue = 100; 37 | int32_t tone_gray = 100; 38 | int32_t transparency = 0; 39 | }; 40 | 41 | inline bool operator==(const AnimationCellData& l, const AnimationCellData& r) { 42 | return l.valid == r.valid 43 | && l.cell_id == r.cell_id 44 | && l.x == r.x 45 | && l.y == r.y 46 | && l.zoom == r.zoom 47 | && l.tone_red == r.tone_red 48 | && l.tone_green == r.tone_green 49 | && l.tone_blue == r.tone_blue 50 | && l.tone_gray == r.tone_gray 51 | && l.transparency == r.transparency; 52 | } 53 | 54 | inline bool operator!=(const AnimationCellData& l, const AnimationCellData& r) { 55 | return !(l == r); 56 | } 57 | 58 | std::ostream& operator<<(std::ostream& os, const AnimationCellData& obj); 59 | 60 | template > 61 | void ForEachString(AnimationCellData& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 62 | (void)obj; 63 | (void)f; 64 | (void)parent_ctx; 65 | } 66 | 67 | } // namespace rpg 68 | } // namespace lcf 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/animationframe.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_ANIMATIONFRAME_H 13 | #define LCF_RPG_ANIMATIONFRAME_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/rpg/animationcelldata.h" 18 | #include "lcf/context.h" 19 | #include 20 | #include 21 | 22 | /** 23 | * rpg::AnimationFrame class. 24 | */ 25 | namespace lcf { 26 | namespace rpg { 27 | class AnimationFrame { 28 | public: 29 | int ID = 0; 30 | std::vector cells; 31 | }; 32 | 33 | inline bool operator==(const AnimationFrame& l, const AnimationFrame& r) { 34 | return l.cells == r.cells; 35 | } 36 | 37 | inline bool operator!=(const AnimationFrame& l, const AnimationFrame& r) { 38 | return !(l == r); 39 | } 40 | 41 | std::ostream& operator<<(std::ostream& os, const AnimationFrame& obj); 42 | 43 | template > 44 | void ForEachString(AnimationFrame& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 45 | for (int i = 0; i < static_cast(obj.cells.size()); ++i) { 46 | const auto ctx1 = Context{ "cells", i, &obj, parent_ctx }; 47 | ForEachString(obj.cells[i], f, &ctx1); 48 | } 49 | (void)obj; 50 | (void)f; 51 | (void)parent_ctx; 52 | } 53 | 54 | } // namespace rpg 55 | } // namespace lcf 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/battleranimationweapon.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_BATTLERANIMATIONWEAPON_H 13 | #define LCF_RPG_BATTLERANIMATIONWEAPON_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/dbstring.h" 18 | #include "lcf/context.h" 19 | #include 20 | #include 21 | 22 | /** 23 | * rpg::BattlerAnimationWeapon class. 24 | */ 25 | namespace lcf { 26 | namespace rpg { 27 | class BattlerAnimationWeapon { 28 | public: 29 | int ID = 0; 30 | DBString name; 31 | DBString weapon_name; 32 | int32_t weapon_index = 0; 33 | }; 34 | 35 | inline bool operator==(const BattlerAnimationWeapon& l, const BattlerAnimationWeapon& r) { 36 | return l.name == r.name 37 | && l.weapon_name == r.weapon_name 38 | && l.weapon_index == r.weapon_index; 39 | } 40 | 41 | inline bool operator!=(const BattlerAnimationWeapon& l, const BattlerAnimationWeapon& r) { 42 | return !(l == r); 43 | } 44 | 45 | std::ostream& operator<<(std::ostream& os, const BattlerAnimationWeapon& obj); 46 | 47 | template > 48 | void ForEachString(BattlerAnimationWeapon& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 49 | const auto ctx1 = Context{ "name", -1, &obj, parent_ctx }; 50 | f(obj.name, ctx1); 51 | const auto ctx2 = Context{ "weapon_name", -1, &obj, parent_ctx }; 52 | f(obj.weapon_name, ctx2); 53 | (void)obj; 54 | (void)f; 55 | (void)parent_ctx; 56 | } 57 | 58 | } // namespace rpg 59 | } // namespace lcf 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/encounter.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_ENCOUNTER_H 13 | #define LCF_RPG_ENCOUNTER_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::Encounter class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class Encounter { 27 | public: 28 | int ID = 0; 29 | int32_t troop_id = 0; 30 | }; 31 | 32 | inline bool operator==(const Encounter& l, const Encounter& r) { 33 | return l.troop_id == r.troop_id; 34 | } 35 | 36 | inline bool operator!=(const Encounter& l, const Encounter& r) { 37 | return !(l == r); 38 | } 39 | 40 | std::ostream& operator<<(std::ostream& os, const Encounter& obj); 41 | 42 | template > 43 | void ForEachString(Encounter& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 44 | (void)obj; 45 | (void)f; 46 | (void)parent_ctx; 47 | } 48 | 49 | } // namespace rpg 50 | } // namespace lcf 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/equipment.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_EQUIPMENT_H 13 | #define LCF_RPG_EQUIPMENT_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::Equipment class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class Equipment { 27 | public: 28 | int16_t weapon_id = 0; 29 | int16_t shield_id = 0; 30 | int16_t armor_id = 0; 31 | int16_t helmet_id = 0; 32 | int16_t accessory_id = 0; 33 | }; 34 | 35 | inline bool operator==(const Equipment& l, const Equipment& r) { 36 | return l.weapon_id == r.weapon_id 37 | && l.shield_id == r.shield_id 38 | && l.armor_id == r.armor_id 39 | && l.helmet_id == r.helmet_id 40 | && l.accessory_id == r.accessory_id; 41 | } 42 | 43 | inline bool operator!=(const Equipment& l, const Equipment& r) { 44 | return !(l == r); 45 | } 46 | 47 | std::ostream& operator<<(std::ostream& os, const Equipment& obj); 48 | 49 | template > 50 | void ForEachString(Equipment& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 51 | (void)obj; 52 | (void)f; 53 | (void)parent_ctx; 54 | } 55 | 56 | } // namespace rpg 57 | } // namespace lcf 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/event.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_EVENT_H 13 | #define LCF_RPG_EVENT_H 14 | 15 | // Headers 16 | #include 17 | #include 18 | #include "lcf/dbstring.h" 19 | #include "lcf/rpg/eventpage.h" 20 | #include "lcf/context.h" 21 | #include 22 | #include 23 | 24 | /** 25 | * rpg::Event class. 26 | */ 27 | namespace lcf { 28 | namespace rpg { 29 | class Event { 30 | public: 31 | int ID = 0; 32 | DBString name; 33 | int32_t x = 0; 34 | int32_t y = 0; 35 | std::vector pages; 36 | }; 37 | 38 | inline bool operator==(const Event& l, const Event& r) { 39 | return l.name == r.name 40 | && l.x == r.x 41 | && l.y == r.y 42 | && l.pages == r.pages; 43 | } 44 | 45 | inline bool operator!=(const Event& l, const Event& r) { 46 | return !(l == r); 47 | } 48 | 49 | std::ostream& operator<<(std::ostream& os, const Event& obj); 50 | 51 | template > 52 | void ForEachString(Event& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 53 | const auto ctx1 = Context{ "name", -1, &obj, parent_ctx }; 54 | f(obj.name, ctx1); 55 | for (int i = 0; i < static_cast(obj.pages.size()); ++i) { 56 | const auto ctx4 = Context{ "pages", i, &obj, parent_ctx }; 57 | ForEachString(obj.pages[i], f, &ctx4); 58 | } 59 | (void)obj; 60 | (void)f; 61 | (void)parent_ctx; 62 | } 63 | 64 | } // namespace rpg 65 | } // namespace lcf 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/learning.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_LEARNING_H 13 | #define LCF_RPG_LEARNING_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::Learning class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class Learning { 27 | public: 28 | int ID = 0; 29 | int32_t level = 1; 30 | int32_t skill_id = 1; 31 | }; 32 | 33 | inline bool operator==(const Learning& l, const Learning& r) { 34 | return l.level == r.level 35 | && l.skill_id == r.skill_id; 36 | } 37 | 38 | inline bool operator!=(const Learning& l, const Learning& r) { 39 | return !(l == r); 40 | } 41 | 42 | std::ostream& operator<<(std::ostream& os, const Learning& obj); 43 | 44 | template > 45 | void ForEachString(Learning& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 46 | (void)obj; 47 | (void)f; 48 | (void)parent_ctx; 49 | } 50 | 51 | } // namespace rpg 52 | } // namespace lcf 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/moveroute.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_MOVEROUTE_H 13 | #define LCF_RPG_MOVEROUTE_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/rpg/movecommand.h" 18 | #include "lcf/context.h" 19 | #include 20 | #include 21 | 22 | /** 23 | * rpg::MoveRoute class. 24 | */ 25 | namespace lcf { 26 | namespace rpg { 27 | class MoveRoute { 28 | public: 29 | std::vector move_commands; 30 | bool repeat = true; 31 | bool skippable = false; 32 | }; 33 | 34 | inline bool operator==(const MoveRoute& l, const MoveRoute& r) { 35 | return l.move_commands == r.move_commands 36 | && l.repeat == r.repeat 37 | && l.skippable == r.skippable; 38 | } 39 | 40 | inline bool operator!=(const MoveRoute& l, const MoveRoute& r) { 41 | return !(l == r); 42 | } 43 | 44 | std::ostream& operator<<(std::ostream& os, const MoveRoute& obj); 45 | 46 | template > 47 | void ForEachString(MoveRoute& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 48 | for (int i = 0; i < static_cast(obj.move_commands.size()); ++i) { 49 | const auto ctx1 = Context{ "move_commands", i, &obj, parent_ctx }; 50 | ForEachString(obj.move_commands[i], f, &ctx1); 51 | } 52 | (void)obj; 53 | (void)f; 54 | (void)parent_ctx; 55 | } 56 | 57 | } // namespace rpg 58 | } // namespace lcf 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/music.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_MUSIC_H 13 | #define LCF_RPG_MUSIC_H 14 | 15 | // Headers 16 | #include 17 | #include 18 | #include "lcf/context.h" 19 | #include 20 | #include 21 | 22 | /** 23 | * rpg::Music class. 24 | */ 25 | namespace lcf { 26 | namespace rpg { 27 | class Music { 28 | public: 29 | std::string name = "(OFF)"; 30 | int32_t fadein = 0; 31 | int32_t volume = 100; 32 | int32_t tempo = 100; 33 | int32_t balance = 50; 34 | }; 35 | 36 | inline bool operator==(const Music& l, const Music& r) { 37 | return l.name == r.name 38 | && l.fadein == r.fadein 39 | && l.volume == r.volume 40 | && l.tempo == r.tempo 41 | && l.balance == r.balance; 42 | } 43 | 44 | inline bool operator!=(const Music& l, const Music& r) { 45 | return !(l == r); 46 | } 47 | 48 | std::ostream& operator<<(std::ostream& os, const Music& obj); 49 | 50 | template > 51 | void ForEachString(Music& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 52 | (void)obj; 53 | (void)f; 54 | (void)parent_ctx; 55 | } 56 | 57 | } // namespace rpg 58 | } // namespace lcf 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/parameters.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_PARAMETERS_H 13 | #define LCF_RPG_PARAMETERS_H 14 | 15 | // Headers 16 | #include 17 | #include 18 | #include "lcf/context.h" 19 | #include 20 | #include 21 | 22 | /** 23 | * rpg::Parameters class. 24 | */ 25 | namespace lcf { 26 | namespace rpg { 27 | class Parameters { 28 | public: 29 | void Setup(int final_level); 30 | std::vector maxhp; 31 | std::vector maxsp; 32 | std::vector attack; 33 | std::vector defense; 34 | std::vector spirit; 35 | std::vector agility; 36 | }; 37 | 38 | inline bool operator==(const Parameters& l, const Parameters& r) { 39 | return l.maxhp == r.maxhp 40 | && l.maxsp == r.maxsp 41 | && l.attack == r.attack 42 | && l.defense == r.defense 43 | && l.spirit == r.spirit 44 | && l.agility == r.agility; 45 | } 46 | 47 | inline bool operator!=(const Parameters& l, const Parameters& r) { 48 | return !(l == r); 49 | } 50 | 51 | std::ostream& operator<<(std::ostream& os, const Parameters& obj); 52 | 53 | template > 54 | void ForEachString(Parameters& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 55 | (void)obj; 56 | (void)f; 57 | (void)parent_ctx; 58 | } 59 | 60 | } // namespace rpg 61 | } // namespace lcf 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/rect.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_RECT_H 13 | #define LCF_RPG_RECT_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::Rect class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class Rect { 27 | public: 28 | uint32_t l = 0; 29 | uint32_t t = 0; 30 | uint32_t r = 0; 31 | uint32_t b = 0; 32 | }; 33 | 34 | inline bool operator==(const Rect& l, const Rect& r) { 35 | return l.l == r.l 36 | && l.t == r.t 37 | && l.r == r.r 38 | && l.b == r.b; 39 | } 40 | 41 | inline bool operator!=(const Rect& l, const Rect& r) { 42 | return !(l == r); 43 | } 44 | 45 | std::ostream& operator<<(std::ostream& os, const Rect& obj); 46 | 47 | template > 48 | void ForEachString(Rect& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 49 | (void)obj; 50 | (void)f; 51 | (void)parent_ctx; 52 | } 53 | 54 | } // namespace rpg 55 | } // namespace lcf 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/savecommonevent.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_SAVECOMMONEVENT_H 13 | #define LCF_RPG_SAVECOMMONEVENT_H 14 | 15 | // Headers 16 | #include "lcf/rpg/saveeventexecstate.h" 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::SaveCommonEvent class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class SaveCommonEvent { 27 | public: 28 | int ID = 0; 29 | SaveEventExecState parallel_event_execstate; 30 | }; 31 | 32 | inline bool operator==(const SaveCommonEvent& l, const SaveCommonEvent& r) { 33 | return l.parallel_event_execstate == r.parallel_event_execstate; 34 | } 35 | 36 | inline bool operator!=(const SaveCommonEvent& l, const SaveCommonEvent& r) { 37 | return !(l == r); 38 | } 39 | 40 | std::ostream& operator<<(std::ostream& os, const SaveCommonEvent& obj); 41 | 42 | template > 43 | void ForEachString(SaveCommonEvent& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 44 | const auto ctx1 = Context{ "parallel_event_execstate", -1, &obj, parent_ctx }; 45 | ForEachString(obj.parallel_event_execstate, f, &ctx1); 46 | (void)obj; 47 | (void)f; 48 | (void)parent_ctx; 49 | } 50 | 51 | } // namespace rpg 52 | } // namespace lcf 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/saveeasyrpgdata.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_SAVEEASYRPGDATA_H 13 | #define LCF_RPG_SAVEEASYRPGDATA_H 14 | 15 | // Headers 16 | #include 17 | #include 18 | #include "lcf/rpg/saveeasyrpgwindow.h" 19 | #include "lcf/context.h" 20 | #include 21 | #include 22 | 23 | /** 24 | * rpg::SaveEasyRpgData class. 25 | */ 26 | namespace lcf { 27 | namespace rpg { 28 | class SaveEasyRpgData { 29 | public: 30 | int32_t version = 0; 31 | int32_t codepage = 0; 32 | std::vector windows; 33 | }; 34 | 35 | inline bool operator==(const SaveEasyRpgData& l, const SaveEasyRpgData& r) { 36 | return l.version == r.version 37 | && l.codepage == r.codepage 38 | && l.windows == r.windows; 39 | } 40 | 41 | inline bool operator!=(const SaveEasyRpgData& l, const SaveEasyRpgData& r) { 42 | return !(l == r); 43 | } 44 | 45 | std::ostream& operator<<(std::ostream& os, const SaveEasyRpgData& obj); 46 | 47 | template > 48 | void ForEachString(SaveEasyRpgData& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 49 | for (int i = 0; i < static_cast(obj.windows.size()); ++i) { 50 | const auto ctx3 = Context{ "windows", i, &obj, parent_ctx }; 51 | ForEachString(obj.windows[i], f, &ctx3); 52 | } 53 | (void)obj; 54 | (void)f; 55 | (void)parent_ctx; 56 | } 57 | 58 | } // namespace rpg 59 | } // namespace lcf 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/savemapevent.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_SAVEMAPEVENT_H 13 | #define LCF_RPG_SAVEMAPEVENT_H 14 | 15 | // Headers 16 | #include "lcf/rpg/savemapeventbase.h" 17 | #include 18 | #include "lcf/rpg/saveeventexecstate.h" 19 | #include "lcf/context.h" 20 | #include 21 | #include 22 | 23 | /** 24 | * rpg::SaveMapEvent class. 25 | */ 26 | namespace lcf { 27 | namespace rpg { 28 | class SaveMapEvent : public SaveMapEventBase { 29 | public: 30 | int ID = 0; 31 | bool waiting_execution = false; 32 | int32_t original_move_route_index = 0; 33 | bool triggered_by_decision_key = false; 34 | SaveEventExecState parallel_event_execstate; 35 | }; 36 | 37 | inline bool operator==(const SaveMapEvent& l, const SaveMapEvent& r) { 38 | return l.waiting_execution == r.waiting_execution 39 | && l.original_move_route_index == r.original_move_route_index 40 | && l.triggered_by_decision_key == r.triggered_by_decision_key 41 | && l.parallel_event_execstate == r.parallel_event_execstate; 42 | } 43 | 44 | inline bool operator!=(const SaveMapEvent& l, const SaveMapEvent& r) { 45 | return !(l == r); 46 | } 47 | 48 | std::ostream& operator<<(std::ostream& os, const SaveMapEvent& obj); 49 | 50 | template > 51 | void ForEachString(SaveMapEvent& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 52 | const auto ctx4 = Context{ "parallel_event_execstate", -1, &obj, parent_ctx }; 53 | ForEachString(obj.parallel_event_execstate, f, &ctx4); 54 | (void)obj; 55 | (void)f; 56 | (void)parent_ctx; 57 | } 58 | 59 | } // namespace rpg 60 | } // namespace lcf 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/savepanorama.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_SAVEPANORAMA_H 13 | #define LCF_RPG_SAVEPANORAMA_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::SavePanorama class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class SavePanorama { 27 | public: 28 | int32_t pan_x = 0; 29 | int32_t pan_y = 0; 30 | }; 31 | 32 | inline bool operator==(const SavePanorama& l, const SavePanorama& r) { 33 | return l.pan_x == r.pan_x 34 | && l.pan_y == r.pan_y; 35 | } 36 | 37 | inline bool operator!=(const SavePanorama& l, const SavePanorama& r) { 38 | return !(l == r); 39 | } 40 | 41 | std::ostream& operator<<(std::ostream& os, const SavePanorama& obj); 42 | 43 | template > 44 | void ForEachString(SavePanorama& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 45 | (void)obj; 46 | (void)f; 47 | (void)parent_ctx; 48 | } 49 | 50 | } // namespace rpg 51 | } // namespace lcf 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/savetarget.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_SAVETARGET_H 13 | #define LCF_RPG_SAVETARGET_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::SaveTarget class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class SaveTarget { 27 | public: 28 | int ID = 0; 29 | int32_t map_id = 0; 30 | int32_t map_x = 0; 31 | int32_t map_y = 0; 32 | bool switch_on = false; 33 | int32_t switch_id = 0; 34 | }; 35 | 36 | inline bool operator==(const SaveTarget& l, const SaveTarget& r) { 37 | return l.map_id == r.map_id 38 | && l.map_x == r.map_x 39 | && l.map_y == r.map_y 40 | && l.switch_on == r.switch_on 41 | && l.switch_id == r.switch_id; 42 | } 43 | 44 | inline bool operator!=(const SaveTarget& l, const SaveTarget& r) { 45 | return !(l == r); 46 | } 47 | 48 | std::ostream& operator<<(std::ostream& os, const SaveTarget& obj); 49 | 50 | template > 51 | void ForEachString(SaveTarget& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 52 | (void)obj; 53 | (void)f; 54 | (void)parent_ctx; 55 | } 56 | 57 | } // namespace rpg 58 | } // namespace lcf 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/savetitle.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_SAVETITLE_H 13 | #define LCF_RPG_SAVETITLE_H 14 | 15 | // Headers 16 | #include 17 | #include 18 | #include "lcf/context.h" 19 | #include 20 | #include 21 | 22 | /** 23 | * rpg::SaveTitle class. 24 | */ 25 | namespace lcf { 26 | namespace rpg { 27 | class SaveTitle { 28 | public: 29 | double timestamp = 0.0; 30 | std::string hero_name; 31 | int32_t hero_level = 0; 32 | int32_t hero_hp = 0; 33 | std::string face1_name; 34 | int32_t face1_id = 0; 35 | std::string face2_name; 36 | int32_t face2_id = 0; 37 | std::string face3_name; 38 | int32_t face3_id = 0; 39 | std::string face4_name; 40 | int32_t face4_id = 0; 41 | }; 42 | 43 | inline bool operator==(const SaveTitle& l, const SaveTitle& r) { 44 | return l.timestamp == r.timestamp 45 | && l.hero_name == r.hero_name 46 | && l.hero_level == r.hero_level 47 | && l.hero_hp == r.hero_hp 48 | && l.face1_name == r.face1_name 49 | && l.face1_id == r.face1_id 50 | && l.face2_name == r.face2_name 51 | && l.face2_id == r.face2_id 52 | && l.face3_name == r.face3_name 53 | && l.face3_id == r.face3_id 54 | && l.face4_name == r.face4_name 55 | && l.face4_id == r.face4_id; 56 | } 57 | 58 | inline bool operator!=(const SaveTitle& l, const SaveTitle& r) { 59 | return !(l == r); 60 | } 61 | 62 | std::ostream& operator<<(std::ostream& os, const SaveTitle& obj); 63 | 64 | template > 65 | void ForEachString(SaveTitle& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 66 | (void)obj; 67 | (void)f; 68 | (void)parent_ctx; 69 | } 70 | 71 | } // namespace rpg 72 | } // namespace lcf 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/sound.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_SOUND_H 13 | #define LCF_RPG_SOUND_H 14 | 15 | // Headers 16 | #include 17 | #include 18 | #include "lcf/context.h" 19 | #include 20 | #include 21 | 22 | /** 23 | * rpg::Sound class. 24 | */ 25 | namespace lcf { 26 | namespace rpg { 27 | class Sound { 28 | public: 29 | std::string name = "(OFF)"; 30 | int32_t volume = 100; 31 | int32_t tempo = 100; 32 | int32_t balance = 50; 33 | }; 34 | 35 | inline bool operator==(const Sound& l, const Sound& r) { 36 | return l.name == r.name 37 | && l.volume == r.volume 38 | && l.tempo == r.tempo 39 | && l.balance == r.balance; 40 | } 41 | 42 | inline bool operator!=(const Sound& l, const Sound& r) { 43 | return !(l == r); 44 | } 45 | 46 | std::ostream& operator<<(std::ostream& os, const Sound& obj); 47 | 48 | template > 49 | void ForEachString(Sound& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 50 | (void)obj; 51 | (void)f; 52 | (void)parent_ctx; 53 | } 54 | 55 | } // namespace rpg 56 | } // namespace lcf 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/start.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_START_H 13 | #define LCF_RPG_START_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::Start class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class Start { 27 | public: 28 | int32_t party_map_id = 0; 29 | int32_t party_x = 0; 30 | int32_t party_y = 0; 31 | int32_t boat_map_id = 0; 32 | int32_t boat_x = 0; 33 | int32_t boat_y = 0; 34 | int32_t ship_map_id = 0; 35 | int32_t ship_x = 0; 36 | int32_t ship_y = 0; 37 | int32_t airship_map_id = 0; 38 | int32_t airship_x = 0; 39 | int32_t airship_y = 0; 40 | }; 41 | 42 | inline bool operator==(const Start& l, const Start& r) { 43 | return l.party_map_id == r.party_map_id 44 | && l.party_x == r.party_x 45 | && l.party_y == r.party_y 46 | && l.boat_map_id == r.boat_map_id 47 | && l.boat_x == r.boat_x 48 | && l.boat_y == r.boat_y 49 | && l.ship_map_id == r.ship_map_id 50 | && l.ship_x == r.ship_x 51 | && l.ship_y == r.ship_y 52 | && l.airship_map_id == r.airship_map_id 53 | && l.airship_x == r.airship_x 54 | && l.airship_y == r.airship_y; 55 | } 56 | 57 | inline bool operator!=(const Start& l, const Start& r) { 58 | return !(l == r); 59 | } 60 | 61 | std::ostream& operator<<(std::ostream& os, const Start& obj); 62 | 63 | template > 64 | void ForEachString(Start& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 65 | (void)obj; 66 | (void)f; 67 | (void)parent_ctx; 68 | } 69 | 70 | } // namespace rpg 71 | } // namespace lcf 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/stringvariable.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_STRINGVARIABLE_H 13 | #define LCF_RPG_STRINGVARIABLE_H 14 | 15 | // Headers 16 | #include "lcf/dbstring.h" 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::StringVariable class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class StringVariable { 27 | public: 28 | int ID = 0; 29 | DBString name; 30 | }; 31 | 32 | inline bool operator==(const StringVariable& l, const StringVariable& r) { 33 | return l.name == r.name; 34 | } 35 | 36 | inline bool operator!=(const StringVariable& l, const StringVariable& r) { 37 | return !(l == r); 38 | } 39 | 40 | std::ostream& operator<<(std::ostream& os, const StringVariable& obj); 41 | 42 | template > 43 | void ForEachString(StringVariable& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 44 | const auto ctx1 = Context{ "name", -1, &obj, parent_ctx }; 45 | f(obj.name, ctx1); 46 | (void)obj; 47 | (void)f; 48 | (void)parent_ctx; 49 | } 50 | 51 | } // namespace rpg 52 | } // namespace lcf 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/switch.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_SWITCH_H 13 | #define LCF_RPG_SWITCH_H 14 | 15 | // Headers 16 | #include "lcf/dbstring.h" 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::Switch class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class Switch { 27 | public: 28 | int ID = 0; 29 | DBString name; 30 | }; 31 | 32 | inline bool operator==(const Switch& l, const Switch& r) { 33 | return l.name == r.name; 34 | } 35 | 36 | inline bool operator!=(const Switch& l, const Switch& r) { 37 | return !(l == r); 38 | } 39 | 40 | std::ostream& operator<<(std::ostream& os, const Switch& obj); 41 | 42 | template > 43 | void ForEachString(Switch& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 44 | const auto ctx1 = Context{ "name", -1, &obj, parent_ctx }; 45 | f(obj.name, ctx1); 46 | (void)obj; 47 | (void)f; 48 | (void)parent_ctx; 49 | } 50 | 51 | } // namespace rpg 52 | } // namespace lcf 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/testbattler.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_TESTBATTLER_H 13 | #define LCF_RPG_TESTBATTLER_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::TestBattler class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class TestBattler { 27 | public: 28 | int ID = 0; 29 | int32_t actor_id = 1; 30 | int32_t level = 1; 31 | int32_t weapon_id = 0; 32 | int32_t shield_id = 0; 33 | int32_t armor_id = 0; 34 | int32_t helmet_id = 0; 35 | int32_t accessory_id = 0; 36 | }; 37 | 38 | inline bool operator==(const TestBattler& l, const TestBattler& r) { 39 | return l.actor_id == r.actor_id 40 | && l.level == r.level 41 | && l.weapon_id == r.weapon_id 42 | && l.shield_id == r.shield_id 43 | && l.armor_id == r.armor_id 44 | && l.helmet_id == r.helmet_id 45 | && l.accessory_id == r.accessory_id; 46 | } 47 | 48 | inline bool operator!=(const TestBattler& l, const TestBattler& r) { 49 | return !(l == r); 50 | } 51 | 52 | std::ostream& operator<<(std::ostream& os, const TestBattler& obj); 53 | 54 | template > 55 | void ForEachString(TestBattler& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 56 | (void)obj; 57 | (void)f; 58 | (void)parent_ctx; 59 | } 60 | 61 | } // namespace rpg 62 | } // namespace lcf 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/troopmember.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_TROOPMEMBER_H 13 | #define LCF_RPG_TROOPMEMBER_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::TroopMember class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class TroopMember { 27 | public: 28 | int ID = 0; 29 | int32_t enemy_id = 1; 30 | int32_t x = 0; 31 | int32_t y = 0; 32 | bool invisible = false; 33 | }; 34 | 35 | inline bool operator==(const TroopMember& l, const TroopMember& r) { 36 | return l.enemy_id == r.enemy_id 37 | && l.x == r.x 38 | && l.y == r.y 39 | && l.invisible == r.invisible; 40 | } 41 | 42 | inline bool operator!=(const TroopMember& l, const TroopMember& r) { 43 | return !(l == r); 44 | } 45 | 46 | std::ostream& operator<<(std::ostream& os, const TroopMember& obj); 47 | 48 | template > 49 | void ForEachString(TroopMember& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 50 | (void)obj; 51 | (void)f; 52 | (void)parent_ctx; 53 | } 54 | 55 | } // namespace rpg 56 | } // namespace lcf 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/trooppage.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_TROOPPAGE_H 13 | #define LCF_RPG_TROOPPAGE_H 14 | 15 | // Headers 16 | #include 17 | #include "lcf/rpg/eventcommand.h" 18 | #include "lcf/rpg/trooppagecondition.h" 19 | #include "lcf/context.h" 20 | #include 21 | #include 22 | 23 | /** 24 | * rpg::TroopPage class. 25 | */ 26 | namespace lcf { 27 | namespace rpg { 28 | class TroopPage { 29 | public: 30 | int ID = 0; 31 | TroopPageCondition condition; 32 | std::vector event_commands; 33 | }; 34 | 35 | inline bool operator==(const TroopPage& l, const TroopPage& r) { 36 | return l.condition == r.condition 37 | && l.event_commands == r.event_commands; 38 | } 39 | 40 | inline bool operator!=(const TroopPage& l, const TroopPage& r) { 41 | return !(l == r); 42 | } 43 | 44 | std::ostream& operator<<(std::ostream& os, const TroopPage& obj); 45 | 46 | template > 47 | void ForEachString(TroopPage& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 48 | const auto ctx1 = Context{ "condition", -1, &obj, parent_ctx }; 49 | ForEachString(obj.condition, f, &ctx1); 50 | for (int i = 0; i < static_cast(obj.event_commands.size()); ++i) { 51 | const auto ctx2 = Context{ "event_commands", i, &obj, parent_ctx }; 52 | ForEachString(obj.event_commands[i], f, &ctx2); 53 | } 54 | (void)obj; 55 | (void)f; 56 | (void)parent_ctx; 57 | } 58 | 59 | } // namespace rpg 60 | } // namespace lcf 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /src/generated/lcf/rpg/variable.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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_VARIABLE_H 13 | #define LCF_RPG_VARIABLE_H 14 | 15 | // Headers 16 | #include "lcf/dbstring.h" 17 | #include "lcf/context.h" 18 | #include 19 | #include 20 | 21 | /** 22 | * rpg::Variable class. 23 | */ 24 | namespace lcf { 25 | namespace rpg { 26 | class Variable { 27 | public: 28 | int ID = 0; 29 | DBString name; 30 | }; 31 | 32 | inline bool operator==(const Variable& l, const Variable& r) { 33 | return l.name == r.name; 34 | } 35 | 36 | inline bool operator!=(const Variable& l, const Variable& r) { 37 | return !(l == r); 38 | } 39 | 40 | std::ostream& operator<<(std::ostream& os, const Variable& obj); 41 | 42 | template > 43 | void ForEachString(Variable& obj, const F& f, const ParentCtx* parent_ctx = nullptr) { 44 | const auto ctx1 = Context{ "name", -1, &obj, parent_ctx }; 45 | f(obj.name, ctx1); 46 | (void)obj; 47 | (void)f; 48 | (void)parent_ctx; 49 | } 50 | 51 | } // namespace rpg 52 | } // namespace lcf 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/generated/ldb_animationframe.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read AnimationFrame. 20 | 21 | template <> 22 | char const* const Struct::name = "AnimationFrame"; 23 | static TypedField> static_cells( 24 | &rpg::AnimationFrame::cells, 25 | LDB_Reader::ChunkAnimationFrame::cells, 26 | "cells", 27 | 1, 28 | 0 29 | ); 30 | 31 | 32 | template <> 33 | Field const* Struct::fields[] = { 34 | &static_cells, 35 | NULL 36 | }; 37 | 38 | template class Struct; 39 | 40 | } //namespace lcf 41 | -------------------------------------------------------------------------------- /src/generated/ldb_battlecommand.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read BattleCommand. 20 | 21 | template <> 22 | char const* const Struct::name = "BattleCommand"; 23 | static TypedField static_name( 24 | &rpg::BattleCommand::name, 25 | LDB_Reader::ChunkBattleCommand::name, 26 | "name", 27 | 1, 28 | 0 29 | ); 30 | static TypedField static_type( 31 | &rpg::BattleCommand::type, 32 | LDB_Reader::ChunkBattleCommand::type, 33 | "type", 34 | 0, 35 | 0 36 | ); 37 | 38 | 39 | template <> 40 | Field const* Struct::fields[] = { 41 | &static_name, 42 | &static_type, 43 | NULL 44 | }; 45 | 46 | template class Struct; 47 | 48 | } //namespace lcf 49 | -------------------------------------------------------------------------------- /src/generated/ldb_battleranimation.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read BattlerAnimation. 20 | 21 | template <> 22 | char const* const Struct::name = "BattlerAnimation"; 23 | static TypedField static_name( 24 | &rpg::BattlerAnimation::name, 25 | LDB_Reader::ChunkBattlerAnimation::name, 26 | "name", 27 | 0, 28 | 1 29 | ); 30 | static TypedField static_speed( 31 | &rpg::BattlerAnimation::speed, 32 | LDB_Reader::ChunkBattlerAnimation::speed, 33 | "speed", 34 | 0, 35 | 1 36 | ); 37 | static TypedField> static_poses( 38 | &rpg::BattlerAnimation::poses, 39 | LDB_Reader::ChunkBattlerAnimation::poses, 40 | "poses", 41 | 1, 42 | 1 43 | ); 44 | static TypedField> static_weapons( 45 | &rpg::BattlerAnimation::weapons, 46 | LDB_Reader::ChunkBattlerAnimation::weapons, 47 | "weapons", 48 | 1, 49 | 1 50 | ); 51 | 52 | 53 | template <> 54 | Field const* Struct::fields[] = { 55 | &static_name, 56 | &static_speed, 57 | &static_poses, 58 | &static_weapons, 59 | NULL 60 | }; 61 | 62 | template class Struct; 63 | 64 | } //namespace lcf 65 | -------------------------------------------------------------------------------- /src/generated/ldb_battleranimationweapon.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read BattlerAnimationWeapon. 20 | 21 | template <> 22 | char const* const Struct::name = "BattlerAnimationWeapon"; 23 | static TypedField static_name( 24 | &rpg::BattlerAnimationWeapon::name, 25 | LDB_Reader::ChunkBattlerAnimationWeapon::name, 26 | "name", 27 | 0, 28 | 1 29 | ); 30 | static TypedField static_weapon_name( 31 | &rpg::BattlerAnimationWeapon::weapon_name, 32 | LDB_Reader::ChunkBattlerAnimationWeapon::weapon_name, 33 | "weapon_name", 34 | 0, 35 | 1 36 | ); 37 | static TypedField static_weapon_index( 38 | &rpg::BattlerAnimationWeapon::weapon_index, 39 | LDB_Reader::ChunkBattlerAnimationWeapon::weapon_index, 40 | "weapon_index", 41 | 0, 42 | 1 43 | ); 44 | 45 | 46 | template <> 47 | Field const* Struct::fields[] = { 48 | &static_name, 49 | &static_weapon_name, 50 | &static_weapon_index, 51 | NULL 52 | }; 53 | 54 | template class Struct; 55 | 56 | } //namespace lcf 57 | -------------------------------------------------------------------------------- /src/generated/ldb_learning.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read Learning. 20 | 21 | template <> 22 | char const* const Struct::name = "Learning"; 23 | static TypedField static_level( 24 | &rpg::Learning::level, 25 | LDB_Reader::ChunkLearning::level, 26 | "level", 27 | 0, 28 | 0 29 | ); 30 | static TypedField static_skill_id( 31 | &rpg::Learning::skill_id, 32 | LDB_Reader::ChunkLearning::skill_id, 33 | "skill_id", 34 | 0, 35 | 0 36 | ); 37 | 38 | 39 | template <> 40 | Field const* Struct::fields[] = { 41 | &static_level, 42 | &static_skill_id, 43 | NULL 44 | }; 45 | 46 | template class Struct; 47 | 48 | } //namespace lcf 49 | -------------------------------------------------------------------------------- /src/generated/ldb_music.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read Music. 20 | 21 | template <> 22 | char const* const Struct::name = "Music"; 23 | static TypedField static_name( 24 | &rpg::Music::name, 25 | LDB_Reader::ChunkMusic::name, 26 | "name", 27 | 1, 28 | 0 29 | ); 30 | static TypedField static_fadein( 31 | &rpg::Music::fadein, 32 | LDB_Reader::ChunkMusic::fadein, 33 | "fadein", 34 | 0, 35 | 0 36 | ); 37 | static TypedField static_volume( 38 | &rpg::Music::volume, 39 | LDB_Reader::ChunkMusic::volume, 40 | "volume", 41 | 0, 42 | 0 43 | ); 44 | static TypedField static_tempo( 45 | &rpg::Music::tempo, 46 | LDB_Reader::ChunkMusic::tempo, 47 | "tempo", 48 | 0, 49 | 0 50 | ); 51 | static TypedField static_balance( 52 | &rpg::Music::balance, 53 | LDB_Reader::ChunkMusic::balance, 54 | "balance", 55 | 0, 56 | 0 57 | ); 58 | 59 | 60 | template <> 61 | Field const* Struct::fields[] = { 62 | &static_name, 63 | &static_fadein, 64 | &static_volume, 65 | &static_tempo, 66 | &static_balance, 67 | NULL 68 | }; 69 | 70 | template class Struct; 71 | 72 | } //namespace lcf 73 | -------------------------------------------------------------------------------- /src/generated/ldb_sound.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read Sound. 20 | 21 | template <> 22 | char const* const Struct::name = "Sound"; 23 | static TypedField static_name( 24 | &rpg::Sound::name, 25 | LDB_Reader::ChunkSound::name, 26 | "name", 27 | 1, 28 | 0 29 | ); 30 | static TypedField static_volume( 31 | &rpg::Sound::volume, 32 | LDB_Reader::ChunkSound::volume, 33 | "volume", 34 | 0, 35 | 0 36 | ); 37 | static TypedField static_tempo( 38 | &rpg::Sound::tempo, 39 | LDB_Reader::ChunkSound::tempo, 40 | "tempo", 41 | 0, 42 | 0 43 | ); 44 | static TypedField static_balance( 45 | &rpg::Sound::balance, 46 | LDB_Reader::ChunkSound::balance, 47 | "balance", 48 | 0, 49 | 0 50 | ); 51 | 52 | 53 | template <> 54 | Field const* Struct::fields[] = { 55 | &static_name, 56 | &static_volume, 57 | &static_tempo, 58 | &static_balance, 59 | NULL 60 | }; 61 | 62 | template class Struct; 63 | 64 | } //namespace lcf 65 | -------------------------------------------------------------------------------- /src/generated/ldb_stringvariable.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read StringVariable. 20 | 21 | template <> 22 | char const* const Struct::name = "StringVariable"; 23 | static TypedField static_name( 24 | &rpg::StringVariable::name, 25 | LDB_Reader::ChunkStringVariable::name, 26 | "name", 27 | 0, 28 | 0 29 | ); 30 | 31 | 32 | template <> 33 | Field const* Struct::fields[] = { 34 | &static_name, 35 | NULL 36 | }; 37 | 38 | template class Struct; 39 | 40 | } //namespace lcf 41 | -------------------------------------------------------------------------------- /src/generated/ldb_switch.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read Switch. 20 | 21 | template <> 22 | char const* const Struct::name = "Switch"; 23 | static TypedField static_name( 24 | &rpg::Switch::name, 25 | LDB_Reader::ChunkSwitch::name, 26 | "name", 27 | 0, 28 | 0 29 | ); 30 | 31 | 32 | template <> 33 | Field const* Struct::fields[] = { 34 | &static_name, 35 | NULL 36 | }; 37 | 38 | template class Struct; 39 | 40 | } //namespace lcf 41 | -------------------------------------------------------------------------------- /src/generated/ldb_terrain_special_flags.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | /* 13 | * Headers 14 | */ 15 | #include "lcf/ldb/reader.h" 16 | #include "lcf/ldb/chunks.h" 17 | #include "reader_struct.h" 18 | 19 | namespace lcf { 20 | 21 | // Read Terrain. 22 | 23 | template <> 24 | char const* const Flags::name = "Terrain_Flags"; 25 | 26 | template <> 27 | decltype(Flags::flag_names) Flags::flag_names = { 28 | "back_party", 29 | "back_enemies", 30 | "lateral_party", 31 | "lateral_enemies" 32 | }; 33 | 34 | template <> 35 | decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { 36 | 1, 37 | 1, 38 | 1, 39 | 1 40 | }; 41 | 42 | } //namespace lcf 43 | -------------------------------------------------------------------------------- /src/generated/ldb_troopmember.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read TroopMember. 20 | 21 | template <> 22 | char const* const Struct::name = "TroopMember"; 23 | static TypedField static_enemy_id( 24 | &rpg::TroopMember::enemy_id, 25 | LDB_Reader::ChunkTroopMember::enemy_id, 26 | "enemy_id", 27 | 0, 28 | 0 29 | ); 30 | static TypedField static_x( 31 | &rpg::TroopMember::x, 32 | LDB_Reader::ChunkTroopMember::x, 33 | "x", 34 | 0, 35 | 0 36 | ); 37 | static TypedField static_y( 38 | &rpg::TroopMember::y, 39 | LDB_Reader::ChunkTroopMember::y, 40 | "y", 41 | 0, 42 | 0 43 | ); 44 | static TypedField static_invisible( 45 | &rpg::TroopMember::invisible, 46 | LDB_Reader::ChunkTroopMember::invisible, 47 | "invisible", 48 | 0, 49 | 0 50 | ); 51 | 52 | 53 | template <> 54 | Field const* Struct::fields[] = { 55 | &static_enemy_id, 56 | &static_x, 57 | &static_y, 58 | &static_invisible, 59 | NULL 60 | }; 61 | 62 | template class Struct; 63 | 64 | } //namespace lcf 65 | -------------------------------------------------------------------------------- /src/generated/ldb_trooppage.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read TroopPage. 20 | 21 | template <> 22 | char const* const Struct::name = "TroopPage"; 23 | static TypedField static_condition( 24 | &rpg::TroopPage::condition, 25 | LDB_Reader::ChunkTroopPage::condition, 26 | "condition", 27 | 1, 28 | 0 29 | ); 30 | static SizeField> static_size_event_commands( 31 | &rpg::TroopPage::event_commands, 32 | LDB_Reader::ChunkTroopPage::event_commands_size, 33 | 1, 34 | 0 35 | ); 36 | static TypedField> static_event_commands( 37 | &rpg::TroopPage::event_commands, 38 | LDB_Reader::ChunkTroopPage::event_commands, 39 | "event_commands", 40 | 1, 41 | 0 42 | ); 43 | 44 | 45 | template <> 46 | Field const* Struct::fields[] = { 47 | &static_condition, 48 | &static_size_event_commands, 49 | &static_event_commands, 50 | NULL 51 | }; 52 | 53 | template class Struct; 54 | 55 | } //namespace lcf 56 | -------------------------------------------------------------------------------- /src/generated/ldb_trooppagecondition_flags.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | /* 13 | * Headers 14 | */ 15 | #include "lcf/ldb/reader.h" 16 | #include "lcf/ldb/chunks.h" 17 | #include "reader_struct.h" 18 | 19 | namespace lcf { 20 | 21 | // Read TroopPageCondition. 22 | 23 | template <> 24 | char const* const Flags::name = "TroopPageCondition_Flags"; 25 | 26 | template <> 27 | decltype(Flags::flag_names) Flags::flag_names = { 28 | "switch_a", 29 | "switch_b", 30 | "variable", 31 | "turn", 32 | "fatigue", 33 | "enemy_hp", 34 | "actor_hp", 35 | "turn_enemy", 36 | "turn_actor", 37 | "command_actor" 38 | }; 39 | 40 | template <> 41 | decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { 42 | 0, 43 | 0, 44 | 0, 45 | 0, 46 | 0, 47 | 0, 48 | 0, 49 | 1, 50 | 1, 51 | 1 52 | }; 53 | 54 | } //namespace lcf 55 | -------------------------------------------------------------------------------- /src/generated/ldb_variable.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/ldb/reader.h" 14 | #include "lcf/ldb/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read Variable. 20 | 21 | template <> 22 | char const* const Struct::name = "Variable"; 23 | static TypedField static_name( 24 | &rpg::Variable::name, 25 | LDB_Reader::ChunkVariable::name, 26 | "name", 27 | 0, 28 | 0 29 | ); 30 | 31 | 32 | template <> 33 | Field const* Struct::fields[] = { 34 | &static_name, 35 | NULL 36 | }; 37 | 38 | template class Struct; 39 | 40 | } //namespace lcf 41 | -------------------------------------------------------------------------------- /src/generated/lmt_encounter.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/lmt/reader.h" 14 | #include "lcf/lmt/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read Encounter. 20 | 21 | template <> 22 | char const* const Struct::name = "Encounter"; 23 | static TypedField static_troop_id( 24 | &rpg::Encounter::troop_id, 25 | LMT_Reader::ChunkEncounter::troop_id, 26 | "troop_id", 27 | 0, 28 | 0 29 | ); 30 | 31 | 32 | template <> 33 | Field const* Struct::fields[] = { 34 | &static_troop_id, 35 | NULL 36 | }; 37 | 38 | template class Struct; 39 | 40 | } //namespace lcf 41 | -------------------------------------------------------------------------------- /src/generated/lmu_event.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/lmu/reader.h" 14 | #include "lcf/lmu/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read Event. 20 | 21 | template <> 22 | char const* const Struct::name = "Event"; 23 | static TypedField static_name( 24 | &rpg::Event::name, 25 | LMU_Reader::ChunkEvent::name, 26 | "name", 27 | 0, 28 | 0 29 | ); 30 | static TypedField static_x( 31 | &rpg::Event::x, 32 | LMU_Reader::ChunkEvent::x, 33 | "x", 34 | 0, 35 | 0 36 | ); 37 | static TypedField static_y( 38 | &rpg::Event::y, 39 | LMU_Reader::ChunkEvent::y, 40 | "y", 41 | 0, 42 | 0 43 | ); 44 | static TypedField> static_pages( 45 | &rpg::Event::pages, 46 | LMU_Reader::ChunkEvent::pages, 47 | "pages", 48 | 1, 49 | 0 50 | ); 51 | 52 | 53 | template <> 54 | Field const* Struct::fields[] = { 55 | &static_name, 56 | &static_x, 57 | &static_y, 58 | &static_pages, 59 | NULL 60 | }; 61 | 62 | template class Struct; 63 | 64 | } //namespace lcf 65 | -------------------------------------------------------------------------------- /src/generated/lmu_eventpagecondition_flags.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | /* 13 | * Headers 14 | */ 15 | #include "lcf/lmu/reader.h" 16 | #include "lcf/lmu/chunks.h" 17 | #include "reader_struct.h" 18 | 19 | namespace lcf { 20 | 21 | // Read EventPageCondition. 22 | 23 | template <> 24 | char const* const Flags::name = "EventPageCondition_Flags"; 25 | 26 | template <> 27 | decltype(Flags::flag_names) Flags::flag_names = { 28 | "switch_a", 29 | "switch_b", 30 | "variable", 31 | "item", 32 | "actor", 33 | "timer", 34 | "timer2" 35 | }; 36 | 37 | template <> 38 | decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { 39 | 0, 40 | 0, 41 | 0, 42 | 0, 43 | 0, 44 | 0, 45 | 1 46 | }; 47 | 48 | } //namespace lcf 49 | -------------------------------------------------------------------------------- /src/generated/lmu_moveroute.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/lmu/reader.h" 14 | #include "lcf/lmu/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read MoveRoute. 20 | 21 | template <> 22 | char const* const Struct::name = "MoveRoute"; 23 | static SizeField> static_size_move_commands( 24 | &rpg::MoveRoute::move_commands, 25 | LMU_Reader::ChunkMoveRoute::move_commands_size, 26 | 0, 27 | 0 28 | ); 29 | static TypedField> static_move_commands( 30 | &rpg::MoveRoute::move_commands, 31 | LMU_Reader::ChunkMoveRoute::move_commands, 32 | "move_commands", 33 | 1, 34 | 0 35 | ); 36 | static TypedField static_repeat( 37 | &rpg::MoveRoute::repeat, 38 | LMU_Reader::ChunkMoveRoute::repeat, 39 | "repeat", 40 | 0, 41 | 0 42 | ); 43 | static TypedField static_skippable( 44 | &rpg::MoveRoute::skippable, 45 | LMU_Reader::ChunkMoveRoute::skippable, 46 | "skippable", 47 | 0, 48 | 0 49 | ); 50 | 51 | 52 | template <> 53 | Field const* Struct::fields[] = { 54 | &static_size_move_commands, 55 | &static_move_commands, 56 | &static_repeat, 57 | &static_skippable, 58 | NULL 59 | }; 60 | 61 | template class Struct; 62 | 63 | } //namespace lcf 64 | -------------------------------------------------------------------------------- /src/generated/lsd_savecommonevent.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/lsd/reader.h" 14 | #include "lcf/lsd/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read SaveCommonEvent. 20 | 21 | template <> 22 | char const* const Struct::name = "SaveCommonEvent"; 23 | static TypedField static_parallel_event_execstate( 24 | &rpg::SaveCommonEvent::parallel_event_execstate, 25 | LSD_Reader::ChunkSaveCommonEvent::parallel_event_execstate, 26 | "parallel_event_execstate", 27 | 1, 28 | 0 29 | ); 30 | 31 | 32 | template <> 33 | Field const* Struct::fields[] = { 34 | &static_parallel_event_execstate, 35 | NULL 36 | }; 37 | 38 | template class Struct; 39 | 40 | } //namespace lcf 41 | -------------------------------------------------------------------------------- /src/generated/lsd_saveeasyrpgdata.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/lsd/reader.h" 14 | #include "lcf/lsd/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read SaveEasyRpgData. 20 | 21 | template <> 22 | char const* const Struct::name = "SaveEasyRpgData"; 23 | static TypedField static_version( 24 | &rpg::SaveEasyRpgData::version, 25 | LSD_Reader::ChunkSaveEasyRpgData::version, 26 | "version", 27 | 0, 28 | 0 29 | ); 30 | static TypedField static_codepage( 31 | &rpg::SaveEasyRpgData::codepage, 32 | LSD_Reader::ChunkSaveEasyRpgData::codepage, 33 | "codepage", 34 | 0, 35 | 0 36 | ); 37 | static TypedField> static_windows( 38 | &rpg::SaveEasyRpgData::windows, 39 | LSD_Reader::ChunkSaveEasyRpgData::windows, 40 | "windows", 41 | 0, 42 | 0 43 | ); 44 | 45 | 46 | template <> 47 | Field const* Struct::fields[] = { 48 | &static_version, 49 | &static_codepage, 50 | &static_windows, 51 | NULL 52 | }; 53 | 54 | template class Struct; 55 | 56 | } //namespace lcf 57 | -------------------------------------------------------------------------------- /src/generated/lsd_saveeasyrpgtext_flags.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | /* 13 | * Headers 14 | */ 15 | #include "lcf/lsd/reader.h" 16 | #include "lcf/lsd/chunks.h" 17 | #include "reader_struct.h" 18 | 19 | namespace lcf { 20 | 21 | // Read SaveEasyRpgText. 22 | 23 | template <> 24 | char const* const Flags::name = "SaveEasyRpgText_Flags"; 25 | 26 | template <> 27 | decltype(Flags::flag_names) Flags::flag_names = { 28 | "draw_gradient", 29 | "draw_shadow", 30 | "bold", 31 | "italic" 32 | }; 33 | 34 | template <> 35 | decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { 36 | 0, 37 | 0, 38 | 0, 39 | 0 40 | }; 41 | 42 | } //namespace lcf 43 | -------------------------------------------------------------------------------- /src/generated/lsd_saveeasyrpgwindow_flags.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | /* 13 | * Headers 14 | */ 15 | #include "lcf/lsd/reader.h" 16 | #include "lcf/lsd/chunks.h" 17 | #include "reader_struct.h" 18 | 19 | namespace lcf { 20 | 21 | // Read SaveEasyRpgWindow. 22 | 23 | template <> 24 | char const* const Flags::name = "SaveEasyRpgWindow_Flags"; 25 | 26 | template <> 27 | decltype(Flags::flag_names) Flags::flag_names = { 28 | "draw_frame", 29 | "border_margin" 30 | }; 31 | 32 | template <> 33 | decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { 34 | 0, 35 | 0 36 | }; 37 | 38 | } //namespace lcf 39 | -------------------------------------------------------------------------------- /src/generated/lsd_saveeventexecframe_easyrpg_runtime_flags.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | /* 13 | * Headers 14 | */ 15 | #include "lcf/lsd/reader.h" 16 | #include "lcf/lsd/chunks.h" 17 | #include "reader_struct.h" 18 | 19 | namespace lcf { 20 | 21 | // Read SaveEventExecFrame. 22 | 23 | template <> 24 | char const* const Flags::name = "SaveEventExecFrame_EasyRpgFrameRuntime_Flags"; 25 | 26 | template <> 27 | decltype(Flags::flag_names) Flags::flag_names = { 28 | "reserved_1" 29 | }; 30 | 31 | template <> 32 | decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { 33 | 0 34 | }; 35 | 36 | } //namespace lcf 37 | -------------------------------------------------------------------------------- /src/generated/lsd_saveeventexecstate_easyrpg_runtime_flags.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | /* 13 | * Headers 14 | */ 15 | #include "lcf/lsd/reader.h" 16 | #include "lcf/lsd/chunks.h" 17 | #include "reader_struct.h" 18 | 19 | namespace lcf { 20 | 21 | // Read SaveEventExecState. 22 | 23 | template <> 24 | char const* const Flags::name = "SaveEventExecState_EasyRpgStateRuntime_Flags"; 25 | 26 | template <> 27 | decltype(Flags::flag_names) Flags::flag_names = { 28 | "conf_override_active", 29 | "reserved_1", 30 | "reserved_2", 31 | "reserved_3", 32 | "patch_destiny_on", 33 | "patch_destiny_off", 34 | "patch_dynrpg_on", 35 | "patch_dynrpg_off", 36 | "patch_maniac_on", 37 | "patch_maniac_off", 38 | "patch_common_this_event_on", 39 | "patch_common_this_event_off", 40 | "patch_unlock_pics_on", 41 | "patch_unlock_pics_off", 42 | "patch_keypatch_on", 43 | "patch_keypatch_off", 44 | "patch_rpg2k3_cmds_on", 45 | "patch_rpg2k3_cmds_off", 46 | "use_rpg2k_battle_system_on", 47 | "use_rpg2k_battle_system_off" 48 | }; 49 | 50 | template <> 51 | decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { 52 | 0, 53 | 0, 54 | 0, 55 | 0, 56 | 0, 57 | 0, 58 | 0, 59 | 0, 60 | 0, 61 | 0, 62 | 0, 63 | 0, 64 | 0, 65 | 0, 66 | 0, 67 | 0, 68 | 0, 69 | 0, 70 | 0, 71 | 0 72 | }; 73 | 74 | } //namespace lcf 75 | -------------------------------------------------------------------------------- /src/generated/lsd_savemapeventbase_easyrpg_runtime_flags.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | /* 13 | * Headers 14 | */ 15 | #include "lcf/lsd/reader.h" 16 | #include "lcf/lsd/chunks.h" 17 | #include "reader_struct.h" 18 | 19 | namespace lcf { 20 | 21 | // Read SaveMapEventBase. 22 | 23 | template <> 24 | char const* const Flags::name = "SaveMapEventBase_EasyRpgEventRuntime_Flags"; 25 | 26 | template <> 27 | decltype(Flags::flag_names) Flags::flag_names = { 28 | "reserved_1" 29 | }; 30 | 31 | template <> 32 | decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { 33 | 0 34 | }; 35 | 36 | } //namespace lcf 37 | -------------------------------------------------------------------------------- /src/generated/lsd_savepanorama.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/lsd/reader.h" 14 | #include "lcf/lsd/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read SavePanorama. 20 | 21 | template <> 22 | char const* const Struct::name = "SavePanorama"; 23 | static TypedField static_pan_x( 24 | &rpg::SavePanorama::pan_x, 25 | LSD_Reader::ChunkSavePanorama::pan_x, 26 | "pan_x", 27 | 0, 28 | 0 29 | ); 30 | static TypedField static_pan_y( 31 | &rpg::SavePanorama::pan_y, 32 | LSD_Reader::ChunkSavePanorama::pan_y, 33 | "pan_y", 34 | 0, 35 | 0 36 | ); 37 | 38 | 39 | template <> 40 | Field const* Struct::fields[] = { 41 | &static_pan_x, 42 | &static_pan_y, 43 | NULL 44 | }; 45 | 46 | template class Struct; 47 | 48 | } //namespace lcf 49 | -------------------------------------------------------------------------------- /src/generated/lsd_savepicture_flags.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | /* 13 | * Headers 14 | */ 15 | #include "lcf/lsd/reader.h" 16 | #include "lcf/lsd/chunks.h" 17 | #include "reader_struct.h" 18 | 19 | namespace lcf { 20 | 21 | // Read SavePicture. 22 | 23 | template <> 24 | char const* const Flags::name = "SavePicture_Flags"; 25 | 26 | template <> 27 | decltype(Flags::flag_names) Flags::flag_names = { 28 | "erase_on_map_change", 29 | "erase_on_battle_end", 30 | "unused_bit", 31 | "unused_bit2", 32 | "affected_by_tint", 33 | "affected_by_flash", 34 | "affected_by_shake" 35 | }; 36 | 37 | template <> 38 | decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { 39 | 1, 40 | 1, 41 | 1, 42 | 1, 43 | 1, 44 | 1, 45 | 1 46 | }; 47 | 48 | } //namespace lcf 49 | -------------------------------------------------------------------------------- /src/generated/lsd_savesystem_maniac_message_hook_flags.h: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | /* 13 | * Headers 14 | */ 15 | #include "lcf/lsd/reader.h" 16 | #include "lcf/lsd/chunks.h" 17 | #include "reader_struct.h" 18 | 19 | namespace lcf { 20 | 21 | // Read SaveSystem. 22 | 23 | template <> 24 | char const* const Flags::name = "SaveSystem_ManiacMessageHook_Flags"; 25 | 26 | template <> 27 | decltype(Flags::flag_names) Flags::flag_names = { 28 | "user_event", 29 | "create_window", 30 | "destroy_window", 31 | "text_rendering" 32 | }; 33 | 34 | template <> 35 | decltype(Flags::flags_is2k3) Flags::flags_is2k3 = { 36 | 0, 37 | 0, 38 | 0, 39 | 0 40 | }; 41 | 42 | } //namespace lcf 43 | -------------------------------------------------------------------------------- /src/generated/lsd_savetarget.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/lsd/reader.h" 14 | #include "lcf/lsd/chunks.h" 15 | #include "reader_struct_impl.h" 16 | 17 | namespace lcf { 18 | 19 | // Read SaveTarget. 20 | 21 | template <> 22 | char const* const Struct::name = "SaveTarget"; 23 | static TypedField static_map_id( 24 | &rpg::SaveTarget::map_id, 25 | LSD_Reader::ChunkSaveTarget::map_id, 26 | "map_id", 27 | 0, 28 | 0 29 | ); 30 | static TypedField static_map_x( 31 | &rpg::SaveTarget::map_x, 32 | LSD_Reader::ChunkSaveTarget::map_x, 33 | "map_x", 34 | 0, 35 | 0 36 | ); 37 | static TypedField static_map_y( 38 | &rpg::SaveTarget::map_y, 39 | LSD_Reader::ChunkSaveTarget::map_y, 40 | "map_y", 41 | 0, 42 | 0 43 | ); 44 | static TypedField static_switch_on( 45 | &rpg::SaveTarget::switch_on, 46 | LSD_Reader::ChunkSaveTarget::switch_on, 47 | "switch_on", 48 | 0, 49 | 0 50 | ); 51 | static TypedField static_switch_id( 52 | &rpg::SaveTarget::switch_id, 53 | LSD_Reader::ChunkSaveTarget::switch_id, 54 | "switch_id", 55 | 0, 56 | 0 57 | ); 58 | 59 | 60 | template <> 61 | Field const* Struct::fields[] = { 62 | &static_map_id, 63 | &static_map_x, 64 | &static_map_y, 65 | &static_switch_on, 66 | &static_switch_id, 67 | NULL 68 | }; 69 | 70 | template class Struct; 71 | 72 | } //namespace lcf 73 | -------------------------------------------------------------------------------- /src/generated/rpg_animation.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/animation.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Animation& obj) { 19 | os << "Animation{"; 20 | os << "name="<< obj.name; 21 | os << ", animation_name="<< obj.animation_name; 22 | os << ", large="<< obj.large; 23 | os << ", timings="; 24 | for (size_t i = 0; i < obj.timings.size(); ++i) { 25 | os << (i == 0 ? "[" : ", ") << obj.timings[i]; 26 | } 27 | os << "]"; 28 | os << ", scope="<< obj.scope; 29 | os << ", position="<< obj.position; 30 | os << ", frames="; 31 | for (size_t i = 0; i < obj.frames.size(); ++i) { 32 | os << (i == 0 ? "[" : ", ") << obj.frames[i]; 33 | } 34 | os << "]"; 35 | os << "}"; 36 | return os; 37 | } 38 | 39 | } // namespace rpg 40 | } // namespace lcf 41 | -------------------------------------------------------------------------------- /src/generated/rpg_animationcelldata.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/animationcelldata.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const AnimationCellData& obj) { 19 | os << "AnimationCellData{"; 20 | os << "valid="<< obj.valid; 21 | os << ", cell_id="<< obj.cell_id; 22 | os << ", x="<< obj.x; 23 | os << ", y="<< obj.y; 24 | os << ", zoom="<< obj.zoom; 25 | os << ", tone_red="<< obj.tone_red; 26 | os << ", tone_green="<< obj.tone_green; 27 | os << ", tone_blue="<< obj.tone_blue; 28 | os << ", tone_gray="<< obj.tone_gray; 29 | os << ", transparency="<< obj.transparency; 30 | os << "}"; 31 | return os; 32 | } 33 | 34 | } // namespace rpg 35 | } // namespace lcf 36 | -------------------------------------------------------------------------------- /src/generated/rpg_animationframe.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/animationframe.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const AnimationFrame& obj) { 19 | os << "AnimationFrame{"; 20 | os << "cells="; 21 | for (size_t i = 0; i < obj.cells.size(); ++i) { 22 | os << (i == 0 ? "[" : ", ") << obj.cells[i]; 23 | } 24 | os << "]"; 25 | os << "}"; 26 | return os; 27 | } 28 | 29 | } // namespace rpg 30 | } // namespace lcf 31 | -------------------------------------------------------------------------------- /src/generated/rpg_animationtiming.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/animationtiming.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const AnimationTiming& obj) { 19 | os << "AnimationTiming{"; 20 | os << "frame="<< obj.frame; 21 | os << ", se="<< obj.se; 22 | os << ", flash_scope="<< obj.flash_scope; 23 | os << ", flash_red="<< obj.flash_red; 24 | os << ", flash_green="<< obj.flash_green; 25 | os << ", flash_blue="<< obj.flash_blue; 26 | os << ", flash_power="<< obj.flash_power; 27 | os << ", screen_shake="<< obj.screen_shake; 28 | os << "}"; 29 | return os; 30 | } 31 | 32 | } // namespace rpg 33 | } // namespace lcf 34 | -------------------------------------------------------------------------------- /src/generated/rpg_attribute.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/attribute.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Attribute& obj) { 19 | os << "Attribute{"; 20 | os << "name="<< obj.name; 21 | os << ", type="<< obj.type; 22 | os << ", a_rate="<< obj.a_rate; 23 | os << ", b_rate="<< obj.b_rate; 24 | os << ", c_rate="<< obj.c_rate; 25 | os << ", d_rate="<< obj.d_rate; 26 | os << ", e_rate="<< obj.e_rate; 27 | os << "}"; 28 | return os; 29 | } 30 | 31 | } // namespace rpg 32 | } // namespace lcf 33 | -------------------------------------------------------------------------------- /src/generated/rpg_battlecommand.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/battlecommand.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const BattleCommand& obj) { 19 | os << "BattleCommand{"; 20 | os << "name="<< obj.name; 21 | os << ", type="<< obj.type; 22 | os << "}"; 23 | return os; 24 | } 25 | 26 | } // namespace rpg 27 | } // namespace lcf 28 | -------------------------------------------------------------------------------- /src/generated/rpg_battleranimation.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/battleranimation.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const BattlerAnimation& obj) { 19 | os << "BattlerAnimation{"; 20 | os << "name="<< obj.name; 21 | os << ", speed="<< obj.speed; 22 | os << ", poses="; 23 | for (size_t i = 0; i < obj.poses.size(); ++i) { 24 | os << (i == 0 ? "[" : ", ") << obj.poses[i]; 25 | } 26 | os << "]"; 27 | os << ", weapons="; 28 | for (size_t i = 0; i < obj.weapons.size(); ++i) { 29 | os << (i == 0 ? "[" : ", ") << obj.weapons[i]; 30 | } 31 | os << "]"; 32 | os << "}"; 33 | return os; 34 | } 35 | 36 | } // namespace rpg 37 | } // namespace lcf 38 | -------------------------------------------------------------------------------- /src/generated/rpg_battleranimationitemskill.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/battleranimationitemskill.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const BattlerAnimationItemSkill& obj) { 19 | os << "BattlerAnimationItemSkill{"; 20 | os << "unknown02="<< obj.unknown02; 21 | os << ", type="<< obj.type; 22 | os << ", weapon_animation_id="<< obj.weapon_animation_id; 23 | os << ", movement="<< obj.movement; 24 | os << ", after_image="<< obj.after_image; 25 | os << ", attacks="<< obj.attacks; 26 | os << ", ranged="<< obj.ranged; 27 | os << ", ranged_animation_id="<< obj.ranged_animation_id; 28 | os << ", ranged_speed="<< obj.ranged_speed; 29 | os << ", battle_animation_id="<< obj.battle_animation_id; 30 | os << ", pose="<< obj.pose; 31 | os << "}"; 32 | return os; 33 | } 34 | 35 | } // namespace rpg 36 | } // namespace lcf 37 | -------------------------------------------------------------------------------- /src/generated/rpg_battleranimationpose.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/battleranimationpose.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const BattlerAnimationPose& obj) { 19 | os << "BattlerAnimationPose{"; 20 | os << "name="<< obj.name; 21 | os << ", battler_name="<< obj.battler_name; 22 | os << ", battler_index="<< obj.battler_index; 23 | os << ", animation_type="<< obj.animation_type; 24 | os << ", battle_animation_id="<< obj.battle_animation_id; 25 | os << "}"; 26 | return os; 27 | } 28 | 29 | } // namespace rpg 30 | } // namespace lcf 31 | -------------------------------------------------------------------------------- /src/generated/rpg_battleranimationweapon.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/battleranimationweapon.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const BattlerAnimationWeapon& obj) { 19 | os << "BattlerAnimationWeapon{"; 20 | os << "name="<< obj.name; 21 | os << ", weapon_name="<< obj.weapon_name; 22 | os << ", weapon_index="<< obj.weapon_index; 23 | os << "}"; 24 | return os; 25 | } 26 | 27 | } // namespace rpg 28 | } // namespace lcf 29 | -------------------------------------------------------------------------------- /src/generated/rpg_chipset.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/chipset.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Chipset& obj) { 19 | os << "Chipset{"; 20 | os << "name="<< obj.name; 21 | os << ", chipset_name="<< obj.chipset_name; 22 | os << ", terrain_data="; 23 | for (size_t i = 0; i < obj.terrain_data.size(); ++i) { 24 | os << (i == 0 ? "[" : ", ") << obj.terrain_data[i]; 25 | } 26 | os << "]"; 27 | os << ", passable_data_lower="; 28 | for (size_t i = 0; i < obj.passable_data_lower.size(); ++i) { 29 | os << (i == 0 ? "[" : ", ") << obj.passable_data_lower[i]; 30 | } 31 | os << "]"; 32 | os << ", passable_data_upper="; 33 | for (size_t i = 0; i < obj.passable_data_upper.size(); ++i) { 34 | os << (i == 0 ? "[" : ", ") << obj.passable_data_upper[i]; 35 | } 36 | os << "]"; 37 | os << ", animation_type="<< obj.animation_type; 38 | os << ", animation_speed="<< obj.animation_speed; 39 | os << "}"; 40 | return os; 41 | } 42 | 43 | } // namespace rpg 44 | } // namespace lcf 45 | -------------------------------------------------------------------------------- /src/generated/rpg_class.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/class.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Class& obj) { 19 | os << "Class{"; 20 | os << "name="<< obj.name; 21 | os << ", two_weapon="<< obj.two_weapon; 22 | os << ", lock_equipment="<< obj.lock_equipment; 23 | os << ", auto_battle="<< obj.auto_battle; 24 | os << ", super_guard="<< obj.super_guard; 25 | os << ", parameters="<< obj.parameters; 26 | os << ", exp_base="<< obj.exp_base; 27 | os << ", exp_inflation="<< obj.exp_inflation; 28 | os << ", exp_correction="<< obj.exp_correction; 29 | os << ", battler_animation="<< obj.battler_animation; 30 | os << ", skills="; 31 | for (size_t i = 0; i < obj.skills.size(); ++i) { 32 | os << (i == 0 ? "[" : ", ") << obj.skills[i]; 33 | } 34 | os << "]"; 35 | os << ", state_ranks="; 36 | for (size_t i = 0; i < obj.state_ranks.size(); ++i) { 37 | os << (i == 0 ? "[" : ", ") << obj.state_ranks[i]; 38 | } 39 | os << "]"; 40 | os << ", attribute_ranks="; 41 | for (size_t i = 0; i < obj.attribute_ranks.size(); ++i) { 42 | os << (i == 0 ? "[" : ", ") << obj.attribute_ranks[i]; 43 | } 44 | os << "]"; 45 | os << ", battle_commands="; 46 | for (size_t i = 0; i < obj.battle_commands.size(); ++i) { 47 | os << (i == 0 ? "[" : ", ") << obj.battle_commands[i]; 48 | } 49 | os << "]"; 50 | os << "}"; 51 | return os; 52 | } 53 | 54 | } // namespace rpg 55 | } // namespace lcf 56 | -------------------------------------------------------------------------------- /src/generated/rpg_commonevent.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/commonevent.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const CommonEvent& obj) { 19 | os << "CommonEvent{"; 20 | os << "name="<< obj.name; 21 | os << ", trigger="<< obj.trigger; 22 | os << ", switch_flag="<< obj.switch_flag; 23 | os << ", switch_id="<< obj.switch_id; 24 | os << ", event_commands="; 25 | for (size_t i = 0; i < obj.event_commands.size(); ++i) { 26 | os << (i == 0 ? "[" : ", ") << obj.event_commands[i]; 27 | } 28 | os << "]"; 29 | os << "}"; 30 | return os; 31 | } 32 | 33 | } // namespace rpg 34 | } // namespace lcf 35 | -------------------------------------------------------------------------------- /src/generated/rpg_encounter.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/encounter.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Encounter& obj) { 19 | os << "Encounter{"; 20 | os << "troop_id="<< obj.troop_id; 21 | os << "}"; 22 | return os; 23 | } 24 | 25 | } // namespace rpg 26 | } // namespace lcf 27 | -------------------------------------------------------------------------------- /src/generated/rpg_enemyaction.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/enemyaction.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const EnemyAction& obj) { 19 | os << "EnemyAction{"; 20 | os << "kind="<< obj.kind; 21 | os << ", basic="<< obj.basic; 22 | os << ", skill_id="<< obj.skill_id; 23 | os << ", enemy_id="<< obj.enemy_id; 24 | os << ", condition_type="<< obj.condition_type; 25 | os << ", condition_param1="<< obj.condition_param1; 26 | os << ", condition_param2="<< obj.condition_param2; 27 | os << ", switch_id="<< obj.switch_id; 28 | os << ", switch_on="<< obj.switch_on; 29 | os << ", switch_on_id="<< obj.switch_on_id; 30 | os << ", switch_off="<< obj.switch_off; 31 | os << ", switch_off_id="<< obj.switch_off_id; 32 | os << ", rating="<< obj.rating; 33 | os << "}"; 34 | return os; 35 | } 36 | 37 | } // namespace rpg 38 | } // namespace lcf 39 | -------------------------------------------------------------------------------- /src/generated/rpg_equipment.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/equipment.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Equipment& obj) { 19 | os << "Equipment{"; 20 | os << "weapon_id="<< obj.weapon_id; 21 | os << ", shield_id="<< obj.shield_id; 22 | os << ", armor_id="<< obj.armor_id; 23 | os << ", helmet_id="<< obj.helmet_id; 24 | os << ", accessory_id="<< obj.accessory_id; 25 | os << "}"; 26 | return os; 27 | } 28 | 29 | } // namespace rpg 30 | } // namespace lcf 31 | -------------------------------------------------------------------------------- /src/generated/rpg_event.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/event.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Event& obj) { 19 | os << "Event{"; 20 | os << "name="<< obj.name; 21 | os << ", x="<< obj.x; 22 | os << ", y="<< obj.y; 23 | os << ", pages="; 24 | for (size_t i = 0; i < obj.pages.size(); ++i) { 25 | os << (i == 0 ? "[" : ", ") << obj.pages[i]; 26 | } 27 | os << "]"; 28 | os << "}"; 29 | return os; 30 | } 31 | 32 | } // namespace rpg 33 | } // namespace lcf 34 | -------------------------------------------------------------------------------- /src/generated/rpg_eventcommand.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/eventcommand.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const EventCommand& obj) { 19 | os << "EventCommand{"; 20 | os << "code="<< obj.code; 21 | os << ", indent="<< obj.indent; 22 | os << ", string="<< obj.string; 23 | os << ", parameters="; 24 | for (size_t i = 0; i < obj.parameters.size(); ++i) { 25 | os << (i == 0 ? "[" : ", ") << obj.parameters[i]; 26 | } 27 | os << "]"; 28 | os << "}"; 29 | return os; 30 | } 31 | 32 | } // namespace rpg 33 | } // namespace lcf 34 | -------------------------------------------------------------------------------- /src/generated/rpg_eventpage.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/eventpage.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const EventPage& obj) { 19 | os << "EventPage{"; 20 | os << "condition="<< obj.condition; 21 | os << ", character_name="<< obj.character_name; 22 | os << ", character_index="<< obj.character_index; 23 | os << ", character_direction="<< obj.character_direction; 24 | os << ", character_pattern="<< obj.character_pattern; 25 | os << ", translucent="<< obj.translucent; 26 | os << ", move_type="<< obj.move_type; 27 | os << ", move_frequency="<< obj.move_frequency; 28 | os << ", trigger="<< obj.trigger; 29 | os << ", layer="<< obj.layer; 30 | os << ", overlap_forbidden="<< obj.overlap_forbidden; 31 | os << ", animation_type="<< obj.animation_type; 32 | os << ", move_speed="<< obj.move_speed; 33 | os << ", move_route="<< obj.move_route; 34 | os << ", event_commands="; 35 | for (size_t i = 0; i < obj.event_commands.size(); ++i) { 36 | os << (i == 0 ? "[" : ", ") << obj.event_commands[i]; 37 | } 38 | os << "]"; 39 | os << "}"; 40 | return os; 41 | } 42 | 43 | } // namespace rpg 44 | } // namespace lcf 45 | -------------------------------------------------------------------------------- /src/generated/rpg_eventpagecondition.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/eventpagecondition.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const EventPageCondition::Flags& obj) { 19 | for (size_t i = 0; i < obj.flags.size(); ++i) { 20 | os << (i == 0 ? "[" : ", ") << obj.flags[i]; 21 | } 22 | os << "]"; 23 | return os; 24 | } 25 | 26 | std::ostream& operator<<(std::ostream& os, const EventPageCondition& obj) { 27 | os << "EventPageCondition{"; 28 | os << "flags="<< obj.flags; 29 | os << ", switch_a_id="<< obj.switch_a_id; 30 | os << ", switch_b_id="<< obj.switch_b_id; 31 | os << ", variable_id="<< obj.variable_id; 32 | os << ", variable_value="<< obj.variable_value; 33 | os << ", item_id="<< obj.item_id; 34 | os << ", actor_id="<< obj.actor_id; 35 | os << ", timer_sec="<< obj.timer_sec; 36 | os << ", timer2_sec="<< obj.timer2_sec; 37 | os << ", compare_operator="<< obj.compare_operator; 38 | os << "}"; 39 | return os; 40 | } 41 | 42 | } // namespace rpg 43 | } // namespace lcf 44 | -------------------------------------------------------------------------------- /src/generated/rpg_learning.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/learning.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Learning& obj) { 19 | os << "Learning{"; 20 | os << "level="<< obj.level; 21 | os << ", skill_id="<< obj.skill_id; 22 | os << "}"; 23 | return os; 24 | } 25 | 26 | } // namespace rpg 27 | } // namespace lcf 28 | -------------------------------------------------------------------------------- /src/generated/rpg_mapinfo.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/mapinfo.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const MapInfo& obj) { 19 | os << "MapInfo{"; 20 | os << "name="<< obj.name; 21 | os << ", parent_map="<< obj.parent_map; 22 | os << ", indentation="<< obj.indentation; 23 | os << ", type="<< obj.type; 24 | os << ", scrollbar_x="<< obj.scrollbar_x; 25 | os << ", scrollbar_y="<< obj.scrollbar_y; 26 | os << ", expanded_node="<< obj.expanded_node; 27 | os << ", music_type="<< obj.music_type; 28 | os << ", music="<< obj.music; 29 | os << ", background_type="<< obj.background_type; 30 | os << ", background_name="<< obj.background_name; 31 | os << ", teleport="<< obj.teleport; 32 | os << ", escape="<< obj.escape; 33 | os << ", save="<< obj.save; 34 | os << ", encounters="; 35 | for (size_t i = 0; i < obj.encounters.size(); ++i) { 36 | os << (i == 0 ? "[" : ", ") << obj.encounters[i]; 37 | } 38 | os << "]"; 39 | os << ", encounter_steps="<< obj.encounter_steps; 40 | os << ", area_rect="<< obj.area_rect; 41 | os << "}"; 42 | return os; 43 | } 44 | 45 | } // namespace rpg 46 | } // namespace lcf 47 | -------------------------------------------------------------------------------- /src/generated/rpg_movecommand.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/movecommand.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const MoveCommand& obj) { 19 | os << "MoveCommand{"; 20 | os << "command_id="<< obj.command_id; 21 | os << ", parameter_string="<< obj.parameter_string; 22 | os << ", parameter_a="<< obj.parameter_a; 23 | os << ", parameter_b="<< obj.parameter_b; 24 | os << ", parameter_c="<< obj.parameter_c; 25 | os << "}"; 26 | return os; 27 | } 28 | 29 | } // namespace rpg 30 | } // namespace lcf 31 | -------------------------------------------------------------------------------- /src/generated/rpg_moveroute.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/moveroute.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const MoveRoute& obj) { 19 | os << "MoveRoute{"; 20 | os << "move_commands="; 21 | for (size_t i = 0; i < obj.move_commands.size(); ++i) { 22 | os << (i == 0 ? "[" : ", ") << obj.move_commands[i]; 23 | } 24 | os << "]"; 25 | os << ", repeat="<< obj.repeat; 26 | os << ", skippable="<< obj.skippable; 27 | os << "}"; 28 | return os; 29 | } 30 | 31 | } // namespace rpg 32 | } // namespace lcf 33 | -------------------------------------------------------------------------------- /src/generated/rpg_music.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/music.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Music& obj) { 19 | os << "Music{"; 20 | os << "name="<< obj.name; 21 | os << ", fadein="<< obj.fadein; 22 | os << ", volume="<< obj.volume; 23 | os << ", tempo="<< obj.tempo; 24 | os << ", balance="<< obj.balance; 25 | os << "}"; 26 | return os; 27 | } 28 | 29 | } // namespace rpg 30 | } // namespace lcf 31 | -------------------------------------------------------------------------------- /src/generated/rpg_parameters.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/parameters.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Parameters& obj) { 19 | os << "Parameters{"; 20 | os << "maxhp="; 21 | for (size_t i = 0; i < obj.maxhp.size(); ++i) { 22 | os << (i == 0 ? "[" : ", ") << obj.maxhp[i]; 23 | } 24 | os << "]"; 25 | os << ", maxsp="; 26 | for (size_t i = 0; i < obj.maxsp.size(); ++i) { 27 | os << (i == 0 ? "[" : ", ") << obj.maxsp[i]; 28 | } 29 | os << "]"; 30 | os << ", attack="; 31 | for (size_t i = 0; i < obj.attack.size(); ++i) { 32 | os << (i == 0 ? "[" : ", ") << obj.attack[i]; 33 | } 34 | os << "]"; 35 | os << ", defense="; 36 | for (size_t i = 0; i < obj.defense.size(); ++i) { 37 | os << (i == 0 ? "[" : ", ") << obj.defense[i]; 38 | } 39 | os << "]"; 40 | os << ", spirit="; 41 | for (size_t i = 0; i < obj.spirit.size(); ++i) { 42 | os << (i == 0 ? "[" : ", ") << obj.spirit[i]; 43 | } 44 | os << "]"; 45 | os << ", agility="; 46 | for (size_t i = 0; i < obj.agility.size(); ++i) { 47 | os << (i == 0 ? "[" : ", ") << obj.agility[i]; 48 | } 49 | os << "]"; 50 | os << "}"; 51 | return os; 52 | } 53 | 54 | } // namespace rpg 55 | } // namespace lcf 56 | -------------------------------------------------------------------------------- /src/generated/rpg_rect.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/rect.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Rect& obj) { 19 | os << "Rect{"; 20 | os << "l="<< obj.l; 21 | os << ", t="<< obj.t; 22 | os << ", r="<< obj.r; 23 | os << ", b="<< obj.b; 24 | os << "}"; 25 | return os; 26 | } 27 | 28 | } // namespace rpg 29 | } // namespace lcf 30 | -------------------------------------------------------------------------------- /src/generated/rpg_save.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/save.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Save& obj) { 19 | os << "Save{"; 20 | os << "title="<< obj.title; 21 | os << ", system="<< obj.system; 22 | os << ", screen="<< obj.screen; 23 | os << ", pictures="; 24 | for (size_t i = 0; i < obj.pictures.size(); ++i) { 25 | os << (i == 0 ? "[" : ", ") << obj.pictures[i]; 26 | } 27 | os << "]"; 28 | os << ", party_location="<< obj.party_location; 29 | os << ", boat_location="<< obj.boat_location; 30 | os << ", ship_location="<< obj.ship_location; 31 | os << ", airship_location="<< obj.airship_location; 32 | os << ", actors="; 33 | for (size_t i = 0; i < obj.actors.size(); ++i) { 34 | os << (i == 0 ? "[" : ", ") << obj.actors[i]; 35 | } 36 | os << "]"; 37 | os << ", inventory="<< obj.inventory; 38 | os << ", targets="; 39 | for (size_t i = 0; i < obj.targets.size(); ++i) { 40 | os << (i == 0 ? "[" : ", ") << obj.targets[i]; 41 | } 42 | os << "]"; 43 | os << ", map_info="<< obj.map_info; 44 | os << ", panorama="<< obj.panorama; 45 | os << ", foreground_event_execstate="<< obj.foreground_event_execstate; 46 | os << ", common_events="; 47 | for (size_t i = 0; i < obj.common_events.size(); ++i) { 48 | os << (i == 0 ? "[" : ", ") << obj.common_events[i]; 49 | } 50 | os << "]"; 51 | os << ", easyrpg_data="<< obj.easyrpg_data; 52 | os << "}"; 53 | return os; 54 | } 55 | 56 | } // namespace rpg 57 | } // namespace lcf 58 | -------------------------------------------------------------------------------- /src/generated/rpg_savecommonevent.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/savecommonevent.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SaveCommonEvent& obj) { 19 | os << "SaveCommonEvent{"; 20 | os << "parallel_event_execstate="<< obj.parallel_event_execstate; 21 | os << "}"; 22 | return os; 23 | } 24 | 25 | } // namespace rpg 26 | } // namespace lcf 27 | -------------------------------------------------------------------------------- /src/generated/rpg_saveeasyrpgdata.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/saveeasyrpgdata.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SaveEasyRpgData& obj) { 19 | os << "SaveEasyRpgData{"; 20 | os << "version="<< obj.version; 21 | os << ", codepage="<< obj.codepage; 22 | os << ", windows="; 23 | for (size_t i = 0; i < obj.windows.size(); ++i) { 24 | os << (i == 0 ? "[" : ", ") << obj.windows[i]; 25 | } 26 | os << "]"; 27 | os << "}"; 28 | return os; 29 | } 30 | 31 | } // namespace rpg 32 | } // namespace lcf 33 | -------------------------------------------------------------------------------- /src/generated/rpg_saveeasyrpgtext.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/saveeasyrpgtext.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SaveEasyRpgText::Flags& obj) { 19 | for (size_t i = 0; i < obj.flags.size(); ++i) { 20 | os << (i == 0 ? "[" : ", ") << obj.flags[i]; 21 | } 22 | os << "]"; 23 | return os; 24 | } 25 | 26 | std::ostream& operator<<(std::ostream& os, const SaveEasyRpgText& obj) { 27 | os << "SaveEasyRpgText{"; 28 | os << "text="<< obj.text; 29 | os << ", position_x="<< obj.position_x; 30 | os << ", position_y="<< obj.position_y; 31 | os << ", font_name="<< obj.font_name; 32 | os << ", font_size="<< obj.font_size; 33 | os << ", letter_spacing="<< obj.letter_spacing; 34 | os << ", line_spacing="<< obj.line_spacing; 35 | os << ", flags="<< obj.flags; 36 | os << "}"; 37 | return os; 38 | } 39 | 40 | } // namespace rpg 41 | } // namespace lcf 42 | -------------------------------------------------------------------------------- /src/generated/rpg_saveeasyrpgwindow.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/saveeasyrpgwindow.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SaveEasyRpgWindow::Flags& obj) { 19 | for (size_t i = 0; i < obj.flags.size(); ++i) { 20 | os << (i == 0 ? "[" : ", ") << obj.flags[i]; 21 | } 22 | os << "]"; 23 | return os; 24 | } 25 | 26 | std::ostream& operator<<(std::ostream& os, const SaveEasyRpgWindow& obj) { 27 | os << "SaveEasyRpgWindow{"; 28 | os << "texts="; 29 | for (size_t i = 0; i < obj.texts.size(); ++i) { 30 | os << (i == 0 ? "[" : ", ") << obj.texts[i]; 31 | } 32 | os << "]"; 33 | os << ", width="<< obj.width; 34 | os << ", height="<< obj.height; 35 | os << ", system_name="<< obj.system_name; 36 | os << ", message_stretch="<< obj.message_stretch; 37 | os << ", flags="<< obj.flags; 38 | os << "}"; 39 | return os; 40 | } 41 | 42 | } // namespace rpg 43 | } // namespace lcf 44 | -------------------------------------------------------------------------------- /src/generated/rpg_saveeventexecframe.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/saveeventexecframe.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SaveEventExecFrame::EasyRpgFrameRuntime_Flags& obj) { 19 | for (size_t i = 0; i < obj.flags.size(); ++i) { 20 | os << (i == 0 ? "[" : ", ") << obj.flags[i]; 21 | } 22 | os << "]"; 23 | return os; 24 | } 25 | 26 | std::ostream& operator<<(std::ostream& os, const SaveEventExecFrame& obj) { 27 | os << "SaveEventExecFrame{"; 28 | os << "commands="; 29 | for (size_t i = 0; i < obj.commands.size(); ++i) { 30 | os << (i == 0 ? "[" : ", ") << obj.commands[i]; 31 | } 32 | os << "]"; 33 | os << ", current_command="<< obj.current_command; 34 | os << ", event_id="<< obj.event_id; 35 | os << ", triggered_by_decision_key="<< obj.triggered_by_decision_key; 36 | os << ", subcommand_path="; 37 | for (size_t i = 0; i < obj.subcommand_path.size(); ++i) { 38 | os << (i == 0 ? "[" : ", ") << obj.subcommand_path[i]; 39 | } 40 | os << "]"; 41 | os << ", maniac_event_info="<< obj.maniac_event_info; 42 | os << ", maniac_event_id="<< obj.maniac_event_id; 43 | os << ", maniac_event_page_id="<< obj.maniac_event_page_id; 44 | os << ", maniac_loop_info_size="<< obj.maniac_loop_info_size; 45 | os << ", maniac_loop_info="; 46 | for (size_t i = 0; i < obj.maniac_loop_info.size(); ++i) { 47 | os << (i == 0 ? "[" : ", ") << obj.maniac_loop_info[i]; 48 | } 49 | os << "]"; 50 | os << ", easyrpg_runtime_flags="<< obj.easyrpg_runtime_flags; 51 | os << "}"; 52 | return os; 53 | } 54 | 55 | } // namespace rpg 56 | } // namespace lcf 57 | -------------------------------------------------------------------------------- /src/generated/rpg_saveinventory.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/saveinventory.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SaveInventory& obj) { 19 | os << "SaveInventory{"; 20 | os << "party="; 21 | for (size_t i = 0; i < obj.party.size(); ++i) { 22 | os << (i == 0 ? "[" : ", ") << obj.party[i]; 23 | } 24 | os << "]"; 25 | os << ", item_ids="; 26 | for (size_t i = 0; i < obj.item_ids.size(); ++i) { 27 | os << (i == 0 ? "[" : ", ") << obj.item_ids[i]; 28 | } 29 | os << "]"; 30 | os << ", item_counts="; 31 | for (size_t i = 0; i < obj.item_counts.size(); ++i) { 32 | os << (i == 0 ? "[" : ", ") << obj.item_counts[i]; 33 | } 34 | os << "]"; 35 | os << ", item_usage="; 36 | for (size_t i = 0; i < obj.item_usage.size(); ++i) { 37 | os << (i == 0 ? "[" : ", ") << obj.item_usage[i]; 38 | } 39 | os << "]"; 40 | os << ", gold="<< obj.gold; 41 | os << ", timer1_frames="<< obj.timer1_frames; 42 | os << ", timer1_active="<< obj.timer1_active; 43 | os << ", timer1_visible="<< obj.timer1_visible; 44 | os << ", timer1_battle="<< obj.timer1_battle; 45 | os << ", timer2_frames="<< obj.timer2_frames; 46 | os << ", timer2_active="<< obj.timer2_active; 47 | os << ", timer2_visible="<< obj.timer2_visible; 48 | os << ", timer2_battle="<< obj.timer2_battle; 49 | os << ", battles="<< obj.battles; 50 | os << ", defeats="<< obj.defeats; 51 | os << ", escapes="<< obj.escapes; 52 | os << ", victories="<< obj.victories; 53 | os << ", turns="<< obj.turns; 54 | os << ", steps="<< obj.steps; 55 | os << "}"; 56 | return os; 57 | } 58 | 59 | } // namespace rpg 60 | } // namespace lcf 61 | -------------------------------------------------------------------------------- /src/generated/rpg_savemapevent.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/savemapevent.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SaveMapEvent& obj) { 19 | os << "SaveMapEvent{"; 20 | os << "waiting_execution="<< obj.waiting_execution; 21 | os << ", original_move_route_index="<< obj.original_move_route_index; 22 | os << ", triggered_by_decision_key="<< obj.triggered_by_decision_key; 23 | os << ", parallel_event_execstate="<< obj.parallel_event_execstate; 24 | os << "}"; 25 | return os; 26 | } 27 | 28 | } // namespace rpg 29 | } // namespace lcf 30 | -------------------------------------------------------------------------------- /src/generated/rpg_savemapinfo.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/savemapinfo.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SaveMapInfo& obj) { 19 | os << "SaveMapInfo{"; 20 | os << "position_x="<< obj.position_x; 21 | os << ", position_y="<< obj.position_y; 22 | os << ", encounter_steps="<< obj.encounter_steps; 23 | os << ", chipset_id="<< obj.chipset_id; 24 | os << ", events="; 25 | for (size_t i = 0; i < obj.events.size(); ++i) { 26 | os << (i == 0 ? "[" : ", ") << obj.events[i]; 27 | } 28 | os << "]"; 29 | os << ", lower_tiles="; 30 | for (size_t i = 0; i < obj.lower_tiles.size(); ++i) { 31 | os << (i == 0 ? "[" : ", ") << obj.lower_tiles[i]; 32 | } 33 | os << "]"; 34 | os << ", upper_tiles="; 35 | for (size_t i = 0; i < obj.upper_tiles.size(); ++i) { 36 | os << (i == 0 ? "[" : ", ") << obj.upper_tiles[i]; 37 | } 38 | os << "]"; 39 | os << ", parallax_name="<< obj.parallax_name; 40 | os << ", parallax_horz="<< obj.parallax_horz; 41 | os << ", parallax_vert="<< obj.parallax_vert; 42 | os << ", parallax_horz_auto="<< obj.parallax_horz_auto; 43 | os << ", parallax_horz_speed="<< obj.parallax_horz_speed; 44 | os << ", parallax_vert_auto="<< obj.parallax_vert_auto; 45 | os << ", parallax_vert_speed="<< obj.parallax_vert_speed; 46 | os << "}"; 47 | return os; 48 | } 49 | 50 | } // namespace rpg 51 | } // namespace lcf 52 | -------------------------------------------------------------------------------- /src/generated/rpg_savepanorama.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/savepanorama.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SavePanorama& obj) { 19 | os << "SavePanorama{"; 20 | os << "pan_x="<< obj.pan_x; 21 | os << ", pan_y="<< obj.pan_y; 22 | os << "}"; 23 | return os; 24 | } 25 | 26 | } // namespace rpg 27 | } // namespace lcf 28 | -------------------------------------------------------------------------------- /src/generated/rpg_savepartylocation.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/savepartylocation.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SavePartyLocation& obj) { 19 | os << "SavePartyLocation{"; 20 | os << "boarding="<< obj.boarding; 21 | os << ", aboard="<< obj.aboard; 22 | os << ", vehicle="<< obj.vehicle; 23 | os << ", unboarding="<< obj.unboarding; 24 | os << ", preboard_move_speed="<< obj.preboard_move_speed; 25 | os << ", menu_calling="<< obj.menu_calling; 26 | os << ", pan_state="<< obj.pan_state; 27 | os << ", pan_current_x="<< obj.pan_current_x; 28 | os << ", pan_current_y="<< obj.pan_current_y; 29 | os << ", pan_finish_x="<< obj.pan_finish_x; 30 | os << ", pan_finish_y="<< obj.pan_finish_y; 31 | os << ", pan_speed="<< obj.pan_speed; 32 | os << ", total_encounter_rate="<< obj.total_encounter_rate; 33 | os << ", encounter_calling="<< obj.encounter_calling; 34 | os << ", map_save_count="<< obj.map_save_count; 35 | os << ", database_save_count="<< obj.database_save_count; 36 | os << ", maniac_horizontal_pan_speed="<< obj.maniac_horizontal_pan_speed; 37 | os << ", maniac_vertical_pan_speed="<< obj.maniac_vertical_pan_speed; 38 | os << "}"; 39 | return os; 40 | } 41 | 42 | } // namespace rpg 43 | } // namespace lcf 44 | -------------------------------------------------------------------------------- /src/generated/rpg_savetarget.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/savetarget.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SaveTarget& obj) { 19 | os << "SaveTarget{"; 20 | os << "map_id="<< obj.map_id; 21 | os << ", map_x="<< obj.map_x; 22 | os << ", map_y="<< obj.map_y; 23 | os << ", switch_on="<< obj.switch_on; 24 | os << ", switch_id="<< obj.switch_id; 25 | os << "}"; 26 | return os; 27 | } 28 | 29 | } // namespace rpg 30 | } // namespace lcf 31 | -------------------------------------------------------------------------------- /src/generated/rpg_savetitle.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/savetitle.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SaveTitle& obj) { 19 | os << "SaveTitle{"; 20 | os << "timestamp="<< obj.timestamp; 21 | os << ", hero_name="<< obj.hero_name; 22 | os << ", hero_level="<< obj.hero_level; 23 | os << ", hero_hp="<< obj.hero_hp; 24 | os << ", face1_name="<< obj.face1_name; 25 | os << ", face1_id="<< obj.face1_id; 26 | os << ", face2_name="<< obj.face2_name; 27 | os << ", face2_id="<< obj.face2_id; 28 | os << ", face3_name="<< obj.face3_name; 29 | os << ", face3_id="<< obj.face3_id; 30 | os << ", face4_name="<< obj.face4_name; 31 | os << ", face4_id="<< obj.face4_id; 32 | os << "}"; 33 | return os; 34 | } 35 | 36 | } // namespace rpg 37 | } // namespace lcf 38 | -------------------------------------------------------------------------------- /src/generated/rpg_savevehiclelocation.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/savevehiclelocation.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const SaveVehicleLocation& obj) { 19 | os << "SaveVehicleLocation{"; 20 | os << "vehicle="<< obj.vehicle; 21 | os << ", remaining_ascent="<< obj.remaining_ascent; 22 | os << ", remaining_descent="<< obj.remaining_descent; 23 | os << ", orig_sprite_name="<< obj.orig_sprite_name; 24 | os << ", orig_sprite_id="<< obj.orig_sprite_id; 25 | os << "}"; 26 | return os; 27 | } 28 | 29 | } // namespace rpg 30 | } // namespace lcf 31 | -------------------------------------------------------------------------------- /src/generated/rpg_sound.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/sound.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Sound& obj) { 19 | os << "Sound{"; 20 | os << "name="<< obj.name; 21 | os << ", volume="<< obj.volume; 22 | os << ", tempo="<< obj.tempo; 23 | os << ", balance="<< obj.balance; 24 | os << "}"; 25 | return os; 26 | } 27 | 28 | } // namespace rpg 29 | } // namespace lcf 30 | -------------------------------------------------------------------------------- /src/generated/rpg_start.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/start.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Start& obj) { 19 | os << "Start{"; 20 | os << "party_map_id="<< obj.party_map_id; 21 | os << ", party_x="<< obj.party_x; 22 | os << ", party_y="<< obj.party_y; 23 | os << ", boat_map_id="<< obj.boat_map_id; 24 | os << ", boat_x="<< obj.boat_x; 25 | os << ", boat_y="<< obj.boat_y; 26 | os << ", ship_map_id="<< obj.ship_map_id; 27 | os << ", ship_x="<< obj.ship_x; 28 | os << ", ship_y="<< obj.ship_y; 29 | os << ", airship_map_id="<< obj.airship_map_id; 30 | os << ", airship_x="<< obj.airship_x; 31 | os << ", airship_y="<< obj.airship_y; 32 | os << "}"; 33 | return os; 34 | } 35 | 36 | } // namespace rpg 37 | } // namespace lcf 38 | -------------------------------------------------------------------------------- /src/generated/rpg_stringvariable.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/stringvariable.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const StringVariable& obj) { 19 | os << "StringVariable{"; 20 | os << "name="<< obj.name; 21 | os << "}"; 22 | return os; 23 | } 24 | 25 | } // namespace rpg 26 | } // namespace lcf 27 | -------------------------------------------------------------------------------- /src/generated/rpg_switch.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/switch.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Switch& obj) { 19 | os << "Switch{"; 20 | os << "name="<< obj.name; 21 | os << "}"; 22 | return os; 23 | } 24 | 25 | } // namespace rpg 26 | } // namespace lcf 27 | -------------------------------------------------------------------------------- /src/generated/rpg_testbattler.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/testbattler.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const TestBattler& obj) { 19 | os << "TestBattler{"; 20 | os << "actor_id="<< obj.actor_id; 21 | os << ", level="<< obj.level; 22 | os << ", weapon_id="<< obj.weapon_id; 23 | os << ", shield_id="<< obj.shield_id; 24 | os << ", armor_id="<< obj.armor_id; 25 | os << ", helmet_id="<< obj.helmet_id; 26 | os << ", accessory_id="<< obj.accessory_id; 27 | os << "}"; 28 | return os; 29 | } 30 | 31 | } // namespace rpg 32 | } // namespace lcf 33 | -------------------------------------------------------------------------------- /src/generated/rpg_treemap.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/treemap.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const TreeMap& obj) { 19 | os << "TreeMap{"; 20 | os << "maps="; 21 | for (size_t i = 0; i < obj.maps.size(); ++i) { 22 | os << (i == 0 ? "[" : ", ") << obj.maps[i]; 23 | } 24 | os << "]"; 25 | os << ", tree_order="; 26 | for (size_t i = 0; i < obj.tree_order.size(); ++i) { 27 | os << (i == 0 ? "[" : ", ") << obj.tree_order[i]; 28 | } 29 | os << "]"; 30 | os << ", active_node="<< obj.active_node; 31 | os << ", start="<< obj.start; 32 | os << "}"; 33 | return os; 34 | } 35 | 36 | } // namespace rpg 37 | } // namespace lcf 38 | -------------------------------------------------------------------------------- /src/generated/rpg_troop.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/troop.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Troop& obj) { 19 | os << "Troop{"; 20 | os << "name="<< obj.name; 21 | os << ", members="; 22 | for (size_t i = 0; i < obj.members.size(); ++i) { 23 | os << (i == 0 ? "[" : ", ") << obj.members[i]; 24 | } 25 | os << "]"; 26 | os << ", auto_alignment="<< obj.auto_alignment; 27 | os << ", terrain_set="; 28 | for (size_t i = 0; i < obj.terrain_set.size(); ++i) { 29 | os << (i == 0 ? "[" : ", ") << obj.terrain_set[i]; 30 | } 31 | os << "]"; 32 | os << ", appear_randomly="<< obj.appear_randomly; 33 | os << ", pages="; 34 | for (size_t i = 0; i < obj.pages.size(); ++i) { 35 | os << (i == 0 ? "[" : ", ") << obj.pages[i]; 36 | } 37 | os << "]"; 38 | os << "}"; 39 | return os; 40 | } 41 | 42 | } // namespace rpg 43 | } // namespace lcf 44 | -------------------------------------------------------------------------------- /src/generated/rpg_troopmember.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/troopmember.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const TroopMember& obj) { 19 | os << "TroopMember{"; 20 | os << "enemy_id="<< obj.enemy_id; 21 | os << ", x="<< obj.x; 22 | os << ", y="<< obj.y; 23 | os << ", invisible="<< obj.invisible; 24 | os << "}"; 25 | return os; 26 | } 27 | 28 | } // namespace rpg 29 | } // namespace lcf 30 | -------------------------------------------------------------------------------- /src/generated/rpg_trooppage.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/trooppage.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const TroopPage& obj) { 19 | os << "TroopPage{"; 20 | os << "condition="<< obj.condition; 21 | os << ", event_commands="; 22 | for (size_t i = 0; i < obj.event_commands.size(); ++i) { 23 | os << (i == 0 ? "[" : ", ") << obj.event_commands[i]; 24 | } 25 | os << "]"; 26 | os << "}"; 27 | return os; 28 | } 29 | 30 | } // namespace rpg 31 | } // namespace lcf 32 | -------------------------------------------------------------------------------- /src/generated/rpg_trooppagecondition.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/trooppagecondition.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const TroopPageCondition::Flags& obj) { 19 | for (size_t i = 0; i < obj.flags.size(); ++i) { 20 | os << (i == 0 ? "[" : ", ") << obj.flags[i]; 21 | } 22 | os << "]"; 23 | return os; 24 | } 25 | 26 | std::ostream& operator<<(std::ostream& os, const TroopPageCondition& obj) { 27 | os << "TroopPageCondition{"; 28 | os << "flags="<< obj.flags; 29 | os << ", switch_a_id="<< obj.switch_a_id; 30 | os << ", switch_b_id="<< obj.switch_b_id; 31 | os << ", variable_id="<< obj.variable_id; 32 | os << ", variable_value="<< obj.variable_value; 33 | os << ", turn_a="<< obj.turn_a; 34 | os << ", turn_b="<< obj.turn_b; 35 | os << ", fatigue_min="<< obj.fatigue_min; 36 | os << ", fatigue_max="<< obj.fatigue_max; 37 | os << ", enemy_id="<< obj.enemy_id; 38 | os << ", enemy_hp_min="<< obj.enemy_hp_min; 39 | os << ", enemy_hp_max="<< obj.enemy_hp_max; 40 | os << ", actor_id="<< obj.actor_id; 41 | os << ", actor_hp_min="<< obj.actor_hp_min; 42 | os << ", actor_hp_max="<< obj.actor_hp_max; 43 | os << ", turn_enemy_id="<< obj.turn_enemy_id; 44 | os << ", turn_enemy_a="<< obj.turn_enemy_a; 45 | os << ", turn_enemy_b="<< obj.turn_enemy_b; 46 | os << ", turn_actor_id="<< obj.turn_actor_id; 47 | os << ", turn_actor_a="<< obj.turn_actor_a; 48 | os << ", turn_actor_b="<< obj.turn_actor_b; 49 | os << ", command_actor_id="<< obj.command_actor_id; 50 | os << ", command_id="<< obj.command_id; 51 | os << "}"; 52 | return os; 53 | } 54 | 55 | } // namespace rpg 56 | } // namespace lcf 57 | -------------------------------------------------------------------------------- /src/generated/rpg_variable.cpp: -------------------------------------------------------------------------------- 1 | /* !!!! GENERATED FILE - DO NOT EDIT !!!! 2 | * -------------------------------------- 3 | * 4 | * This file is part of liblcf. Copyright (c) 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 | // Headers 13 | #include "lcf/rpg/variable.h" 14 | 15 | namespace lcf { 16 | namespace rpg { 17 | 18 | std::ostream& operator<<(std::ostream& os, const Variable& obj) { 19 | os << "Variable{"; 20 | os << "name="<< obj.name; 21 | os << "}"; 22 | return os; 23 | } 24 | 25 | } // namespace rpg 26 | } // namespace lcf 27 | -------------------------------------------------------------------------------- /src/lcf/dbarrayalloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #ifndef LCF_DBARRAYALLOC_H 11 | #define LCF_DBARRAYALLOC_H 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | namespace lcf { 21 | 22 | struct DBArrayAlloc { 23 | using size_type = uint32_t; 24 | using ssize_type = int32_t; 25 | 26 | static void* alloc(size_type size, size_type field_size, size_type align); 27 | static void free(void* p, size_type align) noexcept; 28 | 29 | static void* empty_buf() { 30 | return const_cast(&_empty_buf[1]); 31 | } 32 | 33 | static constexpr size_type* get_size_ptr(void* p) { 34 | return static_cast(p) - 1; 35 | } 36 | 37 | static constexpr const size_type* get_size_ptr(const void* p) { 38 | return static_cast(p) - 1; 39 | } 40 | 41 | private: 42 | static const size_type _empty_buf[2]; 43 | }; 44 | 45 | } // namespace lcf 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/lcf/encoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #ifndef LCF_ENCODER_H 11 | #define LCF_ENCODER_H 12 | 13 | #include "lcf/config.h" 14 | #include 15 | #include 16 | 17 | #if LCF_SUPPORT_ICU 18 | class UConverter; 19 | #endif 20 | 21 | namespace lcf { 22 | 23 | class Encoder { 24 | public: 25 | explicit Encoder(std::string encoding); 26 | 27 | Encoder(const Encoder&) = delete; 28 | Encoder& operator=(const Encoder&) = delete; 29 | 30 | ~Encoder(); 31 | 32 | /** 33 | * Converts from the specified encoding to UTF-8 34 | * 35 | * @param str String to encode to UTF-8 36 | */ 37 | void Encode(std::string& str); 38 | 39 | /** 40 | * Converts from UTF-8 to the specified encoding 41 | * 42 | * @param str String to decode from UTF-8 43 | */ 44 | void Decode(std::string& str); 45 | 46 | bool IsOk() const; 47 | 48 | std::string_view GetEncoding() const; 49 | private: 50 | #if LCF_SUPPORT_ICU 51 | void Init(); 52 | void Reset(); 53 | void Convert(std::string& str, UConverter* conv_dst, UConverter* conv_src); 54 | 55 | UConverter* _conv_storage = nullptr; 56 | UConverter* _conv_runtime = nullptr; 57 | #else 58 | void Init(); 59 | void Reset() {} 60 | void Convert(std::string& str, int conv_dst, int conv_src); 61 | 62 | int _conv_storage = 0; 63 | int _conv_runtime = 0; 64 | #endif 65 | std::vector _buffer; 66 | std::string _encoding; 67 | }; 68 | 69 | 70 | inline std::string_view Encoder::GetEncoding() const { 71 | return _encoding; 72 | } 73 | 74 | } //namespace lcf 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /src/lcf/ldb/reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #ifndef LCF_LDB_READER_H 11 | #define LCF_LDB_READER_H 12 | 13 | #include 14 | #include 15 | #include 16 | #include "lcf/rpg/database.h" 17 | #include "lcf/saveopt.h" 18 | 19 | namespace lcf { 20 | 21 | /** 22 | * LDB Reader namespace. 23 | */ 24 | namespace LDB_Reader { 25 | /** 26 | * Increment the database save_count. 27 | */ 28 | void PrepareSave(rpg::Database& db); 29 | 30 | /** 31 | * Loads Database. 32 | */ 33 | std::unique_ptr Load(std::string_view filename, std::string_view encoding = ""); 34 | 35 | /** 36 | * Saves Database. 37 | */ 38 | bool Save(std::string_view filename, const lcf::rpg::Database& db, std::string_view encoding = "", SaveOpt opt = SaveOpt::eNone); 39 | 40 | /** 41 | * Saves Database as XML. 42 | */ 43 | bool SaveXml(std::string_view filename, const lcf::rpg::Database& db); 44 | 45 | /** 46 | * Load Database as XML. 47 | */ 48 | std::unique_ptr LoadXml(std::string_view filename); 49 | 50 | /** 51 | * Loads Database. 52 | */ 53 | std::unique_ptr Load(std::istream& filestream, std::string_view encoding = ""); 54 | 55 | /** 56 | * Saves Database. 57 | */ 58 | bool Save(std::ostream& filestream, const lcf::rpg::Database& db, std::string_view encoding = "", SaveOpt opt = SaveOpt::eNone); 59 | 60 | /** 61 | * Saves Database as XML. 62 | */ 63 | bool SaveXml(std::ostream& filestream, const lcf::rpg::Database& db); 64 | 65 | /** 66 | * Load Database as XML. 67 | */ 68 | std::unique_ptr LoadXml(std::istream& filestream); 69 | } 70 | 71 | } // namespace lcf 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /src/lcf/lmt/reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #ifndef LCF_LMT_READER_H 11 | #define LCF_LMT_READER_H 12 | 13 | #include 14 | #include 15 | #include "lcf/rpg/treemap.h" 16 | #include "lcf/saveopt.h" 17 | 18 | namespace lcf { 19 | 20 | /** 21 | * LMT Reader namespace. 22 | */ 23 | namespace LMT_Reader { 24 | 25 | /** 26 | * Loads Map Tree. 27 | */ 28 | std::unique_ptr Load(std::string_view filename, std::string_view encoding = ""); 29 | 30 | /** 31 | * Saves Map Tree. 32 | */ 33 | bool Save(std::string_view filename, const lcf::rpg::TreeMap& tmap, EngineVersion engine, std::string_view encoding = "", SaveOpt opt = SaveOpt::eNone); 34 | 35 | /** 36 | * Saves Map Tree as XML. 37 | */ 38 | bool SaveXml(std::string_view filename, const lcf::rpg::TreeMap& tmap, EngineVersion engine); 39 | 40 | /** 41 | * Loads Map Tree as XML. 42 | */ 43 | std::unique_ptr LoadXml(std::string_view filename); 44 | 45 | /** 46 | * Loads Map Tree. 47 | */ 48 | std::unique_ptr Load(std::istream& filestream, std::string_view encoding = ""); 49 | 50 | /** 51 | * Saves Map Tree. 52 | */ 53 | bool Save(std::ostream& filestream, const lcf::rpg::TreeMap& tmap, EngineVersion engine, std::string_view encoding = "", SaveOpt opt = SaveOpt::eNone); 54 | 55 | /** 56 | * Saves Map Tree as XML. 57 | */ 58 | bool SaveXml(std::ostream& filestream, const lcf::rpg::TreeMap& tmap, EngineVersion engine); 59 | 60 | /** 61 | * Loads Map Tree as XML. 62 | */ 63 | std::unique_ptr LoadXml(std::istream& filestream); 64 | } 65 | 66 | } //namespace lcf 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /src/lcf/lmu/reader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #ifndef LCF_LMU_READER_H 11 | #define LCF_LMU_READER_H 12 | 13 | #include 14 | #include 15 | #include "lcf/rpg/map.h" 16 | #include "lcf/saveopt.h" 17 | 18 | namespace lcf { 19 | 20 | /** 21 | * LMU Reader namespace. 22 | */ 23 | namespace LMU_Reader { 24 | 25 | /** 26 | * Increment the map save count. 27 | */ 28 | void PrepareSave(rpg::Map& map); 29 | 30 | /** 31 | * Loads map. 32 | */ 33 | std::unique_ptr Load(std::string_view filename, std::string_view encoding = ""); 34 | 35 | /** 36 | * Saves map. 37 | */ 38 | bool Save(std::string_view filename, const rpg::Map& map, EngineVersion engine, std::string_view encoding = "", SaveOpt opt = SaveOpt::eNone); 39 | 40 | /** 41 | * Saves map as XML. 42 | */ 43 | bool SaveXml(std::string_view filename, const rpg::Map& map, EngineVersion engine); 44 | 45 | /** 46 | * Loads map as XML. 47 | */ 48 | std::unique_ptr LoadXml(std::string_view filename); 49 | 50 | /** 51 | * Loads map. 52 | */ 53 | std::unique_ptr Load(std::istream& filestream, std::string_view encoding = ""); 54 | 55 | /** 56 | * Saves map. 57 | */ 58 | bool Save(std::ostream& filestream, const rpg::Map& map, EngineVersion engine, std::string_view encoding = "", SaveOpt opt = SaveOpt::eNone); 59 | 60 | /** 61 | * Saves map as XML. 62 | */ 63 | bool SaveXml(std::ostream& filestream, const rpg::Map& map, EngineVersion engine); 64 | 65 | /** 66 | * Loads map as XML. 67 | */ 68 | std::unique_ptr LoadXml(std::istream& filestream); 69 | } 70 | 71 | } //namespace lcf 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /src/lcf/log_handler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #ifndef LCF_OUTPUT_H 11 | #define LCF_OUTPUT_H 12 | 13 | #include "string_view.h" 14 | #include "enum_tags.h" 15 | 16 | namespace lcf { 17 | namespace LogHandler { 18 | 19 | enum class Level { 20 | Debug, 21 | Warning, 22 | Error, 23 | Highest 24 | }; 25 | 26 | static constexpr auto kLevelTags = lcf::makeEnumTags( 27 | "Debug", 28 | "Warning", 29 | "Error", 30 | "Highest" 31 | ); 32 | 33 | using UserData = void*; 34 | using LogHandlerFn = void (*)(Level level, std::string_view message, UserData userdata); 35 | 36 | /** 37 | * Sets the output handler for all lcf logging. 38 | * The default handler prints to standard error. 39 | * 40 | * @param fn New output handler. nullptr for default handler. 41 | * @param userdata Passed to the log handler function. Is not touched by liblcf. 42 | */ 43 | void SetHandler(LogHandlerFn fn, UserData userdata = nullptr); 44 | 45 | /** 46 | * Only report issues that have at least this log level. 47 | * Use Highest to disable logging. 48 | * Default: Debug 49 | * 50 | * @param new_level New log level 51 | */ 52 | void SetLevel(Level new_level); 53 | 54 | } // namespace LogHandler 55 | } // namespace lcf 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/lcf/saveopt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #ifndef LCF_SAVEOPT_H 11 | #define LCF_SAVEOPT_H 12 | 13 | namespace lcf { 14 | namespace rpg { 15 | class Database; 16 | }; 17 | 18 | /** 19 | * Options to configure how LDB file is saved 20 | */ 21 | enum class SaveOpt { 22 | eNone = 0, 23 | ePreserveHeader = 1 24 | }; 25 | 26 | constexpr SaveOpt operator|(SaveOpt l, SaveOpt r) { return SaveOpt(int(l) | int(r)); } 27 | constexpr SaveOpt operator&(SaveOpt l, SaveOpt r) { return SaveOpt(int(l) & int(r)); } 28 | constexpr SaveOpt operator^(SaveOpt l, SaveOpt r) { return SaveOpt(int(l) ^ int(r)); } 29 | constexpr SaveOpt operator~(SaveOpt l) { return SaveOpt(~int(l)); } 30 | 31 | /** 32 | * Which LCF file format to write 33 | */ 34 | enum class EngineVersion { 35 | e2k = 0, 36 | e2k3 = 1 37 | }; 38 | 39 | EngineVersion GetEngineVersion(const lcf::rpg::Database& db); 40 | 41 | } //namespace lcf 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /src/lcf/scope_guard.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #ifndef LCF_SCOPE_GUARD_H 11 | #define LCF_SCOPE_GUARD_H 12 | #include 13 | 14 | namespace lcf { 15 | 16 | template 17 | class ScopeGuard { 18 | public: 19 | ScopeGuard() = default; 20 | explicit ScopeGuard(const F& f) : _f(f), _active(true) {} 21 | explicit ScopeGuard(F&& f) : _f(std::move(f)), _active(true) {} 22 | 23 | ScopeGuard(const ScopeGuard&) = delete; 24 | ScopeGuard& operator=(const ScopeGuard&) = delete; 25 | 26 | ScopeGuard(ScopeGuard&& o) noexcept 27 | : _f(std::move(o._f)), _active(true) { o._active = false; } 28 | ScopeGuard& operator=(ScopeGuard&& o) noexcept { 29 | _f = std::move(o._f); 30 | o._active = false; 31 | return *this; 32 | }; 33 | 34 | ~ScopeGuard() { Fire(); } 35 | 36 | void Fire() noexcept; 37 | void Dismiss() noexcept; 38 | bool IsActive() noexcept; 39 | private: 40 | F _f; 41 | bool _active = false; 42 | }; 43 | 44 | template 45 | inline ScopeGuard makeScopeGuard(F&& f) { 46 | return ScopeGuard(std::forward(f)); 47 | } 48 | 49 | template 50 | inline void ScopeGuard::Fire() noexcept { 51 | if (_active) { 52 | _f(); 53 | Dismiss(); 54 | } 55 | } 56 | 57 | template 58 | inline void ScopeGuard::Dismiss() noexcept { 59 | _active = false; 60 | } 61 | 62 | template 63 | inline bool ScopeGuard::IsActive() noexcept { 64 | return _active; 65 | } 66 | 67 | } //namespace lcf 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /src/lcf/span.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #ifndef LCF_SPAN_H 11 | #define LCF_SPAN_H 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #define span_CONFIG_NO_EXCEPTIONS 1 20 | #define span_FEATURE_WITH_CONTAINER 1 21 | #define span_FEATURE_CONSTRUCTION_FROM_STDARRAY_ELEMENT_TYPE 1 22 | #define span_FEATURE_MAKE_SPAN 1 23 | #define span_CONFIG_SELECT_SPAN span_SPAN_NONSTD 24 | #include 25 | 26 | namespace lcf { 27 | 28 | using ExtentT = nonstd::span_lite::extent_t; 29 | using nonstd::dynamic_extent; 30 | 31 | template 32 | using Span = nonstd::span; 33 | 34 | template 35 | constexpr inline auto MakeSpan(Args&&... args) noexcept -> decltype(nonstd::make_span(std::forward(args)...)) { 36 | return nonstd::make_span(std::forward(args)...); 37 | } 38 | 39 | 40 | } // namespace lcf 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/lcf/string_view.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #ifndef LCF_STRING_VIEW_H 11 | #define LCF_STRING_VIEW_H 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | namespace lcf { 18 | 19 | using StringView [[deprecated("Use std::string_view")]] = std::string_view; 20 | using U16StringView [[deprecated("Use std::u16string_view")]] = std::u16string_view; 21 | using U32StringView [[deprecated("Use std::u32string_view")]] = std::u32string_view; 22 | 23 | inline std::string ToString(std::string_view sv) { 24 | return std::string(sv); 25 | } 26 | 27 | constexpr bool StartsWith(std::string_view l, std::string_view r) noexcept { 28 | return l.size() >= r.size() && l.compare(0, r.size(), r) == 0; 29 | } 30 | 31 | constexpr bool StartsWith(std::string_view l, char c) noexcept { 32 | return StartsWith(l, std::string_view(&c, 1)); 33 | } 34 | 35 | constexpr bool StartsWith(std::string_view l, const char* s) { 36 | return StartsWith(l, std::string_view(s)); 37 | } 38 | 39 | constexpr bool EndsWith(std::string_view l, std::string_view r) noexcept { 40 | return l.size() >= r.size() && l.compare(l.size() - r.size(), std::string_view::npos, r) == 0; 41 | } 42 | 43 | constexpr bool EndsWith(std::string_view l, char c) noexcept { 44 | return EndsWith(l, std::string_view(&c, 1)); 45 | } 46 | 47 | constexpr bool EndsWith(std::string_view l, const char* s) { 48 | return EndsWith(l, std::string_view(s)); 49 | } 50 | 51 | /** A reimplementation of std::atoi() which works for std::string_view */ 52 | inline int SvAtoi(std::string_view str) { 53 | const char* b = str.data(); 54 | const char* e = str.data() + str.length(); 55 | auto value = std::strtol(b, const_cast(&e), 10); 56 | return e > b ? value : 0; 57 | } 58 | 59 | } // namespace lcf 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #ifndef LCF_LOG_H 11 | #define LCF_LOG_H 12 | 13 | #include "lcf/log_handler.h" 14 | 15 | #ifdef __GNUG__ 16 | #define LIKE_PRINTF __attribute__((format(printf, 1, 2))) 17 | #else 18 | #define LIKE_PRINTF 19 | #endif 20 | 21 | namespace lcf { 22 | namespace Log { 23 | 24 | void Debug(const char* fmt, ...) LIKE_PRINTF; 25 | void Warning(const char* fmt, ...) LIKE_PRINTF; 26 | void Error(const char* fmt, ...) LIKE_PRINTF; 27 | 28 | } // namespace Log 29 | } // namespace lcf 30 | 31 | #undef LIKE_PRINTF 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/rpg_setup.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #include "lcf/config.h" 11 | #include "lcf/rpg/actor.h" 12 | #include "lcf/rpg/event.h" 13 | #include "lcf/rpg/map.h" 14 | #include "lcf/rpg/mapinfo.h" 15 | #include "lcf/rpg/system.h" 16 | #include "lcf/rpg/save.h" 17 | #include "lcf/rpg/chipset.h" 18 | #include "lcf/rpg/parameters.h" 19 | 20 | namespace lcf { 21 | 22 | void rpg::Actor::Setup(bool is2k3) { 23 | int max_final_level = 0; 24 | if (is2k3) { 25 | max_final_level = 99; 26 | if (final_level == -1) { 27 | final_level = max_final_level; 28 | } 29 | exp_base = exp_base == -1 ? 300 : exp_base; 30 | exp_inflation = exp_inflation == -1 ? 300 : exp_inflation; 31 | } 32 | else { 33 | max_final_level = 50; 34 | if (final_level == -1) { 35 | final_level = max_final_level; 36 | } 37 | exp_base = exp_base == -1 ? 30 : exp_base; 38 | exp_inflation = exp_inflation == -1 ? 30 : exp_inflation; 39 | } 40 | parameters.Setup(max_final_level); 41 | } 42 | 43 | void rpg::Parameters::Setup(int final_level) { 44 | size_t level = 0; 45 | if (final_level > 0) level = final_level; 46 | if (maxhp.size() < level) maxhp.resize(level, 1); 47 | if (maxsp.size() < level) maxsp.resize(level, 0); 48 | if (attack.size() < level) attack.resize(level, 1); 49 | if (defense.size() < level) defense.resize(level, 1); 50 | if (spirit.size() < level) spirit.resize(level, 1); 51 | if (agility.size() < level) agility.resize(level, 1); 52 | } 53 | 54 | } // namespace lcf 55 | -------------------------------------------------------------------------------- /src/rpg_terms.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #include "lcf/rpg/terms.h" 11 | 12 | namespace lcf { 13 | 14 | std::string rpg::Terms::TermOrDefault(const DBString& db_term, std::string_view default_term) { 15 | if (db_term == kDefaultTerm) { 16 | return ToString(default_term); 17 | } 18 | return ToString(db_term); 19 | } 20 | 21 | } // namespace lcf 22 | -------------------------------------------------------------------------------- /src/saveopt.cpp: -------------------------------------------------------------------------------- 1 | #include "lcf/saveopt.h" 2 | #include "lcf/rpg/database.h" 3 | 4 | namespace lcf { 5 | 6 | EngineVersion GetEngineVersion(const lcf::rpg::Database& db) { 7 | if (db.system.ldb_id == 2003) { 8 | return EngineVersion::e2k3; 9 | } 10 | return EngineVersion::e2k; 11 | } 12 | 13 | } // namespace lcf 14 | -------------------------------------------------------------------------------- /tests/flag_set.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #include "lcf/flag_set.h" 11 | #include "doctest.h" 12 | 13 | using namespace lcf; 14 | 15 | enum Color { 16 | Red, 17 | Green, 18 | Blue 19 | }; 20 | 21 | template class lcf::FlagSet; 22 | 23 | using ColorSet = FlagSet; 24 | 25 | TEST_SUITE_BEGIN("flag_set"); 26 | 27 | TEST_CASE("Default Construct") { 28 | ColorSet cs; 29 | REQUIRE(!cs[Red]); 30 | REQUIRE(!cs[Green]); 31 | REQUIRE(!cs[Blue]); 32 | REQUIRE_EQ(cs.count(), 0); 33 | } 34 | 35 | TEST_CASE("List Construct") { 36 | ColorSet cs = { Red, Blue }; 37 | REQUIRE(cs[Red]); 38 | REQUIRE(!cs[Green]); 39 | REQUIRE(cs[Blue]); 40 | REQUIRE_EQ(cs.count(), 2); 41 | 42 | cs[Green] = true; 43 | REQUIRE(cs[Green]); 44 | REQUIRE_EQ(cs.count(), 3); 45 | 46 | cs[Red] = false; 47 | REQUIRE(!cs[Red]); 48 | REQUIRE_EQ(cs.count(), 2); 49 | } 50 | 51 | TEST_CASE("Logical Ops") { 52 | ColorSet cs0 = {}; 53 | ColorSet csr = { Red }; 54 | ColorSet csg = { Green }; 55 | ColorSet csb = { Blue }; 56 | 57 | ColorSet csrg = { Red, Green }; 58 | ColorSet csrb = { Red, Blue }; 59 | ColorSet csgb = { Green, Blue }; 60 | ColorSet csrgb = { Red, Green, Blue }; 61 | 62 | REQUIRE(cs0 == (csr & csg)); 63 | REQUIRE(cs0 == (csb & csg)); 64 | REQUIRE(cs0 == (csr & csb)); 65 | REQUIRE(cs0 == (csrg & csb)); 66 | REQUIRE(cs0 == (csrb & csg)); 67 | REQUIRE(cs0 == (csgb & csr)); 68 | REQUIRE(cs0 == (csrgb & cs0)); 69 | 70 | REQUIRE(csrb == (csr | csb)); 71 | REQUIRE(csgb == (csb | csg)); 72 | REQUIRE(csrgb == (csr | csb | csg)); 73 | 74 | REQUIRE(csrb == (csr ^ csb)); 75 | REQUIRE(csb == (csr ^ csrb)); 76 | } 77 | 78 | TEST_SUITE_END(); 79 | -------------------------------------------------------------------------------- /tests/span.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #include "lcf/span.h" 11 | #include "doctest.h" 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | using namespace lcf; 18 | 19 | using arr_t = int[5]; 20 | static_assert(std::is_same&>())),Span>::value, "MakeSpan Broken"); 21 | 22 | static_assert(std::is_same>())),Span>::value, "MakeSpan Broken"); 23 | static_assert(std::is_same&>())),Span>::value, "MakeSpan Broken"); 24 | 25 | static_assert(std::is_same>())),Span>::value, "MakeSpan Broken"); 26 | static_assert(std::is_same&>())),Span>::value, "MakeSpan Broken"); 27 | static_assert(std::is_same>())),Span>::value, "MakeSpan Broken"); 28 | static_assert(std::is_same&>())),Span>::value, "MakeSpan Broken"); 29 | 30 | static_assert(std::is_same())),Span>::value, "MakeSpan Broken"); 31 | static_assert(std::is_same())),Span>::value, "MakeSpan Broken"); 32 | static_assert(std::is_same())),Span>::value, "MakeSpan Broken"); 33 | static_assert(std::is_same())),Span>::value, "MakeSpan Broken"); 34 | 35 | TEST_SUITE_BEGIN("Span"); 36 | 37 | TEST_CASE_TEMPLATE("Construct", T, int, double, std::string) { 38 | Span x; 39 | (void)x; 40 | } 41 | 42 | TEST_SUITE_END(); 43 | -------------------------------------------------------------------------------- /tests/string_view.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #include "lcf/string_view.h" 11 | #include "doctest.h" 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | using namespace lcf; 18 | 19 | TEST_SUITE_BEGIN("StringView"); 20 | 21 | TEST_CASE("SvAtoi") { 22 | REQUIRE_EQ(SvAtoi("0"), 0); 23 | REQUIRE_EQ(SvAtoi("2"), 2); 24 | REQUIRE_EQ(SvAtoi("-43"), -43); 25 | REQUIRE_EQ(SvAtoi(std::to_string(INT_MAX)), INT_MAX); 26 | REQUIRE_EQ(SvAtoi(std::to_string(INT_MIN)), INT_MIN); 27 | 28 | REQUIRE_EQ(SvAtoi(""), 0); 29 | REQUIRE_EQ(SvAtoi("cs"), 0); 30 | REQUIRE_EQ(SvAtoi("-"), 0); 31 | REQUIRE_EQ(SvAtoi(" "), 0); 32 | REQUIRE_EQ(SvAtoi("0x55"), 0); 33 | } 34 | 35 | TEST_CASE("StartsWith") { 36 | std::string_view sv = "StringView"; 37 | std::string in = "String"; 38 | std::string notin = "NotFound"; 39 | 40 | REQUIRE(StartsWith(sv, in)); 41 | REQUIRE(StartsWith(sv, std::string_view(in))); 42 | REQUIRE(StartsWith(sv, 'S')); 43 | REQUIRE(StartsWith(sv, "String")); 44 | 45 | REQUIRE_FALSE(StartsWith(sv, notin)); 46 | REQUIRE_FALSE(StartsWith(sv, std::string_view(notin))); 47 | REQUIRE_FALSE(StartsWith(sv, 'X')); 48 | REQUIRE_FALSE(StartsWith(sv, "NotFound")); 49 | } 50 | 51 | TEST_CASE("EndsWith") { 52 | std::string_view sv = "StringView"; 53 | std::string in = "View"; 54 | std::string notin = "NotFound"; 55 | 56 | REQUIRE(EndsWith(sv, in)); 57 | REQUIRE(EndsWith(sv, std::string_view(in))); 58 | REQUIRE(EndsWith(sv, 'w')); 59 | REQUIRE(EndsWith(sv, "View")); 60 | 61 | REQUIRE_FALSE(EndsWith(sv, notin)); 62 | REQUIRE_FALSE(EndsWith(sv, std::string_view(notin))); 63 | REQUIRE_FALSE(EndsWith(sv, 'X')); 64 | REQUIRE_FALSE(EndsWith(sv, "NotFound")); 65 | } 66 | 67 | TEST_SUITE_END(); 68 | -------------------------------------------------------------------------------- /tests/test_main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN 11 | #include "doctest.h" 12 | -------------------------------------------------------------------------------- /tests/time_stamp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of liblcf. Copyright (c) liblcf authors. 3 | * https://github.com/EasyRPG/liblcf - https://easyrpg.org 4 | * 5 | * liblcf is Free/Libre Open Source Software, released under the MIT License. 6 | * For the full copyright and license information, please view the COPYING 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #include "lcf/lsd/reader.h" 11 | #include "doctest.h" 12 | 13 | using namespace lcf; 14 | 15 | TEST_SUITE_BEGIN("timestamps"); 16 | 17 | static void CheckTime(double val, int year, int month, int day, int hour, 18 | int minute, int second) { 19 | std::time_t const current = LSD_Reader::ToUnixTimestamp(val); 20 | std::tm const* t = std::gmtime(¤t); 21 | 22 | CHECK_EQ(t->tm_year, year - 1900); 23 | CHECK_EQ(t->tm_mon + 1, month); 24 | CHECK_EQ(t->tm_mday, day); 25 | CHECK_EQ(t->tm_hour, hour); 26 | CHECK_EQ(t->tm_min, minute); 27 | CHECK_EQ(t->tm_sec, second); 28 | } 29 | 30 | TEST_CASE("comparison") { 31 | // 27468.96875 => 1975 年 3 月 15 日 11:15:00 P.M. 32 | CheckTime(27468.96875, 1975, 3, 15, 23, 15, 0); 33 | 34 | // 36836.125 => 2000 年 11 月 6 日 3:00:00 A.M. 35 | CheckTime(36836.125, 2000, 11, 6, 3, 0, 0); 36 | 37 | // 36295.0 => 1999/5/15 12:00:00 AM 38 | CheckTime(36295.0, 1999, 5, 15, 0, 0, 0); 39 | 40 | // 36232.9375 => 1999/3/13 22:30:00 (10:30:00 PM) 41 | CheckTime(36232.9375, 1999, 3, 13, 22, 30, 0); 42 | } 43 | 44 | TEST_CASE("conversion to Unix timestamp") { 45 | std::time_t const current = std::time(NULL); 46 | double const current_tdatetime = LSD_Reader::ToTDateTime(current); 47 | 48 | CHECK(current == LSD_Reader::ToUnixTimestamp(current_tdatetime)); 49 | } 50 | 51 | TEST_CASE("conversion to TDateTime") { 52 | double const current = LSD_Reader::ToTDateTime(std::time(NULL)); 53 | std::time_t const current_timestamp = LSD_Reader::ToUnixTimestamp(current); 54 | 55 | /* small rounding difference allowed */ 56 | CHECK(doctest::Approx(current) == LSD_Reader::ToTDateTime(current_timestamp)); 57 | } 58 | 59 | TEST_SUITE_END(); 60 | --------------------------------------------------------------------------------