Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 16 commits
  • 100 files changed
  • 0 commit comments
  • 3 contributors
Showing with 1,122 additions and 749 deletions.
  1. +5 −4 apps/openmw/CMakeLists.txt
  2. +3 −3 apps/openmw/engine.cpp
  3. +13 −10 apps/openmw/mwbase/environment.cpp
  4. +13 −25 apps/openmw/mwbase/environment.hpp
  5. +37 −0 apps/openmw/mwbase/inputmanager.hpp
  6. +77 −0 apps/openmw/mwbase/mechanicsmanager.hpp
  7. +210 −0 apps/openmw/mwbase/windowmanager.hpp
  8. +2 −3 apps/openmw/mwclass/activator.cpp
  9. +1 −1 apps/openmw/mwclass/apparatus.cpp
  10. +1 −1 apps/openmw/mwclass/armor.cpp
  11. +1 −1 apps/openmw/mwclass/book.cpp
  12. +1 −1 apps/openmw/mwclass/clothing.cpp
  13. +1 −1 apps/openmw/mwclass/container.cpp
  14. +3 −3 apps/openmw/mwclass/creature.cpp
  15. +1 −1 apps/openmw/mwclass/door.cpp
  16. +1 −1 apps/openmw/mwclass/ingredient.cpp
  17. +1 −1 apps/openmw/mwclass/light.cpp
  18. +1 −1 apps/openmw/mwclass/lockpick.cpp
  19. +1 −1 apps/openmw/mwclass/misc.cpp
  20. +2 −2 apps/openmw/mwclass/npc.cpp
  21. +1 −1 apps/openmw/mwclass/potion.cpp
  22. +1 −1 apps/openmw/mwclass/probe.cpp
  23. +1 −1 apps/openmw/mwclass/repair.cpp
  24. +1 −1 apps/openmw/mwclass/weapon.cpp
  25. +3 −5 apps/openmw/mwdialogue/dialoguemanagerimp.cpp
  26. +2 −2 apps/openmw/mwdialogue/dialoguemanagerimp.hpp
  27. +3 −1 apps/openmw/mwdialogue/journalimp.cpp
  28. +2 −3 apps/openmw/mwgui/alchemywindow.cpp
  29. +1 −1 apps/openmw/mwgui/alchemywindow.hpp
  30. +11 −6 apps/openmw/mwgui/birth.cpp
  31. +2 −3 apps/openmw/mwgui/birth.hpp
  32. +2 −4 apps/openmw/mwgui/bookwindow.cpp
  33. +1 −2 apps/openmw/mwgui/bookwindow.hpp
  34. +63 −43 apps/openmw/mwgui/charactercreation.cpp
  35. +3 −6 apps/openmw/mwgui/charactercreation.hpp
  36. +27 −34 apps/openmw/mwgui/class.cpp
  37. +10 −11 apps/openmw/mwgui/class.hpp
  38. +1 −1 apps/openmw/mwgui/confirmationdialog.cpp
  39. +1 −1 apps/openmw/mwgui/confirmationdialog.hpp
  40. +2 −4 apps/openmw/mwgui/container.cpp
  41. +1 −1 apps/openmw/mwgui/container.hpp
  42. +1 −1 apps/openmw/mwgui/countdialog.cpp
  43. +1 −1 apps/openmw/mwgui/countdialog.hpp
  44. +2 −2 apps/openmw/mwgui/dialogue.cpp
  45. +1 −1 apps/openmw/mwgui/dialogue.hpp
  46. +3 −2 apps/openmw/mwgui/dialogue_history.cpp
  47. +1 −1 apps/openmw/mwgui/hud.cpp
  48. +2 −2 apps/openmw/mwgui/inventorywindow.cpp
  49. +1 −1 apps/openmw/mwgui/inventorywindow.hpp
  50. +2 −3 apps/openmw/mwgui/journalwindow.cpp
  51. +1 −3 apps/openmw/mwgui/journalwindow.hpp
  52. +1 −3 apps/openmw/mwgui/mainmenu.cpp
  53. +3 −2 apps/openmw/mwgui/map_window.cpp
  54. +2 −2 apps/openmw/mwgui/map_window.hpp
  55. +1 −1 apps/openmw/mwgui/messagebox.cpp
  56. +14 −14 apps/openmw/mwgui/messagebox.hpp
  57. +8 −5 apps/openmw/mwgui/race.cpp
  58. +1 −1 apps/openmw/mwgui/race.hpp
  59. +7 −4 apps/openmw/mwgui/review.cpp
  60. +1 −1 apps/openmw/mwgui/review.hpp
  61. +2 −4 apps/openmw/mwgui/scrollwindow.cpp
  62. +1 −1 apps/openmw/mwgui/scrollwindow.hpp
  63. +3 −4 apps/openmw/mwgui/settingswindow.cpp
  64. +1 −2 apps/openmw/mwgui/settingswindow.hpp
  65. +2 −2 apps/openmw/mwgui/spellwindow.cpp
  66. +1 −1 apps/openmw/mwgui/spellwindow.hpp
  67. +11 −10 apps/openmw/mwgui/stats_window.cpp
  68. +1 −2 apps/openmw/mwgui/stats_window.hpp
  69. +3 −2 apps/openmw/mwgui/text_input.cpp
  70. +1 −1 apps/openmw/mwgui/text_input.hpp
  71. +2 −2 apps/openmw/mwgui/tooltips.cpp
  72. +3 −5 apps/openmw/mwgui/tooltips.hpp
  73. +2 −2 apps/openmw/mwgui/tradewindow.cpp
  74. +1 −1 apps/openmw/mwgui/tradewindow.hpp
  75. +10 −6 apps/openmw/mwgui/widgets.cpp
  76. +19 −14 apps/openmw/mwgui/widgets.hpp
  77. +3 −2 apps/openmw/mwgui/window_base.cpp
  78. +8 −3 apps/openmw/mwgui/window_base.hpp
  79. +0 −317 apps/openmw/mwgui/window_manager.hpp
  80. +3 −3 apps/openmw/mwgui/window_pinnable_base.cpp
  81. +2 −3 apps/openmw/mwgui/window_pinnable_base.hpp
  82. +103 −27 apps/openmw/mwgui/{window_manager.cpp → windowmanagerimp.cpp}
  83. +254 −0 apps/openmw/mwgui/windowmanagerimp.hpp
  84. +7 −7 apps/openmw/mwinput/{inputmanager.cpp → inputmanagerimp.cpp}
  85. +13 −11 apps/openmw/mwinput/{inputmanager.hpp → inputmanagerimp.hpp}
  86. +4 −5 apps/openmw/mwmechanics/{mechanicsmanager.cpp → mechanicsmanagerimp.cpp}
  87. +16 −19 apps/openmw/mwmechanics/{mechanicsmanager.hpp → mechanicsmanagerimp.hpp}
  88. +3 −2 apps/openmw/mwrender/localmap.cpp
  89. +6 −5 apps/openmw/mwrender/renderingmanager.cpp
  90. +1 −9 apps/openmw/mwscript/controlextensions.cpp
  91. +1 −3 apps/openmw/mwscript/guiextensions.cpp
  92. +2 −4 apps/openmw/mwscript/interpretercontext.cpp
  93. +1 −1 apps/openmw/mwworld/actionalchemy.cpp
  94. +1 −2 apps/openmw/mwworld/actionopen.cpp
  95. +2 −1 apps/openmw/mwworld/actionread.cpp
  96. +1 −2 apps/openmw/mwworld/actiontake.cpp
  97. +5 −5 apps/openmw/mwworld/scene.cpp
  98. +13 −13 apps/openmw/mwworld/worldimp.cpp
  99. +22 −4 libs/openengine/ogre/renderer.cpp
  100. +21 −0 libs/openengine/ogre/renderer.hpp
View
9 apps/openmw/CMakeLists.txt
@@ -20,12 +20,12 @@ add_openmw_dir (mwrender
)
add_openmw_dir (mwinput
- inputmanager
+ inputmanagerimp
mouselookevent
)
add_openmw_dir (mwgui
- text_input widgets race class birth review window_manager console dialogue
+ text_input widgets race class birth review windowmanagerimp console dialogue
dialogue_history window_base stats_window messagebox journalwindow charactercreation
map_window window_pinnable_base cursorreplace tooltips scrollwindow bookwindow list
formatting inventorywindow container hud countdialog tradewindow settingswindow
@@ -60,12 +60,13 @@ add_openmw_dir (mwclass
)
add_openmw_dir (mwmechanics
- mechanicsmanager stat creaturestats magiceffects movement actors drawstate spells
+ mechanicsmanagerimp stat creaturestats magiceffects movement actors drawstate spells
activespells npcstats
)
add_openmw_dir (mwbase
- environment world scriptmanager dialoguemanager journal soundmanager
+ environment world scriptmanager dialoguemanager journal soundmanager mechanicsmanager
+ inputmanager windowmanager
)
# Main executable
View
6 apps/openmw/engine.cpp
@@ -13,9 +13,9 @@
#include <components/nifbullet/bullet_nif_loader.hpp>
#include <components/nifogre/ogre_nif_loader.hpp>
-#include "mwinput/inputmanager.hpp"
+#include "mwinput/inputmanagerimp.hpp"
-#include "mwgui/window_manager.hpp"
+#include "mwgui/windowmanagerimp.hpp"
#include "mwgui/cursorreplace.hpp"
#include "mwscript/scriptmanagerimp.hpp"
@@ -32,7 +32,7 @@
#include "mwdialogue/dialoguemanagerimp.hpp"
#include "mwdialogue/journalimp.hpp"
-#include "mwmechanics/mechanicsmanager.hpp"
+#include "mwmechanics/mechanicsmanagerimp.hpp"
void OMW::Engine::executeLocalScripts()
View
23 apps/openmw/mwbase/environment.cpp
@@ -3,15 +3,14 @@
#include <cassert>
-#include "../mwinput/inputmanager.hpp"
-
-#include "../mwmechanics/mechanicsmanager.hpp"
-
#include "world.hpp"
#include "scriptmanager.hpp"
#include "dialoguemanager.hpp"
#include "journal.hpp"
#include "soundmanager.hpp"
+#include "mechanicsmanager.hpp"
+#include "inputmanager.hpp"
+#include "windowmanager.hpp"
MWBase::Environment *MWBase::Environment::sThis = 0;
@@ -44,12 +43,12 @@ void MWBase::Environment::setScriptManager (ScriptManager *scriptManager)
mScriptManager = scriptManager;
}
-void MWBase::Environment::setWindowManager (MWGui::WindowManager *windowManager)
+void MWBase::Environment::setWindowManager (WindowManager *windowManager)
{
mWindowManager = windowManager;
}
-void MWBase::Environment::setMechanicsManager (MWMechanics::MechanicsManager *mechanicsManager)
+void MWBase::Environment::setMechanicsManager (MechanicsManager *mechanicsManager)
{
mMechanicsManager = mechanicsManager;
}
@@ -64,7 +63,7 @@ void MWBase::Environment::setJournal (Journal *journal)
mJournal = journal;
}
-void MWBase::Environment::setInputManager (MWInput::MWInputManager *inputManager)
+void MWBase::Environment::setInputManager (InputManager *inputManager)
{
mInputManager = inputManager;
}
@@ -92,13 +91,13 @@ MWBase::ScriptManager *MWBase::Environment::getScriptManager() const
return mScriptManager;
}
-MWGui::WindowManager *MWBase::Environment::getWindowManager() const
+MWBase::WindowManager *MWBase::Environment::getWindowManager() const
{
assert (mWindowManager);
return mWindowManager;
}
-MWMechanics::MechanicsManager *MWBase::Environment::getMechanicsManager() const
+MWBase::MechanicsManager *MWBase::Environment::getMechanicsManager() const
{
assert (mMechanicsManager);
return mMechanicsManager;
@@ -116,7 +115,7 @@ MWBase::Journal *MWBase::Environment::getJournal() const
return mJournal;
}
-MWInput::MWInputManager *MWBase::Environment::getInputManager() const
+MWBase::InputManager *MWBase::Environment::getInputManager() const
{
assert (mInputManager);
return mInputManager;
@@ -147,6 +146,10 @@ void MWBase::Environment::cleanup()
delete mScriptManager;
mScriptManager = 0;
+/// \todo Re-enable (currently throwing an exception)
+// delete mWindowManager;
+ mWindowManager = 0;
+
delete mWorld;
mWorld = 0;
}
View
38 apps/openmw/mwbase/environment.hpp
@@ -1,28 +1,16 @@
#ifndef GAME_BASE_INVIRONMENT_H
#define GAME_BASE_INVIRONMENT_H
-namespace MWGui
-{
- class WindowManager;
-}
-
-namespace MWMechanics
-{
- class MechanicsManager;
-}
-
-namespace MWInput
-{
- struct MWInputManager;
-}
-
namespace MWBase
{
class World;
class ScriptManager;
class DialogueManager;
class Journal;
class SoundManager;
+ class MechanicsManager;
+ class InputManager;
+ class WindowManager;
/// \brief Central hub for mw-subsystems
///
@@ -37,11 +25,11 @@ namespace MWBase
World *mWorld;
SoundManager *mSoundManager;
ScriptManager *mScriptManager;
- MWGui::WindowManager *mWindowManager;
- MWMechanics::MechanicsManager *mMechanicsManager;
+ WindowManager *mWindowManager;
+ MechanicsManager *mMechanicsManager;
DialogueManager *mDialogueManager;
Journal *mJournal;
- MWInput::MWInputManager *mInputManager;
+ InputManager *mInputManager;
float mFrameDuration;
Environment (const Environment&);
@@ -62,15 +50,15 @@ namespace MWBase
void setScriptManager (MWBase::ScriptManager *scriptManager);
- void setWindowManager (MWGui::WindowManager *windowManager);
+ void setWindowManager (WindowManager *windowManager);
- void setMechanicsManager (MWMechanics::MechanicsManager *mechanicsManager);
+ void setMechanicsManager (MechanicsManager *mechanicsManager);
void setDialogueManager (DialogueManager *dialogueManager);
void setJournal (Journal *journal);
- void setInputManager (MWInput::MWInputManager *inputManager);
+ void setInputManager (InputManager *inputManager);
void setFrameDuration (float duration);
///< Set length of current frame in seconds.
@@ -79,17 +67,17 @@ namespace MWBase
SoundManager *getSoundManager() const;
- MWBase::ScriptManager *getScriptManager() const;
+ ScriptManager *getScriptManager() const;
- MWGui::WindowManager *getWindowManager() const;
+ WindowManager *getWindowManager() const;
- MWMechanics::MechanicsManager *getMechanicsManager() const;
+ MechanicsManager *getMechanicsManager() const;
DialogueManager *getDialogueManager() const;
Journal *getJournal() const;
- MWInput::MWInputManager *getInputManager() const;
+ InputManager *getInputManager() const;
float getFrameDuration() const;
View
37 apps/openmw/mwbase/inputmanager.hpp
@@ -0,0 +1,37 @@
+#ifndef GAME_MWBASE_INPUTMANAGER_H
+#define GAME_MWBASE_INPUTMANAGER_H
+
+#include <string>
+
+#include <components/settings/settings.hpp>
+
+namespace MWBase
+{
+ /// \brief Interface for input manager (implemented in MWInput)
+ class InputManager
+ {
+ InputManager (const InputManager&);
+ ///< not implemented
+
+ InputManager& operator= (const InputManager&);
+ ///< not implemented
+
+ public:
+
+ InputManager() {}
+
+ virtual ~InputManager() {}
+
+ virtual void update() = 0;
+
+ virtual void changeInputMode(bool guiMode) = 0;
+
+ virtual void processChangedSettings(const Settings::CategorySettingVector& changed) = 0;
+
+ virtual void setDragDrop(bool dragDrop) = 0;
+
+ virtual void toggleControlSwitch (const std::string& sw, bool value) = 0;
+ };
+}
+
+#endif
View
77 apps/openmw/mwbase/mechanicsmanager.hpp
@@ -0,0 +1,77 @@
+#ifndef GAME_MWBASE_MECHANICSMANAGER_H
+#define GAME_MWBASE_MECHANICSMANAGER_H
+
+#include <string>
+#include <vector>
+
+namespace Ogre
+{
+ class Vector3;
+}
+
+namespace ESM
+{
+ struct Class;
+}
+
+namespace MWWorld
+{
+ class Ptr;
+ class CellStore;
+}
+
+namespace MWBase
+{
+ /// \brief Interface for game mechanics manager (implemented in MWMechanics)
+ class MechanicsManager
+ {
+ MechanicsManager (const MechanicsManager&);
+ ///< not implemented
+
+ MechanicsManager& operator= (const MechanicsManager&);
+ ///< not implemented
+
+ public:
+
+ MechanicsManager() {}
+
+ virtual ~MechanicsManager() {}
+
+ virtual void addActor (const MWWorld::Ptr& ptr) = 0;
+ ///< Register an actor for stats management
+
+ virtual void removeActor (const MWWorld::Ptr& ptr) = 0;
+ ///< Deregister an actor for stats management
+
+ virtual void dropActors (const MWWorld::CellStore *cellStore) = 0;
+ ///< Deregister all actors in the given cell.
+
+ virtual void watchActor (const MWWorld::Ptr& ptr) = 0;
+ ///< On each update look for changes in a previously registered actor and update the
+ /// GUI accordingly.
+
+ virtual void update (std::vector<std::pair<std::string, Ogre::Vector3> >& movement,
+ float duration, bool paused) = 0;
+ ///< Update actor stats and store desired velocity vectors in \a movement
+ ///
+ /// \param paused In game type does not currently advance (this usually means some GUI
+ /// component is up).
+
+ virtual void setPlayerName (const std::string& name) = 0;
+ ///< Set player name.
+
+ virtual void setPlayerRace (const std::string& id, bool male) = 0;
+ ///< Set player race.
+
+ virtual void setPlayerBirthsign (const std::string& id) = 0;
+ ///< Set player birthsign.
+
+ virtual void setPlayerClass (const std::string& id) = 0;
+ ///< Set player class to stock class.
+
+ virtual void setPlayerClass (const ESM::Class& class_) = 0;
+ ///< Set player class to custom class.
+ };
+}
+
+#endif
View
210 apps/openmw/mwbase/windowmanager.hpp
@@ -0,0 +1,210 @@
+#ifndef GAME_MWBASE_WINDOWMANAGER_H
+#define GAME_MWBASE_WINDOWMANAGER_H
+
+#include <string>
+#include <vector>
+#include <map>
+
+#include <components/settings/settings.hpp>
+
+#include "../mwmechanics/stat.hpp"
+
+#include "../mwgui/mode.hpp"
+
+namespace MyGUI
+{
+ class Gui;
+ class Widget;
+ class UString;
+}
+
+namespace OEngine
+{
+ namespace GUI
+ {
+ class Layout;
+ }
+}
+
+namespace ESM
+{
+ struct Class;
+}
+
+namespace MWWorld
+{
+ class CellStore;
+ class Ptr;
+}
+
+namespace MWGui
+{
+ class Console;
+ class SpellWindow;
+ class TradeWindow;
+ class ConfirmationDialog;
+ class CountDialog;
+ class ScrollWindow;
+ class BookWindow;
+ class InventoryWindow;
+ class ContainerWindow;
+ class DialogueWindow;
+}
+
+namespace MWBase
+{
+ /// \brief Interface for widnow manager (implemented in MWGui)
+ class WindowManager
+ {
+ WindowManager (const WindowManager&);
+ ///< not implemented
+
+ WindowManager& operator= (const WindowManager&);
+ ///< not implemented
+
+ public:
+
+ typedef std::vector<int> SkillList;
+
+ WindowManager() {}
+
+ virtual ~WindowManager() {}
+
+ /**
+ * Should be called each frame to update windows/gui elements.
+ * This could mean updating sizes of gui elements or opening
+ * new dialogs.
+ */
+ virtual void update() = 0;
+
+ virtual void pushGuiMode (MWGui::GuiMode mode) = 0;
+ virtual void popGuiMode() = 0;
+
+ virtual void removeGuiMode (MWGui::GuiMode mode) = 0;
+ ///< can be anywhere in the stack
+
+ virtual MWGui::GuiMode getMode() const = 0;
+
+ virtual bool isGuiMode() const = 0;
+
+ virtual void toggleVisible (MWGui::GuiWindow wnd) = 0;
+
+ /// Disallow all inventory mode windows
+ virtual void disallowAll() = 0;
+
+ /// Allow one or more windows
+ virtual void allow (MWGui::GuiWindow wnd) = 0;
+
+ virtual bool isAllowed (MWGui::GuiWindow wnd) const = 0;
+
+ /// \todo investigate, if we really need to expose every single lousy UI element to the outside world
+ virtual MWGui::DialogueWindow* getDialogueWindow() = 0;
+ virtual MWGui::ContainerWindow* getContainerWindow() = 0;
+ virtual MWGui::InventoryWindow* getInventoryWindow() = 0;
+ virtual MWGui::BookWindow* getBookWindow() = 0;
+ virtual MWGui::ScrollWindow* getScrollWindow() = 0;
+ virtual MWGui::CountDialog* getCountDialog() = 0;
+ virtual MWGui::ConfirmationDialog* getConfirmationDialog() = 0;
+ virtual MWGui::TradeWindow* getTradeWindow() = 0;
+ virtual MWGui::SpellWindow* getSpellWindow() = 0;
+ virtual MWGui::Console* getConsole() = 0;
+
+ virtual MyGUI::Gui* getGui() const = 0;
+
+ virtual void wmUpdateFps(float fps, unsigned int triangleCount, unsigned int batchCount) = 0;
+
+ /// Set value for the given ID.
+ virtual void setValue (const std::string& id, const MWMechanics::Stat<int>& value) = 0;
+ virtual void setValue (int parSkill, const MWMechanics::Stat<float>& value) = 0;
+ virtual void setValue (const std::string& id, const MWMechanics::DynamicStat<int>& value) = 0;
+ virtual void setValue (const std::string& id, const std::string& value) = 0;
+ virtual void setValue (const std::string& id, int value) = 0;
+
+ virtual void setPlayerClass (const ESM::Class &class_) = 0;
+ ///< set current class of player
+
+ virtual void configureSkills (const SkillList& major, const SkillList& minor) = 0;
+ ///< configure skill groups, each set contains the skill ID for that group.
+
+ virtual void setReputation (int reputation) = 0;
+ ///< set the current reputation value
+
+ virtual void setBounty (int bounty) = 0;
+ ///< set the current bounty value
+
+ virtual void updateSkillArea() = 0;
+ ///< update display of skills, factions, birth sign, reputation and bounty
+
+ virtual void changeCell(MWWorld::CellStore* cell) = 0;
+ ///< change the active cell
+
+ virtual void setPlayerPos(const float x, const float y) = 0;
+ ///< set player position in map space
+
+ virtual void setPlayerDir(const float x, const float y) = 0;
+ ///< set player view direction in map space
+
+ virtual void setFocusObject(const MWWorld::Ptr& focus) = 0;
+ virtual void setFocusObjectScreenCoords(float min_x, float min_y, float max_x, float max_y) = 0;
+
+ virtual void setMouseVisible(bool visible) = 0;
+ virtual void getMousePosition(int &x, int &y) = 0;
+ virtual void getMousePosition(float &x, float &y) = 0;
+ virtual void setDragDrop(bool dragDrop) = 0;
+ virtual bool getWorldMouseOver() = 0;
+
+ virtual void toggleFogOfWar() = 0;
+
+ virtual void toggleFullHelp() = 0;
+ ///< show extra info in item tooltips (owner, script)
+
+ virtual bool getFullHelp() const = 0;
+
+ virtual void setInteriorMapTexture(const int x, const int y) = 0;
+ ///< set the index of the map texture that should be used (for interiors)
+
+ /// sets the visibility of the hud health/magicka/stamina bars
+ virtual void setHMSVisibility(bool visible) = 0;
+
+ /// sets the visibility of the hud minimap
+ virtual void setMinimapVisibility(bool visible) = 0;
+ virtual void setWeaponVisibility(bool visible) = 0;
+ virtual void setSpellVisibility(bool visible) = 0;
+
+ virtual void setSelectedSpell(const std::string& spellId, int successChancePercent) = 0;
+ virtual void setSelectedEnchantItem(const MWWorld::Ptr& item, int chargePercent) = 0;
+ virtual void setSelectedWeapon(const MWWorld::Ptr& item, int durabilityPercent) = 0;
+ virtual void unsetSelectedSpell() = 0;
+ virtual void unsetSelectedWeapon() = 0;
+
+ virtual void removeDialog(OEngine::GUI::Layout* dialog) = 0;
+ ///< Hides dialog and schedules dialog to be deleted.
+
+ virtual void messageBox (const std::string& message, const std::vector<std::string>& buttons) = 0;
+ virtual int readPressedButton() = 0;
+ ///< returns the index of the pressed button or -1 if no button was pressed (->MessageBoxmanager->InteractiveMessageBox)
+
+ virtual void onFrame (float frameDuration) = 0;
+
+ /// \todo get rid of this stuff. Move it to the respective UI element classes, if needed.
+ virtual std::map<int, MWMechanics::Stat<float> > getPlayerSkillValues() = 0;
+ virtual std::map<int, MWMechanics::Stat<int> > getPlayerAttributeValues() = 0;
+ virtual SkillList getPlayerMinorSkills() = 0;
+ virtual SkillList getPlayerMajorSkills() = 0;
+
+ /**
+ * Fetches a GMST string from the store, if there is no setting with the given
+ * ID or it is not a string the default string is returned.
+ *
+ * @param id Identifier for the GMST setting, e.g. "aName"
+ * @param default Default value if the GMST setting cannot be used.
+ */
+ virtual const std::string &getGameSettingString(const std::string &id, const std::string &default_) = 0;
+
+ virtual void processChangedSettings(const Settings::CategorySettingVector& changed) = 0;
+
+ virtual void executeInConsole (const std::string& path) = 0;
+ };
+}
+
+#endif
View
5 apps/openmw/mwclass/activator.cpp
@@ -4,6 +4,7 @@
#include <components/esm/loadacti.hpp>
#include "../mwbase/environment.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld//cellstore.hpp"
#include "../mwworld/ptr.hpp"
@@ -12,7 +13,6 @@
#include "../mwrender/objects.hpp"
#include "../mwrender/renderinginterface.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
namespace MWClass
@@ -34,7 +34,7 @@ namespace MWClass
physics.insertObjectPhysics(ptr, model);
}
}
-
+
std::string Activator::getModel(const MWWorld::Ptr &ptr) const
{
MWWorld::LiveCellRef<ESM::Activator> *ref =
@@ -104,4 +104,3 @@ namespace MWClass
return MWWorld::Ptr(&cell.activators.insert(*ref), &cell);
}
}
-
View
2 apps/openmw/mwclass/apparatus.cpp
@@ -6,6 +6,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp"
@@ -16,7 +17,6 @@
#include "../mwrender/objects.hpp"
#include "../mwrender/renderinginterface.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
namespace MWClass
View
2 apps/openmw/mwclass/armor.cpp
@@ -8,6 +8,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp"
@@ -19,7 +20,6 @@
#include "../mwrender/objects.hpp"
#include "../mwrender/renderinginterface.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
namespace MWClass
View
2 apps/openmw/mwclass/book.cpp
@@ -6,6 +6,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actionread.hpp"
@@ -15,7 +16,6 @@
#include "../mwrender/objects.hpp"
#include "../mwrender/renderinginterface.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
namespace MWClass
View
2 apps/openmw/mwclass/clothing.cpp
@@ -6,6 +6,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp"
@@ -15,7 +16,6 @@
#include "../mwworld/physicssystem.hpp"
#include "../mwgui/tooltips.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwrender/objects.hpp"
#include "../mwrender/renderinginterface.hpp"
View
2 apps/openmw/mwclass/container.cpp
@@ -6,6 +6,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/nullaction.hpp"
@@ -15,7 +16,6 @@
#include "../mwworld/actionopen.hpp"
#include "../mwworld/physicssystem.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
#include "../mwrender/objects.hpp"
View
6 apps/openmw/mwclass/creature.cpp
@@ -4,10 +4,11 @@
#include <components/esm/loadcrea.hpp>
#include "../mwmechanics/creaturestats.hpp"
-#include "../mwmechanics/mechanicsmanager.hpp"
#include "../mwmechanics/magiceffects.hpp"
#include "../mwbase/environment.hpp"
+#include "../mwbase/mechanicsmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontalk.hpp"
@@ -17,7 +18,6 @@
#include "../mwrender/renderinginterface.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
namespace
@@ -104,7 +104,7 @@ namespace MWClass
if (!model.empty()) {
return "meshes\\" + model;
}
- return "";
+ return "";
}
std::string Creature::getName (const MWWorld::Ptr& ptr) const
View
2 apps/openmw/mwclass/door.cpp
@@ -6,6 +6,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/player.hpp"
#include "../mwworld/ptr.hpp"
@@ -14,7 +15,6 @@
#include "../mwworld/cellstore.hpp"
#include "../mwworld/physicssystem.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
#include "../mwrender/objects.hpp"
View
2 apps/openmw/mwclass/ingredient.cpp
@@ -6,13 +6,13 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwworld/physicssystem.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
#include "../mwrender/objects.hpp"
View
2 apps/openmw/mwclass/light.cpp
@@ -6,6 +6,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp"
@@ -15,7 +16,6 @@
#include "../mwworld/cellstore.hpp"
#include "../mwworld/physicssystem.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
#include "../mwrender/objects.hpp"
View
2 apps/openmw/mwclass/lockpick.cpp
@@ -6,6 +6,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp"
@@ -14,7 +15,6 @@
#include "../mwworld/cellstore.hpp"
#include "../mwworld/physicssystem.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
#include "../mwrender/objects.hpp"
View
2 apps/openmw/mwclass/misc.cpp
@@ -8,14 +8,14 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwworld/physicssystem.hpp"
#include "../mwworld/manualref.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
#include "../mwrender/objects.hpp"
View
4 apps/openmw/mwclass/npc.cpp
@@ -11,11 +11,12 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
+#include "../mwbase/mechanicsmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwmechanics/creaturestats.hpp"
#include "../mwmechanics/npcstats.hpp"
#include "../mwmechanics/movement.hpp"
-#include "../mwmechanics/mechanicsmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontalk.hpp"
@@ -26,7 +27,6 @@
#include "../mwrender/actors.hpp"
#include "../mwrender/renderinginterface.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
namespace
View
2 apps/openmw/mwclass/potion.cpp
@@ -6,6 +6,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp"
@@ -14,7 +15,6 @@
#include "../mwworld/physicssystem.hpp"
#include "../mwworld/player.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
#include "../mwrender/objects.hpp"
View
2 apps/openmw/mwclass/probe.cpp
@@ -6,6 +6,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp"
@@ -14,7 +15,6 @@
#include "../mwworld/cellstore.hpp"
#include "../mwworld/physicssystem.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
#include "../mwrender/objects.hpp"
View
2 apps/openmw/mwclass/repair.cpp
@@ -6,13 +6,13 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp"
#include "../mwworld/cellstore.hpp"
#include "../mwworld/physicssystem.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
#include "../mwrender/objects.hpp"
View
2 apps/openmw/mwclass/weapon.cpp
@@ -6,6 +6,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/actiontake.hpp"
@@ -14,7 +15,6 @@
#include "../mwworld/cellstore.hpp"
#include "../mwworld/physicssystem.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/tooltips.hpp"
#include "../mwrender/objects.hpp"
View
8 apps/openmw/mwdialogue/dialoguemanagerimp.cpp
@@ -13,30 +13,28 @@
#include "../mwbase/world.hpp"
#include "../mwbase/scriptmanager.hpp"
#include "../mwbase/journal.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/class.hpp"
#include "../mwworld/refdata.hpp"
#include "../mwworld/player.hpp"
#include "../mwworld/containerstore.hpp"
-#include "../mwinput/inputmanager.hpp"
#include "../mwgui/dialogue.hpp"
-#include "../mwgui/window_manager.hpp"
#include <iostream>
-#include "../mwscript/extensions.hpp"
-
#include <components/compiler/exception.hpp>
#include <components/compiler/errorhandler.hpp>
#include <components/compiler/scanner.hpp>
#include <components/compiler/locals.hpp>
#include <components/compiler/output.hpp>
+#include <components/compiler/scriptparser.hpp>
#include <components/interpreter/interpreter.hpp>
#include "../mwscript/compilercontext.hpp"
#include "../mwscript/interpretercontext.hpp"
-#include <components/compiler/scriptparser.hpp>
+#include "../mwscript/extensions.hpp"
#include "../mwclass/npc.hpp"
#include "../mwmechanics/npcstats.hpp"
View
4 apps/openmw/mwdialogue/dialoguemanagerimp.hpp
@@ -1,15 +1,15 @@
#ifndef GAME_MWDIALOG_DIALOGUEMANAGERIMP_H
#define GAME_MWDIALOG_DIALOGUEMANAGERIMP_H
+#include "../mwbase/dialoguemanager.hpp"
+
#include <components/esm/loadinfo.hpp>
#include <components/compiler/streamerrorhandler.hpp>
#include "../mwscript/compilercontext.hpp"
#include "../mwscript/interpretercontext.hpp"
#include <components/compiler/output.hpp>
-#include "../mwbase/dialoguemanager.hpp"
-
#include "../mwworld/ptr.hpp"
#include <map>
View
4 apps/openmw/mwdialogue/journalimp.cpp
@@ -1,10 +1,12 @@
#include "journalimp.hpp"
+#include <components/esm_store/store.hpp>
+
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
+#include "../mwbase/windowmanager.hpp"
-#include "../mwgui/window_manager.hpp"
#include "../mwgui/messagebox.hpp"
namespace MWDialogue
View
5 apps/openmw/mwgui/alchemywindow.cpp
@@ -5,13 +5,12 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/player.hpp"
#include "../mwworld/manualref.hpp"
#include "../mwworld/containerstore.hpp"
-#include "window_manager.hpp"
-
namespace
{
std::string getIconPath(MWWorld::Ptr ptr)
@@ -27,7 +26,7 @@ namespace
namespace MWGui
{
- AlchemyWindow::AlchemyWindow(WindowManager& parWindowManager)
+ AlchemyWindow::AlchemyWindow(MWBase::WindowManager& parWindowManager)
: WindowBase("openmw_alchemy_window.layout", parWindowManager)
, ContainerBase(0)
{
View
2 apps/openmw/mwgui/alchemywindow.hpp
@@ -10,7 +10,7 @@ namespace MWGui
class AlchemyWindow : public WindowBase, public ContainerBase
{
public:
- AlchemyWindow(WindowManager& parWindowManager);
+ AlchemyWindow(MWBase::WindowManager& parWindowManager);
virtual void open();
View
17 apps/openmw/mwgui/birth.cpp
@@ -1,15 +1,20 @@
#include "birth.hpp"
-#include "window_manager.hpp"
-#include "widgets.hpp"
-#include "components/esm_store/store.hpp"
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
+#include "components/esm_store/store.hpp"
+
+#include "../mwbase/environment.hpp"
+#include "../mwbase/world.hpp"
+#include "../mwbase/windowmanager.hpp"
+
+#include "widgets.hpp"
+
using namespace MWGui;
using namespace Widgets;
-BirthDialog::BirthDialog(WindowManager& parWindowManager)
+BirthDialog::BirthDialog(MWBase::WindowManager& parWindowManager)
: WindowBase("openmw_chargen_birth.layout", parWindowManager)
{
// Centre dialog
@@ -114,7 +119,7 @@ void BirthDialog::updateBirths()
{
mBirthList->removeAllItems();
- const ESMS::ESMStore &store = mWindowManager.getStore();
+ const ESMS::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
ESMS::RecListT<ESM::BirthSign>::MapType::const_iterator it = store.birthSigns.list.begin();
ESMS::RecListT<ESM::BirthSign>::MapType::const_iterator end = store.birthSigns.list.end();
@@ -144,7 +149,7 @@ void BirthDialog::updateSpells()
const int lineHeight = 18;
MyGUI::IntCoord coord(0, 0, mSpellArea->getWidth(), 18);
- const ESMS::ESMStore &store = mWindowManager.getStore();
+ const ESMS::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
const ESM::BirthSign *birth = store.birthSigns.find(mCurrentBirthId);
std::string texturePath = std::string("textures\\") + birth->texture;
View
5 apps/openmw/mwgui/birth.hpp
@@ -10,14 +10,13 @@
namespace MWGui
{
+ /// \todo remove
using namespace MyGUI;
- class WindowManager;
-
class BirthDialog : public WindowBase
{
public:
- BirthDialog(WindowManager& parWindowManager);
+ BirthDialog(MWBase::WindowManager& parWindowManager);
enum Gender
{
View
6 apps/openmw/mwgui/bookwindow.cpp
@@ -5,18 +5,16 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/soundmanager.hpp"
-
-#include "../mwinput/inputmanager.hpp"
+#include "../mwbase/windowmanager.hpp"
#include "../mwworld/actiontake.hpp"
#include "../mwworld/player.hpp"
#include "formatting.hpp"
-#include "window_manager.hpp"
using namespace MWGui;
-BookWindow::BookWindow (WindowManager& parWindowManager) :
+BookWindow::BookWindow (MWBase::WindowManager& parWindowManager) :
WindowBase("openmw_book.layout", parWindowManager)
{
getWidget(mCloseButton, "CloseButton");
View
3 apps/openmw/mwgui/bookwindow.hpp
@@ -10,7 +10,7 @@ namespace MWGui
class BookWindow : public WindowBase
{
public:
- BookWindow(WindowManager& parWindowManager);
+ BookWindow(MWBase::WindowManager& parWindowManager);
void open(MWWorld::Ptr book);
void setTakeButtonShow(bool show);
@@ -43,4 +43,3 @@ namespace MWGui
}
#endif
-
View
106 apps/openmw/mwgui/charactercreation.cpp
@@ -10,6 +10,7 @@
#include "../mwbase/environment.hpp"
#include "../mwbase/soundmanager.hpp"
+#include "../mwbase/mechanicsmanager.hpp"
namespace
{
@@ -103,11 +104,19 @@ namespace
{ESM::Class::Combat, ESM::Class::Magic, ESM::Class::Stealth}
}
} };
+
+ struct ClassPoint
+ {
+ const char *id;
+ // Specialization points to match, in order: Stealth, Combat, Magic
+ // Note: Order is taken from http://www.uesp.net/wiki/Morrowind:Class_Quiz
+ unsigned int points[3];
+ };
}
using namespace MWGui;
-CharacterCreation::CharacterCreation(WindowManager* _wm)
+CharacterCreation::CharacterCreation(MWBase::WindowManager* _wm)
: mNameDialog(0)
, mRaceDialog(0)
, mClassChoiceDialog(0)
@@ -178,8 +187,8 @@ void CharacterCreation::spawnDialog(const char id)
switch (id)
{
case GM_Name:
- if(mNameDialog)
- mWM->removeDialog(mNameDialog);
+ mWM->removeDialog(mNameDialog);
+ mNameDialog = 0;
mNameDialog = new TextInputDialog(*mWM);
mNameDialog->setTextLabel(mWM->getGameSettingString("sName", "Name"));
mNameDialog->setTextInput(mPlayerName);
@@ -189,8 +198,8 @@ void CharacterCreation::spawnDialog(const char id)
break;
case GM_Race:
- if (mRaceDialog)
- mWM->removeDialog(mRaceDialog);
+ mWM->removeDialog(mRaceDialog);
+ mRaceDialog = 0;
mRaceDialog = new RaceDialog(*mWM);
mRaceDialog->setNextButtonShow(mCreationStage >= CSE_RaceChosen);
mRaceDialog->setRaceId(mPlayerRaceId);
@@ -200,16 +209,16 @@ void CharacterCreation::spawnDialog(const char id)
break;
case GM_Class:
- if (mClassChoiceDialog)
- mWM->removeDialog(mClassChoiceDialog);
+ mWM->removeDialog(mClassChoiceDialog);
+ mClassChoiceDialog = 0;
mClassChoiceDialog = new ClassChoiceDialog(*mWM);
mClassChoiceDialog->eventButtonSelected += MyGUI::newDelegate(this, &CharacterCreation::onClassChoice);
mClassChoiceDialog->open();
break;
case GM_ClassPick:
- if (mPickClassDialog)
- mWM->removeDialog(mPickClassDialog);
+ mWM->removeDialog(mPickClassDialog);
+ mPickClassDialog = 0;
mPickClassDialog = new PickClassDialog(*mWM);
mPickClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
mPickClassDialog->setClassId(mPlayerClass.name);
@@ -219,8 +228,8 @@ void CharacterCreation::spawnDialog(const char id)
break;
case GM_Birth:
- if (mBirthSignDialog)
- mWM->removeDialog(mBirthSignDialog);
+ mWM->removeDialog(mBirthSignDialog);
+ mBirthSignDialog = 0;
mBirthSignDialog = new BirthDialog(*mWM);
mBirthSignDialog->setNextButtonShow(mCreationStage >= CSE_BirthSignChosen);
mBirthSignDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onBirthSignDialogDone);
@@ -229,8 +238,8 @@ void CharacterCreation::spawnDialog(const char id)
break;
case GM_ClassCreate:
- if (mCreateClassDialog)
- mWM->removeDialog(mCreateClassDialog);
+ mWM->removeDialog(mCreateClassDialog);
+ mCreateClassDialog = 0;
mCreateClassDialog = new CreateClassDialog(*mWM);
mCreateClassDialog->setNextButtonShow(mCreationStage >= CSE_ClassChosen);
mCreateClassDialog->eventDone += MyGUI::newDelegate(this, &CharacterCreation::onCreateClassDialogDone);
@@ -246,8 +255,8 @@ void CharacterCreation::spawnDialog(const char id)
showClassQuestionDialog();
break;
case GM_Review:
- if (mReviewDialog)
- mWM->removeDialog(mReviewDialog);
+ mWM->removeDialog(mReviewDialog);
+ mReviewDialog = 0;
mReviewDialog = new ReviewDialog(*mWM);
mReviewDialog->setPlayerName(mPlayerName);
mReviewDialog->setRace(mPlayerRaceId);
@@ -259,20 +268,20 @@ void CharacterCreation::spawnDialog(const char id)
mReviewDialog->setFatigue(mPlayerFatigue);
{
- std::map<ESM::Attribute::AttributeID, MWMechanics::Stat<int> > attributes = mWM->getPlayerAttributeValues();
- for (std::map<ESM::Attribute::AttributeID, MWMechanics::Stat<int> >::iterator it = attributes.begin();
+ std::map<int, MWMechanics::Stat<int> > attributes = mWM->getPlayerAttributeValues();
+ for (std::map<int, MWMechanics::Stat<int> >::iterator it = attributes.begin();
it != attributes.end(); ++it)
{
- mReviewDialog->setAttribute(it->first, it->second);
+ mReviewDialog->setAttribute(static_cast<ESM::Attribute::AttributeID> (it->first), it->second);
}
}
{
- std::map<ESM::Skill::SkillEnum, MWMechanics::Stat<float> > skills = mWM->getPlayerSkillValues();
- for (std::map<ESM::Skill::SkillEnum, MWMechanics::Stat<float> >::iterator it = skills.begin();
+ std::map<int, MWMechanics::Stat<float> > skills = mWM->getPlayerSkillValues();
+ for (std::map<int, MWMechanics::Stat<float> >::iterator it = skills.begin();
it != skills.end(); ++it)
{
- mReviewDialog->setSkillValue(it->first, it->second);
+ mReviewDialog->setSkillValue(static_cast<ESM::Skill::SkillEnum> (it->first), it->second);
}