V-Gears is a free, cross-platform reimplementation of the Final Fantasy VII engine (C++14), continued from the stalled q-gears project. It runs the user's own original game data on modern systems — it is not an emulator and ships no game assets.
v-gears-installer from the user's own copy of the game, at install time, on the user's machine only.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/.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.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._OLD/ — legacy q-gears code kept for reference. Do not modify or reuse without asking.Dependencies and details: see doc/BUILD.md.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug # configure once
cmake --build build -j$(nproc) # build everything
cmake --build build --target v-gears-tests -j$(nproc)
ctest --test-dir build --output-on-failure # run the test suite
build/, build-normal/, build-asan/); never in-tree.v-gears (engine), v-gears-installer (data installer), v-gears-tests.USE_DETERMINISTIC_FALLBACKS (default ON) pragmatically finds libraries; set it OFF for clean dependency diagnosis or packaging.Follow doc/STYLE.md (C++) and doc/STYLE-LUA.md. Non-negotiable core rules:
PascalCase.cpp / .h; types and functions PascalCase; variables snake_case; class data members trailing_underscore_; constants and enumerators UPPER_SNAKE_CASE.#pragma once include guards; include order: C++ stdlib → C system → other libraries → related header → V-Gears headers.const before the type, nullptr, prefix ++i, explicit single-argument constructors, override on overridden virtuals.Verified working recipe — keep these quirks intact:
build-asan with -DCMAKE_C_FLAGS='-fsanitize=address,undefined -fno-omit-frame-pointer -g' (same for CXX flags, plus -DCMAKE_EXE_LINKER_FLAGS='-fsanitize=address,undefined'). System LuaJIT is used as an uninstrumented dependency.vptr:*/OgreSingleton.h — a false positive inherent to OGRE's singleton pattern, not a real bug.