mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Merge branch 'master' into openal
This commit is contained in:
commit
0897a2a4cb
@ -160,7 +160,7 @@ endif (APPLE)
|
||||
|
||||
# Dependencies
|
||||
|
||||
# Fix for not visible pthreads functions for linker with glibc 2.15
|
||||
# Fix for not visible pthreads functions for linker with glibc 2.15
|
||||
if (UNIX AND NOT APPLE)
|
||||
find_package (Threads)
|
||||
endif()
|
||||
@ -257,6 +257,9 @@ endif (APPLE)
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
add_definitions (-Wall -Wextra -Wno-unused-parameter -Wno-reorder)
|
||||
|
||||
# Silence warnings in OGRE headers. Remove once OGRE got fixed!
|
||||
add_definitions (-Wno-ignored-qualifiers)
|
||||
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
||||
OUTPUT_VARIABLE GCC_VERSION)
|
||||
if ("${GCC_VERSION}" VERSION_GREATER 4.6 OR "${GCC_VERSION}" VERSION_EQUAL 4.6)
|
||||
@ -332,7 +335,7 @@ if(WIN32)
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR ${OPENMW_VERSION_MINO})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${OPENMW_VERSION_RELEASE})
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "openmw;OpenMW;esmtool;Esmtool;omwlauncher;OpenMW Launcher")
|
||||
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Readme.lnk' '\$INSTDIR\\\\readme.txt'")
|
||||
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Readme.lnk' '\$INSTDIR\\\\readme.txt'")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OpenMW_SOURCE_DIR}/readme.txt")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${OpenMW_SOURCE_DIR}/GPL3.txt")
|
||||
SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
|
||||
|
@ -182,7 +182,9 @@ void HUD::setPlayerPos(const float x, const float y)
|
||||
}
|
||||
|
||||
MapWindow::MapWindow()
|
||||
: Layout("openmw_map_window_layout.xml"), mGlobal(false)
|
||||
: Layout("openmw_map_window_layout.xml")
|
||||
, mGlobal(false)
|
||||
, mVisible(false)
|
||||
{
|
||||
setCoord(500,0,320,300);
|
||||
setText("WorldButton", "World");
|
||||
@ -272,6 +274,17 @@ void MapWindow::onWorldButtonClicked(MyGUI::Widget* _sender)
|
||||
mButton->setCaption( mGlobal ? "Local" : "World" );
|
||||
}
|
||||
|
||||
LocalMapBase::LocalMapBase()
|
||||
: mCurX(0)
|
||||
, mCurY(0)
|
||||
, mInterior(false)
|
||||
, mLocalMap(NULL)
|
||||
, mPrefix()
|
||||
, mChanged(true)
|
||||
, mLayout(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
void LocalMapBase::init(MyGUI::ScrollView* widget, OEngine::GUI::Layout* layout)
|
||||
{
|
||||
mLocalMap = widget;
|
||||
|
@ -34,6 +34,7 @@ namespace MWGui
|
||||
class LocalMapBase
|
||||
{
|
||||
public:
|
||||
LocalMapBase();
|
||||
void init(MyGUI::ScrollView* widget, OEngine::GUI::Layout* layout);
|
||||
|
||||
void setCellPrefix(const std::string& prefix);
|
||||
@ -85,6 +86,7 @@ namespace MWGui
|
||||
{
|
||||
public:
|
||||
MapWindow();
|
||||
virtual ~MapWindow(){}
|
||||
|
||||
void setVisible(bool b);
|
||||
void setPlayerPos(const float x, const float y);
|
||||
|
@ -256,8 +256,12 @@ public:
|
||||
return DataStreamPtr(new Mangle2OgreStream(strm));
|
||||
}
|
||||
|
||||
bool exists(const String& filename) {
|
||||
return cexists(filename);
|
||||
}
|
||||
|
||||
// Check if the file exists.
|
||||
bool exists(const String& filename) {
|
||||
bool cexists(const String& filename) const {
|
||||
String passed = filename;
|
||||
if(filename.at(filename.length() - 1) == '*' || filename.at(filename.length() - 1) == '?' || filename.at(filename.length() - 1) == '<'
|
||||
|| filename.at(filename.length() - 1) == '"' || filename.at(filename.length() - 1) == '>' || filename.at(filename.length() - 1) == ':'
|
||||
@ -308,6 +312,29 @@ return arc.exists(passed.c_str());
|
||||
located in BSAs. So instead we channel it through exists() and
|
||||
set up a single-element result list if the file is found.
|
||||
*/
|
||||
FileInfoListPtr findFileInfo(const String& pattern, bool recursive = true,
|
||||
bool dirs = false) const
|
||||
{
|
||||
FileInfoListPtr ptr = FileInfoListPtr(new FileInfoList());
|
||||
|
||||
// Check if the file exists (only works for single files - wild
|
||||
// cards and recursive search isn't implemented.)
|
||||
if(cexists(pattern))
|
||||
{
|
||||
FileInfo fi;
|
||||
fi.archive = this;
|
||||
fi.filename = pattern;
|
||||
// It apparently doesn't matter that we return bogus
|
||||
// information
|
||||
fi.path = "";
|
||||
fi.compressedSize = fi.uncompressedSize = 0;
|
||||
|
||||
ptr->push_back(fi);
|
||||
}
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
FileInfoListPtr findFileInfo(const String& pattern, bool recursive = true,
|
||||
bool dirs = false)
|
||||
{
|
||||
@ -315,7 +342,7 @@ return arc.exists(passed.c_str());
|
||||
|
||||
// Check if the file exists (only works for single files - wild
|
||||
// cards and recursive search isn't implemented.)
|
||||
if(exists(pattern))
|
||||
if(cexists(pattern))
|
||||
{
|
||||
FileInfo fi;
|
||||
fi.archive = this;
|
||||
|
@ -148,9 +148,9 @@ void BSAFile::readHeader()
|
||||
}
|
||||
|
||||
/// Get the index of a given file name, or -1 if not found
|
||||
int BSAFile::getIndex(const char *str)
|
||||
int BSAFile::getIndex(const char *str) const
|
||||
{
|
||||
Lookup::iterator it;
|
||||
Lookup::const_iterator it;
|
||||
it = lookup.find(str);
|
||||
|
||||
if(it == lookup.end()) return -1;
|
||||
|
@ -93,7 +93,7 @@ class BSAFile
|
||||
void readHeader();
|
||||
|
||||
/// Get the index of a given file name, or -1 if not found
|
||||
int getIndex(const char *str);
|
||||
int getIndex(const char *str) const;
|
||||
|
||||
public:
|
||||
|
||||
@ -119,7 +119,7 @@ class BSAFile
|
||||
*/
|
||||
|
||||
/// Check if a file exists
|
||||
bool exists(const char *file) { return getIndex(file) != -1; }
|
||||
bool exists(const char *file) const { return getIndex(file) != -1; }
|
||||
|
||||
/** Open a file contained in the archive. Throws an exception if the
|
||||
file doesn't exist.
|
||||
|
@ -63,17 +63,17 @@ size_t BulletShape::calculateSize() const
|
||||
|
||||
|
||||
//=============================================================================================================
|
||||
template<> BulletShapeManager *Ogre::Singleton<BulletShapeManager>::ms_Singleton = 0;
|
||||
template<> BulletShapeManager *Ogre::Singleton<BulletShapeManager>::msSingleton = 0;
|
||||
|
||||
BulletShapeManager *BulletShapeManager::getSingletonPtr()
|
||||
{
|
||||
return ms_Singleton;
|
||||
return msSingleton;
|
||||
}
|
||||
|
||||
BulletShapeManager &BulletShapeManager::getSingleton()
|
||||
{
|
||||
assert(ms_Singleton);
|
||||
return(*ms_Singleton);
|
||||
assert(msSingleton);
|
||||
return(*msSingleton);
|
||||
}
|
||||
|
||||
BulletShapeManager::BulletShapeManager()
|
||||
|
Loading…
x
Reference in New Issue
Block a user