From e411c6e83382b909feeb6f413549f5f266669750 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Mon, 13 Sep 2010 22:59:28 +0200 Subject: [PATCH] added callback-interface for character creation --- apps/openmw/mwmechanics/mechanicsmanager.cpp | 30 +++++++++++++++++ apps/openmw/mwmechanics/mechanicsmanager.hpp | 34 +++++++++++++++----- 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/apps/openmw/mwmechanics/mechanicsmanager.cpp b/apps/openmw/mwmechanics/mechanicsmanager.cpp index 229a351ac..2222d8fee 100644 --- a/apps/openmw/mwmechanics/mechanicsmanager.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanager.cpp @@ -83,4 +83,34 @@ namespace MWMechanics } } } + + void MechanicsManager::setPlayerName (const std::string& name) + { + + } + + void MechanicsManager::setPlayerRace (const std::string& race, bool male) + { + + } + + void MechanicsManager::setPlayerBirthsign (const std::string& id) + { + + } + + void MechanicsManager::setPlayerClass (const std::string& id) + { + + } + + void MechanicsManager::setPlayerClass (const ESM::Class& class_) + { + + } + + void MechanicsManager::finalizePlayer() + { + + } } diff --git a/apps/openmw/mwmechanics/mechanicsmanager.hpp b/apps/openmw/mwmechanics/mechanicsmanager.hpp index 5c96ce21f..140e6fae4 100644 --- a/apps/openmw/mwmechanics/mechanicsmanager.hpp +++ b/apps/openmw/mwmechanics/mechanicsmanager.hpp @@ -26,30 +26,48 @@ namespace MWMechanics std::set mActors; MWWorld::Ptr mWatched; CreatureStats mWatchedCreature; - + public: - + MechanicsManager (const ESMS::ESMStore& store, MWGui::WindowManager& windowManager); - + void configureGUI(); - + void addActor (const MWWorld::Ptr& ptr); ///< Register an actor for stats management void removeActor (const MWWorld::Ptr& ptr); ///< Deregister an actor for stats management - + void dropActors (const MWWorld::Ptr::CellStore *cellStore); ///< Deregister all actors in the given cell. - + void watchActor (const MWWorld::Ptr& ptr); ///< On each update look for changes in a previously registered actor and update the /// GUI accordingly. - + void update(); ///< Update actor stats + + void setPlayerName (const std::string& name); + ///< Set player name. + + void setPlayerRace (const std::string& id, bool male); + ///< Set player race. + + void setPlayerBirthsign (const std::string& id); + ///< Set player birthsign. + + void setPlayerClass (const std::string& id); + ///< Set player class to stock class. + + void setPlayerClass (const ESM::Class& class_); + ///< Set player class to custom class. + + void finalizePlayer(); + ///< Configure player according to previously called setPlayer functions. + }; } #endif -