Jelajahi Sumber

Reorganized the data files by owner and by game area

- Coherent file layout in the installation directory. The data folder of the repository follows the same layout.
- The converted game data is organized in kernel, field, battle, world, ui, audio and video.
- The files of installations made by older versions are moved to their new places by the game and the installer. The game data has to be installed again.
- The installer replaces the shipped files on every installation, so removed ones don't stay behind.
- The game no longer reads anything from temp, which is deleted after installing.
- Removed the Japanese and Russian languages, which the font of the game can't show, and the README placeholders of the data folders.
Iñigo Valentin 1 hari lalu
induk
melakukan
a941466113
100 mengubah file dengan 71 tambahan dan 251 penghapusan
  1. 1 1
      .github/copilot-instructions.md
  2. 6 6
      .gitignore
  3. 0 6
      data/data/audio/musics/README.txt
  4. 0 6
      data/data/audio/sounds/README.txt
  5. 0 4
      data/data/fields/README.txt
  6. 0 6
      data/data/gamedata/README.txt
  7. 0 7
      data/data/images/characters/README.txt
  8. 0 5
      data/data/images/fonts/README.txt
  9. 0 6
      data/data/images/icons/README.txt
  10. 0 6
      data/data/images/other/README.txt
  11. 0 4
      data/data/images/reels/README.txt
  12. 0 6
      data/data/images/window/README.txt
  13. 0 10
      data/data/models/battle/characters/README.txt
  14. 0 10
      data/data/models/battle/enemies/README.txt
  15. 0 9
      data/data/models/battle/scenes/README.txt
  16. 0 9
      data/data/models/fields/README.txt
  17. 0 3
      data/data/models/world/characters/README.txt
  18. 0 3
      data/data/models/world/locations/README.txt
  19. 0 3
      data/data/models/world/other/README.txt
  20. 0 3
      data/data/models/world/terrain/README.txt
  21. 0 3
      data/data/models/world/vehicles/README.txt
  22. 0 2
      data/data/screens/README.txt
  23. 0 41
      data/data/screens/_screens.xml
  24. 0 1
      data/data/scripts/README.txt
  25. 0 53
      data/data/scripts/_scripts.xml
  26. 0 1
      data/data/system/README.txt
  27. 0 2
      data/data/texts/README.txt
  28. 0 11
      data/data/texts/_texts.xml
  29. 0 5
      data/data/texts/japanese/menu.xml
  30. 0 5
      data/data/texts/russian/menu.xml
  31. 0 3
      data/data/world/README.txt
  32. 0 0
      data/defaults/config.cfg
  33. 0 0
      data/engine/fonts/_fonts.xml
  34. 0 0
      data/engine/fonts/ffvii_digits.xml
  35. 0 0
      data/engine/fonts/ffvii_en.xml
  36. 0 0
      data/engine/fonts/ffvii_menu.xml
  37. 0 0
      data/engine/fonts/ffvii_timer.xml
  38. 0 0
      data/engine/images/empty.png
  39. 0 0
      data/engine/images/system/blank.png
  40. 0 0
      data/engine/metadata/field_models_and_animation_metadata.xml
  41. 53 0
      data/engine/scripts/_scripts.xml
  42. 0 0
      data/engine/scripts/ai/1st_ray.lua
  43. 0 0
      data/engine/scripts/ai/barret.lua
  44. 0 0
      data/engine/scripts/ai/battle_attacks.lua
  45. 0 0
      data/engine/scripts/ai/cloud.lua
  46. 0 0
      data/engine/scripts/ai/enemy.xml
  47. 0 0
      data/engine/scripts/ai/grunt.lua
  48. 0 0
      data/engine/scripts/ai/guard_hound.lua
  49. 0 0
      data/engine/scripts/ai/guard_scorpion.lua
  50. 0 0
      data/engine/scripts/ai/hell_house.lua
  51. 0 0
      data/engine/scripts/ai/mono_drive.lua
  52. 0 0
      data/engine/scripts/ai/player.lua
  53. 0 0
      data/engine/scripts/ai/sweeper.lua
  54. 0 0
      data/engine/scripts/ai/test_pyramid.lua
  55. 0 0
      data/engine/scripts/battle/battle.lua
  56. 0 0
      data/engine/scripts/battle/battle_ai.lua
  57. 0 0
      data/engine/scripts/battle/battle_ai_vm.lua
  58. 2 2
      data/engine/scripts/battle/battle_camera.lua
  59. 2 2
      data/engine/scripts/battle/battle_ui.lua
  60. 1 1
      data/engine/scripts/battle/effect_camera.lua
  61. 1 1
      data/engine/scripts/battle/effect_mesh.lua
  62. 0 0
      data/engine/scripts/battle/effect_sprite.lua
  63. 0 0
      data/engine/scripts/core/character_abilities.lua
  64. 0 0
      data/engine/scripts/core/character_effects.lua
  65. 0 0
      data/engine/scripts/core/config.lua
  66. 0 0
      data/engine/scripts/core/data.lua
  67. 0 0
      data/engine/scripts/core/debug_data.lua
  68. 0 0
      data/engine/scripts/core/save.lua
  69. 0 0
      data/engine/scripts/core/system.lua
  70. 0 0
      data/engine/scripts/field/field.lua
  71. 0 0
      data/engine/scripts/menu/begin_menu.lua
  72. 1 1
      data/engine/scripts/menu/config_menu.lua
  73. 0 0
      data/engine/scripts/menu/equip_menu.lua
  74. 0 0
      data/engine/scripts/menu/exchange_menu.lua
  75. 0 0
      data/engine/scripts/menu/item_menu.lua
  76. 0 0
      data/engine/scripts/menu/limit_menu.lua
  77. 0 0
      data/engine/scripts/menu/magic_menu.lua
  78. 0 0
      data/engine/scripts/menu/main_menu.lua
  79. 0 0
      data/engine/scripts/menu/materia_menu.lua
  80. 0 0
      data/engine/scripts/menu/menu_helpers.lua
  81. 0 0
      data/engine/scripts/menu/menu_lib.lua
  82. 0 0
      data/engine/scripts/menu/name_menu.lua
  83. 0 0
      data/engine/scripts/menu/pause_menu.lua
  84. 0 0
      data/engine/scripts/menu/phs_menu.lua
  85. 0 0
      data/engine/scripts/menu/quit_menu.lua
  86. 0 0
      data/engine/scripts/menu/save_menu.lua
  87. 1 1
      data/engine/scripts/menu/shop_menu.lua
  88. 0 0
      data/engine/scripts/menu/status_menu.lua
  89. 0 0
      data/engine/scripts/world/script_stubs.lua
  90. 1 1
      data/engine/scripts/world/triangle_triggers.lua
  91. 0 0
      data/engine/scripts/world/vehicles.lua
  92. 0 0
      data/engine/scripts/world/world_map.lua
  93. 0 0
      data/engine/scripts/world/world_model_table.lua
  94. 0 0
      data/engine/scripts/world/world_music.lua
  95. 1 1
      data/engine/scripts/world/world_settings.lua
  96. 1 1
      data/engine/scripts/world/world_vm.lua
  97. 0 0
      data/engine/shaders/cross_f.glsl
  98. 0 0
      data/engine/shaders/cross_v.glsl
  99. 0 0
      data/engine/shaders/pixelisation_f.glsl
  100. 0 0
      data/engine/shaders/pixelisation_v.glsl

+ 1 - 1
.github/copilot-instructions.md

@@ -20,7 +20,7 @@ V-Gears is a free, cross-platform reimplementation of the Final Fantasy VII engi
 - `src/third_party/sol/` — vendored sol2 single header. Do not restyle, modernize, or refactor it.
 - 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.
+- `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).
 - `_OLD/` — legacy q-gears code kept for reference. Do not modify or reuse without asking.
 

+ 6 - 6
.gitignore

@@ -31,11 +31,11 @@ src/installer/gui/MainWindow.ui.autosave
 # Generated from MainWindow.ui at build time.
 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.
 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 - 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).
 --
 -- 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
 -- 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).
@@ -468,7 +468,7 @@ local function model_data(name)
     if name == nil then return nil end
     local data = BattleCameraController.models[name]
     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
         data = BattleModelCameras ~= nil and BattleModelCameras[name] or false
         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
 -- 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.
 --
 -- 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)
     if BattleAnimations.script_cache[model] ~= nil then return BattleAnimations.script_cache[model] end
     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
         print("No animation scripts found for model " .. model)
     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.
 --
--- 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
 -- (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
 --     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
 -- the ones with colours at the vertices and no texture.
 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


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


+ 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.
-local CONTROLS_FILE = "./controls.cfg"
+local CONTROLS_FILE = "./user/controls.cfg"
 
 --- Key that cancels the choice of a key. It can't be assigned.
 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.
 --
 -- 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).
 --
 -- States:

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


+ 0 - 0
data/data/scripts/worldmap/script_stubs.lua → data/engine/scripts/world/script_stubs.lua


+ 1 - 1
data/data/scripts/worldmap/triangle_triggers.lua → data/engine/scripts/world/triangle_triggers.lua

@@ -195,7 +195,7 @@ enter_world_map = function(record, point_name)
     -- Fort Condor is wm5 and its record is 6, the one of the submarine station wm41 and its record 42).
     record = record + 1
     -- Every field script starts with EntityContainer = {}, which deletes the scripts of the vehicles.
-    local vehicles = loadfile("./data/scripts/worldmap/vehicles.lua")
+    local vehicles = loadfile("./engine/scripts/world/vehicles.lua")
     if vehicles then vehicles() else print("Could not reload the scripts of the vehicles") end
     System.WorldMap.arrival = record
     System.WorldMap.arrival_name = point_name

+ 0 - 0
data/data/scripts/worldmap/vehicles.lua → data/engine/scripts/world/vehicles.lua


+ 0 - 0
data/data/scripts/world_map.lua → data/engine/scripts/world/world_map.lua


+ 0 - 0
data/data/scripts/worldmap/world_model_table.lua → data/engine/scripts/world/world_model_table.lua


+ 0 - 0
data/data/scripts/worldmap/world_music.lua → data/engine/scripts/world/world_music.lua


+ 1 - 1
data/data/scripts/worldmap/world_settings.lua → data/engine/scripts/world/world_settings.lua

@@ -46,7 +46,7 @@ WorldMapSettings = {
         scene = {distance = 1.25, pitch = 25},
     },
 
-    --- Music of the world map (the logic is in world_music.lua). Numbers are the tracks of audio/musics.
+    --- Music of the world map (the logic is in world_music.lua). Numbers are the tracks of game/audio/music.
     -- Written from the description of the game by the user, and from the scripts of the world (wm0.lua);
     -- the pieces that are not known yet are marked TODO and are the ones to fix.
     music = {

+ 1 - 1
data/data/scripts/worldmap/world_vm.lua → data/engine/scripts/world/world_vm.lua

@@ -412,7 +412,7 @@ end
 WorldVM.arrival_point = function(name)
     if not name or name == "" then return nil end
     if WorldVM.arrivals == nil then
-        local chunk = loadfile("./data/scripts/worldmap/world_arrivals.lua")
+        local chunk = loadfile("./game/world/scripts/world_arrivals.lua")
         WorldArrivals = nil
         if chunk then pcall(chunk) end
         WorldVM.arrivals = WorldArrivals or false

+ 0 - 0
data/data/screens/shaders/cross_f.glsl → data/engine/shaders/cross_f.glsl


+ 0 - 0
data/data/screens/shaders/cross_v.glsl → data/engine/shaders/cross_v.glsl


+ 0 - 0
data/data/screens/shaders/pixelisation_f.glsl → data/engine/shaders/pixelisation_f.glsl


+ 0 - 0
data/data/screens/shaders/pixelisation_v.glsl → data/engine/shaders/pixelisation_v.glsl


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini