mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 15:19:42 +00:00
Merge pull request #109 from OpenMW/master
Add OpenMW changes up to 25 Nov
This commit is contained in:
commit
7bbeed629d
15 changed files with 100 additions and 60 deletions
|
@ -97,7 +97,7 @@ endif()
|
||||||
# Set up common paths
|
# Set up common paths
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(MORROWIND_DATA_FILES "./data" CACHE PATH "location of Morrowind data files")
|
set(MORROWIND_DATA_FILES "./data" CACHE PATH "location of Morrowind data files")
|
||||||
set(OPENMW_RESOURCE_FILES "./resources" CACHE PATH "location of OpenMW resources files")
|
set(OPENMW_RESOURCE_FILES "../Resources/resources" CACHE PATH "location of OpenMW resources files")
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
# Paths
|
# Paths
|
||||||
SET(BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Where to install binaries")
|
SET(BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Where to install binaries")
|
||||||
|
@ -297,6 +297,11 @@ endif (APPLE)
|
||||||
# Set up DEBUG define
|
# Set up DEBUG define
|
||||||
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_DEBUG DEBUG=1)
|
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_DEBUG DEBUG=1)
|
||||||
|
|
||||||
|
if (NOT APPLE)
|
||||||
|
set(OPENMW_MYGUI_FILES_ROOT ${OpenMW_BINARY_DIR})
|
||||||
|
set(OPENMW_SHADERS_ROOT ${OpenMW_BINARY_DIR})
|
||||||
|
endif ()
|
||||||
|
|
||||||
add_subdirectory(files/)
|
add_subdirectory(files/)
|
||||||
|
|
||||||
# Specify build paths
|
# Specify build paths
|
||||||
|
@ -324,11 +329,15 @@ configure_file(${OpenMW_SOURCE_DIR}/files/tes3mp/tes3mp-server-default.cfg
|
||||||
configure_file(${OpenMW_SOURCE_DIR}/files/settings-default.cfg
|
configure_file(${OpenMW_SOURCE_DIR}/files/settings-default.cfg
|
||||||
"${OpenMW_BINARY_DIR}/settings-default.cfg")
|
"${OpenMW_BINARY_DIR}/settings-default.cfg")
|
||||||
|
|
||||||
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local
|
if (NOT APPLE)
|
||||||
"${OpenMW_BINARY_DIR}/openmw.cfg")
|
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg.local
|
||||||
|
"${OpenMW_BINARY_DIR}/openmw.cfg")
|
||||||
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg
|
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg
|
||||||
"${OpenMW_BINARY_DIR}/openmw.cfg.install")
|
"${OpenMW_BINARY_DIR}/openmw.cfg.install")
|
||||||
|
else ()
|
||||||
|
configure_file(${OpenMW_SOURCE_DIR}/files/openmw.cfg
|
||||||
|
"${OpenMW_BINARY_DIR}/openmw.cfg")
|
||||||
|
endif ()
|
||||||
|
|
||||||
configure_file(${OpenMW_SOURCE_DIR}/files/openmw-cs.cfg
|
configure_file(${OpenMW_SOURCE_DIR}/files/openmw-cs.cfg
|
||||||
"${OpenMW_BINARY_DIR}/openmw-cs.cfg")
|
"${OpenMW_BINARY_DIR}/openmw-cs.cfg")
|
||||||
|
@ -743,14 +752,7 @@ if (APPLE)
|
||||||
configure_file("${QT_COCOA_PLUGIN_PATH}" "${OPENCS_BUNDLE_NAME}/Contents/MacOS/${QT_COCOA_PLUGIN_GROUP}/${QT_COCOA_PLUGIN_NAME}" COPYONLY)
|
configure_file("${QT_COCOA_PLUGIN_PATH}" "${OPENCS_BUNDLE_NAME}/Contents/MacOS/${QT_COCOA_PLUGIN_GROUP}/${QT_COCOA_PLUGIN_NAME}" COPYONLY)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(INSTALL_SUBDIR OpenMW)
|
install(DIRECTORY "${APP_BUNDLE_DIR}" USE_SOURCE_PERMISSIONS DESTINATION "." COMPONENT Runtime)
|
||||||
|
|
||||||
install(DIRECTORY "${APP_BUNDLE_DIR}" USE_SOURCE_PERMISSIONS DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
|
||||||
install(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" RENAME "openmw.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/gamecontrollerdb.txt" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
|
||||||
install(FILES "${OpenMW_BINARY_DIR}/openmw-cs.cfg" DESTINATION "${INSTALL_SUBDIR}" COMPONENT Runtime)
|
|
||||||
|
|
||||||
set(CPACK_GENERATOR "DragNDrop")
|
set(CPACK_GENERATOR "DragNDrop")
|
||||||
set(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
|
set(CPACK_PACKAGE_VERSION ${OPENMW_VERSION})
|
||||||
|
@ -758,8 +760,8 @@ if (APPLE)
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINOR})
|
set(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINOR})
|
||||||
set(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
|
set(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
|
||||||
|
|
||||||
set(INSTALLED_OPENMW_APP "\${CMAKE_INSTALL_PREFIX}/${INSTALL_SUBDIR}/${APP_BUNDLE_NAME}")
|
set(INSTALLED_OPENMW_APP "\${CMAKE_INSTALL_PREFIX}/${APP_BUNDLE_NAME}")
|
||||||
set(INSTALLED_OPENCS_APP "\${CMAKE_INSTALL_PREFIX}/${INSTALL_SUBDIR}/${OPENCS_BUNDLE_NAME}")
|
set(INSTALLED_OPENCS_APP "\${CMAKE_INSTALL_PREFIX}/${OPENCS_BUNDLE_NAME}")
|
||||||
|
|
||||||
install(CODE "
|
install(CODE "
|
||||||
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
||||||
|
@ -803,8 +805,8 @@ if (APPLE)
|
||||||
set(${plugins_var} ${PLUGINS} PARENT_SCOPE)
|
set(${plugins_var} ${PLUGINS} PARENT_SCOPE)
|
||||||
endfunction (install_plugins_for_bundle)
|
endfunction (install_plugins_for_bundle)
|
||||||
|
|
||||||
install_plugins_for_bundle("${INSTALL_SUBDIR}/${APP_BUNDLE_NAME}" PLUGINS)
|
install_plugins_for_bundle("${APP_BUNDLE_NAME}" PLUGINS)
|
||||||
install_plugins_for_bundle("${INSTALL_SUBDIR}/${OPENCS_BUNDLE_NAME}" OPENCS_PLUGINS)
|
install_plugins_for_bundle("${OPENCS_BUNDLE_NAME}" OPENCS_PLUGINS)
|
||||||
|
|
||||||
set(PLUGINS ${PLUGINS} "${INSTALLED_OPENMW_APP}/Contents/MacOS/${QT_COCOA_PLUGIN_GROUP}/${QT_COCOA_PLUGIN_NAME}")
|
set(PLUGINS ${PLUGINS} "${INSTALLED_OPENMW_APP}/Contents/MacOS/${QT_COCOA_PLUGIN_GROUP}/${QT_COCOA_PLUGIN_NAME}")
|
||||||
set(OPENCS_PLUGINS ${OPENCS_PLUGINS} "${INSTALLED_OPENCS_APP}/Contents/MacOS/${QT_COCOA_PLUGIN_GROUP}/${QT_COCOA_PLUGIN_NAME}")
|
set(OPENCS_PLUGINS ${OPENCS_PLUGINS} "${INSTALLED_OPENCS_APP}/Contents/MacOS/${QT_COCOA_PLUGIN_GROUP}/${QT_COCOA_PLUGIN_NAME}")
|
||||||
|
|
|
@ -35,14 +35,6 @@ int main(int argc, char *argv[])
|
||||||
// Now we make sure the current dir is set to application path
|
// Now we make sure the current dir is set to application path
|
||||||
QDir dir(QCoreApplication::applicationDirPath());
|
QDir dir(QCoreApplication::applicationDirPath());
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
if (dir.dirName() == "MacOS") {
|
|
||||||
dir.cdUp();
|
|
||||||
dir.cdUp();
|
|
||||||
dir.cdUp();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QDir::setCurrent(dir.absolutePath());
|
QDir::setCurrent(dir.absolutePath());
|
||||||
|
|
||||||
Launcher::MainDialog mainWin;
|
Launcher::MainDialog mainWin;
|
||||||
|
|
|
@ -162,9 +162,15 @@ endif()
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set (OPENCS_MAC_ICON ${CMAKE_SOURCE_DIR}/files/mac/openmw-cs.icns)
|
set (OPENCS_MAC_ICON "${CMAKE_SOURCE_DIR}/files/mac/openmw-cs.icns")
|
||||||
|
set (OPENCS_CFG "${OpenMW_BINARY_DIR}/openmw-cs.cfg")
|
||||||
|
set (OPENCS_DEFAULT_FILTERS_FILE "${OpenMW_BINARY_DIR}/resources/defaultfilters")
|
||||||
|
set (OPENCS_OPENMW_CFG "${OpenMW_BINARY_DIR}/openmw.cfg")
|
||||||
else()
|
else()
|
||||||
set (OPENCS_MAC_ICON "")
|
set (OPENCS_MAC_ICON "")
|
||||||
|
set (OPENCS_CFG "")
|
||||||
|
set (OPENCS_DEFAULT_FILTERS_FILE "")
|
||||||
|
set (OPENCS_OPENMW_CFG "")
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
add_executable(openmw-cs
|
add_executable(openmw-cs
|
||||||
|
@ -174,12 +180,23 @@ add_executable(openmw-cs
|
||||||
${OPENCS_MOC_SRC}
|
${OPENCS_MOC_SRC}
|
||||||
${OPENCS_RES_SRC}
|
${OPENCS_RES_SRC}
|
||||||
${OPENCS_MAC_ICON}
|
${OPENCS_MAC_ICON}
|
||||||
|
${OPENCS_CFG}
|
||||||
|
${OPENCS_DEFAULT_FILTERS_FILE}
|
||||||
|
${OPENCS_OPENMW_CFG}
|
||||||
)
|
)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
set(OPENCS_BUNDLE_NAME "OpenMW-CS")
|
||||||
|
set(OPENCS_BUNDLE_RESOURCES_DIR "${OpenMW_BINARY_DIR}/${OPENCS_BUNDLE_NAME}.app/Contents/Resources")
|
||||||
|
|
||||||
|
set(OPENMW_MYGUI_FILES_ROOT ${OPENCS_BUNDLE_RESOURCES_DIR})
|
||||||
|
set(OPENMW_SHADERS_ROOT ${OPENCS_BUNDLE_RESOURCES_DIR})
|
||||||
|
|
||||||
|
add_subdirectory(../../files/ ${CMAKE_CURRENT_BINARY_DIR}/files)
|
||||||
|
|
||||||
set_target_properties(openmw-cs PROPERTIES
|
set_target_properties(openmw-cs PROPERTIES
|
||||||
RUNTIME_OUTPUT_DIRECTORY "${OpenMW_BINARY_DIR}"
|
RUNTIME_OUTPUT_DIRECTORY "${OpenMW_BINARY_DIR}"
|
||||||
OUTPUT_NAME "OpenMW-CS"
|
OUTPUT_NAME ${OPENCS_BUNDLE_NAME}
|
||||||
MACOSX_BUNDLE_ICON_FILE "openmw-cs.icns"
|
MACOSX_BUNDLE_ICON_FILE "openmw-cs.icns"
|
||||||
MACOSX_BUNDLE_BUNDLE_NAME "OpenCS"
|
MACOSX_BUNDLE_BUNDLE_NAME "OpenCS"
|
||||||
MACOSX_BUNDLE_GUI_IDENTIFIER "org.openmw.opencs"
|
MACOSX_BUNDLE_GUI_IDENTIFIER "org.openmw.opencs"
|
||||||
|
@ -190,6 +207,16 @@ if(APPLE)
|
||||||
|
|
||||||
set_source_files_properties(${OPENCS_MAC_ICON} PROPERTIES
|
set_source_files_properties(${OPENCS_MAC_ICON} PROPERTIES
|
||||||
MACOSX_PACKAGE_LOCATION Resources)
|
MACOSX_PACKAGE_LOCATION Resources)
|
||||||
|
set_source_files_properties(${OPENCS_CFG} PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources)
|
||||||
|
set_source_files_properties(${OPENCS_DEFAULT_FILTERS_FILE} PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources/resources)
|
||||||
|
set_source_files_properties(${OPENCS_OPENMW_CFG} PROPERTIES
|
||||||
|
MACOSX_PACKAGE_LOCATION Resources)
|
||||||
|
|
||||||
|
add_custom_command(TARGET openmw-cs
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND cp "${OpenMW_BINARY_DIR}/resources/version" "${OPENCS_BUNDLE_RESOURCES_DIR}/resources")
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
target_link_libraries(openmw-cs
|
target_link_libraries(openmw-cs
|
||||||
|
@ -236,5 +263,5 @@ endif (MSVC)
|
||||||
|
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
INSTALL(TARGETS openmw-cs BUNDLE DESTINATION OpenMW COMPONENT BUNDLE)
|
INSTALL(TARGETS openmw-cs BUNDLE DESTINATION "." COMPONENT BUNDLE)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -62,11 +62,6 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
QDir dir(QCoreApplication::applicationDirPath());
|
QDir dir(QCoreApplication::applicationDirPath());
|
||||||
if (dir.dirName() == "MacOS") {
|
|
||||||
dir.cdUp();
|
|
||||||
dir.cdUp();
|
|
||||||
dir.cdUp();
|
|
||||||
}
|
|
||||||
QDir::setCurrent(dir.absolutePath());
|
QDir::setCurrent(dir.absolutePath());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -182,6 +182,21 @@ target_link_libraries(tes3mp ${CMAKE_THREAD_LIBS_INIT})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
set(BUNDLE_RESOURCES_DIR "${APP_BUNDLE_DIR}/Contents/Resources")
|
||||||
|
|
||||||
|
set(OPENMW_MYGUI_FILES_ROOT ${BUNDLE_RESOURCES_DIR})
|
||||||
|
set(OPENMW_SHADERS_ROOT ${BUNDLE_RESOURCES_DIR})
|
||||||
|
|
||||||
|
add_subdirectory(../../files/ ${CMAKE_CURRENT_BINARY_DIR}/files)
|
||||||
|
|
||||||
|
configure_file("${OpenMW_BINARY_DIR}/settings-default.cfg" ${BUNDLE_RESOURCES_DIR} COPYONLY)
|
||||||
|
configure_file("${OpenMW_BINARY_DIR}/openmw.cfg" ${BUNDLE_RESOURCES_DIR} COPYONLY)
|
||||||
|
configure_file("${OpenMW_BINARY_DIR}/gamecontrollerdb.txt" ${BUNDLE_RESOURCES_DIR} COPYONLY)
|
||||||
|
|
||||||
|
add_custom_command(TARGET openmw
|
||||||
|
POST_BUILD
|
||||||
|
COMMAND cp "${OpenMW_BINARY_DIR}/resources/version" "${BUNDLE_RESOURCES_DIR}/resources")
|
||||||
|
|
||||||
find_library(COCOA_FRAMEWORK Cocoa)
|
find_library(COCOA_FRAMEWORK Cocoa)
|
||||||
find_library(IOKIT_FRAMEWORK IOKit)
|
find_library(IOKIT_FRAMEWORK IOKit)
|
||||||
target_link_libraries(tes3mp ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK})
|
target_link_libraries(tes3mp ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK})
|
||||||
|
|
|
@ -359,9 +359,8 @@ int main(int argc, char**argv)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// FIXME: set current dir to bundle path
|
boost::filesystem::path binary_path = boost::filesystem::system_complete(boost::filesystem::path(argv[0]));
|
||||||
//boost::filesystem::path bundlePath = boost::filesystem::path(Ogre::macBundlePath()).parent_path();
|
boost::filesystem::current_path(binary_path.parent_path());
|
||||||
//boost::filesystem::current_path(bundlePath);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
engine.reset(new OMW::Engine(cfgMgr));
|
engine.reset(new OMW::Engine(cfgMgr));
|
||||||
|
|
|
@ -1536,27 +1536,23 @@ namespace MWMechanics
|
||||||
player->restoreSkillsAttributes();
|
player->restoreSkillsAttributes();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Equipped items other than WerewolfRobe may reference bones that do not even
|
|
||||||
// exist with the werewolf object root, so make sure to unequip all items
|
|
||||||
// *before* we become a werewolf.
|
|
||||||
MWWorld::InventoryStore& invStore = actor.getClass().getInventoryStore(actor);
|
|
||||||
invStore.unequipAll(actor);
|
|
||||||
|
|
||||||
// Werewolfs can not cast spells, so we need to unset the prepared spell if there is one.
|
// Werewolfs can not cast spells, so we need to unset the prepared spell if there is one.
|
||||||
if (npcStats.getDrawState() == MWMechanics::DrawState_Spell)
|
if (npcStats.getDrawState() == MWMechanics::DrawState_Spell)
|
||||||
npcStats.setDrawState(MWMechanics::DrawState_Nothing);
|
npcStats.setDrawState(MWMechanics::DrawState_Nothing);
|
||||||
|
|
||||||
npcStats.setWerewolf(werewolf);
|
npcStats.setWerewolf(werewolf);
|
||||||
|
|
||||||
|
MWWorld::InventoryStore &inv = actor.getClass().getInventoryStore(actor);
|
||||||
|
|
||||||
if(werewolf)
|
if(werewolf)
|
||||||
{
|
{
|
||||||
MWWorld::InventoryStore &inv = actor.getClass().getInventoryStore(actor);
|
inv.unequipAll(actor);
|
||||||
|
|
||||||
inv.equip(MWWorld::InventoryStore::Slot_Robe, inv.ContainerStore::add("werewolfrobe", 1, actor), actor);
|
inv.equip(MWWorld::InventoryStore::Slot_Robe, inv.ContainerStore::add("werewolfrobe", 1, actor), actor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
actor.getClass().getContainerStore(actor).remove("werewolfrobe", 1, actor);
|
inv.unequipSlot(MWWorld::InventoryStore::Slot_Robe, actor);
|
||||||
|
inv.ContainerStore::remove("werewolfrobe", 1, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(actor == player->getPlayer())
|
if(actor == player->getPlayer())
|
||||||
|
|
|
@ -553,14 +553,14 @@ void MWWorld::ContainerStore::restock (const ESM::InventoryList& items, const MW
|
||||||
if(listInMap != allowedForReplace.end())
|
if(listInMap != allowedForReplace.end())
|
||||||
restockNum -= std::min(restockNum, listInMap->second);
|
restockNum -= std::min(restockNum, listInMap->second);
|
||||||
//restock
|
//restock
|
||||||
addInitialItem(itemOrList, owner, restockNum, true);
|
addInitialItem(itemOrList, owner, -restockNum, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Restocking static item - just restock to the max count
|
//Restocking static item - just restock to the max count
|
||||||
int currentCount = count(itemOrList);
|
int currentCount = count(itemOrList);
|
||||||
if (currentCount < std::abs(it->mCount))
|
if (currentCount < std::abs(it->mCount))
|
||||||
addInitialItem(itemOrList, owner, std::abs(it->mCount) - currentCount, true);
|
addInitialItem(itemOrList, owner, -(std::abs(it->mCount) - currentCount), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
flagAsModified();
|
flagAsModified();
|
||||||
|
|
|
@ -369,7 +369,7 @@ namespace MWWorld
|
||||||
|
|
||||||
// Try to get a Ptr to the bow that was used. It might no longer exist.
|
// Try to get a Ptr to the bow that was used. It might no longer exist.
|
||||||
MWWorld::Ptr bow = projectileRef.getPtr();
|
MWWorld::Ptr bow = projectileRef.getPtr();
|
||||||
if (!caster.isEmpty())
|
if (!caster.isEmpty() && it->mIdArrow != it->mBowId)
|
||||||
{
|
{
|
||||||
MWWorld::InventoryStore& inv = caster.getClass().getInventoryStore(caster);
|
MWWorld::InventoryStore& inv = caster.getClass().getInventoryStore(caster);
|
||||||
MWWorld::ContainerStoreIterator invIt = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
MWWorld::ContainerStoreIterator invIt = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
||||||
|
|
|
@ -20,12 +20,6 @@ int main(int argc, char *argv[])
|
||||||
QDir dir(QCoreApplication::applicationDirPath());
|
QDir dir(QCoreApplication::applicationDirPath());
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
if (dir.dirName() == "MacOS") {
|
|
||||||
dir.cdUp();
|
|
||||||
dir.cdUp();
|
|
||||||
dir.cdUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
// force Qt to load only LOCAL plugins, don't touch system Qt installation
|
// force Qt to load only LOCAL plugins, don't touch system Qt installation
|
||||||
QDir pluginsPath(QCoreApplication::applicationDirPath());
|
QDir pluginsPath(QCoreApplication::applicationDirPath());
|
||||||
pluginsPath.cdUp();
|
pluginsPath.cdUp();
|
||||||
|
|
|
@ -21,7 +21,18 @@ namespace ESM
|
||||||
anim.mGroup = esm.getHString();
|
anim.mGroup = esm.getHString();
|
||||||
esm.getHNOT(anim.mTime, "TIME");
|
esm.getHNOT(anim.mTime, "TIME");
|
||||||
esm.getHNOT(anim.mAbsolute, "ABST");
|
esm.getHNOT(anim.mAbsolute, "ABST");
|
||||||
esm.getHNT(anim.mLoopCount, "COUN");
|
|
||||||
|
esm.getSubNameIs("COUN");
|
||||||
|
// workaround bug in earlier version where size_t was used
|
||||||
|
esm.getSubHeader();
|
||||||
|
if (esm.getSubSize() == 8)
|
||||||
|
esm.getT(anim.mLoopCount);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uint32_t loopcount;
|
||||||
|
esm.getT(loopcount);
|
||||||
|
anim.mLoopCount = (uint64_t) loopcount;
|
||||||
|
}
|
||||||
|
|
||||||
mScriptedAnims.push_back(anim);
|
mScriptedAnims.push_back(anim);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
{
|
{
|
||||||
|
@ -20,7 +21,7 @@ namespace ESM
|
||||||
std::string mGroup;
|
std::string mGroup;
|
||||||
float mTime;
|
float mTime;
|
||||||
bool mAbsolute;
|
bool mAbsolute;
|
||||||
size_t mLoopCount;
|
uint64_t mLoopCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector<ScriptedAnimation> ScriptedAnimations;
|
typedef std::vector<ScriptedAnimation> ScriptedAnimations;
|
||||||
|
|
|
@ -68,7 +68,7 @@ boost::filesystem::path MacOsPath::getCachePath() const
|
||||||
|
|
||||||
boost::filesystem::path MacOsPath::getLocalPath() const
|
boost::filesystem::path MacOsPath::getLocalPath() const
|
||||||
{
|
{
|
||||||
return boost::filesystem::path("./");
|
return boost::filesystem::path("../Resources/");
|
||||||
}
|
}
|
||||||
|
|
||||||
boost::filesystem::path MacOsPath::getGlobalDataPath() const
|
boost::filesystem::path MacOsPath::getGlobalDataPath() const
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
|
if (NOT DEFINED OPENMW_MYGUI_FILES_ROOT)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Copy resource files into the build directory
|
# Copy resource files into the build directory
|
||||||
set(SDIR ${CMAKE_CURRENT_SOURCE_DIR})
|
set(SDIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
set(DDIR ${OpenMW_BINARY_DIR}/resources/mygui)
|
set(DDIR ${OPENMW_MYGUI_FILES_ROOT}/resources/mygui)
|
||||||
|
|
||||||
set(MYGUI_FILES
|
set(MYGUI_FILES
|
||||||
core.skin
|
core.skin
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
|
if (NOT DEFINED OPENMW_SHADERS_ROOT)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Copy resource files into the build directory
|
# Copy resource files into the build directory
|
||||||
set(SDIR ${CMAKE_CURRENT_SOURCE_DIR})
|
set(SDIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
set(DDIR ${OpenMW_BINARY_DIR}/resources/shaders)
|
set(DDIR ${OPENMW_SHADERS_ROOT}/resources/shaders)
|
||||||
|
|
||||||
set(SHADER_FILES
|
set(SHADER_FILES
|
||||||
water_vertex.glsl
|
water_vertex.glsl
|
||||||
|
|
Loading…
Reference in a new issue