Browse Source

Merge branch 'feature/cleanup' into develop

Iñigo Valentin 4 days ago
parent
commit
953627f5a2
100 changed files with 94 additions and 830 deletions
  1. 2 2
      .github/agents/ff7-format-researcher.agent.md
  2. 9 7
      .github/copilot-instructions.md
  3. 5 5
      .github/instructions/ff7-data-formats.instructions.md
  4. 3 3
      .github/instructions/tests.instructions.md
  5. 3 3
      .github/prompts/new-data-format.prompt.md
  6. 1 1
      .github/prompts/test.prompt.md
  7. 7 7
      .gitignore
  8. 0 3
      PlugIns/CMakeLists.txt
  9. 0 56
      PlugIns/Data/CMakeLists.txt
  10. 0 96
      PlugIns/Data/include/VGearsDataPlugin.h
  11. 0 4
      PlugIns/Data/misc/VGearsData.def
  12. 0 52
      PlugIns/Data/src/VGearsDataPlugin.cpp
  13. 0 37
      PlugIns/Data/src/VGearsDataPluginDll.cpp
  14. 0 143
      PlugIns/Data/test/tex_file_info.cpp
  15. 0 170
      PlugIns/Data/test/tex_file_test.cpp
  16. 0 6
      data/data/audio/musics/README.txt
  17. 0 6
      data/data/audio/sounds/README.txt
  18. 0 4
      data/data/fields/README.txt
  19. 0 6
      data/data/gamedata/README.txt
  20. 0 7
      data/data/images/characters/README.txt
  21. 0 5
      data/data/images/fonts/README.txt
  22. 0 6
      data/data/images/icons/README.txt
  23. 0 6
      data/data/images/other/README.txt
  24. 0 4
      data/data/images/reels/README.txt
  25. 0 6
      data/data/images/window/README.txt
  26. 0 10
      data/data/models/battle/characters/README.txt
  27. 0 10
      data/data/models/battle/enemies/README.txt
  28. 0 9
      data/data/models/battle/scenes/README.txt
  29. 0 9
      data/data/models/fields/README.txt
  30. 0 3
      data/data/models/world/characters/README.txt
  31. 0 3
      data/data/models/world/locations/README.txt
  32. 0 3
      data/data/models/world/other/README.txt
  33. 0 3
      data/data/models/world/terrain/README.txt
  34. 0 3
      data/data/models/world/vehicles/README.txt
  35. 0 2
      data/data/screens/README.txt
  36. 0 41
      data/data/screens/_screens.xml
  37. 0 1
      data/data/scripts/README.txt
  38. 0 53
      data/data/scripts/_scripts.xml
  39. 0 1
      data/data/system/README.txt
  40. 0 2
      data/data/texts/README.txt
  41. 0 11
      data/data/texts/_texts.xml
  42. 0 5
      data/data/texts/japanese/menu.xml
  43. 0 5
      data/data/texts/russian/menu.xml
  44. 0 3
      data/data/world/README.txt
  45. 0 0
      data/defaults/config.cfg
  46. 0 0
      data/engine/fonts/_fonts.xml
  47. 0 0
      data/engine/fonts/ffvii_digits.xml
  48. 0 0
      data/engine/fonts/ffvii_en.xml
  49. 0 0
      data/engine/fonts/ffvii_menu.xml
  50. 0 0
      data/engine/fonts/ffvii_timer.xml
  51. 0 0
      data/engine/images/empty.png
  52. 0 0
      data/engine/images/system/blank.png
  53. 0 0
      data/engine/metadata/field_models_and_animation_metadata.xml
  54. 53 0
      data/engine/scripts/_scripts.xml
  55. 0 0
      data/engine/scripts/ai/1st_ray.lua
  56. 0 0
      data/engine/scripts/ai/barret.lua
  57. 0 0
      data/engine/scripts/ai/battle_attacks.lua
  58. 0 0
      data/engine/scripts/ai/cloud.lua
  59. 0 0
      data/engine/scripts/ai/enemy.xml
  60. 0 0
      data/engine/scripts/ai/grunt.lua
  61. 0 0
      data/engine/scripts/ai/guard_hound.lua
  62. 0 0
      data/engine/scripts/ai/guard_scorpion.lua
  63. 0 0
      data/engine/scripts/ai/hell_house.lua
  64. 0 0
      data/engine/scripts/ai/mono_drive.lua
  65. 0 0
      data/engine/scripts/ai/player.lua
  66. 0 0
      data/engine/scripts/ai/sweeper.lua
  67. 0 0
      data/engine/scripts/ai/test_pyramid.lua
  68. 0 0
      data/engine/scripts/battle/battle.lua
  69. 0 0
      data/engine/scripts/battle/battle_ai.lua
  70. 0 0
      data/engine/scripts/battle/battle_ai_vm.lua
  71. 2 2
      data/engine/scripts/battle/battle_camera.lua
  72. 2 2
      data/engine/scripts/battle/battle_ui.lua
  73. 1 1
      data/engine/scripts/battle/effect_camera.lua
  74. 1 1
      data/engine/scripts/battle/effect_mesh.lua
  75. 0 0
      data/engine/scripts/battle/effect_sprite.lua
  76. 0 0
      data/engine/scripts/core/character_abilities.lua
  77. 0 0
      data/engine/scripts/core/character_effects.lua
  78. 0 0
      data/engine/scripts/core/config.lua
  79. 0 0
      data/engine/scripts/core/data.lua
  80. 0 0
      data/engine/scripts/core/debug_data.lua
  81. 3 0
      data/engine/scripts/core/save.lua
  82. 0 0
      data/engine/scripts/core/system.lua
  83. 0 0
      data/engine/scripts/field/field.lua
  84. 0 0
      data/engine/scripts/menu/begin_menu.lua
  85. 1 1
      data/engine/scripts/menu/config_menu.lua
  86. 0 0
      data/engine/scripts/menu/equip_menu.lua
  87. 0 0
      data/engine/scripts/menu/exchange_menu.lua
  88. 0 0
      data/engine/scripts/menu/item_menu.lua
  89. 0 0
      data/engine/scripts/menu/limit_menu.lua
  90. 0 0
      data/engine/scripts/menu/magic_menu.lua
  91. 0 0
      data/engine/scripts/menu/main_menu.lua
  92. 0 0
      data/engine/scripts/menu/materia_menu.lua
  93. 0 0
      data/engine/scripts/menu/menu_helpers.lua
  94. 0 0
      data/engine/scripts/menu/menu_lib.lua
  95. 0 0
      data/engine/scripts/menu/name_menu.lua
  96. 0 0
      data/engine/scripts/menu/pause_menu.lua
  97. 0 0
      data/engine/scripts/menu/phs_menu.lua
  98. 0 0
      data/engine/scripts/menu/quit_menu.lua
  99. 0 0
      data/engine/scripts/menu/save_menu.lua
  100. 1 1
      data/engine/scripts/menu/shop_menu.lua

+ 2 - 2
.github/agents/ff7-format-researcher.agent.md

@@ -1,5 +1,5 @@
 ---
 ---
-description: "Use when researching how an FF7 binary file format works, how an existing parser/serializer in src/data implements it, or what the installer decompiler emits. Read-only investigation that returns findings with file references."
+description: "Use when researching how an FF7 binary file format works, how an existing parser/serializer in src/formats implements it, or what the installer decompiler emits. Read-only investigation that returns findings with file references."
 tools: [read, search]
 tools: [read, search]
 ---
 ---
 
 
@@ -15,7 +15,7 @@ You are a specialist at investigating FF7 binary formats in the V-Gears codebase
 ## Approach
 ## Approach
 
 
 1. Check the format documentation in [the FF7 wiki at wiki.ffrtt.ru](https://wiki.ffrtt.ru/index.php/FF7) and in the header comments of existing parsers first.
 1. Check the format documentation in [the FF7 wiki at wiki.ffrtt.ru](https://wiki.ffrtt.ru/index.php/FF7) and in the header comments of existing parsers first.
-2. Find the relevant parser triplet in `src/data/` (`*File`, `*FileSerializer`, `*FileManager`) and read the serializer for the authoritative byte layout.
+2. Find the relevant parser triplet in `src/formats/` (`*File`, `*FileSerializer`, `*FileManager`) and read the serializer for the authoritative byte layout.
 3. For installer/decompiler questions, read `src/installer/` and the matching instruction classes under `src/installer/decompiler/`.
 3. For installer/decompiler questions, read `src/installer/` and the matching instruction classes under `src/installer/decompiler/`.
 4. Cross-check with the test suite in `test/` — tests often show minimal usage examples.
 4. Cross-check with the test suite in `test/` — tests often show minimal usage examples.
 5. `_OLD/` contains legacy q-gears code useful as historical reference only; flag it as such if you use it.
 5. `_OLD/` contains legacy q-gears code useful as historical reference only; flag it as such if you use it.

+ 9 - 7
.github/copilot-instructions.md

@@ -10,15 +10,17 @@ V-Gears is a free, cross-platform reimplementation of the Final Fantasy VII engi
 
 
 ## Architecture
 ## Architecture
 
 
-- `src/common/` — application base class and file utilities shared by all targets.
-- `src/core/` — engine runtime: audio, console, entities, walkmesh, UI, particles, savemap, `ScriptManager` (Lua bindings via sol2 and system LuaJIT).
-- `src/data/` — FF7 binary format parsers (LGP, LZS, HRC, TEX, field files, worldmap TXZ...). Most formats follow a triplet: `*File` (data), `*FileSerializer` (read/write), `*FileManager` (Ogre resource loading).
-- `src/installer/` — Qt data installer (`v-gears-installer`); includes the script `decompiler/` that converts field/world scripts into Lua and the SfxDump audio converter.
-- `src/map/`, `src/modules/`, `src/viewer/` — field map code, game modules (e.g. worldmap), and the model viewer.
+- `src/app/` — the game entry point, the application class and the game loop.
+- `src/common/` — files, logger, strings, types and other utilities shared by all targets.
+- `src/formats/` — FF7 binary format parsers, by kind: `lgp/`, `field/`, `model/`, `texture/` and `worldmap/`. Most formats follow a triplet: `*File` (data), `*FileSerializer` (read/write), `*FileManager` (Ogre resource loading).
+- `src/engine/` — engine runtime, by subsystem: `audio/`, `config/`, `entity/`, `graphics/`, `input/`, `particles/`, `save/`, `script/` (`ScriptManager`, Lua bindings via sol2 and system LuaJIT), `ui/` and `xml/` (XML loaders).
+- `src/modules/` — game modules: `battle/` and `worldmap/`.
+- Layers, from low to high: `common/`, `formats/`, `engine/`, `modules/`, `app/`. A layer never includes a higher one: the engine reaches the application and the modules through its interfaces (`engine/*Interface.h`), and each module binds itself to Lua (`*Binds.cpp`).
+- `src/installer/` — Qt data installer (`v-gears-installer`): `gui/`, `cli/`, `steps/` (the installation process), `extractors/` (game data conversion), `formats/`, `support/`, `tables/` (data tables) and `decompiler/` (converts field and world scripts into Lua).
 - `src/third_party/sol/` — vendored sol2 single header. Do not restyle, modernize, or refactor it.
 - `src/third_party/sol/` — vendored sol2 single header. Do not restyle, modernize, or refactor it.
 - LuaJIT is a system dependency.
 - LuaJIT is a system dependency.
-- `test/` — Boost.Test suite mirroring `src/` paths; sources are listed manually in `test/CMakeLists.txt`.
-- `data/` — runtime configuration only (Ogre plugins/resources cfgs). Not game data.
+- `test/` — Boost.Test suite mirroring `src/` paths; each folder of `src/` and `test/` lists its sources by hand in its `CMakeLists.txt`.
+- `data/` — the files shipped with the game, copied to the installation directory: the Ogre plugins/resources cfgs, `engine/` (scripts, screens in `ui/`, fonts, texts, shaders, metadata) and `defaults/`. Not game data: the installer writes that to `game/` in the installation directory.
 - `doc/` — all guides. The original binary formats are documented in the header comments of the parsers and in [the FF7 wiki at wiki.ffrtt.ru](https://wiki.ffrtt.ru/index.php/FF7).
 - `doc/` — all guides. The original binary formats are documented in the header comments of the parsers and in [the FF7 wiki at wiki.ffrtt.ru](https://wiki.ffrtt.ru/index.php/FF7).
 - `_OLD/` — legacy q-gears code kept for reference. Do not modify or reuse without asking.
 - `_OLD/` — legacy q-gears code kept for reference. Do not modify or reuse without asking.
 
 

+ 5 - 5
.github/instructions/ff7-data-formats.instructions.md

@@ -1,23 +1,23 @@
 ---
 ---
 description: "Use when working on FF7 binary format parsers, serializers, resource managers, LGP/LZS archives, the data installer, or the script decompiler. Covers the File/Serializer/Manager triplet pattern and known installer gotchas."
 description: "Use when working on FF7 binary format parsers, serializers, resource managers, LGP/LZS archives, the data installer, or the script decompiler. Covers the File/Serializer/Manager triplet pattern and known installer gotchas."
-applyTo: ["src/data/**", "src/installer/**", "test/data/**", "test/installer/**"]
+applyTo: ["src/formats/**", "src/installer/**", "test/formats/**", "test/installer/**"]
 ---
 ---
 
 
 # FF7 Data Formats and Installer
 # FF7 Data Formats and Installer
 
 
 ## Parser Triplet Pattern
 ## Parser Triplet Pattern
 
 
-Most formats in `src/data/` follow this structure — mirror it when adding formats:
+Most formats in `src/formats/` follow this structure — mirror it when adding formats:
 
 
 - `XFile` — plain data container for the parsed format.
 - `XFile` — plain data container for the parsed format.
-- `XFileSerializer` — reads/writes the binary layout (derives from `VGearsSerializer`).
+- `XFileSerializer` — reads/writes the binary layout (derives from `Serializer` (`src/formats/Serializer.h`)).
 - `XFileManager` — Ogre `ResourceManager` integration (singleton + `Resource`).
 - `XFileManager` — Ogre `ResourceManager` integration (singleton + `Resource`).
 
 
-Format documentation lives in [the FF7 wiki at wiki.ffrtt.ru](https://wiki.ffrtt.ru/index.php/FF7) and in the header comments of the parsers. Check there and at existing similar parsers (e.g. `src/data/worldmap/TxzFile*`) before writing a new one.
+Format documentation lives in [the FF7 wiki at wiki.ffrtt.ru](https://wiki.ffrtt.ru/index.php/FF7) and in the header comments of the parsers. Check there and at existing similar parsers (e.g. `src/formats/worldmap/TxzFile*`) before writing a new one.
 
 
 ## Installer Gotchas (verified, don't regress)
 ## Installer Gotchas (verified, don't regress)
 
 
-- World map HRC loads must create meshes via `HRCFile::GetMeshFileName()` (i.e. `NameLookup::model(splitBase(hrc_name)) + ".mesh"`). Do NOT use `FF7Data::GetWorldMapModelName()` — that friendly-name table can diverge from the actual Ogre mesh resource name and triggers `FileNotFoundException` (e.g. `barrier.mesh`).
+- World map HRC loads must create meshes via `HRCFile::GetMeshFileName()` (i.e. `NameLookup::model(splitBase(hrc_name)) + ".mesh"`). Do NOT use a friendly-name table for the mesh names: it can diverge from the actual Ogre mesh resource name and triggers `FileNotFoundException` (e.g. `barrier.mesh`).
 - `WorldInstaller::ExportMesh()` expects a directory prefix, not a full filename prefix.
 - `WorldInstaller::ExportMesh()` expects a directory prefix, not a full filename prefix.
 - The decompiler (`src/installer/decompiler/`) emits Lua — keep output close to [doc/STYLE-LUA.md](../../../doc/STYLE-LUA.md), but it is exempt from strict conformance.
 - The decompiler (`src/installer/decompiler/`) emits Lua — keep output close to [doc/STYLE-LUA.md](../../../doc/STYLE-LUA.md), but it is exempt from strict conformance.
 - The installer is Qt-based and handles copyrighted game data at runtime on the user's machine: never write code that copies extracted assets into the repo or build tree.
 - The installer is Qt-based and handles copyrighted game data at runtime on the user's machine: never write code that copies extracted assets into the repo or build tree.

+ 3 - 3
.github/instructions/tests.instructions.md

@@ -1,13 +1,13 @@
 ---
 ---
-description: "Use when writing, adding, or fixing tests in the test/ directory. Covers Boost.Test conventions, registering test sources in test/CMakeLists.txt, and running the v-gears-tests suite."
+description: "Use when writing, adding, or fixing tests in the test/ directory. Covers Boost.Test conventions, registering test sources in the CMakeLists.txt of their folder, and running the v-gears-tests suite."
 applyTo: "test/**"
 applyTo: "test/**"
 ---
 ---
 
 
 # V-Gears Testing Conventions
 # V-Gears Testing Conventions
 
 
 - Tests use Boost.Test with dynamic linking (`BOOST_TEST_DYN_LINK`); the suite builds as the `v-gears-tests` target and is registered with CTest.
 - Tests use Boost.Test with dynamic linking (`BOOST_TEST_DYN_LINK`); the suite builds as the `v-gears-tests` target and is registered with CTest.
-- Test files mirror the path of the code under test (`test/data/VGearsLGPArchive.cpp` tests `src/data/VGearsLGPArchive.cpp`). Follow this existing convention for placement.
-- Every new test source file must be added manually to `SOURCE_FILES` in [test/CMakeLists.txt](../../test/CMakeLists.txt) — there is no globbing.
+- Test files mirror the path of the code under test (`test/formats/model/AFile.cpp` tests `src/formats/model/AFile.cpp`). Follow this existing convention for placement.
+- Every new test source file must be added manually to the `CMakeLists.txt` of its folder, with `vgears_tests()` (or `vgears_installer_tests()` for the tests of the installer logic) — there is no globbing. A new folder also needs an `add_subdirectory()` in its parent.
 - RTTI (`dynamic_cast`, `typeid`) is allowed in tests even though production code avoids it.
 - RTTI (`dynamic_cast`, `typeid`) is allowed in tests even though production code avoids it.
 - Never use original game data in tests. Construct binary fixtures in-code (byte buffers, temp files) instead.
 - Never use original game data in tests. Construct binary fixtures in-code (byte buffers, temp files) instead.
 
 

+ 3 - 3
.github/prompts/new-data-format.prompt.md

@@ -1,19 +1,19 @@
 ---
 ---
 description: "Scaffold a new FF7 data format parser (File/Serializer/Manager triplet) following project conventions"
 description: "Scaffold a new FF7 data format parser (File/Serializer/Manager triplet) following project conventions"
 agent: "agent"
 agent: "agent"
-argument-hint: "Format name and target directory, e.g. 'XYZ in src/data/worldmap'"
+argument-hint: "Format name and target directory, e.g. 'XYZ in src/formats/worldmap'"
 ---
 ---
 
 
 Scaffold a new FF7 binary format parser for the format named by the user:
 Scaffold a new FF7 binary format parser for the format named by the user:
 
 
 1. Research first:
 1. Research first:
    - Check [the FF7 wiki at wiki.ffrtt.ru](https://wiki.ffrtt.ru/index.php/FF7) for documentation of the format.
    - Check [the FF7 wiki at wiki.ffrtt.ru](https://wiki.ffrtt.ru/index.php/FF7) for documentation of the format.
-   - Read the most similar existing triplet in `src/data/` (e.g. `TxzFile.h/.cpp`, `TxzFileSerializer.h/.cpp`, `TxzFileManager.h/.cpp` in `src/data/worldmap/`) and mirror its structure, base classes, and Doxygen comment style exactly.
+   - Read the most similar existing triplet in `src/formats/` (e.g. `TxzFile.h/.cpp`, `TxzFileSerializer.h/.cpp` in `src/formats/worldmap/`) and mirror its structure, base classes, and Doxygen comment style exactly.
 2. Create the triplet in the requested directory:
 2. Create the triplet in the requested directory:
    - `XFile` — passive data container for the parsed format.
    - `XFile` — passive data container for the parsed format.
    - `XFileSerializer` — binary read/write, deriving from the same serializer base as its neighbors.
    - `XFileSerializer` — binary read/write, deriving from the same serializer base as its neighbors.
    - `XFileManager` — Ogre `ResourceManager` singleton integration, matching the existing pattern.
    - `XFileManager` — Ogre `ResourceManager` singleton integration, matching the existing pattern.
 3. Follow `doc/STYLE.md` strictly: C++14, `PascalCase` types, `snake_case` variables with trailing underscore for members, `#pragma once`, correct include order.
 3. Follow `doc/STYLE.md` strictly: C++14, `PascalCase` types, `snake_case` variables with trailing underscore for members, `#pragma once`, correct include order.
-4. Register the new sources in the appropriate `src/CMakeLists.txt` source list (no globbing — add them explicitly, in the same grouped style as neighboring entries).
+4. Register the new sources in the `CMakeLists.txt` of their folder, with `vgears_sources()` (no globbing — add them explicitly). A new folder also needs an `add_subdirectory()` in its parent.
 5. Do not add or reference original game data; document the binary layout in the header comments instead.
 5. Do not add or reference original game data; document the binary layout in the header comments instead.
 6. Build the affected target to verify it compiles.
 6. Build the affected target to verify it compiles.

+ 1 - 1
.github/prompts/test.prompt.md

@@ -11,6 +11,6 @@ Build and run the V-Gears test suite:
 2. Run the suite: `ctest --test-dir build --output-on-failure`.
 2. Run the suite: `ctest --test-dir build --output-on-failure`.
 3. For each failure, read the failing test and the code under test, fix the root cause, and rerun.
 3. For each failure, read the failing test and the code under test, fix the root cause, and rerun.
    - Tests use Boost.Test with dynamic linking.
    - Tests use Boost.Test with dynamic linking.
-   - New test sources must be registered manually in `test/CMakeLists.txt`.
+   - New test sources must be registered manually in the `CMakeLists.txt` of their folder (`vgears_tests()`).
    - Never use original game data in tests — build fixtures in code.
    - Never use original game data in tests — build fixtures in code.
 4. Report pass/fail counts and summarize what was fixed.
 4. Report pass/fail counts and summarize what was fixed.

+ 7 - 7
.gitignore

@@ -26,16 +26,16 @@ doc/FFVII/RAW/
 .directory
 .directory
 v-gears-new*.png
 v-gears-new*.png
 .vscode
 .vscode
-src/installer/MainWindow.ui.autosave
+src/installer/gui/MainWindow.ui.autosave
 
 
 # Generated from MainWindow.ui at build time.
 # Generated from MainWindow.ui at build time.
 src/installer/ui_MainWindow.h
 src/installer/ui_MainWindow.h
 
 
-# Built by the installer from the game data.
-data/data/fonts/ffvii_en.png
-data/data/fonts/ffvii_menu.png
-data/data/fonts/ffvii_digits.png
-data/data/fonts/ffvii_timer.png
-
 # Old decompiler tests, not built. Kept locally only, some fixtures are game data.
 # Old decompiler tests, not built. Kept locally only, some fixtures are game data.
 src/installer/decompiler/test/
 src/installer/decompiler/test/
+
+# Written by the game and the installer when they are run from the data folder.
+data/user/
+data/logs/
+data/game/
+data/temp/

+ 0 - 3
PlugIns/CMakeLists.txt

@@ -1,3 +0,0 @@
-set(PLUGIN_PREFIX Plugin_)
-
-add_subdirectory(Data)

+ 0 - 56
PlugIns/Data/CMakeLists.txt

@@ -1,56 +0,0 @@
-set(V-Gears_SOURCE_DIR ../../src)
-
-# Define header and source files for the library.
-set(HEADER_FILES
-    ${V-Gears_SOURCE_DIR}/VGearsPrerequisites.h
-    ${V-Gears_SOURCE_DIR}/common/VGearsManualObject.h
-    ${V-Gears_SOURCE_DIR}/common/VGearsStringUtil.h
-    ${V-Gears_SOURCE_DIR}/common/TypeDefine.h
-    include/VGearsDataPlugin.h
-)
-set(SOURCE_FILES
-    ${V-Gears_SOURCE_DIR}/common/VGearsManualObject.cpp
-    ${V-Gears_SOURCE_DIR}/common/VGearsStringUtil.cpp
-    ${V-Gears_SOURCE_DIR}/common/TypeDefine.cpp
-    src/VGearsDataPlugin.cpp
-    src/VGearsDataPluginDll.cpp
-)
-
-include_directories(
-    ${OIS_INCLUDE_DIRS}
-    ${OGRE_INCLUDE_DIRS}
-    ${OGRE_SAMPLES_INCLUDEPATH}
-    ${V-Gears_SOURCE_DIR}
-    ${CMAKE_CURRENT_SOURCE_DIR}/include
-    ${CMAKE_CURRENT_SOURCE_DIR}/../../lib
-)
-
-# Defines.
-#add_definitions(-DBOOST_ALL_DYN_LINK)
-
-add_library(DataPlugin MODULE
-    ${HEADER_FILES}
-    ${SOURCE_FILES}
-)
-SET_PROPERTY(TARGET DataPlugin PROPERTY FOLDER "v-gears")
-
-set_target_properties(DataPlugin PROPERTIES
-    PREFIX ${PLUGIN_PREFIX}
-    OUTPUT_NAME Data
-)
-
-set(LIBRARIES
-    ${OGRE_LIBRARIES}
-    v-gears-data
-)
-
-target_link_libraries(DataPlugin ${LIBRARIES})
-
-if(NOT VGEARS_STATIC)
-    set_target_properties(DataPlugin PROPERTIES COMPILE_DEFINITIONS VGEARS_DATAPLUGIN_EXPORTS)
-    if(WIN32 OR APPLE)
-        install(TARGETS DataPlugin LIBRARY DESTINATION .)
-    else()
-        install(TARGETS DataPlugin LIBRARY DESTINATION ./lib/v-gears/plugins/ )
-    endif()
-endif()

+ 0 - 96
PlugIns/Data/include/VGearsDataPlugin.h

@@ -1,96 +0,0 @@
-/*
- * Copyright (C) 2022 The V-Gears Team
- *
- * This file is part of V-Gears
- *
- * V-Gears is free software: you can redistribute it and/or modify it under
- * terms of the GNU General Public License as published by the Free Software
- * Foundation, version 3.0 (GPLv3) of the License.
- *
- * V-Gears is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#pragma once
-
-#include <Ogre/OgrePlugin.h>
-
-#include "data/VGearsBackgroundFileManager.h"
-#include "data/VGearsPaletteFileManager.h"
-#include "data/VGearsPFileManager.h"
-#include "data/VGearsHRCFileManager.h"
-#include "data/VGearsRSDFileManager.h"
-#include "data/VGearsTexCodec.h"
-
-namespace VGears {
-
-    /**
-     * Plugin instance for various FFVII Data Formats
-     */
-    class DataPlugin : public Ogre::Plugin{
-
-        public:
-
-            DataPlugin();
-
-            /**
-             * Retrieves the name fo the plugin.
-             */
-            const Ogre::String& getName() const;
-
-            /**
-             * Perform the plugin initial installation sequence.
-             */
-            void install();
-
-            /**
-             * Perform any tasks the plugin needs on system initialization.
-             */
-            void initialise();
-
-            /**
-             * Perform any tasks the plugin needs on system shut down.
-             */
-            void shutdown();
-
-            /**
-             * Perform the final plugin uninstallation sequence.
-             */
-            void uninstall();
-
-            /**
-             * The plugin name.
-             */
-            static const Ogre::String ms_plugin_name;
-
-        private:
-
-            /**
-             * The .P file manager.
-             */
-            PFileManager *p_manager_;
-
-            /**
-             * The HRC file manager.
-             */
-            HRCFileManager *hrc_manager_;
-
-            /**
-             * The RSD file manager.
-             */
-            RSDFileManager *rsd_manager_;
-
-            /**
-             * The palette file manager.
-             */
-            PaletteFileManager *palette_manager_;
-
-            /**
-             * The background file manager.
-             */
-            BackgroundFileManager *background_manager_;
-
-    };
-}

+ 0 - 4
PlugIns/Data/misc/VGearsData.def

@@ -1,4 +0,0 @@
-LIBRARY Plugin_Data
-EXPORTS	
-	dllStartPlugin
-	dllStopPlugin

+ 0 - 52
PlugIns/Data/src/VGearsDataPlugin.cpp

@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2022 The V-Gears Team
- *
- * This file is part of V-Gears
- *
- * V-Gears is free software: you can redistribute it and/or modify it under
- * terms of the GNU General Public License as published by the Free Software
- * Foundation, version 3.0 (GPLv3) of the License.
- *
- * V-Gears is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include "VGearsDataPlugin.h"
-#include "data/VGearsTexCodec.h"
-
-using Ogre::String;
-
-namespace VGears {
-
-    const String DataPlugin::ms_plugin_name(
-      "Plugin for Various FFVII File Formats"
-    );
-
-    DataPlugin::DataPlugin(){}
-
-    const String& DataPlugin::getName() const{return ms_plugin_name;}
-
-    void DataPlugin::install(){TexCodec::install();}
-
-    void DataPlugin::initialise(){
-        TexCodec::initialise();
-        p_manager_           = new PFileManager();
-        hrc_manager_         = new HRCFileManager();
-        rsd_manager_         = new RSDFileManager();
-        //palette_manager_     = new PaletteFileManager();
-        //background_manager_  = new BackgroundFileManager();
-    }
-
-    void DataPlugin::shutdown(){
-        TexCodec::shutdown();
-        delete p_manager_;
-        delete hrc_manager_;
-        delete rsd_manager_;
-        //delete palette_manager_;
-        //delete background_manager_;
-    }
-
-    void DataPlugin::uninstall(){TexCodec::uninstall();}
-}

+ 0 - 37
PlugIns/Data/src/VGearsDataPluginDll.cpp

@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2022 The V-Gears Team
- *
- * This file is part of V-Gears
- *
- * V-Gears is free software: you can redistribute it and/or modify it under
- * terms of the GNU General Public License as published by the Free Software
- * Foundation, version 3.0 (GPLv3) of the License.
- *
- * V-Gears is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <Ogre/OgreRoot.h>
-#include "VGearsDataPlugin.h"
-
-#ifndef VGEARS_STATIC_LIB
-
-namespace VGears{
-
-    DataPlugin* data_plugin(NULL);
-
-    extern "C" void _VGearsExport dllStartPlugin( void ){
-        data_plugin = new DataPlugin();
-        // Register.
-        Ogre::Root::getSingleton().installPlugin(data_plugin);
-    }
-    extern "C" void _VGearsExport dllStopPlugin( void ){
-        Ogre::Root::getSingleton().uninstallPlugin(data_plugin);
-        delete data_plugin;
-        data_plugin = NULL;
-    }
-}
-
-#endif

+ 0 - 143
PlugIns/Data/test/tex_file_info.cpp

@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2022 The V-Gears Team
- *
- * This file is part of V-Gears
- *
- * V-Gears is free software: you can redistribute it and/or modify it under
- * terms of the GNU General Public License as published by the Free Software
- * Foundation, version 3.0 (GPLv3) of the License.
- *
- * V-Gears is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <algorithm>
-#include <cstdio>
-#include <boost/algorithm/string/predicate.hpp>
-#include <boost/filesystem.hpp>
-#include <boost/filesystem/fstream.hpp>
-#include <boost/program_options.hpp>
-#include <Ogre/OgreDataStream.h>
-#include "data/VGearsTexFile.h"
-
-using std::back_inserter;
-using std::copy;
-using std::cout;
-using std::ifstream;
-using std::endl;
-using std::vector;
-using std::string;
-
-namespace bfs = boost::filesystem;
-namespace bpo = boost::program_options;
-
-void pintFileInfo(const bfs::path &tex_path){
-    cout << endl << "TX Image File Info"
-      << endl << " filename: " << tex_path.filename().string();
-    bfs::ifstream *ifs(OGRE_NEW_T(bfs::ifstream, Ogre::MEMCATEGORY_GENERAL)(tex_path, bfs::ifstream::binary));
-    Ogre::FileStreamDataStream *stream(OGRE_NEW Ogre::FileStreamDataStream(ifs));
-    Ogre::DataStreamPtr input(stream);
-    VGears::TexFile tex;
-    tex.readHeader(input);
-    cout << endl << " size: "
-      << tex.m_header.image_data.width
-      << "x" << tex.m_header.image_data.height
-      << "x" << tex.m_header.image_data.bit_depth
-      << endl << " pitch: " << tex.m_header.image_data.pitch
-      << endl << " color_key_flag: " << tex.m_header.color_key_flag
-      << endl << "Palette:"
-      << endl << " type              : " << tex.m_header.palette_type
-      << endl << " count             : " << tex.m_header.palette_count
-      << endl << " index_bits        : "
-      << tex.m_header.palette_data.index_bits
-      << endl << " flag              : " << tex.m_header.palette_data.flag
-      << endl << " total_color_count : "
-      << tex.m_header.palette_total_color_count
-      << endl << " total_color_count : "
-      << tex.m_header.palette_data.total_color_count
-      << endl << " colors_per_palette: "
-      << tex.m_header.palette_data.colors_per_palette
-      << endl << " unknown_CC        : " << tex.m_header.unknown_0xCC;
-    if (tex.m_header.palette_data.flag){
-        cout << endl
-          << " mask_red   : " << tex.m_header.pixel_format.bit_mask.red
-          << endl << " mask_green : "
-          << tex.m_header.pixel_format.bit_mask.green
-          << endl << " mask_blue  : " << tex.m_header.pixel_format.bit_mask.blue
-          << endl << " mask_alpha : "
-          << tex.m_header.pixel_format.bit_mask.alpha;
-    }
-    cout << endl;
-}
-
-int main(int ac, char *av[]){
-    const char* PO_HELP("help");
-    const char* PO_INPUT_PATHS("input-paths");
-    const string TEX_EXT(".tex");
-
-    typedef vector<bfs::path> t_InputPaths;
-
-    try {
-        bpo::options_description generic("Generic options");
-        generic.add_options()
-            (PO_HELP, "produce help message")
-            ;
-
-        // Hidden options, will be allowed both on command line and
-        // in config file, but will not be shown to the user.
-        bpo::options_description hidden("Hidden options");
-        hidden.add_options()
-            (PO_INPUT_PATHS, bpo::value< t_InputPaths >()->required(), "input paths to files or directories")
-            ;
-
-        bpo::positional_options_description p;
-        p.add(PO_INPUT_PATHS, -1);
-
-        bpo::options_description cmdline_options;
-        cmdline_options.add(generic).add(hidden);
-        bpo::variables_map vm;
-        bpo::store(bpo::command_line_parser(ac, av).options(cmdline_options).positional(p).run(), vm);
-
-        if (vm.count(PO_HELP)){
-            bfs::path self(av[0]);
-            cout << "Usage: " << self.stem().string() << " [options] file|path...\n";
-            cout << generic << "\n";
-            return 0;
-        }
-
-        bpo::notify(vm);
-
-        if (vm.count(PO_INPUT_PATHS)){
-            t_InputPaths input(vm[ PO_INPUT_PATHS ].as< t_InputPaths >());
-            t_InputPaths paths;
-
-            for (t_InputPaths::const_iterator it(input.begin()); it != input.end(); ++it){
-                if(bfs::exists(*it)){
-                    if(bfs::is_directory(*it)){
-                        copy(bfs::recursive_directory_iterator(*it), bfs::recursive_directory_iterator(), back_inserter(paths));
-                    }
-                    else{
-                        paths.push_back(*it);
-                    }
-                }
-            }
-
-            for (t_InputPaths::const_iterator it(paths.begin()); it != paths.end(); ++it){
-                if(bfs::is_regular_file(*it)){
-                    string ext(it->extension().string());
-                    if(boost::iequals(ext, TEX_EXT)){
-                        pintFileInfo(*it);
-                    }
-                }
-            }
-        }
-
-    }
-    catch(const bfs::filesystem_error& e){
-        cout << e.what() << endl;
-        return 1;
-    }
-    return 0;
-}

+ 0 - 170
PlugIns/Data/test/tex_file_test.cpp

@@ -1,170 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-07-31 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-
-#include <fstream>
-
-#include <Ogre/OgreDataStream.h>
-
-#include "data/VGearsTexFile.h"
-
-#define BOOST_TEST_MODULE VGearsTexFile
-#include <boost/test/unit_test.hpp>
-
-BOOST_AUTO_TEST_CASE( header_size )
-{
-    BOOST_CHECK_EQUAL( 0x18, sizeof( VGears::TexFile::BitData     ) );
-    BOOST_CHECK_EQUAL( 0x10, sizeof( VGears::TexFile::ImageData   ) );
-    BOOST_CHECK_EQUAL( 0x14, sizeof( VGears::TexFile::PaletteData ) );
-    BOOST_CHECK_EQUAL( 0x10, sizeof( VGears::TexFile::RGBAData    ) );
-    BOOST_CHECK_EQUAL( 0x58, sizeof( VGears::TexFile::PixelFormat ) );
-    BOOST_CHECK_EQUAL( 0xEC, sizeof( VGears::TexFile::Header      ) );
-
-    VGears::TexFile::Header header;
-    BOOST_CHECK_EQUAL( sizeof( VGears::TexFile::Header ), sizeof( header ) );
-}
-
-BOOST_AUTO_TEST_CASE( bit_data_offset )
-{
-    BOOST_CHECK_EQUAL( 0x00, offsetof( VGears::TexFile::BitData, color_min ) );
-    BOOST_CHECK_EQUAL( 0x04, offsetof( VGears::TexFile::BitData, color_max ) );
-    BOOST_CHECK_EQUAL( 0x08, offsetof( VGears::TexFile::BitData, alpha_min ) );
-    BOOST_CHECK_EQUAL( 0x0C, offsetof( VGears::TexFile::BitData, alpha_max ) );
-    BOOST_CHECK_EQUAL( 0x10, offsetof( VGears::TexFile::BitData, pixel_min ) );
-    BOOST_CHECK_EQUAL( 0x14, offsetof( VGears::TexFile::BitData, pixel_max ) );
-}
-
-BOOST_AUTO_TEST_CASE( palette_data_offset )
-{
-    BOOST_CHECK_EQUAL( 0x00, offsetof( VGears::TexFile::PaletteData, flag        ) );
-    BOOST_CHECK_EQUAL( 0x04, offsetof( VGears::TexFile::PaletteData, index_bits  ) );
-    BOOST_CHECK_EQUAL( 0x08, offsetof( VGears::TexFile::PaletteData, index_8bit  ) );
-    BOOST_CHECK_EQUAL( 0x0C, offsetof( VGears::TexFile::PaletteData, total_color_count ) );
-    BOOST_CHECK_EQUAL( 0x10, offsetof( VGears::TexFile::PaletteData, colors_per_palette ) );
-}
-
-BOOST_AUTO_TEST_CASE( image_data_offset )
-{
-    BOOST_CHECK_EQUAL( 0x0, offsetof( VGears::TexFile::ImageData, bit_depth  ) );
-    BOOST_CHECK_EQUAL( 0x4, offsetof( VGears::TexFile::ImageData, width  ) );
-    BOOST_CHECK_EQUAL( 0x8, offsetof( VGears::TexFile::ImageData, height ) );
-    BOOST_CHECK_EQUAL( 0xC, offsetof( VGears::TexFile::ImageData, pitch  ) );
-}
-
-BOOST_AUTO_TEST_CASE( rgba_data_offset )
-{
-    BOOST_CHECK_EQUAL( 0x0, offsetof( VGears::TexFile::RGBAData, red   ) );
-    BOOST_CHECK_EQUAL( 0x4, offsetof( VGears::TexFile::RGBAData, green ) );
-    BOOST_CHECK_EQUAL( 0x8, offsetof( VGears::TexFile::RGBAData, blue  ) );
-    BOOST_CHECK_EQUAL( 0xC, offsetof( VGears::TexFile::RGBAData, alpha ) );
-}
-
-BOOST_AUTO_TEST_CASE( pixel_format_offset )
-{
-    BOOST_CHECK_EQUAL( 0x00, offsetof( VGears::TexFile::PixelFormat, bits_per_pixel   ) );
-    BOOST_CHECK_EQUAL( 0x04, offsetof( VGears::TexFile::PixelFormat, bytes_per_pixel  ) );
-    BOOST_CHECK_EQUAL( 0x08, offsetof( VGears::TexFile::PixelFormat, bit_count        ) );
-    BOOST_CHECK_EQUAL( 0x18, offsetof( VGears::TexFile::PixelFormat, bit_mask         ) );
-    BOOST_CHECK_EQUAL( 0x28, offsetof( VGears::TexFile::PixelFormat, bit_shift        ) );
-    BOOST_CHECK_EQUAL( 0x38, offsetof( VGears::TexFile::PixelFormat, bit_count_unused ) );
-    BOOST_CHECK_EQUAL( 0x48, offsetof( VGears::TexFile::PixelFormat, shades           ) );
-}
-
-BOOST_AUTO_TEST_CASE( header_offset )
-{
-    BOOST_CHECK_EQUAL( 0x00, offsetof( VGears::TexFile::Header, version              ) );
-    BOOST_CHECK_EQUAL( 0x08, offsetof( VGears::TexFile::Header, color_key_flag       ) );
-    BOOST_CHECK_EQUAL( 0x14, offsetof( VGears::TexFile::Header, bit_data             ) );
-    BOOST_CHECK_EQUAL( 0x30, offsetof( VGears::TexFile::Header, palette_count        ) );
-    BOOST_CHECK_EQUAL( 0x34, offsetof( VGears::TexFile::Header, palette_total_color_count  ) );
-    BOOST_CHECK_EQUAL( 0x38, offsetof( VGears::TexFile::Header, image_data           ) );
-    BOOST_CHECK_EQUAL( 0x4C, offsetof( VGears::TexFile::Header, palette_data         ) );
-    BOOST_CHECK_EQUAL( 0x64, offsetof( VGears::TexFile::Header, pixel_format         ) );
-    BOOST_CHECK_EQUAL( 0xBC, offsetof( VGears::TexFile::Header, color_key_array_flag ) );
-    BOOST_CHECK_EQUAL( 0xC4, offsetof( VGears::TexFile::Header, reference_alpha      ) );
-    BOOST_CHECK_EQUAL( 0xCC, offsetof( VGears::TexFile::Header, unknown_0xCC         ) );
-}
-
-BOOST_AUTO_TEST_CASE( color_offset )
-{
-    BOOST_CHECK_EQUAL( 0x0, offsetof( VGears::TexFile::Color, all        ) );
-    BOOST_CHECK_EQUAL( 0x0, offsetof( VGears::TexFile::Color, comp       ) );
-    BOOST_CHECK_EQUAL( 0x3, offsetof( VGears::TexFile::Color, comp.alpha ) );
-    BOOST_CHECK_EQUAL( 0x2, offsetof( VGears::TexFile::Color, comp.red   ) );
-    BOOST_CHECK_EQUAL( 0x1, offsetof( VGears::TexFile::Color, comp.green ) );
-    BOOST_CHECK_EQUAL( 0x0, offsetof( VGears::TexFile::Color, comp.blue  ) );
-}
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    const char* file_name( "../../../../output/data_orig/menu/menu_gm/barre.tex" );
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-    Ogre::FileStreamDataStream *stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    Ogre::DataStreamPtr input( stream );
-
-    BOOST_REQUIRE( input->isReadable() );
-
-    VGears::TexFile tex;
-    tex.read( input );
-
-    BOOST_CHECK_EQUAL( 0x80, tex.m_header.image_data.width );
-    BOOST_CHECK_EQUAL( 0x80, tex.m_header.image_data.height );
-    BOOST_CHECK_EQUAL(    8, tex.m_header.image_data.bit_depth );
-
-    BOOST_CHECK_EQUAL(     1, tex.m_header.palette_count );
-    BOOST_CHECK_EQUAL(     1, tex.m_header.palette_data.flag );
-    BOOST_CHECK_EQUAL( 0x100, tex.m_header.palette_data.total_color_count );
-    BOOST_CHECK_EQUAL( 0x80 * 0x80, tex.m_image_data.size() );
-
-    for( size_t i(0); i < 39; ++i )
-    {
-        BOOST_TEST_MESSAGE( "checking color i: " << i );
-        BOOST_CHECK_EQUAL( 0xFFFFFFFF, tex.m_image_data[i].all );
-    }
-    BOOST_CHECK_EQUAL( 0xFFF6FFF6, tex.m_image_data[39].all );
-    BOOST_CHECK_EQUAL( 0xF6, tex.m_image_data[39].comp.red );
-    BOOST_CHECK_EQUAL( 0xFF, tex.m_image_data[39].comp.green );
-    BOOST_CHECK_EQUAL( 0xF6, tex.m_image_data[39].comp.blue );
-    BOOST_CHECK_EQUAL( 0xFF, tex.m_image_data[39].comp.alpha );
-
-    BOOST_CHECK_EQUAL( 0x7B, tex.m_image_data[40].comp.red );
-    BOOST_CHECK_EQUAL( 0xA4, tex.m_image_data[40].comp.green );
-    BOOST_CHECK_EQUAL( 0xA4, tex.m_image_data[40].comp.blue );
-    BOOST_CHECK_EQUAL( 0xFF, tex.m_image_data[40].comp.alpha );
-
-
-	Ogre::MemoryDataStreamPtr pixel_data( tex.getPixelData() );
-    BOOST_CHECK_EQUAL( tex.m_image_data.size() * 4, pixel_data->size() );
-
-	Ogre::SharedPtr<Ogre::ImageCodec::ImageData> img_data( tex.getImageData() );
-    BOOST_CHECK_EQUAL( img_data->width , tex.m_header.image_data.width );
-    BOOST_CHECK_EQUAL( img_data->height, tex.m_header.image_data.height );
-    BOOST_CHECK_EQUAL( Ogre::PF_A8R8G8B8, img_data->format );
-    BOOST_CHECK_EQUAL( 1, img_data->depth );
-    BOOST_CHECK_EQUAL( 0, img_data->flags );
-    BOOST_CHECK_EQUAL( 0, img_data->num_mipmaps );
-    BOOST_CHECK_EQUAL( pixel_data->size(), img_data->size );
-}

+ 0 - 6
data/data/audio/musics/README.txt

@@ -1,6 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, musics files will be installed here. They will have very
-un-descriptive file names, and there is no metadata in them, such as titles. But, if you want to
-find a specific one, a look at the file _musics.xml (also generated by the installer) may help
-you. There, some files in this folder may be referenced by a friendlier name.

+ 0 - 6
data/data/audio/sounds/README.txt

@@ -1,6 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, sound files will be installed here. They will have very
-un-descriptive file names, and there is no metadata in them, such as titles. But, if you want to
-find a specific one, a look at the file _sounds.xml (also generated by the installer) may help
-you. There, some files in this folder may be referenced by a friendlier name.

+ 0 - 4
data/data/fields/README.txt

@@ -1,4 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, every field file will be installed here, grouped by field
-name. Field descriptions, backgrounds, walkeshes and scripts will be generated.

+ 0 - 6
data/data/gamedata/README.txt

@@ -1,6 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, several Lua scripts with static game data will be
-installed here. Those scripts only define game constants and settings, and are not to be written
-during a normal playthrough. If you are a modder, those scripts are a good place to start.
-

+ 0 - 7
data/data/images/characters/README.txt

@@ -1,7 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, character portraits will be installed here, named after
-the character IDs. If you are a modder, it's perfectly fine to edit them as you see fit, but try
-to keep their aspect ratio. If changed, menu screens, and probably some other things, will need to
-be revised.
-

+ 0 - 5
data/data/images/fonts/README.txt

@@ -1,5 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, images with game fonts will be installed here. As of the
-time of writting this, they are not used for anything.
-

+ 0 - 6
data/data/images/icons/README.txt

@@ -1,6 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, several icons used in the game will be installed here
-If you are a modder, it's perfectly fine to edit them as you see fit, but try to keep their size
-and names intact. If changed, menu screens, and probably some other things, will need to be
-revised.

+ 0 - 6
data/data/images/other/README.txt

@@ -1,6 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, several images used in the game will be installed here
-If you are a modder, it's perfectly fine to edit them as you see fit, but try to keep their size
-and names intact. If changed, menu screens, and probably some other things, will need to be
-revised.

+ 0 - 4
data/data/images/reels/README.txt

@@ -1,4 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, several icons used in the game reels will be installed
-here. As of the time of this writting, they are not used for anything.

+ 0 - 6
data/data/images/window/README.txt

@@ -1,6 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, several images used for window decorations will be
-installed here. If you are a modder, it's perfectly fine to edit them as you see fit, but try to
-keep their size and names intact. If changed, menu screens, and probably some other things, will
-need to be revised.

+ 0 - 10
data/data/models/battle/characters/README.txt

@@ -1,10 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, a lot of files will be installed here. They contain
-information about 3D models and textures for the battle playable characters. Most of them will have
-very cryptic names. If you are a modder and want to manually edit the 3D models, I have a few
-pointers for you:
-
- 1. Good luck.
- 2. Make backups.
- 3. Document everything! If you are succesfull, I would love to know how you did it.

+ 0 - 10
data/data/models/battle/enemies/README.txt

@@ -1,10 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, a lot of files will be installed here. They contain
-information about 3D models and textures for the battle enemies. Most of them will have very
-cryptic names. If you are a modder and want to manually edit the 3D models, I have a few pointers
-for you:
-
- 1. Good luck.
- 2. Make backups.
- 3. Document everything! If you are succesfull, I would love to know how you did it.

+ 0 - 9
data/data/models/battle/scenes/README.txt

@@ -1,9 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, a lot of files will be installed here. They contain
-information about 3D battle backgrounds models and textures. Most of them will have very cryptic
-names. If you are a modder and want to manually edit the 3D models, I have a few pointers for you:
-
- 1. Good luck.
- 2. Make backups.
- 3. Document everything! If you are succesfull, I would love to know how you did it.

+ 0 - 9
data/data/models/fields/README.txt

@@ -1,9 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, a lot of files will be installed here. They contain
-information about 3D models and textures. Most of them will have very cryptic names. If you are a
-modder and want to manually edit the 3D models, I have a few pointers for you:
-
- 1. Good luck.
- 2. Make backups.
- 3. Document everything! If you are succesfull, I would love to know how you did it.

+ 0 - 3
data/data/models/world/characters/README.txt

@@ -1,3 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, the 3D world map files will be installed here.

+ 0 - 3
data/data/models/world/locations/README.txt

@@ -1,3 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, the 3D world map files will be installed here.

+ 0 - 3
data/data/models/world/other/README.txt

@@ -1,3 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, the 3D world map files will be installed here.

+ 0 - 3
data/data/models/world/terrain/README.txt

@@ -1,3 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, the 3D world map files will be installed here.

+ 0 - 3
data/data/models/world/vehicles/README.txt

@@ -1,3 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, the 3D world map files will be installed here.

+ 0 - 2
data/data/screens/README.txt

@@ -1,2 +0,0 @@
-This folder contains the definition for every static screen in the game, be it menus, dialog
-windows...

+ 0 - 41
data/data/screens/_screens.xml

@@ -1,41 +0,0 @@
-<ui>
-    <!-- Main prototypes -->
-    <prototype file_name="screens/prototypes.xml" />
-
-    <!-- Dialogs, under the menus: a message that stays open while a menu is used must not hide it. -->
-    <prototype file_name="screens/dialog/prototypes.xml" />
-    <screen file_name="screens/dialog/dialog.xml" />
-
-    <!-- Menu screens -->
-    <screen file_name="screens/begin_menu/begin_menu.xml" />
-    <prototype file_name="screens/main_menu/prototypes.xml" />
-    <screen file_name="screens/main_menu/main_menu.xml" />
-    <screen file_name="screens/pause_menu/pause_menu.xml" />
-    <screen file_name="screens/item_menu/item_menu.xml" />
-    <screen file_name="screens/equip_menu/equip_menu.xml" />
-    <screen file_name="screens/materia_menu/materia_menu.xml" />
-    <screen file_name="screens/status_menu/status_menu.xml" />
-    <screen file_name="screens/magic_menu/magic_menu.xml" />
-    <screen file_name="screens/limit_menu/limit_menu.xml" />
-    <screen file_name="screens/quit_menu/quit_menu.xml" />
-    <screen file_name="screens/phs_menu/phs_menu.xml" />
-    <screen file_name="screens/config_menu/config_menu.xml" />
-    <screen file_name="screens/name_menu/name_menu.xml" />
-    <screen file_name="screens/save_menu/save_menu.xml" />
-    <screen file_name="screens/shop_menu/shop_menu.xml" />
-    <screen file_name="screens/exchange_menu/exchange_menu.xml" />
-    <prototype file_name="screens/save_menu/prototypes.xml" />
-    <!-- Battle UI -->
-    <prototype file_name="screens/battle/prototypes.xml" />
-    <screen file_name="screens/battle/battle.xml" />
-    <screen file_name="screens/battle/battle_fx.xml" />
-
-    <!-- Game over screen -->
-    <screen file_name="screens/game_over/game_over.xml" />
-
-    <!-- Fade effect for map changer -->
-    <screen file_name="screens/fade/fade.xml" />
-
-    <!-- Prototypes for textarea sprites -->
-    <prototype file_name="screens/textarea.xml" />
-</ui>

+ 0 - 1
data/data/scripts/README.txt

@@ -1 +0,0 @@
-This folders contains the scripts that make the game work.

+ 0 - 53
data/data/scripts/_scripts.xml

@@ -1,53 +0,0 @@
-<scripts>
-    <script file="scripts/config.lua" />
-    <script file="scripts/data.lua" />
-    <script file="scripts/battle.lua" />
-    <script file="gamedata/accessories.lua" />
-    <script file="gamedata/armors.lua" />
-    <script file="gamedata/attacks.lua" />
-    <script file="gamedata/characters.lua" />
-    <script file="gamedata/commands.lua" />
-    <script file="gamedata/battle_cameras.lua" />
-    <script file="gamedata/effect_cameras.lua" />
-    <script file="gamedata/effect_meshes.lua" />
-    <script file="gamedata/effect_animations.lua" />
-    <script file="gamedata/effect_sprites.lua" />
-    <script file="gamedata/growth.lua" />
-    <script file="gamedata/items.lua" />
-    <script file="gamedata/key_items.lua" />
-    <script file="gamedata/materia.lua" />
-    <script file="gamedata/shops.lua" />
-    <script file="gamedata/summons.lua" />
-    <script file="gamedata/weapons.lua" />
-
-    <script file="scripts/system.lua" />
-    <script file="scripts/character_effects.lua" />
-    <script file="scripts/character_abilities.lua" />
-    <script file="scripts/save.lua" />
-
-    <!-- TODO: Don't always parse initial savemap when loading is implemented. -->
-    <script file="gamedata/initial_savemap.lua" />
-
-    <script file="scripts/field.lua" />
-    <script file="scripts/worldmap/triangle_triggers.lua" />
-    <script file="scripts/worldmap/vehicles.lua" />
-    <script file="scripts/worldmap/world_model_table.lua" />
-    <script file="scripts/worldmap/world_settings.lua" />
-    <script file="scripts/worldmap/world_music.lua" />
-    <script file="scripts/worldmap/world_vm.lua" />
-    <script file="scripts/worldmap/script_stubs.lua" />
-    <script file="scripts/battle_ai.lua" />
-    <script file="scripts/battle/battle_ai_vm.lua" />
-    <script file="scripts/battle/battle_camera.lua" />
-    <script file="scripts/battle/effect_camera.lua" />
-    <script file="scripts/battle/effect_mesh.lua" />
-    <script file="scripts/battle/effect_sprite.lua" />
-    <script file="scripts/menu/menu_helpers.lua" />
-    <script file="scripts/menu/menu_lib.lua" />
-
-    <!-- TODO: Debugging pourposes only -->
-    <script file="scripts/debug_data.lua" />
-
-    <system_script name="MapChanger" />
-    <system_script name="WorldMap" />
-</scripts>

+ 0 - 1
data/data/system/README.txt

@@ -1 +0,0 @@
-This directory contains a few files required to make the engine work.

+ 0 - 2
data/data/texts/README.txt

@@ -1,2 +0,0 @@
-This folder contains the game static texts. As of the time of this writting, only the english
-language is actively maintained.

+ 0 - 11
data/data/texts/_texts.xml

@@ -1,11 +0,0 @@
-<texts>
-    <language name="english">
-        <text file="texts/english/menu.xml" />
-    </language>
-    <language name="japanese">
-        <text file="texts/japanese/menu.xml" />
-    </language>
-    <language name="russian">
-        <text file="texts/russian/menu.xml" />
-    </language>
-</texts>

+ 0 - 5
data/data/texts/japanese/menu.xml

@@ -1,5 +0,0 @@
-<texts>
-    <!-- Menu (1000-1999) -->
-    <text id="1000">NEW GAME</text>
-    <text id="1001">つづきから</text>
-</texts>

+ 0 - 5
data/data/texts/russian/menu.xml

@@ -1,5 +0,0 @@
-<texts>
-    <!-- Menu (1000-1999) -->
-    <text id="1000">НОВАЯ ИГРА</text>
-    <text id="1001">Продолжить?</text>
-</texts>

+ 0 - 3
data/data/world/README.txt

@@ -1,3 +0,0 @@
-This directory is intentionally empty. It will be populated by the data installer.
-
-Once the data installation is complete, the 3D world map files will be installed here.

+ 0 - 0
data/data/config/config.cfg → data/defaults/config.cfg


+ 0 - 0
data/data/fonts/_fonts.xml → data/engine/fonts/_fonts.xml


+ 0 - 0
data/data/fonts/ffvii_digits.xml → data/engine/fonts/ffvii_digits.xml


+ 0 - 0
data/data/fonts/ffvii_en.xml → data/engine/fonts/ffvii_en.xml


+ 0 - 0
data/data/fonts/ffvii_menu.xml → data/engine/fonts/ffvii_menu.xml


+ 0 - 0
data/data/fonts/ffvii_timer.xml → data/engine/fonts/ffvii_timer.xml


+ 0 - 0
data/data/images/empty.png → data/engine/images/empty.png


+ 0 - 0
data/data/images/system/blank.png → data/engine/images/system/blank.png


+ 0 - 0
data/field_models_and_animation_metadata.xml → data/engine/metadata/field_models_and_animation_metadata.xml


+ 53 - 0
data/engine/scripts/_scripts.xml

@@ -0,0 +1,53 @@
+<scripts>
+    <script file="engine/scripts/core/config.lua" />
+    <script file="engine/scripts/core/data.lua" />
+    <script file="engine/scripts/battle/battle.lua" />
+    <script file="game/kernel/accessories.lua" />
+    <script file="game/kernel/armors.lua" />
+    <script file="game/kernel/attacks.lua" />
+    <script file="game/kernel/characters.lua" />
+    <script file="game/kernel/commands.lua" />
+    <script file="game/battle/battle_cameras.lua" />
+    <script file="game/battle/effects/effect_cameras.lua" />
+    <script file="game/battle/effects/effect_meshes.lua" />
+    <script file="game/battle/effects/effect_animations.lua" />
+    <script file="game/battle/effects/effect_sprites.lua" />
+    <script file="game/kernel/growth.lua" />
+    <script file="game/kernel/items.lua" />
+    <script file="game/kernel/key_items.lua" />
+    <script file="game/kernel/materia.lua" />
+    <script file="game/kernel/shops.lua" />
+    <script file="game/kernel/summons.lua" />
+    <script file="game/kernel/weapons.lua" />
+
+    <script file="engine/scripts/core/system.lua" />
+    <script file="engine/scripts/core/character_effects.lua" />
+    <script file="engine/scripts/core/character_abilities.lua" />
+    <script file="engine/scripts/core/save.lua" />
+
+    <!-- TODO: Don't always parse initial savemap when loading is implemented. -->
+    <script file="game/kernel/initial_savemap.lua" />
+
+    <script file="engine/scripts/field/field.lua" />
+    <script file="engine/scripts/world/triangle_triggers.lua" />
+    <script file="engine/scripts/world/vehicles.lua" />
+    <script file="engine/scripts/world/world_model_table.lua" />
+    <script file="engine/scripts/world/world_settings.lua" />
+    <script file="engine/scripts/world/world_music.lua" />
+    <script file="engine/scripts/world/world_vm.lua" />
+    <script file="engine/scripts/world/script_stubs.lua" />
+    <script file="engine/scripts/battle/battle_ai.lua" />
+    <script file="engine/scripts/battle/battle_ai_vm.lua" />
+    <script file="engine/scripts/battle/battle_camera.lua" />
+    <script file="engine/scripts/battle/effect_camera.lua" />
+    <script file="engine/scripts/battle/effect_mesh.lua" />
+    <script file="engine/scripts/battle/effect_sprite.lua" />
+    <script file="engine/scripts/menu/menu_helpers.lua" />
+    <script file="engine/scripts/menu/menu_lib.lua" />
+
+    <!-- TODO: Debugging pourposes only -->
+    <script file="engine/scripts/core/debug_data.lua" />
+
+    <system_script name="MapChanger" />
+    <system_script name="WorldMap" />
+</scripts>

+ 0 - 0
data/data/scripts/ai/1st_ray.lua → data/engine/scripts/ai/1st_ray.lua


+ 0 - 0
data/data/scripts/ai/barret.lua → data/engine/scripts/ai/barret.lua


+ 0 - 0
data/data/scripts/ai/battle_attacks.lua → data/engine/scripts/ai/battle_attacks.lua


+ 0 - 0
data/data/scripts/ai/cloud.lua → data/engine/scripts/ai/cloud.lua


+ 0 - 0
data/data/scripts/ai/enemy.xml → data/engine/scripts/ai/enemy.xml


+ 0 - 0
data/data/scripts/ai/grunt.lua → data/engine/scripts/ai/grunt.lua


+ 0 - 0
data/data/scripts/ai/guard_hound.lua → data/engine/scripts/ai/guard_hound.lua


+ 0 - 0
data/data/scripts/ai/guard_scorpion.lua → data/engine/scripts/ai/guard_scorpion.lua


+ 0 - 0
data/data/scripts/ai/hell_house.lua → data/engine/scripts/ai/hell_house.lua


+ 0 - 0
data/data/scripts/ai/mono_drive.lua → data/engine/scripts/ai/mono_drive.lua


+ 0 - 0
data/data/scripts/ai/player.lua → data/engine/scripts/ai/player.lua


+ 0 - 0
data/data/scripts/ai/sweeper.lua → data/engine/scripts/ai/sweeper.lua


+ 0 - 0
data/data/scripts/ai/test_pyramid.lua → data/engine/scripts/ai/test_pyramid.lua


+ 0 - 0
data/data/scripts/battle.lua → data/engine/scripts/battle/battle.lua


+ 0 - 0
data/data/scripts/battle_ai.lua → data/engine/scripts/battle/battle_ai.lua


+ 0 - 0
data/data/scripts/battle/battle_ai_vm.lua → data/engine/scripts/battle/battle_ai_vm.lua


+ 2 - 2
data/data/scripts/battle/battle_camera.lua → data/engine/scripts/battle/battle_camera.lua

@@ -1,7 +1,7 @@
 --- Camera scripts of the battles (attacks, magic, enemy attacks).
 --- Camera scripts of the battles (attacks, magic, enemy attacks).
 --
 --
 -- The original game has a small script for the camera of each attack, in the files camdat0.bin,
 -- The original game has a small script for the camera of each attack, in the files camdat0.bin,
--- camdat1.bin and camdat2.bin (the installer writes them to gamedata/battle_cameras.lua). Two points
+-- camdat1.bin and camdat2.bin (the installer writes them to game/battle/battle_cameras.lua). Two points
 -- move in a battle: the camera (position stream) and the point it looks at (look stream), each one
 -- move in a battle: the camera (position stream) and the point it looks at (look stream), each one
 -- with its own script of bytes, found with (camera id * 3 + variant). The ids are the camera_single
 -- with its own script of bytes, found with (camera id * 3 + variant). The ids are the camera_single
 -- and camera_multiple of the attacks. The interpreters are in ff7.exe (0x5c2341 and 0x5c3f45).
 -- and camera_multiple of the attacks. The interpreters are in ff7.exe (0x5c2341 and 0x5c3f45).
@@ -468,7 +468,7 @@ local function model_data(name)
     if name == nil then return nil end
     if name == nil then return nil end
     local data = BattleCameraController.models[name]
     local data = BattleCameraController.models[name]
     if data == nil then
     if data == nil then
-        local chunk = loadfile("./data/scripts/battle_models/" .. name .. "_camera.lua")
+        local chunk = loadfile("./game/battle/scripts/" .. name .. "_camera.lua")
         if chunk ~= nil then chunk() end
         if chunk ~= nil then chunk() end
         data = BattleModelCameras ~= nil and BattleModelCameras[name] or false
         data = BattleModelCameras ~= nil and BattleModelCameras[name] or false
         BattleCameraController.models[name] = data
         BattleCameraController.models[name] = data

+ 2 - 2
data/data/scripts/battle/battle_ui.lua → data/engine/scripts/battle/battle_ui.lua

@@ -4,7 +4,7 @@ if UiContainer == nil then UiContainer = {} end
 --
 --
 -- Battle models have animations named XX_NN (XX are the first two letters of the model name, NN a
 -- Battle models have animations named XX_NN (XX are the first two letters of the model name, NN a
 -- two digit number). A model also has numbered animation scripts (generated in
 -- two digit number). A model also has numbered animation scripts (generated in
--- scripts/battle_models/) that chain animations, mark the moment an attack hits and so on. Attacks,
+-- game/battle/scripts/) that chain animations, mark the moment an attack hits and so on. Attacks,
 -- hurt reactions and deaths play one of those scripts.
 -- hurt reactions and deaths play one of those scripts.
 --
 --
 -- Enemies attacks use the script number set in the enemy data. The scripts for the other
 -- Enemies attacks use the script number set in the enemy data. The scripts for the other
@@ -124,7 +124,7 @@ BattleAnimations.script_cache = {}
 BattleAnimations.get_scripts = function(model)
 BattleAnimations.get_scripts = function(model)
     if BattleAnimations.script_cache[model] ~= nil then return BattleAnimations.script_cache[model] end
     if BattleAnimations.script_cache[model] ~= nil then return BattleAnimations.script_cache[model] end
     local scripts = {}
     local scripts = {}
-    local file = io.open("./data/scripts/battle_models/" .. model .. ".lua", "r")
+    local file = io.open("./game/battle/scripts/" .. model .. ".lua", "r")
     if file == nil then
     if file == nil then
         print("No animation scripts found for model " .. model)
         print("No animation scripts found for model " .. model)
     else
     else

+ 1 - 1
data/data/scripts/battle/effect_camera.lua → data/engine/scripts/battle/effect_camera.lua

@@ -134,7 +134,7 @@ end
 
 
 --- Gets a camera script.
 --- Gets a camera script.
 --
 --
--- The scripts are read from ff7.exe by the installer (gamedata/effect_cameras.lua), and they are
+-- The scripts are read from ff7.exe by the installer (game/battle/effects/effect_cameras.lua), and they are
 -- named by their address in the executable, like "0x8ae268" (Shiva, one target). Without them
 -- named by their address in the executable, like "0x8ae268" (Shiva, one target). Without them
 -- (another version of the executable) the effects play with the camera of the battle.
 -- (another version of the executable) the effects play with the camera of the battle.
 --
 --

+ 1 - 1
data/data/scripts/battle/effect_mesh.lua → data/engine/scripts/battle/effect_mesh.lua

@@ -9,7 +9,7 @@
 --     1) in `ticks` ticks and wait `hold` ticks (Ramuh, function 0x598f74, with the durations of
 --     1) in `ticks` ticks and wait `hold` ticks (Ramuh, function 0x598f74, with the durations of
 --     the table at 0x8ba970).
 --     the table at 0x8ba970).
 --
 --
--- The data is written by the installer to gamedata/effect_meshes.lua (Game.EffectMeshes) and drawn
+-- The data is written by the installer to game/battle/effects/effect_meshes.lua (Game.EffectMeshes) and drawn
 -- with the dynamic meshes of the battle manager: one for the triangles with the texture and one for
 -- with the dynamic meshes of the battle manager: one for the triangles with the texture and one for
 -- the ones with colours at the vertices and no texture.
 -- the ones with colours at the vertices and no texture.
 EffectMesh = {}
 EffectMesh = {}

+ 0 - 0
data/data/scripts/battle/effect_sprite.lua → data/engine/scripts/battle/effect_sprite.lua


+ 0 - 0
data/data/scripts/character_abilities.lua → data/engine/scripts/core/character_abilities.lua


+ 0 - 0
data/data/scripts/character_effects.lua → data/engine/scripts/core/character_effects.lua


+ 0 - 0
data/data/scripts/config.lua → data/engine/scripts/core/config.lua


+ 0 - 0
data/data/scripts/data.lua → data/engine/scripts/core/data.lua


+ 0 - 0
data/data/scripts/debug_data.lua → data/engine/scripts/core/debug_data.lua


+ 3 - 0
data/data/scripts/save.lua → data/engine/scripts/core/save.lua

@@ -13,6 +13,9 @@ end
 -- @param slot The slot to save at (0-15).
 -- @param slot The slot to save at (0-15).
 -- @param force If false, exisiting game data will not be overwritten if control keys are different.
 -- @param force If false, exisiting game data will not be overwritten if control keys are different.
 save_game = function(slot, force)
 save_game = function(slot, force)
+    -- Only the slots that have something are written below, so what the savemap had before has to
+    -- be removed: used items, unequipped materia...
+    savemap_manager:clear_contents()
     savemap_manager:set_control_key(ControlKey)
     savemap_manager:set_control_key(ControlKey)
     -- Settings of the config menu, and the colours of the windows.
     -- Settings of the config menu, and the colours of the windows.
     UiContainer.ConfigMenu:save_settings()
     UiContainer.ConfigMenu:save_settings()

+ 0 - 0
data/data/scripts/system.lua → data/engine/scripts/core/system.lua


+ 0 - 0
data/data/scripts/field.lua → data/engine/scripts/field/field.lua


+ 0 - 0
data/data/scripts/menu/begin_menu.lua → data/engine/scripts/menu/begin_menu.lua


+ 1 - 1
data/data/scripts/menu/config_menu.lua → data/engine/scripts/menu/config_menu.lua

@@ -43,7 +43,7 @@ local CONTROLS = {
 }
 }
 
 
 --- File where the keys are saved. The game runs it after config.cfg when it starts.
 --- File where the keys are saved. The game runs it after config.cfg when it starts.
-local CONTROLS_FILE = "./controls.cfg"
+local CONTROLS_FILE = "./user/controls.cfg"
 
 
 --- Key that cancels the choice of a key. It can't be assigned.
 --- Key that cancels the choice of a key. It can't be assigned.
 local CAPTURE_CANCEL_KEY = "Escape"
 local CAPTURE_CANCEL_KEY = "Escape"

+ 0 - 0
data/data/scripts/menu/equip_menu.lua → data/engine/scripts/menu/equip_menu.lua


+ 0 - 0
data/data/scripts/menu/exchange_menu.lua → data/engine/scripts/menu/exchange_menu.lua


+ 0 - 0
data/data/scripts/menu/item_menu.lua → data/engine/scripts/menu/item_menu.lua


+ 0 - 0
data/data/scripts/menu/limit_menu.lua → data/engine/scripts/menu/limit_menu.lua


+ 0 - 0
data/data/scripts/menu/magic_menu.lua → data/engine/scripts/menu/magic_menu.lua


+ 0 - 0
data/data/scripts/menu/main_menu.lua → data/engine/scripts/menu/main_menu.lua


+ 0 - 0
data/data/scripts/menu/materia_menu.lua → data/engine/scripts/menu/materia_menu.lua


+ 0 - 0
data/data/scripts/menu/menu_helpers.lua → data/engine/scripts/menu/menu_helpers.lua


+ 0 - 0
data/data/scripts/menu/menu_lib.lua → data/engine/scripts/menu/menu_lib.lua


+ 0 - 0
data/data/scripts/menu/name_menu.lua → data/engine/scripts/menu/name_menu.lua


+ 0 - 0
data/data/scripts/menu/pause_menu.lua → data/engine/scripts/menu/pause_menu.lua


+ 0 - 0
data/data/scripts/menu/phs_menu.lua → data/engine/scripts/menu/phs_menu.lua


+ 0 - 0
data/data/scripts/menu/quit_menu.lua → data/engine/scripts/menu/quit_menu.lua


+ 0 - 0
data/data/scripts/menu/save_menu.lua → data/engine/scripts/menu/save_menu.lua


+ 1 - 1
data/data/scripts/menu/shop_menu.lua → data/engine/scripts/menu/shop_menu.lua

@@ -3,7 +3,7 @@ if UiContainer == nil then UiContainer = {} end
 --- The shop menu.
 --- The shop menu.
 --
 --
 -- Opened by the field scripts (open_shop). The shop to open is set in `shop_id` before showing the
 -- Opened by the field scripts (open_shop). The shop to open is set in `shop_id` before showing the
--- menu. The inventory of each shop is in Game.Shops (gamedata/shops.lua). Prices are the ones of
+-- menu. The inventory of each shop is in Game.Shops (game/kernel/shops.lua). Prices are the ones of
 -- the items and materia, the same in every shop. Items are sold for half of their price, materia for its AP (see materia_sell_price).
 -- the items and materia, the same in every shop. Items are sold for half of their price, materia for its AP (see materia_sell_price).
 --
 --
 -- States:
 -- States:

Some files were not shown because too many files changed in this diff