Page 13 of 30
Re: OpenMW 0.29.0
Posted: 21 Feb 2014, 20:48
by cc9cii
I'll summarise the changes I made against 0.29 branch. Screenshot seems to work for me?
Or did you mean in-game one?
Re: OpenMW 0.29.0
Posted: 21 Feb 2014, 22:54
by cc9cii
Here is the diff against 29 branch:
-
Spoiler: Show
Code: Select all
apps/openmw/engine.cpp | 5 ++++-
apps/openmw/mwstate/statemanagerimp.cpp | 2 +-
components/esm/esmwriter.cpp | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp
index e80bd95..0975778 100644
--- a/apps/openmw/engine.cpp
+++ b/apps/openmw/engine.cpp
@@ -2,6 +2,7 @@
#include <stdexcept>
+#include <boost/filesystem.hpp>
#include <OgreRoot.h>
#include <OgreRenderWindow.h>
@@ -339,8 +340,10 @@ std::string OMW::Engine::loadSettings (Settings::Manager & settings)
void OMW::Engine::prepareEngine (Settings::Manager & settings)
{
+ boost::filesystem::path saves(mCfgMgr.getUserDataPath() / "saves");
+
mEnvironment.setStateManager (
- new MWState::StateManager (mCfgMgr.getUserDataPath() / "saves", mContentFiles.at (0)));
+ new MWState::StateManager (saves.make_preferred(), mContentFiles.at (0)));
Nif::NIFFile::CacheLock cachelock;
diff --git a/apps/openmw/mwstate/statemanagerimp.cpp b/apps/openmw/mwstate/statemanagerimp.cpp
index ba0e1d0..265069d 100644
--- a/apps/openmw/mwstate/statemanagerimp.cpp
+++ b/apps/openmw/mwstate/statemanagerimp.cpp
@@ -176,7 +176,7 @@ void MWState::StateManager::saveGame (const std::string& description, const Slot
else
slot = mCharacterManager.getCurrentCharacter()->updateSlot (slot, profile);
- std::ofstream stream (slot->mPath.string().c_str());
+ std::ofstream stream (slot->mPath.string().c_str(), std::ios::binary);
ESM::ESMWriter writer;
diff --git a/components/esm/esmwriter.cpp b/components/esm/esmwriter.cpp
index ff7bd76..91f123e 100644
--- a/components/esm/esmwriter.cpp
+++ b/components/esm/esmwriter.cpp
@@ -120,7 +120,7 @@ namespace ESM
mStream->seekp(rec.position);
mCounting = false;
- write (reinterpret_cast<const char*> (&rec.size), sizeof(int));
+ write (reinterpret_cast<const char*> (&rec.size), sizeof(uint32_t));
mCounting = true;
mStream->seekp(0, std::ios::end);
This helps me compile with MinGW64 compiler. I mention this because these are present in my system when I build/test. All the testing is currently done with msvc-11.0.
-
Spoiler: Show
Code: Select all
apps/openmw/mwrender/videoplayer.cpp | 2 +-
apps/openmw/mwworld/worldimp.cpp | 2 +-
components/files/configurationmanager.hpp | 2 +-
extern/sdl4ogre/sdlwindowhelper.cpp | 4 ++++
libs/platform/string.h | 2 +-
5 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/apps/openmw/mwrender/videoplayer.cpp b/apps/openmw/mwrender/videoplayer.cpp
index adf20dc..4209fb9 100644
--- a/apps/openmw/mwrender/videoplayer.cpp
+++ b/apps/openmw/mwrender/videoplayer.cpp
@@ -385,7 +385,7 @@ class MovieAudioDecoder : public MWSound::Sound_Decoder
}
void open(const std::string&)
-#ifdef _WIN32
+#ifdef _MSC_VER
{ fail(std::string("Invalid call to ")+__FUNCSIG__); }
#else
{ fail(std::string("Invalid call to ")+__PRETTY_FUNCTION__); }
diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp
index be6c0b3..21780fd 100644
--- a/apps/openmw/mwworld/worldimp.cpp
+++ b/apps/openmw/mwworld/worldimp.cpp
@@ -1,5 +1,5 @@
#include "worldimp.hpp"
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__MINGW32__)
#include <boost/tr1/tr1/unordered_map>
#elif defined HAVE_UNORDERED_MAP
#include <unordered_map>
diff --git a/components/files/configurationmanager.hpp b/components/files/configurationmanager.hpp
index 35144fe..9f31a7f 100644
--- a/components/files/configurationmanager.hpp
+++ b/components/files/configurationmanager.hpp
@@ -1,7 +1,7 @@
#ifndef COMPONENTS_FILES_CONFIGURATIONMANAGER_HPP
#define COMPONENTS_FILES_CONFIGURATIONMANAGER_HPP
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(__MINGW32__)
#include <boost/tr1/tr1/unordered_map>
#elif defined HAVE_UNORDERED_MAP
#include <unordered_map>
diff --git a/extern/sdl4ogre/sdlwindowhelper.cpp b/extern/sdl4ogre/sdlwindowhelper.cpp
index f819043..2a54a86 100644
--- a/extern/sdl4ogre/sdlwindowhelper.cpp
+++ b/extern/sdl4ogre/sdlwindowhelper.cpp
@@ -31,7 +31,11 @@ SDLWindowHelper::SDLWindowHelper (SDL_Window* window, int w, int h,
#ifdef WIN32
case SDL_SYSWM_WINDOWS:
// Windows code
+#ifdef __MINGW64__
+ winHandle = Ogre::StringConverter::toString((DWORD_PTR)wmInfo.info.win.window);
+#else
winHandle = Ogre::StringConverter::toString((unsigned long)wmInfo.info.win.window);
+#endif /* __MINGW64__ */
break;
#elif __MACOSX__
case SDL_SYSWM_COCOA:
diff --git a/libs/platform/string.h b/libs/platform/string.h
index 5368d75..7f08765 100644
--- a/libs/platform/string.h
+++ b/libs/platform/string.h
@@ -9,7 +9,7 @@
#include <string.h>
#if (defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1070) || defined(__MINGW32__)
// need our own implementation of strnlen
-#ifdef __MINGW32__
+#ifdef __MINGW32__ && !__MINGW64__
static size_t strnlen(const char *s, size_t n)
{
const char *p = (const char *)memchr(s, 0, n);
The build is still going, I'll report back after testing.
EDIT: openmw-29 branch with above two patches works for me. Tested load/save but otherwise minimal testing. In-game screenshot also works:
Look at those slaughterfish waiting for me at the bottom of the lighthouse. Need to fix that.
Re: OpenMW 0.29.0
Posted: 22 Feb 2014, 12:50
by Zini
We normally don't accept patches in this form. Can you send a github pull request, please?
Also, why the path change in prepareEngine? What does that fix?
Re: OpenMW 0.29.0
Posted: 22 Feb 2014, 13:05
by cc9cii
Zini wrote:We normally don't accept patches in this form. Can you send a github pull request, please?
Also, why the path change in prepareEngine? What does that fix?
Not sure how do work with git, to be honest. I've been kinda figuring things out as I go along
I did manage to fork the master branch but I'm not sure if I can simply commit to that or do I have to fork 0.29 again?
The change in prepareEngine was something that got left in while I was trying various things. Let me see what happens if I remove it.
EDIT: just re-compiled with that backed out and I can still load saves
Noticed that if my character is immobile (e.g. at the ship) and load another save then he remains immobile
Also noticed that when I'm saving there is no captured screen visible (is that what gus meant?)
EDIT2: not sure if I did things correctly or not, but a pull request sent
Re: OpenMW 0.29.0
Posted: 22 Feb 2014, 16:39
by Okulo
cc9cii wrote:Not sure how do work with git, to be honest. I've been kinda figuring things out as I go along
Does
this site help?
Re: OpenMW 0.29.0
Posted: 22 Feb 2014, 16:55
by corristo
Just got a crash after answering "Yes" in "Do you want to load last save?" dialog (after being killed by slaughterfish, lol):
https://gist.github.com/corristo/9157021
Re: OpenMW 0.29.0
Posted: 22 Feb 2014, 17:05
by scrawl
Just got a crash after answering "Yes" in "Do you want to load last save?" dialog (after being killed by slaughterfish, lol):
Noticed that if my character is immobile (e.g. at the ship) and load another save then he remains immobile
Please put these on the tracker. Hard to keep track in here.
Re: OpenMW 0.29.0
Posted: 22 Feb 2014, 17:22
by corristo
Re: OpenMW 0.29.0
Posted: 22 Feb 2014, 21:52
by cc9cii
Heh, I was half expecting to see "An Idiot's Guide" as I clicked the link
Thanks for that.
Re: OpenMW 0.29.0
Posted: 24 Feb 2014, 08:56
by Zini
Seems development effort on the release branch has settled.
Let's try this again. Start building the release packages, please.