refactor: Move file loaders into format subdirectory

This commit is contained in:
Vsevolod Kremianskii 2021-01-19 13:56:51 +07:00
parent 3ba480930c
commit da1880d1db
69 changed files with 96 additions and 93 deletions

View file

@ -95,44 +95,44 @@ set_target_properties(libcommon PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINA
## libresource static library ## libresource static library
set(RESOURCE_HEADERS set(RESOURCE_HEADERS
src/resource/2dafile.h
src/resource/biffile.h
src/resource/binfile.h
src/resource/erffile.h
src/resource/folder.h src/resource/folder.h
src/resource/gfffile.h src/resource/format/2dafile.h
src/resource/format/biffile.h
src/resource/format/binfile.h
src/resource/format/erffile.h
src/resource/format/gfffile.h
src/resource/format/keyfile.h
src/resource/format/ltrfile.h
src/resource/format/lytfile.h
src/resource/format/pefile.h
src/resource/format/rimfile.h
src/resource/format/tlkfile.h
src/resource/format/visfile.h
src/resource/keybifprovider.h src/resource/keybifprovider.h
src/resource/keyfile.h
src/resource/ltrfile.h
src/resource/lytfile.h
src/resource/pefile.h
src/resource/resourceprovider.h src/resource/resourceprovider.h
src/resource/resources.h src/resource/resources.h
src/resource/rimfile.h
src/resource/stringprocessor.h src/resource/stringprocessor.h
src/resource/tlkfile.h
src/resource/types.h src/resource/types.h
src/resource/typeutil.h src/resource/typeutil.h)
src/resource/visfile.h)
set(RESOURCE_SOURCES set(RESOURCE_SOURCES
src/resource/2dafile.cpp
src/resource/biffile.cpp
src/resource/binfile.cpp
src/resource/erffile.cpp
src/resource/folder.cpp src/resource/folder.cpp
src/resource/gfffile.cpp src/resource/format/2dafile.cpp
src/resource/format/biffile.cpp
src/resource/format/binfile.cpp
src/resource/format/erffile.cpp
src/resource/format/gfffile.cpp
src/resource/format/keyfile.cpp
src/resource/format/ltrfile.cpp
src/resource/format/lytfile.cpp
src/resource/format/pefile.cpp
src/resource/format/rimfile.cpp
src/resource/format/tlkfile.cpp
src/resource/format/visfile.cpp
src/resource/keybifprovider.cpp src/resource/keybifprovider.cpp
src/resource/keyfile.cpp
src/resource/ltrfile.cpp
src/resource/lytfile.cpp
src/resource/pefile.cpp
src/resource/rimfile.cpp
src/resource/resources.cpp src/resource/resources.cpp
src/resource/stringprocessor.cpp src/resource/stringprocessor.cpp
src/resource/tlkfile.cpp src/resource/typeutil.cpp)
src/resource/typeutil.cpp
src/resource/visfile.cpp)
add_library(libresource STATIC ${RESOURCE_HEADERS} ${RESOURCE_SOURCES}) add_library(libresource STATIC ${RESOURCE_HEADERS} ${RESOURCE_SOURCES})
set_target_properties(libresource PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set_target_properties(libresource PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

View file

@ -17,7 +17,7 @@
#pragma once #pragma once
#include "../../resource/binfile.h" #include "../../resource/format/binfile.h"
#include "../stream.h" #include "../stream.h"

View file

@ -21,7 +21,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
#include "../rp/attributes.h" #include "../rp/attributes.h"

View file

@ -20,7 +20,7 @@
#include <string> #include <string>
#include <memory> #include <memory>
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
namespace reone { namespace reone {

View file

@ -20,7 +20,7 @@
#include <string> #include <string>
#include <memory> #include <memory>
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
namespace reone { namespace reone {

View file

@ -22,7 +22,7 @@
#include <unordered_map> #include <unordered_map>
#include <vector> #include <vector>
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
namespace reone { namespace reone {

View file

@ -21,7 +21,7 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include "../../resource/2dafile.h" #include "../../resource/format/2dafile.h"
#include "../../resource/resources.h" #include "../../resource/resources.h"
#include "../object/sound.h" #include "../object/sound.h"

View file

@ -20,7 +20,7 @@
#include <string> #include <string>
#include <memory> #include <memory>
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
namespace reone { namespace reone {

View file

@ -20,7 +20,7 @@
#include <string> #include <string>
#include <memory> #include <memory>
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
namespace reone { namespace reone {

View file

@ -20,7 +20,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "../resource/gfffile.h" #include "../resource/format/gfffile.h"
namespace reone { namespace reone {

View file

@ -18,7 +18,7 @@
#pragma once #pragma once
#include "../../../gui/textinput.h" #include "../../../gui/textinput.h"
#include "../../../resource/ltrfile.h" #include "../../../resource/format/ltrfile.h"
#include "../gui.h" #include "../gui.h"

View file

@ -24,7 +24,7 @@
#include "glm/vec4.hpp" #include "glm/vec4.hpp"
#include "../render/texture.h" #include "../render/texture.h"
#include "../resource/gfffile.h" #include "../resource/format/gfffile.h"
namespace reone { namespace reone {

View file

@ -29,8 +29,8 @@
#include "../../common/streamutil.h" #include "../../common/streamutil.h"
#include "../../render/models.h" #include "../../render/models.h"
#include "../../render/walkmeshes.h" #include "../../render/walkmeshes.h"
#include "../../resource/lytfile.h" #include "../../resource/format/lytfile.h"
#include "../../resource/visfile.h" #include "../../resource/format/visfile.h"
#include "../../resource/resources.h" #include "../../resource/resources.h"
#include "../../scene/node/cubenode.h" #include "../../scene/node/cubenode.h"

View file

@ -26,7 +26,7 @@
#include "../../common/timer.h" #include "../../common/timer.h"
#include "../../render/types.h" #include "../../render/types.h"
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
#include "../../resource/types.h" #include "../../resource/types.h"
#include "../actionexecutor.h" #include "../actionexecutor.h"

View file

@ -20,8 +20,8 @@
#include <atomic> #include <atomic>
#include <functional> #include <functional>
#include "../../resource/2dafile.h" #include "../../resource/format/2dafile.h"
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
#include "../../script/types.h" #include "../../script/types.h"
#include "../blueprint/blueprint.h" #include "../blueprint/blueprint.h"

View file

@ -19,7 +19,7 @@
#include "spatial.h" #include "spatial.h"
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
#include "../blueprint/door.h" #include "../blueprint/door.h"

View file

@ -21,7 +21,7 @@
#include "../../render/model/model.h" #include "../../render/model/model.h"
#include "../../render/texture.h" #include "../../render/texture.h"
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
#include "../blueprint/item.h" #include "../blueprint/item.h"
#include "../types.h" #include "../types.h"

View file

@ -24,7 +24,7 @@
#include "SDL2/SDL_events.h" #include "SDL2/SDL_events.h"
#include "../../render/types.h" #include "../../render/types.h"
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
#include "../../resource/types.h" #include "../../resource/types.h"
#include "../player.h" #include "../player.h"

View file

@ -19,7 +19,7 @@
#include <vector> #include <vector>
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
#include "../blueprint/placeable.h" #include "../blueprint/placeable.h"

View file

@ -19,7 +19,7 @@
#include "spatial.h" #include "spatial.h"
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
#include "../camera/camera.h" #include "../camera/camera.h"

View file

@ -19,7 +19,7 @@
#include "spatial.h" #include "spatial.h"
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
namespace reone { namespace reone {

View file

@ -19,7 +19,7 @@
#include <set> #include <set>
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
#include "spatial.h" #include "spatial.h"

View file

@ -19,7 +19,7 @@
#include "spatial.h" #include "spatial.h"
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
namespace reone { namespace reone {

View file

@ -21,7 +21,7 @@
#include <glm/vec2.hpp> #include <glm/vec2.hpp>
#include "../resource/gfffile.h" #include "../resource/format/gfffile.h"
namespace reone { namespace reone {

View file

@ -20,7 +20,7 @@
#include <string> #include <string>
#include <unordered_set> #include <unordered_set>
#include "../../resource/2dafile.h" #include "../../resource/format/2dafile.h"
#include "attributes.h" #include "attributes.h"
#include "savingthrows.h" #include "savingthrows.h"

View file

@ -27,7 +27,7 @@
#include "../../render/font.h" #include "../../render/font.h"
#include "../../render/framebuffer.h" #include "../../render/framebuffer.h"
#include "../../render/texture.h" #include "../../render/texture.h"
#include "../../resource/gfffile.h" #include "../../resource/format/gfffile.h"
#include "../../scene/node/modelscenenode.h" #include "../../scene/node/modelscenenode.h"
#include "../../scene/pipeline/control.h" #include "../../scene/pipeline/control.h"
#include "../../scene/scenegraph.h" #include "../../scene/scenegraph.h"

View file

@ -24,7 +24,7 @@
#include "glm/mat4x4.hpp" #include "glm/mat4x4.hpp"
#include "glm/vec2.hpp" #include "glm/vec2.hpp"
#include "../resource/gfffile.h" #include "../resource/format/gfffile.h"
#include "../resource/types.h" #include "../resource/types.h"
#include "control/control.h" #include "control/control.h"

View file

@ -17,7 +17,7 @@
#pragma once #pragma once
#include "../resource/binfile.h" #include "../resource/format/binfile.h"
#include "walkmesh.h" #include "walkmesh.h"

View file

@ -17,7 +17,7 @@
#pragma once #pragma once
#include "../../resource/binfile.h" #include "../../resource/format/binfile.h"
#include "../texture.h" #include "../texture.h"

View file

@ -19,7 +19,7 @@
#include <memory> #include <memory>
#include "../../resource/binfile.h" #include "../../resource/format/binfile.h"
#include "../texture.h" #include "../texture.h"

View file

@ -17,7 +17,7 @@
#pragma once #pragma once
#include "../../resource/binfile.h" #include "../../resource/format/binfile.h"
#include "../texture.h" #include "../texture.h"

View file

@ -17,7 +17,7 @@
#pragma once #pragma once
#include "../../resource/binfile.h" #include "../../resource/format/binfile.h"
#include "../../resource/types.h" #include "../../resource/types.h"
#include "../model/model.h" #include "../model/model.h"

View file

@ -22,7 +22,7 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/format.hpp> #include <boost/format.hpp>
#include "../common/log.h" #include "../../common/log.h"
using namespace std; using namespace std;

View file

@ -24,8 +24,8 @@
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include "../common/streamreader.h" #include "../../common/streamreader.h"
#include "../common/types.h" #include "../../common/types.h"
namespace reone { namespace reone {

View file

@ -17,9 +17,10 @@
#pragma once #pragma once
#include "../resourceprovider.h"
#include "../types.h"
#include "binfile.h" #include "binfile.h"
#include "resourceprovider.h"
#include "types.h"
namespace reone { namespace reone {

View file

@ -17,8 +17,9 @@
#pragma once #pragma once
#include "../types.h"
#include "binfile.h" #include "binfile.h"
#include "types.h"
namespace reone { namespace reone {

View file

@ -22,7 +22,7 @@
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include "../common/random.h" #include "../../common/random.h"
using namespace std; using namespace std;

View file

@ -17,7 +17,7 @@
#include "pefile.h" #include "pefile.h"
#include "../common/log.h" #include "../../common/log.h"
using namespace std; using namespace std;

View file

@ -17,9 +17,10 @@
#pragma once #pragma once
#include "../resourceprovider.h"
#include "../types.h"
#include "binfile.h" #include "binfile.h"
#include "resourceprovider.h"
#include "types.h"
namespace reone { namespace reone {

View file

@ -20,7 +20,7 @@
#include <istream> #include <istream>
#include <memory> #include <memory>
#include "types.h" #include "../types.h"
namespace reone { namespace reone {

View file

@ -19,8 +19,8 @@
#include <unordered_map> #include <unordered_map>
#include "biffile.h" #include "format/biffile.h"
#include "keyfile.h" #include "format/keyfile.h"
#include "resourceprovider.h" #include "resourceprovider.h"
namespace reone { namespace reone {

View file

@ -23,10 +23,10 @@
#include "../common/pathutil.h" #include "../common/pathutil.h"
#include "../common/streamutil.h" #include "../common/streamutil.h"
#include "biffile.h" #include "format/biffile.h"
#include "erffile.h" #include "format/erffile.h"
#include "format/rimfile.h"
#include "folder.h" #include "folder.h"
#include "rimfile.h"
#include "typeutil.h" #include "typeutil.h"
using namespace std; using namespace std;

View file

@ -25,14 +25,14 @@
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include "2dafile.h" #include "format/2dafile.h"
#include "gfffile.h" #include "format/gfffile.h"
#include "format/keyfile.h"
#include "format/pefile.h"
#include "format/tlkfile.h"
#include "keybifprovider.h" #include "keybifprovider.h"
#include "keyfile.h"
#include "pefile.h"
#include "resourceprovider.h" #include "resourceprovider.h"
#include "stringprocessor.h" #include "stringprocessor.h"
#include "tlkfile.h"
namespace reone { namespace reone {

View file

@ -20,7 +20,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "../resource/binfile.h" #include "../resource/format/binfile.h"
#include "program.h" #include "program.h"

View file

@ -19,7 +19,7 @@
#include <boost/property_tree/json_parser.hpp> #include <boost/property_tree/json_parser.hpp>
#include "../src/resource/2dafile.h" #include "../src/resource/format/2dafile.h"
using namespace std; using namespace std;

View file

@ -21,7 +21,7 @@
#include <boost/format.hpp> #include <boost/format.hpp>
#include "../src/common/log.h" #include "../src/common/log.h"
#include "../src/resource/biffile.h" #include "../src/resource/format/biffile.h"
#include "../src/resource/typeutil.h" #include "../src/resource/typeutil.h"
using namespace std; using namespace std;

View file

@ -20,7 +20,7 @@
#include <boost/format.hpp> #include <boost/format.hpp>
#include "../src/common/log.h" #include "../src/common/log.h"
#include "../src/resource/erffile.h" #include "../src/resource/format/erffile.h"
#include "../src/resource/typeutil.h" #include "../src/resource/typeutil.h"
using namespace std; using namespace std;

View file

@ -22,7 +22,7 @@
#include <boost/property_tree/json_parser.hpp> #include <boost/property_tree/json_parser.hpp>
#include "../src/resource/gfffile.h" #include "../src/resource/format/gfffile.h"
using namespace std; using namespace std;

View file

@ -23,7 +23,7 @@
#include "../src/common/pathutil.h" #include "../src/common/pathutil.h"
#include "../src/common/streamutil.h" #include "../src/common/streamutil.h"
#include "../src/resource/lytfile.h" #include "../src/resource/format/lytfile.h"
namespace fs = boost::filesystem; namespace fs = boost::filesystem;
namespace pt = boost::property_tree; namespace pt = boost::property_tree;

View file

@ -24,11 +24,11 @@
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <boost/property_tree/json_parser.hpp> #include <boost/property_tree/json_parser.hpp>
#include "../src/resource/2dafile.h" #include "../src/resource/format/2dafile.h"
#include "../src/resource/gfffile.h" #include "../src/resource/format/gfffile.h"
#include "../src/resource/keybifprovider.h" #include "../src/resource/keybifprovider.h"
#include "../src/resource/rimfile.h" #include "../src/resource/format/rimfile.h"
#include "../src/resource/tlkfile.h" #include "../src/resource/format/tlkfile.h"
namespace reone { namespace reone {

View file

@ -20,7 +20,7 @@
#include <boost/format.hpp> #include <boost/format.hpp>
#include "../src/common/log.h" #include "../src/common/log.h"
#include "../src/resource/rimfile.h" #include "../src/resource/format/rimfile.h"
#include "../src/resource/typeutil.h" #include "../src/resource/typeutil.h"
using namespace std; using namespace std;

View file

@ -19,7 +19,7 @@
#include <boost/property_tree/json_parser.hpp> #include <boost/property_tree/json_parser.hpp>
#include "../src/resource/tlkfile.h" #include "../src/resource/format/tlkfile.h"
using namespace std; using namespace std;

View file

@ -24,7 +24,7 @@
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/ptree.hpp>
#include "../src/resource/keyfile.h" #include "../src/resource/format/keyfile.h"
namespace reone { namespace reone {