Merge pull request #183 from OpenMW/master while resolving conflicts

# Conflicts:
#	.travis.yml
#	CMakeLists.txt
pull/183/merge
David Cernat 8 years ago
commit e0234dc362

@ -12,8 +12,8 @@ branches:
- /openmw-.*$/
env:
global:
- macos_qt_formula=qt@5.5
- secure: NZmvVuA0O9NJXVQ12tXQZHDJC2mbFgYNFcsicw0DgW1It2Nk5hxIkF0pfu4/Z59mhQuOPgRVjl5b0FKy2Axh0gkWc1DJEXGwNaiW5lpTMNWR1LJG5rxa8LrDUpFkycpbzfAFuTUZu5z3iYVv64XzELvBuqNGhPMu1LeBnrlech0jFNjkR9p5qtJGWb8zYcPMCC57rig8a9g1ABoVYS6UXjrKpx0946ZLRsE5ukc9pXsypGwPmOMyfzZkxxzIqFaxoE5JIEdaJTWba/6Za315ozYYIi/N35ROI1YAv5GHRe/Iw9XAa4vQpbDzjM7ZSsZdTvvQsSU598gD2xC6jFUKSrpW6GZKwM2x236fZLGnOk5Uw7DUbG+AwpcEmxBwoy9PjBl9ZF3tJykI0gROewCy8MODhdsVMKr1HGIMVBIJySm/RnNqtoDbYV8mYnSl5b8rwJiCajoiR8Zuv4CIfGneeH1a3DOQDPH/qkDsU6ilzF4ANsBlMUUpgY653KBMBmTlNuVZSH527tnD7Fg6JgHVuSQkTbRa1vSkR7Zcre604RZcAoaEdbX3bhVDasPPghU/I742L0RH3oQNlR09pPBDZ8kG7ydl4aPHwpCWnvXNM1vgxtGvnYLztwrse7IoaRXRYiMFmrso78WhMWUDKgvY4wV9aeUu0DtnMezZVIQwCKg=
- macos_qt_formula=qt@5.5
addons:
apt:
sources:

@ -102,6 +102,7 @@ Programmers
Michał Moroz (dragonee)
Miroslav Puda (pakanek)
MiroslavR
Mitchell Schwitzer (schwitzerm)
naclander
Narmo
Nathan Jeffords (blunted2night)

@ -7,5 +7,5 @@ brew rm pkgconfig || true
brew rm qt5 || true
brew install cmake pkgconfig $macos_qt_formula
curl https://downloads.openmw.org/osx/dependencies/openmw-deps-0ecece4.zip -o ~/openmw-deps.zip
curl https://downloads.openmw.org/osx/dependencies/openmw-deps-c79172d.zip -o ~/openmw-deps.zip
unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null

@ -13,7 +13,7 @@ cmake \
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.8" \
-D CMAKE_OSX_SYSROOT="macosx10.12" \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_BUILD_TYPE=Release \
-D OPENMW_OSX_DEPLOYMENT=TRUE \
-D DESIRED_QT_VERSION=5 \
-D BUILD_ESMTOOL=FALSE \

@ -0,0 +1,9 @@
#!/bin/sh
cd build
DATE=`date +'%d%m%Y'`
SHORT_COMMIT=`git rev-parse --short ${TRAVIS_COMMIT}`
TARGET_FILENAME="OpenMW-${DATE}-${SHORT_COMMIT}.dmg"
curl --ssl --ftp-create-dirs -T *.dmg -u $OSX_FTP_USER:$OSX_FTP_PASSWORD "ftp://s3.mydevil.net:21/nightly/${TARGET_FILENAME}"

@ -35,18 +35,14 @@ set(OPENMW_VERSION "${OPENMW_VERSION_MAJOR}.${OPENMW_VERSION_MINOR}.${OPENMW_VER
set(GIT_CHECKOUT FALSE)
if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
find_package(Git)
if(GIT_FOUND)
set(GIT_CHECKOUT TRUE)
else(GIT_FOUND)
message(WARNING "Git executable not found")
endif(GIT_FOUND)
else(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
message(STATUS "Shallow Git clone detected, not attempting to retrieve version info")
endif(NOT EXISTS ${PROJECT_SOURCE_DIR}/.git/shallow)
endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
find_package(Git)
if(GIT_FOUND)
set(GIT_CHECKOUT TRUE)
else(GIT_FOUND)
message(WARNING "Git executable not found")
endif(GIT_FOUND)
endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
# Macros
include(OpenMWMacros)

@ -122,7 +122,7 @@ namespace MWGui
if (!iter->isEmpty())
{
mApparatus.at (index)->setUserString ("ToolTipType", "ItemPtr");
mApparatus.at (index)->setUserData (*iter);
mApparatus.at (index)->setUserData (MWWorld::Ptr(*iter));
}
}
@ -190,9 +190,9 @@ namespace MWGui
continue;
ingredient->setUserString("ToolTipType", "ItemPtr");
ingredient->setUserData(item);
ingredient->setUserData(MWWorld::Ptr(item));
ingredient->setCount(ingredient->getUserData<MWWorld::Ptr>()->getRefData().getCount());
ingredient->setCount(item.getRefData().getCount());
}
mItemView->update();

@ -79,7 +79,7 @@ namespace MWGui
{
mSoulBox->setItem(gem);
mSoulBox->setUserString ("ToolTipType", "ItemPtr");
mSoulBox->setUserData(gem);
mSoulBox->setUserData(MWWorld::Ptr(gem));
mEnchanting.setSoulGem(gem);
}
}
@ -97,7 +97,7 @@ namespace MWGui
mName->setCaption(item.getClass().getName(item));
mItemBox->setItem(item);
mItemBox->setUserString ("ToolTipType", "ItemPtr");
mItemBox->setUserData(item);
mItemBox->setUserData(MWWorld::Ptr(item));
mEnchanting.setOldItem(item);
}
}

@ -479,7 +479,7 @@ namespace MWGui
mSpellStatus->setProgressPosition(chargePercent);
mSpellBox->setUserString("ToolTipType", "ItemPtr");
mSpellBox->setUserData(item);
mSpellBox->setUserData(MWWorld::Ptr(item));
mSpellImage->setItem(item);
}
@ -497,7 +497,7 @@ namespace MWGui
mWeapBox->clearUserStrings();
mWeapBox->setUserString("ToolTipType", "ItemPtr");
mWeapBox->setUserData(item);
mWeapBox->setUserData(MWWorld::Ptr(item));
mWeapStatus->setProgressRange(100);
mWeapStatus->setProgressPosition(durabilityPercent);

@ -97,7 +97,7 @@ namespace MWGui
line.mIcon = mScrollView->createWidget<ItemWidget>("MW_ItemIconSmall", MyGUI::IntCoord(), MyGUI::Align::Default);
line.mIcon->setItem(line.mItemPtr);
line.mIcon->setUserString("ToolTipType", "ItemPtr");
line.mIcon->setUserData(line.mItemPtr);
line.mIcon->setUserData(MWWorld::Ptr(line.mItemPtr));
line.mIcon->eventMouseButtonClick += MyGUI::newDelegate(this, &ItemChargeView::onIconClicked);
line.mIcon->eventMouseWheel += MyGUI::newDelegate(this, &ItemChargeView::onMouseWheelMoved);

@ -44,10 +44,9 @@ void MerchantRepair::startRepair(const MWWorld::Ptr &actor)
MWWorld::Ptr player = MWMechanics::getPlayer();
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
const MWWorld::ContainerStore& store = player.getClass().getContainerStore(player);
MWWorld::ContainerStore& store = player.getClass().getContainerStore(player);
int categories = MWWorld::ContainerStore::Type_Weapon | MWWorld::ContainerStore::Type_Armor;
for (MWWorld::ConstContainerStoreIterator iter (store.cbegin(categories));
iter!=store.cend(); ++iter)
for (MWWorld::ContainerStoreIterator iter (store.begin(categories)); iter!=store.end(); ++iter)
{
if (iter->getClass().hasItemHealth(*iter))
{
@ -87,7 +86,7 @@ void MerchantRepair::startRepair(const MWWorld::Ptr &actor)
currentY += 18;
button->setUserString("Price", MyGUI::utility::toString(price));
button->setUserData(*iter);
button->setUserData(MWWorld::Ptr(*iter));
button->setCaptionWithReplacing(name);
button->setSize(button->getTextSize().width,18);
button->eventMouseWheel += MyGUI::newDelegate(this, &MerchantRepair::onMouseWheel);

@ -185,7 +185,7 @@ namespace MWGui
button->setItem(item, ItemWidget::Barter);
button->setUserString ("ToolTipType", "ItemPtr");
button->setUserData(item);
button->setUserData(MWWorld::Ptr(item));
if (mItemSelectionDialog)
mItemSelectionDialog->setVisible(false);
@ -209,7 +209,7 @@ namespace MWGui
button->setIcon(item);
button->setUserString ("ToolTipType", "ItemPtr");
button->setUserData(item);
button->setUserData(MWWorld::Ptr(item));
if (mMagicSelectionDialog)
mMagicSelectionDialog->setVisible(false);
@ -278,7 +278,7 @@ namespace MWGui
if (Misc::StringUtils::ciEqual(it->getCellRef().getRefId(), id))
{
item = *it;
button->setUserData(item);
button->setUserData(MWWorld::Ptr(item));
break;
}
}

@ -68,7 +68,7 @@ void Recharge::start (const MWWorld::Ptr &item)
{
mGemIcon->setItem(item);
mGemIcon->setUserString("ToolTipType", "ItemPtr");
mGemIcon->setUserData(item);
mGemIcon->setUserData(MWWorld::Ptr(item));
updateView();
}

@ -66,7 +66,7 @@ void Repair::startRepairItem(const MWWorld::Ptr &item)
mToolIcon->setItem(item);
mToolIcon->setUserString("ToolTipType", "ItemPtr");
mToolIcon->setUserData(item);
mToolIcon->setUserData(MWWorld::Ptr(item));
updateRepairView();
}

@ -278,7 +278,7 @@ namespace MWGui
{
if (spell.mType == Spell::Type_EnchantedItem)
{
widget->setUserData(spell.mItem);
widget->setUserData(MWWorld::Ptr(spell.mItem));
widget->setUserString("ToolTipType", "ItemPtr");
}
else

@ -238,7 +238,30 @@ namespace MWGui
}
if (value.getBase() < 100)
{
nameWidget->setUserString("Visible_SkillMaxed", "false");
nameWidget->setUserString("UserData^Hidden_SkillMaxed", "true");
nameWidget->setUserString("Visible_SkillProgressVBox", "true");
nameWidget->setUserString("UserData^Hidden_SkillProgressVBox", "false");
valueWidget->setUserString("Visible_SkillMaxed", "false");
valueWidget->setUserString("UserData^Hidden_SkillMaxed", "true");
valueWidget->setUserString("Visible_SkillProgressVBox", "true");
valueWidget->setUserString("UserData^Hidden_SkillProgressVBox", "false");
setSkillProgress(nameWidget, value.getProgress(), parSkill);
setSkillProgress(valueWidget, value.getProgress(), parSkill);
} else {
nameWidget->setUserString("Visible_SkillMaxed", "true");
nameWidget->setUserString("UserData^Hidden_SkillMaxed", "false");
nameWidget->setUserString("Visible_SkillProgressVBox", "false");
nameWidget->setUserString("UserData^Hidden_SkillProgressVBox", "true");
valueWidget->setUserString("Visible_SkillMaxed", "true");
valueWidget->setUserString("UserData^Hidden_SkillMaxed", "false");
valueWidget->setUserString("Visible_SkillProgressVBox", "false");
valueWidget->setUserString("UserData^Hidden_SkillProgressVBox", "true");
}
}
}

@ -16,6 +16,9 @@
#include "../mwbase/soundmanager.hpp"
#include "../mwbase/windowmanager.hpp"
#include "../mwworld/inventorystore.hpp"
#include "../mwworld/class.hpp"
#include "interpretercontext.hpp"
#include "ref.hpp"
@ -205,8 +208,22 @@ namespace MWScript
int index = runtime[0].mInteger;
runtime.pop();
runtime.push (MWBase::Environment::get().getSoundManager()->getSoundPlaying (
ptr, runtime.getStringLiteral (index)));
bool ret = MWBase::Environment::get().getSoundManager()->getSoundPlaying (
ptr, runtime.getStringLiteral (index));
// GetSoundPlaying called on an equipped item should also look for sounds played by the equipping actor.
if (!ret && ptr.getContainerStore())
{
MWWorld::Ptr cont = MWBase::Environment::get().getWorld()->findContainer(ptr);
if (!cont.isEmpty() && cont.getClass().hasInventoryStore(cont) && cont.getClass().getInventoryStore(cont).isEquipped(ptr))
{
ret = MWBase::Environment::get().getSoundManager()->getSoundPlaying (
cont, runtime.getStringLiteral (index));
}
}
runtime.push(ret);
}
};

@ -629,7 +629,7 @@ void MWWorld::InventoryStore::flagAsModified()
mRechargingItemsUpToDate = false;
}
bool MWWorld::InventoryStore::stacks(const ConstPtr& ptr1, const ConstPtr& ptr2)
bool MWWorld::InventoryStore::stacks(const ConstPtr& ptr1, const ConstPtr& ptr2) const
{
bool canStack = MWWorld::ContainerStore::stacks(ptr1, ptr2);
if (!canStack)

@ -174,7 +174,7 @@ namespace MWWorld
///< \attention This function is internal to the world model and should not be called from
/// outside.
virtual bool stacks (const ConstPtr& ptr1, const ConstPtr& ptr2);
virtual bool stacks (const ConstPtr& ptr1, const ConstPtr& ptr2) const;
///< @return true if the two specified objects can stack with each other
virtual int remove(const Ptr& item, int count, const Ptr& actor);

@ -3,7 +3,8 @@ execute_process (
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE EXITCODE1
OUTPUT_VARIABLE TAGHASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
execute_process (
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
@ -12,13 +13,17 @@ execute_process (
OUTPUT_VARIABLE COMMITHASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
string (COMPARE EQUAL "${EXITCODE1}:${EXITCODE2}" "0:0" SUCCESS)
if (SUCCESS)
string (COMPARE EQUAL "${EXITCODE1}:${EXITCODE2}" "0:0" FULL_SUCCESS)
string (COMPARE EQUAL "${EXITCODE2}" "0" COMMIT_SUCCESS)
if (FULL_SUCCESS)
set(OPENMW_VERSION_COMMITHASH "${COMMITHASH}")
set(OPENMW_VERSION_TAGHASH "${TAGHASH}")
message(STATUS "OpenMW version ${OPENMW_VERSION}")
else (SUCCESS)
elseif (COMMIT_SUCCESS)
set(OPENMW_VERSION_COMMITHASH "${COMMITHASH}")
message(STATUS "OpenMW version ${OPENMW_VERSION}")
else ()
message(WARNING "Failed to get valid version information from Git")
endif (SUCCESS)
endif ()
configure_file(${VERSION_IN_FILE} ${VERSION_FILE})

@ -49,7 +49,7 @@ namespace Resource
return static_cast<NifFileHolder*>(obj.get())->mNifFile;
else
{
Nif::NIFFilePtr file (new Nif::NIFFile(mVFS->getNormalized(name), name));
Nif::NIFFilePtr file (new Nif::NIFFile(mVFS->get(name), name));
obj = new NifFileHolder(file);
mCache->addEntryToObjectCache(name, obj);
return file;

@ -127,8 +127,6 @@ void Skeleton::updateBoneMatrices(unsigned int traversalNumber)
for (unsigned int i=0; i<mRootBone->mChildren.size(); ++i)
mRootBone->mChildren[i]->update(NULL);
}
else
std::cerr << "Error: no root bone" << std::endl;
mNeedToUpdateBoneMatrices = false;
}

@ -87,18 +87,24 @@ InputWrapper::InputWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> v
break;
case SDL_KEYDOWN:
if (!evt.key.repeat)
{
mKeyboardListener->keyPressed(evt.key);
if (evt.key.keysym.sym >= SDLK_F1 && evt.key.keysym.sym <= SDLK_F12)
mViewer->getEventQueue()->keyPress(osgGA::GUIEventAdapter::KEY_F1 + (evt.key.keysym.sym - SDLK_F1));
if (!isModifierHeld(KMOD_ALT) && evt.key.keysym.sym >= SDLK_F1 && evt.key.keysym.sym <= SDLK_F12)
{
mViewer->getEventQueue()->keyPress(osgGA::GUIEventAdapter::KEY_F1 + (evt.key.keysym.sym - SDLK_F1));
}
}
break;
case SDL_KEYUP:
if (!evt.key.repeat)
{
mKeyboardListener->keyReleased(evt.key);
if (evt.key.keysym.sym >= SDLK_F1 && evt.key.keysym.sym <= SDLK_F12)
mViewer->getEventQueue()->keyRelease(osgGA::GUIEventAdapter::KEY_F1 + (evt.key.keysym.sym - SDLK_F1));
if (!isModifierHeld(KMOD_ALT) && evt.key.keysym.sym >= SDLK_F1 && evt.key.keysym.sym <= SDLK_F12)
mViewer->getEventQueue()->keyRelease(osgGA::GUIEventAdapter::KEY_F1 + (evt.key.keysym.sym - SDLK_F1));
}
break;
case SDL_TEXTEDITING:
@ -225,7 +231,7 @@ InputWrapper::InputWrapper(SDL_Window* window, osg::ref_ptr<osgViewer::Viewer> v
}
}
bool InputWrapper::isModifierHeld(SDL_Keymod mod)
bool InputWrapper::isModifierHeld(int mod)
{
return (SDL_GetModState() & mod) != 0;
}

@ -31,7 +31,7 @@ namespace SDLUtil
void setControllerEventCallback(ControllerListener* listen) { mConListener = listen; }
void capture(bool windowEventsOnly);
bool isModifierHeld(SDL_Keymod mod);
bool isModifierHeld(int mod);
bool isKeyDown(SDL_Scancode key);
void setMouseVisible (bool visible);

@ -23,8 +23,7 @@ std::string Version::describe()
{
std::string str = "OpenMW version " + mVersion;
std::string rev = mCommitHash;
std::string tag = mTagHash;
if (!rev.empty() && !tag.empty())
if (!rev.empty())
{
rev = rev.substr(0, 10);
str += "\nRevision: " + rev;

Loading…
Cancel
Save