Преглед на файлове

Removed unused code

- Removed classes that nothing used: the viewer module, XmlWorldMapFile, TxzFileManager, FLevelFileManager, BackgroundTextureLoader, FontFile, Surface, TimToVram, ObjectFactory and seven decompiler instruction classes, with their placeholder tests.
- Removed unused nested types, headers and the commented-out viewer console command.
- Removed functions that were never called, including unused virtual methods and the code that only they used (the control flow analysis of the decompiler, among others).
Iñigo Valentin преди 1 ден
родител
ревизия
c5375d7636
променени са 100 файла, в които са добавени 0 реда и са изтрити 2145 реда
  1. 0 5
      src/CMakeLists.txt
  2. 0 7
      src/FF7Character.cpp
  3. 0 9
      src/FF7Character.h
  4. 0 4
      src/common/VGearsApplication.cpp
  5. 0 14
      src/common/VGearsApplication.h
  6. 0 29
      src/core/AudioManager.cpp
  7. 0 33
      src/core/AudioManager.h
  8. 0 4
      src/core/Background2D.cpp
  9. 0 7
      src/core/Background2D.h
  10. 0 10
      src/core/CameraManager.cpp
  11. 0 9
      src/core/CameraManager.h
  12. 0 2
      src/core/ConfigCmd.cpp
  13. 0 7
      src/core/ConfigCmd.h
  14. 0 2
      src/core/ConfigCmdHandler.cpp
  15. 0 7
      src/core/ConfigCmdHandler.h
  16. 0 51
      src/core/ConfigCmdHandlerCommands.h
  17. 0 10
      src/core/ConfigVar.cpp
  18. 0 14
      src/core/ConfigVar.h
  19. 0 39
      src/core/DebugDraw.cpp
  20. 0 16
      src/core/DebugDraw.h
  21. 0 26
      src/core/Enemy.cpp
  22. 0 97
      src/core/Enemy.h
  23. 0 4
      src/core/Entity.cpp
  24. 0 18
      src/core/Entity.h
  25. 0 18
      src/core/EntityManager.cpp
  26. 0 36
      src/core/EntityManager.h
  27. 0 2
      src/core/EntityTrigger.cpp
  28. 0 11
      src/core/EntityTrigger.h
  29. 0 8
      src/core/Manager.cpp
  30. 0 18
      src/core/Manager.h
  31. 0 51
      src/core/Savemap.h
  32. 0 5
      src/core/SavemapHandler.cpp
  33. 0 5
      src/core/SavemapHandler.h
  34. 0 5
      src/core/ScriptManager.cpp
  35. 0 8
      src/core/ScriptManager.h
  36. 0 5
      src/core/UiWidget.cpp
  37. 0 8
      src/core/UiWidget.h
  38. 0 5
      src/core/Utilites.cpp
  39. 0 9
      src/core/Utilites.h
  40. 0 22
      src/core/WorldMapManager.cpp
  41. 0 11
      src/core/WorldMapManager.h
  42. 0 19
      src/core/XmlMapFile.cpp
  43. 0 7
      src/core/XmlMapFile.h
  44. 0 144
      src/core/XmlWorldMapFile.cpp
  45. 0 45
      src/core/XmlWorldMapFile.h
  46. 0 14
      src/core/particles/Particle.h
  47. 0 7
      src/core/particles/ParticleEmitter.h
  48. 0 20
      src/core/particles/ParticlePool.h
  49. 0 14
      src/core/particles/ParticlePoolMap.h
  50. 0 4
      src/core/particles/ParticleSystemFactory.cpp
  51. 0 7
      src/core/particles/ParticleSystemFactory.h
  52. 0 23
      src/core/particles/ParticleSystemManager.cpp
  53. 0 24
      src/core/particles/ParticleSystemManager.h
  54. 0 4
      src/core/particles/renderer/ParticleEntityRenderer.cpp
  55. 0 7
      src/core/particles/renderer/ParticleEntityRenderer.h
  56. 0 2
      src/data/FinalFantasy7/FF7ModelListFile.cpp
  57. 0 7
      src/data/FinalFantasy7/FF7ModelListFile.h
  58. 0 95
      src/data/GameData.h
  59. 0 8
      src/data/VGearsBackgroundFile.cpp
  60. 0 5
      src/data/VGearsBackgroundFile.h
  61. 0 35
      src/data/VGearsBackgroundTextureLoader.cpp
  62. 0 58
      src/data/VGearsBackgroundTextureLoader.h
  63. 0 6
      src/data/VGearsCameraMatrixFile.cpp
  64. 0 14
      src/data/VGearsCameraMatrixFile.h
  65. 0 36
      src/data/VGearsFLevelFile.cpp
  66. 0 10
      src/data/VGearsFLevelFile.h
  67. 0 58
      src/data/VGearsFLevelFileManager.cpp
  68. 0 77
      src/data/VGearsFLevelFileManager.h
  69. 0 5
      src/data/VGearsHRCFile.cpp
  70. 0 7
      src/data/VGearsHRCFile.h
  71. 0 14
      src/data/VGearsLZSDataStream.h
  72. 0 30
      src/data/VGearsPFile.cpp
  73. 0 14
      src/data/VGearsPFile.h
  74. 0 8
      src/data/VGearsPaletteFileSerializer.cpp
  75. 0 8
      src/data/VGearsPaletteFileSerializer.h
  76. 0 4
      src/data/VGearsRSDFile.cpp
  77. 0 14
      src/data/VGearsRSDFile.h
  78. 0 4
      src/data/VGearsSerializer.cpp
  79. 0 8
      src/data/VGearsSerializer.h
  80. 0 65
      src/data/VGearsTexFile.h
  81. 0 54
      src/data/worldmap/TxzFileManager.cpp
  82. 0 80
      src/data/worldmap/TxzFileManager.h
  83. 0 9
      src/data/worldmap/TxzFileSerializer.cpp
  84. 0 9
      src/data/worldmap/TxzFileSerializer.h
  85. 0 13
      src/data/worldmap/WorldmapFileSerializer.h
  86. 0 10
      src/installer/CMakeLists.txt
  87. 0 16
      src/installer/DiskImage.cpp
  88. 0 28
      src/installer/DiskImage.h
  89. 0 43
      src/installer/FieldDataInstaller.cpp
  90. 0 11
      src/installer/FieldDataInstaller.h
  91. 0 17
      src/installer/MediaDataInstaller.cpp
  92. 0 7
      src/installer/MediaDataInstaller.h
  93. 0 33
      src/installer/VGearsUtility.cpp
  94. 0 17
      src/installer/VGearsUtility.h
  95. 0 8
      src/installer/WorldInstaller.h
  96. 0 2
      src/installer/common/BinGZipFile.cpp
  97. 0 7
      src/installer/common/BinGZipFile.h
  98. 0 129
      src/installer/common/FontFile.cpp
  99. 0 64
      src/installer/common/FontFile.h
  100. 0 6
      src/installer/common/Logger.cpp

+ 0 - 5
src/CMakeLists.txt

@@ -682,20 +682,17 @@ set(VGEARS_SOURCE_FILES
     core/XmlTextFile.cpp
     core/XmlTextsFile.cpp
     core/XmlWalkmeshFile.cpp
-    core/XmlWorldMapFile.cpp
     data/VGearsAFile.cpp
     data/VGearsAFileManager.cpp
     data/VGearsAFileSerializer.cpp
     data/VGearsBackgroundFile.cpp
     data/VGearsBackgroundFileManager.cpp
     data/VGearsBackgroundFileSerializer.cpp
-    data/VGearsBackgroundTextureLoader.cpp
     data/VGearsCameraMatrixFile.cpp
     data/VGearsCameraMatrixFileManager.cpp
     data/VGearsCameraMatrixFileSerializer.cpp
     data/VGearsFLevelBackground2DLoader.cpp
     data/VGearsFLevelFile.cpp
-    data/VGearsFLevelFileManager.cpp
     data/VGearsFLevelFileSerializer.cpp
     data/VGearsFLevelTextureLoader.cpp
     data/VGearsHRCFile.cpp
@@ -731,7 +728,6 @@ set(VGEARS_SOURCE_FILES
     data/worldmap/WorldmapFileManager.cpp
     data/worldmap/WorldmapFileSerializer.cpp
     data/worldmap/TxzFile.cpp
-    data/worldmap/TxzFileManager.cpp
     data/worldmap/TxzFileSerializer.cpp
     map/VGearsBackground2DFile.cpp
     map/VGearsBackground2DFileManager.cpp
@@ -744,7 +740,6 @@ set(VGEARS_SOURCE_FILES
     map/VGearsWalkmeshFileXMLSerializer.cpp
     map/FinalFantasy7/FF7WalkmeshFileSerializer.cpp
     modules/worldmap/WorldmapModule.cpp
-    #viewer/ViewerModule.cpp
 )
 endif()
 

+ 0 - 7
src/FF7Character.cpp

@@ -76,10 +76,3 @@ Character::CharacterIdLookupMap Character::CreateLookupMap(){
 }
 
 const Character::CharacterIdLookupMap Character::character_id_lookup_(Character::CreateLookupMap());
-
-Character::CharacterId Character::GetIdByName(const VGears::String& name){
-    CharacterIdLookupMap::const_iterator entry;
-    entry = character_id_lookup_.find(name);
-    if (entry != character_id_lookup_.end()) return entry->second;
-    return UNKNOWN;
-}

+ 0 - 9
src/FF7Character.h

@@ -88,15 +88,6 @@ class Character{
             UNKNOWN = 9
         };
 
-        /**
-         * Retrieves a character ID from it's name.
-         *
-         * @param[in] name Chaarcter name.
-         * @return ID of the character with the specified name, or {@see
-         * UNKNOWN} if the character doesn't exist.
-         */
-        static CharacterId GetIdByName( const VGears::String& name);
-
     private:
 
         typedef std::map<VGears::String, CharacterId> CharacterIdLookupMap;

+ 0 - 4
src/common/VGearsApplication.cpp

@@ -240,10 +240,6 @@ namespace VGears{
 
     Ogre::RenderWindow* Application::getRenderWindow(){return _render_window;}
 
-    const String& Application::getResourcesFilename(){
-        return resources_filename_;
-    }
-
     String Application::getWindowTitle() const {return VGEARS_VERSION_SIGNATURE;}
 
     bool Application::processCommandLine( int argc, char *argv[]){

+ 0 - 14
src/common/VGearsApplication.h

@@ -82,13 +82,6 @@ namespace VGears{
              */
             bool initOgreHeadless();
 
-            /**
-             * Tells if Ogre was initialized without a render system (see {@see initOgreHeadless}).
-             *
-             * @return True if there is no render system.
-             */
-            bool IsHeadless() const{return _headless;}
-
             /**
              * Retrieves the Ogre system main component.
              *
@@ -108,13 +101,6 @@ namespace VGears{
              */
             Ogre::OverlaySystem* GetOverlaySystem(){return _overlay_system.get();}
 
-            /**
-             * Retrieves the Ogre resources file name.
-             *
-             * @return Ogre resource configuration file name.
-             */
-            const String& getResourcesFilename(void);
-
             /**
              * Retrieves the Ogre resource manager.
              *

+ 0 - 29
src/core/AudioManager.cpp

@@ -113,18 +113,6 @@ void AudioManager::ClearBattle(){battle_track_ = -1;}
 
 void AudioManager::ClearWorld(){tracks_.clear();}
 
-void AudioManager::MusicPause(){
-    boost::recursive_mutex::scoped_lock lock(update_mutex_);
-    if (module_ == Module::BATTLE) battle_music_.Pause();
-    else music_.Pause();
-}
-
-void AudioManager::MusicResume(){
-    boost::recursive_mutex::scoped_lock lock(update_mutex_);
-    if (module_ == Module::BATTLE) battle_music_.Resume();
-    else music_.Resume();
-}
-
 void AudioManager::ScriptPlayMusic(const char* name){
     const Ogre::String name_str = Ogre::String(name);
     MusicPlay(name_str);
@@ -336,23 +324,6 @@ void AudioManager::UpdateBattle(){
 
 void AudioManager::UpdateWorld(){UpdateField();}
 
-const char* AudioManager::ALError(){
-    //ALenum error_code = alGetError();
-    //if (error_code == AL_NO_ERROR)
-        return nullptr;
-    //else return alGetString(error_code);
-}
-
-const char* AudioManager::ALCError(const ALCdevice* device){
-    //const ALCdevice *alc_device =
-    //  ((device == nullptr) ? const_cast< ALCdevice* >(al_device_) :
-    //    const_cast< ALCdevice* >(device));
-    //ALCenum error_code = alcGetError(const_cast< ALCdevice* >(alc_device));
-    //if (error_code == ALC_NO_ERROR)
-        return nullptr;
-    //else return alcGetString(const_cast< ALCdevice* >(device), error_code);
-}
-
 AudioManager::Player::Player(boost::recursive_mutex* mutex):
   loop_(-1.0), vorbis_info_(nullptr), vorbis_section_(0),
   stream_finished_(false), update_mutex_(mutex), source_(0), file_()

+ 0 - 33
src/core/AudioManager.h

@@ -134,23 +134,6 @@ class AudioManager : public Manager, public Ogre::Singleton<AudioManager>{
          */
         void ClearWorld() override;
 
-        /**
-         * Pauses currently playing music.
-         *
-         * If the manager is in battle mode, the battle music player will be paused. If not, the
-         * field or world map player will be paused. Playback can be resumed by calling
-         * {@see MusicResume}.
-         */
-        void MusicPause();
-
-        /**
-         * resumes currently paused music.
-         *
-         * If the manager is in battle mode, the battle music player will be resumed. If not, the
-         * field or world map player will be resumed.
-         */
-        void MusicResume();
-
         /**
          * Plays a music track.
          *
@@ -490,22 +473,6 @@ class AudioManager : public Manager, public Ogre::Singleton<AudioManager>{
          */
         const bool Init();
 
-        /**
-         * Handles errors
-         *
-         * @return nullptr
-         * @todo Implement and get error info.
-         */
-        const char* ALError();
-
-        /**
-         * Handles errors
-         *
-         * @return nullptr
-         * @todo Implement and get error info.
-         */
-        const char* ALCError( const ALCdevice* device );
-
         /**
          * Updates the audio manager while on the field.
          */

+ 0 - 4
src/core/Background2D.cpp

@@ -652,10 +652,6 @@ void Background2D::SetScrollCurrentSeconds(const float seconds){scroll_current_s
 
 float Background2D::GetScrollCurrentSeconds() const{return scroll_current_seconds_;}
 
-void Background2D::SetScreenScroll(const Ogre::Vector2& position){
-    SetScroll(position / screen_scale_);
-}
-
 void Background2D::SetScroll(const Ogre::Vector2& position){
     position_ = ClampScroll(position);
     applyScroll();

+ 0 - 7
src/core/Background2D.h

@@ -321,13 +321,6 @@ class Background2D : public Ogre::RenderQueueListener{
          */
         float GetScrollCurrentSeconds() const;
 
-        /**
-         * Scroll position in screen coordinates.
-         *
-         * @param[in] position Position to set the scroll.
-         */
-        void SetScreenScroll(const Ogre::Vector2& position);
-
         /**
          * Retrieves the scroll position in screen coordinates.
          *

+ 0 - 10
src/core/CameraManager.cpp

@@ -326,16 +326,6 @@ Ogre::Camera* CameraManager::GetCurrentCamera(){return camera_;}
 
 Ogre::Viewport* CameraManager::getViewport(){return viewport_;}
 
-void CameraManager::EnableWireFrame(bool enable){
-    if (camera_){
-        //camera_->setPolygonMode(Ogre::PM_WIREFRAME);
-        //camera_->rotate(
-        //  Ogre::Vector3::UNIT_Z, Ogre::Radian(Ogre::Degree(180))
-        //);
-        camera_->setFarClipDistance(900000000);
-    }
-}
-
 void CameraManager::ScriptSetCamera(
   const int x, const int y, const int z, const int d_x, const int d_y, const int d_z
 ){

+ 0 - 9
src/core/CameraManager.h

@@ -223,15 +223,6 @@ class CameraManager : public Manager, public Ogre::Singleton<CameraManager>{
          */
         Ogre::Viewport* getViewport();
 
-        /**
-         * Enables or disables the camera wireframe.
-         *
-         * In wireframe mode, faces will not be rendered, only edges
-         *
-         * @param[in] enable True to enable wireframe mode, false to disable.
-         */
-        void EnableWireFrame(bool enable);
-
         /**
          * Sets the camera position and orientation.
          *

+ 0 - 2
src/core/ConfigCmd.cpp

@@ -30,8 +30,6 @@ const Ogre::String& ConfigCmd::GetName() const{return name_;}
 
 const Ogre::String& ConfigCmd::GetDescription() const{return description_;}
 
-const Ogre::String& ConfigCmd::GetParamsDescription() const{return params_description_;}
-
 ConfigCmdParams ConfigCmd::GetHandler() const{return params_;}
 
 ConfigCmdCompletion ConfigCmd::GetCompletion() const{return completion_;}

+ 0 - 7
src/core/ConfigCmd.h

@@ -65,13 +65,6 @@ class ConfigCmd{
          */
         const Ogre::String& GetDescription() const;
 
-        /**
-         * Retrieves the command parameter description.
-         *
-         * @return The command parameter description.
-         */
-        const Ogre::String& GetParamsDescription() const;
-
         /**
          * Retrieves the command parameter description.
          *

+ 0 - 2
src/core/ConfigCmdHandler.cpp

@@ -41,8 +41,6 @@ void ConfigCmdHandler::AddCommand(
     ));
 }
 
-void ConfigCmdHandler::ExecuteString(const Ogre::String& cmd_string){}
-
 ConfigCmd* ConfigCmdHandler::Find(const Ogre::String& name) const{
     for (unsigned int i = 0; i < commands_.size(); ++ i)
         if (commands_[i]->GetName() == name) return commands_[i].get();

+ 0 - 7
src/core/ConfigCmdHandler.h

@@ -52,13 +52,6 @@ class ConfigCmdHandler : public Ogre::Singleton<ConfigCmdHandler>{
           ConfigCmdCompletion completion
         );
 
-        /**
-         * Executes a command.
-         *
-         * @param[in] cmd_string The command, in string format.
-         */
-        void ExecuteString( const Ogre::String& cmd_string );
-
         /**
          * Finds a command by name.
          *

+ 0 - 51
src/core/ConfigCmdHandlerCommands.h

@@ -459,54 +459,6 @@ void CmdNFade(const Ogre::StringVector& params){
     );
 }
 
-/*
-void CmdViewer(const Ogre::StringVector& params){
-    if (params.size() == 2 || params.size() > 3){
-        Console::getSingleton().AddTextToOutput(
-          "Usage: /viewer [type_of_thing_to_view] [path_to_resource]"
-        );
-        return;
-    }
-    ModuleManager::getSingleton().RunViewer();
-    if (params.size() == 3){
-        ViewerModule* module
-          = (ViewerModule*)(ModuleManager::getSingleton().GetTopModule());
-
-        if (params[1] == "walkmesh") module->SetWalkmeshToLoad(params[2]);
-        else if (params[1] == "model") module->SetModelToLoad(params[2]);
-        else{
-            LOG_ERROR(
-              "Unsupported type \"" + params[1] + "\" in viewer command."
-            );
-        }
-    }
-}
-
-void CmdViewerCompletion(Ogre::StringVector& complete_params){
-    // models
-    complete_params.push_back("model");
-    Ogre::FileInfoListPtr resources
-      = Ogre::ResourceGroupManager::getSingleton().listResourceFileInfo("Game");
-    Ogre::FileInfoList resource_names = *resources;
-
-    Ogre::FileInfoList::iterator i = resource_names.begin();
-    for (; i != resource_names.end(); ++ i){
-        Ogre::String name;
-        Ogre::String ext;
-        Ogre::StringUtil::splitBaseFilename(i->filename, name, ext);
-        if (ext == "mesh") complete_params.push_back("model " + i->filename);
-    }
-
-    // walkmeshes
-    complete_params.push_back("walkmesh");
-    XmlMapsFile xml("./data/game_data/maps.xml");
-    Ogre::StringVector tmp;
-    xml.GetMapNames(tmp);
-    for (int i = 0; i < tmp.size(); ++i)
-        complete_params.push_back("walkmesh " + tmp[i]);
-}
-*/
-
 /**
  * Initializes all available commands.
  */
@@ -537,7 +489,4 @@ void ConfigCmdHandler::InitCmd(){
     AddCommand("screenshot", "Capture current screen content", "", CmdScreenshot, NULL);
     AddCommand("fade", "Start a screen fade", "<type> <r> <g> <b> <speed>", CmdFade, NULL);
     AddCommand("nfade", "Start a screen nfade", "<type> <r> <g> <b> <frames>", CmdNFade, NULL);
-    //AddCommand(
-    //  "viewer", "Run viewer module", "", CmdViewer, CmdViewerCompletion
-    //);
 }

+ 0 - 10
src/core/ConfigVar.cpp

@@ -46,21 +46,11 @@ bool ConfigVar::GetB() const{return value_b_;}
 
 Ogre::String ConfigVar::GetS() const{return value_s_;}
 
-void ConfigVar::SetI(int value){
-    value_s_ = Ogre::StringConverter::toString(value);
-    UpdateVariables();
-}
-
 void ConfigVar::SetF(float value){
     value_s_ = Ogre::StringConverter::toString(value);
     UpdateVariables();
 }
 
-void ConfigVar::SetB(bool value){
-    value_s_ = Ogre::StringConverter::toString(value);
-    UpdateVariables();
-}
-
 void ConfigVar::SetS(const Ogre::String& value){
     value_s_ = value;
     UpdateVariables();

+ 0 - 14
src/core/ConfigVar.h

@@ -67,13 +67,6 @@ class ConfigVar{
          */
         Ogre::String GetS() const;
 
-        /**
-         * Sets the integer value of the variable.
-         *
-         * @param[in] value The variable value.
-         */
-        void SetI(int value);
-
         /**
          * Sets the float value of the variable.
          *
@@ -81,13 +74,6 @@ class ConfigVar{
          */
         void SetF(float value);
 
-        /**
-         * Sets the boolean value of the variable.
-         *
-         * @param[in] value The variable value.
-         */
-        void SetB(bool value);
-
         /**
          * Sets the string value of the variable.
          *

+ 0 - 39
src/core/DebugDraw.cpp

@@ -179,45 +179,6 @@ void DebugDraw::Line3d(const Ogre::Vector3& point1, const Ogre::Vector3& point2)
 }
 
 
-void DebugDraw::Triangle3d(
-  const Ogre::Vector3& point1, const Ogre::Vector3& point2, const Ogre::Vector3& point3
-){
-    if (triangle_3d_render_operation_.vertexData->vertexCount + 3 > triangle_3d_max_vertex_){
-        LOG_ERROR(
-          "Max number of 3d triangles reached. Can't create more than "
-          + Ogre::StringConverter::toString(triangle_3d_max_vertex_ / 3) + " 3d triangles."
-        );
-        return;
-    }
-    float* write_iterator = static_cast<float*>(triangle_3d_vertex_buffer_->lock(
-        Ogre::HardwareBuffer::HBL_NORMAL
-    ));
-    write_iterator += triangle_3d_render_operation_.vertexData->vertexCount * 7;
-    *write_iterator ++ = point1.x;
-    *write_iterator ++ = point1.y;
-    *write_iterator ++ = point1.z;
-    *write_iterator ++ = colour_.r;
-    *write_iterator ++ = colour_.g;
-    *write_iterator ++ = colour_.b;
-    *write_iterator ++ = colour_.a;
-    *write_iterator ++ = point2.x;
-    *write_iterator ++ = point2.y;
-    *write_iterator ++ = point2.z;
-    *write_iterator ++ = colour_.r;
-    *write_iterator ++ = colour_.g;
-    *write_iterator ++ = colour_.b;
-    *write_iterator ++ = colour_.a;
-    *write_iterator ++ = point3.x;
-    *write_iterator ++ = point3.y;
-    *write_iterator ++ = point3.z;
-    *write_iterator ++ = colour_.r;
-    *write_iterator ++ = colour_.g;
-    *write_iterator ++ = colour_.b;
-    *write_iterator ++ = colour_.a;
-    triangle_3d_render_operation_.vertexData->vertexCount += 3;
-    triangle_3d_vertex_buffer_->unlock();
-}
-
 void DebugDraw::Quad(
   const float x1, const float y1, const float x2, const float y2,
   const float x3, const float y3, const float x4, const float y4

+ 0 - 16
src/core/DebugDraw.h

@@ -125,22 +125,6 @@ class DebugDraw : public Ogre::RenderQueueListener, public Ogre::Singleton<Debug
          */
         void Line3d(const Ogre::Vector3& point1, const Ogre::Vector3& point2);
 
-        /**
-         * Draws a triangle in 3D space.
-         *
-         * If the debug vertex limit has been reached or if it would be
-         * exceeded by drawing the triangle, a warning message will be printed
-         * and nothing will be done.
-         *
-         * @param[in] point1 A triangle vertex point.
-         * @param[in] point2 A triangle vertex point.
-         * @param[in] point3 A triangle vertex point.
-         */
-        void Triangle3d(
-          const Ogre::Vector3& point1, const Ogre::Vector3& point2,
-          const Ogre::Vector3& point3
-        );
-
         /**
          * Draws a quad in 2D space.
          *

+ 0 - 26
src/core/Enemy.cpp

@@ -119,40 +119,28 @@ unsigned int Enemy::GetMoney() const{return money_;}
 
 void Enemy::SetMoney(const unsigned int money){money_ = money;}
 
-std::vector<unsigned int> Enemy::GetAnimations() const{return animations_;}
-
 void Enemy::AddAnimation(const unsigned int animation){animations_.push_back(animation);}
 
 std::vector<Enemy::Attack> Enemy::GetAttacks() const{return attacks_;}
 
 void Enemy::AddAttack(const Attack attack){attacks_.push_back(attack);}
 
-std::vector<Enemy::Item> Enemy::GetDrop() const{return drop_;}
-
 void Enemy::AddDrop(const Item item){drop_.push_back(item);}
 
-std::vector<Enemy::Element> Enemy::GetElements() const{return elements_;}
-
 void Enemy::AddElement(const Element element){elements_.push_back(element);}
 
-std::vector<Enemy::Immunity> Enemy::GetImmunities() const{return immunities_;}
-
 void Enemy::AddImmunity(const Immunity immunity){immunities_.push_back(immunity);}
 
 std::vector<unsigned int> Enemy::GetManipulateAttacks() const{return manipulate_attacks_;}
 
 void Enemy::AddManipulateAttack(const unsigned int attack){manipulate_attacks_.push_back(attack);}
 
-std::vector<Enemy::Item> Enemy::GetSteal() const{return steal_;}
-
 void Enemy::AddSteal(const Item item){steal_.push_back(item);}
 
 unsigned int Enemy::GetMorph() const{return morph_;}
 
 void Enemy::SetMorph(const int morph){morph_ = std::max(-1, morph);}
 
-float Enemy::GetBackDamage() const{return back_damage_;}
-
 void Enemy::SetBackDamage(const float back_damage){
     if (back_damage < 0.0f) back_damage_ = 0.0f;
     else back_damage_ = back_damage;
@@ -188,8 +176,6 @@ void Enemy::SetEva(const unsigned int eva){eva_ = eva;}
 
 unsigned int Enemy::GetMeva() const{return meva_;}
 
-void Enemy::SetMeva(const unsigned int meva){meva_ = meva;}
-
 unsigned int Enemy::GetHp() const{return hp_;}
 
 void Enemy::SetHp(const unsigned int hp){hp_ = std::min(hp, hp_max_);}
@@ -214,32 +200,20 @@ void Enemy::SetMpMax(const unsigned int mp_max){
 
 Ogre::Vector3& Enemy::GetPos(){return pos_;}
 
-void Enemy::SetPos(const Ogre::Vector3 &pos){pos_ = pos;}
-
 std::tuple<float, float, float> Enemy::ScriptGetPos() const{
     return std::make_tuple(pos_.x, pos_.y, pos_.z);
 }
 
 bool Enemy::IsFront() const{return front_;}
 
-void Enemy::SetFront(bool front){front_ = front;}
-
 bool Enemy::IsVisible() const{return visible_;}
 
 void Enemy::SetVisible(bool visible){visible_ = visible;}
 
 bool Enemy::IsTargeteable() const{return targeteable_;}
 
-void Enemy::SetTargeteable(bool targeteable){targeteable_ = targeteable;}
-
 bool Enemy::IsActive() const{return active_;}
 
-void Enemy::SetActive(bool active){active_ = active;}
-
-std::string Enemy::GetCover() const{return cover_;}
-
-void Enemy::SetCover(std::string cover){cover_ = cover;}
-
 int Enemy::ScriptGetAttackCount(){return attacks_.size();}
 
 int Enemy::ScriptGetAttack(const unsigned int index){

+ 0 - 97
src/core/Enemy.h

@@ -236,13 +236,6 @@ class Enemy{
          */
         void SetMoney(const unsigned int money);
 
-        /**
-         * Retrieves the enemy animation IDs.
-         *
-         * @return The list of animation IDs
-         */
-        std::vector<unsigned int> GetAnimations() const;
-
         /**
          * Adds an animation for the enemy.
          *
@@ -264,13 +257,6 @@ class Enemy{
          */
         void AddAttack(const Attack attack);
 
-        /**
-         * Retrieves the enemy possible item drops.
-         *
-         * @return List of items that can be dropped by the enemy.
-         */
-        std::vector<Item> GetDrop() const;
-
         /**
          * Adds an item drop for the enemy.
          *
@@ -278,13 +264,6 @@ class Enemy{
          */
         void AddDrop(const Item item);
 
-        /**
-         * Retrieves the list of the enemy elemental affinities.
-         *
-         * @return The list of elemental affinities.
-         */
-        std::vector<Element> GetElements() const;
-
         /**
          * Adds an elemental affinity to the monster.
          *
@@ -292,13 +271,6 @@ class Enemy{
          */
         void AddElement(const Element element);
 
-        /**
-         * Retrieves the list of status immunities.
-         *
-         * @return The list of status immunities.
-         */
-        std::vector<Immunity> GetImmunities() const;
-
         /**
          * Adds an immunity to the monster.
          *
@@ -323,13 +295,6 @@ class Enemy{
          */
         void AddManipulateAttack(const unsigned int attack);
 
-        /**
-         * Retrieves the enemy possible item stelas.
-         *
-         * @return List of items that can be stolen from the enemy.
-         */
-        std::vector<Item> GetSteal() const;
-
         /**
          * Adds an item steal to the enemy.
          *
@@ -351,13 +316,6 @@ class Enemy{
          */
         void SetMorph(const int morph);
 
-        /**
-         * Retrieves the multiplier for the damage the enemy receives when attacked from the back.
-         *
-         * @return Back attack damage multiplier.
-         */
-        float GetBackDamage() const;
-
         /**
          * Sets the multiplier for the damage the enemy receives when attacked from the back.
          *
@@ -470,13 +428,6 @@ class Enemy{
          */
         unsigned int GetMeva() const;
 
-        /**
-         * Sets the enemy's magic evasion stat.
-         *
-         * @param[in] meva The magic evasion stat.
-         */
-        void SetMeva(const unsigned int meva);
-
         /**
          * Retrieves the enemy's current HP.
          *
@@ -552,13 +503,6 @@ class Enemy{
          */
         Ogre::Vector3& GetPos();
 
-        /**
-         * Sets the enemy position in the battlefield.
-         *
-         * @param[in] pos The enemy position (x, y, z).
-         */
-        void SetPos(const Ogre::Vector3 &pos);
-
         /**
          * Retrieves the enemy position.
          *
@@ -573,13 +517,6 @@ class Enemy{
          */
         bool IsFront() const;
 
-        /**
-         * Sets the enemy in or out the front row.
-         *
-         * @param[in] front True to set the enemy in the front row, false for the back row.
-         */
-        void SetFront(bool front);
-
         /**
          * Checks the enemy visibility.
          *
@@ -601,13 +538,6 @@ class Enemy{
          */
         bool IsTargeteable() const;
 
-        /**
-         * Determines whether the enemy can be targeted.
-         *
-         * @param[in] targeteable True to allow targeting the enemy false to prevent it.
-         */
-        void SetTargeteable(bool targeteable);
-
         /**
          * Checks whether the enemy's main script is active.
          *
@@ -615,33 +545,6 @@ class Enemy{
          */
         bool IsActive() const;
 
-        /**
-         * Activates or deactivates the enemy main script.
-         *
-         * @param[in] active True to activate the script, false to deactivate it.
-         */
-        void SetActive(bool active);
-
-        /**
-         * Retrieves the flags for enemy covering.
-         *
-         * {@see https://wiki.ffrtt.ru/index.php/FF7/Battle/Battle_Scenes#Binary_.22Cover_Flags.22}
-         * for more info about cover flags.
-         *
-         * @return A string with five 0s or 1s indicating the cover flags.
-         */
-        std::string GetCover() const;
-
-        /**
-         * Sets the flags for enemy covering.
-         *
-         * {@see https://wiki.ffrtt.ru/index.php/FF7/Battle/Battle_Scenes#Binary_.22Cover_Flags.22}
-         * for more info about cover flags.
-         *
-         * @param[in] cover A string with five 0s or 1s indicating the cover flags.
-         */
-        void SetCover(std::string cover);
-
         /**
          * Retrieves the number of attacks of the enemy.
          *

+ 0 - 4
src/core/Entity.cpp

@@ -375,12 +375,8 @@ void Entity::SetMoveAutoSpeed(const float speed){move_auto_speed_ = speed;}
 
 float Entity::GetMoveAutoSpeed() const{return move_auto_speed_;}
 
-void Entity::SetMoveWalkSpeed(const float speed){move_walk_speed_ = speed;}
-
 float Entity::GetMoveWalkSpeed() const{return move_walk_speed_;}
 
-void Entity::SetMoveRunSpeed(const float speed){move_run_speed_ = speed;}
-
 float Entity::GetMoveRunSpeed() const{return move_run_speed_;}
 
 void Entity::SetMovePosition(const Ogre::Vector3& target){

+ 0 - 18
src/core/Entity.h

@@ -641,15 +641,6 @@ class Entity{
          */
         float GetMoveAutoSpeed() const;
 
-        /**
-         * Sets the entity's walking movement speed.
-         *
-         * @param[in] speed Walking speed.
-         * @todo Describe where this speed is used, and max and mins or
-         * references.
-         */
-        void SetMoveWalkSpeed(const float speed);
-
         /**
          * Retrieves the entity's walking speed.
          *
@@ -659,15 +650,6 @@ class Entity{
          */
         float GetMoveWalkSpeed() const;
 
-        /**
-         * Sets the entity's running movement speed.
-         *
-         * @param[in] speed Running speed.
-         * @todo Describe where this speed is used, and max and mins or
-         * references.
-         */
-        void SetMoveRunSpeed(const float speed);
-
         /**
          * Retrieves the entity's running speed.
          *

+ 0 - 18
src/core/EntityManager.cpp

@@ -551,14 +551,6 @@ void EntityManager::RemoveWorldMapEntity(const Ogre::String& name){
     }
 }
 
-Entity* EntityManager::GetBackground3D() const{
-    if (IsFieldModule()){
-        LOG_WARNING("Tried to retrieve a 3D background while the EntityManager is in field mode.");
-        return nullptr;
-    }
-    return background_3d_;
-}
-
 void EntityManager::SetBackground3D(const Ogre::String& name, const Ogre::String& file_name){
     if (IsFieldModule()){
         LOG_ERROR("Tried to add a 3D background while the EntityManager is in field mode.");
@@ -949,16 +941,12 @@ void EntityManager::SetPlayerMoveRotation(const Ogre::Radian rotation){
     player_move_rotation_ = rotation;
 }
 
-bool EntityManager::GetRandomEncounters(){return random_encounters_;}
-
 float EntityManager::GetEncounterMultiplier() const{return cv_encounter_multiplier.GetF();}
 
 bool EntityManager::IsDebugEncounters() const{return cv_debug_encounters.GetB();}
 
 void EntityManager::SetRandomEncounters(bool active){random_encounters_ = active;}
 
-float EntityManager::GetEncounterRate(){return encounter_rate_;}
-
 void EntityManager::HideFieldEntities(){
     entities_hidden_by_battle_.clear();
     for (Entity* entity : entity_){
@@ -1074,12 +1062,6 @@ void EntityManager::UpdateEncounters(const bool walked){
     }
 }
 
-void EntityManager::SetEncounterRate(float rate){
-    if (rate >= 1.0f) encounter_rate_ = 1.0f;
-    else if (rate <= 0.0f) encounter_rate_ = 0.0f;
-    else encounter_rate_ = rate;
-}
-
 bool EntityManager::IsStartKeyRead() const{
     return std::chrono::steady_clock::now() - start_key_read_time_ < std::chrono::milliseconds(300);
 }

+ 0 - 36
src/core/EntityManager.h

@@ -447,13 +447,6 @@ class EntityManager : public Manager, public Ogre::Singleton<EntityManager>{
          */
         void SetPlayerMoveRotation(const Ogre::Radian rotation);
 
-        /**
-         * Checks if random battle encounters are active in the field.
-         *
-         * @return True if random battles can occur, false otherwise.
-         */
-        bool GetRandomEncounters();
-
         /**
          * Gets the multiplier of the random encounter rate (the encounter_multiplier cvar).
          *
@@ -475,20 +468,6 @@ class EntityManager : public Manager, public Ogre::Singleton<EntityManager>{
          */
         void SetRandomEncounters(bool active);
 
-        /**
-         * Get the encounter rate for the field.
-         *
-         * @return The encounter rate, between 0 and 1 (both included).
-         */
-        float GetEncounterRate();
-
-        /**
-         * Sets the battle encounter rate.
-         *
-         * @param[in] rate The encounter rate (0-1).
-         */
-        void SetEncounterRate(float rate);
-
         /**
          * Removes the random encounter tables of the field.
          */
@@ -590,13 +569,6 @@ class EntityManager : public Manager, public Ogre::Singleton<EntityManager>{
          */
         void SetEntityToCharacter(const char* entity_name, unsigned int char_id);
 
-        /**
-         * Retrieves the entity associated to the 3D background.
-         *
-         * @return The 3D background entity. nullptr if not set, of if the manager is in field mode.
-         */
-        Entity* GetBackground3D() const;
-
         /**
          * Sets the 3D model for the background.
          *
@@ -779,14 +751,6 @@ class EntityManager : public Manager, public Ogre::Singleton<EntityManager>{
          */
         bool CheckSolidCollisions(Entity* entity, Ogre::Vector3& position);
 
-        /**
-         * Sets an entity direction
-         *
-         * @param[in] entity Entity whose direction is to be set.
-         * @param[in] vector Direction vector.
-         */
-        void SetEntityDirectionByVector(Entity* entity, const Ogre::Vector2& vector);
-
         /**
          * Checks for entity triggers near a entity.
          *

+ 0 - 2
src/core/EntityTrigger.cpp

@@ -95,8 +95,6 @@ void EntityTrigger::DecreaseNearEventCooldown(){
 
 void EntityTrigger::ResetNearEventCooldown(){near_event_cooldown_ = NEAR_EVENT_COOLDOWN_FRAMES;}
 
-void EntityTrigger::ClearNearEventCooldown(){near_event_cooldown_ = 0;}
-
 void EntityTrigger::Clear(){
     approached_ = false;
     crossed_ = false;

+ 0 - 11
src/core/EntityTrigger.h

@@ -176,17 +176,6 @@ class EntityTrigger{
          */
         void ResetNearEventCooldown();
 
-        /**
-         * Sets the cooldown time required between calls to on_near event to 0.
-         *
-         * After the on_near script is run, a cooltime of a number of frames is set before running
-         * it again. This is because most of the time this trigger checks for a key, and if its
-         * pressed, is run multiple times.
-         *
-         * Must be called whent the playable entity gets away from the line
-         */
-        void ClearNearEventCooldown();
-
         /**
          * Clears the proximity statuses and event triggering statuses.
          *

+ 0 - 8
src/core/Manager.cpp

@@ -25,8 +25,6 @@ Manager::~Manager(){}
 
 Manager::Module Manager::GetModule() const{return module_;}
 
-bool Manager::IsModule(Module module) const{return (module_ == module);}
-
 bool Manager::IsFieldModule() const{return (module_ == Module::FIELD);}
 
 bool Manager::IsBattleModule() const{return (module_ == Module::BATTLE);}
@@ -108,10 +106,4 @@ void Manager::Clear(const Module module){
     }
 }
 
-void Manager::ClearAll(){
-    ClearField();
-    ClearBattle();
-    ClearWorld();
-}
-
 void Manager::ScriptSetPaused(const bool paused){paused_ = paused;}

+ 0 - 18
src/core/Manager.h

@@ -69,15 +69,6 @@ class Manager{
          */
         Module GetModule() const;
 
-        /**
-         * Checks the currently selected module.
-         *
-         * @param[in] module The module to check.
-         * @return True if the currently selected module matches the module to check, false
-         * otherwise.
-         */
-        bool IsModule(const Module module) const;
-
         /**
          * Checks if the currently selected module is the field module.
          *
@@ -202,15 +193,6 @@ class Manager{
          */
         virtual void ClearWorld() = 0;
 
-        /**
-         * Clears the manager.
-         *
-         * Clears the entity manager for every module. Check {@see ClearField()},
-         * {@see ClearBattle()}, {@see ClearWorld()} for information about what this does
-         * depending on the currently loaded module.
-         */
-        void ClearAll();
-
         /**
          * Handles game pausing.
          *

+ 0 - 51
src/core/Savemap.h

@@ -825,57 +825,6 @@ class Savemap{
                 static constexpr unsigned int MP = 7;
         };
 
-        /**
-         * Window corners.
-         */
-        class CORNER{
-
-            public:
-
-                /**
-                 * Top left window corner.
-                 */
-                static constexpr unsigned int T_L = 0;
-
-                /**
-                 * Top right window corner.
-                 */
-                static constexpr unsigned int T_R = 1;
-
-                /**
-                 * Bottom right window corner.
-                 */
-                static constexpr unsigned int B_R = 2;
-
-                /**
-                 * Bottom left window corner.
-                 */
-                static constexpr unsigned int B_L = 3;
-        };
-
-        /**
-         * Colour codes
-         */
-        class COLOUR{
-
-            public:
-
-                /**
-                 * Red colour.
-                 */
-                static constexpr unsigned int R = 0;
-
-                /**
-                 * Green colour.
-                 */
-                static constexpr unsigned int G = 1;
-
-                /**
-                 * Blue colour.
-                 */
-                static constexpr unsigned int B = 2;
-        };
-
     private:
 
         /**

+ 0 - 5
src/core/SavemapHandler.cpp

@@ -43,11 +43,6 @@ Savemap* SavemapHandler::GetSavemap(unsigned int slot){
     return saved_savemaps_[slot];
 }
 
-std::vector<Savemap*> SavemapHandler::GetSavemaps(){
-    if (!savemaps_read_) ReadSavemaps();
-    return saved_savemaps_;
-}
-
 bool SavemapHandler::Save(unsigned int slot, const bool force){
     if (current_savemap_ == nullptr) return false;
     if (slot >= MAX_SAVE_SLOTS) return false;

+ 0 - 5
src/core/SavemapHandler.h

@@ -58,11 +58,6 @@ class SavemapHandler : public Ogre::Singleton<SavemapHandler>{
          */
         Savemap* GetSavemap(unsigned int slot);
 
-        /**
-         * Retrieves a list of the saved maps.
-         */
-        std::vector<Savemap*> GetSavemaps();
-
         /**
          * Copies the current savemap to a slot and writes the file.
          *

+ 0 - 5
src/core/ScriptManager.cpp

@@ -765,11 +765,6 @@ bool ScriptManager::ScriptRequest(
     return false;
 }
 
-void ScriptManager::AddValueToStack(const float value){
-    QueueScript* script = GetScriptByScriptId(current_script_id_);
-    if (script != nullptr) lua_pushnumber(script->state, value);
-}
-
 void ScriptManager::UpdateField(){}
 
 void ScriptManager::UpdateBattle(){}

+ 0 - 8
src/core/ScriptManager.h

@@ -447,14 +447,6 @@ class ScriptManager : public Manager, public Ogre::Singleton<ScriptManager>{
           const Ogre::String& argument3 = "", bool allow_duplicate = false
         );
 
-        /**
-         * Adds a script to the stack.
-         *
-         * @param[in] value ID of the script to add.
-         * @todo Verify this documentation.
-         */
-        void AddValueToStack(const float value);
-
     private:
 
         /**

+ 0 - 5
src/core/UiWidget.cpp

@@ -474,11 +474,6 @@ void UiWidget::SetX(const float percent, const float x){
     SetUpdateTransformation();
 }
 
-void UiWidget::GetX(float& percent, float& x){
-    percent = x_percent_;
-    x = x_;
-}
-
 void UiWidget::SetY(const float percent, const float y){
     y_percent_ = percent;
     y_ = y;

+ 0 - 8
src/core/UiWidget.h

@@ -367,14 +367,6 @@ class UiWidget{
          */
         void SetX(const float percent, const float x);
 
-        /**
-         * Retrieves the X coordinate for the widget.
-         *
-         * @param[out] percent @todo
-         * @param[out] x The X coordinate will be loaded here.
-         */
-        void GetX(float& percent, float& x);
-
         /**
          * Sets the Y coordinate for the widget.
          *

+ 0 - 5
src/core/Utilites.cpp

@@ -150,11 +150,6 @@ float ParseKeyFrameTime(const float length, const Ogre::String& string){
     return res;
 }
 
-const Ogre::String CreateAutoName(const Ogre::String prefix){
-    static int enumerator = 0;
-    return prefix + Ogre::StringConverter::toString(enumerator ++);
-}
-
 /**
  * Relates key codes and their names.
  */

+ 0 - 9
src/core/Utilites.h

@@ -185,15 +185,6 @@ void ParsePercent(float& value_percent, float& value, const Ogre::String& string
  */
 float ParseKeyFrameTime(const float length, const Ogre::String& string);
 
-/**
- * Creates a name.
- *
- * @param[in] prefix Name prefix.
- * @return PREFIX + "0".
- * @todo This seems so simple, am I missing something?
- */
-const Ogre::String CreateAutoName(const Ogre::String prefix);
-
 /**
  * Obtains a name from a key code.
  *

+ 0 - 22
src/core/WorldMapManager.cpp

@@ -67,28 +67,6 @@ void WorldMapManager::ClearWorld(){
     // TODO
 }
 
-void WorldMapManager::AddTerrain(
-  const unsigned int index, const Ogre::String mesh, const Ogre::Vector3 pos
-){
-    if (module_ != Module::WORLD){
-        LOG_ERROR(
-          "Tried to add terrain to the WorldMapManager, but the manager was not in world map mode."
-        );
-        return;
-    }
-    /*Enemy* enemy = new Enemy(id, pos, front, visible, targeteable, active, cover);
-    enemies_.push_back(*enemy);
-    EntityManager::getSingleton().AddEntity(
-      enemy->GetName() + "_" + std::to_string(enemies_.size() - 1),
-      "enemies/" + enemy->GetModel() + ".mesh", enemy->GetPos(), Ogre::Degree(1),
-      Ogre::Vector3(ENEMY_SCALE, ENEMY_SCALE, ENEMY_SCALE), Ogre::Quaternion(1, 1, 0, 0), id
-    );
-    EntityManager::getSingleton().GetEntity(
-      enemy->GetName() + "_" + std::to_string(enemies_.size() - 1)
-    )->SetRotation(Ogre::Degree(180));
-    */
-}
-
 void WorldMapManager::UpdateField(){}
 
 void WorldMapManager::UpdateBattle(){}

+ 0 - 11
src/core/WorldMapManager.h

@@ -74,17 +74,6 @@ class WorldMapManager : public Manager, public Ogre::Singleton<WorldMapManager>{
          */
         void ClearWorld() override;
 
-        /**
-         * Adds a terrain block.
-         *
-         * @param[in] index Block index.
-         * @param[in] mesh Path to the mesh file.
-         * @param[in] pos Terrain position (x, y, z).
-         */
-        void AddTerrain(
-          const unsigned int id, const Ogre::String mesh, const Ogre::Vector3 pos
-        );
-
     private:
 
         /**

+ 0 - 19
src/core/XmlMapFile.cpp

@@ -147,22 +147,3 @@ void XmlMapFile::LoadMap(){
         node = node->NextSibling();
     }
 }
-
-const Ogre::String XmlMapFile::GetWalkmeshFileName(){
-    TiXmlNode* node = file_.RootElement();
-    if (node == nullptr || node->ValueStr() != "map"){
-        LOG_ERROR(
-          "Field Map XML Manager: " + file_.ValueStr()
-          + " is not a valid fields map file! No <map> in root."
-        );
-        return "";
-    }
-    node = node->FirstChild();
-    while (node != nullptr){
-        if (node->Type() == TiXmlNode::TINYXML_ELEMENT && node->ValueStr() == "walkmesh")
-            return GetString(node, "file_name");
-        node = node->NextSibling();
-    }
-    LOG_WARNING("Can't find field's walkmesh in " + file_.ValueStr() + ".");
-    return "";
-}

+ 0 - 7
src/core/XmlMapFile.h

@@ -41,11 +41,4 @@ class XmlMapFile : public XmlFile{
          */
         void LoadMap();
 
-        /**
-         * Retrieves the path to the map walkmesh file.
-         *
-         * @return The path to the map walkmesh file. If there is no walkmesh associated to the
-         * map, an error  message will be written to console and an empty string will be returned.
-         */
-        const Ogre::String GetWalkmeshFileName();
 };

+ 0 - 144
src/core/XmlWorldMapFile.cpp

@@ -1,144 +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 "core/AudioManager.h"
-#include "core/EntityManager.h"
-#include "core/Logger.h"
-#include "core/ScriptManager.h"
-#include "core/WorldMapManager.h"
-#include "core/XmlBackground2DFile.h"
-#include "core/XmlWorldMapFile.h"
-#include "map/VGearsBackground2DFileManager.h"
-#include "map/VGearsWalkmeshFileManager.h"
-#include "TextHandler.h"
-
-XmlWorldMapFile::XmlWorldMapFile(const Ogre::String& file): XmlFile(file){}
-
-XmlWorldMapFile::~XmlWorldMapFile(){}
-
-void XmlWorldMapFile::LoadWorldMap(const unsigned int current_progress){
-    TiXmlNode* node = file_.RootElement();
-    if (node == nullptr || node->ValueStr() != "world_map"){
-        LOG_ERROR(file_.ValueStr() + " is not a valid fields map file! No <world_map> in root.");
-        return;
-    }
-    node = node->FirstChild();
-    while (node != nullptr){
-        if (node->Type() == TiXmlNode::TINYXML_ELEMENT && node->ValueStr() == "walkmesh"){
-            Ogre::String name(GetString(node, "file_name"));
-            if (!name.empty()){
-                VGears::WalkmeshFileManager::getSingleton();
-                VGears::WalkmeshFilePtr walkmesh = VGears::WalkmeshFileManager::getSingleton()
-                  .load(name, "FIELDS").staticCast<VGears::WalkmeshFile>();
-                EntityManager::getSingleton().GetWalkmesh()->load(walkmesh);
-            }
-        }
-        else if (node->Type() == TiXmlNode::TINYXML_ELEMENT && node->ValueStr() == "background2d"){
-            Ogre::String name = GetString(node, "file_name");
-            if (name != ""){
-                // TODO Migrate this code to a Resource and use it's group to load the background.
-                VGears::Background2DFilePtr background
-                  = VGears::Background2DFileManager::getSingleton()
-                    .load(name, "FIELDS").staticCast<VGears::Background2DFile>();
-                EntityManager::getSingleton().GetBackground2D()->load(background);
-            }
-        }
-        else if (node->Type() == TiXmlNode::TINYXML_ELEMENT && node->ValueStr() == "texts"){
-            TextHandler::getSingleton().LoadFieldText(GetString(node, "file_name"));
-        }
-        else if (node->Type() == TiXmlNode::TINYXML_ELEMENT && node->ValueStr() == "terrain"){
-            TiXmlNode* terrain_node = node->FirstChild();
-            while (terrain_node != nullptr){
-                if (terrain_node->ValueStr() == "block"){
-                    int index(GetInt(terrain_node, "index"));
-                    Ogre::String file_name(GetString(terrain_node, "file_name"));
-                    Ogre::Vector3 position(GetVector3(node, "position"));
-                    Ogre::String alt_file_name(GetString(terrain_node, "alt_file_name", ""));
-                    int alt_story_change(GetInt(terrain_node, "alt_story_change", -1));
-                    // TODO: Get current story point and determine whether to load alt models.
-                    if ("" != alt_file_name && alt_story_change > current_progress)
-                        WorldMapManager::getSingleton().AddTerrain(index, alt_file_name, position);
-                    else WorldMapManager::getSingleton().AddTerrain(index, file_name, position);
-
-
-                }
-                terrain_node = terrain_node->NextSibling();
-            }
-        }
-        else if (node->Type() == TiXmlNode::TINYXML_ELEMENT && node->ValueStr() == "entity_model"){
-            Ogre::String name = GetString(node, "name");
-            if (name == ""){
-                LOG_ERROR("There is no name specified for <entity_model> tag.");
-                continue;
-            }
-            Ogre::String file_name = GetString(node, "file_name");
-            if (file_name == ""){
-                LOG_ERROR("There is no file_name specified for <entity_model> tag.");
-                continue;
-            }
-            Ogre::Vector3 position(GetVector3(node, "position"));
-            Ogre::Degree direction(Ogre::Degree(GetFloat(node, "direction")));
-            Ogre::Vector3 scale(GetVector3(node, "scale", Ogre::Vector3::UNIT_SCALE));
-            Ogre::Quaternion orientation(GetQuaternion(node, "root_orientation"));
-            int index(GetInt(node, "index"));
-            EntityManager::getSingleton().AddEntity(
-              name, file_name, position, direction, scale, orientation, index
-            );
-        }
-        else if (
-          node->Type() == TiXmlNode::TINYXML_ELEMENT && node->ValueStr() == "entity_trigger"
-        ){
-            Ogre::String name = GetString(node, "name");
-            if (name == ""){
-                LOG_ERROR("There is no name specified for <entity_trigger> tag.");
-                continue;
-            }
-            Ogre::Vector3 point1 = GetVector3(node, "point1", Ogre::Vector3::ZERO);
-            Ogre::Vector3 point2 = GetVector3(node, "point2", Ogre::Vector3::ZERO);
-            bool enabled = GetBool(node, "enabled", false);
-            EntityManager::getSingleton().AddEntityTrigger(name, point1, point2, enabled);
-        }
-        else if (node->Type() == TiXmlNode::TINYXML_ELEMENT && node->ValueStr() == "entity_point"){
-            Ogre::String name = GetString(node, "name");
-            if (name == ""){
-                LOG_ERROR("There is no name specified for <entity_point> tag.");
-                continue;
-            }
-            Ogre::Vector3 position = GetVector3(node, "position");
-            float rotation = GetFloat(node, "rotation");
-            EntityManager::getSingleton().AddEntityPoint(name, position, rotation);
-        }
-        else if (node->Type() == TiXmlNode::TINYXML_ELEMENT && node->ValueStr() == "entity_script"){
-            Ogre::String name = GetString(node, "name");
-            if (name == ""){
-                LOG_ERROR("There is no name specified for <entity_script> tag.");
-                continue;
-            }
-            EntityManager::getSingleton().AddEntityScript(name);
-        }
-        else if (node->Type() == TiXmlNode::TINYXML_ELEMENT && node->ValueStr() == "script"){
-            Ogre::String file_name = GetString(node, "file_name");
-            if (file_name != "") ScriptManager::getSingleton().RunFile("fields/" + file_name);
-        }
-        else if (node->Type() == TiXmlNode::TINYXML_ELEMENT && node->ValueStr() == "tracks"){
-            for (TiXmlNode* track = node->FirstChild(); track; track = track->NextSibling()){
-                int id = GetInt(track, "id");
-                int track_id = GetInt(track, "track_id");
-                AudioManager::getSingleton().AddTrack(id, track_id);
-            }
-        }
-        node = node->NextSibling();
-    }
-}

+ 0 - 45
src/core/XmlWorldMapFile.h

@@ -1,45 +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 "XmlFile.h"
-
-/**
- * Handles XML world map files.
- */
-class XmlWorldMapFile : public XmlFile{
-
-    public:
-
-        /**
-         * Constructor.
-         *
-         * @param[in] file Path to the XML world map file.
-         */
-        explicit XmlWorldMapFile(const Ogre::String& file);
-
-        /**
-         * Destructor.
-         */
-        virtual ~XmlWorldMapFile();
-
-        /**
-         * Parses the file and loads the map data.
-         *
-         * @param[in] current_progress Current story progress.
-         */
-        void LoadWorldMap(const unsigned int current_progress);
-};

+ 0 - 14
src/core/particles/Particle.h

@@ -88,13 +88,6 @@ class Particle{
          */
         virtual void CopyAttributesTo(Particle* particle);
 
-        /**
-         * Retrieves the particle type.
-         *
-         * @return The particle type.
-         */
-        ParticleType GetParticleType() const {return particle_type_;};
-
         /**
          * Sets the particle emitter.
          *
@@ -105,13 +98,6 @@ class Particle{
             parent_emitter_ = parent_emitter;
         };
 
-        /**
-         * Retrieves the particle emitter.
-         *
-         * @return The emitter.
-         */
-        ParticleEmitter* GetParentEmitter() const {return parent_emitter_;};
-
         /**
          * Enables or disables the particle
          *

+ 0 - 7
src/core/particles/ParticleEmitter.h

@@ -157,13 +157,6 @@ class ParticleEmitter : public Ogre::StringInterface, public Particle{
          */
         void SetEmissionRate(int rate) {emission_rate_ = rate;};
 
-        /**
-        * Retrieves the emission rate of the emitter.
-        *
-        * @return Emission rate.
-        */
-        int GetEmissionRate() const {return emission_rate_;};
-
         /**
          * Sets the particle direction for the emitter.
          *

+ 0 - 20
src/core/particles/ParticlePool.h

@@ -153,17 +153,6 @@ class ParticlePool{
             return t;
         };
 
-        /**
-         * Releases all locked particles.
-         *
-         * It also resets the pool operator.
-         */
-        void ReleaseAllElements(){
-            // Move all elements from locked elements to released elements
-            released_.splice(released_.end(), locked_);
-            ResetIterator();
-        };
-
         /**
          * Locks the released particle pointed by the iterator.
          *
@@ -188,15 +177,6 @@ class ParticlePool{
             ResetIterator();
         };
 
-        /**
-         * Retrieves the list of released particles.
-         *
-         * @return List of released particles.
-         */
-        std::list<T*>& GetActiveElementsList(){
-            return released_;
-        };
-
     protected:
 
         /**

+ 0 - 14
src/core/particles/ParticlePoolMap.h

@@ -153,20 +153,6 @@ class ParticlePoolMap{
             return t;
         };
 
-        /**
-         * Releases all locked particles.
-         *
-         * It also resets the pool map operator.
-         */
-        void ReleaseAllElements(){
-            // Move all elements from locked elements to released elements
-            PoolMapIterator it;
-            for (it = locked_.begin(); it != locked_.end(); ++ it)
-                released_.insert(make_pair(it->first, it->second));
-            locked_.clear();
-            ResetIterator();
-        };
-
         /**
          * Locks the released particle pointed by the iterator.
          *

+ 0 - 4
src/core/particles/ParticleSystemFactory.cpp

@@ -24,10 +24,6 @@ const Ogre::String& ParticleSystemFactory::getType() const{
     return FACTORY_TYPE_NAME;
 }
 
-void ParticleSystemFactory::DestroyInstance(Ogre::MovableObject* obj){
-    delete obj;
-}
-
 Ogre::MovableObject* ParticleSystemFactory::createInstanceImpl(
   const Ogre::String& name, const Ogre::NameValuePairList* params
 ){

+ 0 - 7
src/core/particles/ParticleSystemFactory.h

@@ -46,13 +46,6 @@ class ParticleSystemFactory : public Ogre::MovableObjectFactory{
          */
         const Ogre::String& getType() const;
 
-        /**
-         * Destroys a particle system.
-         *
-         * @param[in,out] obj System to destroy.
-         */
-        void DestroyInstance(Ogre::MovableObject* obj);
-
     private:
 
         /**

+ 0 - 23
src/core/particles/ParticleSystemManager.cpp

@@ -77,29 +77,6 @@ ParticleSystem* ParticleSystemManager::GetParticleSystemTemplate(const Ogre::Str
     return 0;
 }
 
-void ParticleSystemManager::ParticleSystemTemplateNames(std::vector<Ogre::String>& v){
-    ParticleSystemTemplateMap::iterator it;
-    ParticleSystemTemplateMap::iterator it_end = particle_system_templates_.end();
-    for (it = particle_system_templates_.begin(); it != it_end; ++ it) v.push_back((*it).first);
-}
-
-ParticleSystem* ParticleSystemManager::CreateParticleSystem(
-  const Ogre::String& name, const Ogre::String& template_name
-){
-    Ogre::NameValuePairList params;
-    params["template_name"] = template_name;
-    ParticleSystem* system = static_cast<ParticleSystem*>(
-      Ogre::Root::getSingleton().getSceneManager("Scene")->createMovableObject(
-        name, ParticleSystemFactory::FACTORY_TYPE_NAME, &params
-      )
-    );
-    return system;
-}
-
-void ParticleSystemManager::DestroyParticleSystem(ParticleSystem* particle_system){
-    Ogre::Root::getSingleton().getSceneManager("Scene")->destroyMovableObject(particle_system);
-}
-
 ParticleTechnique* ParticleSystemManager::CreateTechnique(){
     ParticleTechnique* technique = new ParticleTechnique();
     technique->CreateRenderer("Entity"); // Set default renderer

+ 0 - 24
src/core/particles/ParticleSystemManager.h

@@ -59,30 +59,6 @@ class ParticleSystemManager: public Ogre::Singleton<ParticleSystemManager>{
           const Ogre::String& template_name
         );
 
-        /**
-         * Gets all template names.
-         *
-         * @param[out] v List where the names will be loaded.
-         */
-        void ParticleSystemTemplateNames(std::vector<Ogre::String>& v);
-
-        /**
-         * Creates a particle system.
-         *
-         * @param[in] name Name for the template system.
-         * @param[in] template_name Name for the system template.
-         */
-        ParticleSystem* CreateParticleSystem(
-          const Ogre::String& name, const Ogre::String& template_name
-        );
-
-        /**
-         * Destroys a particle system.
-         *
-         * @param[out] particle_system Particle system to destroy.
-         */
-        void DestroyParticleSystem(ParticleSystem* particle_system);
-
         /**
          * Creates a new technique.
          *

+ 0 - 4
src/core/particles/renderer/ParticleEntityRenderer.cpp

@@ -54,10 +54,6 @@ void ParticleEntityRenderer::CopyAttributesTo(ParticleRenderer* renderer){
     entity_renderer->mesh_name_ = mesh_name_;
 }
 
-const Ogre::String& ParticleEntityRenderer::GetMeshName() const{
-    return mesh_name_;
-}
-
 
 void ParticleEntityRenderer::SetMeshName(const Ogre::String& mesh_name){
     mesh_name_ = mesh_name;

+ 0 - 7
src/core/particles/renderer/ParticleEntityRenderer.h

@@ -44,13 +44,6 @@ class ParticleEntityRenderer : public ParticleRenderer{
          */
         virtual void CopyAttributesTo(ParticleRenderer* renderer);
 
-        /**
-         * Retrieves the emitter's mesh name.
-         *
-         * @return The emitter mesh name.
-         */
-        const Ogre::String& GetMeshName() const;
-
         /**
          * Sets the emitter's mesh name.
          *

+ 0 - 2
src/data/FinalFantasy7/FF7ModelListFile.cpp

@@ -42,8 +42,6 @@ namespace VGears{
 
     ModelListFile::ModelList&ModelListFile::GetModels(){return models_;}
 
-    uint16 ModelListFile::GetScale() const{return scale_;}
-
     void ModelListFile::SetScale(uint16 scale){scale_ = scale;}
 
 }

+ 0 - 7
src/data/FinalFantasy7/FF7ModelListFile.h

@@ -138,13 +138,6 @@ namespace VGears{
 
             typedef std::vector<ModelDescription>   ModelList;
 
-            /**
-             * Retrieves the scale for the models.
-             *
-             * @return The scale.
-             */
-            virtual uint16 GetScale() const;
-
             /**
              * Sets the scale for the models.
              *

+ 0 - 95
src/data/GameData.h

@@ -152,101 +152,6 @@ class GameData{
                 static const unsigned int HIDDEN = 15;
         };
 
-        /**
-         * List of target selection options.
-         */
-        class TARGET_MODES{
-
-            public:
-
-                /**
-                 * The target can be selected.
-                 *
-                 * If the target of the attack is selectable, at least between some subset of
-                 * possible targets, this must be true.
-                 */
-                static const unsigned int SELECTION_ENABLED = 0;
-
-                /**
-                 * The default target is an enemy.
-                 *
-                 * When true, the cursor starts in an enemy row. When false, it starts in the ally
-                 * row. It may or may not be possible to change it.
-                 */
-                static const unsigned int DEFAULT_ENEMY = 1;
-
-                /**
-                 * The default target is a group.
-                 *
-                 * When true, the cursor starts will all the members of a row selected. When false,
-                 * it starts with only one target selected. It may or may not be possible to change
-                 * it.
-                 */
-                static const unsigned int DEFAULT_MULTIPLE = 2;
-
-                /**
-                 * The selection can change between groups and individuals.
-                 *
-                 * When true, the target can be changed between groups and individuals When false,
-                 * only {@see default_multiple} determines if the target is an individual or a
-                 * group.
-                 */
-                static const unsigned int TOGGLE_MULTIPLE = 3;
-
-                /**
-                 * The target group can be changed.
-                 *
-                 * When true, the target cannot be changed between enemies and allies. In this case
-                 * {@see default_enemy} will determine the group that can be targeted.
-                 */
-                static const unsigned int FIXED_ROW = 4;
-
-                /**
-                 * The command is short ranged.
-                 *
-                 * When true, if the target or the caster is not in the front of their row, the
-                 * target will take half damage. Also, when true, an enemy covered by another enemy
-                 * can't be targeted.
-                 */
-                static const unsigned int SHORT_RANGE = 5;
-
-                /**
-                 * Targets all, enemies and allies.
-                 *
-                 * When true, all allies and enemies are targets, and the selection can't be changed.
-                 */
-                static const unsigned int ALL_ROWS = 6;
-
-                /**
-                 * The target is random.
-                 *
-                 * When multiple targets are selected, one will be selected at random to be the
-                 * receiving target. Cursor will cycle among all viable targets.
-                 */
-                static const unsigned int RANDOM = 7;
-
-                /**
-                 * Retrieves a descriptive string from an option ID.
-                 *
-                 * @param[in] id Option ID.
-                 * @return Option lowercase description. "unknown_target_option" for unknown
-                 * options.
-                 */
-                static std::string to_string(const unsigned int id){
-                    switch(id){
-                        case SELECTION_ENABLED: return "selection_enabled";
-                        case DEFAULT_ENEMY: return "default_enemy";
-                        case DEFAULT_MULTIPLE: return "default_multiple";
-                        case TOGGLE_MULTIPLE: return "toggle_multiple";
-                        case FIXED_ROW: return "fixed_row";
-                        case SHORT_RANGE: return "short_range";
-                        case ALL_ROWS: return "all_rows";
-                        case RANDOM: return "random";
-                        default: return "unknown_target_option";
-                    }
-                }
-        };
-
         /**
          * Determines what an attack (or item) restores.
          */

+ 0 - 8
src/data/VGearsBackgroundFile.cpp

@@ -91,14 +91,6 @@ namespace VGears{
         }
     }
 
-    void BackgroundFile::SortSprites(){
-        for (size_t i(0); i < LAYER_COUNT; ++ i){
-            if (layers_[i].enabled){
-                std::sort(layers_[i].sprites.begin(), layers_[i].sprites.end(), SpriteSorter);
-            }
-        }
-    }
-
     Ogre::Image* BackgroundFile::CreateImage(const PaletteFilePtr &palette){
         assert(palette != nullptr);
         SpritePtrList sprites;

+ 0 - 5
src/data/VGearsBackgroundFile.h

@@ -230,11 +230,6 @@ namespace VGears{
 
             typedef std::vector<SpriteData*> SpritePtrList;
 
-            /**
-             * Sorts the sprites.
-             */
-            void SortSprites();
-
             /**
              * A layer of a background.
              */

+ 0 - 35
src/data/VGearsBackgroundTextureLoader.cpp

@@ -1,35 +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 <OgreTexture.h>
-#include "data/VGearsBackgroundTextureLoader.h"
-#include "data/VGearsBackgroundFile.h"
-
-namespace VGears{
-
-    BackgroundTextureLoader::BackgroundTextureLoader(
-      BackgroundFile &background_file
-    ) : background_file_( background_file ){}
-
-    BackgroundTextureLoader::~BackgroundTextureLoader(){}
-
-    void BackgroundTextureLoader::loadResource(Ogre::Resource *resource){
-        Ogre::Texture *texture(static_cast<Ogre::Texture *>(resource));
-        assert(texture);
-        background_file_.load();
-        texture->_notifyOrigin(background_file_.getName());
-    }
-
-}

+ 0 - 58
src/data/VGearsBackgroundTextureLoader.h

@@ -1,58 +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 <OgreResource.h>
-
-namespace VGears{
-
-    class BackgroundFile;
-
-    /**
-     * Handles background texture loading.
-     */
-    class BackgroundTextureLoader : public Ogre::ManualResourceLoader{
-
-        public:
-
-            /**
-             * Constructor.
-             *
-             * @param[in] background_file The background file.
-             */
-            explicit BackgroundTextureLoader(BackgroundFile &background_file);
-
-            /**
-             * Destructor.
-             */
-            virtual ~BackgroundTextureLoader();
-
-            /**
-             * Loads a resource.
-             *
-             * @param[in] resource The resource to load.
-             */
-            virtual void loadResource(Ogre::Resource *resource);
-
-
-        private:
-
-            /**
-             * The background file.
-             */
-            BackgroundFile &background_file_;
-    };
-}

+ 0 - 6
src/data/VGearsCameraMatrixFile.cpp

@@ -53,8 +53,6 @@ namespace VGears{
         return Ogre::Quaternion(matrix_);
     }
 
-    const Ogre::Matrix3& CameraMatrixFile::GetMatrix() const{return matrix_;}
-
     void CameraMatrixFile::SetMatrix(const Ogre::Matrix3& matrix){
         matrix_ = matrix;
     }
@@ -75,10 +73,6 @@ namespace VGears{
 
     void CameraMatrixFile::SetCount(const size_t count){count_ = count;}
 
-    const Ogre::Real& CameraMatrixFile::GetFocalLength() const{
-        return focal_length_;
-    }
-
     void CameraMatrixFile::SetFocalLength(const Ogre::Real focal_length){
         focal_length_ = focal_length;
     }

+ 0 - 14
src/data/VGearsCameraMatrixFile.h

@@ -61,13 +61,6 @@ namespace VGears{
              */
             static const String RESOURCE_TYPE;
 
-            /**
-             * Retrieves the camera matrix in the file.
-             *
-             * @return The camera matrix.
-             */
-            const Ogre::Matrix3& GetMatrix() const;
-
             /**
              * Sets the camera matrix.
              *
@@ -119,13 +112,6 @@ namespace VGears{
              */
             void SetCount(const size_t count);
 
-            /**
-             * Retrieves the focal length.
-             *
-             * @return The focal length.
-             */
-            const Ogre::Real& GetFocalLength() const;
-
             /**
              * Sets the focal length.
              *

+ 0 - 36
src/data/VGearsFLevelFile.cpp

@@ -83,42 +83,6 @@ namespace VGears{
         }
     }
 
-    void FLevelFile::LoadModels(){
-        HRCFileManager &hrc_mgr(HRCFileManager::getSingleton());
-        ModelList &models(model_list_->GetModels());
-        ModelList::const_iterator it(models.begin()), it_end(models.end());
-        while (it != it_end){
-            String hrc_name(it->hrc_name);
-            Ogre::LogManager::getSingleton().stream() << "Loading Model: " << hrc_name;
-            StringUtil::toLowerCase(hrc_name);
-            HRCFilePtr hrc = hrc_mgr.load(hrc_name, mGroup).staticCast<HRCFile>();
-            LoadAnimations(hrc, it->animations);
-            hrc_files_.push_back(hrc);
-            ++ it;
-        }
-    }
-
-    void FLevelFile::LoadAnimations(
-      const HRCFilePtr &model, const AnimationList &animations
-    ){
-        AFileManager &a_mgr(AFileManager::getSingleton());
-        AnimationList::const_iterator
-          it(animations.begin()), it_end(animations.end());
-        while (it != it_end){
-            String animation_name;
-            StringUtil::splitBase(it->name, animation_name);
-            StringUtil::toLowerCase(animation_name);
-            String animation_filename(animation_name + EXT_A);
-            AFilePtr animation = a_mgr.load(
-              animation_filename, model->getGroup()
-            ).staticCast<AFile>();
-            animation_name = NameLookup::Animation(animation_name);
-            Ogre::LogManager::getSingleton().stream() << " Adding Animation: " << animation_name;
-            animation->AddTo(model->GetSkeleton(), animation_name);
-            ++ it;
-        }
-    }
-
     void FLevelFile::unloadImpl(){
         background_.reset();
         camera_matrix_.reset();

+ 0 - 10
src/data/VGearsFLevelFile.h

@@ -227,16 +227,6 @@ namespace VGears{
              */
             virtual void loadImpl(void) override;
 
-            /**
-             * Loads the level models.
-             */
-            void LoadModels(void);
-
-            /**
-             * Loads the level animations
-             */
-            void LoadAnimations(const HRCFilePtr &model, const AnimationList &animations);
-
             /**
              * Unloads the file.
              */

+ 0 - 58
src/data/VGearsFLevelFileManager.cpp

@@ -1,58 +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 "data/VGearsFLevelFileManager.h"
-
-/**
- * FLevel file manager singleton.
- */
-template<> VGears::FLevelFileManager
-  *Ogre::Singleton<VGears::FLevelFileManager>::msSingleton = nullptr;
-
-namespace VGears{
-
-    FLevelFileManager *FLevelFileManager::GetSingletonPtr(){return msSingleton;}
-
-    FLevelFileManager &FLevelFileManager::GetSingleton(){
-        assert(msSingleton);
-        return(*msSingleton);
-    }
-
-    FLevelFileManager::FLevelFileManager(){
-        mResourceType = FLevelFile::RESOURCE_TYPE;
-        // Low, because it will likely reference other resources.
-        mLoadOrder = 30.0f;
-        // this is how the ResourceManager registers with OGRE.
-        Ogre::ResourceGroupManager::getSingleton()._registerResourceManager(
-          mResourceType, this
-        );
-    }
-
-    FLevelFileManager::~FLevelFileManager(){
-        Ogre::ResourceGroupManager::getSingleton()._unregisterResourceManager(
-          mResourceType
-        );
-    }
-
-    Ogre::Resource *FLevelFileManager::createImpl(
-      const Ogre::String &name, Ogre::ResourceHandle handle,
-      const Ogre::String &group, bool is_manual,
-      Ogre::ManualResourceLoader *loader,
-      const Ogre::NameValuePairList *create_params
-    ){
-        return new FLevelFile(this, name, handle, group, is_manual, loader);
-    }
-
-}

+ 0 - 77
src/data/VGearsFLevelFileManager.h

@@ -1,77 +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 <OgreResourceManager.h>
-#include "VGearsPrerequisites.h"
-#include "VGearsFLevelFile.h"
-
-namespace VGears{
-
-    /**
-     * A manager for flevel files.
-     */
-    class _VGearsExport FLevelFileManager
-      : public Ogre::ResourceManager, public Ogre::Singleton<FLevelFileManager>
-    {
-        public:
-
-            /**
-             * Constructor.
-             */
-            FLevelFileManager();
-
-            /**
-             * Destructor.
-             */
-            virtual ~FLevelFileManager();
-
-            /**
-             * Retrieves a singleton to the manager.
-             */
-            static FLevelFileManager& GetSingleton();
-
-            /**
-             * Retrieves a pointer to the manager singleton.
-             */
-            static FLevelFileManager* GetSingletonPtr();
-
-            /**
-             * Loads the manager.
-             *
-             * @param[in] name The unique name of the manager.
-             * @param[in] handle @todo Understand and document.
-             * @param[in] group The name of the resource group to which this
-             * resource belong.
-             * @param[in] is_manual True if the resource is manually loaded,
-             * false otherwise.
-             * @param[in] loader Pointer to a ManualResourceLoader
-             * implementation which will be called when the Resource wishes to
-             * load (should be supplied if is_manual is set to true). It can be
-             * null, but the Resource will never be able to reload if anything
-             * ever causes it to unload. Therefore provision of a proper
-             * ManualResourceLoader instance is strongly recommended.
-             * @param[in] create_params Unused.
-             */
-            virtual Ogre::Resource *createImpl(
-              const Ogre::String &name, Ogre::ResourceHandle handle,
-              const Ogre::String &group, bool is_manual,
-              Ogre::ManualResourceLoader *loader,
-              const Ogre::NameValuePairList *create_params
-            );
-
-    };
-}

+ 0 - 5
src/data/VGearsHRCFile.cpp

@@ -116,9 +116,4 @@ namespace VGears{
         return NameLookup::model(base_name) + EXT_MESH;
     }
 
-    Ogre::SkeletonPtr HRCFile::GetSkeleton(void) const{
-        skeleton_->load();
-        return skeleton_;
-    }
-
 }

+ 0 - 7
src/data/VGearsHRCFile.h

@@ -140,13 +140,6 @@ namespace VGears{
              */
             virtual const BoneList& GetBones() const{return bones_;}
 
-            /**
-             * Retrieves the skeleton.
-             *
-             * @return The skeleton.
-             */
-            virtual Ogre::SkeletonPtr GetSkeleton() const;
-
             /**
              * The type of resource.
              */

+ 0 - 14
src/data/VGearsLZSDataStream.h

@@ -181,20 +181,6 @@ namespace VGears{
              */
             virtual void close() override;
 
-            /**
-             * Checks how many data still remains compresses.
-             *
-             * @return The number of compressed bytes.
-             */
-            size_t AvailableCompressed() const {return available_compressed_;}
-
-            /**
-             * Checks how many data still has been uncompressesed.
-             *
-             * @return The number of uncompressed bytes.
-             */
-            size_t AvailableUncompressed() const{return buffer_.Available();}
-
             /**
              * Flips the endian mode of some data.
              *

+ 0 - 30
src/data/VGearsPFile.cpp

@@ -96,36 +96,6 @@ namespace VGears{
           + bounding_boxes_.size() * sizeof(bounding_boxes_.front());
     }
 
-    bool PFile::IsValid(){return true && IsPolygonDefinitionListValid();}
-
-    bool PFile::IsPolygonDefinitionListValid(){
-        Ogre::Log::Stream log(Ogre::LogManager::getSingleton().stream());
-        size_t vertex_count(vertices_.size());
-        size_t normal_count(normals_.size());
-        size_t edge_count  (edges_.size());
-        for (size_t p(polygon_definitions_.size()); p --;){
-            const PolygonDefinition& def(polygon_definitions_[p]);
-            for (int i(3); i --;){
-                if (def.vertex[i] >= vertex_count){
-                    log << "Error: index to vertex is out of Bounds: polygon_definitions_[" << p
-                      << "].vertex[" << i << "]: " << def.vertex[i];
-                    return false;
-                }
-                if (def.normal[i] >= normal_count){
-                    log << "Error: index to normal is out of Bounds: polygon_definitions_[" << p
-                      << "].normal[" << i << "]: " << def.normal[i];
-                    return false;
-                }
-                if (def.edge[i] >= edge_count){
-                    log << "Error: index to edge is out of Bounds: polygon_definitions_[" << p
-                      << "].edge[" << i << "]: " << def.edge[i];
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-
     void PFile::AddGroups(Ogre::Mesh *mesh, const String &bone_name, const RSDFilePtr &rsd) const{
         const Ogre::SkeletonPtr skeleton(mesh->getSkeleton());
         const String material_base_name(rsd->GetMaterialBaseName());

+ 0 - 14
src/data/VGearsPFile.h

@@ -64,20 +64,6 @@ namespace VGears{
              */
             virtual ~PFile();
 
-            /**
-             * Indicates if the file is a valid P file.
-             *
-             * @return True if the file is a valid P file, false otherwise.
-             */
-            virtual bool IsValid();
-
-            /**
-             * Indicates if the poligons definitions are valid.
-             *
-             * @return True if all the poligon definitions are valid, false otherwise.
-             */
-            virtual bool IsPolygonDefinitionListValid();
-
             /**
              * Adds a resource group.
              *

+ 0 - 8
src/data/VGearsPaletteFileSerializer.cpp

@@ -57,14 +57,6 @@ namespace VGears{
         if (colour & BIT_MASK_ALPHA) dest.a = 1.0f;
     }
 
-    void PaletteFileSerializer::ConvertColour(uint16 &colour) const{
-        colour
-          = ((colour & BIT_MASK_RED) << 10)
-            | (colour & BIT_MASK_GREEN)
-            | ((colour & BIT_MASK_BLUE) >> 10)
-            | ((colour) & BIT_MASK_ALPHA);
-    }
-
     void PaletteFileSerializer::readObject(
       Ogre::DataStreamPtr &stream, Page &dest
     ){

+ 0 - 8
src/data/VGearsPaletteFileSerializer.h

@@ -146,14 +146,6 @@ namespace VGears{
 
             using Serializer::readObject;
 
-            /**
-             * Converts a colour.
-             *
-             * @param[in,out] colour Colour to convert.
-             * @todo What kind of conversion is it doing?
-             */
-            virtual void ConvertColour(uint16 &colour) const;
-
             /**
              * A pixel format.
              */

+ 0 - 4
src/data/VGearsRSDFile.cpp

@@ -147,10 +147,6 @@ namespace VGears{
 
     const String& RSDFile::GetPolygonName() const{return polygon_name_;}
 
-    const String&RSDFile::GetMaterialName() const{return material_name_;}
-
-    const String& RSDFile::GetGroupName() const{return group_name_;}
-
     size_t RSDFile::GetTextureNameCount() const{return texture_names_.size();}
 
     RSDFile::TextureNameList& RSDFile::GetTextureNames(){return texture_names_;}

+ 0 - 14
src/data/VGearsRSDFile.h

@@ -104,20 +104,6 @@ namespace VGears{
              */
             virtual const String& GetPolygonName() const;
 
-            /**
-             * Retrieves the material name.
-             *
-             * @return The matyerial name.
-             */
-            virtual const String& GetMaterialName() const;
-
-            /**
-             * Retrieves the group name.
-             *
-             * @return The group name.
-             */
-            virtual const String& GetGroupName() const;
-
             /**
              * Counts the texture names.
              *

+ 0 - 4
src/data/VGearsSerializer.cpp

@@ -119,10 +119,6 @@ namespace VGears{
         stream->read(&dest,1);
     }
 
-    void Serializer::ReadFloat(Ogre::DataStreamPtr &stream, float &dest){
-        readFloats(stream, &dest, 1);
-    }
-
     String Serializer::GetLine(Ogre::DataStreamPtr &stream) const{
         String line("");
         do{

+ 0 - 8
src/data/VGearsSerializer.h

@@ -195,14 +195,6 @@ namespace VGears{
              */
             void ReadUInt8(Ogre::DataStreamPtr &stream, uint8 &dest);
 
-            /**
-             * Reads bytes from a stream and evaluates them as a float.
-             *
-             * @param[in] stream Input data.
-             * @param[out] dest The evaluated number.
-             */
-            void ReadFloat(Ogre::DataStreamPtr &stream, float &dest);
-
             /**
              * @todo Understand and document.
              */

+ 0 - 65
src/data/VGearsTexFile.h

@@ -380,71 +380,6 @@ namespace VGears{
                 TexEntry unknown_09;
             } header_;
 
-            /**
-             * Texture format.
-             */
-            struct TextureFormat{
-
-                // reversing ff7 code
-                // structure @ 0x3c
-                // size 0x80
-
-                /**
-                 * Texture width.
-                 */
-                TexEntry width;
-
-                /**
-                 * Texture height.
-                 */
-                TexEntry height;
-
-                /**
-                 * Texture pitch.
-                 */
-                TexEntry pitch;
-
-                /**
-                 * Unknown data.
-                 */
-                TexEntry unknown_0x48;
-
-                /**
-                 * @todo Understand and document.
-                 */
-                TexEntry palette_flag;
-
-                /**
-                 * @todo Understand and document.
-                 */
-                TexEntry bits_per_palette_index;
-
-                /**
-                 * @todo Understand and document.
-                 */
-                TexEntry palette_index_8bit;
-
-                /**
-                 * @todo Understand and document.
-                 */
-                TexEntry palette_size;
-
-                /**
-                 * The number of colours in the palette.
-                 */
-                TexEntry palette_color_count;
-
-                /**
-                 * @todo Understand and document.
-                 */
-                TexEntry runtime_data_ptr_palette_data;
-
-                /**
-                 * The format for the texture pixels.
-                 */
-                PixelFormat pixel_format;
-            };
-
 #if OGRE_COMPILER == OGRE_COMPILER_MSVC
 #pragma pack (pop)
 #else

+ 0 - 54
src/data/worldmap/TxzFileManager.cpp

@@ -1,54 +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 "data/worldmap/TxzFileManager.h"
-#include "data/worldmap/TxzFile.h"
-
-template<> VGears::TxzFileManager*
-  Ogre::Singleton<VGears::TxzFileManager>::msSingleton = nullptr;
-
-namespace VGears {
-
-    TxzFileManager* TxzFileManager::getSingletonPtr(){return msSingleton;}
-
-    TxzFileManager& TxzFileManager::getSingleton(){
-        assert( msSingleton );
-        return(*msSingleton );
-    }
-
-    TxzFileManager::TxzFileManager(){
-        mResourceType = TxzFile::RESOURCE_TYPE;
-        mLoadOrder = 20.0f;
-        Ogre::ResourceGroupManager::getSingleton()._registerResourceManager(
-          mResourceType, this
-        );
-    }
-
-    TxzFileManager::~TxzFileManager(){
-        Ogre::ResourceGroupManager::getSingleton()._unregisterResourceManager(
-          mResourceType
-        );
-    }
-
-    Ogre::Resource* TxzFileManager::createImpl(
-      const Ogre::String& name, Ogre::ResourceHandle handle,
-      const Ogre::String& group, bool is_manual,
-      Ogre::ManualResourceLoader* loader,
-      const Ogre::NameValuePairList* create_params
-    ){
-        return new TxzFile(this, name, handle, group, is_manual, loader);
-    }
-
-}

+ 0 - 80
src/data/worldmap/TxzFileManager.h

@@ -1,80 +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 <OgreResourceManager.h>
-#include "common/TypeDefine.h"
-#include "VGearsPrerequisites.h"
-
-namespace VGears {
-
-    /**
-     * The manager for TXZ files
-     */
-    class _VGearsExport TxzFileManager
-      : public Ogre::ResourceManager, public Ogre::Singleton<TxzFileManager>
-    {
-
-        public:
-
-            /**
-             * Constructor
-             */
-            TxzFileManager();
-
-            /**
-             * Destructor.
-             */
-            virtual ~TxzFileManager();
-
-            /**
-             * Retrieves a singleton to the manager.
-             */
-            static TxzFileManager& getSingleton();
-
-            /**
-             * Retrieves a pointer to the manager singleton.
-             */
-            static TxzFileManager* getSingletonPtr();
-
-        private:
-
-            /**
-             * Loads the manager.
-             *
-             * @param[in] name The unique name of the manager.
-             * @param[in] handle @todo Understand and document.
-             * @param[in] group The name of the resource group to which this
-             * resource belong.
-             * @param[in] is_manual True if the resource is manually loaded,
-             * false otherwise.
-             * @param[in] loader Pointer to a ManualResourceLoader
-             * implementation which will be called when the Resource wishes to
-             * load (should be supplied if is_manual is set to true). It can be
-             * null, but the Resource will never be able to reload if anything
-             * ever causes it to unload. Therefore provision of a proper
-             * ManualResourceLoader instance is strongly recommended.
-             * @param[in] create_params Unused.
-             */
-            virtual Ogre::Resource* createImpl(
-              const Ogre::String &name, Ogre::ResourceHandle handle,
-              const Ogre::String &group, bool is_manual,
-              Ogre::ManualResourceLoader *loader,
-              const Ogre::NameValuePairList *create_params
-            ) override final;
-    };
-
-}

+ 0 - 9
src/data/worldmap/TxzFileSerializer.cpp

@@ -45,15 +45,6 @@ namespace VGears {
         ImportDecompressed(decompressed_stream, dest);
     }
 
-    std::vector<std::vector<TxzFileSerializer::Rgba>>
-      TxzFileSerializer::GetWorldMapTexture(uint32 id)
-    {
-        auto it = textures_.find(id);
-        if (it != std::end(textures_)) return it->second;
-        std::vector<std::vector<TxzFileSerializer::Rgba>> emptexture_y;
-        return emptexture_y;
-    }
-
     void TxzFileSerializer::ImportDecompressed(
       Ogre::DataStream& stream, TxzFile& dest
     ){

+ 0 - 9
src/data/worldmap/TxzFileSerializer.h

@@ -201,15 +201,6 @@ namespace VGears {
          */
         void Import(Ogre::DataStreamPtr& stream, TxzFile& dest);
 
-        /**
-         * Retrieves a texture color pixels from a texture ID.
-         *
-         * @param[in] id ID of the texture.
-         * @return List of color pixels conforming the texture, or an empty
-         * vector if the texture doesn't exist.
-         */
-        std::vector<std::vector<Rgba>> GetWorldMapTexture(uint32 id);
-
     private:
 
         /**

+ 0 - 13
src/data/worldmap/WorldmapFileSerializer.h

@@ -29,19 +29,6 @@ namespace VGears {
 
         public:
 
-            /**
-             * Block header of map files.
-             */
-            struct BlockHeader{
-                /**
-                 * Offset in this block of the compressed data.
-                 *
-                 * At the compressed data offset there is a uint32 containing
-                 * the size of the compressed LZS payload.
-                 */
-                uint32 compressed_data_offsets[16];
-            };
-
             /**
              * Block header of a mesh section in map files.
              */

+ 0 - 10
src/installer/CMakeLists.txt

@@ -33,12 +33,9 @@ set(INSTALLER_SOURCE_FILES
     WorldInstaller.cpp
     common/BinGZipFile.cpp
     common/DrawSkeleton.cpp
-    common/FontFile.cpp
     common/Logger.cpp
     common/OgreBase.cpp
     common/OgreGenUtilites.cpp
-    common/Surface.cpp
-    common/TimToVram.cpp
     common/Vram.cpp
     data/AbFile.cpp
     data/BattleSceneFile.cpp
@@ -70,19 +67,12 @@ set(INSTALLER_SOURCE_FILES
     decompiler/field/instruction/FieldWindowInstruction.cpp
     decompiler/Graph.cpp
     decompiler/instruction/BinaryOpStackInstruction.cpp
-    decompiler/instruction/BoolNegateStackInstruction.cpp
-    decompiler/instruction/CallInstruction.cpp
     decompiler/instruction/CondJumpInstruction.cpp
-    decompiler/instruction/DupStackInstruction.cpp
     decompiler/instruction/Instruction.cpp
     decompiler/instruction/KernelCallInstruction.cpp
-    decompiler/instruction/KernelCallStackInstruction.cpp
     decompiler/instruction/LoadInstruction.cpp
-    decompiler/instruction/ReturnInstruction.cpp
     decompiler/instruction/StackInstruction.cpp
     decompiler/instruction/StoreInstruction.cpp
-    decompiler/instruction/UnaryOpPostfixStackInstruction.cpp
-    decompiler/instruction/UnaryOpPrefixStackInstruction.cpp
     decompiler/instruction/UncondJumpInstruction.cpp
     decompiler/LuaLanguage.cpp
     decompiler/ScriptFormatter.cpp

+ 0 - 16
src/installer/DiskImage.cpp

@@ -999,22 +999,6 @@ const std::string DiskImage::getId(){
     return id;
 };
 
-const DiskImage::Platform DiskImage::getPlatform(){
-    return platform;
-};
-
-const DiskImage::Region DiskImage::getRegion(){
-    return region;
-};
-
-const DiskImage::Language DiskImage::getLanguage(){
-    return language;
-};
-
-const DiskImage::Disk DiskImage::getDisk(){
-    return disk;
-};
-
 const bool DiskImage::isValid(){
     return valid;
 };

+ 0 - 28
src/installer/DiskImage.h

@@ -121,34 +121,6 @@ struct DiskImage{
          */
         std::string const getId();
 
-        /**
-         * Gets the platform for which the disk image is intended.
-         *
-         * @return The platform of the disk image.
-         */
-        Platform const getPlatform();
-
-        /**
-         * Gets the region for which the disk image is intended.
-         *
-         * @return The region of the disk image.
-         */
-        Region const getRegion();
-
-        /**
-         * Gets the language for which the disk image is intended.
-         *
-         * @return The language of the disk image.
-         */
-        Language const getLanguage();
-
-        /**
-         * Gets the disk for which the disk image is intended.
-         *
-         * @return The disk of the disk image.
-         */
-        Disk const getDisk();
-
         /**
          * Checks if the disk image is a valid Final Fantasy VII release.
          *

+ 0 - 43
src/installer/FieldDataInstaller.cpp

@@ -228,49 +228,6 @@ bool FieldDataInstaller::WillCrash(const Ogre::String& resource_name){
     return false;
 }
 
-bool FieldDataInstaller::IsTestField(const Ogre::String& resource_name){
-    if (
-      resource_name == "startmap"
-      || resource_name == "md1stin"
-      || resource_name == "md1_1"
-      || resource_name == "md1_2"
-      || resource_name == "nrthmk"
-      || resource_name == "nmkin_1"
-      || resource_name == "elevtr1"
-      || resource_name == "nmkin_2"
-      || resource_name == "nmkin_3"
-      || resource_name == "nmkin_4"
-      || resource_name == "nmkin_5"
-      || resource_name == "southmk1"
-      || resource_name == "southmk2"
-      || resource_name == "smkin_1"
-      || resource_name == "smkin_2"
-      || resource_name == "smkin_3"
-      || resource_name == "smkin_4"
-      || resource_name == "smkin_5"
-      || resource_name == "md8_1"
-      || resource_name == "md8_2"
-      || resource_name == "md8_3"
-      || resource_name == "md8_4"
-      || resource_name == "md8brdg"
-      || resource_name == "cargoin"
-      || resource_name == "tin_1"
-      || resource_name == "tin_2"
-      || resource_name == "tin_3"
-      || resource_name == "tin_4"
-      || resource_name == "rootmap"
-      || resource_name == "mds7st1"
-      || resource_name == "mds7st2"
-      || resource_name == "mds7st3"
-      || resource_name == "mds7st32"
-      || resource_name == "mds7_w1"
-      || resource_name == "mds7_w2"
-      || resource_name == "mds7_w3"
-      || resource_name == "mds7"
-    )return true;
-    return false;
-}
-
 void FieldDataInstaller::CreateDir(const std::string& path){
     QString target = QString::fromStdString(data_dir_ + path);
     QDir dir(target);

+ 0 - 11
src/installer/FieldDataInstaller.h

@@ -517,17 +517,6 @@ class FieldDataInstaller{
          */
         static bool WillCrash(const Ogre::String& resource_name);
 
-        /**
-         * Checks if a map is a test field.
-         *
-         * It uses a hardcoded list of maps that are known to be test maps.
-         * Unused maps are considered to be test maps.
-         *
-         * @param[in] resource_name The name of the map file to test.
-         * @return True if the map is a test map, false otherwise.
-         */
-        static bool IsTestField(const Ogre::String& resource_name);
-
         /**
          * Collects the scale factor from a map.
          *

+ 0 - 17
src/installer/MediaDataInstaller.cpp

@@ -1624,23 +1624,6 @@ void MediaDataInstaller::WriteMusicsIndex(){
     xml.SaveFile(data_dir_ + "audio/musics/_musics.xml");
 }
 
-int MediaDataInstaller::InstallVideosInit(){
-    // TODO: Look ofor anothe rvideo folders
-    processed_videos_ = 0;
-    const boost::filesystem::path movies_dir(output_dir_ + "/ff7/movies/");
-    if (!boost::filesystem::exists(movies_dir) || !boost::filesystem::is_directory(movies_dir)) return 0;
-
-    int total_videos = 0;
-    for (const auto& entry : boost::filesystem::directory_iterator(movies_dir)){
-        if (boost::filesystem::is_regular_file(entry.path())){
-            std::cout << entry.path().filename().string() << std::endl;
-            videos_.push_back(entry.path().string());
-            total_videos ++;
-        }
-    }
-    return total_videos;
-}
-
 void MediaDataInstaller::InstallVideos(){
     if (processed_videos_ < 0 || processed_videos_ >= videos_.size()) return;
     const std::string output_dir = data_dir_ + "video/";

+ 0 - 7
src/installer/MediaDataInstaller.h

@@ -122,13 +122,6 @@ class MediaDataInstaller{
          */
         void WriteMusicsIndex();
 
-        /**
-         * Prepares the installer for the video extraction.
-         *
-         * @return The total number of videos to process.
-         */
-        int InstallVideosInit();
-
         /**
          * Copies the FMV videos.
          */

+ 0 - 33
src/installer/VGearsUtility.cpp

@@ -25,39 +25,6 @@ namespace VGears{
 
     Utility::~Utility(){}
 
-    Ogre::Camera* Utility::GetCamera(){return camera_;}
-
-    void Utility::InitComponents(){
-        Application::initComponents();
-        Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
-        Ogre::Root *root(getRoot());
-        scene_manager_ = root->createSceneManager(Ogre::ST_GENERIC, "Scene");
-        scene_manager_->clearScene();
-        scene_manager_->setAmbientLight(Ogre::ColourValue(0.5, 0.5, 0.5));
-        Ogre::Light* directional_light = scene_manager_->createLight("directional_light");
-        directional_light->setType(Ogre::Light::LT_DIRECTIONAL);
-        directional_light->setDiffuseColour(Ogre::ColourValue(0.5, 0.5, 0.5));
-        directional_light->setSpecularColour(Ogre::ColourValue(0.5, 0.5, 0.5));
-        directional_light->setDirection(Ogre::Vector3(0, 0, -1));
-        camera_ = scene_manager_->createCamera("Camera");
-        camera_->setNearClipDistance(0.01f);
-        camera_->setPosition(0, 5, 10);
-        camera_->lookAt(0, 0, 0);
-        Ogre::RenderWindow *window(getRenderWindow());
-        viewport_ = window->addViewport(camera_);
-        viewport_->setBackgroundColour(Ogre::ColourValue(0.0f, 0.4f, 0.0f));
-        camera_->setAspectRatio(Ogre::Real(viewport_->getActualWidth()) / Ogre::Real(viewport_->getActualHeight()));
-        frame_listener_ = new DisplayFrameListener(window);
-        frame_listener_->setCamera(camera_);
-        root->addFrameListener(frame_listener_);
-    }
-
-    void Utility::DestroyComponents(){
-        delete frame_listener_;
-        frame_listener_ = NULL;
-        Application::destroyComponents();
-    }
-
     std::string Utility::DecodeString(const u8* bytes, const unsigned int size){
         std::string decoded("");
         for (int i = 0; i < size; i ++) if (bytes[i] > 0x00 && bytes[i] < 0XFF) decoded += ENGLISH_CHARS[bytes[i]];

+ 0 - 17
src/installer/VGearsUtility.h

@@ -40,13 +40,6 @@ namespace VGears{
              */
             virtual ~Utility();
 
-            /**
-             * Retrieves the camera.
-             *
-             * @return The camera.
-             */
-            virtual Ogre::Camera* GetCamera(void);
-
             /**
              * Decodes a FF7 encoded string.
              *
@@ -60,16 +53,6 @@ namespace VGears{
 
         protected:
 
-            /**
-             * Initializes components used by the utilities.
-             */
-            virtual void InitComponents();
-
-            /**
-             * Initializes components used by the utilities.
-             */
-            virtual void DestroyComponents();
-
         private:
 
             /**

+ 0 - 8
src/installer/WorldInstaller.h

@@ -296,14 +296,6 @@ class WorldInstaller{
          */
         static std::string TERRAIN_MODELS_DIR;
 
-        /**
-         * Decompresses data compressed in LZSS or LZS formats.
-         *
-         * @param[in] compressed_data The compresed data as bytes.
-         * @return The data, decompressed, as bytes.
-         */
-        std::vector<u8> DecompressLZSSData(u32* compressed_data);
-
         /**
          * Exports a mesh to a file.
          *

+ 0 - 2
src/installer/common/BinGZipFile.cpp

@@ -101,8 +101,6 @@ File BinGZipFile::ExtractGZip(u32 file_index){
     return File(out.data(), 0, static_cast<u32>(out.size()));
 }
 
-u32 BinGZipFile::GetNumberOfFiles(){return file_count_;}
-
 void BinGZipFile::InnerGetNumberOfFiles(){
     file_count_ = 0;
     // Each file has a 6 byte header, then the GZip data, whose header is checked: stop when they don't fit.

+ 0 - 7
src/installer/common/BinGZipFile.h

@@ -84,13 +84,6 @@ class BinGZipFile : public File{
          */
         static bool Inflate(const u8* data, size_t size, std::vector<u8>& out, std::string& error);
 
-        /**
-         * Counts the number of files packed in the compressed BIN file.
-         *
-         * @return The number of files.
-         */
-        u32 GetNumberOfFiles();
-
     private:
 
         /**

+ 0 - 129
src/installer/common/FontFile.cpp

@@ -1,129 +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.h>
-#include "common/FileSystem.h"
-#include "common/TypeDefine.h"
-#include "installer/common/Logger.h"
-#include "installer/common/FontFile.h"
-
-using namespace VGears;
-
-FontFile::FontFile(File* file): File(file){}
-
-FontFile::FontFile(File* file, const u32& offset, const u32& length): File(file, offset, length){}
-
-FontFile::FontFile(u8* buffer, const u32& offset, const u32& length): File(buffer, offset, length){}
-
-FontFile::~FontFile(void){}
-
-Surface* FontFile::GetSurface(void){
-    int width = 512;
-    int height = 4096;
-    int char_num = 6165;
-    Surface* ret = CreateSurface(width, height);
-    int x_16 = 0;
-    int y_16 = 0;
-
-    /**
-     * CLUT colour.
-     *
-     * CLUT stands for Color LookUp Table.
-     */
-    struct ClutColor{
-
-        /**
-         * Red component in the CLUT.
-         */
-        u8 r;
-
-        /**
-         * Green component in the CLUT.
-         */
-        u8 g;
-
-        /**
-         * Blue component in the CLUT.
-         */
-        u8 b;
-
-        /**
-         * Alpha component in the CLUT.
-         */
-        u8 a;
-    };
-
-    ClutColor color;
-
-    for (int chars = 0; chars < char_num; ++chars){
-        Surface* glyth = CreateSurface(16, 16);
-        for (int y = 0; y < 16; ++ y){
-            u8 data = (y < 11) ? GetU8(0xE + chars * 22 + y * 2 + 0) : 0;
-            //LOGGER->Log(LOGGER_INFO, "%x, %02x", y, data);
-            int j = 0;
-            for (int i = 7; i >= 0; -- i){
-                color.r = (((data >> i) & 0x01) == 1) ? 0 : 255;
-                color.g = (((data >> i) & 0x01) == 1) ? 0 : 255;
-                color.b = (((data >> i) & 0x01) == 1) ? 0 : 255;
-                color.a = 255;
-                memcpy(glyth->pixels.data() + 64 * y + j, &color, sizeof(ClutColor));
-                j += 4;
-            }
-            data = (y < 11) ? GetU8(0xE + chars * 22 + y * 2 + 1) : 0;
-            //LOGGER->Log(LOGGER_INFO, "%02x", data);
-            for (int i = 7; i >= 0; --i){
-                color.r = (((data >> i) & 0x01) == 1) ? 0 : 255;
-                color.g = (((data >> i) & 0x01) == 1) ? 0 : 255;
-                color.b = (((data >> i) & 0x01) == 1) ? 0 : 255;
-                color.a = 255;
-                memcpy(glyth->pixels.data() + 64 * y + j, &color, sizeof(ClutColor));
-                j += 4;
-            }
-        }
-        CopyToSurface(ret, x_16, y_16, glyth);
-        delete glyth;
-        x_16 += 16;
-        if (x_16 == ret->width){
-            y_16 += 16;
-            x_16 = 0;
-        }
-    }
-
-    Ogre::TexturePtr ptex;
-    Ogre::HardwarePixelBufferSharedPtr buffer;
-    ptex = Ogre::TextureManager::getSingleton().createManual(
-      "DynaTex", "General", Ogre::TEX_TYPE_2D, ret->width, ret->height, 0, Ogre::PF_R8G8B8A8, Ogre::TU_STATIC
-    );
-    buffer = ptex->getBuffer(0, 0);
-    buffer->lock(Ogre::HardwareBuffer::HBL_DISCARD);
-    const Ogre::PixelBox& pb = buffer->getCurrentLock();
-    for (auto y = 0; y < ret->height; ++ y){
-        // Type cast
-        auto* data = static_cast<unsigned int*> (reinterpret_cast<unsigned int *>(pb.data) + y * pb.rowPitch);
-        for (auto x = 0; x < ret->width; ++ x){
-            auto clut = ret->pixels[y * ret->width * 4 + x * 4 + 3]
-              | (ret->pixels[y * ret->width * 4 + x * 4 + 2] << 8)
-              | (ret->pixels[y * ret->width * 4 + x * 4 + 1] << 16)
-              | (ret->pixels[y * ret->width * 4 + x * 4 + 0] << 24);
-            data[x] = clut;
-        }
-    }
-    Ogre::Image image;
-    image.loadDynamicImage((Ogre::uchar*) pb.data, ret->width, ret->height, Ogre::PF_R8G8B8A8);
-    image.save("font.png");
-    buffer->unlock();
-    Ogre::TextureManager::getSingleton().remove("DynaTex");
-    return ret;
-}

+ 0 - 64
src/installer/common/FontFile.h

@@ -1,64 +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 "common/File.h"
-#include "installer/common/Surface.h"
-#include "installer/common/Vram.h"
-
-/**
- * Handles font files.
- */
-class FontFile : public File{
-
-    public:
-        // explicit FontFile(const Ogre::String& file);
-
-        /**
-         * Constructor.
-         *
-         * @param[in] file The font file.
-         */
-        explicit  FontFile(File* file);
-
-        /**
-         * Constructor.
-         *
-         * @param[in] file The font file.
-         * @param[in] offset The offset at which to start reading the file.
-         * @param[in] length Length of the data to read.
-         */
-        FontFile(File* file, const u32& offset, const u32& length);
-
-        /**
-         * Constructor.
-         *
-         * @param[in] buffer Buffer with the contents of the font file.
-         * @param[in] offset The offset at which to start reading the file.
-         * @param[in] length Length of the data to read.
-         */
-        FontFile(u8* buffer, const u32& offset, const u32& length);
-
-        /**
-         * Desrtuctor/
-         */
-        virtual ~FontFile(void);
-
-        /**
-         * Retrieves the font surface.
-         */
-        Surface* GetSurface(void);
-};

+ 0 - 6
src/installer/common/Logger.cpp

@@ -28,12 +28,8 @@ Ogre::String HexToString(int value, unsigned short width, char fill){
     return stream.str();
 }
 
-Ogre::String BoolToString(bool value){return Ogre::StringConverter::toString(value);}
-
 Ogre::String IntToString(int value){return Ogre::StringConverter::toString(value);}
 
-Ogre::String FloatToString(float value){return Ogre::StringConverter::toString(value);}
-
 Logger::Logger(const Ogre::String& log_file_name):
     log_file_(log_file_name){
     FileSystem::RemoveFile(log_file_);
@@ -43,8 +39,6 @@ Logger::~Logger(){}
 
 void Logger::Log(const Ogre::String& text){FileSystem::WriteFile(log_file_, text.c_str(), text.size());}
 
-void Logger::LogW(const Ogre::UTFString& text){FileSystem::WriteFile(log_file_, text.c_str(), text.size() * 2);}
-
 void Logger::Log(std::vector< unsigned char >& text){
     unsigned char* temp = new unsigned char[ text.size() ];
     for (unsigned int i = 0; i < text.size(); ++ i) temp[i] = text[i];

Някои файлове не бяха показани, защото твърде много файлове са промени