forked from mirror/openmw-tes3mp
Undid some code clean up changes, and changed how some includes work
This commit is contained in:
parent
77d365e196
commit
ee36ace00b
6 changed files with 197 additions and 200 deletions
|
@ -46,7 +46,10 @@ namespace MyGUI
|
|||
|
||||
namespace MWInput
|
||||
{
|
||||
/// \brief Class that handles all input and key bindings for OpenMW.
|
||||
|
||||
/**
|
||||
* @brief Class that handles all input and key bindings for OpenMW.
|
||||
*/
|
||||
class InputManager :
|
||||
public MWBase::InputManager,
|
||||
public SFO::KeyListener,
|
||||
|
@ -65,7 +68,6 @@ namespace MWInput
|
|||
/// Clear all savegame-specific data
|
||||
virtual void clear();
|
||||
|
||||
|
||||
virtual void update(float dt, bool disableControls=false, bool disableEvents=false);
|
||||
|
||||
void setPlayer (MWWorld::Player* player) { mPlayer = player; }
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "aipackage.hpp"
|
||||
#include <string>
|
||||
#include "pathfinding.hpp"
|
||||
#include "../../../components/esm/defs.hpp"
|
||||
#include <components/esm/defs.hpp>
|
||||
#include "../mwworld/class.hpp"
|
||||
|
||||
namespace MWMechanics
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "aipackage.hpp"
|
||||
#include <string>
|
||||
#include "pathfinding.hpp"
|
||||
#include "../../../components/esm/defs.hpp"
|
||||
#include <components/esm/defs.hpp>
|
||||
|
||||
namespace MWMechanics
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define GAME_MWMECHANICS_AIPACKAGE_H
|
||||
|
||||
#include "pathfinding.hpp"
|
||||
#include "../../../components/esm/defs.hpp"
|
||||
#include <components/esm/defs.hpp>
|
||||
|
||||
#include "obstacle.hpp"
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@ namespace MWMechanics
|
|||
typedef std::vector<ESM::ENAMstruct> TEffectsContainer;
|
||||
typedef TEffectsContainer::const_iterator TEffectsIterator;
|
||||
|
||||
/// Result of potion creation
|
||||
/** Only Result_Success results in success **/
|
||||
enum Result
|
||||
{
|
||||
Result_Success,
|
||||
|
@ -44,46 +42,6 @@ namespace MWMechanics
|
|||
Result_RandomFailure
|
||||
};
|
||||
|
||||
/// Set alchemist and configure alchemy setup accordingly.
|
||||
/** \a npc may be empty to indicate that there is no alchemist (alchemy session has ended). **/
|
||||
void setAlchemist (const MWWorld::Ptr& npc);
|
||||
|
||||
/// \attention Iterates over tool slots, not over tools. Some of the slots may be empty.
|
||||
TToolsIterator beginTools() const;
|
||||
|
||||
TToolsIterator endTools() const;
|
||||
|
||||
/// \attention Iterates over ingredient slots, not over ingredients. Some of the slots may be empty.
|
||||
TIngredientsIterator beginIngredients() const;
|
||||
|
||||
TIngredientsIterator endIngredients() const;
|
||||
|
||||
/// Remove alchemist, tools and ingredients.
|
||||
void clear();
|
||||
|
||||
/// Add ingredient into the next free slot.
|
||||
///
|
||||
/// \return Slot index or -1, if adding failed because of no free slot or the ingredient type being
|
||||
/// listed already.
|
||||
int addIngredient (const MWWorld::Ptr& ingredient);
|
||||
|
||||
/// Remove ingredient from slot (calling this function on an empty slot is a no-op).
|
||||
void removeIngredient (int index);
|
||||
|
||||
TEffectsIterator beginEffects() const;
|
||||
|
||||
TEffectsIterator endEffects() const;
|
||||
|
||||
/// Return the name of the potion that would be created when calling create (if a record for such
|
||||
/// a potion already exists) or return an empty string.
|
||||
std::string getPotionName() const;
|
||||
|
||||
/// Try to create a potion from the ingredients, place it in the inventory of the alchemist and
|
||||
/// adjust the skills of the alchemist accordingly.
|
||||
/// \param name must not be an empty string, unless there is already a potion record (
|
||||
/// getPotionName() does not return an empty string).
|
||||
Result create (const std::string& name);
|
||||
|
||||
private:
|
||||
|
||||
MWWorld::Ptr mAlchemist;
|
||||
|
@ -92,19 +50,19 @@ namespace MWMechanics
|
|||
TEffectsContainer mEffects;
|
||||
int mValue;
|
||||
|
||||
/// List all effects shared by at least two ingredients.
|
||||
std::set<EffectKey> listEffects() const;
|
||||
///< List all effects shared by at least two ingredients.
|
||||
|
||||
void applyTools (int flags, float& value) const;
|
||||
|
||||
void updateEffects();
|
||||
|
||||
/// Return existing recrod for created potion (may return 0)
|
||||
const ESM::Potion *getRecord() const;
|
||||
///< Return existing recrod for created potion (may return 0)
|
||||
|
||||
/// Remove selected ingredients from alchemist's inventory, cleanup selected ingredients and
|
||||
/// update effect list accordingly.
|
||||
void removeIngredients();
|
||||
///< Remove selected ingredients from alchemist's inventory, cleanup selected ingredients and
|
||||
/// update effect list accordingly.
|
||||
|
||||
void addPotion (const std::string& name);
|
||||
///< Add a potion to the alchemist's inventory.
|
||||
|
@ -116,6 +74,48 @@ namespace MWMechanics
|
|||
///< Return chance of success.
|
||||
|
||||
int countIngredients() const;
|
||||
|
||||
public:
|
||||
|
||||
void setAlchemist (const MWWorld::Ptr& npc);
|
||||
///< Set alchemist and configure alchemy setup accordingly. \a npc may be empty to indicate that
|
||||
/// there is no alchemist (alchemy session has ended).
|
||||
|
||||
TToolsIterator beginTools() const;
|
||||
///< \attention Iterates over tool slots, not over tools. Some of the slots may be empty.
|
||||
|
||||
TToolsIterator endTools() const;
|
||||
|
||||
TIngredientsIterator beginIngredients() const;
|
||||
///< \attention Iterates over ingredient slots, not over ingredients. Some of the slots may be empty.
|
||||
|
||||
TIngredientsIterator endIngredients() const;
|
||||
|
||||
void clear();
|
||||
///< Remove alchemist, tools and ingredients.
|
||||
|
||||
int addIngredient (const MWWorld::Ptr& ingredient);
|
||||
///< Add ingredient into the next free slot.
|
||||
///
|
||||
/// \return Slot index or -1, if adding failed because of no free slot or the ingredient type being
|
||||
/// listed already.
|
||||
|
||||
void removeIngredient (int index);
|
||||
///< Remove ingredient from slot (calling this function on an empty slot is a no-op).
|
||||
|
||||
TEffectsIterator beginEffects() const;
|
||||
|
||||
TEffectsIterator endEffects() const;
|
||||
|
||||
std::string getPotionName() const;
|
||||
///< Return the name of the potion that would be created when calling create (if a record for such
|
||||
/// a potion already exists) or return an empty string.
|
||||
|
||||
Result create (const std::string& name);
|
||||
///< Try to create a potion from the ingredients, place it in the inventory of the alchemist and
|
||||
/// adjust the skills of the alchemist accordingly.
|
||||
/// \param name must not be an empty string, unless there is already a potion record (
|
||||
/// getPotionName() does not return an empty string).
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ namespace MWMechanics
|
|||
class Movement;
|
||||
class CreatureStats;
|
||||
|
||||
///Priority of actions
|
||||
enum Priority {
|
||||
Priority_Default,
|
||||
Priority_Jump,
|
||||
|
@ -39,7 +38,6 @@ namespace MWMechanics
|
|||
Num_Priorities
|
||||
};
|
||||
|
||||
/// Current action of the character
|
||||
enum CharacterState {
|
||||
CharState_None,
|
||||
|
||||
|
@ -101,7 +99,6 @@ namespace MWMechanics
|
|||
CharState_Block
|
||||
};
|
||||
|
||||
///Weapon type
|
||||
enum WeaponType {
|
||||
WeapType_None,
|
||||
|
||||
|
@ -117,7 +114,6 @@ namespace MWMechanics
|
|||
WeapType_Spell
|
||||
};
|
||||
|
||||
///Specific, weapon based state of the character
|
||||
enum UpperBodyCharacterState {
|
||||
UpperCharState_Nothing,
|
||||
UpperCharState_EquipingWeap,
|
||||
|
@ -131,7 +127,6 @@ namespace MWMechanics
|
|||
UpperCharState_CastingSpell
|
||||
};
|
||||
|
||||
///Current jumping state
|
||||
enum JumpingState {
|
||||
JumpState_None,
|
||||
JumpState_Falling,
|
||||
|
|
Loading…
Reference in a new issue