Эх сурвалжийг харах

Project structure changed. No more public headers.

Iñigo Valentin 3 жил өмнө
parent
commit
8845b48c9f
100 өөрчлөгдсөн 431 нэмэгдсэн , 2846 устгасан
  1. 7 8
      CMakeLists.txt
  2. 9 9
      PlugIns/Data/CMakeLists.txt
  3. 0 12
      Tests/CMakeLists.txt
  4. 0 31
      Tests/FinalFantasy7/CMakeLists.txt
  5. BIN
      Tests/FinalFantasy7/misc/reference.flevel
  6. BIN
      Tests/FinalFantasy7/misc/reference.flevel.png
  7. BIN
      Tests/FinalFantasy7/misc/reference.model_list
  8. BIN
      Tests/FinalFantasy7/misc/reference.walkmesh
  9. BIN
      Tests/FinalFantasy7/misc/reference_compressed.flevel
  10. BIN
      Tests/FinalFantasy7/misc/reference_compressed.flevel.png
  11. 0 160
      Tests/FinalFantasy7/src/test_FF7FLevelFileSerializer.cpp
  12. 0 83
      Tests/FinalFantasy7/src/test_FF7ModelListFileSerializer.cpp
  13. 0 71
      Tests/FinalFantasy7/src/test_FF7WalkmeshFileSerializer.cpp
  14. 0 60
      Tests/VGearsMain/CMakeLists.txt
  15. 0 23
      Tests/VGearsMain/misc/map.xml
  16. BIN
      Tests/VGearsMain/misc/reference.a
  17. BIN
      Tests/VGearsMain/misc/reference.background
  18. 0 21
      Tests/VGearsMain/misc/reference.background2d.xml
  19. BIN
      Tests/VGearsMain/misc/reference.cam_matrix
  20. BIN
      Tests/VGearsMain/misc/reference.lgp
  21. BIN
      Tests/VGearsMain/misc/reference.p
  22. BIN
      Tests/VGearsMain/misc/reference.palette
  23. 0 24
      Tests/VGearsMain/misc/reference.rsd
  24. BIN
      Tests/VGearsMain/misc/reference.skeleton
  25. BIN
      Tests/VGearsMain/misc/reference_lzs.compressed
  26. BIN
      Tests/VGearsMain/misc/reference_lzs.decompressed
  27. 0 99
      Tests/VGearsMain/misc/reference_manual_object.mesh.xml
  28. 0 8
      Tests/VGearsMain/misc/test_hrc_empty.hrc
  29. 0 18
      Tests/VGearsMain/misc/test_hrc_simple.hrc
  30. 0 4
      Tests/VGearsMain/misc/walkmesh.xml
  31. 0 180
      Tests/VGearsMain/src/test_MapSerializer.cpp
  32. 0 50
      Tests/VGearsMain/src/test_TxzSerializer.cpp
  33. 0 76
      Tests/VGearsMain/src/test_VGearsAFileSerializer.cpp
  34. 0 53
      Tests/VGearsMain/src/test_VGearsBackground2D.cpp
  35. 0 92
      Tests/VGearsMain/src/test_VGearsBackground2DFileSerializer.cpp
  36. 0 145
      Tests/VGearsMain/src/test_VGearsBackgroundFileSerializer.cpp
  37. 0 69
      Tests/VGearsMain/src/test_VGearsCameraMatrixFileSerializer.cpp
  38. 0 115
      Tests/VGearsMain/src/test_VGearsHRCSerializer.cpp
  39. 0 111
      Tests/VGearsMain/src/test_VGearsLGPArchive.cpp
  40. 0 151
      Tests/VGearsMain/src/test_VGearsLZSDataStream.cpp
  41. 0 101
      Tests/VGearsMain/src/test_VGearsManualObject.cpp
  42. 0 69
      Tests/VGearsMain/src/test_VGearsMapFileXMLSerializer.cpp
  43. 0 58
      Tests/VGearsMain/src/test_VGearsPFile.cpp
  44. 0 92
      Tests/VGearsMain/src/test_VGearsPFileSerializer.cpp
  45. 0 80
      Tests/VGearsMain/src/test_VGearsPaletteFileSerializer.cpp
  46. 0 75
      Tests/VGearsMain/src/test_VGearsRSDSerializer.cpp
  47. 0 85
      Tests/VGearsMain/src/test_VGearsRingBuffer.cpp
  48. 0 70
      Tests/VGearsMain/src/test_VGearsWalkmeshFileXMLSerializer.cpp
  49. 0 2
      Tests/VGearsMain/src/test_all.cpp
  50. 2 2
      V-Gears-Installer/CMakeLists.txt
  51. 0 126
      V-Gears-Installer/src/CMakeLists.txt
  52. 0 413
      V-Gears/CMakeLists.txt
  53. 413 0
      src/CMakeLists.txt
  54. 0 0
      src/FF7Character.cpp
  55. 0 0
      src/FF7Character.h
  56. 0 0
      src/FF7Common.cpp
  57. 0 0
      src/FF7Common.h
  58. 0 0
      src/LuaIncludes.h
  59. 0 0
      src/Main.cpp
  60. 0 0
      src/VGearsGameState.cpp
  61. 0 0
      src/VGearsGameState.h
  62. 0 0
      src/VGearsPrerequisites.h
  63. 0 0
      src/Version.h
  64. 0 0
      src/Version.h.in
  65. 0 0
      src/common/File.cpp
  66. 0 0
      src/common/File.h
  67. 0 0
      src/common/FileSystem.cpp
  68. 0 0
      src/common/FileSystem.h
  69. 0 0
      src/common/FinalFantasy7/FF7NameLookup.cpp
  70. 0 0
      src/common/FinalFantasy7/FF7NameLookup.h
  71. 0 0
      src/common/LzsFile.cpp
  72. 0 0
      src/common/LzsFile.h
  73. 0 0
      src/common/TypeDefine.cpp
  74. 0 0
      src/common/TypeDefine.h
  75. 0 0
      src/common/VGearsApplication.cpp
  76. 0 0
      src/common/VGearsApplication.h
  77. 0 0
      src/common/VGearsManualObject.cpp
  78. 0 0
      src/common/VGearsManualObject.h
  79. 0 0
      src/common/VGearsResource.cpp
  80. 0 0
      src/common/VGearsResource.h
  81. 0 0
      src/common/VGearsStringUtil.cpp
  82. 0 0
      src/common/VGearsStringUtil.h
  83. 0 0
      src/core/Assert.h
  84. 0 0
      src/core/AudioManager.cpp
  85. 0 0
      src/core/AudioManager.h
  86. 0 0
      src/core/Background2D.cpp
  87. 0 0
      src/core/Background2D.h
  88. 0 0
      src/core/Background2DAnimation.cpp
  89. 0 0
      src/core/Background2DAnimation.h
  90. 0 0
      src/core/CameraManager.cpp
  91. 0 0
      src/core/CameraManager.h
  92. 0 0
      src/core/CameraManagerCommands.h
  93. 0 0
      src/core/ConfigCmd.cpp
  94. 0 0
      src/core/ConfigCmd.h
  95. 0 0
      src/core/ConfigCmdManager.cpp
  96. 0 0
      src/core/ConfigCmdManager.h
  97. 0 0
      src/core/ConfigCmdManagerCommands.h
  98. 0 0
      src/core/ConfigFile.cpp
  99. 0 0
      src/core/ConfigFile.h
  100. 0 0
      src/core/ConfigVar.cpp

+ 7 - 8
CMakeLists.txt

@@ -18,7 +18,7 @@ set(VGears_VERSION__PATCH 1)
 set(VGears_VERSION ${VGears_VERSION__MAJOR}.${VGears_VERSION__MINOR}.${VGears_VERSION__PATCH})
 
 # Generate version header.
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/V-Gears/include/Version.h.in ${CMAKE_CURRENT_SOURCE_DIR}/V-Gears/include/Version.h) 
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h) 
 
 if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
     # CMake defaults to leaving CMAKE_BUILD_TYPE empty. This screws up
@@ -76,7 +76,7 @@ else()
     set(CMAKE_MODULE_PATH "${OGRE_CMAKE_MODULE_PATH};${CMAKE_MODULE_PATH}")
 endif()
 
-set(VGears_SOURCE_DIR ${CMAKE_SOURCE_DIR})
+set(VGears_SOURCE_DIR ${CMAKE_SOURCE_DIR}/src)
 
 message("VGears_SOURCE_DIR ${VGears_SOURCE_DIR}")
 
@@ -173,7 +173,7 @@ endif()
 
 set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${OGRE_Overlay_LIBRARIES})
 
-find_package(Boost COMPONENTS unit_test_framework REQUIRED)
+#find_package(Boost COMPONENTS unit_test_framework REQUIRED)
 
 if (Boost_LIBRARIES STREQUAL "")
     message(SEND_ERROR "Boost_LIBRARIES is not set")
@@ -181,7 +181,7 @@ endif()
 
 set(VGears_INCLUDE_DIRS
     ${VGears_INCLUDE_DIRS}
-    ${CMAKE_CURRENT_SOURCE_DIR}/V-Gears/include/
+    ${CMAKE_CURRENT_SOURCE_DIR}/src/
     ${OIS_INCLUDE_DIRS}
     ${OGRE_Overlay_INCLUDE_DIRS}
     ${CMAKE_CURRENT_SOURCE_DIR}/lib
@@ -189,7 +189,6 @@ set(VGears_INCLUDE_DIRS
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/luajit/src
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/luabind
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/luabind/luabind/detail
-    ${CMAKE_CURRENT_SOURCE_DIR}/lib/tinyxml
 )
 
 if (MSVC)
@@ -213,18 +212,18 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -rdynamic -O0")
 
 add_definitions(-DTIXML_USE_STL)
 add_subdirectory(lib)
-add_subdirectory(V-Gears)
+add_subdirectory(src)
 
 if(VGears_BUILD_PLUGINS)
     add_subdirectory(PlugIns)
 endif()
 
 if(VGears_BUILD_UTILITIES)
-    add_subdirectory(V-Gears-Installer)
+    add_subdirectory(src/installer)
 endif()
 
 if(VGears_BUILD_TESTS)
-    add_subdirectory(Tests)
+    add_subdirectory(test)
 endif()
 
 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/output)

+ 9 - 9
PlugIns/Data/CMakeLists.txt

@@ -1,17 +1,17 @@
-set(V-Gears_SOURCE_DIR ../../V-Gears)
+set(V-Gears_SOURCE_DIR ../../src)
 
 # Define header and source files for the library.
 set(HEADER_FILES
-    ${V-Gears_SOURCE_DIR}/include/VGearsPrerequisites.h
-    ${V-Gears_SOURCE_DIR}/include/common/VGearsManualObject.h
-    ${V-Gears_SOURCE_DIR}/include/common/VGearsStringUtil.h
-    ${V-Gears_SOURCE_DIR}/include/common/TypeDefine.h
+    ${V-Gears_SOURCE_DIR}/VGearsPrerequisites.h
+    ${V-Gears_SOURCE_DIR}/common/VGearsManualObject.h
+    ${V-Gears_SOURCE_DIR}/common/VGearsStringUtil.h
+    ${V-Gears_SOURCE_DIR}/common/TypeDefine.h
     include/VGearsDataPlugin.h
 )
 set(SOURCE_FILES
-    ${V-Gears_SOURCE_DIR}/src/common/VGearsManualObject.cpp
-    ${V-Gears_SOURCE_DIR}/src/common/VGearsStringUtil.cpp
-    ${V-Gears_SOURCE_DIR}/src/common/TypeDefine.cpp
+    ${V-Gears_SOURCE_DIR}/common/VGearsManualObject.cpp
+    ${V-Gears_SOURCE_DIR}/common/VGearsStringUtil.cpp
+    ${V-Gears_SOURCE_DIR}/common/TypeDefine.cpp
     src/VGearsDataPlugin.cpp
     src/VGearsDataPluginDll.cpp
 )
@@ -20,7 +20,7 @@ include_directories(
     ${OIS_INCLUDE_DIRS}
     ${OGRE_INCLUDE_DIRS}
     ${OGRE_SAMPLES_INCLUDEPATH}
-    ${V-Gears_SOURCE_DIR}/include
+    ${V-Gears_SOURCE_DIR}
     ${CMAKE_CURRENT_SOURCE_DIR}/include
     ${CMAKE_CURRENT_SOURCE_DIR}/../../lib
 )

+ 0 - 12
Tests/CMakeLists.txt

@@ -1,12 +0,0 @@
-add_definitions(
-    -DBOOST_TEST_MODULE="standalone"
-)
-
-if(UNIX OR APPLE)
-    add_definitions(-DBOOST_TEST_DYN_LINK)
-endif()
-
-set(V-Gears_SOURCE_DIR ${VGears_SOURCE_DIR}/V-Gears)
-
-add_subdirectory(V-Gears)
-add_subdirectory(FinalFantasy7)

+ 0 - 31
Tests/FinalFantasy7/CMakeLists.txt

@@ -1,31 +0,0 @@
-file(COPY misc DESTINATION .)
-
-include_directories(
-    ${VGears_INCLUDE_DIRS}
-    ${V-Gears_SOURCE_DIR}/include
-    ${VGears_SOURCE_DIR}/SupportedGames/FinalFantasy7/include
-)
-
-set(LIBRARIES
-    ${VGears_TEST_LIBRARIES}
-    FinalFantasy7
-    V-Gears
-    v-gears-data
-)
-
-add_executable(TestFF7FLevelFileSerializer src/test_FF7FLevelFileSerializer)
-SET_PROPERTY(TARGET TestFF7FLevelFileSerializer PROPERTY FOLDER "tests")
-
-target_link_libraries(TestFF7FLevelFileSerializer ${LIBRARIES})
-
-add_executable(TestFF7ModelListFileSerializer src/test_FF7ModelListFileSerializer.cpp)
-SET_PROPERTY(TARGET TestFF7ModelListFileSerializer PROPERTY FOLDER "tests")
-
-target_link_libraries(TestFF7ModelListFileSerializer ${LIBRARIES})
-add_test(NAME TestFF7ModelListFileSerializer COMMAND TestFF7ModelListFileSerializer)
-
-add_executable(TestFF7WalkmeshFileSerializer src/test_FF7WalkmeshFileSerializer.cpp)
-SET_PROPERTY(TARGET TestFF7WalkmeshFileSerializer PROPERTY FOLDER "tests")
-
-target_link_libraries(TestFF7WalkmeshFileSerializer ${LIBRARIES})
-add_test(NAME TestFF7WalkmeshFileSerializer COMMAND TestFF7WalkmeshFileSerializer)

BIN
Tests/FinalFantasy7/misc/reference.flevel


BIN
Tests/FinalFantasy7/misc/reference.flevel.png


BIN
Tests/FinalFantasy7/misc/reference.model_list


BIN
Tests/FinalFantasy7/misc/reference.walkmesh


BIN
Tests/FinalFantasy7/misc/reference_compressed.flevel


BIN
Tests/FinalFantasy7/misc/reference_compressed.flevel.png


+ 0 - 160
Tests/FinalFantasy7/src/test_FF7FLevelFileSerializer.cpp

@@ -1,160 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-24 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include <boost/test/unit_test.hpp>
-
-#include <Ogre.h>
-
-#include "data/VGearsFLevelFileSerializer.h"
-
-#include "data/VGearsBackgroundFileManager.h"
-#include "data/VGearsCameraMatrixFileManager.h"
-#include "data/VGearsHRCFileManager.h"
-#include "data/VGearsPaletteFileManager.h"
-#include "data/VGearsLZSFLevelFileManager.h"
-#include "data/FF7ModelListFileManager.h"
-#include "map/VGearsBackground2DFileManager.h"
-#include "map/VGearsWalkmeshFileManager.h"
-
-using namespace Ogre;
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestFile : public VGears::FLevelFile
-    {
-    public:
-        TestFile() : VGears::FLevelFile( NULL, "reference.flevel", 0, "General" ) {}
-    };
-
-    class TestTexture : public Texture
-    {
-    public:
-        TestTexture( ResourceManager* creator, const String& name, ResourceHandle handle,
-                  const String& group, bool isManual = false, ManualResourceLoader* loader = 0 )
-            : Texture( creator, name, handle, group, isManual, loader )
-        {}
-
-    protected:
-        virtual void loadImpl() {}
-        virtual void unloadImpl() {}
-        // IVV compiler error
-        //virtual HardwarePixelBufferSharedPtr getBuffer( size_t, size_t ){ return HardwarePixelBufferSharedPtr( NULL ); }
-        virtual void createInternalResourcesImpl(){}
-        virtual void freeInternalResourcesImpl(){}
-    };
-
-    class TestTextureManager : public TextureManager
-    {
-    public:
-        virtual PixelFormat getNativeFormat( TextureType ttype, PixelFormat format, int usage )
-        {
-            return format;
-        }
-        virtual bool    isHardwareFilteringSupported( TextureType ttype, PixelFormat format, int usage, bool preciseFormatOnly=false )
-        {
-            return false;
-        }
-
-    protected:
-        virtual Resource* createImpl( const String &name
-          , ResourceHandle handle, const String &group, bool isManual
-          , ManualResourceLoader *loader
-          , const NameValuePairList *createParams )
-        {
-            return new TestTexture( this, name, handle, group, isManual, loader );
-        }
-    };
-
-
-    LogManager                          logMgr;
-    Root                                root("","");
-    ResourceGroupManager               &rgm( ResourceGroupManager::getSingleton() );
-    TestTextureManager                  tmgr;
-    VGears::CameraMatrixFileManager     cmgr;
-    VGears::WalkmeshFileManager         wmgr;
-    VGears::PaletteFileManager          pmgr;
-    VGears::BackgroundFileManager       bmgr;
-    VGears::Background2DFileManager     b2mgr;
-    VGears::ModelListFileManager   mmgr;
-    VGears::HRCFileManager              hmgr;
-    VGears::LZSFLevelFileManager        fmgr;
-    logMgr.createLog( "Default Log", true, true, true );
-
-    rgm.addResourceLocation( "misc", "FileSystem" );
-    rgm.initialiseAllResourceGroups();
-
-    TestFile        file;
-    DataStreamPtr   stream( rgm.openResource( file.getName(), file.getGroup() ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    VGears::FLevelFileSerializer    ser;
-    ser.importFLevelFile( stream, &file );
-    BOOST_CHECK_EQUAL( 757890, stream->tell() );
-
-    VGears::BackgroundFilePtr       background   ( file.getBackground() );
-    VGears::CameraMatrixFilePtr     camera_matrix( file.getCameraMatrix() );
-    VGears::ModelListFilePtr   model_list   ( file.getModelList() );
-    VGears::PaletteFilePtr          palette      ( file.getPalette() );
-    VGears::WalkmeshFilePtr         walkmesh     ( file.getWalkmesh() );
-
-    BOOST_REQUIRE(background != nullptr);
-    BOOST_REQUIRE(camera_matrix != nullptr);
-    BOOST_REQUIRE(model_list != nullptr);
-    BOOST_REQUIRE(palette != nullptr);
-    BOOST_REQUIRE(walkmesh != nullptr);
-    BOOST_CHECK_EQUAL( "reference.background", background->getName() );
-    BOOST_CHECK_EQUAL( "reference.cam_matrix", camera_matrix->getName() );
-    BOOST_CHECK_EQUAL( "reference.model_list", model_list->getName() );
-    BOOST_CHECK_EQUAL( "reference.palette"   , palette->getName() );
-    BOOST_CHECK_EQUAL( "reference.walkmesh"  , walkmesh->getName() );
-    Matrix3 m3_expected(
-        1, -0, -0
-       ,0, -1, -0
-       ,0, -0, -1
-    );
-    BOOST_CHECK_EQUAL( m3_expected, camera_matrix->getMatrix() );
-    BOOST_CHECK_EQUAL( Vector3( -1, 2, -3 ), camera_matrix->getPosition() );
-    BOOST_CHECK_EQUAL( 2, camera_matrix->getCount() );
-    BOOST_CHECK_EQUAL( 12345, camera_matrix->getFocalLength() );
-
-
-    Ogre::Image *image( background->createImage( palette ) );
-    // TODO: FIX ME ON OSX
-    //image->save( file.getName() + ".png" );
-    delete image;
-
-    VGears::FLevelFilePtr lzs_file = fmgr.load( "reference_compressed.flevel", "General" ).staticCast<VGears::FLevelFile>();
-    BOOST_CHECK(lzs_file->getPalette() != nullptr);
-    BOOST_CHECK(lzs_file->getBackground() != nullptr);
-
-    image = lzs_file->getBackground()->createImage( lzs_file->getPalette() );
-    // TODO: FIX ME ON OSX
-    //image->save( lzs_file->getName() + ".png" );
-    delete image;
-
-    lzs_file.reset();
-    logMgr.destroyLog( "Default Log" );
-    stream->close();
-}

+ 0 - 83
Tests/FinalFantasy7/src/test_FF7ModelListFileSerializer.cpp

@@ -1,83 +0,0 @@
-/*
------------------------------------------------------------------------------
-Copyright (c) 07.10.2013 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-This file is part of V-Gears
-
-V-Gears is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, version 2.0 (GPLv2) 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 <fstream>
-
-#include <boost/test/unit_test.hpp>
-#include <Ogre.h>
-
-#include "data/FF7ModelListFileSerializer.h"
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestFile : public VGears::ModelListFile
-    {
-    public:
-        TestFile() : VGears::ModelListFile( NULL, "", 0, "" ) {}
-        size_t getCalculatedSize() const { return calculateSize(); }
-
-        virtual void unload( void ) {}
-    };
-    const char* file_name( "misc/reference.model_list" );
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    Ogre::LogManager                        logMgr;
-    VGears::ModelListFileSerializer    ser;
-    TestFile                                f;
-
-    logMgr.createLog( "Default Log", true, true, true );
-
-    ser.importModelListFile( stream, &f );
-    BOOST_CHECK_EQUAL( 1314, stream->tell() );
-
-    BOOST_CHECK_EQUAL( 512, f.getScale() );
-
-    VGears::ModelListFile::ModelList &models( f.getModels() );
-    BOOST_CHECK_EQUAL( 10, models.size() );
-
-    VGears::ModelListFile::ModelDescription &m1( models.front() );
-    BOOST_CHECK_EQUAL( "md1stinmain_n_cloud.char", m1.name );
-    BOOST_CHECK_EQUAL( "AAAA.HRC", m1.hrc_name );
-    BOOST_CHECK_EQUAL( "512", m1.scale );
-    VGears::ModelListFile::AnimationList &animations1( m1.animations );
-    BOOST_CHECK_EQUAL( 4, animations1.size() );
-    VGears::ModelListFile::AnimationDescription &a1_1( animations1.front() );
-    BOOST_CHECK_EQUAL( "ACFE.aki", a1_1.name );
-    BOOST_CHECK_EQUAL( 1, a1_1.unknown );
-    VGears::ModelListFile::AnimationDescription &a1_2( animations1.back() );
-    BOOST_CHECK_EQUAL( "BVJF.yos", a1_2.name );
-    BOOST_CHECK_EQUAL( 1, a1_2.unknown );
-
-    VGears::ModelListFile::ModelDescription &m2( models.back() );
-    BOOST_CHECK_EQUAL( "md1stinshinra_guard.char", m2.name );
-    BOOST_CHECK_EQUAL( "AZHE.HRC", m2.hrc_name );
-    BOOST_CHECK_EQUAL( "512", m2.scale );
-    VGears::ModelListFile::AnimationList &animations2( m2.animations );
-    BOOST_CHECK_EQUAL( 8, animations2.size() );
-    VGears::ModelListFile::AnimationDescription &a2_1( animations2.front() );
-    BOOST_CHECK_EQUAL( "AAFE.aki", a2_1.name );
-    BOOST_CHECK_EQUAL( 1, a2_1.unknown );
-    VGears::ModelListFile::AnimationDescription &a2_2( animations2.back() );
-    BOOST_CHECK_EQUAL( "BXIA.yos", a2_2.name );
-    BOOST_CHECK_EQUAL( 1, a2_2.unknown );
-
-    logMgr.destroyLog( "Default Log" );
-
-    ifs->close();
-}

+ 0 - 71
Tests/FinalFantasy7/src/test_FF7WalkmeshFileSerializer.cpp

@@ -1,71 +0,0 @@
-/*
------------------------------------------------------------------------------
-Copyright (c) 06.10.2013 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-This file is part of V-Gears
-
-V-Gears is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, version 2.0 (GPLv2) 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 <fstream>
-
-#include <boost/test/unit_test.hpp>
-#include <Ogre.h>
-
-#include "map/FF7WalkmeshFileSerializer.h"
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestFile : public VGears::WalkmeshFile
-    {
-    public:
-        TestFile() : VGears::WalkmeshFile( NULL, "", 0, "" ) {}
-        size_t getCalculatedSize() const { return calculateSize(); }
-
-        virtual void unload( void ) {}
-    };
-    const char* file_name( "misc/reference.walkmesh" );
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    Ogre::LogManager                    logMgr;
-    VGears::WalkmeshFileSerializer ser;
-    TestFile                            f;
-
-    logMgr.createLog( "Default Log", true, true, true );
-
-    ser.importWalkmeshFile( stream, &f );
-    VGears::WalkmeshFile::TriangleList &triangles( f.getTriangles() );
-    BOOST_CHECK_EQUAL( 39, triangles.size() );
-
-    VGears::WalkmeshFile::Triangle &t1( triangles.front() );
-    BOOST_CHECK_EQUAL( Ogre::Vector3( 3784, 27544, 325 ), t1.a );
-    BOOST_CHECK_EQUAL( Ogre::Vector3( 3778, 27434, 325 ), t1.b );
-    BOOST_CHECK_EQUAL( Ogre::Vector3( 3751, 27410, 310 ), t1.c );
-    BOOST_CHECK_EQUAL( 26, t1.access_side[0] );
-    BOOST_CHECK_EQUAL( -1, t1.access_side[1] );
-    BOOST_CHECK_EQUAL(  1, t1.access_side[2] );
-
-    VGears::WalkmeshFile::Triangle &t2( triangles.back() );
-    BOOST_CHECK_EQUAL( Ogre::Vector3( 3506, 29251, 432 ), t2.a );
-    BOOST_CHECK_EQUAL( Ogre::Vector3( 3527, 29405, 432 ), t2.b );
-    BOOST_CHECK_EQUAL( Ogre::Vector3( 3566, 29245, 400 ), t2.c );
-    BOOST_CHECK_EQUAL( -1, t2.access_side[0] );
-    BOOST_CHECK_EQUAL( 37, t2.access_side[1] );
-    BOOST_CHECK_EQUAL( -1, t2.access_side[2] );
-
-    BOOST_CHECK_EQUAL( 1174, stream->tell() );
-
-    logMgr.destroyLog( "Default Log" );
-
-    ifs->close();
-}

+ 0 - 60
Tests/VGearsMain/CMakeLists.txt

@@ -1,60 +0,0 @@
-file(COPY misc DESTINATION .)
-
-include_directories(
-    ${VGears_INCLUDE_DIRS}
-    ${V-Gears_SOURCE_DIR}/include
-)
-
-set(LIBRARIES
-    ${VGears_TEST_LIBRARIES}
-    V-Gears
-    v-gears-data
-)
-
-add_executable(TestVGearsAFileSerializer src/test_VGearsAFileSerializer.cpp)
-SET_PROPERTY(TARGET TestVGearsAFileSerializer PROPERTY FOLDER "tests")
-
-target_link_libraries(TestVGearsAFileSerializer ${LIBRARIES})
-add_test(NAME TestVGearsAFileSerializer COMMAND TestVGearsAFileSerializer)
-
-add_executable(TestVGearsMapFileXMLSerializer src/test_VGearsMapFileXMLSerializer.cpp)
-SET_PROPERTY(TARGET TestVGearsMapFileXMLSerializer PROPERTY FOLDER "tests")
-
-target_link_libraries(TestVGearsMapFileXMLSerializer ${LIBRARIES})
-add_test(NAME TestVGearsMapFileXMLSerializer COMMAND TestVGearsMapFileXMLSerializer)
-
-# Field walk mesh.
-add_executable(TestVGearsWalkmeshFileXMLSerializer src/test_VGearsWalkmeshFileXMLSerializer.cpp)
-SET_PROPERTY(TARGET TestVGearsWalkmeshFileXMLSerializer PROPERTY FOLDER "tests")
-
-target_link_libraries(TestVGearsWalkmeshFileXMLSerializer ${LIBRARIES})
-add_test(NAME TestVGearsWalkmeshFileXMLSerializer COMMAND TestVGearsWalkmeshFileXMLSerializer)
-
-# LGP archive.
-add_executable(TestVGearsLGPArchive src/test_VGearsLGPArchive.cpp)
-SET_PROPERTY(TARGET TestVGearsLGPArchive PROPERTY FOLDER "tests")
-
-target_link_libraries(TestVGearsLGPArchive ${LIBRARIES})
-add_test(NAME TestVGearsLGPArchive COMMAND TestVGearsLGPArchive)
-
-# HRC archive.
-add_executable(TestVGearsHRCSerializer src/test_VGearsHRCSerializer.cpp)
-SET_PROPERTY(TARGET TestVGearsHRCSerializer PROPERTY FOLDER "tests")
-
-target_link_libraries(TestVGearsHRCSerializer ${LIBRARIES})
-add_test(NAME TestVGearsHRCSerializer COMMAND TestVGearsHRCSerializer)
-
-# World Map
-add_executable(TestMapSerializer src/test_MapSerializer.cpp)
-SET_PROPERTY(TARGET TestMapSerializer PROPERTY FOLDER "tests")
-
-target_link_libraries(TestMapSerializer ${LIBRARIES})
-# TODO FIX ME - test not currently working.
-#add_test(TestMapSerializer TestMapSerializer)
-
-add_executable(TestTxzSerializer src/test_TxzSerializer.cpp)
-SET_PROPERTY(TARGET TestTxzSerializer PROPERTY FOLDER "tests")
-
-target_link_libraries(TestTxzSerializer ${LIBRARIES})
-# TODO FIX ME - test not currently working
-#add_test(TestTxzSerializer TestTxzSerializer)

+ 0 - 23
Tests/VGearsMain/misc/map.xml

@@ -1,23 +0,0 @@
-<map>
-    <script file_name="path/to/script.lua" />
-    <background2d file_name="background_2d_resource_name" />
-    <walkmesh file_name="walkmesh_resource_name" />
-    <movement_rotation degree="-5.625" />
-    <entity_script name="Director" />
-    <!--entity_model name="Cloud" file_name="models/ffvii/field/units/cloud.mesh" position="29.0547 229.234 2.56082" direction="0" /-->
-    <entity_model name="Cloud" file_name="n_cloud.mesh" position="29.0547 229.234 2.56082" direction="0"
-                  scale="0.03125 0.03125 0.03125" root_orientation="0.7071067811865476 0.7071067811865476 0 0" />
-    <entity_model name="Barret" file_name="models/ffvii/field/units/barret.mesh" position="0 0 0" direction="0" />
-    <entity_script name="View" />
-    <entity_model name="Hei0" file_name="models/ffvii/field/units/soldier.mesh" position="0 0 0" direction="0" />
-    <entity_model name="Hei1" file_name="models/ffvii/field/units/soldier.mesh" position="0 0 0" direction="0" />
-    <entity_model name="Biggs" file_name="models/ffvii/field/units/biggs.mesh" position="0 0 0" direction="0" />
-    <entity_model name="Jessie" file_name="models/ffvii/field/units/jessie.mesh" position="0 0 0" direction="0" />
-    <entity_model name="Wedge" file_name="models/ffvii/field/units/wedge.mesh" position="0 0 0" direction="0" />
-    <entity_model name="Gu0" file_name="models/ffvii/field/units/guard.mesh" position="0 0 0" direction="0" />
-    <entity_model name="Gu1" file_name="models/ffvii/field/units/guard.mesh" position="0 0 0" direction="0" />
-    <entity_model name="GuAdd" file_name="models/ffvii/field/units/guard.mesh" position="0 0 0" direction="0" />
-
-    <entity_trigger name="Gateway0" point1="28.6016 228.562 2.75781" point2="28.6641 229.438 2.75781" enabled="true" />
-    <entity_point name="Spawn_md1_1" position="29.0547 229.234 2.56082" rotation="67.7647" />
-</map>

BIN
Tests/VGearsMain/misc/reference.a


BIN
Tests/VGearsMain/misc/reference.background


+ 0 - 21
Tests/VGearsMain/misc/reference.background2d.xml

@@ -1,21 +0,0 @@
-<background2d image="maps/ffvii/field/md1stin.png" position="28.4846 210.83 3.10751" orientation="0.742188 0.667516 -0.0403783 -0.0450658" fov="34.5389" range="-768 -768 768 768">
-    <tile destination="-720 192" width="48" height="48" uv="0 0 0.015625 0.03125" depth="123" blending="alpha" />
-    <tile destination="-672 192" width="48" height="48" uv="0.015625 0 0.03125 0.03125" depth="100" blending="add" />
-    <tile destination="-624 192" width="48" height="48" uv="0 0.03125 0.015625 0.0625" depth="200" blending="alpha" />
-    <tile destination="-576 192" width="48" height="48" uv="0.015625 0.03125 0.03125 0.0625" depth="300" blending="alpha" />
-    <tile destination="-240 -528" width="48" height="48" uv="0 0 0.015625 0.03125" depth="0.002" blending="alpha">
-        <animation name="Fan" length="0.5">
-          <keyframe time="0"     uv="0.015625 0 0.03125 0.03125" />
-          <keyframe time="0.1"   uv="0 0.03125 0.015625 0.0625" />
-          <keyframe time="0.233" uv="0.015625 0.03125 0.03125 0.0625" />
-        </animation>
-        <animation name="Light" length="0.25">
-          <keyframe time="0"     uv="0.015625 0 0.03125 0.03125" />
-          <keyframe time="0.1"   uv="0 0.03125 0.015625 0.0625" />
-          <keyframe time="0.233" uv="0.015625 0.03125 0.03125 0.0625" />
-        </animation>
-    </tile>
-    <tile destination="-192 -528" width="48" height="48" uv="0.03125 0 0.046875 0.03125" depth="0.002" blending="alpha">
-        <animation name="Fan" length="0.366" />
-    </tile>
-</background2d>

BIN
Tests/VGearsMain/misc/reference.cam_matrix


BIN
Tests/VGearsMain/misc/reference.lgp


BIN
Tests/VGearsMain/misc/reference.p


BIN
Tests/VGearsMain/misc/reference.palette


+ 0 - 24
Tests/VGearsMain/misc/reference.rsd

@@ -1,24 +0,0 @@
-# comment before the header might not be standard, but we allow it
-@RSD940102
-# comment, sould be ignored
-# 11 bytes
-PLY=Polygon.PLY
-# 12 bytes
-MAT=Material.MAT
-# 9 bytes
-GRP=Group.GRP
-# some textures
-NTEX=3
-# 17 bytes
-TEX[0]=First Texture.TIM
-# 17 bytes
-TEX[1]=SecondTexture.TIM
-#TEX[1]=unused texture.TIM
-# 17 bytes
-TEX[2]=Third Texture.TIM
-# calculated size shoud be
-# 11 + 12 + 9 + 17 + 17 + 17 = 83
-
-# blank lines are ok :)
-
-

BIN
Tests/VGearsMain/misc/reference.skeleton


BIN
Tests/VGearsMain/misc/reference_lzs.compressed


BIN
Tests/VGearsMain/misc/reference_lzs.decompressed


+ 0 - 99
Tests/VGearsMain/misc/reference_manual_object.mesh.xml

@@ -1,99 +0,0 @@
-<mesh>
-    <submeshes>
-        <submesh material="material1" usesharedvertices="false" use32bitindexes="false" operationtype="triangle_list">
-            <faces count="1">
-                <face v1="0" v2="1" v3="2" />
-            </faces>
-            <geometry vertexcount="3">
-                <vertexbuffer positions="true">
-                    <vertex>
-                        <position x="0" y="0" z="0" />
-                    </vertex>
-                    <vertex>
-                        <position x="1" y="0" z="0" />
-                    </vertex>
-                    <vertex>
-                        <position x="0" y="1" z="0" />
-                    </vertex>
-                </vertexbuffer>
-                <vertexbuffer normals="true">
-                    <vertex>
-                        <normal x="0" y="0" z="1" />
-                    </vertex>
-                    <vertex>
-                        <normal x="0" y="0" z="1" />
-                    </vertex>
-                    <vertex>
-                        <normal x="0" y="0" z="1" />
-                    </vertex>
-                </vertexbuffer>
-                <vertexbuffer colours_diffuse="true">
-                    <vertex>
-                        <colour_diffuse value="1 0 0 1" />
-                    </vertex>
-                    <vertex>
-                        <colour_diffuse value="0 1 0 1" />
-                    </vertex>
-                    <vertex>
-                        <colour_diffuse value="0 0 1 1" />
-                    </vertex>
-                </vertexbuffer>
-            </geometry>
-            <boneassignments>
-                <vertexboneassignment vertexindex="0" boneindex="1" weight="1" />
-                <vertexboneassignment vertexindex="1" boneindex="2" weight="3" />
-                <vertexboneassignment vertexindex="2" boneindex="2" weight="2" />
-            </boneassignments>
-        </submesh>
-        <submesh material="material2" usesharedvertices="false" use32bitindexes="false" operationtype="triangle_list">
-            <faces count="1">
-                <face v1="0" v2="1" v3="2" />
-            </faces>
-            <geometry vertexcount="3">
-                <vertexbuffer positions="true">
-                    <vertex>
-                        <position x="0" y="0" z="0" />
-                    </vertex>
-                    <vertex>
-                        <position x="1" y="0" z="0" />
-                    </vertex>
-                    <vertex>
-                        <position x="0" y="1" z="0" />
-                    </vertex>
-                </vertexbuffer>
-                <vertexbuffer normals="true">
-                    <vertex>
-                        <normal x="0" y="0" z="1" />
-                    </vertex>
-                    <vertex>
-                        <normal x="0" y="0" z="1" />
-                    </vertex>
-                    <vertex>
-                        <normal x="0" y="0" z="1" />
-                    </vertex>
-                </vertexbuffer>
-                <vertexbuffer colours_diffuse="true">
-                    <vertex>
-                        <colour_diffuse value="1 0 0 1" />
-                    </vertex>
-                    <vertex>
-                        <colour_diffuse value="0 1 0 1" />
-                    </vertex>
-                    <vertex>
-                        <colour_diffuse value="0 0 1 1" />
-                    </vertex>
-                </vertexbuffer>
-            </geometry>
-            <boneassignments>
-                <vertexboneassignment vertexindex="0" boneindex="1" weight="1" />
-                <vertexboneassignment vertexindex="1" boneindex="2" weight="3" />
-                <vertexboneassignment vertexindex="2" boneindex="2" weight="2" />
-            </boneassignments>
-        </submesh>
-    </submeshes>
-    <skeletonlink name="test.skeleton" />
-    <submeshnames>
-        <submeshname name="sub_name1" index="0" />
-        <submeshname name="sub_name2" index="1" />
-    </submeshnames>
-</mesh>

+ 0 - 8
Tests/VGearsMain/misc/test_hrc_empty.hrc

@@ -1,8 +0,0 @@
-:HEADER_BLOCK 2
-:SKELETON test_empty_skeleton
-:BONES 0
-
-null
-root
-1.5
-1 model.1

+ 0 - 18
Tests/VGearsMain/misc/test_hrc_simple.hrc

@@ -1,18 +0,0 @@
-:HEADER_BLOCK 2
-:SKELETON test_skeleton
-:BONES 3
-
-bone.1
-root
-1.5
-1 model.1
-
-bone.1.1
-bone.1
-2
-1 model.1.1
-
-bone.2
-root
-3.125
-3 model.2-1 model.2-2 model.2-3

+ 0 - 4
Tests/VGearsMain/misc/walkmesh.xml

@@ -1,4 +0,0 @@
-<walkmesh>
-    <triangle a="1 2 4" b="8 16 32" c="64 128 256" a_b="1" b_c="-1" c_a="-1"/>
-    <triangle a="4 2 1" b="32 16 8" c="256 128 64" a_b="-1" b_c="0" c_a="-1"/>
-</walkmesh>

+ 0 - 180
Tests/VGearsMain/src/test_MapSerializer.cpp

@@ -1,180 +0,0 @@
-#include <fstream>
-
-//#include <boost/test/unit_test.hpp>
-#include <Ogre.h>
-
-#include "common/TypeDefine.h"
-#include "data/worldmap/MapFileSerializer.h"
-#include "data/worldmap/MapFile.h"
-#include "data/worldmap/MapFileManager.h"
-
-#include "data/VGearsTexCodec.h"
-#include <functional>
-
-#include "data/VGearsLGPArchiveFactory.h"
-
-using namespace Ogre;
-
-
-static void createReferenceFileInstance(std::function<void(Ogre::DataStreamPtr& stream, VGears::WorldMapFile& file)> callBack)
-{
-    class TestFile : public VGears::WorldMapFile
-    {
-    public:
-        TestFile() : VGears::WorldMapFile( NULL, "", 0, "" ) {}
-    };
-
-    const char* file_name = "/home/paul/vgears/v-gears/Tests/FinalFantasy7/misc/reference.map";
-    std::ifstream ifs( file_name, std::ifstream::binary );
-    {
-//        BOOST_REQUIRE( ifs.is_open() );
-        Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( &ifs, false ) );
-//        BOOST_REQUIRE( stream->isReadable() );
-
-        //Ogre::LogManager log;
-        TestFile f;
-
-       // log.createLog( "Default Log", true, true, true );
-
-        callBack(stream, f);
-
-       // log.destroyLog( "Default Log" );
-    }
-}
-
-/*
-BOOST_AUTO_TEST_CASE( file_size_is_multiple_of_block_size )
-{
-    createReferenceFileInstance([&](Ogre::DataStreamPtr& stream, VGears::WorldMapFile& file)
-    {
-        VGears::MapFileSerializer s;
-        s.importMapFile( stream, file );
-    });
-}
-
-// compare meshes to hand picked data that we know should be in the block
-BOOST_AUTO_TEST_CASE( parse_16_meshes_in_one_block )
-{
-
-}
-
-
-BOOST_AUTO_TEST_CASE( parsing_whole_map )
-{
-
-}
-
-BOOST_AUTO_TEST_CASE( replace_story_meshes )
-{
-
-}
-*/
-
-Camera *mainCam = nullptr;
-
-class GameFrameListener : public Ogre::FrameListener
-{
-public:
-    using Ogre::FrameListener::FrameListener;
-
-    bool frameStarted( const Ogre::FrameEvent& evt )
-    {
-        auto pos = mainCam->getPosition();
-
-        //pos.x += 1.0f;
-
-        //pos.z += 1.0f;
-
-        mainCam->setPosition(pos);
-
-        return true;
-    }
-};
-
-
-int main(int argc, char **argv)
-{
-    Root *root = new Root();
-    // choose renderer
-
-    // IVV
-    /*if(!root->showConfigDialog())
-    {
-        return 0;
-    }*/
-
-    // initialise root
-    root->initialise(false);
-
-
-    // create main window
-    RenderWindow *renderWindow = root->createRenderWindow("Main",320,240,false);
-    // create the scene
-    SceneManager *sceneMgr = root->createSceneManager(Ogre::ST_GENERIC);
-    // add a camera
-    mainCam = sceneMgr->createCamera("MainCam");
-    // add viewport
-    Viewport *vp = renderWindow->addViewport(mainCam);
-
-
-    Ogre::ArchiveManager::getSingleton().addArchiveFactory( new VGears::LGPArchiveFactory() );
-
-
-    Ogre::TextureManager* tm = root->getTextureManager();
-
-
-    VGears::MapFileManager* worldManager = new VGears::MapFileManager();
-
-    ResourceGroupManager::getSingleton().addResourceLocation(".", "FileSystem");
-    ResourceGroupManager::getSingleton().addResourceLocation("/home/paul/vgears/data/cd1pc/wm", "FileSystem", "TEST");
-    ResourceGroupManager::getSingleton().addResourceLocation("/home/paul/vgears/data/cd1pc/wm/world_us.lgp", VGears::LGPArchiveFactory::ARCHIVE_TYPE, "TEST");
-
-
-    VGears::TexCodec::install();
-    VGears::TexCodec::initialise();
-
-
-    ResourceGroupManager::getSingleton().declareResource("bridge.tex", "Texture", "TEST");
-
-    ResourceGroupManager::getSingleton().declareResource("wm0.map", VGears::WorldMapFile::RESOURCE_TYPE, "TEST");
-    ResourceGroupManager::getSingleton().declareResource("wm1.map", VGears::WorldMapFile::RESOURCE_TYPE, "TEST");
-    ResourceGroupManager::getSingleton().declareResource("wm2.map", VGears::WorldMapFile::RESOURCE_TYPE, "TEST");
-
-
-    ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
-
-    Ogre::ResourcePtr f = worldManager->load("wm0.map", "TEST");
-
-    //worldManager->load("wm/wm0.map", "TEST");
-
-    TexturePtr p = tm->load("bridge.tex", "TEST");
-
-    int th = p->getSrcHeight();
-    int tw = p->getSrcWidth();
-
-/*
-    GameFrameListener *frameListener= new GameFrameListener();
-  //  frameListener->showDebugOverlay(true);
-    // Create an Entity
-
-      Ogre::Entity* ogreHead = sceneMgr->createEntity("axes", "axes.mesh");
-
-      // Create a SceneNode and attach the Entity to it
-      Ogre::SceneNode* headNode = sceneMgr->getRootSceneNode()->createChildSceneNode("HeadNode");
-      headNode->attachObject(ogreHead);
-        headNode->setPosition( 0, 0, 0 );
-
-     // createColourCube(sceneMgr);
-
-      mainCam->setPolygonMode(PM_WIREFRAME);
-
-      mainCam->setFarClipDistance(900000.0f);
-      mainCam->setPosition( 50, 500, 500 );
-      mainCam->lookAt( 0, 0, 0);
-
-    root->addFrameListener(frameListener);
-
-    root->startRendering();
-*/
-    return 0;
-}

+ 0 - 50
Tests/VGearsMain/src/test_TxzSerializer.cpp

@@ -1,50 +0,0 @@
-#include <fstream>
-
-#include <boost/test/unit_test.hpp>
-#include <Ogre.h>
-
-#include "common/TypeDefine.h"
-#include "data/worldmap/TxzFileSerializer.h"
-#include "data/worldmap/TxzFile.h"
-
-#include <functional>
-
-using namespace Ogre;
-
-
-static void createReferenceFileInstance(std::string filename, std::function<void(Ogre::DataStreamPtr& stream, VGears::TxzFile& file)> callBack)
-{
-    class TestFile : public VGears::TxzFile
-    {
-    public:
-        TestFile() : VGears::TxzFile( NULL, "", 0, "" ) {}
-    };
-
-    const char* file_name = filename.c_str();
-    std::ifstream ifs( file_name, std::ifstream::binary );
-    {
-        BOOST_REQUIRE( ifs.is_open() );
-        Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( &ifs, false ) );
-        BOOST_REQUIRE( stream->isReadable() );
-
-        Ogre::LogManager log;
-        TestFile f;
-
-        log.createLog( "Default Log", true, true, true );
-
-        callBack(stream, f);
-
-        log.destroyLog( "Default Log" );
-    }
-}
-
-
-BOOST_AUTO_TEST_CASE( read_blocks )
-{
-    createReferenceFileInstance( "/home/paul/vgears/data/cd1/world/wm0.txz", [&](Ogre::DataStreamPtr& stream, VGears::TxzFile& file)
-    {
-        VGears::TxzFileSerializer s;
-        s.import( stream, file );
-    });
-}
-

+ 0 - 76
Tests/VGearsMain/src/test_VGearsAFileSerializer.cpp

@@ -1,76 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-12 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include <fstream>
-
-#include <boost/test/unit_test.hpp>
-#include <Ogre.h>
-
-#include "data/VGearsAFileSerializer.h"
-
-BOOST_AUTO_TEST_CASE( header_size )
-{
-    BOOST_CHECK_EQUAL( 0x24, sizeof( VGears::AFileSerializer::Header ) );
-}
-
-BOOST_AUTO_TEST_CASE( header_offset )
-{
-    BOOST_CHECK_EQUAL( 0x00, offsetof( VGears::AFileSerializer::Header, version ) );
-    BOOST_CHECK_EQUAL( 0x04, offsetof( VGears::AFileSerializer::Header, frame_count ) );
-    BOOST_CHECK_EQUAL( 0x08, offsetof( VGears::AFileSerializer::Header, bone_count ) );
-    BOOST_CHECK_EQUAL( 0x0C, offsetof( VGears::AFileSerializer::Header, rotation_order ) );
-}
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestFile : public VGears::AFile
-    {
-    public:
-        TestFile() : VGears::AFile( NULL, "", 0, "" ) {}
-    };
-    const char* file_name( "misc/reference.a" );
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    Ogre::LogManager            logMgr;
-    VGears::AFileSerializer     ser;
-    TestFile                    f;
-
-    logMgr.createLog( "Default Log", true, true, true );
-
-    ser.importAFile( stream, &f );
-
-    VGears::AFile::FrameList &frames( f.getFrames() );
-    BOOST_CHECK_EQUAL( 80, frames.size() );
-    BOOST_CHECK( Ogre::Vector3( -63.86031f, 71.90821f, -10.97811f    ).positionEquals( frames.front().root_translation ) );
-    BOOST_CHECK( Ogre::Vector3(   0.0f      , 13.53528f,   0.07706928f ).positionEquals( frames.back ().root_translation ) );
-
-    logMgr.destroyLog( "Default Log" );
-
-    ifs->close();
-}
-

+ 0 - 53
Tests/VGearsMain/src/test_VGearsBackground2D.cpp

@@ -1,53 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-28 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include <boost/test/unit_test.hpp>
-
-#include <Ogre.h>
-
-#include "core/Background2D.h"
-#include "map/VGearsBackground2DFileManager.h"
-
-BOOST_AUTO_TEST_SUITE( VGearsBackground2D )
-
-BOOST_AUTO_TEST_CASE( load )
-{
-    class TestFile : public Background2D
-    {
-    public:
-        TestFile() : Background2D() {}
-    };
-
-	Ogre::LogManager    logMgr;
-    logMgr.createLog( "Default Log", true, true, true );
-    Ogre::Root          root;
-    TestFile            file;
-    VGears::Background2DFileManager b_mgr;
-    VGears::Background2DFilePtr     b;
-
-
-    logMgr.destroyLog( "Default Log" );
-}
-BOOST_AUTO_TEST_SUITE_END()

+ 0 - 92
Tests/VGearsMain/src/test_VGearsBackground2DFileSerializer.cpp

@@ -1,92 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-26 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include <boost/test/unit_test.hpp>
-
-#include <Ogre.h>
-
-#include "map/VGearsBackground2DFileXMLSerializer.h"
-
-BOOST_AUTO_TEST_SUITE( VGearsBackground2DFileSerializer )
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestFile : public VGears::Background2DFile
-    {
-    public:
-        TestFile() : VGears::Background2DFile( NULL, "", 0, "" ) {}
-        size_t getCalculatedSize() const { return calculateSize(); }
-
-        virtual void unload( void ) {};
-    };
-
-	Ogre::LogManager                    logMgr;
-    logMgr.createLog( "Default Log", true, true, true );
-
-    const char*                             file_name( "reference.background2d.xml" );
-    TestFile                                file;
-    VGears::Background2DFileXMLSerializer   ser;
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    ser.importBackground2DFile( stream, &file );
-    BOOST_CHECK_EQUAL( "maps/ffvii/field/md1stin.png", file.getTextureName() );
-    BOOST_CHECK_EQUAL( Ogre::Vector4( -768, -768, 768, 768 ), file.getRange() );
-    BOOST_CHECK_EQUAL( Ogre::Vector3( 28.4846, 210.83, 3.10751 ), file.getPosition() );
-    BOOST_CHECK_EQUAL( Ogre::Quaternion( 0.742188, 0.667516, -0.0403783, -0.0450658 ), file.getOrientation() );
-    BOOST_CHECK_EQUAL( Ogre::Radian( Ogre::Degree( 34.5389 ) ), file.getFov() );
-    BOOST_CHECK_EQUAL( 6, file.getTiles().size() );
-    BOOST_CHECK_EQUAL( VGears::B_ALPHA, file.getTiles()[0].blending );
-    BOOST_CHECK_EQUAL( 123, file.getTiles()[0].depth );
-
-    BOOST_CHECK_EQUAL( VGears::B_ADD  , file.getTiles()[1].blending );
-    BOOST_CHECK_EQUAL( 100, file.getTiles()[1].depth );
-
-    BOOST_CHECK_EQUAL( 48, file.getTiles()[2].width  );
-    BOOST_CHECK_EQUAL( 48, file.getTiles()[2].height );
-    BOOST_CHECK_EQUAL( 200, file.getTiles()[2].depth );
-
-    BOOST_CHECK_EQUAL( Ogre::Vector4( 0.015625, 0.03125, 0.03125, 0.0625 ), file.getTiles()[3].uv );
-    BOOST_CHECK_EQUAL( 300, file.getTiles()[3].depth );
-
-    BOOST_CHECK_CLOSE( 0.002, file.getTiles()[4].depth, 0.0001 );
-    BOOST_CHECK_EQUAL( 2    , file.getTiles()[4].animations.size() );
-    BOOST_CHECK_EQUAL( 0.5  , file.getTiles()[4].animations["Fan"].length );
-    BOOST_CHECK_EQUAL( 3    , file.getTiles()[4].animations["Fan"].key_frames.size() );
-    BOOST_CHECK_EQUAL( 0    , file.getTiles()[4].animations["Fan"].key_frames[0].time );
-    BOOST_CHECK_CLOSE( 0.1  , file.getTiles()[4].animations["Fan"].key_frames[1].time, 0.01 );
-    BOOST_CHECK_CLOSE( 0.233, file.getTiles()[4].animations["Fan"].key_frames[2].time, 0.01 );
-    BOOST_CHECK_EQUAL( 0.25 , file.getTiles()[4].animations["Light"].length );
-    BOOST_CHECK_EQUAL( 3    , file.getTiles()[4].animations["Light"].key_frames.size() );
-
-    BOOST_CHECK_CLOSE( 0.002, file.getTiles()[5].depth, 0.0001 );
-
-    logMgr.destroyLog( "Default Log" );
-    ifs->close();
-}
-BOOST_AUTO_TEST_SUITE_END()

+ 0 - 145
Tests/VGearsMain/src/test_VGearsBackgroundFileSerializer.cpp

@@ -1,145 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-07-31 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#define BOOST_TEST_MODULE VGearsBackgroundFileSerializer
-#include <boost/test/unit_test.hpp>
-
-#include <Ogre.h>
-
-#include "data/VGearsBackgroundFileSerializer.h"
-
-BOOST_AUTO_TEST_CASE( header_size )
-{
-    BOOST_CHECK_EQUAL( 0x04, sizeof( VGears::BackgroundFile::Pixel) );
-}
-
-BOOST_AUTO_TEST_CASE( pixel_offset )
-{
-    BOOST_CHECK_EQUAL( 0x00, offsetof( VGears::BackgroundFile::Pixel, x ) );
-    BOOST_CHECK_EQUAL( 0x02, offsetof( VGears::BackgroundFile::Pixel, y ) );
-}
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestFile : public VGears::BackgroundFile
-    {
-    public:
-        TestFile() : VGears::BackgroundFile( NULL, "", 0, "" ) {}
-        size_t getCalculatedSize() const { return calculateSize(); }
-
-        virtual void unload( void ) {};
-    };
-
-	Ogre::LogManager                    logMgr;
-    logMgr.createLog( "Default Log", true, true, true );
-
-    const char*                         file_name( "reference.background" );
-    TestFile                            file;
-    VGears::BackgroundFileSerializer    ser;
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    ser.importBackgroundFile( stream, &file );
-    BOOST_CHECK_EQUAL( 726491, stream->tell() );
-    BOOST_CHECK_EQUAL( 721078, file.getCalculatedSize() );
-
-    VGears::BackgroundFile::Layer *layer( file.getLayers() );
-    BOOST_CHECK( layer[0].enabled );
-    BOOST_CHECK_EQUAL( 400, layer[0].width );
-    BOOST_CHECK_EQUAL( 736, layer[0].height );
-    BOOST_CHECK_EQUAL(1019, layer[0].sprites.size() );
-    BOOST_CHECK_EQUAL(-192, layer[0].sprites[0].dst.x );
-    BOOST_CHECK_EQUAL(-168, layer[0].sprites[0].dst.y );
-    BOOST_CHECK_EQUAL(   0, layer[0].sprites[0].src.x );
-    BOOST_CHECK_EQUAL(   0, layer[0].sprites[0].src.y );
-
-    BOOST_CHECK( layer[1].enabled );
-    BOOST_CHECK_EQUAL( 640, layer[1].width );
-    BOOST_CHECK_EQUAL( 480, layer[1].height );
-    BOOST_CHECK_EQUAL(  64, layer[1].sprites.size() );
-    BOOST_CHECK_EQUAL(  48, layer[1].sprites[0].dst.x );
-    BOOST_CHECK_EQUAL(-312, layer[1].sprites[0].dst.y );
-    BOOST_CHECK_EQUAL( 176, layer[1].sprites[0].src.x );
-    BOOST_CHECK_EQUAL( 240, layer[1].sprites[0].src.y );
-
-    BOOST_CHECK( layer[2].enabled );
-    BOOST_CHECK_EQUAL( 640, layer[2].width );
-    BOOST_CHECK_EQUAL( 480, layer[2].height );
-    BOOST_CHECK_EQUAL(   0, layer[2].sprites.size() );
-
-    BOOST_CHECK( layer[3].enabled );
-    BOOST_CHECK_EQUAL( 640, layer[3].width );
-    BOOST_CHECK_EQUAL( 480, layer[3].height );
-    BOOST_CHECK_EQUAL( 280, layer[3].sprites.size() );
-    BOOST_CHECK_EQUAL(-160, layer[3].sprites[0].dst.x );
-    BOOST_CHECK_EQUAL(-120, layer[3].sprites[0].dst.y );
-    BOOST_CHECK_EQUAL(   0, layer[3].sprites[0].src.x );
-    BOOST_CHECK_EQUAL(   0, layer[3].sprites[0].src.y );
-
-    VGears::uint8 palatte_expected[] = { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 };
-    BOOST_CHECK_EQUAL( sizeof( palatte_expected ), VGears::BackgroundFile::PALETTE_ENTRY_COUNT );
-    BOOST_CHECK_EQUAL_COLLECTIONS( palatte_expected , palatte_expected  + sizeof( palatte_expected )
-                                  ,file.getPalette(), file.getPalette() + VGears::BackgroundFile::PALETTE_ENTRY_COUNT );
-
-    VGears::BackgroundFile::Page *page( file.getPages() );
-    bool enabled[] = { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-    BOOST_CHECK_EQUAL( sizeof(enabled), VGears::BackgroundFile::PAGE_COUNT );
-    for( size_t i( VGears::BackgroundFile::PAGE_COUNT ); i--; )
-    {
-        BOOST_CHECK_EQUAL( enabled[i], page[i].enabled );
-    }
-
-    logMgr.stream()
-        << "\n layer[0].unknown_06: " << layer[0].unknown_06
-
-        << "\n layer[1].unknown_06: " << layer[1].unknown_06
-        << "\n layer[1].unknown_08: " << layer[1].unknown_08[0]
-        << "\n layer[1].unknown_08: " << layer[1].unknown_08[1]
-        << "\n layer[1].unknown_08: " << layer[1].unknown_08[2]
-        << "\n layer[1].unknown_0E: " << layer[1].unknown_0E[0]
-        << "\n layer[1].unknown_0E: " << layer[1].unknown_0E[1]
-        << "\n layer[1].unknown_0E: " << layer[1].unknown_0E[2]
-        << "\n layer[1].unknown_0E: " << layer[1].unknown_0E[3]
-
-        << "\n layer[2].unknown_06: " << layer[2].unknown_06
-        << "\n layer[2].unknown_0E: " << layer[2].unknown_0E[0]
-        << "\n layer[2].unknown_0E: " << layer[2].unknown_0E[1]
-        << "\n layer[2].unknown_0E: " << layer[2].unknown_0E[2]
-        << "\n layer[2].unknown_0E: " << layer[2].unknown_0E[3]
-
-        << "\n layer[3].unknown_06: " << layer[3].unknown_06
-        << "\n layer[3].unknown_0E: " << layer[3].unknown_0E[0]
-        << "\n layer[3].unknown_0E: " << layer[3].unknown_0E[1]
-        << "\n layer[3].unknown_0E: " << layer[3].unknown_0E[2]
-        << "\n layer[3].unknown_0E: " << layer[3].unknown_0E[3]
-        << "\n";
-
-
-    logMgr.destroyLog( "Default Log" );
-    ifs->close();
-}

+ 0 - 69
Tests/VGearsMain/src/test_VGearsCameraMatrixFileSerializer.cpp

@@ -1,69 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-09-02 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include <boost/test/unit_test.hpp>
-
-#include <Ogre.h>
-
-#include "data/VGearsCameraMatrixFileSerializer.h"
-
-BOOST_AUTO_TEST_SUITE( VGearsCameraMatrixFileSerializer )
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestFile : public VGears::CameraMatrixFile
-    {
-    public:
-        TestFile() : VGears::CameraMatrixFile( NULL, "", 0, "" ) {}
-        size_t getCalculatedSize() const { return calculateSize(); }
-
-        virtual void unload( void ) {};
-    };
-
-	Ogre::LogManager                    logMgr;
-    logMgr.createLog( "Default Log", true, true, true );
-
-    const char*                         file_name( "reference.cam_matrix" );
-    TestFile                            file;
-    VGears::CameraMatrixFileSerializer  ser;
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    ser.importCameraMatrixFile( stream, &file );
-    BOOST_CHECK_EQUAL( Ogre::Quaternion( 0.864826, 0.382658, 0.131622, 0.297191 ), file.getOrientation() );
-    BOOST_CHECK_EQUAL( Ogre::Vector3( -998, 930, 5141 ), file.getPosition() );
-    BOOST_CHECK_EQUAL( 0, file.getOffset().x );
-    BOOST_CHECK_EQUAL( 0, file.getOffset().y );
-    BOOST_CHECK_EQUAL( 703, file.getFocalLength() );
-    Ogre::Quaternion dir( file.getMatrix() );
-    BOOST_CHECK_EQUAL( 38, stream->tell() );
-
-    logMgr.destroyLog( "Default Log" );
-    ifs->close();
-}
-BOOST_AUTO_TEST_SUITE_END()

+ 0 - 115
Tests/VGearsMain/src/test_VGearsHRCSerializer.cpp

@@ -1,115 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-10 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include <fstream>
-
-//#define BOOST_TEST_MODULE VGearsHRCFileSerializer
-#include <boost/test/unit_test.hpp>
-
-#include <Ogre.h>
-
-#include "data/VGearsHRCFileSerializer.h"
-
-const char* LOG_NAME( "Default Log" );
-
-BOOST_AUTO_TEST_CASE( simple_hrc )
-{
-    class TestFile : public VGears::HRCFile
-    {
-    public:
-        TestFile() : VGears::HRCFile( NULL, "", 0, "" ) {}
-    };
-    Ogre::LogManager            logMgr;
-    logMgr.createLog( LOG_NAME, true, true, true );
-
-    const char* file_name( "misc/test_hrc_simple.hrc" );
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    TestFile                    file;
-    VGears::HRCFileSerializer   ser;
-    ser.importHRCFile( stream, &file );
-
-    BOOST_CHECK_EQUAL( "test_skeleton", file.getSkeletonName() );
-
-    const VGears::HRCFile::BoneList& bones( file.getBones() );
-    BOOST_CHECK_EQUAL( 3, bones.size() );
-    BOOST_CHECK_EQUAL( "bone.1", bones.at(0).name );
-    BOOST_CHECK_EQUAL( "root", bones.at(0).parent );
-    BOOST_CHECK_CLOSE( 1.5f, bones.at(0).length, 0.0001f );
-    BOOST_CHECK_EQUAL( 1, bones.at(0).rsd_names.size() );
-    BOOST_CHECK_EQUAL( "model.1", bones.at(0).rsd_names.at(0) );
-
-    BOOST_CHECK_EQUAL( "bone.1.1", bones.at(1).name );
-    BOOST_CHECK_EQUAL( bones.at(0).name, bones.at(1).parent );
-    BOOST_CHECK_CLOSE( 2.0f, bones.at(1).length, 0.0001f );
-    BOOST_CHECK_EQUAL( 1, bones.at(1).rsd_names.size() );
-    BOOST_CHECK_EQUAL( "model.1.1", bones.at(1).rsd_names.at(0) );
-
-    BOOST_CHECK_EQUAL( "bone.2", bones.at(2).name );
-    BOOST_CHECK_EQUAL( bones.at(0).parent, bones.at(2).parent );
-    BOOST_CHECK_CLOSE( 3.125f, bones.at(2).length, 0.0001f );
-    BOOST_CHECK_EQUAL( 3, bones.at(2).rsd_names.size() );
-    BOOST_CHECK_EQUAL( "model.2-1", bones.at(2).rsd_names.at(0) );
-    BOOST_CHECK_EQUAL( "model.2-2", bones.at(2).rsd_names.at(1) );
-    BOOST_CHECK_EQUAL( "model.2-3", bones.at(2).rsd_names.at(2) );
-
-    ifs->close();
-}
-
-BOOST_AUTO_TEST_CASE( empty_hrc )
-{
-    class TestFile : public VGears::HRCFile
-    {
-    public:
-        TestFile() : VGears::HRCFile( NULL, "", 0, "" ) {}
-    };
-    Ogre::LogManager            logMgr;
-    logMgr.createLog( LOG_NAME, true, true, true );
-
-    const char* file_name( "misc/test_hrc_empty.hrc" );
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    TestFile                    file;
-    VGears::HRCFileSerializer   ser;
-    ser.importHRCFile( stream, &file );
-
-    BOOST_CHECK_EQUAL( "test_empty_skeleton", file.getSkeletonName() );
-
-    const VGears::HRCFile::BoneList& bones( file.getBones() );
-    BOOST_CHECK_EQUAL( 1, bones.size() );
-    BOOST_CHECK_EQUAL( "null", bones.at(0).name );
-    BOOST_CHECK_EQUAL( "root", bones.at(0).parent );
-    BOOST_CHECK_CLOSE( 1.5f, bones.at(0).length, 0.0001f );
-    BOOST_CHECK_EQUAL( 1, bones.at(0).rsd_names.size() );
-    BOOST_CHECK_EQUAL( "model.1", bones.at(0).rsd_names.at(0) );
-
-    ifs->close();
-}

+ 0 - 111
Tests/VGearsMain/src/test_VGearsLGPArchive.cpp

@@ -1,111 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-09-22 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-
-#include <boost/test/unit_test.hpp>
-
-#include <Ogre.h>
-
-#include "data/VGearsLGPArchiveFactory.h"
-
-BOOST_AUTO_TEST_CASE( load )
-{
-    Ogre::LogManager        logMgr;
-    logMgr.createLog( "Default Log", true, true, true );
-    const char* filename_1( "Filename 1" );
-    const char* filename_2( "max length filename!" );
-
-    class TestLGPArchive : public VGears::LGPArchive
-    {
-        public:
-
-            TestLGPArchive() :
-                VGears::LGPArchive( "misc/reference.lgp", "LGP" )
-              , test_stream( NULL )
-            {}
-
-            void load()
-            {
-                VGears::LGPArchive::load( test_stream );
-            }
-
-        Ogre::DataStream* test_stream;
-    };
-
-    TestLGPArchive lgp;
-    // TODO: use Ogre::MemoryDataStream and include data via byte array
-    std::ifstream *ifs( OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( lgp.getName().c_str(), std::ifstream::binary ) );
-    lgp.test_stream = OGRE_NEW Ogre::FileStreamDataStream( ifs );
-
-    BOOST_CHECK_EQUAL(  true, lgp.getFiles().empty() );
-    BOOST_CHECK_EQUAL( false, lgp.exists( filename_1 ) );
-    BOOST_CHECK_EQUAL( false, lgp.exists( filename_2 ) );
-
-    lgp.load();
-
-    BOOST_CHECK_EQUAL( 2, lgp.getFiles().size() );
-    BOOST_CHECK_EQUAL(  true, lgp.exists( filename_1 ) );
-    BOOST_CHECK_EQUAL(  true, lgp.exists( filename_2 ) );
-    BOOST_CHECK_EQUAL( lgp.getFiles().size(), lgp.list()->size() );
-    BOOST_CHECK_EQUAL( lgp.getFiles().size(), lgp.listFileInfo()->size() );
-
-    VGears::LGPArchive::FileEntry& entry( lgp.getFiles()[0] );
-    BOOST_CHECK_EQUAL( filename_1, entry.file_name );
-    BOOST_CHECK_EQUAL( entry.file_name, lgp.list()->at( 0 ) );
-    BOOST_CHECK_EQUAL( 0x00000050, entry.file_offset );
-    BOOST_CHECK_EQUAL( "FILENAME 1", entry.datafile_name_ );
-    BOOST_CHECK_EQUAL( 0x00000018, entry.data_size );
-    BOOST_CHECK_EQUAL( 0x00000068, entry.data_offset );
-
-    Ogre::FileInfoListPtr file_infos( lgp.listFileInfo() );
-    Ogre::FileInfo& file_info( file_infos->at( 0 ) );
-    BOOST_CHECK_EQUAL( &lgp, file_info.archive );
-    BOOST_CHECK_EQUAL( entry.file_name, file_info.filename );
-    BOOST_CHECK_EQUAL( entry.file_name, file_info.basename );
-    BOOST_CHECK_EQUAL( "", file_info.path );
-    BOOST_CHECK_EQUAL( entry.data_size, file_info.uncompressedSize );
-    BOOST_CHECK_EQUAL( file_info.uncompressedSize, file_info.compressedSize );
-
-    BOOST_CHECK_EQUAL( 1, lgp.find( "Filename*" )->size() );
-    BOOST_CHECK_EQUAL( 1, lgp.find( "*!" )->size() );
-    BOOST_CHECK_EQUAL( 2, lgp.find( "*name*" )->size() );
-
-    Ogre::StringVectorPtr found( lgp.find( "*name*" ) );
-    BOOST_CHECK_EQUAL( 2, found->size() );
-    BOOST_CHECK_EQUAL( filename_1, found->at( 0 ) );
-    BOOST_CHECK_EQUAL( filename_2, found->at( 1 ) );
-
-    Ogre::DataStreamPtr stream( lgp.open( filename_1 ) );
-    BOOST_CHECK_EQUAL( false, stream == nullptr );
-    BOOST_CHECK_EQUAL( entry.data_size, stream->size() );
-    BOOST_CHECK_EQUAL( "data of file 1 for test!", stream->getLine() );
-    BOOST_CHECK_EQUAL( true, stream->eof() );
-
-    lgp.unload();
-
-    BOOST_CHECK_EQUAL( false, lgp.exists( filename_1 ) );
-    BOOST_CHECK_EQUAL( false, lgp.exists( filename_2 ) );
-    logMgr.destroyLog( "Default Log" );
-}

+ 0 - 151
Tests/VGearsMain/src/test_VGearsLZSDataStream.cpp

@@ -1,151 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-18 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-
-#define BOOST_TEST_MODULE VGearsLZSDataStream
-#include <boost/test/unit_test.hpp>
-
-#include <Ogre.h>
-
-#include "VGearsLZSDataStream.h"
-
-const unsigned char hexData[] = {
-
-
-
-    0x00, 0x00, 0x6C, 0x6F, 0x00, 0x00, 0x54, 0x9E,
-    0x00, 0x00, 0x88, 0x9E, 0x00, 0x00, 0x70, 0xA1,
-    0x00, 0x00, 0x44, 0x4B, 0x00, 0x00, 0x02, 0x05,
-    0x0C, 0x0A, 0x90, 0x08, 0x02, 0x00, 0x00, 0x02,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x69,
-    0x74, 0x61, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x64,
-    0x31, 0x73, 0x74, 0x69, 0x6E, 0x00, 0x64, 0x69,
-    0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x6C,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x61,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x69,
-    0x65, 0x77, 0x00, 0x00, 0x00, 0x00, 0x68, 0x65,
-    0x69, 0x30, 0x00, 0x00, 0x00, 0x00, 0x68, 0x65,
-    0x69, 0x31, 0x00, 0x00, 0x00, 0x00, 0x61, 0x76,
-    0x5F, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x61, 0x76,
-    0x5F, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x61, 0x76,
-    0x5F, 0x73, 0x00, 0x00, 0x00, 0x00, 0x67, 0x75,
-    0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x75,
-    0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x75,
-    0x61, 0x64, 0x64, 0x00, 0x00, 0x00, 0x90, 0x1C
-};
-
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    const char* infile_name_( "reference_lzs.compressed" );
-    const char* outfile_name_( "test_lzs.decompressed" );
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( infile_name_, std::ifstream::binary ) );
-    std::ofstream ofs( outfile_name_, std::ifstream::binary );
-    BOOST_REQUIRE( ifs->is_open() );
-    BOOST_REQUIRE( ofs.is_open() );
-    Ogre::DataStreamPtr         file_stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    VGears::LZSDataStreamPtr    lzs_stream( OGRE_NEW VGears::LZSDataStream( file_stream ) );
-    BOOST_REQUIRE( file_stream->isReadable() );
-    BOOST_REQUIRE( lzs_stream->isReadable() );
-
-    BOOST_CHECK_EQUAL( 208640, lzs_stream->availableCompressed() );
-    BOOST_CHECK_EQUAL(      0, lzs_stream->availableUncompressed() );
-    size_t data_size( sizeof(hexData) );
-    unsigned char data[sizeof(hexData)];
-    memset( data, 0x77, data_size );
-
-    BOOST_CHECK_EQUAL( 8, lzs_stream->read( data +  0, 8 ) );
-    BOOST_CHECK_EQUAL( 208629, lzs_stream->availableCompressed() );
-    BOOST_CHECK_EQUAL(      4, lzs_stream->availableUncompressed() );
-    BOOST_CHECK( !lzs_stream->eof() );
-    BOOST_CHECK_EQUAL( 1, lzs_stream->read( data +  8, 1 ) );
-    BOOST_CHECK_EQUAL( 208629, lzs_stream->availableCompressed() );
-    BOOST_CHECK_EQUAL(      3, lzs_stream->availableUncompressed() );
-    BOOST_CHECK( !lzs_stream->eof() );
-    BOOST_CHECK_EQUAL( 3, lzs_stream->read( data +  9, 3 ) );
-    BOOST_CHECK_EQUAL( 208629, lzs_stream->availableCompressed() );
-    BOOST_CHECK_EQUAL(      0, lzs_stream->availableUncompressed() );
-    BOOST_CHECK( !lzs_stream->eof() );
-    BOOST_CHECK_EQUAL( 4, lzs_stream->read( data + 12, 4 ) );
-    BOOST_CHECK_EQUAL( 208619, lzs_stream->availableCompressed() );
-    BOOST_CHECK_EQUAL(      6, lzs_stream->availableUncompressed() );
-    BOOST_CHECK( !lzs_stream->eof() );
-    BOOST_CHECK_EQUAL( 8, lzs_stream->read( data + 16, 8 ) );
-    BOOST_CHECK_EQUAL( 208610, lzs_stream->availableCompressed() );
-    BOOST_CHECK_EQUAL(      6, lzs_stream->availableUncompressed() );
-
-    for( size_t i(0); i < 3*8; ++i )
-    {
-        ofs << data[i];
-    }
-
-    BOOST_REQUIRE_EQUAL( data_size, lzs_stream->read( data, data_size ) );
-    for( size_t i(0); i < data_size; ++i )
-    {
-        ofs << data[i];
-    }
-    BOOST_CHECK_EQUAL_COLLECTIONS(hexData, hexData + data_size, data, data + data_size );
-
-    for( size_t i(427020); i--; )
-    {
-        lzs_stream->read( data, 1 );
-        ofs << data[0];
-    }
-    BOOST_CHECK_EQUAL( 427196, lzs_stream->tell() );
-    BOOST_CHECK_EQUAL( 6, lzs_stream->availableCompressed() );
-    BOOST_CHECK_EQUAL( 0, lzs_stream->availableUncompressed() );
-    for( size_t i(4); i--; )
-    {
-        lzs_stream->read( data, 1 );
-        ofs << data[0];
-    }
-    BOOST_CHECK_EQUAL( 427200, lzs_stream->tell() );
-    BOOST_CHECK_EQUAL( 0, lzs_stream->availableCompressed() );
-    BOOST_CHECK_EQUAL( 1, lzs_stream->availableUncompressed() );
-    lzs_stream->read( data, 1 );
-    ofs << data[0];
-
-    BOOST_CHECK_EQUAL( 427201, lzs_stream->tell() );
-    BOOST_CHECK_EQUAL( 0, lzs_stream->availableCompressed() );
-    BOOST_CHECK_EQUAL( 0, lzs_stream->availableUncompressed() );
-    BOOST_CHECK( lzs_stream->eof() );
-    BOOST_CHECK_EQUAL( 0, lzs_stream->read( data, 1 ) );
-
-    VGears::uint32 flip( 0x12345678 );
-    lzs_stream->flipEndian( flip );
-    BOOST_CHECK_EQUAL( 0x78563412, flip );
-
-    lzs_stream.reset();
-    file_stream.reset();
-    ofs.close();
-
-    std::ifstream actual( outfile_name_ );
-    std::ifstream expected( "reference_lzs.decompressed" );
-
-    std::istream_iterator<char> it_actual  ( actual   ), end_actual;
-    std::istream_iterator<char> it_expected( expected ), end_expected;
-
-    BOOST_REQUIRE_EQUAL_COLLECTIONS(it_expected, end_actual, it_actual, end_expected);
-}

+ 0 - 101
Tests/VGearsMain/src/test_VGearsManualObject.cpp

@@ -1,101 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-10 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include <fstream>
-
-#define BOOST_TEST_MODULE VGearsManualObject
-#include <boost/test/unit_test.hpp>
-
-#include <Ogre.h>
-#include <OgreDefaultHardwareBufferManager.h>
-
-#include "VGearsManualObject.h"
-
-BOOST_AUTO_TEST_CASE( mesh_export )
-{
-	Ogre::LogManager  logMgr;
-    Ogre::ResourceGroupManager rgm;
-    Ogre::Math mth;
-    Ogre::LodStrategyManager lodMgr;
-    Ogre::MeshManager meshMgr;
-    Ogre::MaterialManager matMgr;
-    matMgr.initialise();
-    Ogre::SkeletonManager skelMgr;
-    Ogre::DefaultHardwareBufferManager bufferManager; // needed because we don't have a rendersystem
-    const char* name( "test" );
-    const char* filename_mesh( "test.mesh" );
-    const char* filename_skeleton( "test.skeleton" );
-
-    Ogre::MeshPtr mesh( Ogre::MeshManager::getSingleton().create( name, "General" ) );
-    mesh->setSkeletonName( filename_skeleton );
-
-    VGears::ManualObject mo( mesh.getPointer() );
-    mo.begin( "sub_name1", "material1", 3, 3 );
-    mo.position( Ogre::Vector3( 0, 0, 0 ) );
-    mo.normal( Ogre::Vector3( 0, 0, 1 ) );
-    mo.colour( Ogre::ColourValue( 1, 0, 0 ) );
-    mo.position( Ogre::Vector3( 1, 0, 0 ) );
-    mo.normal( Ogre::Vector3( 0, 0, 1 ) );
-    mo.colour( Ogre::ColourValue( 0, 1, 0 ) );
-    mo.position( Ogre::Vector3( 0, 1, 0 ) );
-    mo.normal( Ogre::Vector3( 0, 0, 1 ) );
-    mo.colour( Ogre::ColourValue( 0, 0, 1 ) );
-    mo.bone( 0, 1 );
-    mo.index( 0 );
-    mo.bone( 1, 2, 3 );
-    mo.index( 1 );
-    mo.bone( 2, 2, 2 );
-    mo.index( 2 );
-    mo.end();
-    mo.begin( "sub_name2", "material2", 3, 3 );
-    mo.position( Ogre::Vector3( 0, 0, 0 ) );
-    mo.normal( Ogre::Vector3( 0, 0, 1 ) );
-    mo.colour( Ogre::ColourValue( 1, 0, 0 ) );
-    mo.position( Ogre::Vector3( 1, 0, 0 ) );
-    mo.normal( Ogre::Vector3( 0, 0, 1 ) );
-    mo.colour( Ogre::ColourValue( 0, 1, 0 ) );
-    mo.position( Ogre::Vector3( 0, 1, 0 ) );
-    mo.normal( Ogre::Vector3( 0, 0, 1 ) );
-    mo.colour( Ogre::ColourValue( 0, 0, 1 ) );
-    mo.bone( 0, 1 );
-    mo.index( 0 );
-    mo.bone( 1, 2, 3 );
-    mo.index( 1 );
-    mo.bone( 2, 2, 2 );
-    mo.index( 2 );
-    mo.end();
-    // TODO use XMLMeshSerializer from converter, binary mesh can change
-    // without data actually differing
-    Ogre::MeshSerializer m_ser;
-    m_ser.exportMesh( mesh.getPointer(), filename_mesh );
-
-    std::ifstream actual( filename_mesh );
-    std::ifstream expected( "reference.mesh" );
-
-    std::istream_iterator<char> it_actual  ( actual   ), end_actual;
-    std::istream_iterator<char> it_expected( expected ), end_expected;
-
-    BOOST_CHECK_EQUAL_COLLECTIONS(it_expected, end_actual, it_actual, end_expected);
-}

+ 0 - 69
Tests/VGearsMain/src/test_VGearsMapFileXMLSerializer.cpp

@@ -1,69 +0,0 @@
-/*
------------------------------------------------------------------------------
-Copyright (c) 27.10.2013 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-This file is part of V-Gears
-
-V-Gears is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, version 2.0 (GPLv2) 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 <fstream>
-
-#include <boost/test/unit_test.hpp>
-#include <Ogre.h>
-
-#include "map/VGearsMapFileXMLSerializer.h"
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestFile : public VGears::MapFile
-    {
-    public:
-        TestFile() : VGears::MapFile( NULL, "", 0, "" ) {}
-        size_t getCalculatedSize() const { return calculateSize(); }
-
-        virtual void unload( void ) {}
-    };
-    const char* file_name( "misc/map.xml" );
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    Ogre::LogManager                logMgr;
-    VGears::MapFileXMLSerializer    ser;
-    TestFile                        f;
-
-    logMgr.createLog( "Default Log", true, true, true );
-    ser.importMapFile( stream, &f );
-
-    BOOST_CHECK_EQUAL( "path/to/script.lua"         , f.getScriptName() );
-    BOOST_CHECK_EQUAL( "background_2d_resource_name", f.getBackground2dName() );
-    BOOST_CHECK_EQUAL( "walkmesh_resource_name"     , f.getWalkmeshName() );
-    BOOST_CHECK_CLOSE( -5.625, f.getForwardDirection(), 0.001 );
-
-    VGears::MapFile::PointList     &points( f.getPoints() );
-    BOOST_REQUIRE_EQUAL( 1, points.size() );
-    VGears::MapFile::PointList::value_type    &point( points.at(0) );
-    BOOST_CHECK_EQUAL( "Spawn_md1_1", point.GetName() );
-    BOOST_CHECK( Ogre::Vector3( 29.0547f, 229.234f, 2.56082f ).positionEquals( point.GetPosition() ) );
-    BOOST_CHECK_CLOSE( 67.7647, point.GetRotation(), 0.001 );
-
-    VGears::MapFile::TriggerList   &triggers( f.getTriggers() );
-    BOOST_REQUIRE_EQUAL( 1, triggers.size() );
-    VGears::MapFile::TriggerList::value_type    &trigger( triggers.at(0) );
-    BOOST_CHECK_EQUAL( "Gateway0", trigger.GetName() );
-    BOOST_CHECK( Ogre::Vector3( 28.6016f, 228.562f, 2.75781f ).positionEquals( trigger.GetPoint1() ) );
-    BOOST_CHECK( Ogre::Vector3( 28.6641f, 229.438f, 2.75781f ).positionEquals( trigger.GetPoint2() ) );
-    BOOST_CHECK_EQUAL( true, trigger.IsEnabled() );
-
-    logMgr.destroyLog( "Default Log" );
-    ifs->close();
-}

+ 0 - 58
Tests/VGearsMain/src/test_VGearsPFile.cpp

@@ -1,58 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-11 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include <cstddef>
-
-#define BOOST_TEST_MODULE VGearsPFile
-#include <boost/test/unit_test.hpp>
-
-#include "data/VGearsPFile.h"
-
-BOOST_AUTO_TEST_CASE( header_size )
-{
-    BOOST_CHECK_EQUAL( 0x18, sizeof( VGears::PFile::PolygonDefinition ) );
-    BOOST_CHECK_EQUAL( 0x38, sizeof( VGears::PFile::Group ) );
-}
-
-BOOST_AUTO_TEST_CASE( polygon_offset )
-{
-    BOOST_CHECK_EQUAL( 0x02, offsetof( VGears::PFile::PolygonDefinition, vertex ) );
-    BOOST_CHECK_EQUAL( 0x08, offsetof( VGears::PFile::PolygonDefinition, normal ) );
-    BOOST_CHECK_EQUAL( 0x0E, offsetof( VGears::PFile::PolygonDefinition, edge ) );
-}
-
-BOOST_AUTO_TEST_CASE( group_offset )
-{
-    BOOST_CHECK_EQUAL( 0x00, offsetof( VGears::PFile::Group, primitive_type ) );
-    BOOST_CHECK_EQUAL( 0x04, offsetof( VGears::PFile::Group, polygon_start_index ) );
-    BOOST_CHECK_EQUAL( 0x08, offsetof( VGears::PFile::Group, num_polygons ) );
-    BOOST_CHECK_EQUAL( 0x0C, offsetof( VGears::PFile::Group, vertex_start_index ) );
-    BOOST_CHECK_EQUAL( 0x10, offsetof( VGears::PFile::Group, num_vertices ) );
-    BOOST_CHECK_EQUAL( 0x14, offsetof( VGears::PFile::Group, edge_start_index ) );
-    BOOST_CHECK_EQUAL( 0x18, offsetof( VGears::PFile::Group, num_edges ) );
-    BOOST_CHECK_EQUAL( 0x2C, offsetof( VGears::PFile::Group, texture_coordinate_start_index ) );
-    BOOST_CHECK_EQUAL( 0x30, offsetof( VGears::PFile::Group, has_texture ) );
-    BOOST_CHECK_EQUAL( 0x34, offsetof( VGears::PFile::Group, texture_index ) );
-}

+ 0 - 92
Tests/VGearsMain/src/test_VGearsPFileSerializer.cpp

@@ -1,92 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-10 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include <fstream>
-
-#define BOOST_TEST_MODULE VGearsPFileSerializer
-#include <boost/test/unit_test.hpp>
-#include <Ogre.h>
-
-#include "data/VGearsPFileSerializer.h"
-
-BOOST_AUTO_TEST_CASE( header_size )
-{
-    BOOST_CHECK_EQUAL( 0x80, sizeof( VGears::PFileSerializer::Header ) );
-}
-
-BOOST_AUTO_TEST_CASE( header_offset )
-{
-    BOOST_CHECK_EQUAL( 0x00, offsetof( VGears::PFileSerializer::Header, version                 ) );
-    BOOST_CHECK_EQUAL( 0x08, offsetof( VGears::PFileSerializer::Header, vertex_type             ) );
-    BOOST_CHECK_EQUAL( 0x0C, offsetof( VGears::PFileSerializer::Header, num_vertices            ) );
-    BOOST_CHECK_EQUAL( 0x10, offsetof( VGears::PFileSerializer::Header, num_normals             ) );
-    BOOST_CHECK_EQUAL( 0x14, offsetof( VGears::PFileSerializer::Header, num_unknown1            ) );
-    BOOST_CHECK_EQUAL( 0x18, offsetof( VGears::PFileSerializer::Header, num_texture_coordinates ) );
-    BOOST_CHECK_EQUAL( 0x1C, offsetof( VGears::PFileSerializer::Header, num_vertex_colors       ) );
-    BOOST_CHECK_EQUAL( 0x20, offsetof( VGears::PFileSerializer::Header, num_edges               ) );
-    BOOST_CHECK_EQUAL( 0x24, offsetof( VGears::PFileSerializer::Header, num_polygons            ) );
-    BOOST_CHECK_EQUAL( 0x30, offsetof( VGears::PFileSerializer::Header, num_materials           ) );
-    BOOST_CHECK_EQUAL( 0x34, offsetof( VGears::PFileSerializer::Header, num_groups              ) );
-    BOOST_CHECK_EQUAL( 0x38, offsetof( VGears::PFileSerializer::Header, num_bboxes              ) );
-    BOOST_CHECK_EQUAL( 0x3C, offsetof( VGears::PFileSerializer::Header, norm_index_table_flag   ) );
-}
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestPFile : public VGears::PFile
-    {
-    public:
-        TestPFile() : VGears::PFile( NULL, "", 0, "" ) {}
-        size_t getCalculatedSize() const { return calculateSize(); }
-    };
-
-    const char* file_name( "reference.p" );
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-	Ogre::LogManager        logMgr;
-    VGears::PFileSerializer ser;
-    TestPFile               file;
-
-    logMgr.createLog( "Default Log", true, true, true );
-
-    ser.importPFile( stream, &file );
-
-    logMgr.destroyLog( "Default Log" );
-
-    BOOST_CHECK_EQUAL( 119, file.getVertices().size() );
-    BOOST_CHECK_EQUAL(  90, file.getNormals().size() );
-    BOOST_CHECK_EQUAL(  14, file.getTextureCoordinates().size() );
-    BOOST_CHECK_EQUAL( 119, file.getVertexColors().size() );
-    BOOST_CHECK_EQUAL( 291, file.getEdges().size() );
-    BOOST_CHECK_EQUAL( 180, file.getPolygonDefinitions().size() );
-    BOOST_CHECK_EQUAL( 180, file.getPolygonColors().size() );
-    BOOST_CHECK_EQUAL(   4, file.getGroups().size() );
-    BOOST_CHECK_EQUAL(   1, file.getBBoxes().size() );
-
-    ifs->close();
-}

+ 0 - 80
Tests/VGearsMain/src/test_VGearsPaletteFileSerializer.cpp

@@ -1,80 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-22 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#define BOOST_TEST_MODULE VGearsPaletteFileSerializer
-#include <boost/test/unit_test.hpp>
-
-#include <Ogre.h>
-
-#include "data/VGearsPaletteFileSerializer.h"
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestFile : public VGears::PaletteFile
-    {
-    public:
-        TestFile() : VGears::PaletteFile( NULL, "", 0, "" ) {}
-        size_t getCalculatedSize() const { return calculateSize(); }
-
-        virtual void unload( void ) {};
-    };
-
-	Ogre::LogManager                    logMgr;
-    logMgr.createLog( "Default Log", true, true, true );
-
-    const char*                     file_name( "reference.palette" );
-    TestFile                        file;
-    VGears::PaletteFileSerializer   ser;
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    ser.importPaletteFile( stream, &file );
-    BOOST_CHECK_EQUAL( 7180, stream->tell() );
-    BOOST_REQUIRE_EQUAL(   14, file.getPages().size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[ 0].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[ 1].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[ 2].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[ 3].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[ 4].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[ 5].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[ 6].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[ 7].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[ 8].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[ 9].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[10].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[11].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[12].size() );
-    BOOST_CHECK_EQUAL(  256, file.getPages()[13].size() );
-    BOOST_CHECK_EQUAL( 3584 * sizeof( VGears::PaletteFile::Color ), file.getCalculatedSize() );
-
-    BOOST_CHECK_EQUAL( 0x2A12, file.getPages()[0][0] );
-
-
-    logMgr.destroyLog( "Default Log" );
-    ifs->close();
-}

+ 0 - 75
Tests/VGearsMain/src/test_VGearsRSDSerializer.cpp

@@ -1,75 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-16 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include <fstream>
-
-#define BOOST_TEST_MODULE VGearsHRCFileSerializer
-#include <boost/test/unit_test.hpp>
-
-#include <Ogre.h>
-
-#include "data/VGearsRSDFileSerializer.h"
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestRSDFile : public VGears::RSDFile
-    {
-    public:
-        TestRSDFile() : VGears::RSDFile( NULL, "", 0, "" ) {}
-        size_t getCalculatedSize() const { return calculateSize(); }
-    };
-
-	Ogre::LogManager                    logMgr;
-    Ogre::ResourceGroupManager          rgm;
-    Ogre::Math                          mth;
-    Ogre::LodStrategyManager            lodMgr;
-    Ogre::MeshManager                   meshMgr;
-    Ogre::MaterialManager               matMgr;
-    Ogre::SkeletonManager               skelMgr;
-    logMgr.createLog( "Default Log", true, true, true );
-    matMgr.initialise();
-
-    const char*                 file_name( "reference.rsd" );
-    TestRSDFile                 file;
-    VGears::RSDFileSerializer   ser;
-    std::ifstream *ifs(  OGRE_NEW_T( std::ifstream, Ogre::MEMCATEGORY_GENERAL )( file_name, std::ifstream::binary ) );
-    BOOST_REQUIRE( ifs->is_open() );
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( ifs ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    ser.importRSDFile( stream, &file );
-
-    BOOST_CHECK_EQUAL( "Polygon.PLY"        , file.getPolygonName() );
-    BOOST_CHECK_EQUAL( "Material.MAT"       , file.getMaterialName() );
-    BOOST_CHECK_EQUAL( "Group.GRP"          , file.getGroupName() );
-    BOOST_CHECK_EQUAL( 3                    , file.getTextureNameCount() );
-    BOOST_CHECK_EQUAL( "First Texture.TIM"  , file.getTextureNames()[0] );
-    BOOST_CHECK_EQUAL( "SecondTexture.TIM"  , file.getTextureNames()[1] );
-    BOOST_CHECK_EQUAL( "Third Texture.TIM"  , file.getTextureNames()[2] );
-    BOOST_CHECK_EQUAL( 83                   , file.getCalculatedSize() );
-
-    logMgr.destroyLog( "Default Log" );
-    ifs->close();
-}

+ 0 - 85
Tests/VGearsMain/src/test_VGearsRingBuffer.cpp

@@ -1,85 +0,0 @@
-/*
------------------------------------------------------------------------------
-The MIT License (MIT)
-
-Copyright (c) 2013-08-18 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-
-#define BOOST_TEST_MODULE VGearsRingBuffer
-#include <boost/test/unit_test.hpp>
-
-#include "VGearsLZSDataStream.h"
-
-BOOST_AUTO_TEST_CASE( overal )
-{
-    char data[] = { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8 };
-    VGears::RingBuffer<4> buffer;
-    BOOST_CHECK_EQUAL( 0, buffer.avail() );
-    BOOST_CHECK_EQUAL( 0, buffer.get( 0 ) );
-    BOOST_CHECK_EQUAL( 0, buffer.get( 1 ) );
-    BOOST_CHECK_EQUAL( 0, buffer.get( 2 ) );
-    BOOST_CHECK_EQUAL( 0, buffer.get( 3 ) );
-    BOOST_CHECK_EQUAL( 0, buffer.get( 4 ) );
-    buffer.write( data + 0 );
-    buffer.write( data + 1 );
-    buffer.write( data + 2 );
-    buffer.write( data + 3 );
-    BOOST_CHECK_EQUAL( data[0], buffer.get( 0 ) );
-    BOOST_CHECK_EQUAL( data[1], buffer.get( 1 ) );
-    BOOST_CHECK_EQUAL( data[2], buffer.get( 2 ) );
-    BOOST_CHECK_EQUAL( data[3], buffer.get( 3 ) );
-    BOOST_CHECK_EQUAL( data[0], buffer.get( 4 ) );
-    BOOST_CHECK_EQUAL( 4, buffer.avail() );
-    buffer.write( data + 4 );
-    buffer.write( data + 5 );
-    BOOST_CHECK_EQUAL( 4, buffer.avail() );
-    BOOST_CHECK_EQUAL( data[4], buffer.get( 0 ) );
-    BOOST_CHECK_EQUAL( data[5], buffer.get( 1 ) );
-    BOOST_CHECK_EQUAL( data[2], buffer.get( 2 ) );
-    BOOST_CHECK_EQUAL( data[3], buffer.get( 3 ) );
-    BOOST_CHECK_EQUAL( data[4], buffer.get( 4 ) );
-    BOOST_CHECK_EQUAL( data[5], buffer.get( 5 ) );
-    BOOST_CHECK_EQUAL( data[2], buffer.get( 6 ) );
-
-    memset( data, 0x77, sizeof( data ) );
-    const char expected[] = { 0x3, 0x4, 0x5, 0x6, 0x77, 0x77, 0x77, 0x77 };
-    BOOST_CHECK_EQUAL( sizeof( expected ), sizeof( data ) );
-
-    BOOST_CHECK_EQUAL( 4, buffer.avail() );
-    BOOST_CHECK_EQUAL( 4, buffer.read( data, sizeof( data ) ) );
-    BOOST_CHECK_EQUAL( 0, buffer.avail() );
-    BOOST_CHECK_EQUAL_COLLECTIONS( expected, expected + sizeof( expected ), data, data + sizeof( data ) );
-}
-
-BOOST_AUTO_TEST_CASE( read_single_bytes )
-{
-    VGears::RingBuffer<4> buffer;
-    char data;
-    data = 1; buffer.write( &data );
-    data = 2; buffer.write( &data );
-    data = 3; buffer.write( &data );
-    data = 4; buffer.write( &data );
-    BOOST_CHECK_EQUAL( 1, buffer.read( &data, sizeof( data ) ) ); BOOST_CHECK_EQUAL( 1, data );
-    BOOST_CHECK_EQUAL( 1, buffer.read( &data, sizeof( data ) ) ); BOOST_CHECK_EQUAL( 2, data );
-    BOOST_CHECK_EQUAL( 1, buffer.read( &data, sizeof( data ) ) ); BOOST_CHECK_EQUAL( 3, data );
-    BOOST_CHECK_EQUAL( 1, buffer.read( &data, sizeof( data ) ) ); BOOST_CHECK_EQUAL( 4, data );
-}

+ 0 - 70
Tests/VGearsMain/src/test_VGearsWalkmeshFileXMLSerializer.cpp

@@ -1,70 +0,0 @@
-/*
------------------------------------------------------------------------------
-Copyright (c) 06.10.2013 Tobias Peters <tobias.peters@kreativeffekt.at>
-
-This file is part of V-Gears
-
-V-Gears is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, version 2.0 (GPLv2) 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 <fstream>
-
-#include <boost/test/unit_test.hpp>
-#include <Ogre.h>
-
-#include "map/VGearsWalkmeshFileXMLSerializer.h"
-
-BOOST_AUTO_TEST_CASE( read_file )
-{
-    class TestFile : public VGears::WalkmeshFile
-    {
-    public:
-        TestFile() : VGears::WalkmeshFile( NULL, "", 0, "" ) {}
-        size_t getCalculatedSize() const { return VGears::WalkmeshFile::calculateSize(); }
-        virtual void unload( void ) {}
-    };
-
-    const char* file_name( "misc/walkmesh.xml" );
-    std::ifstream ifs( file_name, std::ifstream::binary );
-    BOOST_REQUIRE( ifs.is_open() );
-    Ogre::DataStreamPtr stream( OGRE_NEW Ogre::FileStreamDataStream( &ifs, false ) );
-    BOOST_REQUIRE( stream->isReadable() );
-
-    Ogre::LogManager                    logMgr;
-    VGears::WalkmeshFileXMLSerializer   ser;
-    TestFile                            f;
-
-    logMgr.createLog( "Default Log", true, true, true );
-
-    ser.importWalkmeshFile( stream, &f );
-    VGears::WalkmeshFile::TriangleList &triangles( f.getTriangles() );
-    BOOST_CHECK_EQUAL( 2, triangles.size() );
-
-    VGears::WalkmeshFile::Triangle &t1( triangles.front() );
-    BOOST_CHECK_EQUAL( Ogre::Vector3(  1,   2,   4 ), t1.a );
-    BOOST_CHECK_EQUAL( Ogre::Vector3(  8,  16,  32 ), t1.b );
-    BOOST_CHECK_EQUAL( Ogre::Vector3( 64, 128, 256 ), t1.c );
-    BOOST_CHECK_EQUAL(  1, t1.access_side[0] );
-    BOOST_CHECK_EQUAL( -1, t1.access_side[1] );
-    BOOST_CHECK_EQUAL( -1, t1.access_side[2] );
-
-    VGears::WalkmeshFile::Triangle &t2( triangles.back() );
-    BOOST_CHECK_EQUAL( Ogre::Vector3(   4,   2,  1 ), t2.a );
-    BOOST_CHECK_EQUAL( Ogre::Vector3(  32,  16,  8 ), t2.b );
-    BOOST_CHECK_EQUAL( Ogre::Vector3( 256, 128, 64 ), t2.c );
-    BOOST_CHECK_EQUAL( -1, t2.access_side[0] );
-    BOOST_CHECK_EQUAL(  0, t2.access_side[1] );
-    BOOST_CHECK_EQUAL( -1, t2.access_side[2] );
-
-    logMgr.destroyLog( "Default Log" );
-
-    ifs.close();
-}

+ 0 - 2
Tests/VGearsMain/src/test_all.cpp

@@ -1,2 +0,0 @@
-#define BOOST_TEST_MODULE V-Gears
-#include <boost/test/included/unit_test.hpp>

+ 2 - 2
V-Gears-Installer/CMakeLists.txt

@@ -1,8 +1,8 @@
 # Include directories.
 include_directories(
     ${VGears_INCLUDE_DIRS}
-    ${VGears_SOURCE_DIR}/V-Gears/include
-    ${CMAKE_CURRENT_SOURCE_DIR}/include
+    ${VGears_SOURCE_DIR}/src
+    ${CMAKE_CURRENT_SOURCE_DIR}/src
     ${CMAKE_CURRENT_SOURCE_DIR}
     ${ZLIB_INCLUDE_DIRS}
 )

+ 0 - 126
V-Gears-Installer/src/CMakeLists.txt

@@ -1,126 +0,0 @@
-include_directories(
-    ${VGears_INCLUDE_DIRS}
-    ${VGears_SOURCE_DIR}/V-Gears/include
-    ${CMAKE_CURRENT_SOURCE_DIR}/common/include
-    ${CMAKE_CURRENT_SOURCE_DIR}
-    ${ZLIB_INCLUDE_DIRS}
-)
-
-# define header and source files for the library
-set(HEADER_FILES
-./common/FontFile.h
-./common/include/VGearsUtility.h
-./common/Logger.h
-./common/Surface.h
-./common/TimToVram.h
-./common/BinGZipFile.h
-./common/OgreBase.h
-./common/OgreGenUtilites.h
-./common/Vram.h
-./common/DrawSkeleton.h
-)
-
-set(SOURCE_FILES
-./common/Logger.cpp
-./common/BinGZipFile.cpp
-./common/DrawSkeleton.cpp
-./common/Surface.cpp
-./common/OgreGenUtilites.cpp
-./common/FontFile.cpp
-./common/TimToVram.cpp
-./common/Vram.cpp
-./common/OgreBase.cpp
-./common/src/VGearsUtility.cpp
-)
-
-add_library(Utility STATIC
-  ${HEADER_FILES}
-  ${SOURCE_FILES}
-)
-
-#DEBUG, no optimizations
-#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -rdynamic -O0")
-
-target_link_libraries(Utility
-    ${OGRE_LIBRARIES}
-    ${OIS_LIBRARIES}
-    ${ZLIB_LIBRARIES}
-)
-SET_PROPERTY(TARGET Utility PROPERTY FOLDER "utilities")
-
-add_subdirectory(flevel)
-add_subdirectory(lzs)
-#add_subdirectory(v-gears-launcher)
-
-
-find_package ( Qt5Widgets REQUIRED )
-#include ( ${QT_USE_FILE} )
-include_directories (
-    ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
-    ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}
-    )
-set ( v-gears-launcher_HDRS
-    include/mainwindow.h
-    include/ff7DataInstaller.h
-    include/ff7FieldTextWriter.h
-    )
-
-set ( v-gears-launcher_SRCS
-    src/main.cpp
-    src/mainwindow.cpp
-    src/ff7DataInstaller.cpp
-    src/ff7FieldTextWriter.cpp
-    )
-
-set ( v-gears-launcher_UIS
-    src/mainwindow.ui
-    )
-QT5_WRAP_UI(UIS ${v-gears-launcher_UIS})
-
-message(UIS: ${UIS})
-
-set ( v-gears-launcher_MOCS
-    include/mainwindow.h
-    )
-QT5_WRAP_CPP(MOCS ${v-gears-launcher_MOCS})
-
-add_definitions(
-    -DVGEARS_ADD_MANAGERS
-)
-add_executable ( v-gears-launcher ${v-gears-launcher_SRCS} ${UIS} ${RSCS} ${TRS} ${MOCS} )
-
-SET_PROPERTY(TARGET v-gears-launcher PROPERTY FOLDER "utilities")
-
-if (APPLE)
-target_link_libraries(v-gears-launcher "-framework CoreFoundation -framework Cocoa -framework IOKit")
-endif()
-
-if(WIN32)
-  set_target_properties(v-gears-launcher PROPERTIES WIN32_EXECUTABLE ON)
-  if (MSVC)
-    set_target_properties(v-gears-launcher PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE")
-  endif()
-endif()
-
-set(LIBRARIES
-    Utility
-    V-Gears
-    v-gears-data
-    #Sudm_Lib
-)
-
-
-find_package(Qt5 COMPONENTS Widgets REQUIRED)
-
-find_package(Qt5 COMPONENTS Core REQUIRED)
-
-#target_link_libraries ( v-gears-launcher  ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${LIBRARIES} )
-target_link_libraries ( v-gears-launcher  Qt5::Widgets Qt5::Core  ${LIBRARIES} )
-
-if(WIN32 OR APPLE)
-  install(TARGETS v-gears-launcher DESTINATION . ) 
-else()
-  install(TARGETS v-gears-launcher RUNTIME DESTINATION bin ) 
-endif()
-
-

+ 0 - 413
V-Gears/CMakeLists.txt

@@ -1,413 +0,0 @@
-# Define header and source files for V-Gears
-set(HEADER_FILES
-    include/modules/worldmap/WorldMapModule.h
-    include/common/VGearsManualObject.h
-    include/common/VGearsResource.h
-    include/common/VGearsStringUtil.h
-    include/common/TypeDefine.h
-    include/common/LzsFile.h
-    include/common/File.h
-    include/common/FileSystem.h
-    include/map/VGearsBackground2DFile.h
-    include/map/VGearsBackground2DFileManager.h
-    include/map/VGearsBackground2DFileXMLSerializer.h
-    include/map/VGearsTile.h
-    include/map/VGearsMapFile.h
-    include/map/VGearsMapFileManager.h
-    include/map/VGearsMapFileXMLSerializer.h
-    include/map/VGearsWalkmeshFile.h
-    include/map/VGearsWalkmeshFileManager.h
-    include/map/VGearsWalkmeshFileXMLSerializer.h
-    include/LuaIncludes.h
-    include/VGearsGameState.h
-    include/VGearsPrerequisites.h
-    include/core/particles/emitters/PointEmitter.h
-    include/core/particles/emitters/PointEmitterFactory.h
-    include/core/particles/renderer/ParticleEntityAdditionalData.h
-    include/core/particles/renderer/ParticleEntityRenderer.h
-    include/core/particles/renderer/ParticleEntityRendererDictionary.h
-    include/core/particles/renderer/ParticleEntityRendererFactory.h
-    include/core/particles/Particle.h
-    include/core/particles/ParticleAdditionalData.h
-    include/core/particles/ParticleEmitter.h
-    include/core/particles/ParticleEmitterDictionary.h
-    include/core/particles/ParticleEmitterFactory.h
-    include/core/particles/ParticleEmitterTranslator.h
-    include/core/particles/ParticlePool.h
-    include/core/particles/ParticlePoolMap.h
-    include/core/particles/ParticleRenderer.h
-    include/core/particles/ParticleRendererFactory.h
-    include/core/particles/ParticleRendererTranslator.h
-    include/core/particles/ParticleSystem.h
-    include/core/particles/ParticleSystemFactory.h
-    include/core/particles/ParticleSystemManager.h
-    include/core/particles/ParticleSystemTranslator.h
-    include/core/particles/ParticleSystemTranslatorManager.h
-    include/core/particles/ParticleTechnique.h
-    include/core/particles/ParticleTechniqueTranslator.h
-    include/core/particles/ParticleVisual.h
-    include/core/Assert.h
-    include/core/AudioManager.h
-    include/core/Background2D.h
-    include/core/Background2DAnimation.h
-    include/core/CameraManager.h
-    include/core/CameraManagerCommands.h
-    include/core/ConfigCmd.h
-    include/core/ConfigCmdManager.h
-    include/core/ConfigCmdManagerCommands.h
-    include/core/ConfigFile.h
-    include/core/ConfigVar.h
-    include/core/ConfigVarManager.h
-    include/core/Console.h
-    include/core/DebugDraw.h
-    include/core/Entity.h
-    include/core/EntityCollision.h
-    include/core/EntityDirection.h
-    include/core/EntityManager.h
-    include/core/EntityModel.h
-    include/core/EntityPoint.h
-    include/core/EntityTrigger.h
-    include/core/Event.h
-    include/core/GameFrameListener.h
-    include/core/InputManager.h
-    include/core/InputManagerCommands.h
-    include/core/Logger.h
-    include/core/Module.h
-    include/core/Savemap.h
-    include/core/SavemapManager.h
-    include/core/ScriptManager.h
-    include/core/ScriptManagerBinds.h
-    include/core/ScriptManagerCommands.h
-    include/core/Timer.h
-    include/core/UiAnimation.h
-    include/core/UiFont.h
-    include/core/UiManager.h
-    include/core/UiSprite.h
-    include/core/UiTextArea.h
-    include/core/UiWidget.h
-    include/core/Utilites.h
-    include/core/Walkmesh.h
-    include/core/XmlBackground2DFile.h
-    include/core/XmlFile.h
-    include/core/XmlFontFile.h
-    include/core/XmlFontsFile.h
-    include/core/XmlMapFile.h
-    include/core/XmlMusicsFile.h
-    include/core/XmlPrototypesFile.h
-    include/core/XmlScreenFile.h
-    include/core/XmlScreensFile.h
-    include/core/XmlScriptsFile.h
-    include/core/XmlSoundsFile.h
-    include/core/XmlTextFile.h
-    include/core/XmlTextsFile.h
-    include/core/DialogsManager.h
-    include/core/ScriptManagerBinds.h
-    include/core/TextManager.h
-    include/core/TextManagerCommands.h
-    include/data/VGearsXMLSerializer.h
-    include/common/FinalFantasy7/FF7NameLookup.h
-    include/map/FinalFantasy7/FF7WalkmeshFileSerializer.h
-    include/FF7Character.h
-    include/FF7Common.h
-)
-
-set(HEADER_FILES_DATA
-    include/common/VGearsApplication.h
-    include/data/worldmap/MapFile.h
-    include/data/worldmap/MapFileManager.h
-    include/data/worldmap/MapFileSerializer.h
-    include/data/worldmap/TxzFile.h
-    include/data/worldmap/TxzFileManager.h
-    include/data/worldmap/TxzFileSerializer.h
-    include/data/VGearsAFile.h
-    include/data/VGearsAFileManager.h
-    include/data/VGearsAFileSerializer.h
-    include/data/VGearsBackgroundFile.h
-    include/data/VGearsBackgroundFileManager.h
-    include/data/VGearsBackgroundFileSerializer.h
-    include/data/VGearsBackgroundTextureLoader.h
-    include/data/VGearsCameraMatrixFile.h
-    include/data/VGearsCameraMatrixFileManager.h
-    include/data/VGearsCameraMatrixFileSerializer.h
-    include/data/VGearsFLevelBackground2DLoader.h
-    include/data/VGearsFLevelFile.h
-    include/data/VGearsFLevelFileManager.h
-    include/data/VGearsFLevelFileSerializer.h
-    include/data/VGearsFLevelTextureLoader.h
-    include/data/VGearsHRCFile.h
-    include/data/VGearsHRCFileManager.h
-    include/data/VGearsHRCFileSerializer.h
-    include/data/VGearsHRCMeshLoader.h
-    include/data/VGearsHRCSkeletonLoader.h
-    include/data/VGearsLGPArchive.h
-    include/data/VGearsLGPArchiveFactory.h
-    include/data/VGearsLGPArchiveSerializer.h
-    include/data/VGearsLZSDataStream.h
-    include/data/VGearsLZSFLevelFile.h
-    include/data/VGearsLZSFLevelFileManager.h
-    include/data/VGearsPaletteFile.h
-    include/data/VGearsPaletteFileManager.h
-    include/data/VGearsPaletteFileSerializer.h
-    include/data/VGearsPFile.h
-    include/data/VGearsPFileManager.h
-    include/data/VGearsPFileSerializer.h
-    include/data/VGearsRSDFile.h
-    include/data/VGearsRSDFileManager.h
-    include/data/VGearsRSDFileSerializer.h
-    include/data/VGearsSerializer.h
-    include/data/VGearsTexCodec.h
-    include/data/VGearsTexFile.h
-    include/data/VGearsTriggersFile.h
-    include/data/VGearsMapListFile.h
-    include/data/FinalFantasy7/FF7ModelListFile.h
-    include/data/FinalFantasy7/FF7ModelListFileManager.h
-    include/data/FinalFantasy7/FF7ModelListFileSerializer.h
-)
-
-set(SOURCE_FILES_DATA
-    src/common/VGearsApplication.cpp
-    src/data/VGearsAFile.cpp
-    src/data/VGearsAFileManager.cpp
-    src/data/VGearsAFileSerializer.cpp
-    src/data/worldmap/MapFile.cpp
-    src/data/worldmap/MapFileManager.cpp
-    src/data/worldmap/MapFileSerializer.cpp
-    src/data/worldmap/TxzFile.cpp
-    src/data/worldmap/TxzFileManager.cpp
-    src/data/worldmap/TxzFileSerializer.cpp
-    src/data/VGearsBackgroundFile.cpp
-    src/data/VGearsBackgroundFileManager.cpp
-    src/data/VGearsBackgroundFileSerializer.cpp
-    src/data/VGearsBackgroundTextureLoader.cpp
-    src/data/VGearsCameraMatrixFile.cpp
-    src/data/VGearsCameraMatrixFileManager.cpp
-    src/data/VGearsCameraMatrixFileSerializer.cpp
-    src/data/VGearsFLevelBackground2DLoader.cpp
-    src/data/VGearsFLevelFile.cpp
-    src/data/VGearsFLevelFileManager.cpp
-    src/data/VGearsFLevelFileSerializer.cpp
-    src/data/VGearsFLevelTextureLoader.cpp
-    src/data/VGearsHRCFile.cpp
-    src/data/VGearsHRCFileManager.cpp
-    src/data/VGearsHRCFileSerializer.cpp
-    src/data/VGearsHRCMeshLoader.cpp
-    src/data/VGearsHRCSkeletonLoader.cpp
-    src/data/VGearsLGPArchive.cpp
-    src/data/VGearsLGPArchiveFactory.cpp
-    src/data/VGearsLGPArchiveSerializer.cpp
-    src/data/VGearsLZSDataStream.cpp
-    src/data/VGearsLZSFLevelFile.cpp
-    src/data/VGearsLZSFLevelFileManager.cpp
-    src/data/VGearsPaletteFile.cpp
-    src/data/VGearsPaletteFileManager.cpp
-    src/data/VGearsPaletteFileSerializer.cpp
-    src/data/VGearsPFile.cpp
-    src/data/VGearsPFileManager.cpp
-    src/data/VGearsPFileSerializer.cpp
-    src/data/VGearsRSDFile.cpp
-    src/data/VGearsRSDFileManager.cpp
-    src/data/VGearsRSDFileSerializer.cpp
-    src/data/VGearsSerializer.cpp
-    src/data/VGearsTexCodec.cpp
-    src/data/VGearsTexFile.cpp
-    src/data/VGearsTriggersFile.cpp
-    src/data/VGearsMapListFile.cpp
-    src/data/FinalFantasy7/FF7ModelListFile.cpp
-    src/data/FinalFantasy7/FF7ModelListFileManager.cpp
-    src/data/FinalFantasy7/FF7ModelListFileSerializer.cpp
-)
-
-set(SOURCE_FILES
-    src/modules/worldmap/WorldMapModule.cpp
-    src/common/VGearsManualObject.cpp
-    src/common/VGearsResource.cpp
-    src/common/VGearsStringUtil.cpp
-    src/common/TypeDefine.cpp
-    src/common/LzsFile.cpp
-    src/common/File.cpp
-    src/common/FileSystem.cpp
-    src/core/particles/emitters/PointEmitter.cpp
-    src/core/particles/emitters/PointEmitterFactory.cpp
-    src/core/particles/Particle.cpp
-    src/core/particles/ParticleEmitter.cpp
-    src/core/particles/ParticleEmitterDictionary.cpp
-    src/core/particles/ParticleEmitterTranslator.cpp
-    src/core/particles/ParticleRenderer.cpp
-    src/core/particles/ParticleRendererTranslator.cpp
-    src/core/particles/ParticleSystem.cpp
-    src/core/particles/ParticleSystemFactory.cpp
-    src/core/particles/ParticleSystemManager.cpp
-    src/core/particles/ParticleSystemTranslator.cpp
-    src/core/particles/ParticleSystemTranslatorManager.cpp
-    src/core/particles/ParticleTechnique.cpp
-    src/core/particles/ParticleTechniqueTranslator.cpp
-    src/core/particles/ParticleVisual.cpp
-    src/core/particles/renderer/ParticleEntityRenderer.cpp
-    src/core/particles/renderer/ParticleEntityRendererDictionary.cpp
-    src/core/AudioManager.cpp
-    src/core/Background2D.cpp
-    src/core/Background2DAnimation.cpp
-    src/core/CameraManager.cpp
-    src/core/ConfigCmd.cpp
-    src/core/ConfigCmdManager.cpp
-    src/core/ConfigFile.cpp
-    src/core/ConfigVar.cpp
-    src/core/ConfigVarManager.cpp
-    src/core/Console.cpp
-    src/core/DebugDraw.cpp
-    src/core/Entity.cpp
-    src/core/EntityCollision.cpp
-    src/core/EntityDirection.cpp
-    src/core/EntityManager.cpp
-    src/core/EntityModel.cpp
-    src/core/EntityPoint.cpp
-    src/core/EntityTrigger.cpp
-    src/core/GameFrameListener.cpp
-    src/core/InputManager.cpp
-    src/core/Savemap.cpp
-    src/core/SavemapManager.cpp
-    src/core/ScriptManager.cpp
-    src/core/Timer.cpp
-    src/core/UiAnimation.cpp
-    src/core/UiFont.cpp
-    src/core/UiManager.cpp
-    src/core/UiSprite.cpp
-    src/core/UiTextArea.cpp
-    src/core/UiWidget.cpp
-    src/core/Utilites.cpp
-    src/core/Walkmesh.cpp
-    src/core/XmlBackground2DFile.cpp
-    src/core/XmlFile.cpp
-    src/core/XmlFontFile.cpp
-    src/core/XmlFontsFile.cpp
-    src/core/XmlMapFile.cpp
-    src/core/XmlMapsFile.cpp
-    src/core/XmlMusicsFile.cpp
-    src/core/XmlPrototypesFile.cpp
-    src/core/XmlScreenFile.cpp
-    src/core/XmlScreensFile.cpp
-    src/core/XmlScriptsFile.cpp
-    src/core/XmlSoundsFile.cpp
-    src/core/XmlTextFile.cpp
-    src/core/XmlTextsFile.cpp
-    src/core/DialogsManager.cpp
-    src/core/TextManager.cpp
-    src/map/VGearsBackground2DFile.cpp
-    src/map/VGearsBackground2DFileManager.cpp
-    src/map/VGearsBackground2DFileXMLSerializer.cpp
-    src/map/VGearsMapFile.cpp
-    src/map/VGearsMapFileManager.cpp
-    src/map/VGearsMapFileXMLSerializer.cpp
-    src/map/VGearsWalkmeshFile.cpp
-    src/map/VGearsWalkmeshFileManager.cpp
-    src/map/VGearsWalkmeshFileXMLSerializer.cpp
-    src/VGearsGameState.cpp
-    src/data/VGearsXMLSerializer.cpp
-    src/common/FinalFantasy7/FF7NameLookup.cpp
-    src/map/FinalFantasy7/FF7WalkmeshFileSerializer.cpp
-    src/FF7Character.cpp
-    src/FF7Common.cpp
-)
-
-# Find LibOIS. TODO: Find it.
-set(ois_lib "/usr/lib/x86_64-linux-gnu/libOIS.so")
-
-# TODO: Find OIS
-include_directories(
-    ${VGears_INCLUDE_DIRS}
-    ${CMAKE_CURRENT_SOURCE_DIR}/include
-    /usr/include/OIS/
-)
-
-# Compiler options
-if (MSVC)
-else()
-    if(WIN32)
-        add_definitions(
-            -W
-            -mthreads
-            -fmessage-length=0
-            -fexceptions
-            -fident
-        )
-    
-        # Linker options
-        add_definitions(
-            -Wl,--enable-runtime-pseudo-reloc
-            -Wl,--enable-auto-image-base
-            -Wl,--add-stdcall-alias
-        )
-    endif()
-endif()
-
-# Defines.
-if(WIN32)
-    # Check usage and remove if uneccessary
-    add_definitions(-DWIN32 -D__WIN32__ -D_WINDOWS)
-endif()
-
-# TODO: Find OIS
-add_library(V-Gears STATIC
-    ${HEADER_FILES}
-    ${SOURCE_FILES}
-    /usr/include/OIS/
-)
-
-# Coverage uses more memory, combined with PCH can cause OOM/ICE
-#if ($ENV{COVERAGE}!=1)
-cotire(V-Gears)
-#endif()
-SET_PROPERTY(TARGET V-Gears PROPERTY FOLDER "v-gears")
-
-add_library(v-gears-data STATIC
-    ${HEADER_FILES_DATA}
-    ${SOURCE_FILES_DATA}
-)
-add_dependencies(v-gears-data configure_vgears_version)
-# Coverage uses more memory, combined with PCH can cause OOM/ICE
-if ($ENV{COVERAGE}!=1)
-    cotire(v-gears-data)
-endif()
-SET_PROPERTY(TARGET v-gears-data PROPERTY FOLDER "v-gears")
-
-add_executable(v-gears src/Main.cpp)
-SET_PROPERTY(TARGET v-gears PROPERTY FOLDER "v-gears")
-set(CPACK_PACKAGE_EXECUTABLES v-gears "v-gears")
-set(CPACK_WIX_PROGRAM_MENU_FOLDER "VGears")
-
-if (APPLE)
-    target_link_libraries(v-gears "-framework CoreFoundation -framework Cocoa -framework IOKit" ${ois_lib})
-endif()
-
-if( WIN32 AND NOT (CMAKE_BUILD_TYPE MATCHES "Debug") )
-    set_target_properties( v-gears PROPERTIES WIN32_EXECUTABLE ON )
-    if (MSVC)
-        set_target_properties(v-gears PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE")
-    endif()
-endif()
-
-target_link_libraries(V-Gears 
-    ${VGears_LIBRARIES}
-    LuaBind
-    liblua
-    tinyxml
-    ${ois_lib}
-)
-
-target_link_libraries(v-gears 
-    V-Gears
-    ${Boost_LIBRARIES}
-    v-gears-data
-    ${ois_lib}
-)
-
-target_link_libraries(v-gears-data
-    V-Gears
-    ${ois_lib}
-)
-
-if(WIN32 OR APPLE)
-    install(TARGETS v-gears DESTINATION .)
-else()
-    install(TARGETS v-gears RUNTIME DESTINATION ./games)
-endif()

+ 413 - 0
src/CMakeLists.txt

@@ -0,0 +1,413 @@
+# Define header and source files for V-Gears
+set(HEADER_FILES
+    modules/worldmap/WorldMapModule.h
+    common/VGearsManualObject.h
+    common/VGearsResource.h
+    common/VGearsStringUtil.h
+    common/TypeDefine.h
+    common/LzsFile.h
+    common/File.h
+    common/FileSystem.h
+    map/VGearsBackground2DFile.h
+    map/VGearsBackground2DFileManager.h
+    map/VGearsBackground2DFileXMLSerializer.h
+    map/VGearsTile.h
+    map/VGearsMapFile.h
+    map/VGearsMapFileManager.h
+    map/VGearsMapFileXMLSerializer.h
+    map/VGearsWalkmeshFile.h
+    map/VGearsWalkmeshFileManager.h
+    map/VGearsWalkmeshFileXMLSerializer.h
+    LuaIncludes.h
+    VGearsGameState.h
+    VGearsPrerequisites.h
+    core/particles/emitters/PointEmitter.h
+    core/particles/emitters/PointEmitterFactory.h
+    core/particles/renderer/ParticleEntityAdditionalData.h
+    core/particles/renderer/ParticleEntityRenderer.h
+    core/particles/renderer/ParticleEntityRendererDictionary.h
+    core/particles/renderer/ParticleEntityRendererFactory.h
+    core/particles/Particle.h
+    core/particles/ParticleAdditionalData.h
+    core/particles/ParticleEmitter.h
+    core/particles/ParticleEmitterDictionary.h
+    core/particles/ParticleEmitterFactory.h
+    core/particles/ParticleEmitterTranslator.h
+    core/particles/ParticlePool.h
+    core/particles/ParticlePoolMap.h
+    core/particles/ParticleRenderer.h
+    core/particles/ParticleRendererFactory.h
+    core/particles/ParticleRendererTranslator.h
+    core/particles/ParticleSystem.h
+    core/particles/ParticleSystemFactory.h
+    core/particles/ParticleSystemManager.h
+    core/particles/ParticleSystemTranslator.h
+    core/particles/ParticleSystemTranslatorManager.h
+    core/particles/ParticleTechnique.h
+    core/particles/ParticleTechniqueTranslator.h
+    core/particles/ParticleVisual.h
+    core/Assert.h
+    core/AudioManager.h
+    core/Background2D.h
+    core/Background2DAnimation.h
+    core/CameraManager.h
+    core/CameraManagerCommands.h
+    core/ConfigCmd.h
+    core/ConfigCmdManager.h
+    core/ConfigCmdManagerCommands.h
+    core/ConfigFile.h
+    core/ConfigVar.h
+    core/ConfigVarManager.h
+    core/Console.h
+    core/DebugDraw.h
+    core/Entity.h
+    core/EntityCollision.h
+    core/EntityDirection.h
+    core/EntityManager.h
+    core/EntityModel.h
+    core/EntityPoint.h
+    core/EntityTrigger.h
+    core/Event.h
+    core/GameFrameListener.h
+    core/InputManager.h
+    core/InputManagerCommands.h
+    core/Logger.h
+    core/Module.h
+    core/Savemap.h
+    core/SavemapManager.h
+    core/ScriptManager.h
+    core/ScriptManagerBinds.h
+    core/ScriptManagerCommands.h
+    core/Timer.h
+    core/UiAnimation.h
+    core/UiFont.h
+    core/UiManager.h
+    core/UiSprite.h
+    core/UiTextArea.h
+    core/UiWidget.h
+    core/Utilites.h
+    core/Walkmesh.h
+    core/XmlBackground2DFile.h
+    core/XmlFile.h
+    core/XmlFontFile.h
+    core/XmlFontsFile.h
+    core/XmlMapFile.h
+    core/XmlMusicsFile.h
+    core/XmlPrototypesFile.h
+    core/XmlScreenFile.h
+    core/XmlScreensFile.h
+    core/XmlScriptsFile.h
+    core/XmlSoundsFile.h
+    core/XmlTextFile.h
+    core/XmlTextsFile.h
+    core/DialogsManager.h
+    core/ScriptManagerBinds.h
+    core/TextManager.h
+    core/TextManagerCommands.h
+    data/VGearsXMLSerializer.h
+    common/FinalFantasy7/FF7NameLookup.h
+    map/FinalFantasy7/FF7WalkmeshFileSerializer.h
+    FF7Character.h
+    FF7Common.h
+)
+
+set(HEADER_FILES_DATA
+    common/VGearsApplication.h
+    data/worldmap/MapFile.h
+    data/worldmap/MapFileManager.h
+    data/worldmap/MapFileSerializer.h
+    data/worldmap/TxzFile.h
+    data/worldmap/TxzFileManager.h
+    data/worldmap/TxzFileSerializer.h
+    data/VGearsAFile.h
+    data/VGearsAFileManager.h
+    data/VGearsAFileSerializer.h
+    data/VGearsBackgroundFile.h
+    data/VGearsBackgroundFileManager.h
+    data/VGearsBackgroundFileSerializer.h
+    data/VGearsBackgroundTextureLoader.h
+    data/VGearsCameraMatrixFile.h
+    data/VGearsCameraMatrixFileManager.h
+    data/VGearsCameraMatrixFileSerializer.h
+    data/VGearsFLevelBackground2DLoader.h
+    data/VGearsFLevelFile.h
+    data/VGearsFLevelFileManager.h
+    data/VGearsFLevelFileSerializer.h
+    data/VGearsFLevelTextureLoader.h
+    data/VGearsHRCFile.h
+    data/VGearsHRCFileManager.h
+    data/VGearsHRCFileSerializer.h
+    data/VGearsHRCMeshLoader.h
+    data/VGearsHRCSkeletonLoader.h
+    data/VGearsLGPArchive.h
+    data/VGearsLGPArchiveFactory.h
+    data/VGearsLGPArchiveSerializer.h
+    data/VGearsLZSDataStream.h
+    data/VGearsLZSFLevelFile.h
+    data/VGearsLZSFLevelFileManager.h
+    data/VGearsPaletteFile.h
+    data/VGearsPaletteFileManager.h
+    data/VGearsPaletteFileSerializer.h
+    data/VGearsPFile.h
+    data/VGearsPFileManager.h
+    data/VGearsPFileSerializer.h
+    data/VGearsRSDFile.h
+    data/VGearsRSDFileManager.h
+    data/VGearsRSDFileSerializer.h
+    data/VGearsSerializer.h
+    data/VGearsTexCodec.h
+    data/VGearsTexFile.h
+    data/VGearsTriggersFile.h
+    data/VGearsMapListFile.h
+    data/FinalFantasy7/FF7ModelListFile.h
+    data/FinalFantasy7/FF7ModelListFileManager.h
+    data/FinalFantasy7/FF7ModelListFileSerializer.h
+)
+
+set(SOURCE_FILES_DATA
+    common/VGearsApplication.cpp
+    data/VGearsAFile.cpp
+    data/VGearsAFileManager.cpp
+    data/VGearsAFileSerializer.cpp
+    data/worldmap/MapFile.cpp
+    data/worldmap/MapFileManager.cpp
+    data/worldmap/MapFileSerializer.cpp
+    data/worldmap/TxzFile.cpp
+    data/worldmap/TxzFileManager.cpp
+    data/worldmap/TxzFileSerializer.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
+    data/VGearsHRCFileManager.cpp
+    data/VGearsHRCFileSerializer.cpp
+    data/VGearsHRCMeshLoader.cpp
+    data/VGearsHRCSkeletonLoader.cpp
+    data/VGearsLGPArchive.cpp
+    data/VGearsLGPArchiveFactory.cpp
+    data/VGearsLGPArchiveSerializer.cpp
+    data/VGearsLZSDataStream.cpp
+    data/VGearsLZSFLevelFile.cpp
+    data/VGearsLZSFLevelFileManager.cpp
+    data/VGearsPaletteFile.cpp
+    data/VGearsPaletteFileManager.cpp
+    data/VGearsPaletteFileSerializer.cpp
+    data/VGearsPFile.cpp
+    data/VGearsPFileManager.cpp
+    data/VGearsPFileSerializer.cpp
+    data/VGearsRSDFile.cpp
+    data/VGearsRSDFileManager.cpp
+    data/VGearsRSDFileSerializer.cpp
+    data/VGearsSerializer.cpp
+    data/VGearsTexCodec.cpp
+    data/VGearsTexFile.cpp
+    data/VGearsTriggersFile.cpp
+    data/VGearsMapListFile.cpp
+    data/FinalFantasy7/FF7ModelListFile.cpp
+    data/FinalFantasy7/FF7ModelListFileManager.cpp
+    data/FinalFantasy7/FF7ModelListFileSerializer.cpp
+)
+
+set(SOURCE_FILES
+    modules/worldmap/WorldMapModule.cpp
+    common/VGearsManualObject.cpp
+    common/VGearsResource.cpp
+    common/VGearsStringUtil.cpp
+    common/TypeDefine.cpp
+    common/LzsFile.cpp
+    common/File.cpp
+    common/FileSystem.cpp
+    core/particles/emitters/PointEmitter.cpp
+    core/particles/emitters/PointEmitterFactory.cpp
+    core/particles/Particle.cpp
+    core/particles/ParticleEmitter.cpp
+    core/particles/ParticleEmitterDictionary.cpp
+    core/particles/ParticleEmitterTranslator.cpp
+    core/particles/ParticleRenderer.cpp
+    core/particles/ParticleRendererTranslator.cpp
+    core/particles/ParticleSystem.cpp
+    core/particles/ParticleSystemFactory.cpp
+    core/particles/ParticleSystemManager.cpp
+    core/particles/ParticleSystemTranslator.cpp
+    core/particles/ParticleSystemTranslatorManager.cpp
+    core/particles/ParticleTechnique.cpp
+    core/particles/ParticleTechniqueTranslator.cpp
+    core/particles/ParticleVisual.cpp
+    core/particles/renderer/ParticleEntityRenderer.cpp
+    core/particles/renderer/ParticleEntityRendererDictionary.cpp
+    core/AudioManager.cpp
+    core/Background2D.cpp
+    core/Background2DAnimation.cpp
+    core/CameraManager.cpp
+    core/ConfigCmd.cpp
+    core/ConfigCmdManager.cpp
+    core/ConfigFile.cpp
+    core/ConfigVar.cpp
+    core/ConfigVarManager.cpp
+    core/Console.cpp
+    core/DebugDraw.cpp
+    core/Entity.cpp
+    core/EntityCollision.cpp
+    core/EntityDirection.cpp
+    core/EntityManager.cpp
+    core/EntityModel.cpp
+    core/EntityPoint.cpp
+    core/EntityTrigger.cpp
+    core/GameFrameListener.cpp
+    core/InputManager.cpp
+    core/Savemap.cpp
+    core/SavemapManager.cpp
+    core/ScriptManager.cpp
+    core/Timer.cpp
+    core/UiAnimation.cpp
+    core/UiFont.cpp
+    core/UiManager.cpp
+    core/UiSprite.cpp
+    core/UiTextArea.cpp
+    core/UiWidget.cpp
+    core/Utilites.cpp
+    core/Walkmesh.cpp
+    core/XmlBackground2DFile.cpp
+    core/XmlFile.cpp
+    core/XmlFontFile.cpp
+    core/XmlFontsFile.cpp
+    core/XmlMapFile.cpp
+    core/XmlMapsFile.cpp
+    core/XmlMusicsFile.cpp
+    core/XmlPrototypesFile.cpp
+    core/XmlScreenFile.cpp
+    core/XmlScreensFile.cpp
+    core/XmlScriptsFile.cpp
+    core/XmlSoundsFile.cpp
+    core/XmlTextFile.cpp
+    core/XmlTextsFile.cpp
+    core/DialogsManager.cpp
+    core/TextManager.cpp
+    map/VGearsBackground2DFile.cpp
+    map/VGearsBackground2DFileManager.cpp
+    map/VGearsBackground2DFileXMLSerializer.cpp
+    map/VGearsMapFile.cpp
+    map/VGearsMapFileManager.cpp
+    map/VGearsMapFileXMLSerializer.cpp
+    map/VGearsWalkmeshFile.cpp
+    map/VGearsWalkmeshFileManager.cpp
+    map/VGearsWalkmeshFileXMLSerializer.cpp
+    VGearsGameState.cpp
+    data/VGearsXMLSerializer.cpp
+    common/FinalFantasy7/FF7NameLookup.cpp
+    map/FinalFantasy7/FF7WalkmeshFileSerializer.cpp
+    FF7Character.cpp
+    FF7Common.cpp
+)
+
+# Find LibOIS. TODO: Find it.
+set(ois_lib "/usr/lib/x86_64-linux-gnu/libOIS.so")
+
+# TODO: Find OIS
+include_directories(
+    ${VGears_INCLUDE_DIRS}
+    ${CMAKE_CURRENT_SOURCE_DIR}/include
+    /usr/include/OIS/
+)
+
+# Compiler options
+if (MSVC)
+else()
+    if(WIN32)
+        add_definitions(
+            -W
+            -mthreads
+            -fmessage-length=0
+            -fexceptions
+            -fident
+        )
+    
+        # Linker options
+        add_definitions(
+            -Wl,--enable-runtime-pseudo-reloc
+            -Wl,--enable-auto-image-base
+            -Wl,--add-stdcall-alias
+        )
+    endif()
+endif()
+
+# Defines.
+if(WIN32)
+    # Check usage and remove if uneccessary
+    add_definitions(-DWIN32 -D__WIN32__ -D_WINDOWS)
+endif()
+
+# TODO: Find OIS
+add_library(V-Gears STATIC
+    ${HEADER_FILES}
+    ${SOURCE_FILES}
+    /usr/include/OIS/
+)
+
+# Coverage uses more memory, combined with PCH can cause OOM/ICE
+#if ($ENV{COVERAGE}!=1)
+cotire(V-Gears)
+#endif()
+SET_PROPERTY(TARGET V-Gears PROPERTY FOLDER "v-gears")
+
+add_library(v-gears-data STATIC
+    ${HEADER_FILES_DATA}
+    ${SOURCE_FILES_DATA}
+)
+add_dependencies(v-gears-data configure_vgears_version)
+# Coverage uses more memory, combined with PCH can cause OOM/ICE
+if ($ENV{COVERAGE}!=1)
+    cotire(v-gears-data)
+endif()
+SET_PROPERTY(TARGET v-gears-data PROPERTY FOLDER "v-gears")
+
+add_executable(v-gears Main.cpp)
+SET_PROPERTY(TARGET v-gears PROPERTY FOLDER "v-gears")
+set(CPACK_PACKAGE_EXECUTABLES v-gears "v-gears")
+set(CPACK_WIX_PROGRAM_MENU_FOLDER "VGears")
+
+if (APPLE)
+    target_link_libraries(v-gears "-framework CoreFoundation -framework Cocoa -framework IOKit" ${ois_lib})
+endif()
+
+if( WIN32 AND NOT (CMAKE_BUILD_TYPE MATCHES "Debug") )
+    set_target_properties( v-gears PROPERTIES WIN32_EXECUTABLE ON )
+    if (MSVC)
+        set_target_properties(v-gears PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE")
+    endif()
+endif()
+
+target_link_libraries(V-Gears 
+    ${VGears_LIBRARIES}
+    LuaBind
+    liblua
+    tinyxml
+    ${ois_lib}
+)
+
+target_link_libraries(v-gears 
+    V-Gears
+    ${Boost_LIBRARIES}
+    v-gears-data
+    ${ois_lib}
+)
+
+target_link_libraries(v-gears-data
+    V-Gears
+    ${ois_lib}
+)
+
+if(WIN32 OR APPLE)
+    install(TARGETS v-gears DESTINATION .)
+else()
+    install(TARGETS v-gears RUNTIME DESTINATION ./games)
+endif()

+ 0 - 0
V-Gears/src/FF7Character.cpp → src/FF7Character.cpp


+ 0 - 0
V-Gears/include/FF7Character.h → src/FF7Character.h


+ 0 - 0
V-Gears/src/FF7Common.cpp → src/FF7Common.cpp


+ 0 - 0
V-Gears/include/FF7Common.h → src/FF7Common.h


+ 0 - 0
V-Gears/include/LuaIncludes.h → src/LuaIncludes.h


+ 0 - 0
V-Gears/src/Main.cpp → src/Main.cpp


+ 0 - 0
V-Gears/src/VGearsGameState.cpp → src/VGearsGameState.cpp


+ 0 - 0
V-Gears/include/VGearsGameState.h → src/VGearsGameState.h


+ 0 - 0
V-Gears/include/VGearsPrerequisites.h → src/VGearsPrerequisites.h


+ 0 - 0
V-Gears/include/Version.h → src/Version.h


+ 0 - 0
V-Gears/include/Version.h.in → src/Version.h.in


+ 0 - 0
V-Gears/src/common/File.cpp → src/common/File.cpp


+ 0 - 0
V-Gears/include/common/File.h → src/common/File.h


+ 0 - 0
V-Gears/src/common/FileSystem.cpp → src/common/FileSystem.cpp


+ 0 - 0
V-Gears/include/common/FileSystem.h → src/common/FileSystem.h


+ 0 - 0
V-Gears/src/common/FinalFantasy7/FF7NameLookup.cpp → src/common/FinalFantasy7/FF7NameLookup.cpp


+ 0 - 0
V-Gears/include/common/FinalFantasy7/FF7NameLookup.h → src/common/FinalFantasy7/FF7NameLookup.h


+ 0 - 0
V-Gears/src/common/LzsFile.cpp → src/common/LzsFile.cpp


+ 0 - 0
V-Gears/include/common/LzsFile.h → src/common/LzsFile.h


+ 0 - 0
V-Gears/src/common/TypeDefine.cpp → src/common/TypeDefine.cpp


+ 0 - 0
V-Gears/include/common/TypeDefine.h → src/common/TypeDefine.h


+ 0 - 0
V-Gears/src/common/VGearsApplication.cpp → src/common/VGearsApplication.cpp


+ 0 - 0
V-Gears/include/common/VGearsApplication.h → src/common/VGearsApplication.h


+ 0 - 0
V-Gears/src/common/VGearsManualObject.cpp → src/common/VGearsManualObject.cpp


+ 0 - 0
V-Gears/include/common/VGearsManualObject.h → src/common/VGearsManualObject.h


+ 0 - 0
V-Gears/src/common/VGearsResource.cpp → src/common/VGearsResource.cpp


+ 0 - 0
V-Gears/include/common/VGearsResource.h → src/common/VGearsResource.h


+ 0 - 0
V-Gears/src/common/VGearsStringUtil.cpp → src/common/VGearsStringUtil.cpp


+ 0 - 0
V-Gears/include/common/VGearsStringUtil.h → src/common/VGearsStringUtil.h


+ 0 - 0
V-Gears/include/core/Assert.h → src/core/Assert.h


+ 0 - 0
V-Gears/src/core/AudioManager.cpp → src/core/AudioManager.cpp


+ 0 - 0
V-Gears/include/core/AudioManager.h → src/core/AudioManager.h


+ 0 - 0
V-Gears/src/core/Background2D.cpp → src/core/Background2D.cpp


+ 0 - 0
V-Gears/include/core/Background2D.h → src/core/Background2D.h


+ 0 - 0
V-Gears/src/core/Background2DAnimation.cpp → src/core/Background2DAnimation.cpp


+ 0 - 0
V-Gears/include/core/Background2DAnimation.h → src/core/Background2DAnimation.h


+ 0 - 0
V-Gears/src/core/CameraManager.cpp → src/core/CameraManager.cpp


+ 0 - 0
V-Gears/include/core/CameraManager.h → src/core/CameraManager.h


+ 0 - 0
V-Gears/include/core/CameraManagerCommands.h → src/core/CameraManagerCommands.h


+ 0 - 0
V-Gears/src/core/ConfigCmd.cpp → src/core/ConfigCmd.cpp


+ 0 - 0
V-Gears/include/core/ConfigCmd.h → src/core/ConfigCmd.h


+ 0 - 0
V-Gears/src/core/ConfigCmdManager.cpp → src/core/ConfigCmdManager.cpp


+ 0 - 0
V-Gears/include/core/ConfigCmdManager.h → src/core/ConfigCmdManager.h


+ 0 - 0
V-Gears/include/core/ConfigCmdManagerCommands.h → src/core/ConfigCmdManagerCommands.h


+ 0 - 0
V-Gears/src/core/ConfigFile.cpp → src/core/ConfigFile.cpp


+ 0 - 0
V-Gears/include/core/ConfigFile.h → src/core/ConfigFile.h


+ 0 - 0
V-Gears/src/core/ConfigVar.cpp → src/core/ConfigVar.cpp


Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно