From dfe6ec3eaa960eb016f81d97d64c40746ddccbd5 Mon Sep 17 00:00:00 2001 From: Daniel Evans Date: Fri, 6 Mar 2015 01:40:29 +0000 Subject: [PATCH] Remove old file indexing system and IO handling - Use FileIndex inside GameData to handle normalisation - Remove old raw pointer API for loading data --- rwengine/include/core/FileIndex.hpp | 6 + rwengine/include/engine/GameData.hpp | 38 +---- rwengine/include/loaders/LoaderDFF.hpp | 2 +- rwengine/include/loaders/TextureLoader.hpp | 11 +- rwengine/src/core/FileIndex.cpp | 30 +++- rwengine/src/engine/GameData.cpp | 159 ++------------------- rwengine/src/engine/GameWorld.cpp | 5 +- rwengine/src/loaders/LoaderDFF.cpp | 8 +- rwengine/src/loaders/TextureLoader.cpp | 32 +---- rwengine/src/render/GameRenderer.cpp | 6 +- rwengine/src/render/GameShaders.cpp | 2 +- rwgame/RWGame.cpp | 2 +- 12 files changed, 80 insertions(+), 221 deletions(-) diff --git a/rwengine/include/core/FileIndex.hpp b/rwengine/include/core/FileIndex.hpp index 67d7b8e6..51695379 100644 --- a/rwengine/include/core/FileIndex.hpp +++ b/rwengine/include/core/FileIndex.hpp @@ -26,6 +26,12 @@ public: */ void indexDirectory(const std::string& directory); + /** + * Adds the files contained within the given directory tree to the + * file index. + */ + void indexTree(const std::string& root); + /** * Adds the files contained within the given Archive file to the * file index. diff --git a/rwengine/include/engine/GameData.hpp b/rwengine/include/engine/GameData.hpp index fa9a4bf2..c246a3c7 100644 --- a/rwengine/include/engine/GameData.hpp +++ b/rwengine/include/engine/GameData.hpp @@ -16,6 +16,7 @@ #include