diff --git a/AUTHORS.md b/AUTHORS.md index f6cc51181..9c6a5edbe 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -15,6 +15,7 @@ Programmers Adam Hogan (aurix) Aesylwinn aegis + AHSauge Aleksandar Jovanov Alex Haddad (rainChu) Alex McKibben @@ -156,6 +157,8 @@ Programmers terrorfisch thegriglat Thomas Luppi (Digmaster) + tri4ng1e + unelsson Will Herrmann (Thunderforge) Tom Mason (wheybags) Torben Leif Carrington (TorbenC) @@ -225,7 +228,7 @@ Artwork Necrod - OpenMW Logo Mickey Lyle (raevol) - Wordpress Theme - Tom Koenderink (Okulo), SirHerrbatka, crysthala, Shnatsel - OpenMW Editor Icons + Tom Koenderink (Okulo), SirHerrbatka, crysthala, Shnatsel, Lamoot - OpenMW Editor Icons Inactive Contributors --------------------- diff --git a/apps/esmtool/record.cpp b/apps/esmtool/record.cpp index c123ace44..089a25c93 100644 --- a/apps/esmtool/record.cpp +++ b/apps/esmtool/record.cpp @@ -1040,45 +1040,47 @@ void Record::print() if (mData.mNpdtType == ESM::NPC::NPC_WITH_AUTOCALCULATED_STATS) { - std::cout << " Level: " << mData.mNpdt12.mLevel << std::endl; - std::cout << " Reputation: " << (int)mData.mNpdt12.mReputation << std::endl; - std::cout << " Disposition: " << (int)mData.mNpdt12.mDisposition << std::endl; - std::cout << " Rank: " << (int)mData.mNpdt12.mRank << std::endl; - std::cout << " Unknown1: " - << (unsigned int)((unsigned char)mData.mNpdt12.mUnknown1) << std::endl; - std::cout << " Unknown2: " - << (unsigned int)((unsigned char)mData.mNpdt12.mUnknown2) << std::endl; - std::cout << " Unknown3: " - << (unsigned int)((unsigned char)mData.mNpdt12.mUnknown3) << std::endl; - std::cout << " Gold: " << mData.mNpdt12.mGold << std::endl; + std::cout << " Level: " << mData.mNpdt.mLevel << std::endl; + std::cout << " Reputation: " << (int)mData.mNpdt.mReputation << std::endl; + std::cout << " Disposition: " << (int)mData.mNpdt.mDisposition << std::endl; + std::cout << " Rank: " << (int)mData.mNpdt.mRank << std::endl; + //Why do we want to print these fields? They are padding in the struct and contain + // nothing of real value. Now we don't deal with NPDTstruct12 in runtime either... + //std::cout << " Unknown1: " + // << (unsigned int)((unsigned char)mData.mNpdt12.mUnknown1) << std::endl; + //std::cout << " Unknown2: " + // << (unsigned int)((unsigned char)mData.mNpdt12.mUnknown2) << std::endl; + //std::cout << " Unknown3: " + // << (unsigned int)((unsigned char)mData.mNpdt12.mUnknown3) << std::endl; + std::cout << " Gold: " << mData.mNpdt.mGold << std::endl; } else { - std::cout << " Level: " << mData.mNpdt52.mLevel << std::endl; - std::cout << " Reputation: " << (int)mData.mNpdt52.mReputation << std::endl; - std::cout << " Disposition: " << (int)mData.mNpdt52.mDisposition << std::endl; - std::cout << " Rank: " << (int)mData.mNpdt52.mRank << std::endl; - std::cout << " FactionID: " << (int)mData.mNpdt52.mFactionID << std::endl; + std::cout << " Level: " << mData.mNpdt.mLevel << std::endl; + std::cout << " Reputation: " << (int)mData.mNpdt.mReputation << std::endl; + std::cout << " Disposition: " << (int)mData.mNpdt.mDisposition << std::endl; + std::cout << " Rank: " << (int)mData.mNpdt.mRank << std::endl; + std::cout << " FactionID: " << (int)mData.mNpdt.mFactionID << std::endl; std::cout << " Attributes:" << std::endl; - std::cout << " Strength: " << (int)mData.mNpdt52.mStrength << std::endl; - std::cout << " Intelligence: " << (int)mData.mNpdt52.mIntelligence << std::endl; - std::cout << " Willpower: " << (int)mData.mNpdt52.mWillpower << std::endl; - std::cout << " Agility: " << (int)mData.mNpdt52.mAgility << std::endl; - std::cout << " Speed: " << (int)mData.mNpdt52.mSpeed << std::endl; - std::cout << " Endurance: " << (int)mData.mNpdt52.mEndurance << std::endl; - std::cout << " Personality: " << (int)mData.mNpdt52.mPersonality << std::endl; - std::cout << " Luck: " << (int)mData.mNpdt52.mLuck << std::endl; + std::cout << " Strength: " << (int)mData.mNpdt.mStrength << std::endl; + std::cout << " Intelligence: " << (int)mData.mNpdt.mIntelligence << std::endl; + std::cout << " Willpower: " << (int)mData.mNpdt.mWillpower << std::endl; + std::cout << " Agility: " << (int)mData.mNpdt.mAgility << std::endl; + std::cout << " Speed: " << (int)mData.mNpdt.mSpeed << std::endl; + std::cout << " Endurance: " << (int)mData.mNpdt.mEndurance << std::endl; + std::cout << " Personality: " << (int)mData.mNpdt.mPersonality << std::endl; + std::cout << " Luck: " << (int)mData.mNpdt.mLuck << std::endl; std::cout << " Skills:" << std::endl; for (int i = 0; i != ESM::Skill::Length; i++) std::cout << " " << skillLabel(i) << ": " - << (int)(mData.mNpdt52.mSkills[i]) << std::endl; + << (int)(mData.mNpdt.mSkills[i]) << std::endl; - std::cout << " Health: " << mData.mNpdt52.mHealth << std::endl; - std::cout << " Magicka: " << mData.mNpdt52.mMana << std::endl; - std::cout << " Fatigue: " << mData.mNpdt52.mFatigue << std::endl; - std::cout << " Unknown: " << (int)mData.mNpdt52.mUnknown << std::endl; - std::cout << " Gold: " << mData.mNpdt52.mGold << std::endl; + std::cout << " Health: " << mData.mNpdt.mHealth << std::endl; + std::cout << " Magicka: " << mData.mNpdt.mMana << std::endl; + std::cout << " Fatigue: " << mData.mNpdt.mFatigue << std::endl; + std::cout << " Unknown: " << (int)mData.mNpdt.mUnknown << std::endl; + std::cout << " Gold: " << mData.mNpdt.mGold << std::endl; } std::vector::iterator cit; diff --git a/apps/essimporter/converter.hpp b/apps/essimporter/converter.hpp index 621b85709..1772e0e2d 100644 --- a/apps/essimporter/converter.hpp +++ b/apps/essimporter/converter.hpp @@ -122,7 +122,7 @@ public: } else { - mContext->mPlayer.mObject.mCreatureStats.mLevel = npc.mNpdt52.mLevel; + mContext->mPlayer.mObject.mCreatureStats.mLevel = npc.mNpdt.mLevel; mContext->mPlayerBase = npc; ESM::SpellState::SpellParams empty; // FIXME: player start spells and birthsign spells aren't listed here, diff --git a/apps/essimporter/importer.cpp b/apps/essimporter/importer.cpp index 73b15baae..4538d4e63 100644 --- a/apps/essimporter/importer.cpp +++ b/apps/essimporter/importer.cpp @@ -377,7 +377,7 @@ namespace ESSImport profile.mPlayerClassName = context.mCustomPlayerClassName; else profile.mPlayerClassId = context.mPlayerBase.mClass; - profile.mPlayerLevel = context.mPlayerBase.mNpdt52.mLevel; + profile.mPlayerLevel = context.mPlayerBase.mNpdt.mLevel; profile.mPlayerName = header.mGameData.mPlayerName.toString(); writeScreenshot(header, profile); diff --git a/apps/opencs/model/tools/classcheck.cpp b/apps/opencs/model/tools/classcheck.cpp index e4964d4e3..316fc0ce5 100644 --- a/apps/opencs/model/tools/classcheck.cpp +++ b/apps/opencs/model/tools/classcheck.cpp @@ -32,9 +32,6 @@ void CSMTools::ClassCheckStage::perform (int stage, CSMDoc::Messages& messages) if (class_.mName.empty()) messages.push_back (std::make_pair (id, class_.mId + " has an empty name")); - if (class_.mDescription.empty()) - messages.push_back (std::make_pair (id, class_.mId + " has an empty description")); - // test for invalid attributes for (int i=0; i<2; ++i) if (class_.mData.mAttribute[i]==-1) diff --git a/apps/opencs/model/tools/referenceablecheck.cpp b/apps/opencs/model/tools/referenceablecheck.cpp index 4dd3e1edf..1e86dfe37 100644 --- a/apps/opencs/model/tools/referenceablecheck.cpp +++ b/apps/opencs/model/tools/referenceablecheck.cpp @@ -239,9 +239,7 @@ void CSMTools::ReferenceableCheckStage::bookCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Book& book = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Book, book.mId); @@ -260,9 +258,7 @@ void CSMTools::ReferenceableCheckStage::activatorCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Activator& activator = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Activator, activator.mId); @@ -283,9 +279,7 @@ void CSMTools::ReferenceableCheckStage::potionCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Potion& potion = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Potion, potion.mId); @@ -306,9 +300,7 @@ void CSMTools::ReferenceableCheckStage::apparatusCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Apparatus& apparatus = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Apparatus, apparatus.mId); @@ -329,9 +321,7 @@ void CSMTools::ReferenceableCheckStage::armorCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Armor& armor = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Armor, armor.mId); @@ -358,9 +348,7 @@ void CSMTools::ReferenceableCheckStage::clothingCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Clothing& clothing = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Clothing, clothing.mId); @@ -378,9 +366,7 @@ void CSMTools::ReferenceableCheckStage::containerCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Container& container = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Container, container.mId); @@ -512,9 +498,7 @@ void CSMTools::ReferenceableCheckStage::ingredientCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Ingredient& ingredient = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Ingredient, ingredient.mId); @@ -577,13 +561,8 @@ void CSMTools::ReferenceableCheckStage::lightCheck( messages.push_back (std::make_pair (id, light.mId + " has negative light radius")); if (light.mData.mFlags & ESM::Light::Carry) - { inventoryItemCheck(light, messages, id.toString()); - if (light.mData.mTime == 0) - messages.push_back (std::make_pair (id, light.mId + " has zero duration")); - } - // Check that mentioned scripts exist scriptCheck(light, messages, id.toString()); } @@ -596,9 +575,7 @@ void CSMTools::ReferenceableCheckStage::lockpickCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Lockpick& lockpick = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Lockpick, lockpick.mId); @@ -619,9 +596,7 @@ void CSMTools::ReferenceableCheckStage::miscCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Miscellaneous& miscellaneous = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Miscellaneous, miscellaneous.mId); @@ -644,12 +619,12 @@ void CSMTools::ReferenceableCheckStage::npcCheck ( const ESM::NPC& npc = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_Npc, npc.mId); - short level(npc.mNpdt52.mLevel); - char disposition(npc.mNpdt52.mDisposition); - char reputation(npc.mNpdt52.mReputation); - char rank(npc.mNpdt52.mRank); + short level(npc.mNpdt.mLevel); + char disposition(npc.mNpdt.mDisposition); + char reputation(npc.mNpdt.mReputation); + char rank(npc.mNpdt.mRank); //Don't know what unknown is for - int gold(npc.mNpdt52.mGold); + int gold(npc.mNpdt.mGold); //Detect if player is present if (Misc::StringUtils::ciEqual(npc.mId, "player")) //Happy now, scrawl? @@ -663,36 +638,36 @@ void CSMTools::ReferenceableCheckStage::npcCheck ( return; } - level = npc.mNpdt12.mLevel; - disposition = npc.mNpdt12.mDisposition; - reputation = npc.mNpdt12.mReputation; - rank = npc.mNpdt12.mRank; - gold = npc.mNpdt12.mGold; + level = npc.mNpdt.mLevel; + disposition = npc.mNpdt.mDisposition; + reputation = npc.mNpdt.mReputation; + rank = npc.mNpdt.mRank; + gold = npc.mNpdt.mGold; } else { - if (npc.mNpdt52.mAgility == 0) + if (npc.mNpdt.mAgility == 0) messages.push_back (std::make_pair (id, npc.mId + " agility has zero value")); - if (npc.mNpdt52.mEndurance == 0) + if (npc.mNpdt.mEndurance == 0) messages.push_back (std::make_pair (id, npc.mId + " endurance has zero value")); - if (npc.mNpdt52.mIntelligence == 0) + if (npc.mNpdt.mIntelligence == 0) messages.push_back (std::make_pair (id, npc.mId + " intelligence has zero value")); - if (npc.mNpdt52.mLuck == 0) + if (npc.mNpdt.mLuck == 0) messages.push_back (std::make_pair (id, npc.mId + " luck has zero value")); - if (npc.mNpdt52.mPersonality == 0) + if (npc.mNpdt.mPersonality == 0) messages.push_back (std::make_pair (id, npc.mId + " personality has zero value")); - if (npc.mNpdt52.mStrength == 0) + if (npc.mNpdt.mStrength == 0) messages.push_back (std::make_pair (id, npc.mId + " strength has zero value")); - if (npc.mNpdt52.mSpeed == 0) + if (npc.mNpdt.mSpeed == 0) messages.push_back (std::make_pair (id, npc.mId + " speed has zero value")); - if (npc.mNpdt52.mWillpower == 0) + if (npc.mNpdt.mWillpower == 0) messages.push_back (std::make_pair (id, npc.mId + " willpower has zero value")); } @@ -706,22 +681,14 @@ void CSMTools::ReferenceableCheckStage::npcCheck ( messages.push_back (std::make_pair (id, npc.mId + " has any empty name")); if (npc.mClass.empty()) - { - messages.push_back (std::make_pair (id, npc.mId + " has any empty class")); - } + messages.push_back (std::make_pair (id, npc.mId + " has an empty class")); else if (mClasses.searchId (npc.mClass) == -1) - { messages.push_back (std::make_pair (id, npc.mId + " has invalid class")); - } if (npc.mRace.empty()) - { - messages.push_back (std::make_pair (id, npc.mId + " has any empty race")); - } + messages.push_back (std::make_pair (id, npc.mId + " has an empty race")); else if (mRaces.searchId (npc.mRace) == -1) - { messages.push_back (std::make_pair (id, npc.mId + " has invalid race")); - } if (disposition < 0) messages.push_back (std::make_pair (id, npc.mId + " has negative disposition")); @@ -823,7 +790,7 @@ void CSMTools::ReferenceableCheckStage::weaponCheck( { //checking of health if (weapon.mData.mHealth <= 0) - messages.push_back (std::make_pair (id, weapon.mId + " has non-positivie health")); + messages.push_back (std::make_pair (id, weapon.mId + " has non-positive health")); if (weapon.mData.mReach < 0) messages.push_back (std::make_pair (id, weapon.mId + " has negative reach")); @@ -842,9 +809,7 @@ void CSMTools::ReferenceableCheckStage::probeCheck( const CSMWorld::RecordBase& baseRecord = records.getRecord(stage); if (baseRecord.isDeleted()) - { return; - } const ESM::Probe& probe = (dynamic_cast& >(baseRecord)).get(); CSMWorld::UniversalId id(CSMWorld::UniversalId::Type_Probe, probe.mId); diff --git a/apps/opencs/model/tools/soundcheck.cpp b/apps/opencs/model/tools/soundcheck.cpp index 6a059bee2..3dbd3ef11 100644 --- a/apps/opencs/model/tools/soundcheck.cpp +++ b/apps/opencs/model/tools/soundcheck.cpp @@ -27,7 +27,7 @@ void CSMTools::SoundCheckStage::perform (int stage, CSMDoc::Messages& messages) CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_Sound, sound.mId); if (sound.mData.mMinRange>sound.mData.mMaxRange) - messages.push_back (std::make_pair (id, "Maximum range larger than minimum range")); + messages.push_back (std::make_pair (id, "Minimum range larger than maximum range")); /// \todo check, if the sound file exists } diff --git a/apps/opencs/model/tools/tools.cpp b/apps/opencs/model/tools/tools.cpp index 3b2c80263..445db53af 100644 --- a/apps/opencs/model/tools/tools.cpp +++ b/apps/opencs/model/tools/tools.cpp @@ -61,12 +61,7 @@ CSMDoc::OperationHolder *CSMTools::Tools::getVerifier() connect (&mVerifier, SIGNAL (reportMessage (const CSMDoc::Message&, int)), this, SLOT (verifierMessage (const CSMDoc::Message&, int))); - std::vector mandatoryIds; // I want C++11, damn it! - mandatoryIds.push_back ("Day"); - mandatoryIds.push_back ("DaysPassed"); - mandatoryIds.push_back ("GameHour"); - mandatoryIds.push_back ("Month"); - mandatoryIds.push_back ("PCRace"); + std::vector mandatoryIds {"Day", "DaysPassed", "GameHour", "Month", "PCRace"}; mVerifierOperation->appendStage (new MandatoryIdStage (mData.getGlobals(), CSMWorld::UniversalId (CSMWorld::UniversalId::Type_Globals), mandatoryIds)); diff --git a/apps/opencs/model/world/columns.cpp b/apps/opencs/model/world/columns.cpp index ec010ba36..7c0fbff4b 100644 --- a/apps/opencs/model/world/columns.cpp +++ b/apps/opencs/model/world/columns.cpp @@ -66,7 +66,7 @@ namespace CSMWorld { ColumnId_SleepForbidden, "Sleep Forbidden" }, { ColumnId_InteriorWater, "Interior Water" }, { ColumnId_InteriorSky, "Interior Sky" }, - { ColumnId_Model, "Model" }, + { ColumnId_Model, "Model/Animation" }, { ColumnId_Script, "Script" }, { ColumnId_Icon, "Icon" }, { ColumnId_Weight, "Weight" }, diff --git a/apps/opencs/model/world/data.cpp b/apps/opencs/model/world/data.cpp index 2216d5ca6..053754943 100644 --- a/apps/opencs/model/world/data.cpp +++ b/apps/opencs/model/world/data.cpp @@ -962,6 +962,29 @@ int CSMWorld::Data::startLoading (const boost::filesystem::path& path, bool base return mReader->getRecordCount(); } +void CSMWorld::Data::loadFallbackEntries() +{ + // Load default marker definitions, if game files do not have them for some reason + std::pair markers[] = { + std::make_pair("divinemarker", "marker_divine.nif"), + std::make_pair("doormarker", "marker_arrow.nif"), + std::make_pair("northmarker", "marker_north.nif"), + std::make_pair("templemarker", "marker_temple.nif"), + std::make_pair("travelmarker", "marker_travel.nif") + }; + + for (const std::pair marker : markers) + { + if (mReferenceables.searchId (marker.first)==-1) + { + CSMWorld::Record record; + record.mBase = ESM::Static(marker.first, marker.second); + record.mState = CSMWorld::RecordBase::State_BaseOnly; + mReferenceables.appendRecord (record, CSMWorld::UniversalId::Type_Static); + } + } +} + bool CSMWorld::Data::continueLoading (CSMDoc::Messages& messages) { if (!mReader) @@ -983,6 +1006,9 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Messages& messages) mReader = 0; mDialogue = 0; + + loadFallbackEntries(); + return true; } diff --git a/apps/opencs/model/world/data.hpp b/apps/opencs/model/world/data.hpp index 8a3667ea1..1b975f430 100644 --- a/apps/opencs/model/world/data.hpp +++ b/apps/opencs/model/world/data.hpp @@ -144,6 +144,8 @@ namespace CSMWorld static int count (RecordBase::State state, const CollectionBase& collection); + void loadFallbackEntries(); + public: Data (ToUTF8::FromType encoding, bool fsStrict, const Files::PathContainer& dataPaths, diff --git a/apps/opencs/model/world/refidadapterimp.cpp b/apps/opencs/model/world/refidadapterimp.cpp index ba67b4e14..352384c73 100644 --- a/apps/opencs/model/world/refidadapterimp.cpp +++ b/apps/opencs/model/world/refidadapterimp.cpp @@ -914,7 +914,7 @@ void CSMWorld::NpcAttributesRefIdAdapter::setNestedTable (const RefIdColumn* col ESM::NPC npc = record.get(); // store the whole struct - npc.mNpdt52 = + npc.mNpdt = static_cast > &>(nestedTable).mNestedTable.at(0); record.setModified (npc); @@ -928,7 +928,7 @@ CSMWorld::NestedTableWrapperBase* CSMWorld::NpcAttributesRefIdAdapter::nestedTab // return the whole struct std::vector wrap; - wrap.push_back(record.get().mNpdt52); + wrap.push_back(record.get().mNpdt); // deleted by dtor of NestedTableStoring return new NestedTableWrapper >(wrap); } @@ -939,7 +939,7 @@ QVariant CSMWorld::NpcAttributesRefIdAdapter::getNestedData (const RefIdColumn * const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, UniversalId::Type_Npc))); - const ESM::NPC::NPDTstruct52& npcStruct = record.get().mNpdt52; + const ESM::NPC::NPDTstruct52& npcStruct = record.get().mNpdt; if (subColIndex == 0) return subRowIndex; @@ -966,7 +966,7 @@ void CSMWorld::NpcAttributesRefIdAdapter::setNestedData (const RefIdColumn *colu Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (row, UniversalId::Type_Npc))); ESM::NPC npc = record.get(); - ESM::NPC::NPDTstruct52& npcStruct = npc.mNpdt52; + ESM::NPC::NPDTstruct52& npcStruct = npc.mNpdt; if (subColIndex == 1) switch(subRowIndex) @@ -1021,7 +1021,7 @@ void CSMWorld::NpcSkillsRefIdAdapter::setNestedTable (const RefIdColumn* column, ESM::NPC npc = record.get(); // store the whole struct - npc.mNpdt52 = + npc.mNpdt = static_cast > &>(nestedTable).mNestedTable.at(0); record.setModified (npc); @@ -1035,7 +1035,7 @@ CSMWorld::NestedTableWrapperBase* CSMWorld::NpcSkillsRefIdAdapter::nestedTable ( // return the whole struct std::vector wrap; - wrap.push_back(record.get().mNpdt52); + wrap.push_back(record.get().mNpdt); // deleted by dtor of NestedTableStoring return new NestedTableWrapper >(wrap); } @@ -1046,7 +1046,7 @@ QVariant CSMWorld::NpcSkillsRefIdAdapter::getNestedData (const RefIdColumn *colu const Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (index, UniversalId::Type_Npc))); - const ESM::NPC::NPDTstruct52& npcStruct = record.get().mNpdt52; + const ESM::NPC::NPDTstruct52& npcStruct = record.get().mNpdt; if (subRowIndex < 0 || subRowIndex >= ESM::Skill::Length) throw std::runtime_error ("index out of range"); @@ -1065,7 +1065,7 @@ void CSMWorld::NpcSkillsRefIdAdapter::setNestedData (const RefIdColumn *column, Record& record = static_cast&> (data.getRecord (RefIdData::LocalIndex (row, UniversalId::Type_Npc))); ESM::NPC npc = record.get(); - ESM::NPC::NPDTstruct52& npcStruct = npc.mNpdt52; + ESM::NPC::NPDTstruct52& npcStruct = npc.mNpdt; if (subRowIndex < 0 || subRowIndex >= ESM::Skill::Length) throw std::runtime_error ("index out of range"); @@ -1130,30 +1130,30 @@ QVariant CSMWorld::NpcMiscRefIdAdapter::getNestedData (const RefIdColumn *column if (autoCalc) switch (subColIndex) { - case 0: return static_cast(record.get().mNpdt12.mLevel); + case 0: return static_cast(record.get().mNpdt.mLevel); case 1: return QVariant(QVariant::UserType); case 2: return QVariant(QVariant::UserType); case 3: return QVariant(QVariant::UserType); case 4: return QVariant(QVariant::UserType); - case 5: return static_cast(record.get().mNpdt12.mDisposition); - case 6: return static_cast(record.get().mNpdt12.mReputation); - case 7: return static_cast(record.get().mNpdt12.mRank); - case 8: return record.get().mNpdt12.mGold; + case 5: return static_cast(record.get().mNpdt.mDisposition); + case 6: return static_cast(record.get().mNpdt.mReputation); + case 7: return static_cast(record.get().mNpdt.mRank); + case 8: return record.get().mNpdt.mGold; case 9: return record.get().mPersistent == true; default: return QVariant(); // throw an exception here? } else switch (subColIndex) { - case 0: return static_cast(record.get().mNpdt52.mLevel); - case 1: return static_cast(record.get().mNpdt52.mFactionID); - case 2: return static_cast(record.get().mNpdt52.mHealth); - case 3: return static_cast(record.get().mNpdt52.mMana); - case 4: return static_cast(record.get().mNpdt52.mFatigue); - case 5: return static_cast(record.get().mNpdt52.mDisposition); - case 6: return static_cast(record.get().mNpdt52.mReputation); - case 7: return static_cast(record.get().mNpdt52.mRank); - case 8: return record.get().mNpdt52.mGold; + case 0: return static_cast(record.get().mNpdt.mLevel); + case 1: return static_cast(record.get().mNpdt.mFactionID); + case 2: return static_cast(record.get().mNpdt.mHealth); + case 3: return static_cast(record.get().mNpdt.mMana); + case 4: return static_cast(record.get().mNpdt.mFatigue); + case 5: return static_cast(record.get().mNpdt.mDisposition); + case 6: return static_cast(record.get().mNpdt.mReputation); + case 7: return static_cast(record.get().mNpdt.mRank); + case 8: return record.get().mNpdt.mGold; case 9: return record.get().mPersistent == true; default: return QVariant(); // throw an exception here? } @@ -1171,30 +1171,30 @@ void CSMWorld::NpcMiscRefIdAdapter::setNestedData (const RefIdColumn *column, if (autoCalc) switch(subColIndex) { - case 0: npc.mNpdt12.mLevel = static_cast(value.toInt()); break; + case 0: npc.mNpdt.mLevel = static_cast(value.toInt()); break; case 1: return; case 2: return; case 3: return; case 4: return; - case 5: npc.mNpdt12.mDisposition = static_cast(value.toInt()); break; - case 6: npc.mNpdt12.mReputation = static_cast(value.toInt()); break; - case 7: npc.mNpdt12.mRank = static_cast(value.toInt()); break; - case 8: npc.mNpdt12.mGold = value.toInt(); break; + case 5: npc.mNpdt.mDisposition = static_cast(value.toInt()); break; + case 6: npc.mNpdt.mReputation = static_cast(value.toInt()); break; + case 7: npc.mNpdt.mRank = static_cast(value.toInt()); break; + case 8: npc.mNpdt.mGold = value.toInt(); break; case 9: npc.mPersistent = value.toBool(); break; default: return; // throw an exception here? } else switch(subColIndex) { - case 0: npc.mNpdt52.mLevel = static_cast(value.toInt()); break; - case 1: npc.mNpdt52.mFactionID = static_cast(value.toInt()); break; - case 2: npc.mNpdt52.mHealth = static_cast(value.toInt()); break; - case 3: npc.mNpdt52.mMana = static_cast(value.toInt()); break; - case 4: npc.mNpdt52.mFatigue = static_cast(value.toInt()); break; - case 5: npc.mNpdt52.mDisposition = static_cast(value.toInt()); break; - case 6: npc.mNpdt52.mReputation = static_cast(value.toInt()); break; - case 7: npc.mNpdt52.mRank = static_cast(value.toInt()); break; - case 8: npc.mNpdt52.mGold = value.toInt(); break; + case 0: npc.mNpdt.mLevel = static_cast(value.toInt()); break; + case 1: npc.mNpdt.mFactionID = static_cast(value.toInt()); break; + case 2: npc.mNpdt.mHealth = static_cast(value.toInt()); break; + case 3: npc.mNpdt.mMana = static_cast(value.toInt()); break; + case 4: npc.mNpdt.mFatigue = static_cast(value.toInt()); break; + case 5: npc.mNpdt.mDisposition = static_cast(value.toInt()); break; + case 6: npc.mNpdt.mReputation = static_cast(value.toInt()); break; + case 7: npc.mNpdt.mRank = static_cast(value.toInt()); break; + case 8: npc.mNpdt.mGold = value.toInt(); break; case 9: npc.mPersistent = value.toBool(); break; default: return; // throw an exception here? } diff --git a/apps/opencs/model/world/universalid.cpp b/apps/opencs/model/world/universalid.cpp index 38386f6da..8d7a7761e 100644 --- a/apps/opencs/model/world/universalid.cpp +++ b/apps/opencs/model/world/universalid.cpp @@ -64,21 +64,21 @@ namespace static const TypeData sIdArg[] = { - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Global, "Global Variable", ":./globvar.png" }, - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Gmst, "Game Setting", ":./GMST.png" }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Global, "Global Variable", ":./global-variable.png" }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Gmst, "Game Setting", ":./gmst.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Skill, "Skill", ":./skill.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Class, "Class", ":./class.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Faction, "Faction", ":./faction.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Race, "Race", ":./race.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Sound, "Sound", ":./sound.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Script, "Script", ":./script.png" }, - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Region, "Region", ":./land.png" }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Region, "Region", ":./region.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Birthsign, "Birthsign", ":./birthsign.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Spell, "Spell", ":./spell.png" }, - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Topic, "Topic", 0 }, - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Journal, "Journal", 0 }, - { CSMWorld::UniversalId::Class_SubRecord, CSMWorld::UniversalId::Type_TopicInfo, "TopicInfo", 0 }, - { CSMWorld::UniversalId::Class_SubRecord, CSMWorld::UniversalId::Type_JournalInfo, "JournalInfo", 0 }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Topic, "Topic", ":./dialogue-topics.png" }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Journal, "Journal", ":./journal-topics.png" }, + { CSMWorld::UniversalId::Class_SubRecord, CSMWorld::UniversalId::Type_TopicInfo, "TopicInfo", ":./dialogue-topic-infos.png" }, + { CSMWorld::UniversalId::Class_SubRecord, CSMWorld::UniversalId::Type_JournalInfo, "JournalInfo", ":./journal-topic-infos.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Cell, "Cell", ":./cell.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Cell_Missing, "Cell", ":./cell.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Referenceable, "Object", 0 }, @@ -93,7 +93,7 @@ namespace { CSMWorld::UniversalId::Class_RefRecord, CSMWorld::UniversalId::Type_Door, "Door", ":./door.png" }, { CSMWorld::UniversalId::Class_RefRecord, CSMWorld::UniversalId::Type_Ingredient, "Ingredient", ":./ingredient.png" }, { CSMWorld::UniversalId::Class_RefRecord, CSMWorld::UniversalId::Type_CreatureLevelledList, - "Creature Levelled List", ":./creature.png" }, + "Creature Levelled List", ":./leveled-creature.png" }, { CSMWorld::UniversalId::Class_RefRecord, CSMWorld::UniversalId::Type_ItemLevelledList, "Item Levelled List", ":./leveled-item.png" }, { CSMWorld::UniversalId::Class_RefRecord, CSMWorld::UniversalId::Type_Light, "Light", ":./light.png" }, @@ -109,20 +109,20 @@ namespace { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Filter, "Filter", ":./filter.png" }, { CSMWorld::UniversalId::Class_Collection, CSMWorld::UniversalId::Type_Scene, "Scene", 0 }, { CSMWorld::UniversalId::Class_Collection, CSMWorld::UniversalId::Type_Preview, "Preview", 0 }, - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Enchantment, "Enchantment", 0 }, - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_BodyPart, "Body Part", 0 }, - { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Mesh, "Mesh", 0 }, - { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Icon, "Icon", 0 }, - { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Music, "Music", 0 }, - { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_SoundRes, "Sound File", 0 }, - { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Texture, "Texture", 0 }, - { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Video, "Video", 0 }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Enchantment, "Enchantment", ":./enchantment.png" }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_BodyPart, "Body Part", ":./body-part.png" }, + { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Mesh, "Mesh", ":resources-mesh"}, + { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Icon, "Icon", ":resources-icon"}, + { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Music, "Music", ":resources-music" }, + { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_SoundRes, "Sound File", ":resources-sound" }, + { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Texture, "Texture", ":resources-texture"}, + { CSMWorld::UniversalId::Class_Resource, CSMWorld::UniversalId::Type_Video, "Video", ":resources-video"}, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_DebugProfile, "Debug Profile", 0 }, - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_SoundGen, "Sound Generator", 0 }, - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_MagicEffect, "Magic Effect", 0 }, - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Land, "Land", 0 }, - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_LandTexture, "LandTexture", 0 }, - { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Pathgrid, "Pathgrid", 0 }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_SoundGen, "Sound Generator", ":./sound-generator.png" }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_MagicEffect, "Magic Effect", ":./magic-effect.png" }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Land, "Land", ":./land-heightmap.png" }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_LandTexture, "LandTexture", ":./land-texture.png" }, + { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_Pathgrid, "Pathgrid", ":./pathgrid.png" }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_StartScript, "Start Script", 0 }, { CSMWorld::UniversalId::Class_Record, CSMWorld::UniversalId::Type_MetaData, "Meta Data", 0 }, diff --git a/apps/opencs/view/render/instancemode.cpp b/apps/opencs/view/render/instancemode.cpp index fae609af5..ee3e18d71 100644 --- a/apps/opencs/view/render/instancemode.cpp +++ b/apps/opencs/view/render/instancemode.cpp @@ -92,7 +92,7 @@ osg::Vec3f CSVRender::InstanceMode::getScreenCoords(const osg::Vec3f& pos) } CSVRender::InstanceMode::InstanceMode (WorldspaceWidget *worldspaceWidget, QWidget *parent) -: EditMode (worldspaceWidget, QIcon (":placeholder"), Mask_Reference | Mask_Terrain, "Instance editing", +: EditMode (worldspaceWidget, QIcon (":scenetoolbar/editing-instance"), Mask_Reference | Mask_Terrain, "Instance editing", parent), mSubMode (0), mSubModeId ("move"), mSelectionMode (0), mDragMode (DragMode_None), mDragAxis (-1), mLocked (false), mUnitScaleDist(1) { @@ -104,14 +104,14 @@ void CSVRender::InstanceMode::activate (CSVWidget::SceneToolbar *toolbar) { mSubMode = new CSVWidget::SceneToolMode (toolbar, "Edit Sub-Mode"); mSubMode->addButton (new InstanceMoveMode (this), "move"); - mSubMode->addButton (":placeholder", "rotate", + mSubMode->addButton (":scenetoolbar/transform-rotate", "rotate", "Rotate selected instances" "
  • Use {scene-edit-primary} to rotate instances freely
  • " "
  • Use {scene-edit-secondary} to rotate instances within the grid
  • " "
  • The center of the view acts as the axis of rotation
  • " "
" "Grid rotate not implemented yet"); - mSubMode->addButton (":placeholder", "scale", + mSubMode->addButton (":scenetoolbar/transform-scale", "scale", "Scale selected instances" "
  • Use {scene-edit-primary} to scale instances freely
  • " "
  • Use {scene-edit-secondary} to scale instances along the grid
  • " diff --git a/apps/opencs/view/render/instancemovemode.cpp b/apps/opencs/view/render/instancemovemode.cpp index fe58b581b..723af811d 100644 --- a/apps/opencs/view/render/instancemovemode.cpp +++ b/apps/opencs/view/render/instancemovemode.cpp @@ -2,7 +2,7 @@ #include "instancemovemode.hpp" CSVRender::InstanceMoveMode::InstanceMoveMode (QWidget *parent) -: ModeButton (QIcon (QPixmap (":placeholder")), +: ModeButton (QIcon (QPixmap (":scenetoolbar/transform-move")), "Move selected instances" "
    • Use {scene-edit-primary} to move instances around freely
    • " "
    • Use {scene-edit-secondary} to move instances around within the grid
    • " diff --git a/apps/opencs/view/render/selectionmode.cpp b/apps/opencs/view/render/selectionmode.cpp index cf0967e47..b5ccda5ad 100644 --- a/apps/opencs/view/render/selectionmode.cpp +++ b/apps/opencs/view/render/selectionmode.cpp @@ -13,7 +13,7 @@ namespace CSVRender , mWorldspaceWidget(worldspaceWidget) , mInteractionMask(interactionMask) { - addButton(":placeholder", "cube-centre", + addButton(":scenetoolbar/selection-mode-cube", "cube-centre", "Centred cube" "
      • Drag with {scene-select-primary} (make instances the selection) or {scene-select-secondary} " "(invert selection state) from the centre of the selection cube outwards
      • " @@ -22,7 +22,7 @@ namespace CSVRender "starting on an instance will have the same effect" "
      " "Not implemented yet"); - addButton(":placeholder", "cube-corner", + addButton(":scenetoolbar/selection-mode-cube-corner", "cube-corner", "Cube corner to corner" "
      • Drag with {scene-select-primary} (make instances the selection) or {scene-select-secondary} " "(invert selection state) from one corner of the selection cube to the opposite corner
      • " @@ -31,7 +31,7 @@ namespace CSVRender "starting on an instance will have the same effect" "
      " "Not implemented yet"); - addButton(":placeholder", "sphere", + addButton(":scenetoolbar/selection-mode-cube-sphere", "sphere", "Centred sphere" "
      • Drag with {scene-select-primary} (make instances the selection) or {scene-select-secondary} " "(invert selection state) from the centre of the selection sphere outwards
      • " diff --git a/apps/opencs/view/tools/reporttable.cpp b/apps/opencs/view/tools/reporttable.cpp index 4d1456cd9..a970af168 100644 --- a/apps/opencs/view/tools/reporttable.cpp +++ b/apps/opencs/view/tools/reporttable.cpp @@ -156,6 +156,7 @@ CSVTools::ReportTable::ReportTable (CSMDoc::Document& document, setSelectionMode (QAbstractItemView::ExtendedSelection); mProxyModel = new QSortFilterProxyModel (this); + mProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive); mProxyModel->setSourceModel (mModel); mProxyModel->setSortRole(Qt::UserRole); diff --git a/apps/opencs/view/world/recordbuttonbar.cpp b/apps/opencs/view/world/recordbuttonbar.cpp index 40a24bf65..9fea7b303 100644 --- a/apps/opencs/view/world/recordbuttonbar.cpp +++ b/apps/opencs/view/world/recordbuttonbar.cpp @@ -57,12 +57,12 @@ CSVWorld::RecordButtonBar::RecordButtonBar (const CSMWorld::UniversalId& id, // left section mPrevButton = new QToolButton (this); - mPrevButton->setIcon(QIcon(":/go-previous.png")); + mPrevButton->setIcon(QIcon(":record-previous")); mPrevButton->setToolTip ("Switch to previous record"); buttonsLayout->addWidget (mPrevButton, 0); mNextButton = new QToolButton (this); - mNextButton->setIcon(QIcon(":/go-next.png")); + mNextButton->setIcon(QIcon(":/record-next")); mNextButton->setToolTip ("Switch to next record"); buttonsLayout->addWidget (mNextButton, 1); @@ -72,7 +72,7 @@ CSVWorld::RecordButtonBar::RecordButtonBar (const CSMWorld::UniversalId& id, if (mTable.getFeatures() & CSMWorld::IdTable::Feature_Preview) { QToolButton* previewButton = new QToolButton (this); - previewButton->setIcon(QIcon(":/edit-preview.png")); + previewButton->setIcon(QIcon(":edit-preview")); previewButton->setToolTip ("Open a preview of this record"); buttonsLayout->addWidget(previewButton); connect (previewButton, SIGNAL(clicked()), this, SIGNAL (showPreview())); @@ -89,22 +89,22 @@ CSVWorld::RecordButtonBar::RecordButtonBar (const CSMWorld::UniversalId& id, // right section mCloneButton = new QToolButton (this); - mCloneButton->setIcon(QIcon(":/edit-clone.png")); + mCloneButton->setIcon(QIcon(":edit-clone")); mCloneButton->setToolTip ("Clone record"); buttonsLayout->addWidget(mCloneButton); mAddButton = new QToolButton (this); - mAddButton->setIcon(QIcon(":/add.png")); + mAddButton->setIcon(QIcon(":edit-add")); mAddButton->setToolTip ("Add new record"); buttonsLayout->addWidget(mAddButton); mDeleteButton = new QToolButton (this); - mDeleteButton->setIcon(QIcon(":/edit-delete.png")); + mDeleteButton->setIcon(QIcon(":edit-delete")); mDeleteButton->setToolTip ("Delete record"); buttonsLayout->addWidget(mDeleteButton); mRevertButton = new QToolButton (this); - mRevertButton->setIcon(QIcon(":/edit-undo.png")); + mRevertButton->setIcon(QIcon(":edit-undo")); mRevertButton->setToolTip ("Revert record"); buttonsLayout->addWidget(mRevertButton); diff --git a/apps/opencs/view/world/recordstatusdelegate.cpp b/apps/opencs/view/world/recordstatusdelegate.cpp index 12d545339..4a229657d 100644 --- a/apps/opencs/view/world/recordstatusdelegate.cpp +++ b/apps/opencs/view/world/recordstatusdelegate.cpp @@ -27,7 +27,7 @@ CSVWorld::RecordStatusDelegateFactory::RecordStatusDelegateFactory() static const char *sIcons[] = { - ":./base.png", ":./modified.png", ":./added.png", ":./removed.png", ":./removed.png", 0 + ":list-base", ":list-modified", ":list-added", ":list-removed", ":list-removed", 0 }; for (int i=0; sIcons[i]; ++i) diff --git a/apps/opencs/view/world/table.cpp b/apps/opencs/view/world/table.cpp index 34ecd57d0..986717cb2 100644 --- a/apps/opencs/view/world/table.cpp +++ b/apps/opencs/view/world/table.cpp @@ -764,10 +764,8 @@ std::vector< CSMWorld::UniversalId > CSVWorld::Table::getDraggedRecords() const QModelIndexList selectedRows = selectionModel()->selectedRows(); std::vector idToDrag; - foreach (QModelIndex it, selectedRows) //I had a dream. Dream where you could use C++11 in OpenMW. - { + for (QModelIndex& it : selectedRows) idToDrag.push_back (getUniversalId (it.row())); - } return idToDrag; } diff --git a/apps/openmw-mp/Actors.cpp b/apps/openmw-mp/Actors.cpp index ffe0090ae..b0c82b856 100644 --- a/apps/openmw-mp/Actors.cpp +++ b/apps/openmw-mp/Actors.cpp @@ -11,6 +11,7 @@ #include "Cell.hpp" #include "CellController.hpp" #include "Player.hpp" +#include "Players.hpp" using namespace std; @@ -32,6 +33,9 @@ void Actor::Init(LuaState &lua) "getCell", &NetActor::getCell, "getInventory", &NetActor::getInventory, + "followPlayer", &Actor::followPlayer, + "followActor", &Actor::followActor, + "refId", sol::property(&Actor::getRefId, &Actor::setRefId), "refNumIndex", sol::property(&Actor::getRefNumIndex, &Actor::setRefNumIndex), "mpNum", sol::property(&Actor::getMpNum, &Actor::setMpNum) @@ -44,6 +48,32 @@ Actor::Actor() : NetActor() } +void Actor::followPlayer(int pid) +{ + actor->aiAction = mwmp::BaseActor::AIAction::Follow; + + actor->hasAiTarget = true; + actor->aiTarget.isPlayer = true; + + auto player = Players::getPlayerByPID(pid).get(); + actor->aiTarget.guid = player->guid; + + aiChanged = true; +} + +void Actor::followActor(unsigned int refNumIndex, unsigned int mpNum) +{ + actor->aiAction = mwmp::BaseActor::AIAction::Follow; + + actor->hasAiTarget = true; + actor->aiTarget.isPlayer = false; + + actor->aiTarget.refNumIndex = refNumIndex; + actor->aiTarget.mpNum = mpNum; + + aiChanged = true; +} + std::string Actor::getRefId() const { return actor->refId; @@ -141,6 +171,7 @@ void ActorController::sendActors(std::shared_ptr player, std::vector player, std::vectorstatsChanged) statsChanged = true; + if (actor->aiChanged) + aiChanged = true; /*if (actor->attributesChanged) attributesChanged = true; if (actor->skillsChanged) @@ -223,6 +256,15 @@ void ActorController::sendActors(std::shared_ptr player, std::vectorsendToLoaded(packet, &actorList); } + if (aiChanged) + { + auto packet = actorCtrl->GetPacket(ID_ACTOR_AI); + packet->setActorList(&actorList); + packet->Send(actorList.guid); + + if (sendToAll) + serverCell->sendToLoaded(packet, &actorList); + } if (changedCell) { auto packet = actorCtrl->GetPacket(ID_ACTOR_CELL_CHANGE); diff --git a/apps/openmw-mp/Actors.hpp b/apps/openmw-mp/Actors.hpp index f6915b267..329c36311 100644 --- a/apps/openmw-mp/Actors.hpp +++ b/apps/openmw-mp/Actors.hpp @@ -25,6 +25,10 @@ public: void setRefNumIndex(unsigned refNumIndex); unsigned getMpNum() const; void setMpNum(unsigned mpNum); + + void followPlayer(int pid); + void followActor(unsigned int refNumIndex, unsigned int mpNum); + bool doesHavePosition() const; // ???? bool doesHaveStatsDynamic() const; // ???? diff --git a/apps/openmw-mp/NetActor.hpp b/apps/openmw-mp/NetActor.hpp index ae92d05ce..384bf9bdf 100644 --- a/apps/openmw-mp/NetActor.hpp +++ b/apps/openmw-mp/NetActor.hpp @@ -70,7 +70,7 @@ public: bool isPlayer() const { return isActorPlayer; } Player *toPlayer(); protected: - bool baseInfoChanged, shapeshiftChanged, levelChanged, statsChanged, positionChanged, momentumChanged, attributesChanged, skillsChanged; + bool baseInfoChanged, shapeshiftChanged, levelChanged, statsChanged, positionChanged, momentumChanged, attributesChanged, skillsChanged, aiChanged; mwmp::BasePlayer *basePlayer; mwmp::BaseNetCreature *netCreature; diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index ee36c92ae..f4ea08349 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -327,40 +327,40 @@ namespace MWClass int gold=0; if(ref->mBase->mNpdtType != ESM::NPC::NPC_WITH_AUTOCALCULATED_STATS) { - gold = ref->mBase->mNpdt52.mGold; + gold = ref->mBase->mNpdt.mGold; for (unsigned int i=0; i< ESM::Skill::Length; ++i) - data->mNpcStats.getSkill (i).setBase (ref->mBase->mNpdt52.mSkills[i]); + data->mNpcStats.getSkill (i).setBase (ref->mBase->mNpdt.mSkills[i]); - data->mNpcStats.setAttribute(ESM::Attribute::Strength, ref->mBase->mNpdt52.mStrength); - data->mNpcStats.setAttribute(ESM::Attribute::Intelligence, ref->mBase->mNpdt52.mIntelligence); - data->mNpcStats.setAttribute(ESM::Attribute::Willpower, ref->mBase->mNpdt52.mWillpower); - data->mNpcStats.setAttribute(ESM::Attribute::Agility, ref->mBase->mNpdt52.mAgility); - data->mNpcStats.setAttribute(ESM::Attribute::Speed, ref->mBase->mNpdt52.mSpeed); - data->mNpcStats.setAttribute(ESM::Attribute::Endurance, ref->mBase->mNpdt52.mEndurance); - data->mNpcStats.setAttribute(ESM::Attribute::Personality, ref->mBase->mNpdt52.mPersonality); - data->mNpcStats.setAttribute(ESM::Attribute::Luck, ref->mBase->mNpdt52.mLuck); + data->mNpcStats.setAttribute(ESM::Attribute::Strength, ref->mBase->mNpdt.mStrength); + data->mNpcStats.setAttribute(ESM::Attribute::Intelligence, ref->mBase->mNpdt.mIntelligence); + data->mNpcStats.setAttribute(ESM::Attribute::Willpower, ref->mBase->mNpdt.mWillpower); + data->mNpcStats.setAttribute(ESM::Attribute::Agility, ref->mBase->mNpdt.mAgility); + data->mNpcStats.setAttribute(ESM::Attribute::Speed, ref->mBase->mNpdt.mSpeed); + data->mNpcStats.setAttribute(ESM::Attribute::Endurance, ref->mBase->mNpdt.mEndurance); + data->mNpcStats.setAttribute(ESM::Attribute::Personality, ref->mBase->mNpdt.mPersonality); + data->mNpcStats.setAttribute(ESM::Attribute::Luck, ref->mBase->mNpdt.mLuck); - data->mNpcStats.setHealth (ref->mBase->mNpdt52.mHealth); - data->mNpcStats.setMagicka (ref->mBase->mNpdt52.mMana); - data->mNpcStats.setFatigue (ref->mBase->mNpdt52.mFatigue); + data->mNpcStats.setHealth (ref->mBase->mNpdt.mHealth); + data->mNpcStats.setMagicka (ref->mBase->mNpdt.mMana); + data->mNpcStats.setFatigue (ref->mBase->mNpdt.mFatigue); - data->mNpcStats.setLevel(ref->mBase->mNpdt52.mLevel); - data->mNpcStats.setBaseDisposition(ref->mBase->mNpdt52.mDisposition); - data->mNpcStats.setReputation(ref->mBase->mNpdt52.mReputation); + data->mNpcStats.setLevel(ref->mBase->mNpdt.mLevel); + data->mNpcStats.setBaseDisposition(ref->mBase->mNpdt.mDisposition); + data->mNpcStats.setReputation(ref->mBase->mNpdt.mReputation); data->mNpcStats.setNeedRecalcDynamicStats(false); } else { - gold = ref->mBase->mNpdt12.mGold; + gold = ref->mBase->mNpdt.mGold; for (int i=0; i<3; ++i) data->mNpcStats.setDynamic (i, 10); - data->mNpcStats.setLevel(ref->mBase->mNpdt12.mLevel); - data->mNpcStats.setBaseDisposition(ref->mBase->mNpdt12.mDisposition); - data->mNpcStats.setReputation(ref->mBase->mNpdt12.mReputation); + data->mNpcStats.setLevel(ref->mBase->mNpdt.mLevel); + data->mNpcStats.setBaseDisposition(ref->mBase->mNpdt.mDisposition); + data->mNpcStats.setReputation(ref->mBase->mNpdt.mReputation); autoCalculateAttributes(ref->mBase, data->mNpcStats); autoCalculateSkills(ref->mBase, data->mNpcStats, ptr); @@ -1476,10 +1476,7 @@ namespace MWClass int Npc::getBaseGold(const MWWorld::ConstPtr& ptr) const { const MWWorld::LiveCellRef *ref = ptr.get(); - if(ref->mBase->mNpdtType != ESM::NPC::NPC_WITH_AUTOCALCULATED_STATS) - return ref->mBase->mNpdt52.mGold; - else - return ref->mBase->mNpdt12.mGold; + return ref->mBase->mNpdt.mGold; } bool Npc::isClass(const MWWorld::ConstPtr& ptr, const std::string &className) const diff --git a/apps/openmw/mwgui/console.cpp b/apps/openmw/mwgui/console.cpp index b5937ce80..f34a5d3e0 100644 --- a/apps/openmw/mwgui/console.cpp +++ b/apps/openmw/mwgui/console.cpp @@ -426,7 +426,18 @@ namespace MWGui } else { - setTitle("#{sConsoleTitle} (" + object.getCellRef().getRefId() + ")"); + /* + Start of tes3mp change (major) + + Display the selected object's refNumIndex and mpNum alongside its refId in the + title of the console window, for easier debugging of almost everything + */ + setTitle("#{sConsoleTitle} (" + object.getCellRef().getRefId() + ", " + + std::to_string(object.getCellRef().getRefNum().mIndex) + ", " + + std::to_string(object.getCellRef().getMpNum()) + ")"); + /* + End of tes3mp change (major) + */ mPtr = object; } // User clicked on an object. Restore focus to the console command line. diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index b39334c5c..85912cea2 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -92,21 +92,21 @@ namespace MWMechanics const ESM::NPC *player = ptr.get()->mBase; // reset - creatureStats.setLevel(player->mNpdt52.mLevel); + creatureStats.setLevel(player->mNpdt.mLevel); creatureStats.getSpells().clear(); creatureStats.modifyMagicEffects(MagicEffects()); for (int i=0; i<27; ++i) - npcStats.getSkill (i).setBase (player->mNpdt52.mSkills[i]); - - creatureStats.setAttribute(ESM::Attribute::Strength, player->mNpdt52.mStrength); - creatureStats.setAttribute(ESM::Attribute::Intelligence, player->mNpdt52.mIntelligence); - creatureStats.setAttribute(ESM::Attribute::Willpower, player->mNpdt52.mWillpower); - creatureStats.setAttribute(ESM::Attribute::Agility, player->mNpdt52.mAgility); - creatureStats.setAttribute(ESM::Attribute::Speed, player->mNpdt52.mSpeed); - creatureStats.setAttribute(ESM::Attribute::Endurance, player->mNpdt52.mEndurance); - creatureStats.setAttribute(ESM::Attribute::Personality, player->mNpdt52.mPersonality); - creatureStats.setAttribute(ESM::Attribute::Luck, player->mNpdt52.mLuck); + npcStats.getSkill (i).setBase (player->mNpdt.mSkills[i]); + + creatureStats.setAttribute(ESM::Attribute::Strength, player->mNpdt.mStrength); + creatureStats.setAttribute(ESM::Attribute::Intelligence, player->mNpdt.mIntelligence); + creatureStats.setAttribute(ESM::Attribute::Willpower, player->mNpdt.mWillpower); + creatureStats.setAttribute(ESM::Attribute::Agility, player->mNpdt.mAgility); + creatureStats.setAttribute(ESM::Attribute::Speed, player->mNpdt.mSpeed); + creatureStats.setAttribute(ESM::Attribute::Endurance, player->mNpdt.mEndurance); + creatureStats.setAttribute(ESM::Attribute::Personality, player->mNpdt.mPersonality); + creatureStats.setAttribute(ESM::Attribute::Luck, player->mNpdt.mLuck); const MWWorld::ESMStore &esmStore = MWBase::Environment::get().getWorld()->getStore(); diff --git a/apps/openmw/mwmp/Cell.cpp b/apps/openmw/mwmp/Cell.cpp index 18724dc99..9009135a3 100644 --- a/apps/openmw/mwmp/Cell.cpp +++ b/apps/openmw/mwmp/Cell.cpp @@ -239,6 +239,24 @@ void Cell::readSpeech(ActorList& actorList) } } +void Cell::readAI(ActorList& actorList) +{ + initializeDedicatedActors(actorList); + + for (const auto &baseActor : actorList.baseActors) + { + std::string mapIndex = Main::get().getCellController()->generateMapIndex(baseActor); + + if (dedicatedActors.count(mapIndex) > 0) + { + DedicatedActor *actor = dedicatedActors[mapIndex]; + actor->aiAction = baseActor->aiAction; + actor->aiTarget = baseActor->aiTarget; + actor->setAI(); + } + } +} + void Cell::readAttack(ActorList& actorList) { for (const auto &baseActor : actorList.baseActors) diff --git a/apps/openmw/mwmp/Cell.hpp b/apps/openmw/mwmp/Cell.hpp index 3f8f3d082..671e7c68e 100644 --- a/apps/openmw/mwmp/Cell.hpp +++ b/apps/openmw/mwmp/Cell.hpp @@ -24,6 +24,7 @@ namespace mwmp void readStatsDynamic(ActorList& actorList); void readEquipment(ActorList& actorList); void readSpeech(ActorList& actorList); + void readAI(ActorList& actorList); void readAttack(ActorList& actorList); void readCellChange(ActorList& actorList); diff --git a/apps/openmw/mwmp/CellController.cpp b/apps/openmw/mwmp/CellController.cpp index 25b4ac37e..d89866a2c 100644 --- a/apps/openmw/mwmp/CellController.cpp +++ b/apps/openmw/mwmp/CellController.cpp @@ -154,6 +154,17 @@ void CellController::readSpeech(ActorList& actorList) cellsInitialized[mapIndex]->readSpeech(actorList); } +void CellController::readAI(ActorList& actorList) +{ + std::string mapIndex = actorList.cell.getDescription(); + + initializeCell(actorList.cell); + + // If this now exists, send it the data + if (cellsInitialized.count(mapIndex) > 0) + cellsInitialized[mapIndex]->readAI(actorList); +} + void CellController::readAttack(ActorList& actorList) { std::string mapIndex = actorList.cell.getDescription(); diff --git a/apps/openmw/mwmp/CellController.hpp b/apps/openmw/mwmp/CellController.hpp index 7d4057526..ea058edb8 100644 --- a/apps/openmw/mwmp/CellController.hpp +++ b/apps/openmw/mwmp/CellController.hpp @@ -27,6 +27,7 @@ namespace mwmp void readStatsDynamic(mwmp::ActorList& actorList); void readEquipment(mwmp::ActorList& actorList); void readSpeech(mwmp::ActorList& actorList); + void readAI(mwmp::ActorList& actorList); void readAttack(mwmp::ActorList& actorList); void readCellChange(mwmp::ActorList& actorList); diff --git a/apps/openmw/mwmp/DedicatedActor.cpp b/apps/openmw/mwmp/DedicatedActor.cpp index 0ec9de542..8b8531bc5 100644 --- a/apps/openmw/mwmp/DedicatedActor.cpp +++ b/apps/openmw/mwmp/DedicatedActor.cpp @@ -6,6 +6,7 @@ #include "../mwdialogue/dialoguemanagerimp.hpp" +#include "../mwmechanics/aifollow.hpp" #include "../mwmechanics/creaturestats.hpp" #include "../mwmechanics/mechanicsmanagerimp.hpp" #include "../mwmechanics/movement.hpp" @@ -206,6 +207,41 @@ void DedicatedActor::setEquipment() } } +void DedicatedActor::setAI() +{ + if (hasAiTarget) + { + MWWorld::Ptr targetPtr; + + if (aiTarget.isPlayer) + targetPtr = MechanicsHelper::getPlayerPtr(aiTarget); + else + { + if (mwmp::Main::get().getCellController()->isLocalActor(aiTarget.refNumIndex, aiTarget.mpNum)) + targetPtr = mwmp::Main::get().getCellController()->getLocalActor(aiTarget.refNumIndex, aiTarget.mpNum)->getPtr(); + else if (mwmp::Main::get().getCellController()->isDedicatedActor(aiTarget.refNumIndex, aiTarget.mpNum)) + targetPtr = mwmp::Main::get().getCellController()->getDedicatedActor(aiTarget.refNumIndex, aiTarget.mpNum)->getPtr(); + else + LOG_APPEND(Log::LOG_VERBOSE, "-- DedicatedActor %s %i-%i has invalid target AI target %i-%i", + ptr.getCellRef().getRefId().c_str(), ptr.getCellRef().getRefNum().mIndex, ptr.getCellRef().getMpNum(), + aiTarget.refNumIndex, aiTarget.mpNum); + } + + if (targetPtr) + { + LOG_APPEND(Log::LOG_VERBOSE, "-- DedicatedActor %s %i-%i has AI target %s %i-%i", + ptr.getCellRef().getRefId().c_str(), ptr.getCellRef().getRefNum().mIndex, ptr.getCellRef().getMpNum(), + targetPtr.getCellRef().getRefId().c_str(), aiTarget.refNumIndex, aiTarget.mpNum); + + if (aiAction == mwmp::BaseActor::AIAction::Follow) + { + MWMechanics::AiFollow package(targetPtr.getCellRef().getRefId()); + ptr.getClass().getCreatureStats(ptr).getAiSequence().stack(package, ptr); + } + } + } +} + void DedicatedActor::playAnimation() { if (!animation.groupname.empty()) diff --git a/apps/openmw/mwmp/DedicatedActor.hpp b/apps/openmw/mwmp/DedicatedActor.hpp index f58dca15f..3b952f3c4 100644 --- a/apps/openmw/mwmp/DedicatedActor.hpp +++ b/apps/openmw/mwmp/DedicatedActor.hpp @@ -22,6 +22,7 @@ namespace mwmp void setAnimFlags(); void setStatsDynamic(); void setEquipment(); + void setAI(); void playAnimation(); void playSound(); diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorAI.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorAI.hpp index 2d53e0efd..5516f043d 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorAI.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorAI.hpp @@ -17,7 +17,7 @@ namespace mwmp virtual void Do(ActorPacket &packet, ActorList &actorList) { - //Main::get().getCellController()->readAI(actorList); + Main::get().getCellController()->readAI(actorList); } }; } diff --git a/apps/openmw/mwstate/quicksavemanager.cpp b/apps/openmw/mwstate/quicksavemanager.cpp index 9f522d7eb..59658ce6e 100644 --- a/apps/openmw/mwstate/quicksavemanager.cpp +++ b/apps/openmw/mwstate/quicksavemanager.cpp @@ -3,8 +3,8 @@ MWState::QuickSaveManager::QuickSaveManager(std::string &saveName, unsigned int maxSaves) : mSaveName(saveName) , mMaxSaves(maxSaves) - , mOldestSlotVisited(NULL) , mSlotsVisited(0) + , mOldestSlotVisited(nullptr) { } diff --git a/apps/openmw/mwworld/esmstore.cpp b/apps/openmw/mwworld/esmstore.cpp index 4a1763d0a..2fe9ebcad 100644 --- a/apps/openmw/mwworld/esmstore.cpp +++ b/apps/openmw/mwworld/esmstore.cpp @@ -141,6 +141,7 @@ void ESMStore::setUp() mMagicEffects.setUp(); mAttributes.setUp(); mDialogs.setUp(); + mStatics.setUp(); } int ESMStore::countSavedGameRecords() const diff --git a/apps/openmw/mwworld/store.cpp b/apps/openmw/mwworld/store.cpp index 158d3f771..6f0a1b49f 100644 --- a/apps/openmw/mwworld/store.cpp +++ b/apps/openmw/mwworld/store.cpp @@ -1053,6 +1053,32 @@ namespace MWWorld } } + template<> + void Store::setUp() + { + // Load default marker definitions, if game files do not have them for some reason + std::pair markers[] = { + std::make_pair("divinemarker", "marker_divine.nif"), + std::make_pair("doormarker", "marker_arrow.nif"), + std::make_pair("northmarker", "marker_north.nif"), + std::make_pair("templemarker", "marker_temple.nif"), + std::make_pair("travelmarker", "marker_travel.nif") + }; + + for (const std::pair marker : markers) + { + if (search(marker.first) == 0) + { + ESM::Static newMarker = ESM::Static(marker.first, marker.second); + std::pair ret = mStatic.insert(std::make_pair(marker.first, newMarker)); + if (ret.first != mStatic.end()) + { + mShared.push_back(&ret.first->second); + } + } + } + } + template <> inline RecordId Store::load(ESM::ESMReader &esm) { // The original letter case of a dialogue ID is saved, because it's printed diff --git a/apps/openmw_test_suite/esm/test_fixed_string.cpp b/apps/openmw_test_suite/esm/test_fixed_string.cpp index 59dd7fe66..598e8daad 100644 --- a/apps/openmw_test_suite/esm/test_fixed_string.cpp +++ b/apps/openmw_test_suite/esm/test_fixed_string.cpp @@ -66,10 +66,8 @@ TEST(EsmFixedString, struct_size) TEST(EsmFixedString, DISABLED_is_pod) { - /* TODO: enable in C++11 - * ASSERT_TRUE(std::is_pod::value); - * ASSERT_TRUE(std::is_pod::value); - * ASSERT_TRUE(std::is_pod::value); - * ASSERT_TRUE(std::is_pod::value); - */ + ASSERT_TRUE(std::is_pod::value); + ASSERT_TRUE(std::is_pod::value); + ASSERT_TRUE(std::is_pod::value); + ASSERT_TRUE(std::is_pod::value); } diff --git a/components/contentselector/model/contentmodel.cpp b/components/contentselector/model/contentmodel.cpp index a7ac29b46..41407ec88 100644 --- a/components/contentselector/model/contentmodel.cpp +++ b/components/contentselector/model/contentmodel.cpp @@ -512,7 +512,9 @@ void ContentSelectorModel::ContentModel::sortFiles() //dependencies appear. for (int j = i + 1; j < fileCount; j++) { - if (gamefiles.contains(mFiles.at(j)->fileName(), Qt::CaseInsensitive)) + if (gamefiles.contains(mFiles.at(j)->fileName(), Qt::CaseInsensitive) + || (!mFiles.at(i)->isGameFile() && gamefiles.isEmpty() + && mFiles.at(j)->fileName().compare("Morrowind.esm", Qt::CaseInsensitive) == 0)) // Hack: implicit dependency on Morrowind.esm for dependency-less files { mFiles.move(j, i); diff --git a/components/esm/loadnpc.cpp b/components/esm/loadnpc.cpp index a68c97a6a..dd34934ad 100644 --- a/components/esm/loadnpc.cpp +++ b/components/esm/loadnpc.cpp @@ -62,12 +62,23 @@ namespace ESM if (esm.getSubSize() == 52) { mNpdtType = NPC_DEFAULT; - esm.getExact(&mNpdt52, 52); + esm.getExact(&mNpdt, 52); } else if (esm.getSubSize() == 12) { + //Reading into temporary NPDTstruct12 object + NPDTstruct12 npdt12; mNpdtType = NPC_WITH_AUTOCALCULATED_STATS; - esm.getExact(&mNpdt12, 12); + esm.getExact(&npdt12, 12); + + //Clearing the mNdpt struct to initialize all values + blankNpdt(); + //Swiching to an internal representation + mNpdt.mLevel = npdt12.mLevel; + mNpdt.mDisposition = npdt12.mDisposition; + mNpdt.mReputation = npdt12.mReputation; + mNpdt.mRank = npdt12.mRank; + mNpdt.mGold = npdt12.mGold; } else esm.fail("NPC_NPDT must be 12 or 52 bytes long"); @@ -135,9 +146,19 @@ namespace ESM esm.writeHNOCString("SCRI", mScript); if (mNpdtType == NPC_DEFAULT) - esm.writeHNT("NPDT", mNpdt52, 52); + { + esm.writeHNT("NPDT", mNpdt, 52); + } else if (mNpdtType == NPC_WITH_AUTOCALCULATED_STATS) - esm.writeHNT("NPDT", mNpdt12, 12); + { + NPDTstruct12 npdt12; + npdt12.mLevel = mNpdt.mLevel; + npdt12.mDisposition = mNpdt.mDisposition; + npdt12.mReputation = mNpdt.mReputation; + npdt12.mRank = mNpdt.mRank; + npdt12.mGold = mNpdt.mGold; + esm.writeHNT("NPDT", npdt12, 12); + } esm.writeHNT("FLAG", mFlags); @@ -171,25 +192,7 @@ namespace ESM void NPC::blank() { mNpdtType = NPC_DEFAULT; - mNpdt52.mLevel = 0; - mNpdt52.mStrength = mNpdt52.mIntelligence = mNpdt52.mWillpower = mNpdt52.mAgility = - mNpdt52.mSpeed = mNpdt52.mEndurance = mNpdt52.mPersonality = mNpdt52.mLuck = 0; - for (int i=0; i< Skill::Length; ++i) mNpdt52.mSkills[i] = 0; - mNpdt52.mReputation = 0; - mNpdt52.mHealth = mNpdt52.mMana = mNpdt52.mFatigue = 0; - mNpdt52.mDisposition = 0; - mNpdt52.mFactionID = 0; - mNpdt52.mRank = 0; - mNpdt52.mUnknown = 0; - mNpdt52.mGold = 0; - mNpdt12.mLevel = 0; - mNpdt12.mDisposition = 0; - mNpdt12.mReputation = 0; - mNpdt12.mRank = 0; - mNpdt12.mUnknown1 = 0; - mNpdt12.mUnknown2 = 0; - mNpdt12.mUnknown3 = 0; - mNpdt12.mGold = 0; + blankNpdt(); mFlags = 0; mInventory.mList.clear(); mSpells.mList.clear(); @@ -207,14 +210,27 @@ namespace ESM mHead.clear(); } + void NPC::blankNpdt() + { + mNpdt.mLevel = 0; + mNpdt.mStrength = mNpdt.mIntelligence = mNpdt.mWillpower = mNpdt.mAgility = + mNpdt.mSpeed = mNpdt.mEndurance = mNpdt.mPersonality = mNpdt.mLuck = 0; + for (int i=0; i< Skill::Length; ++i) mNpdt.mSkills[i] = 0; + mNpdt.mReputation = 0; + mNpdt.mHealth = mNpdt.mMana = mNpdt.mFatigue = 0; + mNpdt.mDisposition = 0; + mNpdt.mFactionID = 0; + mNpdt.mRank = 0; + mNpdt.mUnknown = 0; + mNpdt.mGold = 0; + } + int NPC::getFactionRank() const { if (mFaction.empty()) return -1; - else if (mNpdtType == ESM::NPC::NPC_WITH_AUTOCALCULATED_STATS) - return mNpdt12.mRank; - else // NPC_DEFAULT - return mNpdt52.mRank; + else + return mNpdt.mRank; } const std::vector& NPC::getTransport() const diff --git a/components/esm/loadnpc.hpp b/components/esm/loadnpc.hpp index d7f30e079..5f567d999 100644 --- a/components/esm/loadnpc.hpp +++ b/components/esm/loadnpc.hpp @@ -95,6 +95,8 @@ struct NPC int mGold; }; // 52 bytes + //Structure for autocalculated characters. + // This is only used for load and save operations. struct NPDTstruct12 { short mLevel; @@ -106,8 +108,9 @@ struct NPC #pragma pack(pop) unsigned char mNpdtType; - NPDTstruct52 mNpdt52; - NPDTstruct12 mNpdt12; //for autocalculated characters + //Worth noting when saving the struct: + // Although we might read a NPDTstruct12 in, we use NPDTstruct52 internally + NPDTstruct52 mNpdt; int getFactionRank() const; /// wrapper for mNpdt*, -1 = no rank @@ -141,6 +144,9 @@ struct NPC void blank(); ///< Set record to default state (does not touch the ID). + + /// Resets the mNpdt object + void blankNpdt(); }; } #endif diff --git a/components/esm/loadstat.hpp b/components/esm/loadstat.hpp index 930cdb849..f80875b65 100644 --- a/components/esm/loadstat.hpp +++ b/components/esm/loadstat.hpp @@ -26,13 +26,23 @@ struct Static /// Return a string descriptor for this record type. Currently used for debugging / error logs only. static std::string getRecordType() { return "Static"; } - std::string mId, mModel; + std::string mId, mModel; - void load(ESMReader &esm, bool &isDeleted); - void save(ESMWriter &esm, bool isDeleted = false) const; + void load(ESMReader &esm, bool &isDeleted); + void save(ESMWriter &esm, bool isDeleted = false) const; void blank(); ///< Set record to default state (does not touch the ID). + + Static(const std::string id, const std::string &model) + : mId(id) + , mModel(model) + { + } + + Static() + { + } }; } #endif diff --git a/components/openmw-mp/Base/BaseActor.hpp b/components/openmw-mp/Base/BaseActor.hpp index 1dfc125c8..35ce415b9 100644 --- a/components/openmw-mp/Base/BaseActor.hpp +++ b/components/openmw-mp/Base/BaseActor.hpp @@ -25,6 +25,11 @@ namespace mwmp isFlying = false; } + enum class AIAction : uint8_t + { + Follow = 0 + }; + std::string refId; unsigned refNumIndex; unsigned mpNum; @@ -33,6 +38,10 @@ namespace mwmp Animation animation; + bool hasAiTarget; + Target aiTarget; + AIAction aiAction; + bool hasPositionData; bool hasStatsDynamicData; }; diff --git a/components/openmw-mp/Packets/Actor/PacketActorAI.cpp b/components/openmw-mp/Packets/Actor/PacketActorAI.cpp index 774536460..99270bddd 100644 --- a/components/openmw-mp/Packets/Actor/PacketActorAI.cpp +++ b/components/openmw-mp/Packets/Actor/PacketActorAI.cpp @@ -11,5 +11,22 @@ PacketActorAI::PacketActorAI(RakNet::RakPeerInterface *peer) : ActorPacket(peer) void PacketActorAI::Actor(BaseActor &actor, bool send) { - // Placeholder to be filled in later + RW(actor.aiAction, send); + RW(actor.hasAiTarget, send); + + if (actor.hasAiTarget) + { + RW(actor.aiTarget.isPlayer, send); + + if (actor.aiTarget.isPlayer) + { + RW(actor.aiTarget.guid, send); + } + else + { + RW(actor.aiTarget.refId, send, 1); + RW(actor.aiTarget.refNumIndex, send); + RW(actor.aiTarget.mpNum, send); + } + } } diff --git a/files/opencs/GMST.png b/files/opencs/GMST.png deleted file mode 100644 index f24620288..000000000 Binary files a/files/opencs/GMST.png and /dev/null differ diff --git a/files/opencs/LandTexture.png b/files/opencs/LandTexture.png deleted file mode 100644 index 84f729098..000000000 Binary files a/files/opencs/LandTexture.png and /dev/null differ diff --git a/files/opencs/Lightbulb-48.png b/files/opencs/Lightbulb-48.png deleted file mode 100644 index c7a45528e..000000000 Binary files a/files/opencs/Lightbulb-48.png and /dev/null differ diff --git a/files/opencs/Moon-48.png b/files/opencs/Moon-48.png deleted file mode 100644 index 016b030f2..000000000 Binary files a/files/opencs/Moon-48.png and /dev/null differ diff --git a/files/opencs/PathGrid.png b/files/opencs/PathGrid.png deleted file mode 100644 index 23b6b84d7..000000000 Binary files a/files/opencs/PathGrid.png and /dev/null differ diff --git a/files/opencs/Sun-48.png b/files/opencs/Sun-48.png deleted file mode 100644 index dbdede349..000000000 Binary files a/files/opencs/Sun-48.png and /dev/null differ diff --git a/files/opencs/activator.png b/files/opencs/activator.png index 32cc6f8a3..ded6ab835 100644 Binary files a/files/opencs/activator.png and b/files/opencs/activator.png differ diff --git a/files/opencs/add.png b/files/opencs/add.png deleted file mode 100644 index 3f1347e24..000000000 Binary files a/files/opencs/add.png and /dev/null differ diff --git a/files/opencs/added.png b/files/opencs/added.png deleted file mode 100644 index ddd9c2108..000000000 Binary files a/files/opencs/added.png and /dev/null differ diff --git a/files/opencs/apparatus.png b/files/opencs/apparatus.png index 3cef537e1..4e95397df 100644 Binary files a/files/opencs/apparatus.png and b/files/opencs/apparatus.png differ diff --git a/files/opencs/armor.png b/files/opencs/armor.png index fc534c7d1..6f5cc83c5 100644 Binary files a/files/opencs/armor.png and b/files/opencs/armor.png differ diff --git a/files/opencs/attribute.png b/files/opencs/attribute.png index 4aa5dc02e..c12456717 100644 Binary files a/files/opencs/attribute.png and b/files/opencs/attribute.png differ diff --git a/files/opencs/base.png b/files/opencs/base.png deleted file mode 100644 index 4398e2d68..000000000 Binary files a/files/opencs/base.png and /dev/null differ diff --git a/files/opencs/birthsign.png b/files/opencs/birthsign.png index 8192d2ebf..861dbd4d1 100644 Binary files a/files/opencs/birthsign.png and b/files/opencs/birthsign.png differ diff --git a/files/opencs/body-part.png b/files/opencs/body-part.png index 823e43712..8baec7202 100644 Binary files a/files/opencs/body-part.png and b/files/opencs/body-part.png differ diff --git a/files/opencs/book.png b/files/opencs/book.png index 9d7669bd7..fdecb1585 100644 Binary files a/files/opencs/book.png and b/files/opencs/book.png differ diff --git a/files/opencs/brush-circle.png b/files/opencs/brush-circle.png new file mode 100644 index 000000000..22e92c1c7 Binary files /dev/null and b/files/opencs/brush-circle.png differ diff --git a/files/opencs/brush-custom.png b/files/opencs/brush-custom.png new file mode 100644 index 000000000..58c048550 Binary files /dev/null and b/files/opencs/brush-custom.png differ diff --git a/files/opencs/brush-point.png b/files/opencs/brush-point.png new file mode 100644 index 000000000..19b2354f8 Binary files /dev/null and b/files/opencs/brush-point.png differ diff --git a/files/opencs/brush-square.png b/files/opencs/brush-square.png new file mode 100644 index 000000000..08628772e Binary files /dev/null and b/files/opencs/brush-square.png differ diff --git a/files/opencs/camera-first-person.png b/files/opencs/camera-first-person.png new file mode 100644 index 000000000..b497198df Binary files /dev/null and b/files/opencs/camera-first-person.png differ diff --git a/files/opencs/camera-free.png b/files/opencs/camera-free.png new file mode 100644 index 000000000..d8e7ccae5 Binary files /dev/null and b/files/opencs/camera-free.png differ diff --git a/files/opencs/camera-orbit.png b/files/opencs/camera-orbit.png new file mode 100644 index 000000000..1aedf2847 Binary files /dev/null and b/files/opencs/camera-orbit.png differ diff --git a/files/opencs/cell.png b/files/opencs/cell.png index c4f00c1f0..9127dd5e5 100644 Binary files a/files/opencs/cell.png and b/files/opencs/cell.png differ diff --git a/files/opencs/class.png b/files/opencs/class.png index 316380363..272f2630c 100644 Binary files a/files/opencs/class.png and b/files/opencs/class.png differ diff --git a/files/opencs/clothing.png b/files/opencs/clothing.png index 88c9b6ab8..e42988e74 100644 Binary files a/files/opencs/clothing.png and b/files/opencs/clothing.png differ diff --git a/files/opencs/container.png b/files/opencs/container.png index 2a6ed01eb..336a05dbf 100644 Binary files a/files/opencs/container.png and b/files/opencs/container.png differ diff --git a/files/opencs/creature.png b/files/opencs/creature.png index 99cf9c87c..003684dca 100644 Binary files a/files/opencs/creature.png and b/files/opencs/creature.png differ diff --git a/files/opencs/dialogoue-info.png b/files/opencs/dialogoue-info.png deleted file mode 100644 index f6743d43c..000000000 Binary files a/files/opencs/dialogoue-info.png and /dev/null differ diff --git a/files/opencs/dialogoue-journal.png b/files/opencs/dialogoue-journal.png deleted file mode 100644 index b6a95c538..000000000 Binary files a/files/opencs/dialogoue-journal.png and /dev/null differ diff --git a/files/opencs/dialogoue-regular.png b/files/opencs/dialogoue-regular.png deleted file mode 100644 index f9b8d252d..000000000 Binary files a/files/opencs/dialogoue-regular.png and /dev/null differ diff --git a/files/opencs/dialogue-greeting.png b/files/opencs/dialogue-greeting.png index a35e1fe6d..de6b22b42 100644 Binary files a/files/opencs/dialogue-greeting.png and b/files/opencs/dialogue-greeting.png differ diff --git a/files/opencs/dialogue-info.png b/files/opencs/dialogue-info.png new file mode 100644 index 000000000..6242eddf4 Binary files /dev/null and b/files/opencs/dialogue-info.png differ diff --git a/files/opencs/dialogue-journal.png b/files/opencs/dialogue-journal.png new file mode 100644 index 000000000..086cb8a42 Binary files /dev/null and b/files/opencs/dialogue-journal.png differ diff --git a/files/opencs/dialogue-persuasion.png b/files/opencs/dialogue-persuasion.png index 5bc5d6113..3138862c8 100644 Binary files a/files/opencs/dialogue-persuasion.png and b/files/opencs/dialogue-persuasion.png differ diff --git a/files/opencs/dialogue-regular.png b/files/opencs/dialogue-regular.png new file mode 100644 index 000000000..933afc595 Binary files /dev/null and b/files/opencs/dialogue-regular.png differ diff --git a/files/opencs/dialogue-speech.png b/files/opencs/dialogue-speech.png deleted file mode 100644 index 11eb9f1ca..000000000 Binary files a/files/opencs/dialogue-speech.png and /dev/null differ diff --git a/files/opencs/dialogue-topic-infos.png b/files/opencs/dialogue-topic-infos.png new file mode 100644 index 000000000..6242eddf4 Binary files /dev/null and b/files/opencs/dialogue-topic-infos.png differ diff --git a/files/opencs/dialogue-topics.png b/files/opencs/dialogue-topics.png new file mode 100644 index 000000000..caa6d7e7c Binary files /dev/null and b/files/opencs/dialogue-topics.png differ diff --git a/files/opencs/dialogue-voice.png b/files/opencs/dialogue-voice.png new file mode 100644 index 000000000..1d67745e5 Binary files /dev/null and b/files/opencs/dialogue-voice.png differ diff --git a/files/opencs/door.png b/files/opencs/door.png index aa48858ef..a1a823ecd 100644 Binary files a/files/opencs/door.png and b/files/opencs/door.png differ diff --git a/files/opencs/editing-instance.png b/files/opencs/editing-instance.png new file mode 100644 index 000000000..7349e8f66 Binary files /dev/null and b/files/opencs/editing-instance.png differ diff --git a/files/opencs/editing-pathgrid.png b/files/opencs/editing-pathgrid.png new file mode 100644 index 000000000..0ec024cad Binary files /dev/null and b/files/opencs/editing-pathgrid.png differ diff --git a/files/opencs/editing-terrain-movement.png b/files/opencs/editing-terrain-movement.png new file mode 100644 index 000000000..40777334b Binary files /dev/null and b/files/opencs/editing-terrain-movement.png differ diff --git a/files/opencs/editing-terrain-shape.png b/files/opencs/editing-terrain-shape.png new file mode 100644 index 000000000..a11bd95d5 Binary files /dev/null and b/files/opencs/editing-terrain-shape.png differ diff --git a/files/opencs/editing-terrain-texture.png b/files/opencs/editing-terrain-texture.png new file mode 100644 index 000000000..4a88353ee Binary files /dev/null and b/files/opencs/editing-terrain-texture.png differ diff --git a/files/opencs/editing-terrain-vertex-paint.png b/files/opencs/editing-terrain-vertex-paint.png new file mode 100644 index 000000000..2b3f0beac Binary files /dev/null and b/files/opencs/editing-terrain-vertex-paint.png differ diff --git a/files/opencs/enchantment.png b/files/opencs/enchantment.png index c90fb27ce..9bd54b8f0 100644 Binary files a/files/opencs/enchantment.png and b/files/opencs/enchantment.png differ diff --git a/files/opencs/eyeballdude.png b/files/opencs/eyeballdude.png deleted file mode 100644 index c782880f3..000000000 Binary files a/files/opencs/eyeballdude.png and /dev/null differ diff --git a/files/opencs/faction.png b/files/opencs/faction.png index 8ac1f5200..b58756bdc 100644 Binary files a/files/opencs/faction.png and b/files/opencs/faction.png differ diff --git a/files/opencs/filter.png b/files/opencs/filter.png index 94a57ecd9..55f442377 100644 Binary files a/files/opencs/filter.png and b/files/opencs/filter.png differ diff --git a/files/opencs/flying-eye.png b/files/opencs/flying-eye.png deleted file mode 100644 index e379d7fad..000000000 Binary files a/files/opencs/flying-eye.png and /dev/null differ diff --git a/files/opencs/global-variable.png b/files/opencs/global-variable.png new file mode 100644 index 000000000..e1642ac35 Binary files /dev/null and b/files/opencs/global-variable.png differ diff --git a/files/opencs/globvar.png b/files/opencs/globvar.png deleted file mode 100644 index 646145f0f..000000000 Binary files a/files/opencs/globvar.png and /dev/null differ diff --git a/files/opencs/gmst.png b/files/opencs/gmst.png new file mode 100644 index 000000000..2605fb4b9 Binary files /dev/null and b/files/opencs/gmst.png differ diff --git a/files/opencs/go-next.png b/files/opencs/go-next.png deleted file mode 100644 index 6ef8de76e..000000000 Binary files a/files/opencs/go-next.png and /dev/null differ diff --git a/files/opencs/go-previous.png b/files/opencs/go-previous.png deleted file mode 100644 index 659cd90d7..000000000 Binary files a/files/opencs/go-previous.png and /dev/null differ diff --git a/files/opencs/ingredient.png b/files/opencs/ingredient.png index 564a93047..f31e6f581 100644 Binary files a/files/opencs/ingredient.png and b/files/opencs/ingredient.png differ diff --git a/files/opencs/journal-topic-infos.png b/files/opencs/journal-topic-infos.png new file mode 100644 index 000000000..4cc446489 Binary files /dev/null and b/files/opencs/journal-topic-infos.png differ diff --git a/files/opencs/journal-topics.png b/files/opencs/journal-topics.png new file mode 100644 index 000000000..d4e58a288 Binary files /dev/null and b/files/opencs/journal-topics.png differ diff --git a/files/opencs/land-heightmap.png b/files/opencs/land-heightmap.png new file mode 100644 index 000000000..5b460a002 Binary files /dev/null and b/files/opencs/land-heightmap.png differ diff --git a/files/opencs/land-texture.png b/files/opencs/land-texture.png new file mode 100644 index 000000000..a96c4bf8c Binary files /dev/null and b/files/opencs/land-texture.png differ diff --git a/files/opencs/land.png b/files/opencs/land.png deleted file mode 100644 index 20dd321dd..000000000 Binary files a/files/opencs/land.png and /dev/null differ diff --git a/files/opencs/landpaint.png b/files/opencs/landpaint.png deleted file mode 100644 index 711c0d8f5..000000000 Binary files a/files/opencs/landpaint.png and /dev/null differ diff --git a/files/opencs/leveled-creature.png b/files/opencs/leveled-creature.png index ad4a7c6f8..e6cb1f54c 100644 Binary files a/files/opencs/leveled-creature.png and b/files/opencs/leveled-creature.png differ diff --git a/files/opencs/leveled-item.png b/files/opencs/leveled-item.png old mode 100755 new mode 100644 index 7b8e68e60..3c819c56d Binary files a/files/opencs/leveled-item.png and b/files/opencs/leveled-item.png differ diff --git a/files/opencs/light.png b/files/opencs/light.png index 2765ef1d3..55d03bcd1 100644 Binary files a/files/opencs/light.png and b/files/opencs/light.png differ diff --git a/files/opencs/lighting-lamp.png b/files/opencs/lighting-lamp.png new file mode 100644 index 000000000..c86517aa5 Binary files /dev/null and b/files/opencs/lighting-lamp.png differ diff --git a/files/opencs/lighting-moon.png b/files/opencs/lighting-moon.png new file mode 100644 index 000000000..36a6e9b5b Binary files /dev/null and b/files/opencs/lighting-moon.png differ diff --git a/files/opencs/lighting-sun.png b/files/opencs/lighting-sun.png new file mode 100644 index 000000000..a54d0ab12 Binary files /dev/null and b/files/opencs/lighting-sun.png differ diff --git a/files/opencs/list-added.png b/files/opencs/list-added.png new file mode 100644 index 000000000..4da265983 Binary files /dev/null and b/files/opencs/list-added.png differ diff --git a/files/opencs/list-base.png b/files/opencs/list-base.png new file mode 100644 index 000000000..336d4c59c Binary files /dev/null and b/files/opencs/list-base.png differ diff --git a/files/opencs/list-modified.png b/files/opencs/list-modified.png new file mode 100644 index 000000000..8b269a31d Binary files /dev/null and b/files/opencs/list-modified.png differ diff --git a/files/opencs/list-removed.png b/files/opencs/list-removed.png new file mode 100644 index 000000000..618a202bb Binary files /dev/null and b/files/opencs/list-removed.png differ diff --git a/files/opencs/lockpick.png b/files/opencs/lockpick.png index d9bd27f5e..7b1865f50 100644 Binary files a/files/opencs/lockpick.png and b/files/opencs/lockpick.png differ diff --git a/files/opencs/magic-effect.png b/files/opencs/magic-effect.png index e672ffccb..4901724c5 100644 Binary files a/files/opencs/magic-effect.png and b/files/opencs/magic-effect.png differ diff --git a/files/opencs/miscellaneous.png b/files/opencs/miscellaneous.png index 744bcd9db..b21f6e214 100644 Binary files a/files/opencs/miscellaneous.png and b/files/opencs/miscellaneous.png differ diff --git a/files/opencs/modified.png b/files/opencs/modified.png deleted file mode 100644 index 39bd182ac..000000000 Binary files a/files/opencs/modified.png and /dev/null differ diff --git a/files/opencs/npc.png b/files/opencs/npc.png index 7a07f26df..5b5b199be 100644 Binary files a/files/opencs/npc.png and b/files/opencs/npc.png differ diff --git a/files/opencs/orbit2.png b/files/opencs/orbit2.png deleted file mode 100644 index aa5c541d3..000000000 Binary files a/files/opencs/orbit2.png and /dev/null differ diff --git a/files/opencs/pathgrid.png b/files/opencs/pathgrid.png new file mode 100644 index 000000000..710ff1357 Binary files /dev/null and b/files/opencs/pathgrid.png differ diff --git a/files/opencs/potion.png b/files/opencs/potion.png index 678f61fbf..cb173bb9e 100644 Binary files a/files/opencs/potion.png and b/files/opencs/potion.png differ diff --git a/files/opencs/probe.png b/files/opencs/probe.png index 01536186d..2e405d365 100644 Binary files a/files/opencs/probe.png and b/files/opencs/probe.png differ diff --git a/files/opencs/race.png b/files/opencs/race.png index 94a2de696..aeed2fdf3 100644 Binary files a/files/opencs/race.png and b/files/opencs/race.png differ diff --git a/files/opencs/record-add.png b/files/opencs/record-add.png new file mode 100644 index 000000000..d477f1946 Binary files /dev/null and b/files/opencs/record-add.png differ diff --git a/files/opencs/record-clone.png b/files/opencs/record-clone.png new file mode 100644 index 000000000..262a67a42 Binary files /dev/null and b/files/opencs/record-clone.png differ diff --git a/files/opencs/record-delete.png b/files/opencs/record-delete.png new file mode 100644 index 000000000..817988a5d Binary files /dev/null and b/files/opencs/record-delete.png differ diff --git a/files/opencs/record-next.png b/files/opencs/record-next.png new file mode 100644 index 000000000..76866e473 Binary files /dev/null and b/files/opencs/record-next.png differ diff --git a/files/opencs/record-preview.png b/files/opencs/record-preview.png new file mode 100644 index 000000000..e3adb6ede Binary files /dev/null and b/files/opencs/record-preview.png differ diff --git a/files/opencs/record-previous.png b/files/opencs/record-previous.png new file mode 100644 index 000000000..2009d84e0 Binary files /dev/null and b/files/opencs/record-previous.png differ diff --git a/files/opencs/record-revert.png b/files/opencs/record-revert.png new file mode 100644 index 000000000..bd177ce65 Binary files /dev/null and b/files/opencs/record-revert.png differ diff --git a/files/opencs/region.png b/files/opencs/region.png new file mode 100644 index 000000000..a10089243 Binary files /dev/null and b/files/opencs/region.png differ diff --git a/files/opencs/removed.png b/files/opencs/removed.png deleted file mode 100644 index 2354bc743..000000000 Binary files a/files/opencs/removed.png and /dev/null differ diff --git a/files/opencs/repair.png b/files/opencs/repair.png index 6cf1c0aac..1b5a9ccc1 100644 Binary files a/files/opencs/repair.png and b/files/opencs/repair.png differ diff --git a/files/opencs/resources-icon.png b/files/opencs/resources-icon.png new file mode 100644 index 000000000..d84c90d5d Binary files /dev/null and b/files/opencs/resources-icon.png differ diff --git a/files/opencs/resources-mesh.png b/files/opencs/resources-mesh.png new file mode 100644 index 000000000..fdfa3528b Binary files /dev/null and b/files/opencs/resources-mesh.png differ diff --git a/files/opencs/resources-music.png b/files/opencs/resources-music.png new file mode 100644 index 000000000..53775109c Binary files /dev/null and b/files/opencs/resources-music.png differ diff --git a/files/opencs/resources-sound.png b/files/opencs/resources-sound.png new file mode 100644 index 000000000..86871611f Binary files /dev/null and b/files/opencs/resources-sound.png differ diff --git a/files/opencs/resources-texture.png b/files/opencs/resources-texture.png new file mode 100644 index 000000000..a96c4bf8c Binary files /dev/null and b/files/opencs/resources-texture.png differ diff --git a/files/opencs/resources-video.png b/files/opencs/resources-video.png new file mode 100644 index 000000000..d86bc6025 Binary files /dev/null and b/files/opencs/resources-video.png differ diff --git a/files/opencs/resources.qrc b/files/opencs/resources.qrc index 7e798527c..bfa256faf 100644 --- a/files/opencs/resources.qrc +++ b/files/opencs/resources.qrc @@ -2,11 +2,11 @@ openmw-cs.png activator.png - added.png + list-added.png apparatus.png armor.png attribute.png - base.png + list-base.png birthsign.png body-part.png book.png @@ -15,55 +15,65 @@ clothing.png container.png creature.png - dialogoue-info.png - dialogoue-journal.png - dialogoue-regular.png + dialogue-info.png + dialogue-journal.png + dialogue-regular.png dialogue-greeting.png dialogue-persuasion.png - dialogue-speech.png + dialogue-voice.png + dialogue-topics.png + dialogue-topic-infos.png + journal-topic-infos.png + journal-topics.png door.png enchantment.png faction.png filter.png - globvar.png - GMST.png + global-variable.png + gmst.png Info.png ingredient.png - landpaint.png - land.png - LandTexture.png + land-heightmap.png + land-texture.png leveled-creature.png + leveled-item.png light.png lockpick.png magic-effect.png magicrabbit.png map.png miscellaneous.png - modified.png + list-modified.png npc.png - PathGrid.png + pathgrid.png potion.png probe.png race.png random-item.png random.png - removed.png + list-removed.png repair.png script.png skill.png - soundgen.png + sound-generator.png sound.png spell.png static.png weapon.png multitype.png - go-next.png - go-previous.png - edit-delete.png - edit-undo.png - edit-preview.png - edit-clone.png - add.png + record-next.png + record-previous.png + record-delete.png + record-revert.png + record-preview.png + record-clone.png + record-add.png + resources-icon.png + resources-mesh.png + resources-music.png + resources-sound.png + resources-texture.png + resources-video.png placeholder.png @@ -73,14 +83,14 @@ raster/startup/small/configure.png - Moon-48.png - Sun-48.png - Lightbulb-48.png - eyeballdude.png - flying-eye.png - orbit2.png - scene-play.png - scene-view-references.png + lighting-moon.png + lighting-sun.png + lighting-lamp.png + camera-first-person.png + camera-free.png + camera-orbit.png + run-game.png + scene-view-instance.png scene-view-terrain.png scene-view-water.png scene-view-pathgrid.png @@ -119,7 +129,7 @@ scene-view-status-31.png scene-exterior-arrows.png scene-exterior-borders.png - scene-exterior-marker.png + scene-exterior-markers.png scene-exterior-status-0.png scene-exterior-status-1.png scene-exterior-status-2.png @@ -128,5 +138,17 @@ scene-exterior-status-5.png scene-exterior-status-6.png scene-exterior-status-7.png + editing-instance.png + editing-pathgrid.png + editing-terrain-movement.png + editing-terrain-shape.png + editing-terrain-texture.png + editing-terrain-vertex-paint.png + transform-move.png + transform-rotate.png + transform-scale.png + selection-mode-cube.png + selection-mode-cube-corner.png + selection-mode-cube-sphere.png diff --git a/files/opencs/run-game.png b/files/opencs/run-game.png new file mode 100644 index 000000000..f5038654f Binary files /dev/null and b/files/opencs/run-game.png differ diff --git a/files/opencs/scene-exterior-arrows.png b/files/opencs/scene-exterior-arrows.png index f388255ad..661bb81ae 100644 Binary files a/files/opencs/scene-exterior-arrows.png and b/files/opencs/scene-exterior-arrows.png differ diff --git a/files/opencs/scene-exterior-borders.png b/files/opencs/scene-exterior-borders.png index 9711df62c..ec5040dc8 100644 Binary files a/files/opencs/scene-exterior-borders.png and b/files/opencs/scene-exterior-borders.png differ diff --git a/files/opencs/scene-exterior-marker.png b/files/opencs/scene-exterior-marker.png deleted file mode 100644 index a2de374b7..000000000 Binary files a/files/opencs/scene-exterior-marker.png and /dev/null differ diff --git a/files/opencs/scene-exterior-markers.png b/files/opencs/scene-exterior-markers.png index a2de374b7..6fffcbbcc 100644 Binary files a/files/opencs/scene-exterior-markers.png and b/files/opencs/scene-exterior-markers.png differ diff --git a/files/opencs/scene-exterior-status-0.png b/files/opencs/scene-exterior-status-0.png index f95de53e3..6fa47b439 100644 Binary files a/files/opencs/scene-exterior-status-0.png and b/files/opencs/scene-exterior-status-0.png differ diff --git a/files/opencs/scene-exterior-status-1.png b/files/opencs/scene-exterior-status-1.png index 09427b0c2..2e1ed0f65 100644 Binary files a/files/opencs/scene-exterior-status-1.png and b/files/opencs/scene-exterior-status-1.png differ diff --git a/files/opencs/scene-exterior-status-2.png b/files/opencs/scene-exterior-status-2.png index 086fe7b0a..8ccd356aa 100644 Binary files a/files/opencs/scene-exterior-status-2.png and b/files/opencs/scene-exterior-status-2.png differ diff --git a/files/opencs/scene-exterior-status-3.png b/files/opencs/scene-exterior-status-3.png index 68cdb07d2..70fdc4111 100644 Binary files a/files/opencs/scene-exterior-status-3.png and b/files/opencs/scene-exterior-status-3.png differ diff --git a/files/opencs/scene-exterior-status-4.png b/files/opencs/scene-exterior-status-4.png index c984989b5..2f2b907fc 100644 Binary files a/files/opencs/scene-exterior-status-4.png and b/files/opencs/scene-exterior-status-4.png differ diff --git a/files/opencs/scene-exterior-status-5.png b/files/opencs/scene-exterior-status-5.png index dee32f443..b294c1b15 100644 Binary files a/files/opencs/scene-exterior-status-5.png and b/files/opencs/scene-exterior-status-5.png differ diff --git a/files/opencs/scene-exterior-status-6.png b/files/opencs/scene-exterior-status-6.png index 877b005e4..872568b26 100644 Binary files a/files/opencs/scene-exterior-status-6.png and b/files/opencs/scene-exterior-status-6.png differ diff --git a/files/opencs/scene-exterior-status-7.png b/files/opencs/scene-exterior-status-7.png index 6a8afeff7..c19431025 100644 Binary files a/files/opencs/scene-exterior-status-7.png and b/files/opencs/scene-exterior-status-7.png differ diff --git a/files/opencs/scene-play.png b/files/opencs/scene-play.png deleted file mode 100644 index e2fabea7d..000000000 Binary files a/files/opencs/scene-play.png and /dev/null differ diff --git a/files/opencs/scene-view-fog.png b/files/opencs/scene-view-fog.png index 0ba2e69cf..65ea108ac 100644 Binary files a/files/opencs/scene-view-fog.png and b/files/opencs/scene-view-fog.png differ diff --git a/files/opencs/scene-view-instance.png b/files/opencs/scene-view-instance.png new file mode 100644 index 000000000..6f5e7cb2a Binary files /dev/null and b/files/opencs/scene-view-instance.png differ diff --git a/files/opencs/scene-view-pathgrid.png b/files/opencs/scene-view-pathgrid.png index 6586b882e..edb350b8b 100644 Binary files a/files/opencs/scene-view-pathgrid.png and b/files/opencs/scene-view-pathgrid.png differ diff --git a/files/opencs/scene-view-references.png b/files/opencs/scene-view-references.png deleted file mode 100644 index aa3bc73b2..000000000 Binary files a/files/opencs/scene-view-references.png and /dev/null differ diff --git a/files/opencs/scene-view-status-0.png b/files/opencs/scene-view-status-0.png index 2b2bb4d29..1906fd89c 100644 Binary files a/files/opencs/scene-view-status-0.png and b/files/opencs/scene-view-status-0.png differ diff --git a/files/opencs/scene-view-status-1.png b/files/opencs/scene-view-status-1.png index ba18877b9..6f5e7cb2a 100644 Binary files a/files/opencs/scene-view-status-1.png and b/files/opencs/scene-view-status-1.png differ diff --git a/files/opencs/scene-view-status-10.png b/files/opencs/scene-view-status-10.png index d6e23431e..1216c180f 100644 Binary files a/files/opencs/scene-view-status-10.png and b/files/opencs/scene-view-status-10.png differ diff --git a/files/opencs/scene-view-status-11.png b/files/opencs/scene-view-status-11.png index 21a77c533..dbe8276f0 100644 Binary files a/files/opencs/scene-view-status-11.png and b/files/opencs/scene-view-status-11.png differ diff --git a/files/opencs/scene-view-status-12.png b/files/opencs/scene-view-status-12.png index efe608d2e..ba6d1f323 100644 Binary files a/files/opencs/scene-view-status-12.png and b/files/opencs/scene-view-status-12.png differ diff --git a/files/opencs/scene-view-status-13.png b/files/opencs/scene-view-status-13.png index 2fe7d4025..3651cd609 100644 Binary files a/files/opencs/scene-view-status-13.png and b/files/opencs/scene-view-status-13.png differ diff --git a/files/opencs/scene-view-status-14.png b/files/opencs/scene-view-status-14.png index 56f77199f..4bddb7ebc 100644 Binary files a/files/opencs/scene-view-status-14.png and b/files/opencs/scene-view-status-14.png differ diff --git a/files/opencs/scene-view-status-15.png b/files/opencs/scene-view-status-15.png index 5dab523c6..bdd43407c 100644 Binary files a/files/opencs/scene-view-status-15.png and b/files/opencs/scene-view-status-15.png differ diff --git a/files/opencs/scene-view-status-16.png b/files/opencs/scene-view-status-16.png index 2ff5aba75..b0051eb12 100644 Binary files a/files/opencs/scene-view-status-16.png and b/files/opencs/scene-view-status-16.png differ diff --git a/files/opencs/scene-view-status-17.png b/files/opencs/scene-view-status-17.png index 1b30b6be1..def156032 100644 Binary files a/files/opencs/scene-view-status-17.png and b/files/opencs/scene-view-status-17.png differ diff --git a/files/opencs/scene-view-status-18.png b/files/opencs/scene-view-status-18.png index 363d396cb..7d9272687 100644 Binary files a/files/opencs/scene-view-status-18.png and b/files/opencs/scene-view-status-18.png differ diff --git a/files/opencs/scene-view-status-19.png b/files/opencs/scene-view-status-19.png index 31f90a5d3..17b75ce0e 100644 Binary files a/files/opencs/scene-view-status-19.png and b/files/opencs/scene-view-status-19.png differ diff --git a/files/opencs/scene-view-status-2.png b/files/opencs/scene-view-status-2.png index 06e4cd393..edb350b8b 100644 Binary files a/files/opencs/scene-view-status-2.png and b/files/opencs/scene-view-status-2.png differ diff --git a/files/opencs/scene-view-status-20.png b/files/opencs/scene-view-status-20.png index 5420953ed..bb950d94e 100644 Binary files a/files/opencs/scene-view-status-20.png and b/files/opencs/scene-view-status-20.png differ diff --git a/files/opencs/scene-view-status-21.png b/files/opencs/scene-view-status-21.png index 7344f3195..76ad0022c 100644 Binary files a/files/opencs/scene-view-status-21.png and b/files/opencs/scene-view-status-21.png differ diff --git a/files/opencs/scene-view-status-22.png b/files/opencs/scene-view-status-22.png index 99977a1cc..e33820a16 100644 Binary files a/files/opencs/scene-view-status-22.png and b/files/opencs/scene-view-status-22.png differ diff --git a/files/opencs/scene-view-status-23.png b/files/opencs/scene-view-status-23.png index 6c428e5a8..6c1fcc54f 100644 Binary files a/files/opencs/scene-view-status-23.png and b/files/opencs/scene-view-status-23.png differ diff --git a/files/opencs/scene-view-status-24.png b/files/opencs/scene-view-status-24.png index 903a4d5a4..057532b77 100644 Binary files a/files/opencs/scene-view-status-24.png and b/files/opencs/scene-view-status-24.png differ diff --git a/files/opencs/scene-view-status-25.png b/files/opencs/scene-view-status-25.png index dd7ad5458..061336c99 100644 Binary files a/files/opencs/scene-view-status-25.png and b/files/opencs/scene-view-status-25.png differ diff --git a/files/opencs/scene-view-status-26.png b/files/opencs/scene-view-status-26.png index fca0ed8e9..8fbcf68c6 100644 Binary files a/files/opencs/scene-view-status-26.png and b/files/opencs/scene-view-status-26.png differ diff --git a/files/opencs/scene-view-status-27.png b/files/opencs/scene-view-status-27.png index 1a888bff9..30eb053b9 100644 Binary files a/files/opencs/scene-view-status-27.png and b/files/opencs/scene-view-status-27.png differ diff --git a/files/opencs/scene-view-status-28.png b/files/opencs/scene-view-status-28.png index 5b11fda91..3a8f77457 100644 Binary files a/files/opencs/scene-view-status-28.png and b/files/opencs/scene-view-status-28.png differ diff --git a/files/opencs/scene-view-status-29.png b/files/opencs/scene-view-status-29.png index 211890638..eff610666 100644 Binary files a/files/opencs/scene-view-status-29.png and b/files/opencs/scene-view-status-29.png differ diff --git a/files/opencs/scene-view-status-3.png b/files/opencs/scene-view-status-3.png index 7d23409f7..ddf27c2db 100644 Binary files a/files/opencs/scene-view-status-3.png and b/files/opencs/scene-view-status-3.png differ diff --git a/files/opencs/scene-view-status-30.png b/files/opencs/scene-view-status-30.png index 825bc772c..63ce7d0d2 100644 Binary files a/files/opencs/scene-view-status-30.png and b/files/opencs/scene-view-status-30.png differ diff --git a/files/opencs/scene-view-status-31.png b/files/opencs/scene-view-status-31.png index 16d80af04..1906fd89c 100644 Binary files a/files/opencs/scene-view-status-31.png and b/files/opencs/scene-view-status-31.png differ diff --git a/files/opencs/scene-view-status-4.png b/files/opencs/scene-view-status-4.png index 82057190d..246c5aae9 100644 Binary files a/files/opencs/scene-view-status-4.png and b/files/opencs/scene-view-status-4.png differ diff --git a/files/opencs/scene-view-status-5.png b/files/opencs/scene-view-status-5.png index 79532bf0f..63d37f8be 100644 Binary files a/files/opencs/scene-view-status-5.png and b/files/opencs/scene-view-status-5.png differ diff --git a/files/opencs/scene-view-status-6.png b/files/opencs/scene-view-status-6.png index 2b1d38526..051aa64ae 100644 Binary files a/files/opencs/scene-view-status-6.png and b/files/opencs/scene-view-status-6.png differ diff --git a/files/opencs/scene-view-status-7.png b/files/opencs/scene-view-status-7.png index 991668330..6b2e5fdc1 100644 Binary files a/files/opencs/scene-view-status-7.png and b/files/opencs/scene-view-status-7.png differ diff --git a/files/opencs/scene-view-status-8.png b/files/opencs/scene-view-status-8.png index 406649aac..65ea108ac 100644 Binary files a/files/opencs/scene-view-status-8.png and b/files/opencs/scene-view-status-8.png differ diff --git a/files/opencs/scene-view-status-9.png b/files/opencs/scene-view-status-9.png index cf83a9f7c..72d0d9fb7 100644 Binary files a/files/opencs/scene-view-status-9.png and b/files/opencs/scene-view-status-9.png differ diff --git a/files/opencs/scene-view-terrain.png b/files/opencs/scene-view-terrain.png index 7ebbd7a9a..b0051eb12 100644 Binary files a/files/opencs/scene-view-terrain.png and b/files/opencs/scene-view-terrain.png differ diff --git a/files/opencs/scene-view-water.png b/files/opencs/scene-view-water.png index 0289b3c2c..246c5aae9 100644 Binary files a/files/opencs/scene-view-water.png and b/files/opencs/scene-view-water.png differ diff --git a/files/opencs/script.png b/files/opencs/script.png index 297da4021..29d622e19 100644 Binary files a/files/opencs/script.png and b/files/opencs/script.png differ diff --git a/files/opencs/selection-mode-cube-corner.png b/files/opencs/selection-mode-cube-corner.png new file mode 100644 index 000000000..b69ef1782 Binary files /dev/null and b/files/opencs/selection-mode-cube-corner.png differ diff --git a/files/opencs/selection-mode-cube-sphere.png b/files/opencs/selection-mode-cube-sphere.png new file mode 100644 index 000000000..cb5432eea Binary files /dev/null and b/files/opencs/selection-mode-cube-sphere.png differ diff --git a/files/opencs/selection-mode-cube.png b/files/opencs/selection-mode-cube.png new file mode 100644 index 000000000..1344a3fb1 Binary files /dev/null and b/files/opencs/selection-mode-cube.png differ diff --git a/files/opencs/skill.png b/files/opencs/skill.png index 418f4f35c..0ef7cb1cb 100644 Binary files a/files/opencs/skill.png and b/files/opencs/skill.png differ diff --git a/files/opencs/sound-generator.png b/files/opencs/sound-generator.png new file mode 100644 index 000000000..79833df9c Binary files /dev/null and b/files/opencs/sound-generator.png differ diff --git a/files/opencs/sound.png b/files/opencs/sound.png index b072acf76..86871611f 100644 Binary files a/files/opencs/sound.png and b/files/opencs/sound.png differ diff --git a/files/opencs/soundgen.png b/files/opencs/soundgen.png deleted file mode 100644 index 222fc4c7f..000000000 Binary files a/files/opencs/soundgen.png and /dev/null differ diff --git a/files/opencs/spell.png b/files/opencs/spell.png index 69c897180..5890ea751 100644 Binary files a/files/opencs/spell.png and b/files/opencs/spell.png differ diff --git a/files/opencs/static.png b/files/opencs/static.png index aedf2d30e..9f458e5d0 100644 Binary files a/files/opencs/static.png and b/files/opencs/static.png differ diff --git a/files/opencs/transform-move.png b/files/opencs/transform-move.png new file mode 100644 index 000000000..1e5bd573d Binary files /dev/null and b/files/opencs/transform-move.png differ diff --git a/files/opencs/transform-rotate.png b/files/opencs/transform-rotate.png new file mode 100644 index 000000000..b6c6bc58a Binary files /dev/null and b/files/opencs/transform-rotate.png differ diff --git a/files/opencs/transform-scale.png b/files/opencs/transform-scale.png new file mode 100644 index 000000000..c641259bd Binary files /dev/null and b/files/opencs/transform-scale.png differ diff --git a/files/opencs/weapon.png b/files/opencs/weapon.png index 3d4b53466..e2c1d3dc1 100644 Binary files a/files/opencs/weapon.png and b/files/opencs/weapon.png differ diff --git a/tes3mp-credits.md b/tes3mp-credits.md index 0569e4a00..d747f186f 100644 --- a/tes3mp-credits.md +++ b/tes3mp-credits.md @@ -36,9 +36,16 @@ Art Texafornian - TES3MP logo +Super special thanks +-------------------- + + Mitch (Zaberius) + + Special thanks (in alphabetical order) -------------------------------------- + Aesylwinn Camul David Wery DestinedToDie