mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 19:49:41 +00:00
Merge branch 'next' of https://github.com/zinnschlag/openmw into spellcreation
Conflicts: apps/openmw/mwgui/dialogue.cpp
This commit is contained in:
commit
ac0c1ea986
54 changed files with 289 additions and 165 deletions
|
@ -226,7 +226,7 @@ int main(int argc, char**argv)
|
||||||
case REC_BOOK:
|
case REC_BOOK:
|
||||||
{
|
{
|
||||||
Book b;
|
Book b;
|
||||||
b.load(esm);
|
b.load(esm, id);
|
||||||
if(quiet) break;
|
if(quiet) break;
|
||||||
cout << " Name: " << b.name << endl;
|
cout << " Name: " << b.name << endl;
|
||||||
cout << " Mesh: " << b.model << endl;
|
cout << " Mesh: " << b.model << endl;
|
||||||
|
|
|
@ -30,6 +30,7 @@ add_openmw_dir (mwgui
|
||||||
formatting inventorywindow container hud countdialog tradewindow settingswindow
|
formatting inventorywindow container hud countdialog tradewindow settingswindow
|
||||||
confirmationdialog alchemywindow referenceinterface spellwindow mainmenu quickkeysmenu
|
confirmationdialog alchemywindow referenceinterface spellwindow mainmenu quickkeysmenu
|
||||||
itemselection spellbuyingwindow loadingscreen levelupdialog waitdialog spellcreationdialog
|
itemselection spellbuyingwindow loadingscreen levelupdialog waitdialog spellcreationdialog
|
||||||
|
enchantingdialog
|
||||||
)
|
)
|
||||||
|
|
||||||
add_openmw_dir (mwdialogue
|
add_openmw_dir (mwdialogue
|
||||||
|
|
|
@ -228,6 +228,7 @@ namespace MWBase
|
||||||
virtual bool getPlayerSleeping() = 0;
|
virtual bool getPlayerSleeping() = 0;
|
||||||
|
|
||||||
virtual void startSpellMaking(MWWorld::Ptr actor) = 0;
|
virtual void startSpellMaking(MWWorld::Ptr actor) = 0;
|
||||||
|
virtual void startEnchanting(MWWorld::Ptr actor) = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,12 +128,10 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
text += "\n" + store.gameSettings.search("sQuality")->str + ": " + MWGui::ToolTips::toString(ref->base->data.quality);
|
text += "\n#{sQuality}: " + MWGui::ToolTips::toString(ref->base->data.quality);
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -152,13 +152,13 @@ namespace MWClass
|
||||||
if (typeGmst.empty())
|
if (typeGmst.empty())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
float iWeight = MWBase::Environment::get().getWorld()->getStore().gameSettings.find (typeGmst)->i;
|
float iWeight = MWBase::Environment::get().getWorld()->getStore().gameSettings.find (typeGmst)->getInt();
|
||||||
|
|
||||||
if (iWeight * MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fLightMaxMod")->f>=
|
if (iWeight * MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fLightMaxMod")->getFloat()>=
|
||||||
ref->base->data.weight)
|
ref->base->data.weight)
|
||||||
return ESM::Skill::LightArmor;
|
return ESM::Skill::LightArmor;
|
||||||
|
|
||||||
if (iWeight * MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMedMaxMod")->f>=
|
if (iWeight * MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMedMaxMod")->getFloat()>=
|
||||||
ref->base->data.weight)
|
ref->base->data.weight)
|
||||||
return ESM::Skill::MediumArmor;
|
return ESM::Skill::MediumArmor;
|
||||||
|
|
||||||
|
@ -229,25 +229,23 @@ namespace MWClass
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
// get armor type string (light/medium/heavy)
|
// get armor type string (light/medium/heavy)
|
||||||
int armorType = getEquipmentSkill(ptr);
|
int armorType = getEquipmentSkill(ptr);
|
||||||
std::string typeText;
|
std::string typeText;
|
||||||
if (armorType == ESM::Skill::LightArmor)
|
if (armorType == ESM::Skill::LightArmor)
|
||||||
typeText = store.gameSettings.search("sLight")->str;
|
typeText = "#{sLight}";
|
||||||
else if (armorType == ESM::Skill::MediumArmor)
|
else if (armorType == ESM::Skill::MediumArmor)
|
||||||
typeText = store.gameSettings.search("sMedium")->str;
|
typeText = "#{sMedium}";
|
||||||
else
|
else
|
||||||
typeText = store.gameSettings.search("sHeavy")->str;
|
typeText = "#{sHeavy}";
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sArmorRating")->str + ": " + MWGui::ToolTips::toString(ref->base->data.armor);
|
text += "\n#{sArmorRating}: " + MWGui::ToolTips::toString(ref->base->data.armor);
|
||||||
|
|
||||||
/// \todo store the current armor health somewhere
|
/// \todo store the current armor health somewhere
|
||||||
text += "\n" + store.gameSettings.search("sCondition")->str + ": " + MWGui::ToolTips::toString(ref->base->data.health);
|
text += "\n#{sCondition}: " + MWGui::ToolTips::toString(ref->base->data.health);
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight) + " (" + typeText + ")";
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight) + " (" + typeText + ")";
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -124,12 +124,10 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -193,12 +193,10 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -185,13 +185,11 @@ namespace MWClass
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
info.caption = ref->base->name;
|
info.caption = ref->base->name;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
if (ref->ref.lockLevel > 0)
|
if (ref->ref.lockLevel > 0)
|
||||||
text += "\n" + store.gameSettings.search("sLockLevel")->str + ": " + MWGui::ToolTips::toString(ref->ref.lockLevel);
|
text += "\n#{sLockLevel}: " + MWGui::ToolTips::toString(ref->ref.lockLevel);
|
||||||
if (ref->ref.trap != "")
|
if (ref->ref.trap != "")
|
||||||
text += "\n" + store.gameSettings.search("sTrapped")->str;
|
text += "\n#{sTrapped}";
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -223,14 +223,14 @@ namespace MWClass
|
||||||
dest = region->name;
|
dest = region->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += "\n" + store.gameSettings.search("sTo")->str;
|
text += "\n#{sTo}";
|
||||||
text += "\n"+dest;
|
text += "\n"+dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ref->ref.lockLevel > 0)
|
if (ref->ref.lockLevel > 0)
|
||||||
text += "\n" + store.gameSettings.search("sLockLevel")->str + ": " + MWGui::ToolTips::toString(ref->ref.lockLevel);
|
text += "\n#{sLockLevel}: " + MWGui::ToolTips::toString(ref->ref.lockLevel);
|
||||||
if (ref->ref.trap != "")
|
if (ref->ref.trap != "")
|
||||||
text += "\n" + store.gameSettings.search("sTrapped")->str;
|
text += "\n#{sTrapped}";
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
|
||||||
text += MWGui::ToolTips::getMiscString(ref->base->script, "Script");
|
text += MWGui::ToolTips::getMiscString(ref->base->script, "Script");
|
||||||
|
|
|
@ -145,12 +145,10 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -173,12 +173,10 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -137,16 +137,14 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
/// \todo store remaining uses somewhere
|
/// \todo store remaining uses somewhere
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sUses")->str + ": " + MWGui::ToolTips::toString(ref->base->data.uses);
|
text += "\n#{sUses}: " + MWGui::ToolTips::toString(ref->base->data.uses);
|
||||||
text += "\n" + store.gameSettings.search("sQuality")->str + ": " + MWGui::ToolTips::toString(ref->base->data.quality);
|
text += "\n#{sQuality}: " + MWGui::ToolTips::toString(ref->base->data.quality);
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -101,7 +101,7 @@ namespace MWClass
|
||||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||||
ptr.get<ESM::Miscellaneous>();
|
ptr.get<ESM::Miscellaneous>();
|
||||||
|
|
||||||
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGold")->getString())
|
||||||
{
|
{
|
||||||
return std::string("Item Gold Up");
|
return std::string("Item Gold Up");
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ namespace MWClass
|
||||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||||
ptr.get<ESM::Miscellaneous>();
|
ptr.get<ESM::Miscellaneous>();
|
||||||
|
|
||||||
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGold")->getString())
|
||||||
{
|
{
|
||||||
return std::string("Item Gold Down");
|
return std::string("Item Gold Down");
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ namespace MWClass
|
||||||
|
|
||||||
int count = ptr.getRefData().getCount();
|
int count = ptr.getRefData().getCount();
|
||||||
|
|
||||||
bool isGold = (ref->base->name == store.gameSettings.search("sGold")->str);
|
bool isGold = (ref->base->name == store.gameSettings.find("sGold")->getString());
|
||||||
if (isGold && count == 1)
|
if (isGold && count == 1)
|
||||||
count = ref->base->data.value;
|
count = ref->base->data.value;
|
||||||
|
|
||||||
|
@ -170,8 +170,8 @@ namespace MWClass
|
||||||
|
|
||||||
if (!isGold)
|
if (!isGold)
|
||||||
{
|
{
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
|
@ -192,7 +192,7 @@ namespace MWClass
|
||||||
const ESMS::ESMStore &store =
|
const ESMS::ESMStore &store =
|
||||||
MWBase::Environment::get().getWorld()->getStore();
|
MWBase::Environment::get().getWorld()->getStore();
|
||||||
|
|
||||||
if (MWWorld::Class::get(ptr).getName(ptr) == store.gameSettings.search("sGold")->str) {
|
if (MWWorld::Class::get(ptr).getName(ptr) == store.gameSettings.find("sGold")->getString()) {
|
||||||
int goldAmount = ptr.getRefData().getCount();
|
int goldAmount = ptr.getRefData().getCount();
|
||||||
|
|
||||||
std::string base = "Gold_001";
|
std::string base = "Gold_001";
|
||||||
|
|
|
@ -129,12 +129,10 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
info.effects = MWGui::Widgets::MWEffectList::effectListFromESM(&ref->base->effects);
|
info.effects = MWGui::Widgets::MWEffectList::effectListFromESM(&ref->base->effects);
|
||||||
info.isPotion = true;
|
info.isPotion = true;
|
||||||
|
|
|
@ -136,16 +136,14 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
/// \todo store remaining uses somewhere
|
/// \todo store remaining uses somewhere
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sUses")->str + ": " + MWGui::ToolTips::toString(ref->base->data.uses);
|
text += "\n#{sUses}: " + MWGui::ToolTips::toString(ref->base->data.uses);
|
||||||
text += "\n" + store.gameSettings.search("sQuality")->str + ": " + MWGui::ToolTips::toString(ref->base->data.quality);
|
text += "\n#{sQuality}: " + MWGui::ToolTips::toString(ref->base->data.quality);
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -130,11 +130,10 @@ namespace MWClass
|
||||||
|
|
||||||
/// \todo store remaining uses somewhere
|
/// \todo store remaining uses somewhere
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
text += "\n#{sUses}: " + MWGui::ToolTips::toString(ref->base->data.uses);
|
||||||
text += "\n" + store.gameSettings.search("sUses")->str + ": " + MWGui::ToolTips::toString(ref->base->data.uses);
|
text += "\n#{sQuality}: " + MWGui::ToolTips::toString(ref->base->data.quality);
|
||||||
text += "\n" + store.gameSettings.search("sQuality")->str + ": " + MWGui::ToolTips::toString(ref->base->data.quality);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -284,7 +284,7 @@ namespace MWClass
|
||||||
// weapon type & damage. arrows / bolts don't have his info.
|
// weapon type & damage. arrows / bolts don't have his info.
|
||||||
if (ref->base->data.type < 12)
|
if (ref->base->data.type < 12)
|
||||||
{
|
{
|
||||||
text += "\n" + store.gameSettings.search("sType")->str + " ";
|
text += "\n#{sType} ";
|
||||||
|
|
||||||
std::map <int, std::pair <std::string, std::string> > mapping;
|
std::map <int, std::pair <std::string, std::string> > mapping;
|
||||||
mapping[ESM::Weapon::ShortBladeOneHand] = std::make_pair("sSkillShortblade", "sOneHanded");
|
mapping[ESM::Weapon::ShortBladeOneHand] = std::make_pair("sSkillShortblade", "sOneHanded");
|
||||||
|
@ -303,29 +303,29 @@ namespace MWClass
|
||||||
std::string type = mapping[ref->base->data.type].first;
|
std::string type = mapping[ref->base->data.type].first;
|
||||||
std::string oneOrTwoHanded = mapping[ref->base->data.type].second;
|
std::string oneOrTwoHanded = mapping[ref->base->data.type].second;
|
||||||
|
|
||||||
text += store.gameSettings.search(type)->str +
|
text += store.gameSettings.find(type)->getString() +
|
||||||
((oneOrTwoHanded != "") ? ", " + store.gameSettings.search(oneOrTwoHanded)->str : "");
|
((oneOrTwoHanded != "") ? ", " + store.gameSettings.find(oneOrTwoHanded)->getString() : "");
|
||||||
|
|
||||||
// weapon damage
|
// weapon damage
|
||||||
if (ref->base->data.type >= 9)
|
if (ref->base->data.type >= 9)
|
||||||
{
|
{
|
||||||
// marksman
|
// marksman
|
||||||
text += "\n" + store.gameSettings.search("sAttack")->str + ": "
|
text += "\n#{sAttack}: "
|
||||||
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[0]))
|
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[0]))
|
||||||
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[1]));
|
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[1]));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Chop
|
// Chop
|
||||||
text += "\n" + store.gameSettings.search("sChop")->str + ": "
|
text += "\n#{sChop}: "
|
||||||
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[0]))
|
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[0]))
|
||||||
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[1]));
|
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[1]));
|
||||||
// Slash
|
// Slash
|
||||||
text += "\n" + store.gameSettings.search("sSlash")->str + ": "
|
text += "\n#{sSlash}: "
|
||||||
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.slash[0]))
|
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.slash[0]))
|
||||||
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.slash[1]));
|
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.slash[1]));
|
||||||
// Thrust
|
// Thrust
|
||||||
text += "\n" + store.gameSettings.search("sThrust")->str + ": "
|
text += "\n#{sThrust}: "
|
||||||
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.thrust[0]))
|
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.thrust[0]))
|
||||||
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.thrust[1]));
|
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.thrust[1]));
|
||||||
}
|
}
|
||||||
|
@ -333,10 +333,10 @@ namespace MWClass
|
||||||
|
|
||||||
/// \todo store the current weapon health somewhere
|
/// \todo store the current weapon health somewhere
|
||||||
if (ref->base->data.type < 11) // thrown weapons and arrows/bolts don't have health, only quantity
|
if (ref->base->data.type < 11) // thrown weapons and arrows/bolts don't have health, only quantity
|
||||||
text += "\n" + store.gameSettings.search("sCondition")->str + ": " + MWGui::ToolTips::toString(ref->base->data.health);
|
text += "\n#{sCondition}: " + MWGui::ToolTips::toString(ref->base->data.health);
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
info.enchant = ref->base->enchant;
|
info.enchant = ref->base->enchant;
|
||||||
|
|
||||||
|
|
|
@ -801,6 +801,9 @@ namespace MWDialogue
|
||||||
if (services & ESM::NPC::Spellmaking)
|
if (services & ESM::NPC::Spellmaking)
|
||||||
windowServices |= MWGui::DialogueWindow::Service_CreateSpells;
|
windowServices |= MWGui::DialogueWindow::Service_CreateSpells;
|
||||||
|
|
||||||
|
if (services & ESM::NPC::Enchanting)
|
||||||
|
windowServices |= MWGui::DialogueWindow::Service_Enchant;
|
||||||
|
|
||||||
win->setServices (windowServices);
|
win->setServices (windowServices);
|
||||||
|
|
||||||
// sort again, because the previous sort was case-sensitive
|
// sort again, because the previous sort was case-sensitive
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace MWDialogue
|
||||||
quest.addEntry (entry); // we are doing slicing on purpose here
|
quest.addEntry (entry); // we are doing slicing on purpose here
|
||||||
|
|
||||||
std::vector<std::string> empty;
|
std::vector<std::string> empty;
|
||||||
std::string notification = MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sJournalEntry")->str;
|
std::string notification = "#{sJournalEntry}";
|
||||||
MWBase::Environment::get().getWindowManager()->messageBox (notification, empty);
|
MWBase::Environment::get().getWindowManager()->messageBox (notification, empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ void ContainerBase::onSelectedItem(MyGUI::Widget* _sender)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string message = MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sTake")->str;
|
std::string message = "#{sTake}";
|
||||||
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
||||||
dialog->open(MWWorld::Class::get(object).getName(object), message, count);
|
dialog->open(MWWorld::Class::get(object).getName(object), message, count);
|
||||||
dialog->eventOkClicked.clear();
|
dialog->eventOkClicked.clear();
|
||||||
|
@ -130,18 +130,17 @@ void ContainerBase::onSelectedItem(MyGUI::Widget* _sender)
|
||||||
// the player is trying to sell an item, check if the merchant accepts it
|
// the player is trying to sell an item, check if the merchant accepts it
|
||||||
// also, don't allow selling gold (let's be better than Morrowind at this, can we?)
|
// also, don't allow selling gold (let's be better than Morrowind at this, can we?)
|
||||||
if (!MWBase::Environment::get().getWindowManager()->getTradeWindow()->npcAcceptsItem(object)
|
if (!MWBase::Environment::get().getWindowManager()->getTradeWindow()->npcAcceptsItem(object)
|
||||||
|| MWWorld::Class::get(object).getName(object) == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
|| MWWorld::Class::get(object).getName(object) == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGold")->getString())
|
||||||
{
|
{
|
||||||
// user notification "i don't buy this item"
|
// user notification "i don't buy this item"
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarterDialog4")->str, std::vector<std::string>());
|
messageBox("#{sBarterDialog4}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool buying = isTradeWindow(); // buying or selling?
|
bool buying = isTradeWindow(); // buying or selling?
|
||||||
std::string message = buying ? MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sQuanityMenuMessage02")->str
|
std::string message = buying ? "#{sQuanityMenuMessage02}" : "#{sQuanityMenuMessage01}";
|
||||||
: MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sQuanityMenuMessage01")->str;
|
|
||||||
|
|
||||||
if (std::find(mBoughtItems.begin(), mBoughtItems.end(), object) != mBoughtItems.end())
|
if (std::find(mBoughtItems.begin(), mBoughtItems.end(), object) != mBoughtItems.end())
|
||||||
{
|
{
|
||||||
|
@ -279,7 +278,7 @@ void ContainerBase::onContainerClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
// user notification
|
// user notification
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sContentsMessage2")->str, std::vector<std::string>());
|
messageBox("#{sContentsMessage2}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -302,7 +301,7 @@ void ContainerBase::onContainerClicked(MyGUI::Widget* _sender)
|
||||||
object.getRefData().setCount(origCount);
|
object.getRefData().setCount(origCount);
|
||||||
// user notification
|
// user notification
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sContentsMessage3")->str, std::vector<std::string>());
|
messageBox("#{sContentsMessage3}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -363,7 +362,7 @@ void ContainerBase::drawItems()
|
||||||
int maxHeight = mItemView->getSize().height - 58;
|
int maxHeight = mItemView->getSize().height - 58;
|
||||||
|
|
||||||
bool onlyMagic = false;
|
bool onlyMagic = false;
|
||||||
int categories;
|
int categories = 0;
|
||||||
if (mFilter == Filter_All)
|
if (mFilter == Filter_All)
|
||||||
categories = MWWorld::ContainerStore::Type_All;
|
categories = MWWorld::ContainerStore::Type_All;
|
||||||
else if (mFilter == Filter_Weapon)
|
else if (mFilter == Filter_Weapon)
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
|
|
||||||
mLabelText->setCaption(message);
|
mLabelText->setCaptionWithReplacing(message);
|
||||||
|
|
||||||
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
|
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
|
||||||
|
|
||||||
|
|
|
@ -126,22 +126,27 @@ void DialogueWindow::onSelectTopic(std::string topic)
|
||||||
{
|
{
|
||||||
if (!mEnabled) return;
|
if (!mEnabled) return;
|
||||||
|
|
||||||
if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarter")->str)
|
if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sBarter")->getString())
|
||||||
{
|
{
|
||||||
/// \todo check if the player is allowed to trade with this actor (e.g. faction rank high enough)?
|
/// \todo check if the player is allowed to trade with this actor (e.g. faction rank high enough)?
|
||||||
mWindowManager.pushGuiMode(GM_Barter);
|
mWindowManager.pushGuiMode(GM_Barter);
|
||||||
mWindowManager.getTradeWindow()->startTrade(mPtr);
|
mWindowManager.getTradeWindow()->startTrade(mPtr);
|
||||||
}
|
}
|
||||||
else if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sSpells")->str)
|
else if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sSpells")->getString())
|
||||||
{
|
{
|
||||||
mWindowManager.pushGuiMode(GM_SpellBuying);
|
mWindowManager.pushGuiMode(GM_SpellBuying);
|
||||||
mWindowManager.getSpellBuyingWindow()->startSpellBuying(mPtr);
|
mWindowManager.getSpellBuyingWindow()->startSpellBuying(mPtr);
|
||||||
}
|
}
|
||||||
else if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sSpellMakingMenuTitle")->str)
|
else if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sSpellMakingMenuTitle")->getString())
|
||||||
{
|
{
|
||||||
mWindowManager.pushGuiMode(GM_SpellCreation);
|
mWindowManager.pushGuiMode(GM_SpellCreation);
|
||||||
mWindowManager.startSpellMaking (mPtr);
|
mWindowManager.startSpellMaking (mPtr);
|
||||||
}
|
}
|
||||||
|
else if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sEnchanting")->getString())
|
||||||
|
{
|
||||||
|
mWindowManager.pushGuiMode(GM_Enchanting);
|
||||||
|
mWindowManager.startEnchanting (mPtr);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
MWBase::Environment::get().getDialogueManager()->keywordSelected(lower_string(topic));
|
MWBase::Environment::get().getDialogueManager()->keywordSelected(lower_string(topic));
|
||||||
}
|
}
|
||||||
|
@ -165,13 +170,16 @@ void DialogueWindow::setKeywords(std::list<std::string> keyWords)
|
||||||
bool anyService = mServices > 0;
|
bool anyService = mServices > 0;
|
||||||
|
|
||||||
if (mServices & Service_Trade)
|
if (mServices & Service_Trade)
|
||||||
mTopicsList->addItem(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarter")->str);
|
mTopicsList->addItem(MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sBarter")->getString());
|
||||||
|
|
||||||
if (mServices & Service_BuySpells)
|
if (mServices & Service_BuySpells)
|
||||||
mTopicsList->addItem(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sSpells")->str);
|
mTopicsList->addItem(MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sSpells")->getString());
|
||||||
|
|
||||||
if (mServices & Service_CreateSpells)
|
if (mServices & Service_CreateSpells)
|
||||||
mTopicsList->addItem(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sSpellmakingMenuTitle")->str);
|
mTopicsList->addItem(MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sSpellmakingMenuTitle")->getString());
|
||||||
|
|
||||||
|
if (mServices & Service_Enchant)
|
||||||
|
mTopicsList->addItem(MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sEnchanting")->getString());
|
||||||
|
|
||||||
if (anyService)
|
if (anyService)
|
||||||
mTopicsList->addSeparator();
|
mTopicsList->addSeparator();
|
||||||
|
@ -276,7 +284,7 @@ void DialogueWindow::updateOptions()
|
||||||
|
|
||||||
void DialogueWindow::goodbye()
|
void DialogueWindow::goodbye()
|
||||||
{
|
{
|
||||||
mHistory->addDialogText("\n#572D21" + MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGoodbye")->str);
|
mHistory->addDialogText("\n#572D21" + MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGoodbye")->getString());
|
||||||
mTopicsList->setEnabled(false);
|
mTopicsList->setEnabled(false);
|
||||||
mEnabled = false;
|
mEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,8 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
Service_Trade = 0x01,
|
Service_Trade = 0x01,
|
||||||
Service_BuySpells = 0x02,
|
Service_BuySpells = 0x02,
|
||||||
Service_CreateSpells = 0x04
|
Service_CreateSpells = 0x04,
|
||||||
|
Service_Enchant = 0x08
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
30
apps/openmw/mwgui/enchantingdialog.cpp
Normal file
30
apps/openmw/mwgui/enchantingdialog.cpp
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
#include "enchantingdialog.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
namespace MWGui
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
EnchantingDialog::EnchantingDialog(MWBase::WindowManager &parWindowManager)
|
||||||
|
: WindowBase("openmw_enchanting_dialog.layout", parWindowManager)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnchantingDialog::open()
|
||||||
|
{
|
||||||
|
center();
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnchantingDialog::startEnchanting (MWWorld::Ptr actor)
|
||||||
|
{
|
||||||
|
mPtr = actor;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnchantingDialog::onReferenceUnavailable ()
|
||||||
|
{
|
||||||
|
mWindowManager.removeGuiMode (GM_Dialogue);
|
||||||
|
mWindowManager.removeGuiMode (GM_Enchanting);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
26
apps/openmw/mwgui/enchantingdialog.hpp
Normal file
26
apps/openmw/mwgui/enchantingdialog.hpp
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
#ifndef MWGUI_ENCHANTINGDIALOG_H
|
||||||
|
#define MWGUI_ENCHANTINGDIALOG_H
|
||||||
|
|
||||||
|
#include "window_base.hpp"
|
||||||
|
#include "referenceinterface.hpp"
|
||||||
|
|
||||||
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
|
namespace MWGui
|
||||||
|
{
|
||||||
|
|
||||||
|
class EnchantingDialog : public WindowBase, public ReferenceInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
EnchantingDialog(MWBase::WindowManager& parWindowManager);
|
||||||
|
|
||||||
|
virtual void open();
|
||||||
|
void startEnchanting(MWWorld::Ptr actor);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void onReferenceUnavailable();
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -224,6 +224,9 @@ void LocalMapBase::setPlayerPos(const float x, const float y)
|
||||||
{
|
{
|
||||||
if (x == mLastPositionX && y == mLastPositionY)
|
if (x == mLastPositionX && y == mLastPositionY)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
notifyPlayerUpdate ();
|
||||||
|
|
||||||
MyGUI::IntSize size = mLocalMap->getCanvasSize();
|
MyGUI::IntSize size = mLocalMap->getCanvasSize();
|
||||||
MyGUI::IntPoint middle = MyGUI::IntPoint((1/3.f + x/3.f)*size.width,(1/3.f + y/3.f)*size.height);
|
MyGUI::IntPoint middle = MyGUI::IntPoint((1/3.f + x/3.f)*size.width,(1/3.f + y/3.f)*size.height);
|
||||||
MyGUI::IntCoord viewsize = mLocalMap->getCoord();
|
MyGUI::IntCoord viewsize = mLocalMap->getCoord();
|
||||||
|
@ -239,6 +242,9 @@ void LocalMapBase::setPlayerDir(const float x, const float y)
|
||||||
{
|
{
|
||||||
if (x == mLastDirectionX && y == mLastDirectionY)
|
if (x == mLastDirectionX && y == mLastDirectionY)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
notifyPlayerUpdate ();
|
||||||
|
|
||||||
MyGUI::ISubWidget* main = mCompass->getSubWidgetMain();
|
MyGUI::ISubWidget* main = mCompass->getSubWidgetMain();
|
||||||
MyGUI::RotatingSkin* rotatingSubskin = main->castType<MyGUI::RotatingSkin>();
|
MyGUI::RotatingSkin* rotatingSubskin = main->castType<MyGUI::RotatingSkin>();
|
||||||
rotatingSubskin->setCenter(MyGUI::IntPoint(16,16));
|
rotatingSubskin->setCenter(MyGUI::IntPoint(16,16));
|
||||||
|
@ -407,3 +413,9 @@ void MapWindow::globalMapUpdatePlayer ()
|
||||||
MyGUI::IntPoint viewoffs(0.5*viewsize.width - worldX, 0.5*viewsize.height - worldY);
|
MyGUI::IntPoint viewoffs(0.5*viewsize.width - worldX, 0.5*viewsize.height - worldY);
|
||||||
mGlobalMap->setViewOffset(viewoffs);
|
mGlobalMap->setViewOffset(viewoffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MapWindow::notifyPlayerUpdate ()
|
||||||
|
{
|
||||||
|
if (mGlobal)
|
||||||
|
globalMapUpdatePlayer ();
|
||||||
|
}
|
||||||
|
|
|
@ -49,6 +49,8 @@ namespace MWGui
|
||||||
void onMarkerFocused(MyGUI::Widget* w1, MyGUI::Widget* w2);
|
void onMarkerFocused(MyGUI::Widget* w1, MyGUI::Widget* w2);
|
||||||
void onMarkerUnfocused(MyGUI::Widget* w1, MyGUI::Widget* w2);
|
void onMarkerUnfocused(MyGUI::Widget* w1, MyGUI::Widget* w2);
|
||||||
|
|
||||||
|
virtual void notifyPlayerUpdate() {}
|
||||||
|
|
||||||
OEngine::GUI::Layout* mLayout;
|
OEngine::GUI::Layout* mLayout;
|
||||||
|
|
||||||
bool mMapDragAndDrop;
|
bool mMapDragAndDrop;
|
||||||
|
@ -93,6 +95,8 @@ namespace MWGui
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void onPinToggled();
|
virtual void onPinToggled();
|
||||||
|
|
||||||
|
virtual void notifyPlayerUpdate();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,6 +23,7 @@ namespace MWGui
|
||||||
GM_RestBed,
|
GM_RestBed,
|
||||||
GM_SpellBuying,
|
GM_SpellBuying,
|
||||||
GM_SpellCreation,
|
GM_SpellCreation,
|
||||||
|
GM_Enchanting,
|
||||||
|
|
||||||
GM_Levelup,
|
GM_Levelup,
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,6 @@ RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager)
|
||||||
setText("AppearanceT", mWindowManager.getGameSettingString("sRaceMenu1", "Appearance"));
|
setText("AppearanceT", mWindowManager.getGameSettingString("sRaceMenu1", "Appearance"));
|
||||||
getWidget(mPreviewImage, "PreviewImage");
|
getWidget(mPreviewImage, "PreviewImage");
|
||||||
|
|
||||||
MWBase::Environment::get().getWorld ()->setupExternalRendering (mPreview);
|
|
||||||
mPreview.update (0);
|
|
||||||
|
|
||||||
mPreviewImage->setImageTexture ("CharacterHeadPreview");
|
|
||||||
|
|
||||||
getWidget(mHeadRotate, "HeadRotate");
|
getWidget(mHeadRotate, "HeadRotate");
|
||||||
mHeadRotate->setScrollRange(50);
|
mHeadRotate->setScrollRange(50);
|
||||||
mHeadRotate->setScrollPosition(25);
|
mHeadRotate->setScrollPosition(25);
|
||||||
|
@ -107,6 +102,12 @@ void RaceDialog::open()
|
||||||
updateRaces();
|
updateRaces();
|
||||||
updateSkills();
|
updateSkills();
|
||||||
updateSpellPowers();
|
updateSpellPowers();
|
||||||
|
|
||||||
|
mPreview = new MWRender::RaceSelectionPreview();
|
||||||
|
MWBase::Environment::get().getWorld ()->setupExternalRendering (*mPreview);
|
||||||
|
mPreview->update (0);
|
||||||
|
|
||||||
|
mPreviewImage->setImageTexture ("CharacterHeadPreview");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -138,6 +139,12 @@ int wrap(int index, int max)
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RaceDialog::close()
|
||||||
|
{
|
||||||
|
delete mPreview;
|
||||||
|
mPreview = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// widget controls
|
// widget controls
|
||||||
|
|
||||||
void RaceDialog::onOkClicked(MyGUI::Widget* _sender)
|
void RaceDialog::onOkClicked(MyGUI::Widget* _sender)
|
||||||
|
@ -154,7 +161,7 @@ void RaceDialog::onHeadRotate(MyGUI::ScrollBar*, size_t _position)
|
||||||
{
|
{
|
||||||
float angle = (float(_position) / 49.f - 0.5) * 3.14 * 2;
|
float angle = (float(_position) / 49.f - 0.5) * 3.14 * 2;
|
||||||
float diff = angle - mCurrentAngle;
|
float diff = angle - mCurrentAngle;
|
||||||
mPreview.update (diff);
|
mPreview->update (diff);
|
||||||
mCurrentAngle += diff;
|
mCurrentAngle += diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ namespace MWGui
|
||||||
|
|
||||||
void setNextButtonShow(bool shown);
|
void setNextButtonShow(bool shown);
|
||||||
virtual void open();
|
virtual void open();
|
||||||
|
virtual void close();
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
|
||||||
|
@ -94,7 +95,7 @@ namespace MWGui
|
||||||
|
|
||||||
float mCurrentAngle;
|
float mCurrentAngle;
|
||||||
|
|
||||||
MWRender::RaceSelectionPreview mPreview;
|
MWRender::RaceSelectionPreview* mPreview;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -50,12 +50,12 @@ namespace MWGui
|
||||||
void SpellBuyingWindow::addSpell(const std::string& spellId)
|
void SpellBuyingWindow::addSpell(const std::string& spellId)
|
||||||
{
|
{
|
||||||
const ESM::Spell* spell = MWBase::Environment::get().getWorld()->getStore().spells.find(spellId);
|
const ESM::Spell* spell = MWBase::Environment::get().getWorld()->getStore().spells.find(spellId);
|
||||||
int price = spell->data.cost*MWBase::Environment::get().getWorld()->getStore().gameSettings.search("fSpellValueMult")->f;
|
int price = spell->data.cost*MWBase::Environment::get().getWorld()->getStore().gameSettings.find("fSpellValueMult")->getFloat();
|
||||||
MyGUI::Button* toAdd = mSpellsView->createWidget<MyGUI::Button>((price>mWindowManager.getInventoryWindow()->getPlayerGold()) ? "SandTextGreyedOut" : "SpellText", 0, mCurrentY, 200, sLineHeight, MyGUI::Align::Default);
|
MyGUI::Button* toAdd = mSpellsView->createWidget<MyGUI::Button>((price>mWindowManager.getInventoryWindow()->getPlayerGold()) ? "SandTextGreyedOut" : "SpellText", 0, mCurrentY, 200, sLineHeight, MyGUI::Align::Default);
|
||||||
mCurrentY += sLineHeight;
|
mCurrentY += sLineHeight;
|
||||||
/// \todo price adjustment depending on merchantile skill
|
/// \todo price adjustment depending on merchantile skill
|
||||||
toAdd->setUserData(price);
|
toAdd->setUserData(price);
|
||||||
toAdd->setCaption(spell->name+" - "+boost::lexical_cast<std::string>(price)+MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sgp")->str);
|
toAdd->setCaptionWithReplacing(spell->name+" - "+boost::lexical_cast<std::string>(price)+"#{sgp}");
|
||||||
toAdd->setSize(toAdd->getTextSize().width,sLineHeight);
|
toAdd->setSize(toAdd->getTextSize().width,sLineHeight);
|
||||||
toAdd->eventMouseWheel += MyGUI::newDelegate(this, &SpellBuyingWindow::onMouseWheel);
|
toAdd->eventMouseWheel += MyGUI::newDelegate(this, &SpellBuyingWindow::onMouseWheel);
|
||||||
toAdd->setUserString("ToolTipType", "Spell");
|
toAdd->setUserString("ToolTipType", "Spell");
|
||||||
|
@ -126,8 +126,7 @@ namespace MWGui
|
||||||
|
|
||||||
void SpellBuyingWindow::updateLabels()
|
void SpellBuyingWindow::updateLabels()
|
||||||
{
|
{
|
||||||
mPlayerGold->setCaption(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str
|
mPlayerGold->setCaptionWithReplacing("#{sGold}: " + boost::lexical_cast<std::string>(mWindowManager.getInventoryWindow()->getPlayerGold()));
|
||||||
+ ": " + boost::lexical_cast<std::string>(mWindowManager.getInventoryWindow()->getPlayerGold()));
|
|
||||||
mPlayerGold->setCoord(8,
|
mPlayerGold->setCoord(8,
|
||||||
mPlayerGold->getTop(),
|
mPlayerGold->getTop(),
|
||||||
mPlayerGold->getTextSize().width,
|
mPlayerGold->getTextSize().width,
|
||||||
|
|
|
@ -57,7 +57,7 @@ StatsWindow::StatsWindow (MWBase::WindowManager& parWindowManager)
|
||||||
const ESMS::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
const ESMS::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
for (int i=0; names[i][0]; ++i)
|
for (int i=0; names[i][0]; ++i)
|
||||||
{
|
{
|
||||||
setText (names[i][0], store.gameSettings.find (names[i][1])->str);
|
setText (names[i][0], store.gameSettings.find (names[i][1])->getString());
|
||||||
}
|
}
|
||||||
|
|
||||||
getWidget(mSkillView, "SkillView");
|
getWidget(mSkillView, "SkillView");
|
||||||
|
@ -475,8 +475,6 @@ void StatsWindow::updateSkillArea()
|
||||||
text += "\n#BF9959";
|
text += "\n#BF9959";
|
||||||
for (int i=0; i<6; ++i)
|
for (int i=0; i<6; ++i)
|
||||||
{
|
{
|
||||||
const ESM::Skill* skill = MWBase::Environment::get().getWorld()->getStore().skills.search(faction->data.skillID[i]);
|
|
||||||
assert(skill);
|
|
||||||
text += "#{"+ESM::Skill::sSkillNameIds[faction->data.skillID[i]]+"}";
|
text += "#{"+ESM::Skill::sSkillNameIds[faction->data.skillID[i]]+"}";
|
||||||
if (i<5)
|
if (i<5)
|
||||||
text += ", ";
|
text += ", ";
|
||||||
|
|
|
@ -368,19 +368,19 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
|
||||||
if (text.size() > 0 && text[0] == '\n')
|
if (text.size() > 0 && text[0] == '\n')
|
||||||
text.erase(0, 1);
|
text.erase(0, 1);
|
||||||
|
|
||||||
const ESM::Enchantment* enchant;
|
const ESM::Enchantment* enchant = 0;
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
if (info.enchant != "")
|
if (info.enchant != "")
|
||||||
{
|
{
|
||||||
enchant = store.enchants.search(info.enchant);
|
enchant = store.enchants.search(info.enchant);
|
||||||
if (enchant->data.type == ESM::Enchantment::CastOnce)
|
if (enchant->data.type == ESM::Enchantment::CastOnce)
|
||||||
text += "\n" + store.gameSettings.search("sItemCastOnce")->str;
|
text += "\n#{sItemCastOnce}";
|
||||||
else if (enchant->data.type == ESM::Enchantment::WhenStrikes)
|
else if (enchant->data.type == ESM::Enchantment::WhenStrikes)
|
||||||
text += "\n" + store.gameSettings.search("sItemCastWhenStrikes")->str;
|
text += "\n#{sItemCastWhenStrikes}";
|
||||||
else if (enchant->data.type == ESM::Enchantment::WhenUsed)
|
else if (enchant->data.type == ESM::Enchantment::WhenUsed)
|
||||||
text += "\n" + store.gameSettings.search("sItemCastWhenUsed")->str;
|
text += "\n#{sItemCastWhenUsed}";
|
||||||
else if (enchant->data.type == ESM::Enchantment::ConstantEffect)
|
else if (enchant->data.type == ESM::Enchantment::ConstantEffect)
|
||||||
text += "\n" + store.gameSettings.search("sItemCastConstant")->str;
|
text += "\n#{sItemCastConstant}";
|
||||||
}
|
}
|
||||||
|
|
||||||
// this the maximum width of the tooltip before it starts word-wrapping
|
// this the maximum width of the tooltip before it starts word-wrapping
|
||||||
|
@ -405,7 +405,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
|
||||||
textWidget->setProperty("Static", "true");
|
textWidget->setProperty("Static", "true");
|
||||||
textWidget->setProperty("MultiLine", "true");
|
textWidget->setProperty("MultiLine", "true");
|
||||||
textWidget->setProperty("WordWrap", "true");
|
textWidget->setProperty("WordWrap", "true");
|
||||||
textWidget->setCaption(text);
|
textWidget->setCaptionWithReplacing(text);
|
||||||
textWidget->setTextAlign(Align::HCenter | Align::Top);
|
textWidget->setTextAlign(Align::HCenter | Align::Top);
|
||||||
IntSize textSize = textWidget->getTextSize();
|
IntSize textSize = textWidget->getTextSize();
|
||||||
|
|
||||||
|
@ -440,6 +440,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
|
||||||
|
|
||||||
if (info.enchant != "")
|
if (info.enchant != "")
|
||||||
{
|
{
|
||||||
|
assert(enchant);
|
||||||
Widget* enchantArea = mDynamicToolTipBox->createWidget<Widget>("",
|
Widget* enchantArea = mDynamicToolTipBox->createWidget<Widget>("",
|
||||||
IntCoord(0, totalSize.height, 300, 300-totalSize.height),
|
IntCoord(0, totalSize.height, 300, 300-totalSize.height),
|
||||||
Align::Stretch, "ToolTipEnchantArea");
|
Align::Stretch, "ToolTipEnchantArea");
|
||||||
|
@ -466,7 +467,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
|
||||||
const int chargeWidth = 204;
|
const int chargeWidth = 204;
|
||||||
|
|
||||||
TextBox* chargeText = enchantArea->createWidget<TextBox>("SandText", IntCoord(0, 0, 10, 18), Align::Default, "ToolTipEnchantChargeText");
|
TextBox* chargeText = enchantArea->createWidget<TextBox>("SandText", IntCoord(0, 0, 10, 18), Align::Default, "ToolTipEnchantChargeText");
|
||||||
chargeText->setCaption(store.gameSettings.search("sCharges")->str);
|
chargeText->setCaptionWithReplacing("#{sCharges}");
|
||||||
const int chargeTextWidth = chargeText->getTextSize().width + 5;
|
const int chargeTextWidth = chargeText->getTextSize().width + 5;
|
||||||
|
|
||||||
const int chargeAndTextWidth = chargeWidth + chargeTextWidth;
|
const int chargeAndTextWidth = chargeWidth + chargeTextWidth;
|
||||||
|
|
|
@ -110,7 +110,7 @@ namespace MWGui
|
||||||
for (MWWorld::ContainerStoreIterator it = playerStore.begin();
|
for (MWWorld::ContainerStoreIterator it = playerStore.begin();
|
||||||
it != playerStore.end(); ++it)
|
it != playerStore.end(); ++it)
|
||||||
{
|
{
|
||||||
if (MWWorld::Class::get(*it).getName(*it) == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
if (MWWorld::Class::get(*it).getName(*it) == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGold")->getString())
|
||||||
{
|
{
|
||||||
goldFound = true;
|
goldFound = true;
|
||||||
gold = *it;
|
gold = *it;
|
||||||
|
@ -138,7 +138,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
// user notification
|
// user notification
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarterDialog11")->str, std::vector<std::string>());
|
messageBox("#{sBarterDialog11}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
// user notification
|
// user notification
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarterDialog1")->str, std::vector<std::string>());
|
messageBox("#{sBarterDialog1}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
// user notification
|
// user notification
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarterDialog2")->str, std::vector<std::string>());
|
messageBox("#{sBarterDialog2}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,17 +200,16 @@ namespace MWGui
|
||||||
|
|
||||||
void TradeWindow::updateLabels()
|
void TradeWindow::updateLabels()
|
||||||
{
|
{
|
||||||
mPlayerGold->setCaption(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sYourGold")->str
|
mPlayerGold->setCaptionWithReplacing("#{sYourGold} " + boost::lexical_cast<std::string>(mWindowManager.getInventoryWindow()->getPlayerGold()));
|
||||||
+ " " + boost::lexical_cast<std::string>(mWindowManager.getInventoryWindow()->getPlayerGold()));
|
|
||||||
|
|
||||||
if (mCurrentBalance > 0)
|
if (mCurrentBalance > 0)
|
||||||
{
|
{
|
||||||
mTotalBalanceLabel->setCaption(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sTotalSold")->str);
|
mTotalBalanceLabel->setCaptionWithReplacing("#{sTotalSold}");
|
||||||
mTotalBalance->setCaption(boost::lexical_cast<std::string>(mCurrentBalance));
|
mTotalBalance->setCaption(boost::lexical_cast<std::string>(mCurrentBalance));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mTotalBalanceLabel->setCaption(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sTotalCost")->str);
|
mTotalBalanceLabel->setCaptionWithReplacing("#{sTotalCost}");
|
||||||
mTotalBalance->setCaption(boost::lexical_cast<std::string>(-mCurrentBalance));
|
mTotalBalance->setCaption(boost::lexical_cast<std::string>(-mCurrentBalance));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,8 +228,7 @@ namespace MWGui
|
||||||
merchantgold = ref->base->data.gold;
|
merchantgold = ref->base->data.gold;
|
||||||
}
|
}
|
||||||
|
|
||||||
mMerchantGold->setCaption(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sSellerGold")->str
|
mMerchantGold->setCaptionWithReplacing("#{sSellerGold} " + boost::lexical_cast<std::string>(merchantgold));
|
||||||
+ " " + boost::lexical_cast<std::string>(merchantgold));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<MWWorld::Ptr> TradeWindow::getEquippedItems()
|
std::vector<MWWorld::Ptr> TradeWindow::getEquippedItems()
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "levelupdialog.hpp"
|
#include "levelupdialog.hpp"
|
||||||
#include "waitdialog.hpp"
|
#include "waitdialog.hpp"
|
||||||
#include "spellcreationdialog.hpp"
|
#include "spellcreationdialog.hpp"
|
||||||
|
#include "enchantingdialog.hpp"
|
||||||
|
|
||||||
using namespace MWGui;
|
using namespace MWGui;
|
||||||
|
|
||||||
|
@ -77,6 +78,7 @@ WindowManager::WindowManager(
|
||||||
, mLevelupDialog(NULL)
|
, mLevelupDialog(NULL)
|
||||||
, mWaitDialog(NULL)
|
, mWaitDialog(NULL)
|
||||||
, mSpellCreationDialog(NULL)
|
, mSpellCreationDialog(NULL)
|
||||||
|
, mEnchantingDialog(NULL)
|
||||||
, mPlayerClass()
|
, mPlayerClass()
|
||||||
, mPlayerName()
|
, mPlayerName()
|
||||||
, mPlayerRaceId()
|
, mPlayerRaceId()
|
||||||
|
@ -158,6 +160,7 @@ WindowManager::WindowManager(
|
||||||
mLevelupDialog = new LevelupDialog(*this);
|
mLevelupDialog = new LevelupDialog(*this);
|
||||||
mWaitDialog = new WaitDialog(*this);
|
mWaitDialog = new WaitDialog(*this);
|
||||||
mSpellCreationDialog = new SpellCreationDialog(*this);
|
mSpellCreationDialog = new SpellCreationDialog(*this);
|
||||||
|
mEnchantingDialog = new EnchantingDialog(*this);
|
||||||
|
|
||||||
mLoadingScreen = new LoadingScreen(mOgre->getScene (), mOgre->getWindow (), *this);
|
mLoadingScreen = new LoadingScreen(mOgre->getScene (), mOgre->getWindow (), *this);
|
||||||
mLoadingScreen->onResChange (w,h);
|
mLoadingScreen->onResChange (w,h);
|
||||||
|
@ -214,6 +217,7 @@ WindowManager::~WindowManager()
|
||||||
delete mLevelupDialog;
|
delete mLevelupDialog;
|
||||||
delete mWaitDialog;
|
delete mWaitDialog;
|
||||||
delete mSpellCreationDialog;
|
delete mSpellCreationDialog;
|
||||||
|
delete mEnchantingDialog;
|
||||||
|
|
||||||
cleanupGarbage();
|
cleanupGarbage();
|
||||||
|
|
||||||
|
@ -264,6 +268,7 @@ void WindowManager::updateVisible()
|
||||||
mLevelupDialog->setVisible(false);
|
mLevelupDialog->setVisible(false);
|
||||||
mWaitDialog->setVisible(false);
|
mWaitDialog->setVisible(false);
|
||||||
mSpellCreationDialog->setVisible(false);
|
mSpellCreationDialog->setVisible(false);
|
||||||
|
mEnchantingDialog->setVisible(false);
|
||||||
|
|
||||||
mHud->setVisible(true);
|
mHud->setVisible(true);
|
||||||
|
|
||||||
|
@ -367,6 +372,9 @@ void WindowManager::updateVisible()
|
||||||
case GM_SpellCreation:
|
case GM_SpellCreation:
|
||||||
mSpellCreationDialog->setVisible(true);
|
mSpellCreationDialog->setVisible(true);
|
||||||
break;
|
break;
|
||||||
|
case GM_Enchanting:
|
||||||
|
mEnchantingDialog->setVisible(true);
|
||||||
|
break;
|
||||||
case GM_InterMessageBox:
|
case GM_InterMessageBox:
|
||||||
break;
|
break;
|
||||||
case GM_Journal:
|
case GM_Journal:
|
||||||
|
@ -530,7 +538,7 @@ int WindowManager::readPressedButton ()
|
||||||
|
|
||||||
const std::string &WindowManager::getGameSettingString(const std::string &id, const std::string &default_)
|
const std::string &WindowManager::getGameSettingString(const std::string &id, const std::string &default_)
|
||||||
{
|
{
|
||||||
const ESM::GameSetting *setting = MWBase::Environment::get().getWorld()->getStore().gameSettings.search(id);
|
const ESM::GameSetting *setting = MWBase::Environment::get().getWorld()->getStore().gameSettings.find(id);
|
||||||
if (setting && setting->type == ESM::VT_String)
|
if (setting && setting->type == ESM::VT_String)
|
||||||
return setting->str;
|
return setting->str;
|
||||||
return default_;
|
return default_;
|
||||||
|
@ -689,7 +697,7 @@ void WindowManager::setDragDrop(bool dragDrop)
|
||||||
|
|
||||||
void WindowManager::onRetrieveTag(const MyGUI::UString& _tag, MyGUI::UString& _result)
|
void WindowManager::onRetrieveTag(const MyGUI::UString& _tag, MyGUI::UString& _result)
|
||||||
{
|
{
|
||||||
const ESM::GameSetting *setting = MWBase::Environment::get().getWorld()->getStore().gameSettings.search(_tag);
|
const ESM::GameSetting *setting = MWBase::Environment::get().getWorld()->getStore().gameSettings.find(_tag);
|
||||||
if (setting && setting->type == ESM::VT_String)
|
if (setting && setting->type == ESM::VT_String)
|
||||||
_result = setting->str;
|
_result = setting->str;
|
||||||
else
|
else
|
||||||
|
@ -974,3 +982,8 @@ void WindowManager::startSpellMaking(MWWorld::Ptr actor)
|
||||||
{
|
{
|
||||||
mSpellCreationDialog->startSpellMaking (actor);
|
mSpellCreationDialog->startSpellMaking (actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WindowManager::startEnchanting (MWWorld::Ptr actor)
|
||||||
|
{
|
||||||
|
mEnchantingDialog->startEnchanting (actor);
|
||||||
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ namespace MWGui
|
||||||
class LevelupDialog;
|
class LevelupDialog;
|
||||||
class WaitDialog;
|
class WaitDialog;
|
||||||
class SpellCreationDialog;
|
class SpellCreationDialog;
|
||||||
|
class EnchantingDialog;
|
||||||
|
|
||||||
class WindowManager : public MWBase::WindowManager
|
class WindowManager : public MWBase::WindowManager
|
||||||
{
|
{
|
||||||
|
@ -213,6 +213,7 @@ namespace MWGui
|
||||||
virtual bool getPlayerSleeping();
|
virtual bool getPlayerSleeping();
|
||||||
|
|
||||||
virtual void startSpellMaking(MWWorld::Ptr actor);
|
virtual void startSpellMaking(MWWorld::Ptr actor);
|
||||||
|
virtual void startEnchanting(MWWorld::Ptr actor);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OEngine::GUI::MyGUIManager *mGuiManager;
|
OEngine::GUI::MyGUIManager *mGuiManager;
|
||||||
|
@ -242,6 +243,7 @@ namespace MWGui
|
||||||
LevelupDialog* mLevelupDialog;
|
LevelupDialog* mLevelupDialog;
|
||||||
WaitDialog* mWaitDialog;
|
WaitDialog* mWaitDialog;
|
||||||
SpellCreationDialog* mSpellCreationDialog;
|
SpellCreationDialog* mSpellCreationDialog;
|
||||||
|
EnchantingDialog* mEnchantingDialog;
|
||||||
|
|
||||||
CharacterCreation* mCharGen;
|
CharacterCreation* mCharGen;
|
||||||
|
|
||||||
|
|
|
@ -97,13 +97,13 @@ float MWMechanics::NpcStats::getSkillGain (int skillIndex, const ESM::Class& cla
|
||||||
}
|
}
|
||||||
|
|
||||||
float typeFactor =
|
float typeFactor =
|
||||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMiscSkillBonus")->f;
|
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMiscSkillBonus")->getFloat();
|
||||||
|
|
||||||
for (int i=0; i<5; ++i)
|
for (int i=0; i<5; ++i)
|
||||||
if (class_.data.skills[i][0]==skillIndex)
|
if (class_.data.skills[i][0]==skillIndex)
|
||||||
{
|
{
|
||||||
typeFactor =
|
typeFactor =
|
||||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMinorSkillBonus")->f;
|
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMinorSkillBonus")->getFloat();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ float MWMechanics::NpcStats::getSkillGain (int skillIndex, const ESM::Class& cla
|
||||||
if (class_.data.skills[i][1]==skillIndex)
|
if (class_.data.skills[i][1]==skillIndex)
|
||||||
{
|
{
|
||||||
typeFactor =
|
typeFactor =
|
||||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMajorSkillBonus")->f;
|
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMajorSkillBonus")->getFloat();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ float MWMechanics::NpcStats::getSkillGain (int skillIndex, const ESM::Class& cla
|
||||||
if (skill->data.specialization==class_.data.specialization)
|
if (skill->data.specialization==class_.data.specialization)
|
||||||
{
|
{
|
||||||
specialisationFactor =
|
specialisationFactor =
|
||||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fSpecialSkillBonus")->f;
|
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fSpecialSkillBonus")->getFloat();
|
||||||
|
|
||||||
if (specialisationFactor<=0)
|
if (specialisationFactor<=0)
|
||||||
throw std::runtime_error ("invalid skill specialisation factor");
|
throw std::runtime_error ("invalid skill specialisation factor");
|
||||||
|
@ -227,3 +227,13 @@ int MWMechanics::NpcStats::getLevelupAttributeMultiplier(int attribute) const
|
||||||
else
|
else
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MWMechanics::NpcStats::flagAsUsed (const std::string& id)
|
||||||
|
{
|
||||||
|
mUsedIds.insert (id);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MWMechanics::NpcStats::hasBeenUsed (const std::string& id) const
|
||||||
|
{
|
||||||
|
return mUsedIds.find (id)!=mUsedIds.end();
|
||||||
|
}
|
||||||
|
|
|
@ -50,6 +50,8 @@ namespace MWMechanics
|
||||||
|
|
||||||
std::vector<int> mSkillIncreases; // number of skill increases for each attribute
|
std::vector<int> mSkillIncreases; // number of skill increases for each attribute
|
||||||
|
|
||||||
|
std::set<std::string> mUsedIds;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
NpcStats();
|
NpcStats();
|
||||||
|
@ -86,6 +88,10 @@ namespace MWMechanics
|
||||||
int getLevelupAttributeMultiplier(int attribute) const;
|
int getLevelupAttributeMultiplier(int attribute) const;
|
||||||
|
|
||||||
void levelUp();
|
void levelUp();
|
||||||
|
|
||||||
|
void flagAsUsed (const std::string& id);
|
||||||
|
|
||||||
|
bool hasBeenUsed (const std::string& id) const;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ namespace MWRender
|
||||||
, mPosition(position)
|
, mPosition(position)
|
||||||
, mLookAt(lookAt)
|
, mLookAt(lookAt)
|
||||||
, mCharacter(character)
|
, mCharacter(character)
|
||||||
|
, mAnimation(NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,10 +54,13 @@ namespace MWRender
|
||||||
mCamera->setNearClipDistance (0.01);
|
mCamera->setNearClipDistance (0.01);
|
||||||
mCamera->setFarClipDistance (1000);
|
mCamera->setFarClipDistance (1000);
|
||||||
|
|
||||||
|
mTexture = Ogre::TextureManager::getSingleton().getByName (mName);
|
||||||
|
if (mTexture.isNull ())
|
||||||
mTexture = Ogre::TextureManager::getSingleton().createManual(mName,
|
mTexture = Ogre::TextureManager::getSingleton().createManual(mName,
|
||||||
Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D, mSizeX, mSizeY, 0, Ogre::PF_A8R8G8B8, Ogre::TU_RENDERTARGET);
|
Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D, mSizeX, mSizeY, 0, Ogre::PF_A8R8G8B8, Ogre::TU_RENDERTARGET);
|
||||||
|
|
||||||
mRenderTarget = mTexture->getBuffer()->getRenderTarget();
|
mRenderTarget = mTexture->getBuffer()->getRenderTarget();
|
||||||
|
mRenderTarget->removeAllViewports ();
|
||||||
mViewport = mRenderTarget->addViewport(mCamera);
|
mViewport = mRenderTarget->addViewport(mCamera);
|
||||||
mViewport->setOverlaysEnabled(false);
|
mViewport->setOverlaysEnabled(false);
|
||||||
mViewport->setBackgroundColour(Ogre::ColourValue(0, 0, 0, 0));
|
mViewport->setBackgroundColour(Ogre::ColourValue(0, 0, 0, 0));
|
||||||
|
@ -71,7 +75,7 @@ namespace MWRender
|
||||||
|
|
||||||
CharacterPreview::~CharacterPreview ()
|
CharacterPreview::~CharacterPreview ()
|
||||||
{
|
{
|
||||||
Ogre::TextureManager::getSingleton().remove(mName);
|
//Ogre::TextureManager::getSingleton().remove(mName);
|
||||||
mSceneMgr->destroyCamera (mName);
|
mSceneMgr->destroyCamera (mName);
|
||||||
delete mAnimation;
|
delete mAnimation;
|
||||||
}
|
}
|
||||||
|
|
|
@ -323,6 +323,7 @@ namespace MWRender
|
||||||
bool Player::getPosition(Ogre::Vector3 &player, Ogre::Vector3 &camera)
|
bool Player::getPosition(Ogre::Vector3 &player, Ogre::Vector3 &camera)
|
||||||
{
|
{
|
||||||
float xch;
|
float xch;
|
||||||
|
mCamera->getParentSceneNode ()->needUpdate(true);
|
||||||
camera = mCamera->getRealPosition();
|
camera = mCamera->getRealPosition();
|
||||||
xch = camera.z, camera.z = camera.y, camera.y = -xch;
|
xch = camera.z, camera.z = camera.y, camera.y = -xch;
|
||||||
player = mPlayerNode->getPosition();
|
player = mPlayerNode->getPosition();
|
||||||
|
|
|
@ -35,22 +35,21 @@ namespace MWWorld
|
||||||
MWBase::Environment::get().getWindowManager()->getBookWindow()->open(getTarget());
|
MWBase::Environment::get().getWindowManager()->getBookWindow()->open(getTarget());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
// Skill gain from books
|
|
||||||
if (ref->base->data.skillID >= 0 && ref->base->data.skillID < ESM::Skill::Length)
|
|
||||||
{
|
|
||||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld ()->getPlayer().getPlayer();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld ()->getPlayer().getPlayer();
|
||||||
MWMechanics::NpcStats& npcStats = MWWorld::Class::get(player).getNpcStats (player);
|
MWMechanics::NpcStats& npcStats = MWWorld::Class::get(player).getNpcStats (player);
|
||||||
|
|
||||||
|
// Skill gain from books
|
||||||
|
if (ref->base->data.skillID >= 0 && ref->base->data.skillID < ESM::Skill::Length
|
||||||
|
&& !npcStats.hasBeenUsed (ref->base->id))
|
||||||
|
{
|
||||||
MWWorld::LiveCellRef<ESM::NPC> *playerRef = player.get<ESM::NPC>();
|
MWWorld::LiveCellRef<ESM::NPC> *playerRef = player.get<ESM::NPC>();
|
||||||
const ESM::Class *class_ = MWBase::Environment::get().getWorld()->getStore().classes.find (
|
const ESM::Class *class_ = MWBase::Environment::get().getWorld()->getStore().classes.find (
|
||||||
playerRef->base->cls);
|
playerRef->base->cls);
|
||||||
|
|
||||||
npcStats.increaseSkill (ref->base->data.skillID, *class_, true);
|
npcStats.increaseSkill (ref->base->data.skillID, *class_, true);
|
||||||
|
|
||||||
/// \todo Remove skill from the book. Right now you can read as many times as you want
|
npcStats.flagAsUsed (ref->base->id);
|
||||||
/// and the skill will still increase.
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& ptr)
|
||||||
|
|
||||||
// gold needs special handling: when it is inserted into a container, the base object automatically becomes Gold_001
|
// gold needs special handling: when it is inserted into a container, the base object automatically becomes Gold_001
|
||||||
// this ensures that gold piles of different sizes stack with each other (also, several scripts rely on Gold_001 for detecting player gold)
|
// this ensures that gold piles of different sizes stack with each other (also, several scripts rely on Gold_001 for detecting player gold)
|
||||||
if (MWWorld::Class::get(ptr).getName(ptr) == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
if (MWWorld::Class::get(ptr).getName(ptr) == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGold")->getString())
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *gold =
|
MWWorld::LiveCellRef<ESM::Miscellaneous> *gold =
|
||||||
ptr.get<ESM::Miscellaneous>();
|
ptr.get<ESM::Miscellaneous>();
|
||||||
|
|
|
@ -41,7 +41,8 @@ const float WeatherGlobals::mThunderSoundDelay = 0.25;
|
||||||
WeatherManager::WeatherManager(MWRender::RenderingManager* rendering) :
|
WeatherManager::WeatherManager(MWRender::RenderingManager* rendering) :
|
||||||
mHour(14), mCurrentWeather("clear"), mFirstUpdate(true), mWeatherUpdateTime(0),
|
mHour(14), mCurrentWeather("clear"), mFirstUpdate(true), mWeatherUpdateTime(0),
|
||||||
mThunderFlash(0), mThunderChance(0), mThunderChanceNeeded(50), mThunderSoundDelay(0),
|
mThunderFlash(0), mThunderChance(0), mThunderChanceNeeded(50), mThunderSoundDelay(0),
|
||||||
mRemainingTransitionTime(0), mMonth(0), mDay(0)
|
mRemainingTransitionTime(0), mMonth(0), mDay(0),
|
||||||
|
mTimePassed(0)
|
||||||
{
|
{
|
||||||
mRendering = rendering;
|
mRendering = rendering;
|
||||||
|
|
||||||
|
@ -487,7 +488,10 @@ WeatherResult WeatherManager::transition(float factor)
|
||||||
|
|
||||||
void WeatherManager::update(float duration)
|
void WeatherManager::update(float duration)
|
||||||
{
|
{
|
||||||
mWeatherUpdateTime -= duration * MWBase::Environment::get().getWorld()->getTimeScaleFactor();
|
float timePassed = mTimePassed;
|
||||||
|
mTimePassed = 0;
|
||||||
|
|
||||||
|
mWeatherUpdateTime -= timePassed;
|
||||||
|
|
||||||
bool exterior = (MWBase::Environment::get().getWorld()->isCellExterior() || MWBase::Environment::get().getWorld()->isCellQuasiExterior());
|
bool exterior = (MWBase::Environment::get().getWorld()->isCellExterior() || MWBase::Environment::get().getWorld()->isCellQuasiExterior());
|
||||||
|
|
||||||
|
@ -558,7 +562,7 @@ void WeatherManager::update(float duration)
|
||||||
|
|
||||||
if (mNextWeather != "")
|
if (mNextWeather != "")
|
||||||
{
|
{
|
||||||
mRemainingTransitionTime -= duration * MWBase::Environment::get().getWorld()->getTimeScaleFactor();
|
mRemainingTransitionTime -= timePassed;
|
||||||
if (mRemainingTransitionTime < 0)
|
if (mRemainingTransitionTime < 0)
|
||||||
{
|
{
|
||||||
mCurrentWeather = mNextWeather;
|
mCurrentWeather = mNextWeather;
|
||||||
|
|
|
@ -231,6 +231,11 @@ namespace MWWorld
|
||||||
|
|
||||||
void setDate(const int day, const int month);
|
void setDate(const int day, const int month);
|
||||||
|
|
||||||
|
void advanceTime(double hours)
|
||||||
|
{
|
||||||
|
mTimePassed += hours*3600;
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int getWeatherID() const;
|
unsigned int getWeatherID() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -261,6 +266,8 @@ namespace MWWorld
|
||||||
float mThunderChanceNeeded;
|
float mThunderChanceNeeded;
|
||||||
float mThunderSoundDelay;
|
float mThunderSoundDelay;
|
||||||
|
|
||||||
|
double mTimePassed; // time passed since last update
|
||||||
|
|
||||||
WeatherResult transition(const float factor);
|
WeatherResult transition(const float factor);
|
||||||
WeatherResult getResult(const Ogre::String& weather);
|
WeatherResult getResult(const Ogre::String& weather);
|
||||||
|
|
||||||
|
|
|
@ -366,6 +366,8 @@ namespace MWWorld
|
||||||
|
|
||||||
void World::advanceTime (double hours)
|
void World::advanceTime (double hours)
|
||||||
{
|
{
|
||||||
|
mWeatherManager->advanceTime (hours);
|
||||||
|
|
||||||
hours += mGlobalVariables->getFloat ("gamehour");
|
hours += mGlobalVariables->getFloat ("gamehour");
|
||||||
|
|
||||||
setHour (hours);
|
setHour (hours);
|
||||||
|
@ -526,7 +528,7 @@ namespace MWWorld
|
||||||
std::pair<std::string, float> result = mPhysics->getFacedHandle (*this);
|
std::pair<std::string, float> result = mPhysics->getFacedHandle (*this);
|
||||||
|
|
||||||
if (result.first.empty() ||
|
if (result.first.empty() ||
|
||||||
result.second>getStore().gameSettings.find ("iMaxActivateDist")->i)
|
result.second>getStore().gameSettings.find ("iMaxActivateDist")->getInt())
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
return result.first;
|
return result.first;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace ESM
|
namespace ESM
|
||||||
{
|
{
|
||||||
|
|
||||||
void Book::load(ESMReader &esm)
|
void Book::load(ESMReader &esm, const std::string& recordId)
|
||||||
{
|
{
|
||||||
model = esm.getHNString("MODL");
|
model = esm.getHNString("MODL");
|
||||||
name = esm.getHNOString("FNAM");
|
name = esm.getHNOString("FNAM");
|
||||||
|
@ -12,6 +12,7 @@ void Book::load(ESMReader &esm)
|
||||||
icon = esm.getHNOString("ITEX");
|
icon = esm.getHNOString("ITEX");
|
||||||
text = esm.getHNOString("TEXT");
|
text = esm.getHNOString("TEXT");
|
||||||
enchant = esm.getHNOString("ENAM");
|
enchant = esm.getHNOString("ENAM");
|
||||||
|
id = recordId;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,9 @@ struct Book
|
||||||
|
|
||||||
BKDTstruct data;
|
BKDTstruct data;
|
||||||
std::string name, model, icon, script, enchant, text;
|
std::string name, model, icon, script, enchant, text;
|
||||||
|
std::string id;
|
||||||
|
|
||||||
void load(ESMReader &esm);
|
void load(ESMReader &esm, const std::string& recordId);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace ESMS
|
||||||
RecListT<Apparatus> appas;
|
RecListT<Apparatus> appas;
|
||||||
RecListT<Armor> armors;
|
RecListT<Armor> armors;
|
||||||
RecListT<BodyPart> bodyParts;
|
RecListT<BodyPart> bodyParts;
|
||||||
RecListT<Book> books;
|
RecListWithIDT<Book> books;
|
||||||
RecListT<BirthSign> birthSigns;
|
RecListT<BirthSign> birthSigns;
|
||||||
RecListT<Class> classes;
|
RecListT<Class> classes;
|
||||||
RecListT<Clothing> clothes;
|
RecListT<Clothing> clothes;
|
||||||
|
|
|
@ -193,7 +193,8 @@ void ManualBulletShapeLoader::handleNode(Nif::Node *node, int flags,
|
||||||
// affecting the entire subtree of this node
|
// affecting the entire subtree of this node
|
||||||
Nif::NiStringExtraData *sd = (Nif::NiStringExtraData*)e;
|
Nif::NiStringExtraData *sd = (Nif::NiStringExtraData*)e;
|
||||||
|
|
||||||
if (sd->string == "NCO")
|
// not sure what the difference between NCO and NCC is, or if there even is one
|
||||||
|
if (sd->string == "NCO" || sd->string == "NCC")
|
||||||
{
|
{
|
||||||
// No collision. Use an internal flag setting to mark this.
|
// No collision. Use an internal flag setting to mark this.
|
||||||
flags |= 0x800;
|
flags |= 0x800;
|
||||||
|
|
|
@ -77,6 +77,7 @@ set(MYGUI_FILES
|
||||||
openmw_wait_dialog_progressbar.layout
|
openmw_wait_dialog_progressbar.layout
|
||||||
openmw_spellcreation_dialog.layout
|
openmw_spellcreation_dialog.layout
|
||||||
openmw_edit_effect.layout
|
openmw_edit_effect.layout
|
||||||
|
openmw_enchanting_dialog.layout
|
||||||
smallbars.png
|
smallbars.png
|
||||||
VeraMono.ttf
|
VeraMono.ttf
|
||||||
markers.png
|
markers.png
|
||||||
|
|
8
files/mygui/openmw_enchanting_dialog.layout
Normal file
8
files/mygui/openmw_enchanting_dialog.layout
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<MyGUI type="Layout">
|
||||||
|
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 560 400" name="_Main">
|
||||||
|
|
||||||
|
|
||||||
|
</Widget>
|
||||||
|
</MyGUI>
|
|
@ -303,16 +303,11 @@ namespace Physic
|
||||||
+ boost::lexical_cast<std::string>(y);
|
+ boost::lexical_cast<std::string>(y);
|
||||||
|
|
||||||
// find the minimum and maximum heights (needed for bullet)
|
// find the minimum and maximum heights (needed for bullet)
|
||||||
float minh;
|
float minh = heights[0];
|
||||||
float maxh;
|
float maxh = heights[0];
|
||||||
for (int i=0; i<sqrtVerts*sqrtVerts; ++i)
|
for (int i=0; i<sqrtVerts*sqrtVerts; ++i)
|
||||||
{
|
{
|
||||||
float h = heights[i];
|
float h = heights[i];
|
||||||
if (i==0)
|
|
||||||
{
|
|
||||||
minh = h;
|
|
||||||
maxh = h;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (h>maxh) maxh = h;
|
if (h>maxh) maxh = h;
|
||||||
if (h<minh) minh = h;
|
if (h<minh) minh = h;
|
||||||
|
|
|
@ -171,11 +171,11 @@ bool PM_SlideMove( bool gravity )
|
||||||
Ogre::Vector3 clipVelocity;
|
Ogre::Vector3 clipVelocity;
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
struct traceResults trace;
|
struct traceResults trace;
|
||||||
Ogre::Vector3 end;
|
Ogre::Vector3 end(0,0,0);
|
||||||
float time_left;
|
float time_left;
|
||||||
float into;
|
float into;
|
||||||
Ogre::Vector3 endVelocity;
|
Ogre::Vector3 endVelocity(0,0,0);
|
||||||
Ogre::Vector3 endClipVelocity;
|
Ogre::Vector3 endClipVelocity(0,0,0);
|
||||||
|
|
||||||
numbumps = 4;
|
numbumps = 4;
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
void newtrace(traceResults* const results, const Ogre::Vector3& start, const Ogre::Vector3& end, const Ogre::Vector3& BBHalfExtents, const float rotation, bool isInterior, OEngine::Physic::PhysicEngine* enginePass) //Traceobj was a Aedra Object
|
void newtrace(traceResults* const results, const Ogre::Vector3& start, const Ogre::Vector3& end, const Ogre::Vector3& BBHalfExtents, const float rotation, bool isInterior, OEngine::Physic::PhysicEngine* enginePass) //Traceobj was a Aedra Object
|
||||||
{
|
{
|
||||||
static float lastyaw = 0.0f;
|
//static float lastyaw = 0.0f;
|
||||||
static float lastpitch = 0.0f;
|
//static float lastpitch = 0.0f;
|
||||||
//if (!traceobj)
|
//if (!traceobj)
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue