diff --git a/.gitignore b/.gitignore index 322375a54..b345e9d61 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ screenshot*.png *.o +*.a *~ data CMakeFiles @@ -13,4 +14,5 @@ build plugins.cfg openmw.cfg Doxygen - +.thumbnails +resources diff --git a/CMakeLists.txt b/CMakeLists.txt index 66254f4fb..8e9073b7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) # source directory: apps -set(GAME apps/openmw/main.cpp apps/openmw/engine.cpp) -set(GAME_HEADER apps/openmw/mwinput/inputmanager.hpp apps/openmw/engine.hpp) +set(GAME + apps/openmw/main.cpp + apps/openmw/engine.cpp) +set(GAME_HEADER + apps/openmw/mwinput/inputmanager.hpp + apps/openmw/engine.hpp) source_group(game FILES ${GAME} ${GAME_HEADER}) set(GAMEREND @@ -26,7 +30,8 @@ set(GAMEREND_HEADER source_group(game_renderer FILES ${GAMEREND} ${GAMEREND_HEADER}) # set(GAMEINPUT) -set(GAMEINPUT_HEADER apps/openmw/mwinput/inputmanager.hpp) +set(GAMEINPUT_HEADER + apps/openmw/mwinput/inputmanager.hpp) source_group(game_input FILES ${GAMEINPUT} ${GAMEINPUT_HEADER}) set(APPS ${GAME} ${GAMEREND} ${GAMEINPUT}) @@ -34,48 +39,80 @@ set(APPS_HEADER ${GAME_HEADER} ${GAMEREND_HEADER} ${GAMEINPUT_HEADER}) # source directory: components -set(BSA components/bsa/bsa_archive.cpp components/bsa/bsa_file.cpp) -set(BSA_HEADER components/bsa/bsa_archive.hpp components/bsa/bsa_file.hpp) +set(BSA + components/bsa/bsa_archive.cpp + components/bsa/bsa_file.cpp) +set(BSA_HEADER + components/bsa/bsa_archive.hpp + components/bsa/bsa_file.hpp) source_group(bsa FILES ${BSA} ${BSA_HEADER}) -set(NIF components/nif/nif_file.cpp) -set(NIF_HEADER components/nif/controlled.hpp components/nif/effect.hpp - components/nif/nif_types.hpp components/nif/record.hpp - components/nif/controller.hpp components/nif/extra.hpp components/nif/node.hpp +set(NIF + components/nif/nif_file.cpp) +set(NIF_HEADER + components/nif/controlled.hpp + components/nif/effect.hpp + components/nif/nif_types.hpp + components/nif/record.hpp + components/nif/controller.hpp + components/nif/extra.hpp + components/nif/node.hpp components/nif/record_ptr.hpp - components/nif/data.hpp components/nif/nif_file.hpp components/nif/property.hpp) + components/nif/data.hpp + components/nif/nif_file.hpp + components/nif/property.hpp) source_group(nif FILES ${NIF} ${NIF_HEADER}) -set(NIFOGRE components/nifogre/ogre_nif_loader.cpp) -set(NIFOGRE_HEADER components/nifogre/ogre_nif_loader.hpp) +set(NIFOGRE + components/nifogre/ogre_nif_loader.cpp) +set(NIFOGRE_HEADER + components/nifogre/ogre_nif_loader.hpp) source_group(nifogre FILES ${NIFOGRE} ${NIFOGRE_HEADER}) -set(ESM_STORE components/esm_store/store.cpp components/esm_store/cell_store.cpp) -set(ESM_STORE_HEADER components/esm_store/cell_store.hpp - components/esm_store/reclists.hpp components/esm_store/store.hpp) +set(ESM_STORE + components/esm_store/store.cpp + components/esm_store/cell_store.cpp) +set(ESM_STORE_HEADER + components/esm_store/cell_store.hpp + components/esm_store/reclists.hpp + components/esm_store/store.hpp) source_group(esm_store FILES ${ESM_STORE} ${ESM_STORE_HEADER}) file(GLOB ESM_HEADER components/esm/*.hpp) source_group(esm_header FILES ${ESM_HEADER}) -set(OGRE components/engine/ogre/renderer.cpp) -set(OGRE_HEADER components/engine/ogre/renderer.hpp) +set(OGRE + components/engine/ogre/renderer.cpp) +set(OGRE_HEADER + components/engine/ogre/renderer.hpp) source_group(ogre FILES ${OGRE} ${OGRE_HEADER}) -set(INPUT components/engine/input/oismanager.cpp) -set(INPUT_HEADER components/engine/input/oismanager.hpp components/engine/input/listener.hpp - components/engine/input/func_binder.hpp components/engine/input/dispatch_map.hpp - components/engine/input/dispatcher.hpp components/engine/input/poller.hpp) +set(INPUT + components/engine/input/oismanager.cpp) +set(INPUT_HEADER + components/engine/input/oismanager.hpp + components/engine/input/listener.hpp + components/engine/input/func_binder.hpp + components/engine/input/dispatch_map.hpp + components/engine/input/dispatcher.hpp + components/engine/input/poller.hpp) source_group(input FILES ${INPUT} ${INPUT_HEADER}) +set(MISC + components/misc/stringops.cpp + components/misc/fileops.cpp) +set(MISC_HEADER + components/misc/fileops.hpp + components/misc/slice_array.hpp + components/misc/stringops.hpp) +source_group(misc FILES ${MISC} ${MISC_HEADER}) + set(COMPONENTS ${BSA} ${NIF} ${NIFOGRE} ${ESM_STORE} ${OGRE} ${INPUT} ${MISC}) set(COMPONENTS_HEADER ${BSA_HEADER} ${NIF_HEADER} ${NIFOGRE_HEADER} ${ESM_STORE_HEADER} ${ESM_HEADER} ${OGRE_HEADER} ${INPUT_HEADER} ${MISC_HEADER}) # source directory: libs -ADD_SUBDIRECTORY( libs/platform ) - set(MANGLE_VFS libs/mangle/vfs/servers/ogre_vfs.cpp) source_group(mangle_vfs FILES ${MANGLE_VFS}) @@ -97,7 +134,7 @@ find_package(OIS REQUIRED) include_directories("." ${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${PLATFORM_INCLUDE_DIR} - ${CMAKE_HOME_DIRECTORY}/extern/caelum/include ) + ${CMAKE_HOME_DIRECTORY}/extern/caelum/include) link_directories(${Boost_LIBRARY_DIRS} ${OGRE_LIB_DIR}) ADD_SUBDIRECTORY( extern/caelum ) @@ -145,7 +182,6 @@ target_link_libraries(openmw ${OGRE_LIBRARIES} ${OIS_LIBRARIES} ${Boost_LIBRARIES} - platform caelum) if (APPLE) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 6e6568ac8..143f62792 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -7,7 +7,7 @@ #include "components/esm_store/cell_store.hpp" #include "components/bsa/bsa_archive.hpp" #include "components/engine/ogre/renderer.hpp" -#include "libs/platform/fileops.hpp" +#include "components/misc/fileops.hpp" #include "apps/openmw/mwrender/interior.hpp" #include "mwinput/inputmanager.hpp" @@ -104,7 +104,7 @@ void OMW::Engine::go() const char* plugCfg = "plugins.cfg"; - mOgre.configure(!OMW::Platform::isFile("ogre.cfg"), plugCfg, false); + mOgre.configure(!isFile("ogre.cfg"), plugCfg, false); addResourcesDirectory (mDataDir / "Meshes"); addResourcesDirectory (mDataDir / "Textures"); diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp old mode 100755 new mode 100644 index bcd40457f..901ab405e --- a/apps/openmw/mwrender/sky.cpp +++ b/apps/openmw/mwrender/sky.cpp @@ -1,93 +1,93 @@ -#include "sky.hpp" -#include "Caelum.h" - -namespace MWRender -{ - // - // Implements a Caelum sky with default settings. - // - // Note: this is intended as a temporary solution to provide some form of - // sky rendering. This code will obviously need significant tailoring to - // support fidelity with Morrowind's rendering. Before doing major work - // on this class, more research should be done to determine whether - // Caelum or another plug-in such as SkyX would be best for the long-term. - // - class CaelumManager : public SkyManager - { - protected: - Caelum::CaelumSystem* mpCaelumSystem; - - public: - CaelumManager (Ogre::RenderWindow* pRenderWindow, - Ogre::Camera* pCamera); - virtual ~CaelumManager (); - }; - - CaelumManager::CaelumManager (Ogre::RenderWindow* pRenderWindow, - Ogre::Camera* pCamera) - : mpCaelumSystem (NULL) - { - using namespace Ogre; - using namespace Caelum; - - assert(pCamera); - assert(pRenderWindow); - - // Load the Caelum resources - // - ResourceGroupManager::getSingleton().addResourceLocation("resources\\caelum", "FileSystem", "Caelum"); - ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); - - // Load the Caelum resources - // - Ogre::SceneManager* pScene = pCamera->getSceneManager(); - Caelum::CaelumSystem::CaelumComponent componentMask = CaelumSystem::CAELUM_COMPONENTS_DEFAULT; - mpCaelumSystem = new Caelum::CaelumSystem (Root::getSingletonPtr(), pScene, componentMask); - - // Set time acceleration. - mpCaelumSystem->getUniversalClock()->setTimeScale(128); - - // Disable fog since OpenMW is handling OGRE fog elsewhere - mpCaelumSystem->setManageSceneFog(false); - - // Change the camera far distance to make sure the sky is not clipped - pCamera->setFarClipDistance(50000); - - // Register Caelum as an OGRE listener - pRenderWindow->addListener(mpCaelumSystem); - Root::getSingletonPtr()->addFrameListener(mpCaelumSystem); - } - - CaelumManager::~CaelumManager() - { - if (mpCaelumSystem) - mpCaelumSystem->shutdown (false); - } - - /// Creates and connects the sky rendering component to OGRE. - /// - /// \return NULL on failure. - /// - SkyManager* SkyManager::create (Ogre::RenderWindow* pRenderWindow, - Ogre::Camera* pCamera) - { - SkyManager* pSkyManager = NULL; - - try - { - pSkyManager = new CaelumManager(pRenderWindow, pCamera); - } - catch (Ogre::Exception& e) - { - std::cout << "\nOGRE Exception when attempting to add sky: " - << e.getFullDescription().c_str() << std::endl; - } - catch (std::exception& e) - { - std::cout << "\nException when attempting to add sky: " - << e.what() << std::endl; - } - - return pSkyManager; - } -} +#include "sky.hpp" +#include "Caelum.h" + +namespace MWRender +{ + // + // Implements a Caelum sky with default settings. + // + // Note: this is intended as a temporary solution to provide some form of + // sky rendering. This code will obviously need significant tailoring to + // support fidelity with Morrowind's rendering. Before doing major work + // on this class, more research should be done to determine whether + // Caelum or another plug-in such as SkyX would be best for the long-term. + // + class CaelumManager : public SkyManager + { + protected: + Caelum::CaelumSystem* mpCaelumSystem; + + public: + CaelumManager (Ogre::RenderWindow* pRenderWindow, + Ogre::Camera* pCamera); + virtual ~CaelumManager (); + }; + + CaelumManager::CaelumManager (Ogre::RenderWindow* pRenderWindow, + Ogre::Camera* pCamera) + : mpCaelumSystem (NULL) + { + using namespace Ogre; + using namespace Caelum; + + assert(pCamera); + assert(pRenderWindow); + + // Load the Caelum resources + // + ResourceGroupManager::getSingleton().addResourceLocation("resources/caelum", "FileSystem", "Caelum"); + ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); + + // Load the Caelum resources + // + Ogre::SceneManager* pScene = pCamera->getSceneManager(); + Caelum::CaelumSystem::CaelumComponent componentMask = CaelumSystem::CAELUM_COMPONENTS_DEFAULT; + mpCaelumSystem = new Caelum::CaelumSystem (Root::getSingletonPtr(), pScene, componentMask); + + // Set time acceleration. + mpCaelumSystem->getUniversalClock()->setTimeScale(128); + + // Disable fog since OpenMW is handling OGRE fog elsewhere + mpCaelumSystem->setManageSceneFog(false); + + // Change the camera far distance to make sure the sky is not clipped + pCamera->setFarClipDistance(50000); + + // Register Caelum as an OGRE listener + pRenderWindow->addListener(mpCaelumSystem); + Root::getSingletonPtr()->addFrameListener(mpCaelumSystem); + } + + CaelumManager::~CaelumManager() + { + if (mpCaelumSystem) + mpCaelumSystem->shutdown (false); + } + + /// Creates and connects the sky rendering component to OGRE. + /// + /// \return NULL on failure. + /// + SkyManager* SkyManager::create (Ogre::RenderWindow* pRenderWindow, + Ogre::Camera* pCamera) + { + SkyManager* pSkyManager = NULL; + + try + { + pSkyManager = new CaelumManager(pRenderWindow, pCamera); + } + catch (Ogre::Exception& e) + { + std::cout << "\nOGRE Exception when attempting to add sky: " + << e.getFullDescription().c_str() << std::endl; + } + catch (std::exception& e) + { + std::cout << "\nException when attempting to add sky: " + << e.what() << std::endl; + } + + return pSkyManager; + } +} diff --git a/apps/openmw/mwrender/sky.hpp b/apps/openmw/mwrender/sky.hpp old mode 100755 new mode 100644 diff --git a/components/esm/esm_reader.hpp b/components/esm/esm_reader.hpp index 033675222..7db21323f 100644 --- a/components/esm/esm_reader.hpp +++ b/components/esm/esm_reader.hpp @@ -12,7 +12,7 @@ #include #include #include -#include "libs/platform/stringops.hpp" +#include #ifdef __APPLE__ // need our own implementation of strnlen @@ -217,9 +217,7 @@ public: /// Raw opening. Opens the file and sets everything up but doesn't /// parse the header. void openRaw(Mangle::Stream::StreamPtr _esm, const std::string &name) - { - using namespace OMW::Platform; - + { close(); esm = _esm; c.filename = name; diff --git a/components/nif/nif_file.cpp b/components/nif/nif_file.cpp index 027f64760..12845e617 100644 --- a/components/nif/nif_file.cpp +++ b/components/nif/nif_file.cpp @@ -23,7 +23,7 @@ #include "nif_file.hpp" #include "record.hpp" -#include "libs/platform/stringops.hpp" +#include "components/misc/stringops.hpp" #include "extra.hpp" #include "controlled.hpp" @@ -44,8 +44,6 @@ using namespace Nif; void NIFFile::parse() { - using namespace OMW::Platform; - // Check the header string const char* head = getString(40); if(!begins(head, "NetImmerse File Format")) diff --git a/components/nif/nif_file.hpp b/components/nif/nif_file.hpp index 858ccb36a..72fb7c4b6 100644 --- a/components/nif/nif_file.hpp +++ b/components/nif/nif_file.hpp @@ -27,8 +27,7 @@ #include #include #include - -#include "libs/platform/slice_array.hpp" +#include #include #include diff --git a/extern/caelum/CMakeLists.txt b/extern/caelum/CMakeLists.txt index cdc63af33..4226d8d4a 100755 --- a/extern/caelum/CMakeLists.txt +++ b/extern/caelum/CMakeLists.txt @@ -1,57 +1,57 @@ -project(Caelum) - -ADD_DEFINITIONS(-DCAELUM_LIB) -INCLUDE_DIRECTORIES( ${CMAKE_HOME_DIRECTORY}/extern/caelum/include ) - -file(GLOB_RECURSE CAELUM_SRC src/*) -file(GLOB_RECURSE CAELUM_HDR include/*) - -set(SOURCES ${CAELUM_SRC} ${CAELUM_HDR}) -add_library(caelum STATIC ${SOURCES}) - -# -# Resources -# -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/AtmosphereDepth.png "${OpenMW_BINARY_DIR}/resources/caelum/AtmosphereDepth.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumGroundFog.cg "${OpenMW_BINARY_DIR}/resources/caelum/CaelumGroundFog.cg" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumLayeredClouds.cg "${OpenMW_BINARY_DIR}/resources/caelum/CaelumLayeredClouds.cg" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumPhaseMoon.cg "${OpenMW_BINARY_DIR}/resources/caelum/CaelumPhaseMoon.cg" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumPointStarfield.cg "${OpenMW_BINARY_DIR}/resources/caelum/CaelumPointStarfield.cg" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumSkyDome.cg "${OpenMW_BINARY_DIR}/resources/caelum/CaelumSkyDome.cg" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CloudCoverLookup.png "${OpenMW_BINARY_DIR}/resources/caelum/CloudCoverLookup.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/DepthComposer.cg "${OpenMW_BINARY_DIR}/resources/caelum/DepthComposer.cg" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/DepthComposer.compositor "${OpenMW_BINARY_DIR}/resources/caelum/DepthComposer.compositor" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/DepthComposer.material "${OpenMW_BINARY_DIR}/resources/caelum/DepthComposer.material" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/DepthRender.program "${OpenMW_BINARY_DIR}/resources/caelum/DepthRender.program" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/EarthClearSky2.png "${OpenMW_BINARY_DIR}/resources/caelum/EarthClearSky2.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/GroundFog.material "${OpenMW_BINARY_DIR}/resources/caelum/GroundFog.material" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/GroundFog.program "${OpenMW_BINARY_DIR}/resources/caelum/GroundFog.program" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Haze.program "${OpenMW_BINARY_DIR}/resources/caelum/Haze.program" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/LayeredClouds.material "${OpenMW_BINARY_DIR}/resources/caelum/LayeredClouds.material" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/MinimalCompositorVP.cg "${OpenMW_BINARY_DIR}/resources/caelum/MinimalCompositorVP.cg" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/MinimalCompositorVP.program "${OpenMW_BINARY_DIR}/resources/caelum/MinimalCompositorVP.program" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/moon.material "${OpenMW_BINARY_DIR}/resources/caelum/moon.material" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/moon_disc.dds "${OpenMW_BINARY_DIR}/resources/caelum/moon_disc.dds" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/noise1.dds "${OpenMW_BINARY_DIR}/resources/caelum/noise1.dds" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/noise2.dds "${OpenMW_BINARY_DIR}/resources/caelum/noise2.dds" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/noise3.dds "${OpenMW_BINARY_DIR}/resources/caelum/noise3.dds" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/noise4.dds "${OpenMW_BINARY_DIR}/resources/caelum/noise4.dds" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/PointStarfield.material "${OpenMW_BINARY_DIR}/resources/caelum/PointStarfield.material" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Precipitation.cg "${OpenMW_BINARY_DIR}/resources/caelum/Precipitation.cg" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Precipitation.compositor "${OpenMW_BINARY_DIR}/resources/caelum/Precipitation.compositor" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Precipitation.material "${OpenMW_BINARY_DIR}/resources/caelum/Precipitation.material" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_drizzle.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_drizzle.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_hail.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_hail.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_icecrystals.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_icecrystals.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_icepellets.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_icepellets.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_rain.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_rain.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_smallhail.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_smallhail.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_snow.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_snow.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_snowgrains.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_snowgrains.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/SkyDome.material "${OpenMW_BINARY_DIR}/resources/caelum/SkyDome.material" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/sphere.mesh "${OpenMW_BINARY_DIR}/resources/caelum/sphere.mesh" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Starfield.jpg "${OpenMW_BINARY_DIR}/resources/caelum/Starfield.jpg" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Starfield.material "${OpenMW_BINARY_DIR}/resources/caelum/Starfield.material" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Sun.material "${OpenMW_BINARY_DIR}/resources/caelum/Sun.material" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/SunGradient.png "${OpenMW_BINARY_DIR}/resources/caelum/SunGradient.png" COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/sun_disc.png "${OpenMW_BINARY_DIR}/resources/caelum/sun_disc.png" COPYONLY) +project(Caelum) + +ADD_DEFINITIONS(-DCAELUM_LIB) +INCLUDE_DIRECTORIES( ${CMAKE_HOME_DIRECTORY}/extern/caelum/include ) + +file(GLOB_RECURSE CAELUM_SRC src/*) +file(GLOB_RECURSE CAELUM_HDR include/*) + +set(SOURCES ${CAELUM_SRC} ${CAELUM_HDR}) +add_library(caelum STATIC ${SOURCES}) + +# +# Resources +# +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/AtmosphereDepth.png "${OpenMW_BINARY_DIR}/resources/caelum/AtmosphereDepth.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumGroundFog.cg "${OpenMW_BINARY_DIR}/resources/caelum/CaelumGroundFog.cg" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumLayeredClouds.cg "${OpenMW_BINARY_DIR}/resources/caelum/CaelumLayeredClouds.cg" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumPhaseMoon.cg "${OpenMW_BINARY_DIR}/resources/caelum/CaelumPhaseMoon.cg" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumPointStarfield.cg "${OpenMW_BINARY_DIR}/resources/caelum/CaelumPointStarfield.cg" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CaelumSkyDome.cg "${OpenMW_BINARY_DIR}/resources/caelum/CaelumSkyDome.cg" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/CloudCoverLookup.png "${OpenMW_BINARY_DIR}/resources/caelum/CloudCoverLookup.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/DepthComposer.cg "${OpenMW_BINARY_DIR}/resources/caelum/DepthComposer.cg" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/DepthComposer.compositor "${OpenMW_BINARY_DIR}/resources/caelum/DepthComposer.compositor" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/DepthComposer.material "${OpenMW_BINARY_DIR}/resources/caelum/DepthComposer.material" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/DepthRender.program "${OpenMW_BINARY_DIR}/resources/caelum/DepthRender.program" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/EarthClearSky2.png "${OpenMW_BINARY_DIR}/resources/caelum/EarthClearSky2.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/GroundFog.material "${OpenMW_BINARY_DIR}/resources/caelum/GroundFog.material" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/GroundFog.program "${OpenMW_BINARY_DIR}/resources/caelum/GroundFog.program" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Haze.program "${OpenMW_BINARY_DIR}/resources/caelum/Haze.program" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/LayeredClouds.material "${OpenMW_BINARY_DIR}/resources/caelum/LayeredClouds.material" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/MinimalCompositorVP.cg "${OpenMW_BINARY_DIR}/resources/caelum/MinimalCompositorVP.cg" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/MinimalCompositorVP.program "${OpenMW_BINARY_DIR}/resources/caelum/MinimalCompositorVP.program" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/moon.material "${OpenMW_BINARY_DIR}/resources/caelum/moon.material" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/moon_disc.dds "${OpenMW_BINARY_DIR}/resources/caelum/moon_disc.dds" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/noise1.dds "${OpenMW_BINARY_DIR}/resources/caelum/noise1.dds" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/noise2.dds "${OpenMW_BINARY_DIR}/resources/caelum/noise2.dds" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/noise3.dds "${OpenMW_BINARY_DIR}/resources/caelum/noise3.dds" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/noise4.dds "${OpenMW_BINARY_DIR}/resources/caelum/noise4.dds" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/PointStarfield.material "${OpenMW_BINARY_DIR}/resources/caelum/PointStarfield.material" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Precipitation.cg "${OpenMW_BINARY_DIR}/resources/caelum/Precipitation.cg" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Precipitation.compositor "${OpenMW_BINARY_DIR}/resources/caelum/Precipitation.compositor" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Precipitation.material "${OpenMW_BINARY_DIR}/resources/caelum/Precipitation.material" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_drizzle.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_drizzle.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_hail.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_hail.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_icecrystals.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_icecrystals.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_icepellets.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_icepellets.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_rain.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_rain.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_smallhail.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_smallhail.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_snow.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_snow.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/precipitation_snowgrains.png "${OpenMW_BINARY_DIR}/resources/caelum/precipitation_snowgrains.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/SkyDome.material "${OpenMW_BINARY_DIR}/resources/caelum/SkyDome.material" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/sphere.mesh "${OpenMW_BINARY_DIR}/resources/caelum/sphere.mesh" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Starfield.jpg "${OpenMW_BINARY_DIR}/resources/caelum/Starfield.jpg" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Starfield.material "${OpenMW_BINARY_DIR}/resources/caelum/Starfield.material" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/Sun.material "${OpenMW_BINARY_DIR}/resources/caelum/Sun.material" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/SunGradient.png "${OpenMW_BINARY_DIR}/resources/caelum/SunGradient.png" COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/resources/sun_disc.png "${OpenMW_BINARY_DIR}/resources/caelum/sun_disc.png" COPYONLY) diff --git a/extern/caelum/include/Astronomy.h b/extern/caelum/include/Astronomy.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/Caelum.h b/extern/caelum/include/Caelum.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/CaelumExceptions.h b/extern/caelum/include/CaelumExceptions.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/CaelumPlugin.h b/extern/caelum/include/CaelumPlugin.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/CaelumPrecompiled.h b/extern/caelum/include/CaelumPrecompiled.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/CaelumPrerequisites.h b/extern/caelum/include/CaelumPrerequisites.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/CaelumScriptTranslator.h b/extern/caelum/include/CaelumScriptTranslator.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/CaelumSystem.h b/extern/caelum/include/CaelumSystem.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/CameraBoundElement.h b/extern/caelum/include/CameraBoundElement.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/CloudSystem.h b/extern/caelum/include/CloudSystem.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/DepthComposer.h b/extern/caelum/include/DepthComposer.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/FastGpuParamRef.h b/extern/caelum/include/FastGpuParamRef.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/FlatCloudLayer.h b/extern/caelum/include/FlatCloudLayer.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/GroundFog.h b/extern/caelum/include/GroundFog.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/ImageStarfield.h b/extern/caelum/include/ImageStarfield.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/InternalUtilities.h b/extern/caelum/include/InternalUtilities.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/Moon.h b/extern/caelum/include/Moon.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/PointStarfield.h b/extern/caelum/include/PointStarfield.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/PrecipitationController.h b/extern/caelum/include/PrecipitationController.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/PrivatePtr.h b/extern/caelum/include/PrivatePtr.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/SkyDome.h b/extern/caelum/include/SkyDome.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/SkyLight.h b/extern/caelum/include/SkyLight.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/Sun.h b/extern/caelum/include/Sun.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/TypeDescriptor.h b/extern/caelum/include/TypeDescriptor.h old mode 100755 new mode 100644 diff --git a/extern/caelum/include/UniversalClock.h b/extern/caelum/include/UniversalClock.h old mode 100755 new mode 100644 diff --git a/extern/caelum/src/Astronomy.cpp b/extern/caelum/src/Astronomy.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/BrightStarCatalogue.cpp b/extern/caelum/src/BrightStarCatalogue.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/CaelumDefaultTypeDescriptorData.cpp b/extern/caelum/src/CaelumDefaultTypeDescriptorData.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/CaelumPlugin.cpp b/extern/caelum/src/CaelumPlugin.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/CaelumPrecompiled.cpp b/extern/caelum/src/CaelumPrecompiled.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/CaelumScriptTranslator.cpp b/extern/caelum/src/CaelumScriptTranslator.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/CameraBoundElement.cpp b/extern/caelum/src/CameraBoundElement.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/CloudSystem.cpp b/extern/caelum/src/CloudSystem.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/DepthComposer.cpp b/extern/caelum/src/DepthComposer.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/FastGpuParamRef.cpp b/extern/caelum/src/FastGpuParamRef.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/FlatCloudLayer.cpp b/extern/caelum/src/FlatCloudLayer.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/GroundFog.cpp b/extern/caelum/src/GroundFog.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/ImageStarfield.cpp b/extern/caelum/src/ImageStarfield.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/InternalUtilities.cpp b/extern/caelum/src/InternalUtilities.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/Moon.cpp b/extern/caelum/src/Moon.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/PointStarfield.cpp b/extern/caelum/src/PointStarfield.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/PrecipitationController.cpp b/extern/caelum/src/PrecipitationController.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/SkyDome.cpp b/extern/caelum/src/SkyDome.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/SkyLight.cpp b/extern/caelum/src/SkyLight.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/Sun.cpp b/extern/caelum/src/Sun.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/TypeDescriptor.cpp b/extern/caelum/src/TypeDescriptor.cpp old mode 100755 new mode 100644 diff --git a/extern/caelum/src/UniversalClock.cpp b/extern/caelum/src/UniversalClock.cpp old mode 100755 new mode 100644 diff --git a/libs/platform/strings.h b/libs/platform/strings.h index 1fb2822a6..0879ed87b 100644 --- a/libs/platform/strings.h +++ b/libs/platform/strings.h @@ -6,6 +6,8 @@ #pragma warning(disable: 4996) #define strcasecmp stricmp #define snprintf _snprintf +#else +#include #endif #endif