mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-02 14:57:59 +03:00
Merge branch 'dialogue' into saving
Conflicts: apps/opencs/model/world/columnimp.hpp apps/opencs/model/world/columns.cpp apps/opencs/model/world/columns.hpp apps/opencs/model/world/data.cpp components/esm/loaddial.hpp
This commit is contained in:
commit
c995533e07
143 changed files with 1861 additions and 454 deletions
|
@ -260,6 +260,8 @@ namespace Compiler
|
|||
extensions.registerInstruction ("sv", "", opcodeShowVars, opcodeShowVarsExplicit);
|
||||
extensions.registerInstruction("tgm", "", opcodeToggleGodMode);
|
||||
extensions.registerInstruction("togglegodmode", "", opcodeToggleGodMode);
|
||||
extensions.registerInstruction ("disablelevitation", "", opcodeDisableLevitation);
|
||||
extensions.registerInstruction ("enablelevitation", "", opcodeEnableLevitation);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -222,6 +222,8 @@ namespace Compiler
|
|||
const int opcodeShowVars = 0x200021d;
|
||||
const int opcodeShowVarsExplicit = 0x200021e;
|
||||
const int opcodeToggleGodMode = 0x200021f;
|
||||
const int opcodeDisableLevitation = 0x2000220;
|
||||
const int opcodeEnableLevitation = 0x2000221;
|
||||
}
|
||||
|
||||
namespace Sky
|
||||
|
|
|
@ -38,4 +38,9 @@ void Dialogue::save(ESMWriter &esm) const
|
|||
}
|
||||
}
|
||||
|
||||
void Dialogue::blank()
|
||||
{
|
||||
mInfo.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,6 +37,9 @@ struct Dialogue
|
|||
|
||||
void load(ESMReader &esm);
|
||||
void save(ESMWriter &esm) const;
|
||||
|
||||
void blank();
|
||||
///< Set record to default state (does not touch the ID and does not change the type).
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -272,5 +272,23 @@ short MagicEffect::effectStringToId(const std::string &effect)
|
|||
return name->first;
|
||||
}
|
||||
|
||||
MagicEffect::MagnitudeDisplayType MagicEffect::getMagnitudeDisplayType() const {
|
||||
if ( mData.mFlags & NoMagnitude )
|
||||
return MDT_None;
|
||||
if ( mIndex == 84 )
|
||||
return MDT_TimesInt;
|
||||
if ( mIndex == 59 ||
|
||||
( mIndex >= 64 && mIndex <= 66) )
|
||||
return MDT_Feet;
|
||||
if ( mIndex == 118 || mIndex == 119 )
|
||||
return MDT_Level;
|
||||
if ( ( mIndex >= 28 && mIndex <= 36 )
|
||||
|| ( mIndex >= 90 && mIndex <= 99 )
|
||||
|| mIndex == 40 || mIndex == 47
|
||||
|| mIndex == 57 || mIndex == 68 )
|
||||
return MDT_Percentage;
|
||||
|
||||
return MDT_Points;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,6 +34,15 @@ struct MagicEffect
|
|||
Negative = 0x0800 // A harmful effect. Will determine whether
|
||||
// eg. NPCs regard this spell as an attack. (same as 0x10?)
|
||||
};
|
||||
enum MagnitudeDisplayType
|
||||
{
|
||||
MDT_None,
|
||||
MDT_Feet,
|
||||
MDT_Level,
|
||||
MDT_Percentage,
|
||||
MDT_Points,
|
||||
MDT_TimesInt
|
||||
};
|
||||
|
||||
struct MEDTstruct
|
||||
{
|
||||
|
@ -49,6 +58,7 @@ struct MagicEffect
|
|||
|
||||
static const std::string &effectIdToString(short effectID);
|
||||
static short effectStringToId(const std::string &effect);
|
||||
MagnitudeDisplayType getMagnitudeDisplayType() const;
|
||||
|
||||
|
||||
MEDTstruct mData;
|
||||
|
|
|
@ -425,7 +425,7 @@ void Node::getProperties(const Nif::NiTexturingProperty *&texprop,
|
|||
|
||||
Ogre::Matrix4 Node::getLocalTransform() const
|
||||
{
|
||||
Ogre::Matrix4 mat4(Ogre::Matrix4::IDENTITY);
|
||||
Ogre::Matrix4 mat4 = Ogre::Matrix4(Ogre::Matrix4::IDENTITY);
|
||||
mat4.makeTransform(trafo.pos, Ogre::Vector3(trafo.scale), Ogre::Quaternion(trafo.rotation));
|
||||
return mat4;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue