mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Merge remote-tracking branch 'upstream/master' into enable-unbounded-disposition-check
This commit is contained in:
commit
9585a12fb1
6 changed files with 94 additions and 50 deletions
|
@ -1,6 +1,7 @@
|
|||
os:
|
||||
- linux
|
||||
# - osx
|
||||
- osx
|
||||
osx_image: xcode7.2
|
||||
language: cpp
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
export CXX=clang++
|
||||
export CC=clang
|
||||
|
||||
brew tap openmw/openmw
|
||||
brew update
|
||||
brew unlink boost
|
||||
brew install openmw-mygui openmw-bullet openmw-sdl2 openmw-ffmpeg openmw/openmw/qt unshield
|
||||
brew rm cmake || true
|
||||
brew rm pkgconfig || true
|
||||
brew rm qt5 || true
|
||||
brew install cmake pkgconfig qt5
|
||||
|
||||
curl http://downloads.openmw.org/osx/dependencies/openmw-deps-263d4a8.zip -o ~/openmw-deps.zip
|
||||
unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null
|
||||
|
|
|
@ -1,5 +1,25 @@
|
|||
#!/bin/sh
|
||||
|
||||
export CXX=clang++
|
||||
export CC=clang
|
||||
|
||||
DEPENDENCIES_ROOT="/private/tmp/openmw-deps/openmw-deps"
|
||||
QT_PATH="/usr/local/opt/qt5"
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_FRAMEWORK_PATH="/usr/local/lib/macosx/Release" -DCMAKE_EXE_LINKER_FLAGS="-F/usr/local/lib/macosx/Release" -DCMAKE_CXX_FLAGS="-stdlib=libstdc++" -DCMAKE_BUILD_TYPE=Debug -DBUILD_MYGUI_PLUGIN=OFF -G"Unix Makefiles" ..
|
||||
|
||||
cmake \
|
||||
-D PKG_CONFIG_USE_CMAKE_PREFIX_PATH=ON \
|
||||
-D CMAKE_EXE_LINKER_FLAGS="-lz" \
|
||||
-D CMAKE_PREFIX_PATH="$DEPENDENCIES_ROOT;$QT_PATH" \
|
||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.8" \
|
||||
-D CMAKE_OSX_SYSROOT="macosx10.11" \
|
||||
-D CMAKE_BUILD_TYPE=Debug \
|
||||
-D OPENMW_OSX_DEPLOYMENT=TRUE \
|
||||
-D DESIRED_QT_VERSION=5 \
|
||||
-D OSG_PLUGIN_LIB_SEARCH_PATH="$DEPENDENCIES_ROOT/lib/osgPlugins-3.4.0" \
|
||||
-D BUILD_ESMTOOL=FALSE \
|
||||
-D BUILD_MYGUI_PLUGIN=FALSE \
|
||||
-G"Unix Makefiles" \
|
||||
..
|
||||
|
|
|
@ -194,7 +194,7 @@ namespace MWWorld
|
|||
else
|
||||
{
|
||||
std::cerr
|
||||
<< "Error: could not resolve cell reference " << ref.mRefID
|
||||
<< "Error: could not resolve cell reference '" << ref.mRefID << "'"
|
||||
<< " (dropping reference)" << std::endl;
|
||||
}
|
||||
}
|
||||
|
@ -462,6 +462,8 @@ namespace MWWorld
|
|||
|
||||
// Load references from all plugins that do something with this cell.
|
||||
for (size_t i = 0; i < mCell->mContextList.size(); i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Reopen the ESM reader and seek to the right position.
|
||||
int index = mCell->mContextList.at(i).index;
|
||||
|
@ -486,6 +488,11 @@ namespace MWWorld
|
|||
mIds.push_back (Misc::StringUtils::lowerCase (ref.mRefID));
|
||||
}
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cerr << "An error occured listing references for cell " << getCell()->getDescription() << ": " << e.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// List moved references, from separately tracked list.
|
||||
for (ESM::CellRefTracker::const_iterator it = mCell->mLeasedRefs.begin(); it != mCell->mLeasedRefs.end(); ++it)
|
||||
|
@ -509,6 +516,8 @@ namespace MWWorld
|
|||
|
||||
// Load references from all plugins that do something with this cell.
|
||||
for (size_t i = 0; i < mCell->mContextList.size(); i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Reopen the ESM reader and seek to the right position.
|
||||
int index = mCell->mContextList.at(i).index;
|
||||
|
@ -531,6 +540,11 @@ namespace MWWorld
|
|||
loadRef (ref, deleted);
|
||||
}
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cerr << "An error occured loading references for cell " << getCell()->getDescription() << ": " << e.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// Load moved references, from separately tracked list.
|
||||
for (ESM::CellRefTracker::const_iterator it = mCell->mLeasedRefs.begin(); it != mCell->mLeasedRefs.end(); ++it)
|
||||
|
@ -598,7 +612,7 @@ namespace MWWorld
|
|||
case ESM::REC_WEAP: mWeapons.load(ref, deleted, store); break;
|
||||
case ESM::REC_BODY: mBodyParts.load(ref, deleted, store); break;
|
||||
|
||||
case 0: std::cerr << "Cell reference " + ref.mRefID + " not found!\n"; break;
|
||||
case 0: std::cerr << "Cell reference '" + ref.mRefID + "' not found!\n"; break;
|
||||
|
||||
default:
|
||||
std::cerr
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "cellref.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
|
||||
|
@ -43,7 +45,13 @@ void ESM::CellRef::loadId (ESMReader& esm, bool wideRefNum)
|
|||
|
||||
mRefNum.load (esm, wideRefNum);
|
||||
|
||||
mRefID = esm.getHNString ("NAME");
|
||||
mRefID = esm.getHNOString ("NAME");
|
||||
if (mRefID.empty())
|
||||
{
|
||||
std::ios::fmtflags f(std::cerr.flags());
|
||||
std::cerr << "Warning: got CellRef with empty RefId in " << esm.getName() << " 0x" << std::hex << esm.getFileOffset() << std::endl;
|
||||
std::cerr.flags(f);
|
||||
}
|
||||
}
|
||||
|
||||
void ESM::CellRef::loadData(ESMReader &esm, bool &isDeleted)
|
||||
|
|
|
@ -30,12 +30,12 @@ class MovedCellRef
|
|||
public:
|
||||
RefNum mRefNum;
|
||||
|
||||
// Target cell (if exterior)
|
||||
// Coordinates of target exterior cell
|
||||
int mTarget[2];
|
||||
|
||||
// TODO: Support moving references between exterior and interior cells!
|
||||
// This may happen in saves, when an NPC follows the player. Tribunal
|
||||
// introduces a henchman (which no one uses), so we may need this as well.
|
||||
// The content file format does not support moving objects to an interior cell.
|
||||
// The save game format does support moving to interior cells, but uses a different mechanism
|
||||
// (see the MovedRefTracker implementation in MWWorld::CellStore for more details).
|
||||
};
|
||||
|
||||
/// Overloaded compare operator used to search inside a list of cell refs.
|
||||
|
|
Loading…
Reference in a new issue