From b93eb844010f3002bb1acb15534f82f2a5af55c0 Mon Sep 17 00:00:00 2001 From: lazydev Date: Thu, 28 Feb 2013 02:43:03 +0400 Subject: [PATCH 01/12] fix for https://bugs.openmw.org/issues/573 --- components/esm/esmreader.hpp | 16 ++++++++-------- components/esm/loadappa.cpp | 27 +++++++++++++++++++++------ components/esm/loadappa.hpp | 6 ++++-- 3 files changed, 33 insertions(+), 16 deletions(-) diff --git a/components/esm/esmreader.hpp b/components/esm/esmreader.hpp index 45d6d9164..ae876edf8 100644 --- a/components/esm/esmreader.hpp +++ b/components/esm/esmreader.hpp @@ -37,14 +37,14 @@ public: *************************************************************************/ int getVer() const { return mCtx.header.version; } - float getFVer() { if(mCtx.header.version == VER_12) return 1.2; else return 1.3; } - int getSpecial() { return mSpf; } - int getType() { return mCtx.header.type; } - const std::string getAuthor() { return mCtx.header.author.toString(); } - const std::string getDesc() { return mCtx.header.desc.toString(); } + float getFVer() const { if(mCtx.header.version == VER_12) return 1.2; else return 1.3; } + int getSpecial() const { return mSpf; } + int getType() const { return mCtx.header.type; } + const std::string getAuthor() const { return mCtx.header.author.toString(); } + const std::string getDesc() const { return mCtx.header.desc.toString(); } const SaveData &getSaveData() const { return mSaveData; } - const MasterList &getMasters() { return mMasters; } - const NAME &retSubName() { return mCtx.subName; } + const MasterList &getMasters() const { return mMasters; } + const NAME &retSubName() const { return mCtx.subName; } uint32_t getSubSize() const { return mCtx.leftSub; } /************************************************************************* @@ -85,7 +85,7 @@ public: int mIdx; void setIndex(const int index) {mIdx = index; mCtx.index = index;} const int getIndex() {return mIdx;} - + void setGlobalReaderList(std::vector *list) {mGlobalReaderList = list;} std::vector *getGlobalReaderList() {return mGlobalReaderList;} diff --git a/components/esm/loadappa.cpp b/components/esm/loadappa.cpp index f5e7e10e1..80922e2cb 100644 --- a/components/esm/loadappa.cpp +++ b/components/esm/loadappa.cpp @@ -7,13 +7,28 @@ namespace ESM { void Apparatus::load(ESMReader &esm) { - mModel = esm.getHNString("MODL"); - mName = esm.getHNString("FNAM"); - esm.getHNT(mData, "AADT", 16); - mScript = esm.getHNOString("SCRI"); - mIcon = esm.getHNString("ITEX"); + // we will not treat duplicated subrecords as errors here + while (esm.hasMoreSubs()) + { + esm.getSubName(); + NAME subName = esm.retSubName(); + + if (subName == "MODL") + mModel = esm.getHString(); + else if (subName == "FNAM") + mName = esm.getHString(); + else if (subName == "AADT") + esm.getHT(mData); + else if (subName == "SCRI") + mScript = esm.getHString(); + else if (subName == "ITEX") + mIcon = esm.getHString(); + else + esm.fail("wrong subrecord type " + subName.toString() + " for APPA record"); + } } -void Apparatus::save(ESMWriter &esm) + +void Apparatus::save(ESMWriter &esm) const { esm.writeHNCString("MODL", mModel); esm.writeHNCString("FNAM", mName); diff --git a/components/esm/loadappa.hpp b/components/esm/loadappa.hpp index 486a559f8..a1daeb123 100644 --- a/components/esm/loadappa.hpp +++ b/components/esm/loadappa.hpp @@ -1,6 +1,7 @@ #ifndef OPENMW_ESM_APPA_H #define OPENMW_ESM_APPA_H +#include "esmcommon.hpp" #include namespace ESM @@ -13,8 +14,9 @@ class ESMWriter; * Alchemist apparatus */ -struct Apparatus +class Apparatus { +public: enum AppaType { MortarPestle = 0, @@ -35,7 +37,7 @@ struct Apparatus std::string mId, mModel, mIcon, mScript, mName; void load(ESMReader &esm); - void save(ESMWriter &esm); + void save(ESMWriter &esm) const; }; } #endif From 3df34fb5ccbb8ec0f1870b7f9072ff6576a22dd9 Mon Sep 17 00:00:00 2001 From: Michal Sciubidlo Date: Thu, 28 Feb 2013 19:52:32 +0100 Subject: [PATCH 02/12] fix bug 574 --- apps/openmw/mwinput/inputmanagerimp.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 4a79f77b8..2b943c50f 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -274,13 +274,11 @@ namespace MWInput if (actionIsActive(A_MoveLeft)) { triedToMove = true; - mPlayer.setAutoMove (false); mPlayer.setLeftRight (-1); } else if (actionIsActive(A_MoveRight)) { triedToMove = true; - mPlayer.setAutoMove (false); mPlayer.setLeftRight (1); } else From f77ace088537a7a999decf39485affe7cb8d0080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20S=C3=B6derberg?= Date: Thu, 28 Feb 2013 20:16:46 +0100 Subject: [PATCH 03/12] Removed the "hack" mygui.png and misc fixes for this. --- files/mygui/CMakeLists.txt | 1 - files/mygui/mwgui.png | Bin 13534 -> 0 bytes .../openmw_chargen_class_description.layout | 3 + files/mygui/openmw_chargen_race.layout | 45 +- files/mygui/openmw_dialogue_window.layout | 6 +- files/mygui/openmw_edit.skin.xml | 53 ++- files/mygui/openmw_edit_effect.layout | 8 +- files/mygui/openmw_hud_box.skin.xml | 75 +--- files/mygui/openmw_list.skin.xml | 385 ++++++------------ files/mygui/openmw_loading_screen.layout | 3 +- files/mygui/openmw_map_window_skin.xml | 2 +- files/mygui/openmw_scroll_skin.xml | 6 +- files/mygui/openmw_settings_window.layout | 26 +- 13 files changed, 233 insertions(+), 380 deletions(-) delete mode 100644 files/mygui/mwgui.png diff --git a/files/mygui/CMakeLists.txt b/files/mygui/CMakeLists.txt index e7e5b695e..beace5b81 100644 --- a/files/mygui/CMakeLists.txt +++ b/files/mygui/CMakeLists.txt @@ -9,7 +9,6 @@ set(MYGUI_FILES core.skin core.xml EBGaramond-Regular.ttf - mwgui.png Obliviontt.zip openmw_alchemy_window.layout openmw_book.layout diff --git a/files/mygui/mwgui.png b/files/mygui/mwgui.png deleted file mode 100644 index 318f16e41873af708fd31d302bf0726efbdf916c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13534 zcmcI~3shQnzAi~>Y@3H?&P-zyQ|+`i^dvT>8iR^T)6>M7hccU&Wh ze;|(|x-aTFb%k1H@W@E$uzzS#PhD}(&pw~s`W$k=?Yj@}zH#?X#}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tZSNTyJl3!~~7FsbLJ_eJQ9juIMM=?=)>h&~51#O&LcajlFK4a5KP?pGCS zwQgds!9N~&yTrlD+PGv>3)nifnv4{VQ!5IjM*6>U27gB&xA#XO+L0PCYsK75?ffN;JWv={xJ zQlDt~Zk^@)I&_vURC}9vq$OF>sJP!MTW*?=sFE)o?lsB1*#!l8>X#9bzCF9qXoXh7 zHa+vur95owFD-n1&yvU`meI@yNFUl}(%lLJHbIE6cb-IbW>txJhiUCha(9tt`?BVd za3CQvR+SUH`w>}BNxiSnIbKi9r$$E#F!Qq_Z;kZhMAFoIiKijgWT#zL-=`}&N!SGW z1MoiNKl%ZlhWr;kpKW>rc=!7s`+NlfG^zi>=O5kD>iz$PEv-KDk8a6v|Hf@CoqKI_ Zfjvhb*ux%p4FUc|9E<#-`SbJN{0~$*&Ncu5 diff --git a/files/mygui/openmw_chargen_class_description.layout b/files/mygui/openmw_chargen_class_description.layout index 11031eb4e..8823e1e76 100644 --- a/files/mygui/openmw_chargen_class_description.layout +++ b/files/mygui/openmw_chargen_class_description.layout @@ -4,6 +4,9 @@ + + + diff --git a/files/mygui/openmw_chargen_race.layout b/files/mygui/openmw_chargen_race.layout index a9ec9905d..4ef8da0f3 100644 --- a/files/mygui/openmw_chargen_race.layout +++ b/files/mygui/openmw_chargen_race.layout @@ -8,33 +8,52 @@ - + - + - - + + + + + + + + + - - - + + + + + + + + + - - - + + + + + + + + + - + @@ -42,11 +61,11 @@ - + - + diff --git a/files/mygui/openmw_dialogue_window.layout b/files/mygui/openmw_dialogue_window.layout index 1271a287b..9a9da72d4 100644 --- a/files/mygui/openmw_dialogue_window.layout +++ b/files/mygui/openmw_dialogue_window.layout @@ -3,13 +3,15 @@ + + - + - + diff --git a/files/mygui/openmw_edit.skin.xml b/files/mygui/openmw_edit.skin.xml index 02fee4b17..da21385e2 100644 --- a/files/mygui/openmw_edit.skin.xml +++ b/files/mygui/openmw_edit.skin.xml @@ -1,55 +1,52 @@ + + + + + + - + + + + + - - - - - - - - - - - - - + + + + + + + - + + + - - - - - - - - - - - - - + + + + diff --git a/files/mygui/openmw_edit_effect.layout b/files/mygui/openmw_edit_effect.layout index 45ecb63ed..cad22c064 100644 --- a/files/mygui/openmw_edit_effect.layout +++ b/files/mygui/openmw_edit_effect.layout @@ -31,7 +31,7 @@ - + @@ -39,7 +39,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -72,7 +72,7 @@ - + diff --git a/files/mygui/openmw_hud_box.skin.xml b/files/mygui/openmw_hud_box.skin.xml index 464b6343a..23480e8d3 100644 --- a/files/mygui/openmw_hud_box.skin.xml +++ b/files/mygui/openmw_hud_box.skin.xml @@ -1,80 +1,31 @@ + - - - - - - - - + + + - - - - - - - + - - - - - - - - - - - - - - - - + + - - - - - - - - - + - - - - - - - + - - - - - - - - - - - - - - - + + + + diff --git a/files/mygui/openmw_list.skin.xml b/files/mygui/openmw_list.skin.xml index 64435451a..6631424cc 100644 --- a/files/mygui/openmw_list.skin.xml +++ b/files/mygui/openmw_list.skin.xml @@ -1,228 +1,107 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + - - + - - - - - + + + - - - - - - - + - - - + - - - - - - - - - + + - - + + - - + + + - - - - - - - + - - - - - + - - - + + + + + + + + + - - + + - - - - + - + + + + + + - - - - + + + + + @@ -234,81 +113,85 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + - - - - + + + + - - + - - + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/files/mygui/openmw_loading_screen.layout b/files/mygui/openmw_loading_screen.layout index 1e4bba5ed..4b6861151 100644 --- a/files/mygui/openmw_loading_screen.layout +++ b/files/mygui/openmw_loading_screen.layout @@ -8,8 +8,7 @@ - - + diff --git a/files/mygui/openmw_map_window_skin.xml b/files/mygui/openmw_map_window_skin.xml index 0c6050969..13f18c6d3 100644 --- a/files/mygui/openmw_map_window_skin.xml +++ b/files/mygui/openmw_map_window_skin.xml @@ -1,7 +1,7 @@ - + diff --git a/files/mygui/openmw_scroll_skin.xml b/files/mygui/openmw_scroll_skin.xml index 70fad3f4b..1b94f0c29 100644 --- a/files/mygui/openmw_scroll_skin.xml +++ b/files/mygui/openmw_scroll_skin.xml @@ -2,12 +2,12 @@ - + - + - + diff --git a/files/mygui/openmw_settings_window.layout b/files/mygui/openmw_settings_window.layout index 2f9b5a67f..8d435bfd5 100644 --- a/files/mygui/openmw_settings_window.layout +++ b/files/mygui/openmw_settings_window.layout @@ -15,7 +15,7 @@ - + @@ -30,7 +30,7 @@ - + @@ -64,35 +64,35 @@ - + - + - + - + - + @@ -117,7 +117,7 @@ - + @@ -133,7 +133,7 @@ - + @@ -192,7 +192,7 @@ - + @@ -208,7 +208,7 @@ - + @@ -233,7 +233,7 @@ - + @@ -241,7 +241,7 @@ - + From 3efbb5e728b5708ee738279ccbe15ed765efadf9 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 28 Feb 2013 20:27:35 +0100 Subject: [PATCH 04/12] Don't try to render a map in empty cells --- apps/openmw/mwrender/localmap.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/openmw/mwrender/localmap.cpp b/apps/openmw/mwrender/localmap.cpp index 601ee58e3..1a14b86bf 100644 --- a/apps/openmw/mwrender/localmap.cpp +++ b/apps/openmw/mwrender/localmap.cpp @@ -119,6 +119,10 @@ void LocalMap::requestMap(MWWorld::Ptr::CellStore* cell) void LocalMap::requestMap(MWWorld::Ptr::CellStore* cell, AxisAlignedBox bounds) { + // if we're in an empty cell, don't bother rendering anything + if (bounds.isNull ()) + return; + mInterior = true; mBounds = bounds; From 0b629791a82cc2abcaa7b1c2b106a81763c56a57 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 28 Feb 2013 20:40:32 +0100 Subject: [PATCH 05/12] reverting loading bar layout --- files/mygui/openmw_loading_screen.layout | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/mygui/openmw_loading_screen.layout b/files/mygui/openmw_loading_screen.layout index 4b6861151..1e4bba5ed 100644 --- a/files/mygui/openmw_loading_screen.layout +++ b/files/mygui/openmw_loading_screen.layout @@ -8,7 +8,8 @@ - + + From b7ab12e7cf4e919cdd664254163bf8c204be2771 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 28 Feb 2013 21:12:13 +0100 Subject: [PATCH 06/12] Workaround to prevent the map drawing on top of the world button --- apps/openmw/mwgui/map_window.cpp | 19 +++++++++++++++++++ apps/openmw/mwgui/map_window.hpp | 3 +++ 2 files changed, 22 insertions(+) diff --git a/apps/openmw/mwgui/map_window.cpp b/apps/openmw/mwgui/map_window.cpp index 6f7f0eaab..52b108f85 100644 --- a/apps/openmw/mwgui/map_window.cpp +++ b/apps/openmw/mwgui/map_window.cpp @@ -6,6 +6,8 @@ #include #include +#include + #include "../mwbase/windowmanager.hpp" #include "../mwbase/world.hpp" #include "../mwbase/environment.hpp" @@ -13,6 +15,8 @@ #include "../mwrender/globalmap.hpp" +#include "widgets.hpp" + using namespace MWGui; LocalMapBase::LocalMapBase() @@ -96,6 +100,7 @@ void LocalMapBase::applyFogOfWar() : ""); } } + notifyMapChanged (); } void LocalMapBase::onMarkerFocused (MyGUI::Widget* w1, MyGUI::Widget* w2) @@ -425,3 +430,17 @@ void MapWindow::notifyPlayerUpdate () { globalMapUpdatePlayer (); } + +void MapWindow::notifyMapChanged () +{ + // workaround to prevent the map from drawing on top of the button + MyGUI::IntCoord oldCoord = mButton->getCoord (); + MyGUI::Gui::getInstance().destroyWidget (mButton); + mButton = mMainWidget->createWidget("MW_Button", + oldCoord, MyGUI::Align::Bottom | MyGUI::Align::Right); + mButton->setProperty ("ExpandDirection", "Left"); + + mButton->eventMouseButtonClick += MyGUI::newDelegate(this, &MapWindow::onWorldButtonClicked); + mButton->setCaptionWithReplacing( mGlobal ? "#{sLocal}" : + "#{sWorld}"); +} diff --git a/apps/openmw/mwgui/map_window.hpp b/apps/openmw/mwgui/map_window.hpp index 4e2dd6756..39770a7a2 100644 --- a/apps/openmw/mwgui/map_window.hpp +++ b/apps/openmw/mwgui/map_window.hpp @@ -50,6 +50,7 @@ namespace MWGui void onMarkerUnfocused(MyGUI::Widget* w1, MyGUI::Widget* w2); virtual void notifyPlayerUpdate() {} + virtual void notifyMapChanged() {} OEngine::GUI::Layout* mLayout; @@ -99,6 +100,8 @@ namespace MWGui virtual void onPinToggled(); virtual void notifyPlayerUpdate(); + virtual void notifyMapChanged(); + }; } #endif From 60f22194507c45f235c13928f3d7ca64e1629536 Mon Sep 17 00:00:00 2001 From: lazydev Date: Fri, 1 Mar 2013 00:46:05 +0400 Subject: [PATCH 07/12] fixed zini's norices --- components/esm/loadappa.cpp | 2 +- components/esm/loadappa.hpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/esm/loadappa.cpp b/components/esm/loadappa.cpp index 80922e2cb..643fefda5 100644 --- a/components/esm/loadappa.cpp +++ b/components/esm/loadappa.cpp @@ -28,7 +28,7 @@ void Apparatus::load(ESMReader &esm) } } -void Apparatus::save(ESMWriter &esm) const +void Apparatus::save(ESMWriter &esm) { esm.writeHNCString("MODL", mModel); esm.writeHNCString("FNAM", mName); diff --git a/components/esm/loadappa.hpp b/components/esm/loadappa.hpp index a1daeb123..820c44c59 100644 --- a/components/esm/loadappa.hpp +++ b/components/esm/loadappa.hpp @@ -1,7 +1,6 @@ #ifndef OPENMW_ESM_APPA_H #define OPENMW_ESM_APPA_H -#include "esmcommon.hpp" #include namespace ESM @@ -14,7 +13,7 @@ class ESMWriter; * Alchemist apparatus */ -class Apparatus +struct Apparatus { public: enum AppaType @@ -37,7 +36,7 @@ public: std::string mId, mModel, mIcon, mScript, mName; void load(ESMReader &esm); - void save(ESMWriter &esm) const; + void save(ESMWriter &esm); }; } #endif From 230136438b096d017ac490cc65347d73bc2b8854 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 28 Feb 2013 22:17:07 +0100 Subject: [PATCH 08/12] minor cleanup --- components/esm/loadappa.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/components/esm/loadappa.hpp b/components/esm/loadappa.hpp index 820c44c59..486a559f8 100644 --- a/components/esm/loadappa.hpp +++ b/components/esm/loadappa.hpp @@ -15,7 +15,6 @@ class ESMWriter; struct Apparatus { -public: enum AppaType { MortarPestle = 0, From 2786cc67f61e9e4aa6338222491ec96c501c4f5d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 28 Feb 2013 13:38:48 -0800 Subject: [PATCH 09/12] Fix loading empty NiTriShapeData records --- components/nif/data.hpp | 16 +++++++--------- components/nif/nif_file.cpp | 5 ++--- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/components/nif/data.hpp b/components/nif/data.hpp index 63df23b27..46b58da8f 100644 --- a/components/nif/data.hpp +++ b/components/nif/data.hpp @@ -142,20 +142,18 @@ public: { ShapeData::read(nif); - int tris = nif->getUShort(); - if(tris) - { - // We have three times as many vertices as triangles, so this - // is always equal to tris*3. - int cnt = nif->getInt(); - nif->getShorts(triangles, cnt); - } + /*int tris =*/ nif->getUShort(); + + // We have three times as many vertices as triangles, so this + // is always equal to tris*3. + int cnt = nif->getInt(); + nif->getShorts(triangles, cnt); // Read the match list, which lists the vertices that are equal to // vertices. We don't actually need need this for anything, so // just skip it. int verts = nif->getUShort(); - for(int i=0;igetUShort(); diff --git a/components/nif/nif_file.cpp b/components/nif/nif_file.cpp index ba3a7513b..6e806e7ec 100644 --- a/components/nif/nif_file.cpp +++ b/components/nif/nif_file.cpp @@ -220,11 +220,10 @@ void NIFFile::parse() for(size_t i = 0;i < recNum;i++) { - std::string rec = getString(); - //cout << i << ": " << rec.toString() << endl; - Record *r = NULL; + std::string rec = getString(); + /* These are all the record types we know how to read. This can be heavily optimized later if needed. For example, a From eaa6813917498b84eb3ea02adb3d2ab3b26e08ad Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 28 Feb 2013 13:54:53 -0800 Subject: [PATCH 10/12] Workaround for meshes without any vertices --- components/nifogre/ogre_nif_loader.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/nifogre/ogre_nif_loader.cpp b/components/nifogre/ogre_nif_loader.cpp index e6779ac1a..a86487854 100644 --- a/components/nifogre/ogre_nif_loader.cpp +++ b/components/nifogre/ogre_nif_loader.cpp @@ -844,9 +844,12 @@ class NIFMeshLoader : Ogre::ManualResourceLoader // Set the bounding box first BoundsFinder bounds; bounds.add(&srcVerts[0][0], srcVerts.size()); - // No idea why this offset is needed. It works fine without it if the - // vertices weren't transformed first, but otherwise it fails later on - // when the object is being inserted into the scene. + if(!bounds.isValid()) + { + float v[3] = { 0.0f, 0.0f, 0.0f }; + bounds.add(&v[0], 1); + } + mesh->_setBounds(Ogre::AxisAlignedBox(bounds.minX()-0.5f, bounds.minY()-0.5f, bounds.minZ()-0.5f, bounds.maxX()+0.5f, bounds.maxY()+0.5f, bounds.maxZ()+0.5f)); mesh->_setBoundingSphereRadius(bounds.getRadius()); From 1d988676febb8b0e6629f6ca9b2eff0bdec6512e Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 28 Feb 2013 22:56:29 +0100 Subject: [PATCH 11/12] Local map: the obtained bounding box wasn't exactly accurate, getWorldBoundingBox seems to solve this. --- apps/openmw/mwrender/localmap.cpp | 5 ++++- apps/openmw/mwrender/objects.cpp | 8 ++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwrender/localmap.cpp b/apps/openmw/mwrender/localmap.cpp index 1a14b86bf..918ec4580 100644 --- a/apps/openmw/mwrender/localmap.cpp +++ b/apps/openmw/mwrender/localmap.cpp @@ -134,7 +134,7 @@ void LocalMap::requestMap(MWWorld::Ptr::CellStore* cell, mAngle = angle.valueRadians(); mCellCamera->setOrientation(Quaternion::IDENTITY); - mCameraRotNode->setOrientation(Quaternion(Math::Cos(angle/2.f), 0, 0, -Math::Sin(angle/2.f))); + mCameraRotNode->setOrientation(Quaternion(Math::Cos(mAngle/2.f), 0, 0, -Math::Sin(mAngle/2.f))); // rotate the cell and merge the rotated corners to the bounding box Vector2 _center(bounds.getCenter().x, bounds.getCenter().y); @@ -156,6 +156,9 @@ void LocalMap::requestMap(MWWorld::Ptr::CellStore* cell, mBounds.merge(Vector3(c3.x, c3.y, 0)); mBounds.merge(Vector3(c4.x, c4.y, 0)); + // apply a little padding + mBounds.scale ((mBounds.getSize ()+Ogre::Vector3(1000,1000,0)) / mBounds.getSize ()); + Vector2 center(mBounds.getCenter().x, mBounds.getCenter().y); Vector2 min(mBounds.getMinimum().x, mBounds.getMinimum().y); diff --git a/apps/openmw/mwrender/objects.cpp b/apps/openmw/mwrender/objects.cpp index add781459..e8ee3f95f 100644 --- a/apps/openmw/mwrender/objects.cpp +++ b/apps/openmw/mwrender/objects.cpp @@ -113,12 +113,8 @@ void Objects::insertMesh (const MWWorld::Ptr& ptr, const std::string& mesh, bool Ogre::AxisAlignedBox bounds = Ogre::AxisAlignedBox::BOX_NULL; NifOgre::EntityList entities = NifOgre::Loader::createEntities(insert, mesh); for(size_t i = 0;i < entities.mEntities.size();i++) - { - const Ogre::AxisAlignedBox &tmp = entities.mEntities[i]->getBoundingBox(); - bounds.merge(Ogre::AxisAlignedBox(insert->_getDerivedPosition() + tmp.getMinimum(), - insert->_getDerivedPosition() + tmp.getMaximum()) - ); - } + bounds.merge(entities.mEntities[i]->getWorldBoundingBox(true)); + Ogre::Vector3 extents = bounds.getSize(); extents *= insert->getScale(); float size = std::max(std::max(extents.x, extents.y), extents.z); From 2c05a7477cfc37faab23217c87fe7527aa2a9dbf Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 28 Feb 2013 17:16:28 -0800 Subject: [PATCH 12/12] Improve checks for texture resource names that include the "textures\" prefix --- components/nifogre/ogre_nif_loader.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/components/nifogre/ogre_nif_loader.cpp b/components/nifogre/ogre_nif_loader.cpp index a86487854..85fbfea26 100644 --- a/components/nifogre/ogre_nif_loader.cpp +++ b/components/nifogre/ogre_nif_loader.cpp @@ -605,7 +605,12 @@ static Ogre::String getMaterial(const Nif::NiTriShape *shape, const Ogre::String */ static const char path[] = "textures\\"; - texName = path + st->filename; + texName = st->filename; + Misc::StringUtils::toLower(texName); + + if(texName.compare(0, sizeof(path)-1, path) != 0) + texName = path + texName; + Ogre::String::size_type pos = texName.rfind('.'); if(pos != Ogre::String::npos && texName.compare(pos, texName.length() - pos, ".dds") != 0) { @@ -616,18 +621,7 @@ static Ogre::String getMaterial(const Nif::NiTriShape *shape, const Ogre::String // if it turns out that the above wasn't true in all cases (not for vanilla, but maybe mods) // verify, and revert if false (this call succeeds quickly, but fails slowly) if(!Ogre::ResourceGroupManager::getSingleton().resourceExistsInAnyGroup(texName)) - texName = path + st->filename; - } - else if (!Ogre::ResourceGroupManager::getSingleton().resourceExistsInAnyGroup(texName)) - { - // workaround for Better Heads addon - size_t lastSlash = st->filename.rfind('\\'); - if (lastSlash != std::string::npos && lastSlash + 1 != st->filename.size()) { - texName = path + st->filename.substr(lastSlash + 1); - // workaround for Better Bodies addon - if (!Ogre::ResourceGroupManager::getSingleton().resourceExistsInAnyGroup(texName)) - texName = st->filename; - } + texName = path + Misc::StringUtils::lowerCase(texName); } } else warn("Found internal texture, ignoring.");