diff --git a/CMakeLists.txt b/CMakeLists.txt index 29d1637ea..370d6c12b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,6 +95,7 @@ target_link_libraries( binary_io::binary_io spdlog::spdlog Advapi32.lib + bcrypt.lib D3D11.lib d3dcompiler.lib Dbghelp.lib diff --git a/cmake/sourcelist.cmake b/cmake/sourcelist.cmake index 64cc8e6ce..adc62e638 100644 --- a/cmake/sourcelist.cmake +++ b/cmake/sourcelist.cmake @@ -1681,6 +1681,7 @@ set(SOURCES include/REX/W32/DXGI_5.h include/REX/W32/DXGI_6.h include/REX/W32/KERNEL32.h + include/REX/W32/NT.h include/REX/W32/OLE32.h include/REX/W32/SHELL32.h include/REX/W32/USER32.h @@ -2033,16 +2034,7 @@ set(SOURCES src/REL/Module.cpp src/REL/Relocation.cpp src/REL/Version.cpp - src/REX/W32/ADVAPI32.cpp - src/REX/W32/D3D11.cpp - src/REX/W32/D3DCOMPILER.cpp - src/REX/W32/DBGHELP.cpp - src/REX/W32/DXGI.cpp - src/REX/W32/KERNEL32.cpp - src/REX/W32/OLE32.cpp - src/REX/W32/SHELL32.cpp - src/REX/W32/USER32.cpp - src/REX/W32/VERSION.cpp + src/REX/W32.cpp src/SKSE/API.cpp src/SKSE/IAT.cpp src/SKSE/Impl/PCH.cpp diff --git a/include/RE/A/AIProcess.h b/include/RE/A/AIProcess.h index 79243a0ff..2fc08d260 100644 --- a/include/RE/A/AIProcess.h +++ b/include/RE/A/AIProcess.h @@ -80,20 +80,20 @@ namespace RE kOwnerIsInCombatantFaction = 1 << 3 }; - float cachedRadius; // 00 - float cachedWidth; // 04 - float cachedLength; // 08 - float cachedForwardLength; // 0C - float cachedDPS; // 10 - float cachedEyeLevel; // 14 - float cachedWalkSpeed; // 18 - float cachedRunSpeed; // 1C - float cachedJogSpeed; // 20 - float cachedFastWalkSpeed; // 24 - stl::enumeration booleanValues; // 28 - stl::enumeration flags; // 2C - BSTArray actorValueCache; // 30 - BSTArray maxActorValueCache; // 48 + float cachedRadius; // 00 + float cachedWidth; // 04 + float cachedLength; // 08 + float cachedForwardLength; // 0C + float cachedDPS; // 10 + float cachedEyeLevel; // 14 + float cachedWalkSpeed; // 18 + float cachedRunSpeed; // 1C + float cachedJogSpeed; // 20 + float cachedFastWalkSpeed; // 24 + REX::EnumSet booleanValues; // 28 + REX::EnumSet flags; // 2C + BSTArray actorValueCache; // 30 + BSTArray maxActorValueCache; // 48 }; static_assert(sizeof(CachedValues) == 0x60); @@ -197,42 +197,42 @@ namespace RE void UpdateRegenDelay(ActorValue a_actorValue, float a_regenDelay); // members - MiddleLowProcessData* middleLow; // 000 - MiddleHighProcessData* middleHigh; // 008 - HighProcessData* high; // 010 - ActorPackage currentPackage; // 018 - float hourLastProcessed; // 048 - float dateLastProcessed; // 04C - CachedValues* cachedValues; // 050 - std::int32_t numberItemsActivate; // 058 - std::uint32_t pad05C; // 05C - BSSimpleList objects; // 060 - BSSimpleList genericLocations; // 070 - ObjectstoAcquire* acquireObject; // 080 - ObjectstoAcquire* savedAcquireObject; // 088 - float essentialDownTimer; // 090 - float deathTime; // 094 - float trackedDamage; // 098 - std::uint32_t pad09C; // 09C - BSTArray equippedForms; // 0A0 - Data0B8 unk0B8; // 0B8 - TESForm* equippedObjects[Hand::kTotal]; // 0F0 - std::uint64_t unk100; // 100 - std::uint64_t unk108; // 108 - RefHandle followTarget; // 110 - RefHandle target; // 114 - RefHandle arrestTarget; // 118 - std::uint64_t unk120; // 120 - std::uint64_t unk128; // 128 - std::uint32_t unk130; // 130 - std::uint16_t unk134; // 134 - stl::enumeration lowProcessFlags; // 136 - stl::enumeration processLevel; // 137 - bool skippedTimeStampForPathing; // 138 - bool ignoringCombat; // 139 - bool endAlarmOnActor; // 13A - bool escortingPlayer; // 13B - std::uint32_t pad13C; // 13C + MiddleLowProcessData* middleLow; // 000 + MiddleHighProcessData* middleHigh; // 008 + HighProcessData* high; // 010 + ActorPackage currentPackage; // 018 + float hourLastProcessed; // 048 + float dateLastProcessed; // 04C + CachedValues* cachedValues; // 050 + std::int32_t numberItemsActivate; // 058 + std::uint32_t pad05C; // 05C + BSSimpleList objects; // 060 + BSSimpleList genericLocations; // 070 + ObjectstoAcquire* acquireObject; // 080 + ObjectstoAcquire* savedAcquireObject; // 088 + float essentialDownTimer; // 090 + float deathTime; // 094 + float trackedDamage; // 098 + std::uint32_t pad09C; // 09C + BSTArray equippedForms; // 0A0 + Data0B8 unk0B8; // 0B8 + TESForm* equippedObjects[Hand::kTotal]; // 0F0 + std::uint64_t unk100; // 100 + std::uint64_t unk108; // 108 + RefHandle followTarget; // 110 + RefHandle target; // 114 + RefHandle arrestTarget; // 118 + std::uint64_t unk120; // 120 + std::uint64_t unk128; // 128 + std::uint32_t unk130; // 130 + std::uint16_t unk134; // 134 + REX::EnumSet lowProcessFlags; // 136 + REX::EnumSet processLevel; // 137 + bool skippedTimeStampForPathing; // 138 + bool ignoringCombat; // 139 + bool endAlarmOnActor; // 13A + bool escortingPlayer; // 13B + std::uint32_t pad13C; // 13C protected: void Update3DModel_Impl(Actor* a_actor); diff --git a/include/RE/A/ActiveEffect.h b/include/RE/A/ActiveEffect.h index 654d3332e..a6c61fd6a 100644 --- a/include/RE/A/ActiveEffect.h +++ b/include/RE/A/ActiveEffect.h @@ -96,25 +96,25 @@ namespace RE Actor* GetTargetActor(); const Actor* GetTargetActor() const; - ActiveEffectReferenceEffectController hitEffectController; // 08 - BSSoundHandle persistentSound; // 28 - ActorHandle caster; // 34 - NiPointer sourceNode; // 38 - MagicItem* spell; // 40 - Effect* effect; // 48 - MagicTarget* target; // 50 - TESBoundObject* source; // 58 - BSSimpleList* hitEffects; // 60 - MagicItem* displacementSpell; // 68 - float elapsedSeconds; // 70 - float duration; // 74 - float magnitude; // 78 - stl::enumeration flags; // 7C - stl::enumeration conditionStatus; // 80 - std::uint16_t usUniqueID; // 84 - std::uint16_t pad86; // 86 - MagicSystem::CastingSource castingSource; // 88 - std::uint32_t pad8C; // 8C + ActiveEffectReferenceEffectController hitEffectController; // 08 + BSSoundHandle persistentSound; // 28 + ActorHandle caster; // 34 + NiPointer sourceNode; // 38 + MagicItem* spell; // 40 + Effect* effect; // 48 + MagicTarget* target; // 50 + TESBoundObject* source; // 58 + BSSimpleList* hitEffects; // 60 + MagicItem* displacementSpell; // 68 + float elapsedSeconds; // 70 + float duration; // 74 + float magnitude; // 78 + REX::EnumSet flags; // 7C + REX::EnumSet conditionStatus; // 80 + std::uint16_t usUniqueID; // 84 + std::uint16_t pad86; // 86 + MagicSystem::CastingSource castingSource; // 88 + std::uint32_t pad8C; // 8C }; static_assert(sizeof(ActiveEffect) == 0x90); } diff --git a/include/RE/A/Actor.h b/include/RE/A/Actor.h index b252cc424..f64741a4b 100644 --- a/include/RE/A/Actor.h +++ b/include/RE/A/Actor.h @@ -646,65 +646,65 @@ namespace RE bool WouldBeStealing(const TESObjectREFR* a_target) const; // members - stl::enumeration boolBits; // 0E0 - float updateTargetTimer; // 0E4 - stl::enumeration criticalStage; // 0E8 - std::uint32_t pad0EC; // 0EC - AIProcess* currentProcess; // 0F0 - ObjectRefHandle dialogueItemTarget; // 0F8 - ActorHandle currentCombatTarget; // 0FC - ActorHandle myKiller; // 100 - float checkMyDeadBodyTimer; // 104 - float voiceTimer; // 108 - float underWaterTimer; // 10C - std::int32_t thiefCrimeStamp; // 110 - std::int32_t actionValue; // 114 - float timerOnAction; // 118 - std::uint32_t unk11C; // 11C - NiPoint3 editorLocCoord; // 120 - float editorLocRot; // 12C - TESForm* editorLocForm; // 130 - BGSLocation* editorLocation; // 138 - ActorMover* actorMover; // 140 - BSTSmartPointer movementController; // 148 - TESPackage* unk150; // 150 - CombatController* combatController; // 158 - TESFaction* vendorFaction; // 160 - AITimeStamp calculateVendorFactionTimer; // 168 - EmotionType emotionType; // 16C - std::uint32_t emotionValue; // 170 - std::uint32_t unk174; // 174 - std::uint32_t unk178; // 178 - std::uint32_t intimidateBribeDayStamp; // 17C - std::uint64_t unk180; // 180 - BSTSmallArray addedSpells; // 188 - ActorMagicCaster* magicCasters[SlotTypes::kTotal]; // 1A0 - MagicItem* selectedSpells[SlotTypes::kTotal]; // 1C0 - TESForm* selectedPower; // 1E0 - std::uint32_t unk1E8; // 1E8 - std::uint32_t pad1EC; // 1EC - TESRace* race; // 1F0 - float equippedWeight; // 1F8 - stl::enumeration boolFlags; // 1FC - ActorValueStorage avStorage; // 200 - BGSDialogueBranch* exclusiveBranch; // 220 - Modifiers healthModifiers; // 228 - Modifiers magickaModifiers; // 234 - Modifiers staminaModifiers; // 240 - Modifiers voicePointsModifiers; // 24C - float lastUpdate; // 258 - std::uint32_t lastSeenTime; // 25C - BSTSmartPointer biped; // 260 - float armorRating; // 268 - float armorBaseFactorSum; // 26C - std::int8_t soundCallBackSet; // 271 - std::uint8_t unk271; // 270 - std::uint8_t unk272; // 272 - std::uint8_t unk273; // 273 - std::uint32_t unk274; // 274 - std::uint64_t unk278; // 278 - std::uint64_t unk280; // 280 - REX::W32::CRITICAL_SECTION unk288; // 288 - havok related + REX::EnumSet boolBits; // 0E0 + float updateTargetTimer; // 0E4 + REX::EnumSet criticalStage; // 0E8 + std::uint32_t pad0EC; // 0EC + AIProcess* currentProcess; // 0F0 + ObjectRefHandle dialogueItemTarget; // 0F8 + ActorHandle currentCombatTarget; // 0FC + ActorHandle myKiller; // 100 + float checkMyDeadBodyTimer; // 104 + float voiceTimer; // 108 + float underWaterTimer; // 10C + std::int32_t thiefCrimeStamp; // 110 + std::int32_t actionValue; // 114 + float timerOnAction; // 118 + std::uint32_t unk11C; // 11C + NiPoint3 editorLocCoord; // 120 + float editorLocRot; // 12C + TESForm* editorLocForm; // 130 + BGSLocation* editorLocation; // 138 + ActorMover* actorMover; // 140 + BSTSmartPointer movementController; // 148 + TESPackage* unk150; // 150 + CombatController* combatController; // 158 + TESFaction* vendorFaction; // 160 + AITimeStamp calculateVendorFactionTimer; // 168 + EmotionType emotionType; // 16C + std::uint32_t emotionValue; // 170 + std::uint32_t unk174; // 174 + std::uint32_t unk178; // 178 + std::uint32_t intimidateBribeDayStamp; // 17C + std::uint64_t unk180; // 180 + BSTSmallArray addedSpells; // 188 + ActorMagicCaster* magicCasters[SlotTypes::kTotal]; // 1A0 + MagicItem* selectedSpells[SlotTypes::kTotal]; // 1C0 + TESForm* selectedPower; // 1E0 + std::uint32_t unk1E8; // 1E8 + std::uint32_t pad1EC; // 1EC + TESRace* race; // 1F0 + float equippedWeight; // 1F8 + REX::EnumSet boolFlags; // 1FC + ActorValueStorage avStorage; // 200 + BGSDialogueBranch* exclusiveBranch; // 220 + Modifiers healthModifiers; // 228 + Modifiers magickaModifiers; // 234 + Modifiers staminaModifiers; // 240 + Modifiers voicePointsModifiers; // 24C + float lastUpdate; // 258 + std::uint32_t lastSeenTime; // 25C + BSTSmartPointer biped; // 260 + float armorRating; // 268 + float armorBaseFactorSum; // 26C + std::int8_t soundCallBackSet; // 271 + std::uint8_t unk271; // 270 + std::uint8_t unk272; // 272 + std::uint8_t unk273; // 273 + std::uint32_t unk274; // 274 + std::uint64_t unk278; // 278 + std::uint64_t unk280; // 280 + REX::W32::CRITICAL_SECTION unk288; // 288 - havok related private: void CalculateCurrentVendorFaction() const; diff --git a/include/RE/A/ActorKnowledge.h b/include/RE/A/ActorKnowledge.h index c30c0ec48..dc7742964 100644 --- a/include/RE/A/ActorKnowledge.h +++ b/include/RE/A/ActorKnowledge.h @@ -25,14 +25,14 @@ namespace RE ~ActorKnowledge() override; // 00 // members - ActorHandle owner; // 10 - ActorHandle target; // 14 - stl::enumeration factionFightReaction; // 18 - AITimeStamp shouldAttackTargetTimeStamp; // 1C - NiPointer detectionState; // 20 - BSTArray> listeners; // 28 - stl::enumeration flags; // 40 - AITimeStamp detectionQueuedTimeStamp; // 44 + ActorHandle owner; // 10 + ActorHandle target; // 14 + REX::EnumSet factionFightReaction; // 18 + AITimeStamp shouldAttackTargetTimeStamp; // 1C + NiPointer detectionState; // 20 + BSTArray> listeners; // 28 + REX::EnumSet flags; // 40 + AITimeStamp detectionQueuedTimeStamp; // 44 }; static_assert(sizeof(ActorKnowledge) == 0x48); } diff --git a/include/RE/A/ActorMagicCaster.h b/include/RE/A/ActorMagicCaster.h index a9264dac7..c79608713 100644 --- a/include/RE/A/ActorMagicCaster.h +++ b/include/RE/A/ActorMagicCaster.h @@ -77,18 +77,18 @@ namespace RE } // members - RefAttachTechniqueInput castingArtData; // 64 - NiPointer cloneTask; // B0 - Actor* actor; // B8 - NiNode* magicNode; // C0 - NiPointer light; // C8 - InterruptHandler_t* interruptHandler; // D0 - BGSLoadGameSubBuffer loadGameSubBuffer; // D8 - BGSArtObject* castingArt; // E0 - ReferenceEffectController* weaponEnchantmentController; // E8 - float costCharged; // F0 - MagicSystem::CastingSource castingSource; // F4 - stl::enumeration flags; // F8 + RefAttachTechniqueInput castingArtData; // 64 + NiPointer cloneTask; // B0 + Actor* actor; // B8 + NiNode* magicNode; // C0 + NiPointer light; // C8 + InterruptHandler_t* interruptHandler; // D0 + BGSLoadGameSubBuffer loadGameSubBuffer; // D8 + BGSArtObject* castingArt; // E0 + ReferenceEffectController* weaponEnchantmentController; // E8 + float costCharged; // F0 + MagicSystem::CastingSource castingSource; // F4 + REX::EnumSet flags; // F8 }; static_assert(sizeof(ActorMagicCaster) == 0x100); } diff --git a/include/RE/A/ActorPackage.h b/include/RE/A/ActorPackage.h index e4321e2ae..4a3cb4249 100644 --- a/include/RE/A/ActorPackage.h +++ b/include/RE/A/ActorPackage.h @@ -18,17 +18,17 @@ namespace RE }; // members - mutable BSSpinLock packageLock; // 00 - TESPackage* package; // 08 - ActorPackageData* data; // 10 - ObjectRefHandle target; // 18 - std::int32_t currentProcedureIndex; // 1C - float packageStartTime; // 20 - std::uint32_t modifiedPackageFlag; // 24 - std::uint16_t modifiedInterruptFlag; // 28 - stl::enumeration actorPackageFlags; // 2A - std::int8_t preferredSpeed; // 2B - std::uint32_t pad2C; // 2C + mutable BSSpinLock packageLock; // 00 + TESPackage* package; // 08 + ActorPackageData* data; // 10 + ObjectRefHandle target; // 18 + std::int32_t currentProcedureIndex; // 1C + float packageStartTime; // 20 + std::uint32_t modifiedPackageFlag; // 24 + std::uint16_t modifiedInterruptFlag; // 28 + REX::EnumSet actorPackageFlags; // 2A + std::int8_t preferredSpeed; // 2B + std::uint32_t pad2C; // 2C }; static_assert(sizeof(ActorPackage) == 0x30); } diff --git a/include/RE/A/AlchemyItem.h b/include/RE/A/AlchemyItem.h index f567ad087..24ac1bf17 100644 --- a/include/RE/A/AlchemyItem.h +++ b/include/RE/A/AlchemyItem.h @@ -50,12 +50,12 @@ namespace RE class Data // ENIT { public: - std::int32_t costOverride; // 00 - stl::enumeration flags; // 04 - SpellItem* addictionItem; // 08 - float addictionChance; // 10 - std::uint32_t pad14; // 14 - BGSSoundDescriptorForm* consumptionSound; // 18 + std::int32_t costOverride; // 00 + REX::EnumSet flags; // 04 + SpellItem* addictionItem; // 08 + float addictionChance; // 10 + std::uint32_t pad14; // 14 + BGSSoundDescriptorForm* consumptionSound; // 18 }; static_assert(sizeof(Data) == 0x20); diff --git a/include/RE/B/BGSActorCellEvent.h b/include/RE/B/BGSActorCellEvent.h index 1ec0f11f3..b71633f9c 100644 --- a/include/RE/B/BGSActorCellEvent.h +++ b/include/RE/B/BGSActorCellEvent.h @@ -12,8 +12,8 @@ namespace RE kLeave = 1 }; - FormID cellID; - stl::enumeration flags; + FormID cellID; + REX::EnumSet flags; }; static_assert(sizeof(BGSActorCellEvent) == 0xC); } diff --git a/include/RE/B/BGSAddToPlayerInventoryEvent.h b/include/RE/B/BGSAddToPlayerInventoryEvent.h index d194e961b..6e2a29a92 100644 --- a/include/RE/B/BGSAddToPlayerInventoryEvent.h +++ b/include/RE/B/BGSAddToPlayerInventoryEvent.h @@ -28,11 +28,11 @@ namespace RE } // members - ObjectRefHandle ownerRef; // 0x00 - ObjectRefHandle containerRef; // 0x04 - BGSLocation* location{ nullptr }; // 0x08 - TESForm* itemBase{ nullptr }; // 0x10 - stl::enumeration acquireType{ AQUIRE_TYPE::kNone }; // 0x18 + ObjectRefHandle ownerRef; // 0x00 + ObjectRefHandle containerRef; // 0x04 + BGSLocation* location{ nullptr }; // 0x08 + TESForm* itemBase{ nullptr }; // 0x10 + REX::EnumSet acquireType{ AQUIRE_TYPE::kNone }; // 0x18 }; static_assert(sizeof(BGSAddToPlayerInventoryEvent) == 0x20); } diff --git a/include/RE/B/BGSAddonNode.h b/include/RE/B/BGSAddonNode.h index 6dff2bc60..9c641662b 100644 --- a/include/RE/B/BGSAddonNode.h +++ b/include/RE/B/BGSAddonNode.h @@ -16,9 +16,9 @@ namespace RE }; // members - std::uint16_t masterParticleCap; // 0 - stl::enumeration flags; // 2 - std::uint8_t pad3; // 3 + std::uint16_t masterParticleCap; // 0 + REX::EnumSet flags; // 2 + std::uint8_t pad3; // 3 }; static_assert(sizeof(ADDON_DATA) == 0x4); diff --git a/include/RE/B/BGSArtObject.h b/include/RE/B/BGSArtObject.h index b3490c92f..d95079ceb 100644 --- a/include/RE/B/BGSArtObject.h +++ b/include/RE/B/BGSArtObject.h @@ -35,7 +35,7 @@ namespace RE { public: // members - stl::enumeration artType; // 0 + REX::EnumSet artType; // 0 }; static_assert(sizeof(Data) == 0x4); diff --git a/include/RE/B/BGSAssociationType.h b/include/RE/B/BGSAssociationType.h index 198bd69c5..8c4d83e7e 100644 --- a/include/RE/B/BGSAssociationType.h +++ b/include/RE/B/BGSAssociationType.h @@ -57,9 +57,9 @@ namespace RE bool Load(TESFile* a_mod) override; // 06 // members - BSFixedString associationLabels[Members::kTotal][Sexes::kTotal]; // 20 - MPRT - FCHT - stl::enumeration flags; // 40 - DATA - std::uint32_t pad44; // 44 + BSFixedString associationLabels[Members::kTotal][Sexes::kTotal]; // 20 - MPRT - FCHT + REX::EnumSet flags; // 40 - DATA + std::uint32_t pad44; // 44 }; static_assert(sizeof(BGSAssociationType) == 0x48); } diff --git a/include/RE/B/BGSAttackData.h b/include/RE/B/BGSAttackData.h index 072d27624..5631b056c 100644 --- a/include/RE/B/BGSAttackData.h +++ b/include/RE/B/BGSAttackData.h @@ -23,18 +23,18 @@ namespace RE }; // members - float damageMult; // 00 - float attackChance; // 04 - SpellItem* attackSpell; // 08 - stl::enumeration flags; // 10 - float attackAngle; // 14 - float strikeAngle; // 18 - float staggerOffset; // 1C - BGSKeyword* attackType; // 20 - float knockDown; // 28 - float recoveryTime; // 2C - float staminaMult; // 30 - std::uint32_t pad34; // 34 + float damageMult; // 00 + float attackChance; // 04 + SpellItem* attackSpell; // 08 + REX::EnumSet flags; // 10 + float attackAngle; // 14 + float strikeAngle; // 18 + float staggerOffset; // 1C + BGSKeyword* attackType; // 20 + float knockDown; // 28 + float recoveryTime; // 2C + float staminaMult; // 30 + std::uint32_t pad34; // 34 }; static_assert(sizeof(AttackData) == 0x38); diff --git a/include/RE/B/BGSBaseAlias.h b/include/RE/B/BGSBaseAlias.h index ff196f326..a04218f44 100644 --- a/include/RE/B/BGSBaseAlias.h +++ b/include/RE/B/BGSBaseAlias.h @@ -73,13 +73,13 @@ namespace RE void SetProtected(bool a_set); // members - BSFixedString aliasName; // 08 - ALID - TESQuest* owningQuest; // 10 - std::uint32_t aliasID; // 18 - ALST/ALLS - stl::enumeration flags; // 1C - FNAM - stl::enumeration fillType; // 20 - std::uint16_t pad22; // 22 - std::uint32_t pad24; // 24 + BSFixedString aliasName; // 08 - ALID + TESQuest* owningQuest; // 10 + std::uint32_t aliasID; // 18 - ALST/ALLS + REX::EnumSet flags; // 1C - FNAM + REX::EnumSet fillType; // 20 + std::uint16_t pad22; // 22 + std::uint32_t pad24; // 24 }; static_assert(sizeof(BGSBaseAlias) == 0x28); } diff --git a/include/RE/B/BGSBipedObjectForm.h b/include/RE/B/BGSBipedObjectForm.h index ed3f28e29..3df0b0c21 100644 --- a/include/RE/B/BGSBipedObjectForm.h +++ b/include/RE/B/BGSBipedObjectForm.h @@ -52,8 +52,8 @@ namespace RE }; // members - stl::enumeration bipedObjectSlots; // 0 - stl::enumeration armorType; // 4 + REX::EnumSet bipedObjectSlots; // 0 + REX::EnumSet armorType; // 4 }; static_assert(sizeof(BIPED_MODEL) == 0x8); diff --git a/include/RE/B/BGSBodyPartData.h b/include/RE/B/BGSBodyPartData.h index 301f5f4ca..a54b1600b 100644 --- a/include/RE/B/BGSBodyPartData.h +++ b/include/RE/B/BGSBodyPartData.h @@ -28,36 +28,36 @@ namespace RE }; // members - float damageMult; // 00 - stl::enumeration flags; // 04 - stl::enumeration type; // 05 - std::int8_t healthPercent; // 06 - stl::enumeration actorValue; // 07 - std::int8_t toHitChance; // 08 - std::int8_t explosionChance; // 09 - std::int8_t explosionGenericDebrisCount; // 0A - std::uint8_t pad0B; // 0B - std::uint32_t pad0C; // 0C - BGSDebris* explosionGenericDebris; // 10 - BGSExplosion* explosion; // 18 - float trackingMaxAngle; // 20 - float explosionGenericDebrisScale; // 24 - std::int8_t dismemberGenericDebrisCount; // 28 - std::int8_t unk29; // 29 - std::uint16_t unk2A; // 2A - std::uint32_t unk2C; // 2C - BGSDebris* dismemberGenericDebris; // 30 - BGSExplosion* dismemberExplosion; // 38 - float dismemberGenericDebrisScale; // 40 - NiPoint3 goreTranslate; // 44 - NiPoint3 goreRotate; // 50 - std::uint32_t pad5C; // 5C - BGSImpactDataSet* dismemberImpactDataSet; // 60 - BGSImpactDataSet* explosionImpactDataSet; // 68 - std::int8_t dismemberDecalCount; // 70 - std::int8_t explosionDecalCount; // 71 - std::uint16_t pad72; // 72 - float explosionSpecialDebrisScale; // 74 + float damageMult; // 00 + REX::EnumSet flags; // 04 + REX::EnumSet type; // 05 + std::int8_t healthPercent; // 06 + REX::EnumSet actorValue; // 07 + std::int8_t toHitChance; // 08 + std::int8_t explosionChance; // 09 + std::int8_t explosionGenericDebrisCount; // 0A + std::uint8_t pad0B; // 0B + std::uint32_t pad0C; // 0C + BGSDebris* explosionGenericDebris; // 10 + BGSExplosion* explosion; // 18 + float trackingMaxAngle; // 20 + float explosionGenericDebrisScale; // 24 + std::int8_t dismemberGenericDebrisCount; // 28 + std::int8_t unk29; // 29 + std::uint16_t unk2A; // 2A + std::uint32_t unk2C; // 2C + BGSDebris* dismemberGenericDebris; // 30 + BGSExplosion* dismemberExplosion; // 38 + float dismemberGenericDebrisScale; // 40 + NiPoint3 goreTranslate; // 44 + NiPoint3 goreRotate; // 50 + std::uint32_t pad5C; // 5C + BGSImpactDataSet* dismemberImpactDataSet; // 60 + BGSImpactDataSet* explosionImpactDataSet; // 68 + std::int8_t dismemberDecalCount; // 70 + std::int8_t explosionDecalCount; // 71 + std::uint16_t pad72; // 72 + float explosionSpecialDebrisScale; // 74 }; static_assert(sizeof(PART_DATA) == 0x78); diff --git a/include/RE/B/BGSCameraPath.h b/include/RE/B/BGSCameraPath.h index e36aed532..2fd72f3af 100644 --- a/include/RE/B/BGSCameraPath.h +++ b/include/RE/B/BGSCameraPath.h @@ -21,7 +21,7 @@ namespace RE kAllowNoShots = 1 << 7 }; - stl::enumeration flags; // 0 + REX::EnumSet flags; // 0 }; static_assert(sizeof(PATH_DATA) == 0x1); diff --git a/include/RE/B/BGSCameraShot.h b/include/RE/B/BGSCameraShot.h index ce69174ad..f7e8c45e5 100644 --- a/include/RE/B/BGSCameraShot.h +++ b/include/RE/B/BGSCameraShot.h @@ -58,17 +58,17 @@ namespace RE }; // members - stl::enumeration cameraAction; // 00 - stl::enumeration location; // 04 - stl::enumeration target; // 08 - stl::enumeration flags; // 0C - float playerTimeMult; // 10 - float targetTimeMult; // 14 - float globalTimeMult; // 18 - float maxTime; // 1C - float minTime; // 20 - float targetPercentBetweenActors; // 24 - float nearTargetDistance; // 28 + REX::EnumSet cameraAction; // 00 + REX::EnumSet location; // 04 + REX::EnumSet target; // 08 + REX::EnumSet flags; // 0C + float playerTimeMult; // 10 + float targetTimeMult; // 14 + float globalTimeMult; // 18 + float maxTime; // 1C + float minTime; // 20 + float targetPercentBetweenActors; // 24 + float nearTargetDistance; // 28 }; static_assert(sizeof(CAMERA_SHOT_DATA) == 0x2C); diff --git a/include/RE/B/BGSCollisionLayer.h b/include/RE/B/BGSCollisionLayer.h index a6b060b26..4c4236f48 100644 --- a/include/RE/B/BGSCollisionLayer.h +++ b/include/RE/B/BGSCollisionLayer.h @@ -44,12 +44,12 @@ namespace RE void SetDelete(bool a_set) override; // 23 - { TESForm::SetDelete(a_set); } // members - std::uint32_t collisionIdx; // 30 - BNAM - Color debugColor; // 34 - FNAM - stl::enumeration flags; // 38 - GNAM - std::uint32_t pad3C; // 3C - BSFixedString name; // 40 - MNAM - BSTArray collidesWith; // 48 - CNAM + std::uint32_t collisionIdx; // 30 - BNAM + Color debugColor; // 34 - FNAM + REX::EnumSet flags; // 38 - GNAM + std::uint32_t pad3C; // 3C + BSFixedString name; // 40 - MNAM + BSTArray collidesWith; // 48 - CNAM }; static_assert(sizeof(BGSCollisionLayer) == 0x60); } diff --git a/include/RE/B/BGSColorForm.h b/include/RE/B/BGSColorForm.h index 7967cc779..467069345 100644 --- a/include/RE/B/BGSColorForm.h +++ b/include/RE/B/BGSColorForm.h @@ -41,8 +41,8 @@ namespace RE [[nodiscard]] bool IsPlayable() const; // memebrs - Color color; // 30 - CNAM - stl::enumeration flags; // 34 - FNAM + Color color; // 30 - CNAM + REX::EnumSet flags; // 34 - FNAM }; static_assert(sizeof(BGSColorForm) == 0x38); } diff --git a/include/RE/B/BGSDebris.h b/include/RE/B/BGSDebris.h index 807691a0b..1fabbe43a 100644 --- a/include/RE/B/BGSDebris.h +++ b/include/RE/B/BGSDebris.h @@ -26,13 +26,13 @@ namespace RE TES_HEAP_REDEFINE_NEW(); // members - std::int8_t percentage; // 00 - DATA~ - stl::enumeration flags; // 01 - ~DATA - std::uint16_t pad02; // 02 - std::uint32_t pad04; // 04 - const char* fileName; // 08 - BSTArray textureIDs; // 10 - MODT - BSTArray addons; // 28 + std::int8_t percentage; // 00 - DATA~ + REX::EnumSet flags; // 01 - ~DATA + std::uint16_t pad02; // 02 + std::uint32_t pad04; // 04 + const char* fileName; // 08 + BSTArray textureIDs; // 10 - MODT + BSTArray addons; // 28 }; static_assert(sizeof(BGSDebrisData) == 0x40); diff --git a/include/RE/B/BGSDefaultObjectManager.h b/include/RE/B/BGSDefaultObjectManager.h index 95c1f6652..aa02fdf41 100644 --- a/include/RE/B/BGSDefaultObjectManager.h +++ b/include/RE/B/BGSDefaultObjectManager.h @@ -401,13 +401,13 @@ namespace RE { public: // members - const char* name; // 00 - stl::enumeration type; // 08 - std::uint8_t pad09; // 09 - std::uint16_t pad0A; // 0A - char uniqueID[4]; // 0C - stl::enumeration doType; // 10 - std::uint32_t pad14; // 14 + const char* name; // 00 + REX::EnumSet type; // 08 + std::uint8_t pad09; // 09 + std::uint16_t pad0A; // 0A + char uniqueID[4]; // 0C + REX::EnumSet doType; // 10 + std::uint32_t pad14; // 14 }; static_assert(sizeof(DEFAULT_OBJECT_DATA) == 0x18); diff --git a/include/RE/B/BGSDestructibleObjectForm.h b/include/RE/B/BGSDestructibleObjectForm.h index f62795cc6..8d7971a00 100644 --- a/include/RE/B/BGSDestructibleObjectForm.h +++ b/include/RE/B/BGSDestructibleObjectForm.h @@ -23,16 +23,16 @@ namespace RE }; // members - std::int8_t modelDamageStage; // 00 - DSTD~ - std::int8_t healthPercentage; // 01 - stl::enumeration flags; // 02 - std::uint8_t pad03; // 03 - std::uint32_t selfDamagePerSecond; // 04 - BGSExplosion* explosion; // 08 - BGSDebris* debris; // 10 - std::uint32_t debrisCount; // 18 - ~DSTD - std::uint32_t pad1C; // 1C - TESModelTextureSwap* replacementModel; // 20 - DMD* + std::int8_t modelDamageStage; // 00 - DSTD~ + std::int8_t healthPercentage; // 01 + REX::EnumSet flags; // 02 + std::uint8_t pad03; // 03 + std::uint32_t selfDamagePerSecond; // 04 + BGSExplosion* explosion; // 08 + BGSDebris* debris; // 10 + std::uint32_t debrisCount; // 18 - ~DSTD + std::uint32_t pad1C; // 1C + TESModelTextureSwap* replacementModel; // 20 - DMD* }; static_assert(sizeof(DestructibleObjectStage) == 0x28); @@ -46,14 +46,14 @@ namespace RE }; // members - std::uint32_t health; // 00 - DEST~ - std::int8_t numStages; // 04 - stl::enumeration flags; // 05 - ~DEST - std::uint16_t pad06; // 06 - DestructibleObjectStage** stages; // 08 - volatile std::int32_t replacementModelRefCount; // 10 - std::uint32_t pad14; // 14 - NiPointer preloadedReplacementModels; // 18 + std::uint32_t health; // 00 - DEST~ + std::int8_t numStages; // 04 + REX::EnumSet flags; // 05 - ~DEST + std::uint16_t pad06; // 06 + DestructibleObjectStage** stages; // 08 + volatile std::int32_t replacementModelRefCount; // 10 + std::uint32_t pad14; // 14 + NiPointer preloadedReplacementModels; // 18 }; static_assert(sizeof(DestructibleObjectData) == 0x20); diff --git a/include/RE/B/BGSDialogueBranch.h b/include/RE/B/BGSDialogueBranch.h index 3c11eba23..902f5da13 100644 --- a/include/RE/B/BGSDialogueBranch.h +++ b/include/RE/B/BGSDialogueBranch.h @@ -39,12 +39,12 @@ namespace RE void InitItemImpl() override; // 13 // members - stl::enumeration flags; // 20 - DNAM - std::uint32_t pad24; // 24 - TESQuest* quest; // 28 - QNAM - TESTopic* startingTopic; // 30 - SNAM - DIALOGUE_TYPE type; // 38 - TNAM - std::uint32_t pad3C; // 3C + REX::EnumSet flags; // 20 - DNAM + std::uint32_t pad24; // 24 + TESQuest* quest; // 28 - QNAM + TESTopic* startingTopic; // 30 - SNAM + DIALOGUE_TYPE type; // 38 - TNAM + std::uint32_t pad3C; // 3C }; static_assert(sizeof(BGSDialogueBranch) == 0x40); } diff --git a/include/RE/B/BGSDualCastData.h b/include/RE/B/BGSDualCastData.h index 8bc0f7fae..12ed34e2e 100644 --- a/include/RE/B/BGSDualCastData.h +++ b/include/RE/B/BGSDualCastData.h @@ -17,13 +17,13 @@ namespace RE }; // members - BGSProjectile* pProjectile; // 00 - BGSExplosion* pExplosion; // 08 - TESEffectShader* pEffectShader; // 10 - BGSArtObject* pHitEffectArt; // 18 - BGSImpactDataSet* pImpactDataSet; // 20 - stl::enumeration flags; // 28 - std::uint32_t pad30; // 30 + BGSProjectile* pProjectile; // 00 + BGSExplosion* pExplosion; // 08 + TESEffectShader* pEffectShader; // 10 + BGSArtObject* pHitEffectArt; // 18 + BGSImpactDataSet* pImpactDataSet; // 20 + REX::EnumSet flags; // 28 + std::uint32_t pad30; // 30 }; static_assert(sizeof(BGSDualCastDataDEF) == 0x30); diff --git a/include/RE/B/BGSEncounterZone.h b/include/RE/B/BGSEncounterZone.h index 6d3743056..9bf177e29 100644 --- a/include/RE/B/BGSEncounterZone.h +++ b/include/RE/B/BGSEncounterZone.h @@ -17,13 +17,13 @@ namespace RE }; // members - TESFaction* zoneOwner; // 00 - BGSLocation* location; // 08 - std::int8_t ownerRank; // 10 - std::int8_t minLevel; // 11 - stl::enumeration flags; // 12 - std::int8_t maxLevel; // 13 - std::uint32_t pad14; // 14 + TESFaction* zoneOwner; // 00 + BGSLocation* location; // 08 + std::int8_t ownerRank; // 10 + std::int8_t minLevel; // 11 + REX::EnumSet flags; // 12 + std::int8_t maxLevel; // 13 + std::uint32_t pad14; // 14 }; static_assert(sizeof(ENCOUNTER_ZONE_DATA) == 0x18); diff --git a/include/RE/B/BGSEntryPointFunctionDataActivateChoice.h b/include/RE/B/BGSEntryPointFunctionDataActivateChoice.h index 303388e25..531de7be8 100644 --- a/include/RE/B/BGSEntryPointFunctionDataActivateChoice.h +++ b/include/RE/B/BGSEntryPointFunctionDataActivateChoice.h @@ -33,12 +33,12 @@ namespace RE [[nodiscard]] bool RunsImmediately() const; // members - BSFixedString label; // 08 - BGSPerk* perk; // 10 - SpellItem* appliedSpell; // 18 - stl::enumeration flags1; // 20 - std::uint16_t flags2; // 22 - std::uint32_t pad24; // 24 + BSFixedString label; // 08 + BGSPerk* perk; // 10 + SpellItem* appliedSpell; // 18 + REX::EnumSet flags1; // 20 + std::uint16_t flags2; // 22 + std::uint32_t pad24; // 24 }; static_assert(sizeof(BGSEntryPointFunctionDataActivateChoice) == 0x28); } diff --git a/include/RE/B/BGSEntryPointPerkEntry.h b/include/RE/B/BGSEntryPointPerkEntry.h index 0e7a6fa4b..3db2a3b7c 100644 --- a/include/RE/B/BGSEntryPointPerkEntry.h +++ b/include/RE/B/BGSEntryPointPerkEntry.h @@ -38,11 +38,11 @@ namespace RE }; // members - stl::enumeration entryPoint; // 0 - stl::enumeration function; // 1 - std::uint8_t numArgs; // 2 - std::uint8_t unk3; // 3 - std::uint32_t unk4; // 4 + REX::EnumSet entryPoint; // 0 + REX::EnumSet function; // 1 + std::uint8_t numArgs; // 2 + std::uint8_t unk3; // 3 + std::uint32_t unk4; // 4 }; static_assert(sizeof(EntryData) == 0x8); diff --git a/include/RE/B/BGSEquipSlot.h b/include/RE/B/BGSEquipSlot.h index 6f57120d4..74f01f2e7 100644 --- a/include/RE/B/BGSEquipSlot.h +++ b/include/RE/B/BGSEquipSlot.h @@ -39,9 +39,9 @@ namespace RE void InitItemImpl() override; // 13 // members - BSTArray parentSlots; // 20 - PNAM - stl::enumeration flags; // 38 - DATA - std::uint32_t pad3C; // 3C + BSTArray parentSlots; // 20 - PNAM + REX::EnumSet flags; // 38 - DATA + std::uint32_t pad3C; // 3C }; static_assert(sizeof(BGSEquipSlot) == 0x40); } diff --git a/include/RE/B/BGSExplosion.h b/include/RE/B/BGSExplosion.h index 339410331..a45387b87 100644 --- a/include/RE/B/BGSExplosion.h +++ b/include/RE/B/BGSExplosion.h @@ -26,20 +26,20 @@ namespace RE kNoControllerVibration = 1 << 8 }; - TESObjectLIGH* light; // 00 - BGSSoundDescriptorForm* sound1; // 08 - BGSSoundDescriptorForm* sound2; // 10 - BGSImpactDataSet* impactDataSet; // 18 - TESObjectREFR* impactPlacedObject; // 20 - BGSProjectile* spawnProjectile; // 28 - float force; // 30 - float damage; // 34 - float radius; // 38 - float imageSpaceRadius; // 3C - float verticalOffsetMult; // 40 - stl::enumeration flags; // 44 - stl::enumeration eSoundLevel; // 48 - std::uint32_t pad4C; // 4C + TESObjectLIGH* light; // 00 + BGSSoundDescriptorForm* sound1; // 08 + BGSSoundDescriptorForm* sound2; // 10 + BGSImpactDataSet* impactDataSet; // 18 + TESObjectREFR* impactPlacedObject; // 20 + BGSProjectile* spawnProjectile; // 28 + float force; // 30 + float damage; // 34 + float radius; // 38 + float imageSpaceRadius; // 3C + float verticalOffsetMult; // 40 + REX::EnumSet flags; // 44 + REX::EnumSet eSoundLevel; // 48 + std::uint32_t pad4C; // 4C }; static_assert(sizeof(BGSExplosionData) == 0x50); diff --git a/include/RE/B/BGSHazard.h b/include/RE/B/BGSHazard.h index 2a80b17e7..c3eb234fb 100644 --- a/include/RE/B/BGSHazard.h +++ b/include/RE/B/BGSHazard.h @@ -22,16 +22,16 @@ namespace RE kDropToGround = 1 << 4 }; - std::uint32_t limit; // 00 - float radius; // 04 - float lifetime; // 08 - float imageSpaceRadius; // 0C - float targetInterval; // 10 - stl::enumeration flags; // 14 - SpellItem* spell; // 18 - TESObjectLIGH* light; // 20 - BGSImpactDataSet* impactDataSet; // 28 - BGSSoundDescriptorForm* sound; // 30 + std::uint32_t limit; // 00 + float radius; // 04 + float lifetime; // 08 + float imageSpaceRadius; // 0C + float targetInterval; // 10 + REX::EnumSet flags; // 14 + SpellItem* spell; // 18 + TESObjectLIGH* light; // 20 + BGSImpactDataSet* impactDataSet; // 28 + BGSSoundDescriptorForm* sound; // 30 }; static_assert(sizeof(BGSHazardData) == 0x38); diff --git a/include/RE/B/BGSHeadPart.h b/include/RE/B/BGSHeadPart.h index 063b85cab..f7db3c9f2 100644 --- a/include/RE/B/BGSHeadPart.h +++ b/include/RE/B/BGSHeadPart.h @@ -79,16 +79,16 @@ namespace RE bool IsExtraPart(); // members - stl::enumeration flags; // 068 - DATA - std::uint8_t pad069; // 069 - std::uint16_t pad06A; // 06A - stl::enumeration type; // 06C - PNAM - BSTArray extraParts; // 070 - BGSTextureSet* textureSet; // 088 - TNAM - TESModelTri morphs[MorphIndices::kTotal]; // 090 - BGSColorForm* color; // 108 - CNAM - BGSListForm* validRaces; // 110 - RNAM - BSFixedString formEditorID; // 118 - EDID + REX::EnumSet flags; // 068 - DATA + std::uint8_t pad069; // 069 + std::uint16_t pad06A; // 06A + REX::EnumSet type; // 06C - PNAM + BSTArray extraParts; // 070 + BGSTextureSet* textureSet; // 088 - TNAM + TESModelTri morphs[MorphIndices::kTotal]; // 090 + BGSColorForm* color; // 108 - CNAM + BGSListForm* validRaces; // 110 - RNAM + BSFixedString formEditorID; // 118 - EDID }; static_assert(sizeof(BGSHeadPart) == 0x120); } diff --git a/include/RE/B/BGSIdleCollection.h b/include/RE/B/BGSIdleCollection.h index a022571e0..a12816c70 100644 --- a/include/RE/B/BGSIdleCollection.h +++ b/include/RE/B/BGSIdleCollection.h @@ -35,13 +35,13 @@ namespace RE bool RemoveIdle(TESIdleForm* a_idle); // members - stl::enumeration idleFlags; // 08 - IDLF - std::int8_t idleCount; // 09 - IDLC - std::uint16_t pad0A; // 0A - std::uint32_t pad0C; // 0C - TESIdleForm** idles; // 10 - IDLA - float timerCheckForIdle; // 18 - IDLT - std::uint32_t pad1C; // 1C + REX::EnumSet idleFlags; // 08 - IDLF + std::int8_t idleCount; // 09 - IDLC + std::uint16_t pad0A; // 0A + std::uint32_t pad0C; // 0C + TESIdleForm** idles; // 10 - IDLA + float timerCheckForIdle; // 18 - IDLT + std::uint32_t pad1C; // 1C private: BGSIdleCollection* Ctor() diff --git a/include/RE/B/BGSImpactData.h b/include/RE/B/BGSImpactData.h index ac796db70..481dc4ed1 100644 --- a/include/RE/B/BGSImpactData.h +++ b/include/RE/B/BGSImpactData.h @@ -43,14 +43,14 @@ namespace RE kNoDecalData = 1 << 0 }; - float effectDuration; // 00 - stl::enumeration orient; // 04 - float angleThreshold; // 08 - float placementRadius; // 0C - SOUND_LEVEL soundLevel; // 10 - stl::enumeration flags; // 14 - stl::enumeration resultOverride; // 15 - std::uint16_t unk16; // 16 + float effectDuration; // 00 + REX::EnumSet orient; // 04 + float angleThreshold; // 08 + float placementRadius; // 0C + SOUND_LEVEL soundLevel; // 10 + REX::EnumSet flags; // 14 + REX::EnumSet resultOverride; // 15 + std::uint16_t unk16; // 16 }; static_assert(sizeof(IMPACT_DATA_DATA) == 0x18); diff --git a/include/RE/B/BGSLoadFormData.h b/include/RE/B/BGSLoadFormData.h index 4506fb507..5aea3a9ec 100644 --- a/include/RE/B/BGSLoadFormData.h +++ b/include/RE/B/BGSLoadFormData.h @@ -20,16 +20,16 @@ namespace RE }; // members - FormID formID; // 00 - std::uint32_t size; // 04 - std::uint32_t uncompressedSize; // 08 - std::uint32_t pad0C; // 0C - TESForm* form; // 10 - std::uint32_t changeFlags; // 18 - std::uint32_t oldChangeFlags; // 1C - stl::enumeration flags; // 20 - std::uint8_t pad22; // 22 - std::uint8_t version; // 23 + FormID formID; // 00 + std::uint32_t size; // 04 + std::uint32_t uncompressedSize; // 08 + std::uint32_t pad0C; // 0C + TESForm* form; // 10 + std::uint32_t changeFlags; // 18 + std::uint32_t oldChangeFlags; // 1C + REX::EnumSet flags; // 20 + std::uint8_t pad22; // 22 + std::uint8_t version; // 23 }; static_assert(sizeof(BGSLoadFormData) == 0x28); } diff --git a/include/RE/B/BGSMaterialType.h b/include/RE/B/BGSMaterialType.h index 80e77c93a..a5d781b65 100644 --- a/include/RE/B/BGSMaterialType.h +++ b/include/RE/B/BGSMaterialType.h @@ -46,13 +46,13 @@ namespace RE } // members - BGSMaterialType* parentType; // 20 - PNAM - BSFixedString materialName; // 28 - MNAM - MATERIAL_ID materialID; // 30 - NiColor materialColor; // 34 - CNAM - float buoyancy; // 40 - BNAM - stl::enumeration flags; // 44 - FNAM - BGSImpactDataSet* havokImpactDataSet; // 48 - HNAM + BGSMaterialType* parentType; // 20 - PNAM + BSFixedString materialName; // 28 - MNAM + MATERIAL_ID materialID; // 30 + NiColor materialColor; // 34 - CNAM + float buoyancy; // 40 - BNAM + REX::EnumSet flags; // 44 - FNAM + BGSImpactDataSet* havokImpactDataSet; // 48 - HNAM }; static_assert(sizeof(BGSMaterialType) == 0x50); } diff --git a/include/RE/B/BGSMessage.h b/include/RE/B/BGSMessage.h index 7b3192d49..b9fd25df1 100644 --- a/include/RE/B/BGSMessage.h +++ b/include/RE/B/BGSMessage.h @@ -54,11 +54,11 @@ namespace RE void InitItemImpl() override; // 13 // members - BGSMenuIcon* icon; // 40 - INAM - TESQuest* ownerQuest; // 48 - QNAM - BSSimpleList menuButtons; // 50 - stl::enumeration flags; // 60 - DNAM - std::uint32_t displayTime; // 64 - TNAM + BGSMenuIcon* icon; // 40 - INAM + TESQuest* ownerQuest; // 48 - QNAM + BSSimpleList menuButtons; // 50 + REX::EnumSet flags; // 60 - DNAM + std::uint32_t displayTime; // 64 - TNAM }; static_assert(sizeof(BGSMessage) == 0x68); } diff --git a/include/RE/B/BGSMovableStatic.h b/include/RE/B/BGSMovableStatic.h index d031c9315..105936b33 100644 --- a/include/RE/B/BGSMovableStatic.h +++ b/include/RE/B/BGSMovableStatic.h @@ -17,7 +17,7 @@ namespace RE }; // members - stl::enumeration flags; // 0 + REX::EnumSet flags; // 0 }; static_assert(sizeof(MOVABLE_STATIC_DATA) == 0x1); diff --git a/include/RE/B/BGSNumericIDIndex.h b/include/RE/B/BGSNumericIDIndex.h index 602f27afd..efdfa3121 100644 --- a/include/RE/B/BGSNumericIDIndex.h +++ b/include/RE/B/BGSNumericIDIndex.h @@ -36,8 +36,8 @@ namespace RE { union { - std::uint8_t data1; - stl::enumeration flags; + std::uint8_t data1; + REX::EnumSet flags; }; // 0 std::uint8_t data2; // 1 std::uint8_t data3; // 2 diff --git a/include/RE/B/BGSProjectile.h b/include/RE/B/BGSProjectile.h index 805900113..98f266dc1 100644 --- a/include/RE/B/BGSProjectile.h +++ b/include/RE/B/BGSProjectile.h @@ -41,32 +41,32 @@ namespace RE }; // members - stl::enumeration flags; // 00 - stl::enumeration types; // 02 - float gravity; // 04 - float speed; // 08 - float range; // 0C - TESObjectLIGH* light; // 10 - TESObjectLIGH* muzzleFlashLight; // 18 - float tracerChance; // 20 - float explosionProximity; // 24 - float explosionTimer; // 28 - std::uint32_t pad2C; // 2C - BGSExplosion* explosionType; // 30 - BGSSoundDescriptorForm* activeSoundLoop; // 38 - float muzzleFlashDuration; // 40 - float fadeOutTime; // 44 - float force; // 48 - std::uint32_t pad4C; // 4C - BGSSoundDescriptorForm* countdownSound; // 50 - BGSSoundDescriptorForm* deactivateSound; // 58 - TESObjectWEAP* defaultWeaponSource; // 60 - float coneSpread; // 68 - float collisionRadius; // 6C - float lifetime; // 70 - float relaunchInterval; // 74 - BGSTextureSet* decalData; // 78 - BGSCollisionLayer* collisionLayer; // 80 + REX::EnumSet flags; // 00 + REX::EnumSet types; // 02 + float gravity; // 04 + float speed; // 08 + float range; // 0C + TESObjectLIGH* light; // 10 + TESObjectLIGH* muzzleFlashLight; // 18 + float tracerChance; // 20 + float explosionProximity; // 24 + float explosionTimer; // 28 + std::uint32_t pad2C; // 2C + BGSExplosion* explosionType; // 30 + BGSSoundDescriptorForm* activeSoundLoop; // 38 + float muzzleFlashDuration; // 40 + float fadeOutTime; // 44 + float force; // 48 + std::uint32_t pad4C; // 4C + BGSSoundDescriptorForm* countdownSound; // 50 + BGSSoundDescriptorForm* deactivateSound; // 58 + TESObjectWEAP* defaultWeaponSource; // 60 + float coneSpread; // 68 + float collisionRadius; // 6C + float lifetime; // 70 + float relaunchInterval; // 74 + BGSTextureSet* decalData; // 78 + BGSCollisionLayer* collisionLayer; // 80 }; static_assert(sizeof(BGSProjectileData) == 0x88); diff --git a/include/RE/B/BGSRefAlias.h b/include/RE/B/BGSRefAlias.h index b7765bd78..84f136212 100644 --- a/include/RE/B/BGSRefAlias.h +++ b/include/RE/B/BGSRefAlias.h @@ -67,16 +67,16 @@ namespace RE }; // members - std::uint16_t alias; // 0 - stl::enumeration create; // 2 + std::uint16_t alias; // 0 + REX::EnumSet create; // 2 }; static_assert(sizeof(Alias) == 0x4); // members - TESBoundObject* object; // 00 - ALCO - Alias alias; // 08 - ALCA - stl::enumeration level; // 0C - ALCL - std::uint16_t pad0E; // 0E + TESBoundObject* object; // 00 - ALCO + Alias alias; // 08 - ALCA + REX::EnumSet level; // 0C - ALCL + std::uint16_t pad0E; // 0E }; static_assert(sizeof(CreatedFillData) == 0x10); @@ -108,8 +108,8 @@ namespace RE }; // members - std::uint32_t nearAlias; // 0 - ALNA - stl::enumeration nearFillType; // 4 - ALNT + std::uint32_t nearAlias; // 0 - ALNA + REX::EnumSet nearFillType; // 4 - ALNT }; static_assert(sizeof(NearAliasFillData) == 0x8); diff --git a/include/RE/B/BGSReferenceEffect.h b/include/RE/B/BGSReferenceEffect.h index 7a1bb9730..a3da248c9 100644 --- a/include/RE/B/BGSReferenceEffect.h +++ b/include/RE/B/BGSReferenceEffect.h @@ -33,10 +33,10 @@ namespace RE { public: // members - BGSArtObject* artObject; // 00 - TESEffectShader* effectShader; // 08 - stl::enumeration flags; // 10 - std::uint32_t pad14; // 14 + BGSArtObject* artObject; // 00 + TESEffectShader* effectShader; // 08 + REX::EnumSet flags; // 10 + std::uint32_t pad14; // 14 }; static_assert(sizeof(Data) == 0x18); diff --git a/include/RE/B/BGSRelationship.h b/include/RE/B/BGSRelationship.h index 2d21f5efd..c75028ab4 100644 --- a/include/RE/B/BGSRelationship.h +++ b/include/RE/B/BGSRelationship.h @@ -67,14 +67,14 @@ namespace RE } // members - TESNPC* npc1; // 20 - DATA~ - TESNPC* npc2; // 28 - BGSAssociationType* assocType; // 30 - stl::enumeration level; // 38 - std::uint8_t unk39; // 39 - std::uint8_t unk3A; // 3A - stl::enumeration flags; // 3B - std::uint32_t pad3C; // 3C - ~DATA + TESNPC* npc1; // 20 - DATA~ + TESNPC* npc2; // 28 + BGSAssociationType* assocType; // 30 + REX::EnumSet level; // 38 + std::uint8_t unk39; // 39 + std::uint8_t unk3A; // 3A + REX::EnumSet flags; // 3B + std::uint32_t pad3C; // 3C - ~DATA }; static_assert(sizeof(BGSRelationship) == 0x40); } diff --git a/include/RE/B/BGSSaveLoadGame.h b/include/RE/B/BGSSaveLoadGame.h index 286dc2b64..911f8afc2 100644 --- a/include/RE/B/BGSSaveLoadGame.h +++ b/include/RE/B/BGSSaveLoadGame.h @@ -80,21 +80,21 @@ namespace RE } // members - BSTArray pluginList; // 000 - BSTArray unk18; // 018 - BGSSaveLoadFormIDMap worldspaceFormIDMap; // 030 - BSTHashMap unk98; // 098 - BGSSaveLoadReferencesMap unkC8; // 0C8 - BSTHashMap unk158; // 158 - BGSConstructFormsInAllFilesMap reconstructFormsMap; // 188 - BGSSaveLoadQueuedSubBufferMap queuedSubBuffersMap; // 208 - BGSSaveLoadFormIDMap formIDMap; // 298 - BSTArray saveLoadHistory; // 300 - BSTArray unk318; // 318 - BGSSaveLoadChangesMap* saveLoadChanges; // 330 - std::uint64_t unk338; // 338 - stl::enumeration flags; // 340 - std::uint8_t currentMinorVersion; // 344 + BSTArray pluginList; // 000 + BSTArray unk18; // 018 + BGSSaveLoadFormIDMap worldspaceFormIDMap; // 030 + BSTHashMap unk98; // 098 + BGSSaveLoadReferencesMap unkC8; // 0C8 + BSTHashMap unk158; // 158 + BGSConstructFormsInAllFilesMap reconstructFormsMap; // 188 + BGSSaveLoadQueuedSubBufferMap queuedSubBuffersMap; // 208 + BGSSaveLoadFormIDMap formIDMap; // 298 + BSTArray saveLoadHistory; // 300 + BSTArray unk318; // 318 + BGSSaveLoadChangesMap* saveLoadChanges; // 330 + std::uint64_t unk338; // 338 + REX::EnumSet flags; // 340 + std::uint8_t currentMinorVersion; // 344 }; static_assert(sizeof(BGSSaveLoadGame) == 0x348); } diff --git a/include/RE/B/BGSSaveLoadManager.h b/include/RE/B/BGSSaveLoadManager.h index 2b7873d05..a3ebd5cd7 100644 --- a/include/RE/B/BGSSaveLoadManager.h +++ b/include/RE/B/BGSSaveLoadManager.h @@ -31,33 +31,33 @@ namespace RE bool PopulateFileEntryData(); // members - BSFixedString fileName; // 00 - BSFixedString characterName; // 08 - BSFixedString characterTitle; // 10 - BSFixedString currentLocation; // 18 - BSFixedString playTime; // 20 - BSFixedString characterRace; // 28 - std::int32_t saveVersion; // 30 - std::uint32_t saveNumber; // 34 - std::uint32_t characterLevel; // 38 - float currentExperience; // 3C - float requiredExperience; // 40 - std::uint32_t screenshotWidth; // 44 - std::uint32_t screenshotHeight; // 48 - std::uint32_t unk4C; // 4C - REX::W32::FILETIME fileTime; // 50 - REX::W32::FILETIME saveTime; // 58 - std::int32_t unk60; // 60 - bool loaded; // 64 - bool unk65; // 65 - bool unk66; // 66 - std::uint8_t unk67; // 67 - std::uint8_t unk68; // 68 - bool modded; // 69 - std::uint16_t pad6A; // 6A - std::uint32_t characterID; // 6C - stl::enumeration saveType; // 70 - std::uint32_t pad74; // 74 + BSFixedString fileName; // 00 + BSFixedString characterName; // 08 + BSFixedString characterTitle; // 10 + BSFixedString currentLocation; // 18 + BSFixedString playTime; // 20 + BSFixedString characterRace; // 28 + std::int32_t saveVersion; // 30 + std::uint32_t saveNumber; // 34 + std::uint32_t characterLevel; // 38 + float currentExperience; // 3C + float requiredExperience; // 40 + std::uint32_t screenshotWidth; // 44 + std::uint32_t screenshotHeight; // 48 + std::uint32_t unk4C; // 4C + REX::W32::FILETIME fileTime; // 50 + REX::W32::FILETIME saveTime; // 58 + std::int32_t unk60; // 60 + bool loaded; // 64 + bool unk65; // 65 + bool unk66; // 66 + std::uint8_t unk67; // 67 + std::uint8_t unk68; // 68 + bool modded; // 69 + std::uint16_t pad6A; // 6A + std::uint32_t characterID; // 6C + REX::EnumSet saveType; // 70 + std::uint32_t pad74; // 74 }; static_assert(sizeof(BGSSaveLoadFileEntry) == 0x78); diff --git a/include/RE/B/BGSScene.h b/include/RE/B/BGSScene.h index b0385f453..4c767d3bf 100644 --- a/include/RE/B/BGSScene.h +++ b/include/RE/B/BGSScene.h @@ -86,24 +86,24 @@ namespace RE void InitItemImpl() override; // 13 // members - BSTArray phases; // 20 - BSTArray actors; // 00 - ALID - BSTArray> actorFlags; // 18 - LNAM - BSTArray> actorProgressionFlags; // 30 - DNAM - BSTArray actions; // 80 - TESQuest* parentQuest; // 98 - PNAM - stl::enumeration flags; // A0 - FNAM - std::uint32_t padA4; // A4 - TESCondition conditions; // A8 - CTDA - bool isPlaying; // B0 - std::uint8_t unkB1; // B1 - std::uint8_t unkB2; // B2 - std::uint8_t unkB3; // B3 - std::uint32_t unkB4; // B4 - std::uint32_t unkB8; // B8 - std::uint32_t unkBC; // BC - std::uint32_t unkC0; // C0 - std::uint32_t padC4; // C4 + BSTArray phases; // 20 + BSTArray actors; // 00 - ALID + BSTArray> actorFlags; // 18 - LNAM + BSTArray> actorProgressionFlags; // 30 - DNAM + BSTArray actions; // 80 + TESQuest* parentQuest; // 98 - PNAM + REX::EnumSet flags; // A0 - FNAM + std::uint32_t padA4; // A4 + TESCondition conditions; // A8 - CTDA + bool isPlaying; // B0 + std::uint8_t unkB1; // B1 + std::uint8_t unkB2; // B2 + std::uint8_t unkB3; // B3 + std::uint32_t unkB4; // B4 + std::uint32_t unkB8; // B8 + std::uint32_t unkBC; // BC + std::uint32_t unkC0; // C0 + std::uint32_t padC4; // C4 }; static_assert(sizeof(BGSScene) == 0xC8); } diff --git a/include/RE/B/BGSSceneAction.h b/include/RE/B/BGSSceneAction.h index 93537950a..1ddf713a6 100644 --- a/include/RE/B/BGSSceneAction.h +++ b/include/RE/B/BGSSceneAction.h @@ -52,15 +52,15 @@ namespace RE virtual void Unk_13(void); // 13 - { return; } // members - std::uint32_t actorID; // 08 - ALID - std::uint16_t startPhase; // 0C - SNAM - std::uint16_t endPhase; // 0E - ENAM - stl::enumeration flags; // 10 - std::uint8_t unk14; // 14 - std::uint8_t unk15; // 15 - std::uint16_t unk16; // 16 - std::uint32_t index; // 18 - INAM - std::uint32_t unk1C; // 1C + std::uint32_t actorID; // 08 - ALID + std::uint16_t startPhase; // 0C - SNAM + std::uint16_t endPhase; // 0E - ENAM + REX::EnumSet flags; // 10 + std::uint8_t unk14; // 14 + std::uint8_t unk15; // 15 + std::uint16_t unk16; // 16 + std::uint32_t index; // 18 - INAM + std::uint32_t unk1C; // 1C }; static_assert(sizeof(BGSSceneAction) == 0x20); } diff --git a/include/RE/B/BGSSoundCategory.h b/include/RE/B/BGSSoundCategory.h index 9901341e1..63506bbb7 100644 --- a/include/RE/B/BGSSoundCategory.h +++ b/include/RE/B/BGSSoundCategory.h @@ -56,15 +56,15 @@ namespace RE void SetStaticVolumeMultiplier(float a_val); // members - stl::enumeration flags; // 38 - FNAM - std::uint32_t unk3C; // 3C - BGSSoundCategory* parentCategory; // 40 - SNCT - std::uint16_t unk48; // 48 - std::uint16_t attenuation; // 4A - std::uint16_t staticMult; // 4C - VNAM - std::uint16_t defaultMenuValue; // 4E - UNAM - float volumeMult; // 50 - float frequencyMult; // 54 + REX::EnumSet flags; // 38 - FNAM + std::uint32_t unk3C; // 3C + BGSSoundCategory* parentCategory; // 40 - SNCT + std::uint16_t unk48; // 48 + std::uint16_t attenuation; // 4A + std::uint16_t staticMult; // 4C - VNAM + std::uint16_t defaultMenuValue; // 4E - UNAM + float volumeMult; // 50 + float frequencyMult; // 54 }; static_assert(sizeof(BGSSoundCategory) == 0x58); } diff --git a/include/RE/B/BGSSoundOutput.h b/include/RE/B/BGSSoundOutput.h index 97f01de56..f06a6219e 100644 --- a/include/RE/B/BGSSoundOutput.h +++ b/include/RE/B/BGSSoundOutput.h @@ -41,10 +41,10 @@ namespace RE }; // members - stl::enumeration flags; // 0 - std::uint8_t unk1; // 1 - std::uint8_t unk2; // 2 - std::uint8_t reverbSendPct; // 3 + REX::EnumSet flags; // 0 + std::uint8_t unk1; // 1 + std::uint8_t unk2; // 2 + std::uint8_t reverbSendPct; // 3 }; static_assert(sizeof(Data) == 0x4); @@ -117,10 +117,10 @@ namespace RE [[nodiscard]] bool DoGetSupportsMonitor(std::uint32_t a_arg1) const override; // 09 // members - Data data; // 28 - NAM1 - stl::enumeration type; // 2C - MNAM - DynamicAttenuationCharacteristics* attenuation; // 30 - ANAM - SpeakerArrays* speakerOutputs; // 38 - ONAM + Data data; // 28 - NAM1 + REX::EnumSet type; // 2C - MNAM + DynamicAttenuationCharacteristics* attenuation; // 30 - ANAM + SpeakerArrays* speakerOutputs; // 38 - ONAM }; static_assert(sizeof(BGSSoundOutput) == 0x40); } diff --git a/include/RE/B/BGSStandardSoundDef.h b/include/RE/B/BGSStandardSoundDef.h index c45934164..6d639a46e 100644 --- a/include/RE/B/BGSStandardSoundDef.h +++ b/include/RE/B/BGSStandardSoundDef.h @@ -48,10 +48,10 @@ namespace RE kEnvelopeSlow = 1 << 5 }; - std::uint8_t unk0; // 0 - stl::enumeration looping; // 1 - std::uint8_t unk2; // 2 - std::uint8_t rumbleSendValue; // 3 + std::uint8_t unk0; // 0 + REX::EnumSet looping; // 1 + std::uint8_t unk2; // 2 + std::uint8_t rumbleSendValue; // 3 }; static_assert(sizeof(LengthCharacteristics) == 0x4); diff --git a/include/RE/B/BGSStoryManagerEventNode.h b/include/RE/B/BGSStoryManagerEventNode.h index d405e6e06..a000e0d81 100644 --- a/include/RE/B/BGSStoryManagerEventNode.h +++ b/include/RE/B/BGSStoryManagerEventNode.h @@ -13,9 +13,9 @@ namespace RE { }; - stl::enumeration type; // 00 - std::uint32_t uniqueID; // 04 - BSString name; // 08 + REX::EnumSet type; // 00 + std::uint32_t uniqueID; // 04 + BSString name; // 08 }; static_assert(sizeof(BGSStoryEventMember) == 0x18); diff --git a/include/RE/B/BGSStoryManagerNodeBase.h b/include/RE/B/BGSStoryManagerNodeBase.h index 917ffaf69..111968825 100644 --- a/include/RE/B/BGSStoryManagerNodeBase.h +++ b/include/RE/B/BGSStoryManagerNodeBase.h @@ -30,8 +30,8 @@ namespace RE }; // members - stl::enumeration nodeFlags; // 0 - stl::enumeration questFags; // 2 + REX::EnumSet nodeFlags; // 0 + REX::EnumSet questFags; // 2 }; static_assert(sizeof(Flags) == 0x4); diff --git a/include/RE/B/BGSTextureSet.h b/include/RE/B/BGSTextureSet.h index b9df999e3..976b64406 100644 --- a/include/RE/B/BGSTextureSet.h +++ b/include/RE/B/BGSTextureSet.h @@ -46,12 +46,12 @@ namespace RE void UnClone3D(TESObjectREFR* a_ref) override; // 41 // members - TESTexture textures[Textures::kUsedTotal]; // 040 - TX00 - TX07 - DecalData* decalData; // 0C0 - DODT - stl::enumeration flags; // 0C8 - DNAM - std::uint16_t pad0CA; // 0CA - BSResource::ID textureFileIDs[Textures::kUsedTotal]; // 0CC - std::uint32_t pad12C; // 12C + TESTexture textures[Textures::kUsedTotal]; // 040 - TX00 - TX07 + DecalData* decalData; // 0C0 - DODT + REX::EnumSet flags; // 0C8 - DNAM + std::uint16_t pad0CA; // 0CA + BSResource::ID textureFileIDs[Textures::kUsedTotal]; // 0CC + std::uint32_t pad12C; // 12C }; static_assert(sizeof(BGSTextureSet) == 0x130); } diff --git a/include/RE/B/BGSVoiceType.h b/include/RE/B/BGSVoiceType.h index 044419937..3bcbaf65f 100644 --- a/include/RE/B/BGSVoiceType.h +++ b/include/RE/B/BGSVoiceType.h @@ -17,7 +17,7 @@ namespace RE }; // members - stl::enumeration flags; // 0 + REX::EnumSet flags; // 0 }; static_assert(sizeof(VOICE_TYPE_DATA) == 0x1); diff --git a/include/RE/B/BSAnimNoteListener.h b/include/RE/B/BSAnimNoteListener.h index 61b753a1a..a54687a31 100644 --- a/include/RE/B/BSAnimNoteListener.h +++ b/include/RE/B/BSAnimNoteListener.h @@ -14,9 +14,9 @@ namespace RE { public: // members - stl::enumeration noteType; // 00 - std::uint32_t pad04; // 04 - IBSAnimNoteReceiver* receiver; // 08 + REX::EnumSet noteType; // 00 + std::uint32_t pad04; // 04 + IBSAnimNoteReceiver* receiver; // 08 }; static_assert(sizeof(BSAnimReceiverType) == 0x10); diff --git a/include/RE/B/BSEffectShaderMaterial.h b/include/RE/B/BSEffectShaderMaterial.h index 6c55fa516..d71bb7f20 100644 --- a/include/RE/B/BSEffectShaderMaterial.h +++ b/include/RE/B/BSEffectShaderMaterial.h @@ -26,19 +26,19 @@ namespace RE Type GetType() const override; // 07 - { return Type::kEffect; } // members - float falloffStartAngle; // 38 - float falloffStopAngle; // 3C - float falloffStartOpacity; // 40 - float falloffStopOpacity; // 44 - NiColorA baseColor; // 48 - NiPointer sourceTexture; // 58 - NiPointer greyscaleTexture; // 60 - float softFalloffDepth; // 68 - float baseColorScale; // 6C - BSFixedString sourceTexturePath; // 70 - BSFixedString greyscaleTexturePath; // 78 - stl::enumeration effectClampMode; // 80 - std::uint8_t unk81; // 81 + float falloffStartAngle; // 38 + float falloffStopAngle; // 3C + float falloffStartOpacity; // 40 + float falloffStopOpacity; // 44 + NiColorA baseColor; // 48 + NiPointer sourceTexture; // 58 + NiPointer greyscaleTexture; // 60 + float softFalloffDepth; // 68 + float baseColorScale; // 6C + BSFixedString sourceTexturePath; // 70 + BSFixedString greyscaleTexturePath; // 78 + REX::EnumSet effectClampMode; // 80 + std::uint8_t unk81; // 81 }; static_assert(sizeof(BSEffectShaderMaterial) == 0x88); } diff --git a/include/RE/B/BSFurnitureMarkerNode.h b/include/RE/B/BSFurnitureMarkerNode.h index fea3b8d21..4756a78eb 100644 --- a/include/RE/B/BSFurnitureMarkerNode.h +++ b/include/RE/B/BSFurnitureMarkerNode.h @@ -25,10 +25,10 @@ namespace RE kUp = 1 << 4 }; - NiPoint3 offset; // 00 - float heading; // 0C - stl::enumeration animationType; // 10 - stl::enumeration entryProperties; // 12 + NiPoint3 offset; // 00 + float heading; // 0C + REX::EnumSet animationType; // 10 + REX::EnumSet entryProperties; // 12 }; class BSFurnitureMarkerNode : public NiExtraData diff --git a/include/RE/B/BSGeometry.h b/include/RE/B/BSGeometry.h index 5e023dbd7..65e391237 100644 --- a/include/RE/B/BSGeometry.h +++ b/include/RE/B/BSGeometry.h @@ -73,16 +73,16 @@ namespace RE virtual void Unk_37(void); // 37 - { return 0; } // members - NiBound modelBound; // 110 - NiPointer properties[States::kTotal]; // 120 - NiPointer skinInstance; // 130 - BSGraphics::TriShape* rendererData; // 138 - void* unk140; // 140 - smart ptr - BSGraphics::VertexDesc vertexDesc; // 148 - stl::enumeration type; // 150 - std::uint8_t pad151; // 151 - std::uint16_t pad152; // 152 - std::uint32_t pad154; // 154 + NiBound modelBound; // 110 + NiPointer properties[States::kTotal]; // 120 + NiPointer skinInstance; // 130 + BSGraphics::TriShape* rendererData; // 138 + void* unk140; // 140 - smart ptr + BSGraphics::VertexDesc vertexDesc; // 148 + REX::EnumSet type; // 150 + std::uint8_t pad151; // 151 + std::uint16_t pad152; // 152 + std::uint32_t pad154; // 154 }; static_assert(sizeof(BSGeometry) == 0x158); } diff --git a/include/RE/B/BSIMusicTrack.h b/include/RE/B/BSIMusicTrack.h index 9888849f7..4c4ff7c5d 100644 --- a/include/RE/B/BSIMusicTrack.h +++ b/include/RE/B/BSIMusicTrack.h @@ -39,8 +39,8 @@ namespace RE virtual void DoClearDucking(); // 0A - { return; } // members - stl::enumeration trackStatus; // 08 - std::uint32_t pad0C; // 0C + REX::EnumSet trackStatus; // 08 + std::uint32_t pad0C; // 0C }; static_assert(sizeof(BSIMusicTrack) == 0x10); } diff --git a/include/RE/B/BSIMusicType.h b/include/RE/B/BSIMusicType.h index 3bb0aa85a..fd84ad6b5 100644 --- a/include/RE/B/BSIMusicType.h +++ b/include/RE/B/BSIMusicType.h @@ -46,16 +46,16 @@ namespace RE virtual ~BSIMusicType(); // 07 // members - stl::enumeration flags; // 08 - FNAM - std::uint8_t priority; // 0C - std::uint8_t padding; // 0D - std::uint16_t ducksOtherMusicBy; // 0E - ck value * 100 as a std::uint16_t - float fadeTime; // 10 - WNAM - std::uint32_t currentTrackIndex; // 14 - BSTArray trackHistory; // 18 - BSTArray tracks; // 30 - TNAM - stl::enumeration typeStatus; // 48 - std::uint32_t pad4C; // 4C + REX::EnumSet flags; // 08 - FNAM + std::uint8_t priority; // 0C + std::uint8_t padding; // 0D + std::uint16_t ducksOtherMusicBy; // 0E - ck value * 100 as a std::uint16_t + float fadeTime; // 10 - WNAM + std::uint32_t currentTrackIndex; // 14 + BSTArray trackHistory; // 18 + BSTArray tracks; // 30 - TNAM + REX::EnumSet typeStatus; // 48 + std::uint32_t pad4C; // 4C }; static_assert(sizeof(BSIMusicType) == 0x50); } diff --git a/include/RE/B/BSMaterialObject.h b/include/RE/B/BSMaterialObject.h index 556d7d32b..16615f0c2 100644 --- a/include/RE/B/BSMaterialObject.h +++ b/include/RE/B/BSMaterialObject.h @@ -25,16 +25,16 @@ namespace RE }; // members - float falloffScale; // 00 - float falloffBias; // 04 - float noiseUVScale; // 08 - float materialUVScale; // 0C - NiPoint3 ProjectionDir; // 10 - float normalDampener; // 1C - NiColor singlePassColor; // 20 - std::int32_t singlePass; // 2C - stl::enumeration flags; // 30 - std::uint32_t unk2C; // 34 + float falloffScale; // 00 + float falloffBias; // 04 + float noiseUVScale; // 08 + float materialUVScale; // 0C + NiPoint3 ProjectionDir; // 10 + float normalDampener; // 1C + NiColor singlePassColor; // 20 + std::int32_t singlePass; // 2C + REX::EnumSet flags; // 30 + std::uint32_t unk2C; // 34 }; static_assert(sizeof(DIRECTIONAL_DATA) == 0x38); diff --git a/include/RE/B/BSMusicEvent.h b/include/RE/B/BSMusicEvent.h index f65a04ff9..b92574745 100644 --- a/include/RE/B/BSMusicEvent.h +++ b/include/RE/B/BSMusicEvent.h @@ -16,9 +16,9 @@ namespace RE kUnpause }; - BSIMusicType* musicType; // 00 - stl::enumeration msgType; // 08 - std::uint32_t pad0C; // 0C + BSIMusicType* musicType; // 00 + REX::EnumSet msgType; // 08 + std::uint32_t pad0C; // 0C }; static_assert(sizeof(BSMusicEvent) == 0x10); } diff --git a/include/RE/B/BSNavmesh.h b/include/RE/B/BSNavmesh.h index 4676dfc0a..a37899e66 100644 --- a/include/RE/B/BSNavmesh.h +++ b/include/RE/B/BSNavmesh.h @@ -73,10 +73,10 @@ namespace RE }; // members - std::uint16_t vertices[3]; // 00 - std::uint16_t triangles[3]; // 06 - 0xFF == NONE - stl::enumeration triangleFlags; // 0C - stl::enumeration traversalFlags; // 0E + std::uint16_t vertices[3]; // 00 + std::uint16_t triangles[3]; // 06 - 0xFF == NONE + REX::EnumSet triangleFlags; // 0C + REX::EnumSet traversalFlags; // 0E }; static_assert(sizeof(BSNavmeshTriangle) == 0x10); @@ -95,8 +95,8 @@ namespace RE { public: // members - stl::enumeration type; // 0 - BSNavmeshTriangleEdgePortal portal; // 4 + REX::EnumSet type; // 0 + BSNavmeshTriangleEdgePortal portal; // 4 }; static_assert(sizeof(BSNavmeshEdgeExtraInfo) == 0xC); diff --git a/include/RE/B/BSParticleShaderEmitter.h b/include/RE/B/BSParticleShaderEmitter.h index f3bedef18..ca4d1ee2a 100644 --- a/include/RE/B/BSParticleShaderEmitter.h +++ b/include/RE/B/BSParticleShaderEmitter.h @@ -60,14 +60,14 @@ namespace RE virtual bool Generate(bool a_arg1, NiPoint3& a_arg2, NiPoint3& a_arg3) = 0; // 03 // members - BSParticleShaderProperty* property; // 10 - stl::enumeration emitterType; // 18 - std::uint16_t particleCount; // 1A - float alpha; // 1C - float generateReminder; // 20 - float maxParticleRatio; // 24 - TextureAnimInfo* textureAnims; // 28 - ParticleData instanceData[78]; // 30 + BSParticleShaderProperty* property; // 10 + REX::EnumSet emitterType; // 18 + std::uint16_t particleCount; // 1A + float alpha; // 1C + float generateReminder; // 20 + float maxParticleRatio; // 24 + TextureAnimInfo* textureAnims; // 28 + ParticleData instanceData[78]; // 30 }; static_assert(sizeof(BSParticleShaderEmitter) == 0xED0); } diff --git a/include/RE/B/BSSaveDataSystemUtility.h b/include/RE/B/BSSaveDataSystemUtility.h index 7b0f38d89..a7466b83e 100644 --- a/include/RE/B/BSSaveDataSystemUtility.h +++ b/include/RE/B/BSSaveDataSystemUtility.h @@ -32,31 +32,31 @@ namespace RE }; // members - const char fileName[0x104]; // 008 - std::uint32_t pad0C; // 00C - BSString fileNamePtr; // 110 - std::uint64_t unk120; // 120 - std::uint32_t unk128; // 128 - std::uint32_t pad12C; // 12C - BSString locationName; // 130 - BSString unk140; // 140 - BSString characterName; // 150 - std::uint64_t unk160; // 160 - std::uint32_t unk168; // 168 - std::uint32_t pad16C; // 16C - std::uint64_t unk170; // 170 - std::uint32_t unk178; // 178 - std::uint32_t saveNumber; // 17C - std::uint32_t characterID; // 180 - std::uint32_t unk184; // 184 - bool fileNameValid; // 188 - bool modded; // 189 - std::uint8_t unk18A; // 18A - std::uint8_t pad18B; // 18B - std::uint32_t pad18C; // 18C - BSFixedString saveTypeName; // 190 - stl::enumeration saveType; // 198 - std::uint32_t pad19C; // 19C + const char fileName[0x104]; // 008 + std::uint32_t pad0C; // 00C + BSString fileNamePtr; // 110 + std::uint64_t unk120; // 120 + std::uint32_t unk128; // 128 + std::uint32_t pad12C; // 12C + BSString locationName; // 130 + BSString unk140; // 140 + BSString characterName; // 150 + std::uint64_t unk160; // 160 + std::uint32_t unk168; // 168 + std::uint32_t pad16C; // 16C + std::uint64_t unk170; // 170 + std::uint32_t unk178; // 178 + std::uint32_t saveNumber; // 17C + std::uint32_t characterID; // 180 + std::uint32_t unk184; // 184 + bool fileNameValid; // 188 + bool modded; // 189 + std::uint8_t unk18A; // 18A + std::uint8_t pad18B; // 18B + std::uint32_t pad18C; // 18C + BSFixedString saveTypeName; // 190 + REX::EnumSet saveType; // 198 + std::uint32_t pad19C; // 19C }; static_assert(sizeof(Entry) == 0x1A0); diff --git a/include/RE/B/BSShaderProperty.h b/include/RE/B/BSShaderProperty.h index b6eab3fdc..f5553fab0 100644 --- a/include/RE/B/BSShaderProperty.h +++ b/include/RE/B/BSShaderProperty.h @@ -220,18 +220,18 @@ namespace RE void LinkMaterial(BSShaderMaterial* a_material, bool a_unk1); // members - float alpha; // 30 - std::int32_t lastRenderPassState; // 34 - stl::enumeration flags; // 38 - RenderPassArray renderPassList; // 40 - std::uint64_t unk48; // 48 - RenderPassArray debugRenderPassList; // 50 - std::uint64_t unk58; // 58 - BSFadeNode* fadeNode; // 60 - BSTSmartPointer effectData; // 68 - BSShaderPropertyLightData* lightData; // 70 - BSShaderMaterial* material; // 78 - std::uint64_t unk80; // 80 + float alpha; // 30 + std::int32_t lastRenderPassState; // 34 + REX::EnumSet flags; // 38 + RenderPassArray renderPassList; // 40 + std::uint64_t unk48; // 48 + RenderPassArray debugRenderPassList; // 50 + std::uint64_t unk58; // 58 + BSFadeNode* fadeNode; // 60 + BSTSmartPointer effectData; // 68 + BSShaderPropertyLightData* lightData; // 70 + BSShaderMaterial* material; // 78 + std::uint64_t unk80; // 80 }; static_assert(sizeof(BSShaderProperty) == 0x88); } diff --git a/include/RE/B/BSSkyShaderProperty.h b/include/RE/B/BSSkyShaderProperty.h index fede9eab3..ccffe5df4 100644 --- a/include/RE/B/BSSkyShaderProperty.h +++ b/include/RE/B/BSSkyShaderProperty.h @@ -40,14 +40,14 @@ namespace RE }; // members - RE::NiColorA kBlendColor; // 088 - RE::NiSourceTexture* pBaseTexture; // 098 - RE::NiSourceTexture* pBlendTexture; // 0A0 - std::uint8_t unk0A8[0x10]; // 0A8 - float fBlendValue; // 0B8 - std::uint16_t usCloudLayer; // 0BC - bool bFadeSecondTexture; // 0BE - stl::enumeration uiSkyObjectType; // 0BF + RE::NiColorA kBlendColor; // 088 + RE::NiSourceTexture* pBaseTexture; // 098 + RE::NiSourceTexture* pBlendTexture; // 0A0 + std::uint8_t unk0A8[0x10]; // 0A8 + float fBlendValue; // 0B8 + std::uint16_t usCloudLayer; // 0BC + bool bFadeSecondTexture; // 0BE + REX::EnumSet uiSkyObjectType; // 0BF }; static_assert(sizeof(BSSkyShaderProperty) == 0xC8); } diff --git a/include/RE/B/BSSoundHandle.h b/include/RE/B/BSSoundHandle.h index f7927de05..ae5579870 100644 --- a/include/RE/B/BSSoundHandle.h +++ b/include/RE/B/BSSoundHandle.h @@ -48,11 +48,11 @@ namespace RE bool Pause(); // members - std::uint32_t soundID; // 00 - bool assumeSuccess; // 04 - std::uint8_t pad05; // 05 - std::uint16_t pad06; // 06 - stl::enumeration state; // 08 + std::uint32_t soundID; // 00 + bool assumeSuccess; // 04 + std::uint8_t pad05; // 05 + std::uint16_t pad06; // 06 + REX::EnumSet state; // 08 }; static_assert(sizeof(BSSoundHandle) == 0xC); } diff --git a/include/RE/B/BSSystemFileStorage.h b/include/RE/B/BSSystemFileStorage.h index 4d313b2cf..647f0b92f 100644 --- a/include/RE/B/BSSystemFileStorage.h +++ b/include/RE/B/BSSystemFileStorage.h @@ -28,9 +28,9 @@ namespace RE }; // members - stl::enumeration lastError; // 00 - std::uint32_t pad24; // 04 - void* handle; // 08 + REX::EnumSet lastError; // 00 + std::uint32_t pad24; // 04 + void* handle; // 08 }; static_assert(sizeof(Attributes) == 0x10); diff --git a/include/RE/B/BSTHashMap.h b/include/RE/B/BSTHashMap.h index 1059802ec..a40ec5434 100644 --- a/include/RE/B/BSTHashMap.h +++ b/include/RE/B/BSTHashMap.h @@ -43,8 +43,8 @@ namespace RE entry_type(const entry_type&) = delete; entry_type(entry_type&& a_rhs) // - noexcept(std::is_nothrow_move_constructible_v&& - std::is_nothrow_destructible_v) + noexcept(std::is_nothrow_move_constructible_v && + std::is_nothrow_destructible_v) { if (a_rhs.has_value()) { const auto rnext = a_rhs.next; @@ -57,8 +57,8 @@ namespace RE entry_type& operator=(const entry_type&) = delete; entry_type& operator=(entry_type&& a_rhs) // - noexcept(std::is_nothrow_move_constructible_v&& - std::is_nothrow_destructible_v) + noexcept(std::is_nothrow_move_constructible_v && + std::is_nothrow_destructible_v) { if (this != std::addressof(a_rhs)) { destroy(); @@ -94,8 +94,8 @@ namespace RE } [[nodiscard]] value_type steal() && // - noexcept(std::is_nothrow_move_constructible_v&& - std::is_nothrow_destructible_v) + noexcept(std::is_nothrow_move_constructible_v && + std::is_nothrow_destructible_v) { assert(has_value()); value_type val = std::move(value); @@ -130,7 +130,8 @@ namespace RE template iterator_base(const iterator_base& a_rhs) noexcept // - requires(std::convertible_to::reference, reference>) : + requires(std::convertible_to::reference, reference>) + : _first(a_rhs._first), _last(a_rhs._last) {} @@ -221,7 +222,8 @@ namespace RE BSTScatterTable(const BSTScatterTable& a_rhs) { insert(a_rhs.begin(), a_rhs.end()); } BSTScatterTable(BSTScatterTable&& a_rhs) noexcept // - requires(std::same_as) : + requires(std::same_as) + : _capacity(std::exchange(a_rhs._capacity, 0)), _free(std::exchange(a_rhs._free, 0)), _good(std::exchange(a_rhs._good, 0)), @@ -538,15 +540,15 @@ namespace RE } [[nodiscard]] size_type hash_function(const key_type& a_key) const // - noexcept(std::is_nothrow_constructible_v&& - std::is_nothrow_invocable_v) + noexcept(std::is_nothrow_constructible_v && + std::is_nothrow_invocable_v) { return static_cast(hasher()(a_key)); } [[nodiscard]] bool key_eq(const key_type& a_lhs, const key_type& a_rhs) const // - noexcept(std::is_nothrow_constructible_v&& - std::is_nothrow_invocable_v) + noexcept(std::is_nothrow_constructible_v && + std::is_nothrow_invocable_v) { return static_cast(key_equal()(a_lhs, a_rhs)); } diff --git a/include/RE/B/BSTTuple.h b/include/RE/B/BSTTuple.h index cb0c59f98..351931ef8 100644 --- a/include/RE/B/BSTTuple.h +++ b/include/RE/B/BSTTuple.h @@ -13,10 +13,11 @@ namespace RE // 1) BSTTuple() // - noexcept(std::is_nothrow_default_constructible_v&& - std::is_nothrow_default_constructible_v) // - requires(std::is_default_constructible_v&& - std::is_default_constructible_v) : + noexcept(std::is_nothrow_default_constructible_v && + std::is_nothrow_default_constructible_v) // + requires(std::is_default_constructible_v && + std::is_default_constructible_v) + : first(), second() {} @@ -25,10 +26,11 @@ namespace RE explicit(!std::is_convertible_v || !std::is_convertible_v) // BSTTuple(const first_type& a_first, const second_type& a_second) // - noexcept(std::is_nothrow_copy_constructible_v&& - std::is_nothrow_copy_constructible_v) // - requires(std::is_copy_constructible_v&& - std::is_copy_constructible_v) : + noexcept(std::is_nothrow_copy_constructible_v && + std::is_nothrow_copy_constructible_v) // + requires(std::is_copy_constructible_v && + std::is_copy_constructible_v) + : first(a_first), second(a_second) {} @@ -38,10 +40,11 @@ namespace RE explicit(!std::is_convertible_v || !std::is_convertible_v) // BSTTuple(U1&& a_first, U2&& a_second) // - noexcept(std::is_nothrow_constructible_v&& - std::is_nothrow_constructible_v) // - requires(std::is_constructible_v&& - std::is_constructible_v) : + noexcept(std::is_nothrow_constructible_v && + std::is_nothrow_constructible_v) // + requires(std::is_constructible_v && + std::is_constructible_v) + : first(std::forward(a_first)), second(std::forward(a_second)) {} @@ -51,10 +54,11 @@ namespace RE explicit(!std::is_convertible_v || !std::is_convertible_v) // BSTTuple(const BSTTuple& a_rhs) // - noexcept(std::is_nothrow_constructible_v&& - std::is_nothrow_constructible_v) // - requires(std::is_constructible_v&& - std::is_constructible_v) : + noexcept(std::is_nothrow_constructible_v && + std::is_nothrow_constructible_v) // + requires(std::is_constructible_v && + std::is_constructible_v) + : first(a_rhs.first), second(a_rhs.second) {} @@ -64,10 +68,11 @@ namespace RE explicit(!std::is_convertible_v || !std::is_convertible_v) // BSTTuple(BSTTuple&& a_rhs) // - noexcept(std::is_nothrow_constructible_v&& - std::is_nothrow_constructible_v) // - requires(std::is_constructible_v&& - std::is_constructible_v) : + noexcept(std::is_nothrow_constructible_v && + std::is_nothrow_constructible_v) // + requires(std::is_constructible_v && + std::is_constructible_v) + : first(std::forward(a_rhs.first)), second(std::forward(a_rhs.second)) {} @@ -103,10 +108,10 @@ namespace RE // 1) BSTTuple& operator=(const BSTTuple& a_rhs) // - noexcept(std::is_nothrow_copy_assignable_v&& - std::is_nothrow_copy_assignable_v) // - requires(std::is_copy_assignable_v&& - std::is_copy_assignable_v) + noexcept(std::is_nothrow_copy_assignable_v && + std::is_nothrow_copy_assignable_v) // + requires(std::is_copy_assignable_v && + std::is_copy_assignable_v) { if (this != std::addressof(a_rhs)) { first = a_rhs.first; @@ -118,10 +123,10 @@ namespace RE // 2) template BSTTuple& operator=(const BSTTuple& a_rhs) // - noexcept(std::is_nothrow_assignable_v&& - std::is_nothrow_assignable_v) // - requires(std::is_assignable_v&& - std::is_assignable_v) + noexcept(std::is_nothrow_assignable_v && + std::is_nothrow_assignable_v) // + requires(std::is_assignable_v && + std::is_assignable_v) { first = a_rhs.first; second = a_rhs.second; @@ -130,10 +135,10 @@ namespace RE // 3) BSTTuple& operator=(BSTTuple&& a_rhs) // - noexcept(std::is_nothrow_move_assignable_v&& - std::is_nothrow_move_assignable_v) // - requires(std::is_move_assignable_v&& - std::is_move_assignable_v) + noexcept(std::is_nothrow_move_assignable_v && + std::is_nothrow_move_assignable_v) // + requires(std::is_move_assignable_v && + std::is_move_assignable_v) { if (this != std::addressof(a_rhs)) { first = std::move(a_rhs.first); @@ -145,10 +150,10 @@ namespace RE // 4) template BSTTuple& operator=(BSTTuple&& a_rhs) // - noexcept(std::is_nothrow_assignable_v&& - std::is_nothrow_assignable_v) // - requires(std::is_assignable_v&& - std::is_assignable_v) + noexcept(std::is_nothrow_assignable_v && + std::is_nothrow_assignable_v) // + requires(std::is_assignable_v && + std::is_assignable_v) { first = std::move(a_rhs.first); second = std::move(a_rhs.second); @@ -158,8 +163,8 @@ namespace RE TES_HEAP_REDEFINE_NEW(); void swap(BSTTuple& a_rhs) // - noexcept(std::is_nothrow_swappable_v&& - std::is_nothrow_swappable_v) + noexcept(std::is_nothrow_swappable_v && + std::is_nothrow_swappable_v) { using std::swap; if (this != std::addressof(a_rhs)) { @@ -211,8 +216,8 @@ namespace RE template void swap(BSTTuple& a_lhs, BSTTuple& a_rhs) // noexcept(noexcept(a_lhs.swap(a_rhs))) // - requires(std::is_swappable_v&& - std::is_swappable_v) + requires(std::is_swappable_v && + std::is_swappable_v) { a_lhs.swap(a_rhs); } diff --git a/include/RE/B/BSTempEffectParticle.h b/include/RE/B/BSTempEffectParticle.h index 4ebaa43ee..fcb509f1b 100644 --- a/include/RE/B/BSTempEffectParticle.h +++ b/include/RE/B/BSTempEffectParticle.h @@ -34,13 +34,13 @@ namespace RE static BSTempEffectParticle* Spawn(TESObjectCELL* a_cell, float a_lifetime, const char* a_modelName, const NiPoint3& a_rotation, const NiPoint3& a_position, float a_scale, std::uint32_t a_flags, NiAVObject* a_target) { using func_t = BSTempEffectParticle* (*)(TESObjectCELL*, float, const char*, const NiPoint3&, const NiPoint3&, float, std::uint32_t, NiAVObject*); - static REL::Relocation func{ RELOCATION_ID(29218, 30071) }; + static REL::Relocation func{ RELOCATION_ID(29218, 30071) }; return func(a_cell, a_lifetime, a_modelName, a_rotation, a_position, a_scale, a_flags, a_target); } static BSTempEffectParticle* Spawn(TESObjectCELL* a_cell, float a_lifetime, const char* a_modelName, const NiMatrix3& a_normal, const NiPoint3& a_position, float a_scale, std::uint32_t a_flags, NiAVObject* a_target) { using func_t = BSTempEffectParticle* (*)(TESObjectCELL*, float, const char*, const NiMatrix3&, const NiPoint3&, float, std::uint32_t, NiAVObject*); - static REL::Relocation func{ RELOCATION_ID(29219, 30072) }; + static REL::Relocation func{ RELOCATION_ID(29219, 30072) }; return func(a_cell, a_lifetime, a_modelName, a_normal, a_position, a_scale, a_flags, a_target); } diff --git a/include/RE/B/BSWaterShaderProperty.h b/include/RE/B/BSWaterShaderProperty.h index dfd98f4d3..533157410 100644 --- a/include/RE/B/BSWaterShaderProperty.h +++ b/include/RE/B/BSWaterShaderProperty.h @@ -44,26 +44,26 @@ namespace RE BSShaderMaterial::Type GetMaterialType() override; // 3E - { return 3; } // members - stl::enumeration waterFlags; // 88 - std::uint32_t unk8C; // 8C - std::uint64_t unk90; // 90 - std::uint64_t unk98; // 98 - NiPlane plane; // A0 - std::uint64_t unkB0; // B0 - std::uint8_t unkB8; // B8 - std::uint8_t padB9; // B9 - std::uint16_t padBA; // BA - std::uint16_t padBC; // BC - BSRenderPass* unkC0; // C0 - RenderPassArray simpleRenderPassList; // C8 - std::uint64_t unkD0; // D0 - BSTArray unkD8; // D8 - std::int32_t unkF0; // F0 - std::uint32_t unkF4; // F4 - std::uint8_t unkF8; // F8 - std::uint8_t padF9; // F9 - std::uint16_t padFA; // FA - std::uint16_t padFC; // FC + REX::EnumSet waterFlags; // 88 + std::uint32_t unk8C; // 8C + std::uint64_t unk90; // 90 + std::uint64_t unk98; // 98 + NiPlane plane; // A0 + std::uint64_t unkB0; // B0 + std::uint8_t unkB8; // B8 + std::uint8_t padB9; // B9 + std::uint16_t padBA; // BA + std::uint16_t padBC; // BC + BSRenderPass* unkC0; // C0 + RenderPassArray simpleRenderPassList; // C8 + std::uint64_t unkD0; // D0 + BSTArray unkD8; // D8 + std::int32_t unkF0; // F0 + std::uint32_t unkF4; // F4 + std::uint8_t unkF8; // F8 + std::uint8_t padF9; // F9 + std::uint16_t padFA; // FA + std::uint16_t padFC; // FC }; static_assert(sizeof(BSWaterShaderProperty) == 0x100); } diff --git a/include/RE/B/bhkCharacterController.h b/include/RE/B/bhkCharacterController.h index aa6efc711..02c2e196a 100644 --- a/include/RE/B/bhkCharacterController.h +++ b/include/RE/B/bhkCharacterController.h @@ -134,7 +134,7 @@ namespace RE std::uint64_t pad198; // 198 hkpSurfaceInfo surfaceInfo; // 1A0 hkpCharacterContext context; // 1E0 - stl::enumeration flags; // 218 + REX::EnumSet flags; // 218 hkpCharacterStateType wantState; // 218 float velocityTime; // 220 float rotMod; // 224 diff --git a/include/RE/B/bhkCompressedMeshShapeData.h b/include/RE/B/bhkCompressedMeshShapeData.h index 5e8ce3182..17e68820a 100644 --- a/include/RE/B/bhkCompressedMeshShapeData.h +++ b/include/RE/B/bhkCompressedMeshShapeData.h @@ -24,30 +24,30 @@ namespace RE bool IsEqual(NiObject* a_object) override; // 1C //members - std::int32_t bitsPerIndex; // 10 - std::int32_t bitsPerWIndex; // 14 - std::int32_t wIndexMask; // 18 - std::int32_t indexMask; // 1C - float error; // 20 - std::uint32_t pad24; // 24 - std::uint32_t pad28; // 28 - std::uint32_t pad2C; // 2C - hkAabb bounds; // 30 - hkArray materials; // 50 - hkArray materials16; // 60 - hkArray materials8; // 70 - hkArray namedMaterials; // 80 - hkArray meshMaterials; // 90 - hkArray transforms; // A0 - hkArray bigTriangles; // B0 - hkArray bigVertices; // C0 - hkArray chunks; // D0 - hkArray convexPieces; // E0 - stl::enumeration weldingType; // F0 - stl::enumeration materialType; // F1 - std::uint16_t padF2; // F2 - std::uint32_t padF4; // F4 - std::uint64_t padF8; // F8 + std::int32_t bitsPerIndex; // 10 + std::int32_t bitsPerWIndex; // 14 + std::int32_t wIndexMask; // 18 + std::int32_t indexMask; // 1C + float error; // 20 + std::uint32_t pad24; // 24 + std::uint32_t pad28; // 28 + std::uint32_t pad2C; // 2C + hkAabb bounds; // 30 + hkArray materials; // 50 + hkArray materials16; // 60 + hkArray materials8; // 70 + hkArray namedMaterials; // 80 + hkArray meshMaterials; // 90 + hkArray transforms; // A0 + hkArray bigTriangles; // B0 + hkArray bigVertices; // C0 + hkArray chunks; // D0 + hkArray convexPieces; // E0 + REX::EnumSet weldingType; // F0 + REX::EnumSet materialType; // F1 + std::uint16_t padF2; // F2 + std::uint32_t padF4; // F4 + std::uint64_t padF8; // F8 }; static_assert(sizeof(bhkCompressedMeshShapeData) == 0x100); } diff --git a/include/RE/B/bhkNiCollisionObject.h b/include/RE/B/bhkNiCollisionObject.h index 0778ff116..571c735e6 100644 --- a/include/RE/B/bhkNiCollisionObject.h +++ b/include/RE/B/bhkNiCollisionObject.h @@ -52,9 +52,9 @@ namespace RE virtual void Unk_30(void); // 30 - { return 1; } // members - stl::enumeration flags; // 18 - std::uint32_t pad1C; // 1C - NiPointer body; // 20 + REX::EnumSet flags; // 18 + std::uint32_t pad1C; // 1C + NiPointer body; // 20 }; static_assert(sizeof(bhkNiCollisionObject) == 0x28); } diff --git a/include/RE/C/CFilter.h b/include/RE/C/CFilter.h index 834c65e7d..06ac51063 100644 --- a/include/RE/C/CFilter.h +++ b/include/RE/C/CFilter.h @@ -49,7 +49,7 @@ namespace RE }; // members - stl::enumeration flags; // 0 + REX::EnumSet flags; // 0 }; static_assert(sizeof(CFilter) == 0x4); } diff --git a/include/RE/C/CodeTasklet.h b/include/RE/C/CodeTasklet.h index a0336b19f..0b5ebf2da 100644 --- a/include/RE/C/CodeTasklet.h +++ b/include/RE/C/CodeTasklet.h @@ -76,20 +76,20 @@ namespace RE bool GetFunctionCallInfo(CallType& a_callType, BSTSmartPointer& a_arg2, BSFixedString& a_arg3, Variable& a_arg4, BSScrapArray& a_arg5) override; // 01 // members - Stack* stack; // 10 - VirtualMachine* vm; // 18 - ErrorLogger* errorLogger; // 20 - stl::enumeration resumeReason; // 28 - std::uint32_t pad2C; // 2C - StackFrame* topFrame; // 30 - std::uint32_t frameMemoryPage; // 38 - std::int8_t jumpBitCount; // 3C - std::int8_t localVarBitCount; // 3D - std::int8_t memberVarBitCount; // 3E - std::uint8_t pad3F; // 3F - std::uint32_t instructionDataBitCount; // 40 - std::uint32_t pad44; // 44 - const void* instructionDataStart; // 48 + Stack* stack; // 10 + VirtualMachine* vm; // 18 + ErrorLogger* errorLogger; // 20 + REX::EnumSet resumeReason; // 28 + std::uint32_t pad2C; // 2C + StackFrame* topFrame; // 30 + std::uint32_t frameMemoryPage; // 38 + std::int8_t jumpBitCount; // 3C + std::int8_t localVarBitCount; // 3D + std::int8_t memberVarBitCount; // 3E + std::uint8_t pad3F; // 3F + std::uint32_t instructionDataBitCount; // 40 + std::uint32_t pad44; // 44 + const void* instructionDataStart; // 48 }; static_assert(sizeof(CodeTasklet) == 0x50); } diff --git a/include/RE/C/Color.h b/include/RE/C/Color.h index 8a7e2b171..053c64732 100644 --- a/include/RE/C/Color.h +++ b/include/RE/C/Color.h @@ -48,7 +48,7 @@ namespace RE constexpr Color(std::uint32_t a_hexValue) noexcept : red((a_hexValue >> 16) & 0xFF), green((a_hexValue >> 8) & 0xFF), - blue((a_hexValue)&0xFF), + blue((a_hexValue) & 0xFF), alpha(0) {} diff --git a/include/RE/C/CombatGroup.h b/include/RE/C/CombatGroup.h index 430e272c6..9cea28380 100644 --- a/include/RE/C/CombatGroup.h +++ b/include/RE/C/CombatGroup.h @@ -23,24 +23,24 @@ namespace RE }; // members - ActorHandle targetHandle; // 00 - std::int32_t detectLevel; // 04 - float stealthPoints; // 08 - float unk0C; // 0C - BGSWorldLocation lastKnownLoc; // 10 - BGSWorldLocation unk28; // 28 - BGSWorldLocation unk40; // 40 - BGSWorldLocation searchLoc; // 58 - BGSWorldLocation unk70; // 70 - AITimeStamp unk88; // 88 - unk40 - AITimeStamp unk8C; // 8C - unk28 - AITimeStamp lastKnownTimeStamp; // 90 - lastKnownLoc - AITimeStamp unk94; // 94 - ?? - AITimeStamp unk98; // 98 - unk58 - AITimeStamp unk9C; // 9C - unk70 - ActorHandle attackedMember; // A0 - std::uint16_t attackerCount; // A4 - stl::enumeration flags; // A6 + ActorHandle targetHandle; // 00 + std::int32_t detectLevel; // 04 + float stealthPoints; // 08 + float unk0C; // 0C + BGSWorldLocation lastKnownLoc; // 10 + BGSWorldLocation unk28; // 28 + BGSWorldLocation unk40; // 40 + BGSWorldLocation searchLoc; // 58 + BGSWorldLocation unk70; // 70 + AITimeStamp unk88; // 88 - unk40 + AITimeStamp unk8C; // 8C - unk28 + AITimeStamp lastKnownTimeStamp; // 90 - lastKnownLoc + AITimeStamp unk94; // 94 - ?? + AITimeStamp unk98; // 98 - unk58 + AITimeStamp unk9C; // 9C - unk70 + ActorHandle attackedMember; // A0 + std::uint16_t attackerCount; // A4 + REX::EnumSet flags; // A6 }; static_assert(sizeof(CombatTarget) == 0xA8); diff --git a/include/RE/C/CombatMagicCaster.h b/include/RE/C/CombatMagicCaster.h index f9e07321e..8c6fd43ce 100644 --- a/include/RE/C/CombatMagicCaster.h +++ b/include/RE/C/CombatMagicCaster.h @@ -35,14 +35,14 @@ namespace RE bool CheckTargetValid(const CombatController* a_combatController) { - using func_t = bool* (*)(CombatMagicCaster*, const CombatController*); + using func_t = bool* (*)(CombatMagicCaster*, const CombatController*); static REL::Relocation func{ RELOCATION_ID(43956, 45348) }; return func(this, a_combatController); } static bool CheckTargetValid(const CombatController* a_combatController, Actor* a_target, const CombatInventoryItemMagic* a_inventoryItem) { - using func_t = bool* (*)(const CombatController*, Actor*, const CombatInventoryItemMagic*); + using func_t = bool* (*)(const CombatController*, Actor*, const CombatInventoryItemMagic*); static REL::Relocation func{ RELOCATION_ID(43952, 45343) }; return func(a_combatController, a_target, a_inventoryItem); } diff --git a/include/RE/C/CommandTable.h b/include/RE/C/CommandTable.h index 53713cd14..09c8debf0 100644 --- a/include/RE/C/CommandTable.h +++ b/include/RE/C/CommandTable.h @@ -132,11 +132,11 @@ namespace RE { public: // members - const char* paramName; // 00 - stl::enumeration paramType; // 08 - bool optional; // 0C - std::uint8_t pad0D{ 0 }; // 0D - std::uint16_t pad0E{ 0 }; // 0E + const char* paramName; // 00 + REX::EnumSet paramType; // 08 + bool optional; // 0C + std::uint8_t pad0D{ 0 }; // 0D + std::uint16_t pad0E{ 0 }; // 0E }; static_assert(sizeof(SCRIPT_PARAMETER) == 0x10); @@ -213,15 +213,15 @@ namespace RE { public: // members - std::uint32_t lineNumber; // 000 - char line[512]; // 004 - std::uint32_t size; // 204 - std::uint32_t offset; // 208 - char output[512]; // 20C - std::uint32_t outputSize; // 40C - stl::enumeration expression; // 410 - std::uint32_t refObjectIndex; // 414 - stl::enumeration scriptError; // 418 + std::uint32_t lineNumber; // 000 + char line[512]; // 004 + std::uint32_t size; // 204 + std::uint32_t offset; // 208 + char output[512]; // 20C + std::uint32_t outputSize; // 40C + REX::EnumSet expression; // 410 + std::uint32_t refObjectIndex; // 414 + REX::EnumSet scriptError; // 418 }; static_assert(sizeof(SCRIPT_LINE) == 0x41C); diff --git a/include/RE/C/ConsoleData.h b/include/RE/C/ConsoleData.h index d515c0e50..7c66c2d52 100644 --- a/include/RE/C/ConsoleData.h +++ b/include/RE/C/ConsoleData.h @@ -21,12 +21,12 @@ namespace RE ~ConsoleData() override; // 00 // members - BSString* str; // 10 - ObjectRefHandle pickRef; // 18 - std::uint32_t pad1C; // 1C - NiBinaryStream* file; // 20 - stl::enumeration type; // 28 - std::uint32_t pad2C; // 2C + BSString* str; // 10 + ObjectRefHandle pickRef; // 18 + std::uint32_t pad1C; // 1C + NiBinaryStream* file; // 20 + REX::EnumSet type; // 28 + std::uint32_t pad2C; // 2C }; static_assert(sizeof(ConsoleData) == 0x30); } diff --git a/include/RE/C/ControlMap.h b/include/RE/C/ControlMap.h index 39522355e..e3368a269 100644 --- a/include/RE/C/ControlMap.h +++ b/include/RE/C/ControlMap.h @@ -30,14 +30,14 @@ namespace RE { public: // members - BSFixedString eventID; // 00 - std::uint16_t inputKey; // 08 - std::uint16_t modifier; // 08 - std::int8_t indexInContext; // 0C - bool remappable; // 0D - bool linked; // 0E - stl::enumeration userEventGroupFlag; // 10 - std::uint32_t pad14; // 14 + BSFixedString eventID; // 00 + std::uint16_t inputKey; // 08 + std::uint16_t modifier; // 08 + std::int8_t indexInContext; // 0C + bool remappable; // 0D + bool linked; // 0E + REX::EnumSet userEventGroupFlag; // 10 + std::uint32_t pad14; // 14 }; static_assert(sizeof(UserEventMapping) == 0x18); @@ -85,16 +85,16 @@ namespace RE void ToggleControls(UEFlag a_flags, bool a_enable); // members - InputContext* controlMap[InputContextID::kTotal]; // 060 - BSTArray linkedMappings; // 0E8 - BSTArray contextPriorityStack; // 100 - stl::enumeration enabledControls; // 118 - stl::enumeration unk11C; // 11C - std::int8_t textEntryCount; // 120 - bool ignoreKeyboardMouse; // 121 - bool ignoreActivateDisabledEvents; // 122 - std::uint8_t pad123; // 123 - stl::enumeration gamePadMapType; // 124 + InputContext* controlMap[InputContextID::kTotal]; // 060 + BSTArray linkedMappings; // 0E8 + BSTArray contextPriorityStack; // 100 + REX::EnumSet enabledControls; // 118 + REX::EnumSet unk11C; // 11C + std::int8_t textEntryCount; // 120 + bool ignoreKeyboardMouse; // 121 + bool ignoreActivateDisabledEvents; // 122 + std::uint8_t pad123; // 123 + REX::EnumSet gamePadMapType; // 124 }; #ifdef SKYRIM_SUPPORT_AE static_assert(sizeof(ControlMap) == 0x130); diff --git a/include/RE/D/DialogueItem.h b/include/RE/D/DialogueItem.h index 3f74e6834..67d8efc39 100644 --- a/include/RE/D/DialogueItem.h +++ b/include/RE/D/DialogueItem.h @@ -22,18 +22,18 @@ namespace RE { public: // members - BSString text; // 00 - stl::enumeration animFaceArchType; // 10 - std::uint16_t percent; // 14 - std::uint16_t pad16; // 16 - BSFixedString voice; // 18 - TESIdleForm* speakerIdle; // 20 - TESIdleForm* listenIdle; // 28 - BGSSoundDescriptorForm* voiceSound; // 30 - bool useEmotion; // 38 - bool soundLip; // 39 - std::uint16_t pad3A; // 3A - std::uint32_t pad3C; // 3C + BSString text; // 00 + REX::EnumSet animFaceArchType; // 10 + std::uint16_t percent; // 14 + std::uint16_t pad16; // 16 + BSFixedString voice; // 18 + TESIdleForm* speakerIdle; // 20 + TESIdleForm* listenIdle; // 28 + BGSSoundDescriptorForm* voiceSound; // 30 + bool useEmotion; // 38 + bool soundLip; // 39 + std::uint16_t pad3A; // 3A + std::uint32_t pad3C; // 3C }; static_assert(sizeof(DialogueResponse) == 0x40); diff --git a/include/RE/E/EffectSetting.h b/include/RE/E/EffectSetting.h index 9e01121ba..7f061fc98 100644 --- a/include/RE/E/EffectSetting.h +++ b/include/RE/E/EffectSetting.h @@ -66,50 +66,50 @@ namespace RE }; // members - stl::enumeration flags; // 00 - float baseCost; // 04 - TESForm* associatedForm; // 08 - ActorValue associatedSkill; // 10 - ActorValue resistVariable; // 14 - std::int16_t numCounterEffects; // 18 - std::uint16_t pad1A; // 1A - std::uint32_t pad1C; // 1C - TESObjectLIGH* light; // 20 - float taperWeight; // 28 - std::uint32_t pad2C; // 2C - TESEffectShader* effectShader; // 30 - TESEffectShader* enchantShader; // 38 - std::int32_t minimumSkill; // 40 - std::int32_t spellmakingArea; // 44 - float spellmakingChargeTime; // 48 - float taperCurve; // 4C - float taperDuration; // 50 - float secondAVWeight; // 54 - Archetype archetype; // 58 - ActorValue primaryAV; // 5C - BGSProjectile* projectileBase; // 60 - BGSExplosion* explosion; // 68 - MagicSystem::CastingType castingType; // 70 - MagicSystem::Delivery delivery; // 74 - ActorValue secondaryAV; // 78 - BGSArtObject* castingArt; // 80 - BGSArtObject* hitEffectArt; // 88 - BGSImpactDataSet* impactDataSet; // 90 - float skillUsageMult; // 98 - std::uint32_t pad9C; // 9C - BGSDualCastData* dualCastData; // A0 - float dualCastScale; // A8 - std::uint32_t padAC; // AC - BGSArtObject* enchantEffectArt; // B0 - BGSReferenceEffect* hitVisuals; // B8 - BGSReferenceEffect* enchantVisuals; // C0 - SpellItem* equipAbility; // C8 - TESImageSpaceModifier* imageSpaceMod; // D0 - BGSPerk* perk; // D8 - SOUND_LEVEL castingSoundLevel; // E0 - float aiScore; // E4 - float aiDelayTimer; // E8 - std::uint32_t padEC; // EC + REX::EnumSet flags; // 00 + float baseCost; // 04 + TESForm* associatedForm; // 08 + ActorValue associatedSkill; // 10 + ActorValue resistVariable; // 14 + std::int16_t numCounterEffects; // 18 + std::uint16_t pad1A; // 1A + std::uint32_t pad1C; // 1C + TESObjectLIGH* light; // 20 + float taperWeight; // 28 + std::uint32_t pad2C; // 2C + TESEffectShader* effectShader; // 30 + TESEffectShader* enchantShader; // 38 + std::int32_t minimumSkill; // 40 + std::int32_t spellmakingArea; // 44 + float spellmakingChargeTime; // 48 + float taperCurve; // 4C + float taperDuration; // 50 + float secondAVWeight; // 54 + Archetype archetype; // 58 + ActorValue primaryAV; // 5C + BGSProjectile* projectileBase; // 60 + BGSExplosion* explosion; // 68 + MagicSystem::CastingType castingType; // 70 + MagicSystem::Delivery delivery; // 74 + ActorValue secondaryAV; // 78 + BGSArtObject* castingArt; // 80 + BGSArtObject* hitEffectArt; // 88 + BGSImpactDataSet* impactDataSet; // 90 + float skillUsageMult; // 98 + std::uint32_t pad9C; // 9C + BGSDualCastData* dualCastData; // A0 + float dualCastScale; // A8 + std::uint32_t padAC; // AC + BGSArtObject* enchantEffectArt; // B0 + BGSReferenceEffect* hitVisuals; // B8 + BGSReferenceEffect* enchantVisuals; // C0 + SpellItem* equipAbility; // C8 + TESImageSpaceModifier* imageSpaceMod; // D0 + BGSPerk* perk; // D8 + SOUND_LEVEL castingSoundLevel; // E0 + float aiScore; // E4 + float aiDelayTimer; // E8 + std::uint32_t padEC; // EC }; static_assert(sizeof(EffectSettingData) == 0xF0); diff --git a/include/RE/E/EnchantConstructMenu.h b/include/RE/E/EnchantConstructMenu.h index 3c4159fa7..f3e9d8607 100644 --- a/include/RE/E/EnchantConstructMenu.h +++ b/include/RE/E/EnchantConstructMenu.h @@ -58,11 +58,11 @@ namespace RE virtual void SetData(GFxValue* dataContainer); // 04 // members - stl::enumeration filterFlag; // 0C - bool selected; // 10 - bool enabled; // 11 - std::uint16_t pad12; // 12 - std::uint32_t pad14; // 14 + REX::EnumSet filterFlag; // 0C + bool selected; // 10 + bool enabled; // 11 + std::uint16_t pad12; // 12 + std::uint32_t pad14; // 14 }; static_assert(sizeof(CategoryListEntry) == 0x18); @@ -190,11 +190,11 @@ namespace RE void UpdateInterface(); // members - stl::enumeration filterDisenchant; // 100 - stl::enumeration filterDivider; // 104 - stl::enumeration filterItem; // 108 - stl::enumeration filterEnchantment; // 10C - stl::enumeration filterSoulGem; // 110 + REX::EnumSet filterDisenchant; // 100 + REX::EnumSet filterDivider; // 104 + REX::EnumSet filterItem; // 108 + REX::EnumSet filterEnchantment; // 10C + REX::EnumSet filterSoulGem; // 110 std::uint32_t pad114; // 114 BSTArray> listEntries; // 118 BSString customName; // 130 @@ -206,8 +206,8 @@ namespace RE std::int32_t sliderEnchantmentIndex; // 200 float sliderMaxMagnitude; // 204 std::uint32_t highlightIndex; // 208 - stl::enumeration currentCategory; // 20C - stl::enumeration enabledFilters; // 210 + REX::EnumSet currentCategory; // 20C + REX::EnumSet enabledFilters; // 210 float enchantmentCost; // 214 float chargeAmount; // 218 bool exiting; // 21C diff --git a/include/RE/E/EnchantmentItem.h b/include/RE/E/EnchantmentItem.h index c6d7ee257..79b101ee0 100644 --- a/include/RE/E/EnchantmentItem.h +++ b/include/RE/E/EnchantmentItem.h @@ -34,16 +34,16 @@ namespace RE { public: // members - std::int32_t costOverride; // 00 - stl::enumeration flags; // 04 - MagicSystem::CastingType castingType; // 08 - std::int32_t chargeOverride; // 0C - MagicSystem::Delivery delivery; // 10 - MagicSystem::SpellType spellType; // 14 - float chargeTime; // 18 - std::uint32_t pad1C; // 1C - EnchantmentItem* baseEnchantment; // 20 - BGSListForm* wornRestrictions; // 28 + std::int32_t costOverride; // 00 + REX::EnumSet flags; // 04 + MagicSystem::CastingType castingType; // 08 + std::int32_t chargeOverride; // 0C + MagicSystem::Delivery delivery; // 10 + MagicSystem::SpellType spellType; // 14 + float chargeTime; // 18 + std::uint32_t pad1C; // 1C + EnchantmentItem* baseEnchantment; // 20 + BGSListForm* wornRestrictions; // 28 }; static_assert(sizeof(Data) == 0x30); diff --git a/include/RE/E/Explosion.h b/include/RE/E/Explosion.h index 9faec6cc9..184312a2b 100644 --- a/include/RE/E/Explosion.h +++ b/include/RE/E/Explosion.h @@ -52,32 +52,32 @@ namespace RE virtual void FindTargets(); // A4 // members - ModelDBHandle explosionDBHandle; // 098 - float startKeyTime; // 0A0 - float endKeyTime; // 0A4 - float hitKeyTime; // 0A8 - float radius; // 0AC - float imodRadius; // 0B0 - float unkB4; // 0B4 - bhkSimpleShapePhantom* unkB8; // 0B8 - std::uint64_t unkC0; // 0C0 - std::uint64_t unkC8; // 0C8 - BSSoundHandle sound01; // 0D0 - BSSoundHandle sound02; // 0DC - NiPointer light; // 0E8 - ActorHandle actorOwner; // 0F0 - ActorHandle unkF4; // 0F4 - std::uint32_t unkF8; // 0F8 - std::uint32_t padFC; // 0FC - NiPointer actorCause; // 100 - NonActorMagicCaster* magicCaster; // 108 - TESObjectWEAP* weaponSource; // 110 - std::uint32_t unk118; // 118 - NiPoint3 unk11C; // 11C - NiPoint3 negativeVelocity; // 128 - float damage; // 134 - float unk138; // 138 - stl::enumeration flags; // 13C + ModelDBHandle explosionDBHandle; // 098 + float startKeyTime; // 0A0 + float endKeyTime; // 0A4 + float hitKeyTime; // 0A8 + float radius; // 0AC + float imodRadius; // 0B0 + float unkB4; // 0B4 + bhkSimpleShapePhantom* unkB8; // 0B8 + std::uint64_t unkC0; // 0C0 + std::uint64_t unkC8; // 0C8 + BSSoundHandle sound01; // 0D0 + BSSoundHandle sound02; // 0DC + NiPointer light; // 0E8 + ActorHandle actorOwner; // 0F0 + ActorHandle unkF4; // 0F4 + std::uint32_t unkF8; // 0F8 + std::uint32_t padFC; // 0FC + NiPointer actorCause; // 100 + NonActorMagicCaster* magicCaster; // 108 + TESObjectWEAP* weaponSource; // 110 + std::uint32_t unk118; // 118 + NiPoint3 unk11C; // 11C + NiPoint3 negativeVelocity; // 128 + float damage; // 134 + float unk138; // 138 + REX::EnumSet flags; // 13C }; #ifndef SKYRIM_SUPPORT_AE static_assert(sizeof(Explosion) == 0x140); diff --git a/include/RE/E/ExtraAction.h b/include/RE/E/ExtraAction.h index fa20a0830..4cdd364c3 100644 --- a/include/RE/E/ExtraAction.h +++ b/include/RE/E/ExtraAction.h @@ -30,11 +30,11 @@ namespace RE bool IsNotEqual(const BSExtraData* a_rhs) const override; // 02 - { return unk10 != a_rhs->unk10; } // members - stl::enumeration action; // 10 - std::uint8_t pad11; // 11 - std::uint16_t pad12; // 12 - std::uint32_t pad14; // 14 - TESObjectREFR* actionRef; // 18 + REX::EnumSet action; // 10 + std::uint8_t pad11; // 11 + std::uint16_t pad12; // 12 + std::uint32_t pad14; // 14 + TESObjectREFR* actionRef; // 18 }; static_assert(sizeof(ExtraAction) == 0x20); } diff --git a/include/RE/E/ExtraDismemberedLimbs.h b/include/RE/E/ExtraDismemberedLimbs.h index 679b8c0ed..9a9c80096 100644 --- a/include/RE/E/ExtraDismemberedLimbs.h +++ b/include/RE/E/ExtraDismemberedLimbs.h @@ -12,12 +12,12 @@ namespace RE struct DismemberedLimb { - BSTArray objects; // 00 - stl::enumeration limb; // 18 - bool unk19; // 19 - bool unk1A; // 1A - std::uint8_t pad1B; // 1B - std::uint32_t pad1C; // 1C + BSTArray objects; // 00 + REX::EnumSet limb; // 18 + bool unk19; // 19 + bool unk1A; // 1A + std::uint8_t pad1B; // 1B + std::uint32_t pad1C; // 1C }; static_assert(sizeof(DismemberedLimb) == 0x20); @@ -34,14 +34,14 @@ namespace RE [[nodiscard]] ExtraDataType GetType() const override; // 01 - { return kDismemberedLimbs; } // members - std::uint16_t limbs; // 10 - bool eaten; // 12 - std::uint8_t unk13; // 13 - std::uint32_t unk14; // 14 - TESForm* deathObject; // 18 - BSTArray dismemberedLimbs; // 20 - stl::enumeration lastHitLimb; // 38 - std::uint32_t pad3C; // 3C + std::uint16_t limbs; // 10 + bool eaten; // 12 + std::uint8_t unk13; // 13 + std::uint32_t unk14; // 14 + TESForm* deathObject; // 18 + BSTArray dismemberedLimbs; // 20 + REX::EnumSet lastHitLimb; // 38 + std::uint32_t pad3C; // 3C }; static_assert(sizeof(ExtraDismemberedLimbs) == 0x40); } diff --git a/include/RE/E/ExtraFlags.h b/include/RE/E/ExtraFlags.h index 4e59e614f..ec30b9653 100644 --- a/include/RE/E/ExtraFlags.h +++ b/include/RE/E/ExtraFlags.h @@ -30,8 +30,8 @@ namespace RE [[nodiscard]] constexpr bool IsActivationBlocked() const noexcept { return flags.all(Flag::kBlockActivate); } // members - stl::enumeration flags; // 10 - std::uint32_t pad14; // 14 + REX::EnumSet flags; // 10 + std::uint32_t pad14; // 14 }; static_assert(sizeof(ExtraFlags) == 0x18); } diff --git a/include/RE/E/ExtraFollowerSwimBreadcrumbs.h b/include/RE/E/ExtraFollowerSwimBreadcrumbs.h index e84352daf..b0c5ad220 100644 --- a/include/RE/E/ExtraFollowerSwimBreadcrumbs.h +++ b/include/RE/E/ExtraFollowerSwimBreadcrumbs.h @@ -39,11 +39,11 @@ namespace RE virtual ExtraDataType GetType() const override; // 01 - { return kFollowerSwimBreadcrumbs; } // members - stl::enumeration leaderState; // 10 - NiPoint3 leaderLocation; // 14 - std::uint32_t leaderNavMeshID; // 20 - std::uint32_t pad24; // 24 - BSSimpleList crumbs; // 28 + REX::EnumSet leaderState; // 10 + NiPoint3 leaderLocation; // 14 + std::uint32_t leaderNavMeshID; // 20 + std::uint32_t pad24; // 24 + BSSimpleList crumbs; // 28 }; static_assert(sizeof(ExtraFollowerSwimBreadcrumbs) == 0x38); } diff --git a/include/RE/E/ExtraHotkey.h b/include/RE/E/ExtraHotkey.h index 9306eb226..f8d7a7fa3 100644 --- a/include/RE/E/ExtraHotkey.h +++ b/include/RE/E/ExtraHotkey.h @@ -34,10 +34,10 @@ namespace RE bool IsNotEqual(const BSExtraData* a_rhs) const override; // 02 - { hotkey != a_rhs->hotkey; } // members - stl::enumeration hotkey; // 10 - std::uint8_t unk11; // 11 - std::uint16_t unk12; // 12 - std::uint32_t unk14; // 14 + REX::EnumSet hotkey; // 10 + std::uint8_t unk11; // 11 + std::uint16_t unk12; // 12 + std::uint32_t unk14; // 14 }; static_assert(sizeof(ExtraHotkey) == 0x18); } diff --git a/include/RE/E/ExtraLevCreaModifier.h b/include/RE/E/ExtraLevCreaModifier.h index 87e67f674..7fb79fe02 100644 --- a/include/RE/E/ExtraLevCreaModifier.h +++ b/include/RE/E/ExtraLevCreaModifier.h @@ -30,8 +30,8 @@ namespace RE virtual bool IsNotEqual(const BSExtraData* a_rhs) const override; // 02 - { return modifier != a_rhs->modifier; } // members - stl::enumeration modifier; // 10 - std::uint32_t pad14; // 14 + REX::EnumSet modifier; // 10 + std::uint32_t pad14; // 14 }; static_assert(sizeof(ExtraLevCreaModifier) == 0x18); } diff --git a/include/RE/E/ExtraLock.h b/include/RE/E/ExtraLock.h index ada242c84..c3f8eaff9 100644 --- a/include/RE/E/ExtraLock.h +++ b/include/RE/E/ExtraLock.h @@ -31,17 +31,17 @@ namespace RE void SetLocked(bool a_locked); // members - std::int8_t baseLevel; // 00 - std::uint8_t pad01; // 01 - std::uint16_t pad02; // 02 - std::uint32_t pad04; // 04 - TESKey* key; // 08 - stl::enumeration flags; // 10 - std::uint8_t pad11; // 11 - std::uint16_t pad12; // 12 - std::uint32_t numTries; // 14 - std::uint32_t unk18; // 18 - std::uint32_t pad1C; // 1C + std::int8_t baseLevel; // 00 + std::uint8_t pad01; // 01 + std::uint16_t pad02; // 02 + std::uint32_t pad04; // 04 + TESKey* key; // 08 + REX::EnumSet flags; // 10 + std::uint8_t pad11; // 11 + std::uint16_t pad12; // 12 + std::uint32_t numTries; // 14 + std::uint32_t unk18; // 18 + std::uint32_t pad1C; // 1C }; static_assert(sizeof(REFR_LOCK) == 0x20); diff --git a/include/RE/E/ExtraMapMarker.h b/include/RE/E/ExtraMapMarker.h index e7c9157df..50a4fea84 100644 --- a/include/RE/E/ExtraMapMarker.h +++ b/include/RE/E/ExtraMapMarker.h @@ -98,11 +98,11 @@ namespace RE constexpr void SetVisible(bool a_value) noexcept { a_value ? flags.set(Flag::kVisible) : flags.reset(Flag::kVisible); } // members - TESFullName locationName; // 00 - stl::enumeration flags; // 10 - std::uint8_t pad11; // 11 - stl::enumeration type; // 12 - std::uint32_t pad14; // 14 + TESFullName locationName; // 00 + REX::EnumSet flags; // 10 + std::uint8_t pad11; // 11 + REX::EnumSet type; // 12 + std::uint32_t pad14; // 14 }; static_assert(sizeof(MapMarkerData) == 0x18); diff --git a/include/RE/E/ExtraRefrPath.h b/include/RE/E/ExtraRefrPath.h index 30a3d0f4f..be9512786 100644 --- a/include/RE/E/ExtraRefrPath.h +++ b/include/RE/E/ExtraRefrPath.h @@ -23,16 +23,16 @@ namespace RE [[nodiscard]] ExtraDataType GetType() const override; // 01 - { return kRefrPath; } // members - NiPoint3 startPos; // 10 - NiPoint3 startTangent; // 1C - NiPoint3 startEuler; // 28 - NiPoint3 goalPos; // 34 - NiPoint3 goalTangent; // 40 - NiPoint3 goalEuler; // 4C - float speed; // 58 - float maxRotSpeed; // 5C - float currentParameter; // 60 - stl::enumeration type; // 64 + NiPoint3 startPos; // 10 + NiPoint3 startTangent; // 1C + NiPoint3 startEuler; // 28 + NiPoint3 goalPos; // 34 + NiPoint3 goalTangent; // 40 + NiPoint3 goalEuler; // 4C + float speed; // 58 + float maxRotSpeed; // 5C + float currentParameter; // 60 + REX::EnumSet type; // 64 }; static_assert(sizeof(ExtraRefrPath) == 0x68); } diff --git a/include/RE/E/ExtraSoul.h b/include/RE/E/ExtraSoul.h index 7f16c907b..479158c0c 100644 --- a/include/RE/E/ExtraSoul.h +++ b/include/RE/E/ExtraSoul.h @@ -24,10 +24,10 @@ namespace RE [[nodiscard]] SOUL_LEVEL GetContainedSoul() const; // members - stl::enumeration soul; // 10 - std::uint8_t pad11; // 11 - std::uint16_t pad12; // 12 - std::uint32_t pad14; // 14 + REX::EnumSet soul; // 10 + std::uint8_t pad11; // 11 + std::uint16_t pad12; // 12 + std::uint32_t pad14; // 14 }; static_assert(sizeof(ExtraSoul) == 0x18); } diff --git a/include/RE/E/ExtraTextDisplayData.h b/include/RE/E/ExtraTextDisplayData.h index 69f75e216..e2776f0f0 100644 --- a/include/RE/E/ExtraTextDisplayData.h +++ b/include/RE/E/ExtraTextDisplayData.h @@ -36,14 +36,14 @@ namespace RE void SetName(const char* a_name); // members - BSFixedString displayName; // 10 - BGSMessage* displayNameText; // 18 - TESQuest* ownerQuest; // 20 - stl::enumeration ownerInstance; // 28 - float temperFactor; // 2C - std::uint16_t customNameLength; // 30 - length w/o temper string, only valid if ownerInstance is kCustomName - std::uint16_t pad32; // 32 - std::uint32_t pad34; // 34 + BSFixedString displayName; // 10 + BGSMessage* displayNameText; // 18 + TESQuest* ownerQuest; // 20 + REX::EnumSet ownerInstance; // 28 + float temperFactor; // 2C + std::uint16_t customNameLength; // 30 - length w/o temper string, only valid if ownerInstance is kCustomName + std::uint16_t pad32; // 32 + std::uint32_t pad34; // 34 }; static_assert(sizeof(ExtraTextDisplayData) == 0x38); } diff --git a/include/RE/G/GArrayBase.h b/include/RE/G/GArrayBase.h index c3d954177..e9bf9da73 100644 --- a/include/RE/G/GArrayBase.h +++ b/include/RE/G/GArrayBase.h @@ -51,7 +51,7 @@ namespace RE iterator operator++(std::int32_t) { iterator it(*this); - operator++(); + operator++(); return it; } @@ -68,7 +68,7 @@ namespace RE iterator operator--(std::int32_t) { iterator it(*this); - operator--(); + operator--(); return it; } @@ -164,7 +164,7 @@ namespace RE const_iterator operator++(std::int32_t) { const_iterator it(*this); - operator++(); + operator++(); return it; } @@ -180,7 +180,7 @@ namespace RE const_iterator operator--(std::int32_t) { const_iterator it(*this); - operator--(); + operator--(); return it; } diff --git a/include/RE/G/GFxActionControl.h b/include/RE/G/GFxActionControl.h index 4093f0295..cbc552dbe 100644 --- a/include/RE/G/GFxActionControl.h +++ b/include/RE/G/GFxActionControl.h @@ -45,8 +45,8 @@ namespace RE constexpr void UnsetLongFilenameLogging() noexcept { actionFlags.reset(ActionControlFlags::kLongFilenames); } // members - stl::enumeration actionFlags; // 18 - std::uint32_t pad1C; // 1C + REX::EnumSet actionFlags; // 18 + std::uint32_t pad1C; // 1C }; static_assert(sizeof(GFxActionControl) == 0x20); } diff --git a/include/RE/G/GFxEvent.h b/include/RE/G/GFxEvent.h index 0f06020cc..4b320d6db 100644 --- a/include/RE/G/GFxEvent.h +++ b/include/RE/G/GFxEvent.h @@ -40,7 +40,7 @@ namespace RE {} // members - stl::enumeration type; // 0 + REX::EnumSet type; // 0 }; static_assert(sizeof(GFxEvent) == 0x4); diff --git a/include/RE/G/GFxMovieRoot.h b/include/RE/G/GFxMovieRoot.h index 73f3f39e0..b2b8e8951 100644 --- a/include/RE/G/GFxMovieRoot.h +++ b/include/RE/G/GFxMovieRoot.h @@ -106,49 +106,49 @@ namespace RE virtual void Unk_48(void); // 48 // members - std::uint64_t unk0020; // 0020 - GFxMovieDef::MemoryContextImpl* memoryContext; // 0028 - std::uint64_t unk0030; // 0030 - GMemoryHeap* heap; // 0038 - std::uint64_t unk0040; // 0040 - std::uint64_t unk0048; // 0048 - std::uint64_t unk0050; // 0050 - GFxSprite* timeline; // 0058 - GFxMovieDef* movieDef; // 0060 - std::uint64_t unk0068; // 0068 - std::uint64_t unk0070; // 0070 - GViewport unk0078; // 0078 - std::uint64_t unk00B0; // 00B0 - std::uint64_t unk00B8; // 00B8 - ScaleModeType viewScaleMode; // 00C0 - AlignType viewAlignment; // 00C4 - GRectF visibleFrameRect; // 00C8 - std::uint64_t unk00D8; // 00D8 - GRectF safeRect; // 00E0 - std::uint64_t unk00F0; // 00F0 - std::uint64_t unk00F8; // 00F8 - GMatrix3D* perspective3D; // 0100 - std::uint64_t unk0108; // 0108 - std::uint64_t unk0110; // 0110 - std::uint64_t unk0118[(0x09A0 - 0x0118) >> 3]; // 0118 - GColor backgroundColor; // 09A0 - std::uint32_t unk09A4; // 09A4 - std::uint64_t unk09A8[(0x0A68 - 0x09A8) >> 3]; // 09A8 - std::uint32_t mouseCursorCount; // 0A68 - std::uint32_t controllerCount; // 0A6C - void* userData; // 0A70 - std::uint64_t unk0A78; // 0A78 - GFxKeyboardState keyboardState; // 0A80 - std::uint64_t unk1108[(0x24A0 - 0x1108) >> 3]; // 1108 - GASGlobalContext* globalContext; // 24A0 - std::uint64_t unk24A8[(0x25E0 - 0x24A8) >> 3]; // 1108 - stl::enumeration flags; // 25E0 - std::uint32_t unk25E4; // 25E4 - std::uint64_t unk25E8[(0x2B48 - 0x25E8) >> 3]; // 25E8 - std::uint32_t focusGroup; // 2B48 - std::uint8_t controllerGroups[16]; // 2B4C - std::uint32_t unk2B54; // 2B54 - std::uint64_t unk2B58[(0x2BE8 - 0x2B58) >> 3]; // 2B58 + std::uint64_t unk0020; // 0020 + GFxMovieDef::MemoryContextImpl* memoryContext; // 0028 + std::uint64_t unk0030; // 0030 + GMemoryHeap* heap; // 0038 + std::uint64_t unk0040; // 0040 + std::uint64_t unk0048; // 0048 + std::uint64_t unk0050; // 0050 + GFxSprite* timeline; // 0058 + GFxMovieDef* movieDef; // 0060 + std::uint64_t unk0068; // 0068 + std::uint64_t unk0070; // 0070 + GViewport unk0078; // 0078 + std::uint64_t unk00B0; // 00B0 + std::uint64_t unk00B8; // 00B8 + ScaleModeType viewScaleMode; // 00C0 + AlignType viewAlignment; // 00C4 + GRectF visibleFrameRect; // 00C8 + std::uint64_t unk00D8; // 00D8 + GRectF safeRect; // 00E0 + std::uint64_t unk00F0; // 00F0 + std::uint64_t unk00F8; // 00F8 + GMatrix3D* perspective3D; // 0100 + std::uint64_t unk0108; // 0108 + std::uint64_t unk0110; // 0110 + std::uint64_t unk0118[(0x09A0 - 0x0118) >> 3]; // 0118 + GColor backgroundColor; // 09A0 + std::uint32_t unk09A4; // 09A4 + std::uint64_t unk09A8[(0x0A68 - 0x09A8) >> 3]; // 09A8 + std::uint32_t mouseCursorCount; // 0A68 + std::uint32_t controllerCount; // 0A6C + void* userData; // 0A70 + std::uint64_t unk0A78; // 0A78 + GFxKeyboardState keyboardState; // 0A80 + std::uint64_t unk1108[(0x24A0 - 0x1108) >> 3]; // 1108 + GASGlobalContext* globalContext; // 24A0 + std::uint64_t unk24A8[(0x25E0 - 0x24A8) >> 3]; // 1108 + REX::EnumSet flags; // 25E0 + std::uint32_t unk25E4; // 25E4 + std::uint64_t unk25E8[(0x2B48 - 0x25E8) >> 3]; // 25E8 + std::uint32_t focusGroup; // 2B48 + std::uint8_t controllerGroups[16]; // 2B4C + std::uint32_t unk2B54; // 2B54 + std::uint64_t unk2B58[(0x2BE8 - 0x2B58) >> 3]; // 2B58 }; #ifndef __INTELLISENSE__ static_assert(sizeof(GFxMovieRoot) == 0x2BF0); diff --git a/include/RE/G/GFxPlaceObjectBase.h b/include/RE/G/GFxPlaceObjectBase.h index f387548b4..fe6a2fc1b 100644 --- a/include/RE/G/GFxPlaceObjectBase.h +++ b/include/RE/G/GFxPlaceObjectBase.h @@ -43,25 +43,25 @@ namespace RE struct Filter { - stl::enumeration filterType; // 00 - std::uint8_t pad01; // 01 - std::uint16_t angle; // 02 - std::uint16_t distance; // 04 - std::uint16_t pad06; // 06 - GRenderer::BlurFilterParams blurFilterParams; // 08 - float colorMatrix[20]; // 4C + REX::EnumSet filterType; // 00 + std::uint8_t pad01; // 01 + std::uint16_t angle; // 02 + std::uint16_t distance; // 04 + std::uint16_t pad06; // 06 + GRenderer::BlurFilterParams blurFilterParams; // 08 + float colorMatrix[20]; // 4C }; static_assert(sizeof(Filter) == 0x9C); - GArray filterList; // 00 - GRenderer::Cxform colorTransform; // 18 - GMatrix2D matrix; // 38 - float ratio; // 50 - std::int32_t depth; // 54 - GFxResourceID characterId; // 58 - std::uint16_t clipDepth; // 5C - stl::enumeration blendMode; // 5E - stl::enumeration placeFlags; // 5F + GArray filterList; // 00 + GRenderer::Cxform colorTransform; // 18 + GMatrix2D matrix; // 38 + float ratio; // 50 + std::int32_t depth; // 54 + GFxResourceID characterId; // 58 + std::uint16_t clipDepth; // 5C + REX::EnumSet blendMode; // 5E + REX::EnumSet placeFlags; // 5F }; static_assert(sizeof(GFxPlaceObjectUnpackedData) == 0x60); @@ -74,10 +74,10 @@ namespace RE kReplaceDisplayObject, }; - void* clipActions; // 60 - const char* name; // 68 - stl::enumeration changeType; // 70 - std::uint32_t pad74; // 74 + void* clipActions; // 60 + const char* name; // 68 + REX::EnumSet changeType; // 70 + std::uint32_t pad74; // 74 }; class GFxPlaceObjectBase : public GASExecuteTag diff --git a/include/RE/G/GFxRenderConfig.h b/include/RE/G/GFxRenderConfig.h index 47f74f279..97c831569 100644 --- a/include/RE/G/GFxRenderConfig.h +++ b/include/RE/G/GFxRenderConfig.h @@ -44,13 +44,13 @@ namespace RE void SetStrokerAAWidth(float a_aawidth); // members - GPtr renderer; // 18 - float maxCurvePixelError; // 20 - stl::enumeration renderFlags; // 24 - float strokerAAWidth; // 28 - stl::enumeration rendererCapBits; // 2C - stl::enumeration rendererVtxFmts; // 30 - std::uint32_t pad34; // 34 + GPtr renderer; // 18 + float maxCurvePixelError; // 20 + REX::EnumSet renderFlags; // 24 + float strokerAAWidth; // 28 + REX::EnumSet rendererCapBits; // 2C + REX::EnumSet rendererVtxFmts; // 30 + std::uint32_t pad34; // 34 }; static_assert(sizeof(GFxRenderConfig) == 0x38); } diff --git a/include/RE/G/GFxTranslator.h b/include/RE/G/GFxTranslator.h index 2428176b8..e920fc1d4 100644 --- a/include/RE/G/GFxTranslator.h +++ b/include/RE/G/GFxTranslator.h @@ -45,13 +45,13 @@ namespace RE void SetResultHTML(const wchar_t* a_resultHTML, UPInt a_resultLen = UPINT_MAX); // An output method which sets translated string as a HTML text. // members - const wchar_t* key; // 00 - GFxWStringBuffer* result; // 08 - const char* instanceName; // 10 - stl::enumeration flags; // 18 - std::uint8_t pad19; // 19 - std::uint16_t pad1A; // 1A - std::uint32_t pad1C; // 1C + const wchar_t* key; // 00 + GFxWStringBuffer* result; // 08 + const char* instanceName; // 10 + REX::EnumSet flags; // 18 + std::uint8_t pad19; // 19 + std::uint16_t pad1A; // 1A + std::uint32_t pad1C; // 1C }; static_assert(sizeof(TranslateInfo) == 0x20); @@ -68,24 +68,24 @@ namespace RE }; // members - const wchar_t* paraText; // 00 - [in] Text of the current paragraph, wide-characters are used - UPInt paraTextLen; // 08 - [in] Length of the paragraph text, in characters - const float* widths; // 10 - [in] An array of line widths, in pixels, before the character at the corresponding index. The size of the array is NumCharsInLine + 1. Note, this is not the array of character widths. For example, there is a line that contains three characters: ABC. The NumCharInLine will be equal 3, the size of the pWidths will be 4; the pWidth[0] will be always 0 (since there are no characters before the A), the pWidth[1] will contain width of A symbol, pWidths[2] will contain width of A PLUS width of B, and, finally, pWidths[3] will contain total width of the line (width of A PLUS width of B PLUS width of C) - UPInt lineStartPos; // 18 - [in] The text position of the first character in line. ParaTextLen[LineStartPos] might be used to get the value of this character - UPInt numCharsInLine; // 20 - [in] Number of characters currently in the line - float visibleRectWidth; // 28 - [in] Width, in pixels, of client rectangle. This width might be used in calculation of word wrapping position: the total width of line should not exceed this width - float currentLineWidth; // 2C - [in] Current line width, in pixels - float lineWidthBeforeWordWrap; // 30 - [in] Line width before the proposedWordWrapPoint, in pixels. For example, if line is ABC DEF and proposedWordWrapPoint = 3 (space) then lineWidthBeforeWordWrap will contain the width of ABC (w/o space) part of the line - float dashSymbolWidth; // 34 - [in] Supplementary member, width of the hyphen symbol, in pixels. It might be used to calculate hyphenation - stl::enumeration alignment; // 38 - [in] Alignment of the line - std::uint8_t pad39; // 39 - std::uint16_t pad3A; // 3A - std::uint32_t pad3C; // 3C - UPInt proposedWordWrapPoint; // 40 - [in,out] An index in the line of the proposed word wrap position. For example, if the line text is "ABC DEF" and only "ABC DE" fits in visibleRectWidth then the proposedWordWrapPoint will be equal to 3. Note, this is the index in line, not in text (paraText), not in line. Use lineStartPos to calculate the proposed word wrapping position in the text. The user's OnWordWrapping method should change this member if it is necessary to change the word wrapping position according to custom rules - bool useHyphenation; // 48 - [out] The OnWordWrapping method may set this to true to indicate to put hyphen symbol at the word-wrapping position. This might be useful for implementing hyphenation - std::uint8_t pad49; // 49 - std::uint16_t pad4A; // 4A - std::uint32_t pad4C; // 4C + const wchar_t* paraText; // 00 - [in] Text of the current paragraph, wide-characters are used + UPInt paraTextLen; // 08 - [in] Length of the paragraph text, in characters + const float* widths; // 10 - [in] An array of line widths, in pixels, before the character at the corresponding index. The size of the array is NumCharsInLine + 1. Note, this is not the array of character widths. For example, there is a line that contains three characters: ABC. The NumCharInLine will be equal 3, the size of the pWidths will be 4; the pWidth[0] will be always 0 (since there are no characters before the A), the pWidth[1] will contain width of A symbol, pWidths[2] will contain width of A PLUS width of B, and, finally, pWidths[3] will contain total width of the line (width of A PLUS width of B PLUS width of C) + UPInt lineStartPos; // 18 - [in] The text position of the first character in line. ParaTextLen[LineStartPos] might be used to get the value of this character + UPInt numCharsInLine; // 20 - [in] Number of characters currently in the line + float visibleRectWidth; // 28 - [in] Width, in pixels, of client rectangle. This width might be used in calculation of word wrapping position: the total width of line should not exceed this width + float currentLineWidth; // 2C - [in] Current line width, in pixels + float lineWidthBeforeWordWrap; // 30 - [in] Line width before the proposedWordWrapPoint, in pixels. For example, if line is ABC DEF and proposedWordWrapPoint = 3 (space) then lineWidthBeforeWordWrap will contain the width of ABC (w/o space) part of the line + float dashSymbolWidth; // 34 - [in] Supplementary member, width of the hyphen symbol, in pixels. It might be used to calculate hyphenation + REX::EnumSet alignment; // 38 - [in] Alignment of the line + std::uint8_t pad39; // 39 + std::uint16_t pad3A; // 3A + std::uint32_t pad3C; // 3C + UPInt proposedWordWrapPoint; // 40 - [in,out] An index in the line of the proposed word wrap position. For example, if the line text is "ABC DEF" and only "ABC DE" fits in visibleRectWidth then the proposedWordWrapPoint will be equal to 3. Note, this is the index in line, not in text (paraText), not in line. Use lineStartPos to calculate the proposed word wrapping position in the text. The user's OnWordWrapping method should change this member if it is necessary to change the word wrapping position according to custom rules + bool useHyphenation; // 48 - [out] The OnWordWrapping method may set this to true to indicate to put hyphen symbol at the word-wrapping position. This might be useful for implementing hyphenation + std::uint8_t pad49; // 49 + std::uint16_t pad4A; // 4A + std::uint32_t pad4C; // 4C }; static_assert(sizeof(LineFormatDesc) == 0x50); @@ -103,8 +103,8 @@ namespace RE [[nodiscard]] bool HandlesCustomWordWrapping() const; // members - stl::enumeration wwMode; // 18 - std::uint32_t pad1C; // 1C + REX::EnumSet wwMode; // 18 + std::uint32_t pad1C; // 1C }; static_assert(sizeof(GFxTranslator) == 0x20); } diff --git a/include/RE/G/GFxValue.h b/include/RE/G/GFxValue.h index e9965649b..c9157d62b 100644 --- a/include/RE/G/GFxValue.h +++ b/include/RE/G/GFxValue.h @@ -187,26 +187,26 @@ namespace RE void ClearFlags(Flag a_flags); // members - double _x = 0.0; // 00 - double _y = 0.0; // 08 - double _rotation = 0.0; // 10 - double _xScale = 0.0; // 18 - double _yScale = 0.0; // 20 - double _alpha = 0.0; // 28 - bool _visible = false; // 30 - std::uint8_t _pad31 = 0; // 31 - std::uint16_t _pad32 = 0; // 32 - std::uint32_t _pad34 = 0; // 34 - double _z = 0.0; // 38 - double _xRotation = 0.0; // 40 - double _yRotation = 0.0; // 48 - double _zScale = 0.0; // 50 - double _fov = 0.0; // 58 - GMatrix3D _viewMatrix3D; // 60 - GMatrix3D _perspMatrix3D; // A0 - stl::enumeration _flags = Flag::kNone; // E0 - std::uint16_t _padD2 = 0; // E2 - std::uint32_t _padD4 = 0; // E4 + double _x = 0.0; // 00 + double _y = 0.0; // 08 + double _rotation = 0.0; // 10 + double _xScale = 0.0; // 18 + double _yScale = 0.0; // 20 + double _alpha = 0.0; // 28 + bool _visible = false; // 30 + std::uint8_t _pad31 = 0; // 31 + std::uint16_t _pad32 = 0; // 32 + std::uint32_t _pad34 = 0; // 34 + double _z = 0.0; // 38 + double _xRotation = 0.0; // 40 + double _yRotation = 0.0; // 48 + double _zScale = 0.0; // 50 + double _fov = 0.0; // 58 + GMatrix3D _viewMatrix3D; // 60 + GMatrix3D _perspMatrix3D; // A0 + REX::EnumSet _flags = Flag::kNone; // E0 + std::uint16_t _padD2 = 0; // E2 + std::uint32_t _padD4 = 0; // E4 }; static_assert(sizeof(DisplayInfo) == 0xE8); @@ -429,10 +429,10 @@ namespace RE static_assert(sizeof(ValueUnion) == 0x8); // members - ObjectInterface* _objectInterface; // 00 - stl::enumeration _type; // 08 - std::uint32_t _pad0C; // 0C - ValueUnion _value; // 10 + ObjectInterface* _objectInterface; // 00 + REX::EnumSet _type; // 08 + std::uint32_t _pad0C; // 0C + ValueUnion _value; // 10 }; static_assert(sizeof(GFxValue) == 0x18); } diff --git a/include/RE/G/GFxWWHelper.h b/include/RE/G/GFxWWHelper.h index fd19b9e8d..09610f15a 100644 --- a/include/RE/G/GFxWWHelper.h +++ b/include/RE/G/GFxWWHelper.h @@ -32,9 +32,9 @@ namespace RE struct CharBreakInfo { - wchar_t ch; // 0 - stl::enumeration flags; // 2 - std::uint8_t pad3; // 3 + wchar_t ch; // 0 + REX::EnumSet flags; // 2 + std::uint8_t pad3; // 3 }; static_assert(sizeof(CharBreakInfo) == 0x4); diff --git a/include/RE/G/GImageBase.h b/include/RE/G/GImageBase.h index 138398ef1..2aa220662 100644 --- a/include/RE/G/GImageBase.h +++ b/include/RE/G/GImageBase.h @@ -25,14 +25,14 @@ namespace RE kYUVA_8228 = 201, }; - stl::enumeration format; // 00 - std::uint32_t width; // 04 - std::uint32_t height; // 08 - std::uint32_t pitch; // 0C - std::uint8_t* data; // 10 - std::uint32_t dataSize; // 18 - std::uint32_t mipMapCount; // 1C - GArray colorMap; // 20 + REX::EnumSet format; // 00 + std::uint32_t width; // 04 + std::uint32_t height; // 08 + std::uint32_t pitch; // 0C + std::uint8_t* data; // 10 + std::uint32_t dataSize; // 18 + std::uint32_t mipMapCount; // 1C + GArray colorMap; // 20 }; static_assert(sizeof(GImageBase) == 0x38); } diff --git a/include/RE/G/GList.h b/include/RE/G/GList.h index e39ac97c1..841926146 100644 --- a/include/RE/G/GList.h +++ b/include/RE/G/GList.h @@ -131,7 +131,7 @@ namespace RE iterator_base operator++(int) { iterator_base tmp{ *this }; - operator++(); + operator++(); return tmp; } @@ -146,7 +146,7 @@ namespace RE iterator_base operator--(int) { iterator_base tmp{ *this }; - operator--(); + operator--(); return tmp; } diff --git a/include/RE/G/GMemoryHeap.h b/include/RE/G/GMemoryHeap.h index ac91f3068..b45bb5975 100644 --- a/include/RE/G/GMemoryHeap.h +++ b/include/RE/G/GMemoryHeap.h @@ -71,15 +71,15 @@ namespace RE void Clear(); // members - stl::enumeration flags; // 00 - std::uint32_t pad04; // 04 - UPInt minAlign; // 08 - UPInt granularity; // 10 - UPInt reserve; // 18 - UPInt threshold; // 20 - UPInt limit; // 28 - GHeapID heapID; // 30 - UPInt arena; // 38 + REX::EnumSet flags; // 00 + std::uint32_t pad04; // 04 + UPInt minAlign; // 08 + UPInt granularity; // 10 + UPInt reserve; // 18 + UPInt threshold; // 20 + UPInt limit; // 28 + GHeapID heapID; // 30 + UPInt arena; // 38 }; static_assert(sizeof(HeapDesc) == 0x40); diff --git a/include/RE/G/GRenderer.h b/include/RE/G/GRenderer.h index 1eed1c4ec..1fd029fca 100644 --- a/include/RE/G/GRenderer.h +++ b/include/RE/G/GRenderer.h @@ -274,10 +274,10 @@ namespace RE { public: // members - stl::enumeration capBits; // 00 - std::uint32_t vertexFormats; // 04 - std::uint32_t blendModes; // 08 - std::uint32_t maxTextureSize; // 0C + REX::EnumSet capBits; // 00 + std::uint32_t vertexFormats; // 04 + std::uint32_t blendModes; // 08 + std::uint32_t maxTextureSize; // 0C }; static_assert(sizeof(RenderCaps) == 0x10); @@ -287,13 +287,13 @@ namespace RE UserData(); // members - const char* string; // 00 - float* flt; // 08 - float* matrix; // 10 - std::uint32_t matrixSize; // 18 - stl::enumeration propFlags; // 1C - std::uint8_t pad1D; // 1D - std::uint16_t pad1E; // 1E + const char* string; // 00 + float* flt; // 08 + float* matrix; // 10 + std::uint32_t matrixSize; // 18 + REX::EnumSet propFlags; // 1C + std::uint8_t pad1D; // 1D + std::uint16_t pad1E; // 1E }; static_assert(sizeof(UserData) == 0x20); @@ -301,10 +301,10 @@ namespace RE { public: // members - GTexture* texture; // 00 - Matrix textureMatrix; // 08 - stl::enumeration wrapMode; // 20 - stl::enumeration sampleMode; // 24 + GTexture* texture; // 00 + Matrix textureMatrix; // 08 + REX::EnumSet wrapMode; // 20 + REX::EnumSet sampleMode; // 24 }; static_assert(sizeof(FillTexture) == 0x28); @@ -444,9 +444,9 @@ namespace RE void FillStyleBitmap(GTexture* a_texture, const Matrix& a_matrix, BitmapWrapMode a_wrapMode, BitmapSampleMode a_sampleMode); // members - GList handlers; // 10 - StereoParams s3DParams; // 20 - stl::enumeration s3DDisplay; // 34 + GList handlers; // 10 + StereoParams s3DParams; // 20 + REX::EnumSet s3DDisplay; // 34 }; static_assert(sizeof(GRenderer) == 0x38); } diff --git a/include/RE/G/GString.h b/include/RE/G/GString.h index 8102782f6..2ac4f25d2 100644 --- a/include/RE/G/GString.h +++ b/include/RE/G/GString.h @@ -74,8 +74,8 @@ namespace RE { DataDescUnion(); - DataDesc* data; - stl::enumeration heapType; + DataDesc* data; + REX::EnumSet heapType; }; static_assert(sizeof(DataDescUnion) == 0x8); diff --git a/include/RE/G/GViewport.h b/include/RE/G/GViewport.h index ee009864b..e08a89b8f 100644 --- a/include/RE/G/GViewport.h +++ b/include/RE/G/GViewport.h @@ -25,20 +25,20 @@ namespace RE void SetScissorRect(std::int32_t a_scLeft, std::int32_t a_scTop, std::int32_t a_scW, std::int32_t a_scH); // members - std::int32_t bufferWidth; // 00 - std::int32_t bufferHeight; // 04 - std::int32_t left; // 08 - std::int32_t top; // 0C - std::int32_t width; // 10 - std::int32_t height; // 14 - std::int32_t scissorLeft; // 18 - std::int32_t scissorTop; // 1C - std::int32_t scissorWidth; // 20 - std::int32_t scissorHeight; // 24 - float scale; // 28 - float aspectRatio; // 2C - stl::enumeration flags; // 30 - std::uint32_t pad34; // 34 + std::int32_t bufferWidth; // 00 + std::int32_t bufferHeight; // 04 + std::int32_t left; // 08 + std::int32_t top; // 0C + std::int32_t width; // 10 + std::int32_t height; // 14 + std::int32_t scissorLeft; // 18 + std::int32_t scissorTop; // 1C + std::int32_t scissorWidth; // 20 + std::int32_t scissorHeight; // 24 + float scale; // 28 + float aspectRatio; // 2C + REX::EnumSet flags; // 30 + std::uint32_t pad34; // 34 }; static_assert(sizeof(GViewport) == 0x38); } diff --git a/include/RE/H/HUDData.h b/include/RE/H/HUDData.h index bf65ac3e2..93e785dcc 100644 --- a/include/RE/H/HUDData.h +++ b/include/RE/H/HUDData.h @@ -51,17 +51,17 @@ namespace RE ~HUDData() override; // 00 // members - stl::enumeration type; // 10 - std::uint32_t pad14; // 14 - BSString text; // 18 - ObjectRefHandle crossHairRef; // 28 - std::uint32_t pad2C; // 2C - void* unk30; // 30 - std::uint64_t unk38; // 38 - std::uint8_t unk40; // 40 - std::uint8_t pad41; // 41 - std::uint16_t pad42; // 42 - stl::enumeration discovery; // 44 + REX::EnumSet type; // 10 + std::uint32_t pad14; // 14 + BSString text; // 18 + ObjectRefHandle crossHairRef; // 28 + std::uint32_t pad2C; // 2C + void* unk30; // 30 + std::uint64_t unk38; // 38 + std::uint8_t unk40; // 40 + std::uint8_t pad41; // 41 + std::uint16_t pad42; // 42 + REX::EnumSet discovery; // 44 }; static_assert(sizeof(HUDData) == 0x48); } diff --git a/include/RE/H/Hazard.h b/include/RE/H/Hazard.h index a6407c774..3bad345f4 100644 --- a/include/RE/H/Hazard.h +++ b/include/RE/H/Hazard.h @@ -48,17 +48,17 @@ namespace RE virtual bool IsPermanent() const; // A4 - { return TESDataHandler::GetSingleton()->IsGeneratedFormID(formID) == 0; } // members - ModelDBHandle hazardDBHandle; // 98 - ActorHandle ownerActor; // A0 - float age; // A4 - float lifetime; // A8 - float targetTimer; // AC - float radius; // B0 - float magnitude; // B4 - BGSHazard* hazard; // B8 - NiPointer light; // C0 - BSSoundHandle sound; // C8 - stl::enumeration flags; // D4 + ModelDBHandle hazardDBHandle; // 98 + ActorHandle ownerActor; // A0 + float age; // A4 + float lifetime; // A8 + float targetTimer; // AC + float radius; // B0 + float magnitude; // B4 + BGSHazard* hazard; // B8 + NiPointer light; // C0 + BSSoundHandle sound; // C8 + REX::EnumSet flags; // D4 }; #ifndef SKYRIM_SUPPORT_AE static_assert(sizeof(Hazard) == 0xD8); diff --git a/include/RE/H/HighProcessData.h b/include/RE/H/HighProcessData.h index bd5e9eb0a..9070942e0 100644 --- a/include/RE/H/HighProcessData.h +++ b/include/RE/H/HighProcessData.h @@ -184,7 +184,7 @@ namespace RE } // members - stl::enumeration voiceState; // 000 + REX::EnumSet voiceState; // 000 std::uint32_t pad004; // 004 TESShout* currentShout; // 008 TESShout::VariationID currentShoutVariation; // 010 @@ -212,7 +212,7 @@ namespace RE std::uint32_t pad0E4; // 0E4 MagicItem* reanimateSpell; // 0E8 Movement::TypeData currentMovementType; // 0F0 - stl::enumeration fadeState; // 130 + REX::EnumSet fadeState; // 130 float fadeAlpha; // 134 TESObjectREFR* fadeTrigger; // 138 ObjectRefHandle headTrackTarget[HEAD_TRACK_TYPE::kTotal]; // 140 diff --git a/include/RE/H/HitData.h b/include/RE/H/HitData.h index e1daaee12..ceb835636 100644 --- a/include/RE/H/HitData.h +++ b/include/RE/H/HitData.h @@ -49,33 +49,33 @@ namespace RE } // members - NiPoint3 hitPosition; // 00 - NiPoint3 hitDirection; // 0C - ActorHandle aggressor; // 18 - ActorHandle target; // 1C - ObjectRefHandle sourceRef; // 20 - std::uint32_t pad24; // 24 - NiPointer attackData; // 28 - TESObjectWEAP* weapon; // 30 - MagicItem* criticalEffect; // 38 - SpellItem* attackDataSpell; // 40 - VATSCommand* VATSCommand; // 48 - float totalDamage; // 50 - float physicalDamage; // 54 - float targetedLimbDamage; // 58 - float percentBlocked; // 5C - float resistedPhysicalDamage; // 60 - float resistedTypedDamage; // 64 - float stagger; // 68 - float sneakAttackBonus; // 6C - float bonusHealthDamageMult; // 70 - float pushBack; // 74 - float reflectedDamage; // 78 - float criticalDamageMult; // 7C - stl::enumeration flags; // 80 - std::uint32_t equipIndex; // 84 - ActorValue skill; // 88 - std::uint32_t damageLimb; // 8C + NiPoint3 hitPosition; // 00 + NiPoint3 hitDirection; // 0C + ActorHandle aggressor; // 18 + ActorHandle target; // 1C + ObjectRefHandle sourceRef; // 20 + std::uint32_t pad24; // 24 + NiPointer attackData; // 28 + TESObjectWEAP* weapon; // 30 + MagicItem* criticalEffect; // 38 + SpellItem* attackDataSpell; // 40 + VATSCommand* VATSCommand; // 48 + float totalDamage; // 50 + float physicalDamage; // 54 + float targetedLimbDamage; // 58 + float percentBlocked; // 5C + float resistedPhysicalDamage; // 60 + float resistedTypedDamage; // 64 + float stagger; // 68 + float sneakAttackBonus; // 6C + float bonusHealthDamageMult; // 70 + float pushBack; // 74 + float reflectedDamage; // 78 + float criticalDamageMult; // 7C + REX::EnumSet flags; // 80 + std::uint32_t equipIndex; // 84 + ActorValue skill; // 88 + std::uint32_t damageLimb; // 8C }; static_assert(sizeof(HitData) == 0x90); } diff --git a/include/RE/H/hkBaseTypes.h b/include/RE/H/hkBaseTypes.h index f754db45c..21f631616 100644 --- a/include/RE/H/hkBaseTypes.h +++ b/include/RE/H/hkBaseTypes.h @@ -19,7 +19,7 @@ namespace RE explicit hkHalf(const float& a_val); hkHalf& operator=(const float& a_val); - operator float() const; + operator float() const; protected: void SetFloat(const float& a_val); diff --git a/include/RE/H/hkContactPointMaterial.h b/include/RE/H/hkContactPointMaterial.h index bf950215b..7e1c03c83 100644 --- a/include/RE/H/hkContactPointMaterial.h +++ b/include/RE/H/hkContactPointMaterial.h @@ -16,11 +16,11 @@ namespace RE }; // members - std::uint64_t userData; // 00 - hkUFloat8 friction; // 08 - std::uint8_t restitution; // 09 - hkUFloat8 maxImpulse; // 0A - stl::enumeration flags; // 0B + std::uint64_t userData; // 00 + hkUFloat8 friction; // 08 + std::uint8_t restitution; // 09 + hkUFloat8 maxImpulse; // 0A + REX::EnumSet flags; // 0B }; static_assert(sizeof(hkContactPointMaterial) == 0x10); } diff --git a/include/RE/H/hkSmallArray.h b/include/RE/H/hkSmallArray.h index 64c34d324..c940eb962 100644 --- a/include/RE/H/hkSmallArray.h +++ b/include/RE/H/hkSmallArray.h @@ -14,10 +14,10 @@ namespace RE kForceSigned = static_cast>(-1) }; - T* data; // 00 - std::uint16_t size; // 08 - stl::enumeration capacityAndFlags; // 0A - std::uint32_t pad0C; // 0C + T* data; // 00 + std::uint16_t size; // 08 + REX::EnumSet capacityAndFlags; // 0A + std::uint32_t pad0C; // 0C }; static_assert(sizeof(hkSmallArray) == 0x10); } diff --git a/include/RE/H/hkaAnimation.h b/include/RE/H/hkaAnimation.h index 685983d94..9eb51f6c1 100644 --- a/include/RE/H/hkaAnimation.h +++ b/include/RE/H/hkaAnimation.h @@ -56,12 +56,12 @@ namespace RE virtual std::uint32_t GetAnnotations(float a_startTime, float a_deltaTime, TrackAnnotation* a_annotationsOut, std::uint32_t a_maxAnnotations) const; // 0F // members - stl::enumeration type; // 10 - float duration; // 14 - std::int32_t numberOfTransformTracks; // 18 - std::int32_t numberOfFloatTracks; // 1C - hkRefPtr extractedMotion; // 20 - hkArray annotationTracks; // 28 + REX::EnumSet type; // 10 + float duration; // 14 + std::int32_t numberOfTransformTracks; // 18 + std::int32_t numberOfFloatTracks; // 1C + hkRefPtr extractedMotion; // 20 + hkArray annotationTracks; // 28 }; static_assert(sizeof(hkaAnimation) == 0x38); } diff --git a/include/RE/H/hkaAnimationBinding.h b/include/RE/H/hkaAnimationBinding.h index 9c35cc51f..0c793613f 100644 --- a/include/RE/H/hkaAnimationBinding.h +++ b/include/RE/H/hkaAnimationBinding.h @@ -21,12 +21,12 @@ namespace RE }; // members - hkStringPtr originalSkeletonName; // 10 - hkRefPtr animation; // 18 - hkArray transformTrackToBoneIndices; // 20 - hkArray floatTrackToFloatSlotIndices; // 30 - stl::enumeration blendHint; // 40 - char pad41[7]; // 41 + hkStringPtr originalSkeletonName; // 10 + hkRefPtr animation; // 18 + hkArray transformTrackToBoneIndices; // 20 + hkArray floatTrackToFloatSlotIndices; // 30 + REX::EnumSet blendHint; // 40 + char pad41[7]; // 41 }; static_assert(sizeof(hkaAnimationBinding) == 0x48); } diff --git a/include/RE/H/hkbBehaviorGraph.h b/include/RE/H/hkbBehaviorGraph.h index 2474758ab..f70bc021f 100644 --- a/include/RE/H/hkbBehaviorGraph.h +++ b/include/RE/H/hkbBehaviorGraph.h @@ -37,40 +37,40 @@ namespace RE void UpdateSync(const hkbContext& a_context) override; // 19 // members - stl::enumeration variableMode; // 048 - std::uint8_t pad49; // 049 - std::uint16_t pad4A; // 04A - std::uint32_t pad4C; // 04C - hkArray uniqueIDPool; // 050 - hkRefVariant idToStateMachineTemplateMap; // 060 - hkArray mirroredExternalIDMap; // 068 - hkRefVariant pseudoRandomGenerator; // 078 - hkRefPtr rootGenerator; // 080 - hkRefPtr data; // 088 - hkRefVariant rootGeneratorClone; // 090 - hkRefVariant activeNodes; // 098 - hkRefVariant activeNodeTemplateToIndexMap; // 0A0 - hkRefVariant activeNodesChildrenIndices; // 0A8 - hkRefVariant globalTransitionData; // 0B0 - hkRefVariant eventIDMap; // 0B8 - hkRefVariant attributeIDMap; // 0C0 - hkRefVariant variableIDMap; // 0C8 - hkRefVariant characterPropertyIDMap; // 0D0 - hkRefVariant variableValueSet; // 0D8 - hkRefVariant nodeTemplateToCloneMap; // 0E0 - hkRefVariant nodeCloneToTemplateMap; // 0E8 - hkRefVariant stateListenerTemplateToCloneMap; // 0F0 - hkRefVariant nodePartitionInfo; // 0F8 - std::int32_t numIntermediateOutputs; // 100 - std::uint32_t pad104; // 104 - hkArray jobs; // 108 - hkArray allPartitionMemory; // 118 - std::int16_t numStaticNodes; // 128 - std::int16_t nextUniqueID; // 12A - bool isActive; // 12C - bool isLinked; // 12D - bool updateActiveNodes; // 12E - bool stateOrTransitionChanged; // 12F + REX::EnumSet variableMode; // 048 + std::uint8_t pad49; // 049 + std::uint16_t pad4A; // 04A + std::uint32_t pad4C; // 04C + hkArray uniqueIDPool; // 050 + hkRefVariant idToStateMachineTemplateMap; // 060 + hkArray mirroredExternalIDMap; // 068 + hkRefVariant pseudoRandomGenerator; // 078 + hkRefPtr rootGenerator; // 080 + hkRefPtr data; // 088 + hkRefVariant rootGeneratorClone; // 090 + hkRefVariant activeNodes; // 098 + hkRefVariant activeNodeTemplateToIndexMap; // 0A0 + hkRefVariant activeNodesChildrenIndices; // 0A8 + hkRefVariant globalTransitionData; // 0B0 + hkRefVariant eventIDMap; // 0B8 + hkRefVariant attributeIDMap; // 0C0 + hkRefVariant variableIDMap; // 0C8 + hkRefVariant characterPropertyIDMap; // 0D0 + hkRefVariant variableValueSet; // 0D8 + hkRefVariant nodeTemplateToCloneMap; // 0E0 + hkRefVariant nodeCloneToTemplateMap; // 0E8 + hkRefVariant stateListenerTemplateToCloneMap; // 0F0 + hkRefVariant nodePartitionInfo; // 0F8 + std::int32_t numIntermediateOutputs; // 100 + std::uint32_t pad104; // 104 + hkArray jobs; // 108 + hkArray allPartitionMemory; // 118 + std::int16_t numStaticNodes; // 128 + std::int16_t nextUniqueID; // 12A + bool isActive; // 12C + bool isLinked; // 12D + bool updateActiveNodes; // 12E + bool stateOrTransitionChanged; // 12F }; static_assert(sizeof(hkbBehaviorGraph) == 0x130); } diff --git a/include/RE/H/hkbClipGenerator.h b/include/RE/H/hkbClipGenerator.h index 60c7b255e..dc7bc8105 100644 --- a/include/RE/H/hkbClipGenerator.h +++ b/include/RE/H/hkbClipGenerator.h @@ -63,35 +63,35 @@ namespace RE void UpdateSync(const hkbContext& a_context) override; // 19 // members - hkStringPtr animationName; // 048 - hkRefPtr triggers; // 050 - float cropStartAmountLocalTime; // 058 - float cropEndAmountLocalTime; // 05C - float startTime; // 060 - float playbackSpeed; // 064 - float enforcedDuration; // 068 - float userControlledTimeFraction; // 06C - std::uint16_t animationBindingIndex; // 070 - stl::enumeration mode; // 072 - std::uint8_t flags; // 073 - std::uint32_t unk74; // 074 - hkArray animDatas; // 078 - hkRefPtr animationControl; // 088 - hkRefPtr originalTriggers; // 090 - hkaDefaultAnimationControlMapperData* mapperData; // 098 - hkaAnimationBinding* binding; // 0A0 - hkRefVariant mirroredAnimation; // 0A8 - hkQsTransform extractedMotion; // 0B0 - hkArray echos; // 0E0 - float localTime; // 0F0 - float time; // 0F4 - float previousUserControlledTimeFraction; // 0F8 - std::int32_t bufferSize; // 0FC - std::int32_t echoBufferSize; // 100 - bool atEnd; // 104 - bool ignoreStartTime; // 105 - bool pingPongBackward; // 106 - std::uint8_t pad107[9]; // 107 + hkStringPtr animationName; // 048 + hkRefPtr triggers; // 050 + float cropStartAmountLocalTime; // 058 + float cropEndAmountLocalTime; // 05C + float startTime; // 060 + float playbackSpeed; // 064 + float enforcedDuration; // 068 + float userControlledTimeFraction; // 06C + std::uint16_t animationBindingIndex; // 070 + REX::EnumSet mode; // 072 + std::uint8_t flags; // 073 + std::uint32_t unk74; // 074 + hkArray animDatas; // 078 + hkRefPtr animationControl; // 088 + hkRefPtr originalTriggers; // 090 + hkaDefaultAnimationControlMapperData* mapperData; // 098 + hkaAnimationBinding* binding; // 0A0 + hkRefVariant mirroredAnimation; // 0A8 + hkQsTransform extractedMotion; // 0B0 + hkArray echos; // 0E0 + float localTime; // 0F0 + float time; // 0F4 + float previousUserControlledTimeFraction; // 0F8 + std::int32_t bufferSize; // 0FC + std::int32_t echoBufferSize; // 100 + bool atEnd; // 104 + bool ignoreStartTime; // 105 + bool pingPongBackward; // 106 + std::uint8_t pad107[9]; // 107 }; static_assert(sizeof(hkbClipGenerator) == 0x110); } diff --git a/include/RE/H/hkbNode.h b/include/RE/H/hkbNode.h index cdd36099f..838b2aa5c 100644 --- a/include/RE/H/hkbNode.h +++ b/include/RE/H/hkbNode.h @@ -51,12 +51,12 @@ namespace RE }; // members - std::uint64_t userData; // 30 - hkStringPtr name; // 38 - std::uint16_t id; // 40 - stl::enumeration cloneState; // 42 - std::uint8_t pad43; // 43 - std::uint32_t pad44; // 44 + std::uint64_t userData; // 30 + hkStringPtr name; // 38 + std::uint16_t id; // 40 + REX::EnumSet cloneState; // 42 + std::uint8_t pad43; // 43 + std::uint32_t pad44; // 44 }; static_assert(sizeof(hkbNode) == 0x48); } diff --git a/include/RE/H/hkbRigidBodySetup.h b/include/RE/H/hkbRigidBodySetup.h index 2ee6e1ba5..d638f53ff 100644 --- a/include/RE/H/hkbRigidBodySetup.h +++ b/include/RE/H/hkbRigidBodySetup.h @@ -15,9 +15,9 @@ namespace RE }; // members - std::uint32_t collisionFilterInfo; // 00 - stl::enumeration type; // 04 - hkbShapeSetup shapeSetup; // 05 + std::uint32_t collisionFilterInfo; // 00 + REX::EnumSet type; // 04 + hkbShapeSetup shapeSetup; // 05 }; static_assert(sizeof(hkbRigidBodySetup) == 0x20); } diff --git a/include/RE/H/hkbShapeSetup.h b/include/RE/H/hkbShapeSetup.h index 6c2183258..ae766a346 100644 --- a/include/RE/H/hkbShapeSetup.h +++ b/include/RE/H/hkbShapeSetup.h @@ -13,10 +13,10 @@ namespace RE }; // members - float capsuleHeight; // 00 - float capsuleRadius; // 04 - hkStringPtr fileName; // 08 - stl::enumeration type; // 10 + float capsuleHeight; // 00 + float capsuleRadius; // 04 + hkStringPtr fileName; // 08 + REX::EnumSet type; // 10 }; static_assert(sizeof(hkbShapeSetup) == 0x18); } diff --git a/include/RE/H/hkbStateMachine.h b/include/RE/H/hkbStateMachine.h index 2d18e119f..1c3935d15 100644 --- a/include/RE/H/hkbStateMachine.h +++ b/include/RE/H/hkbStateMachine.h @@ -94,38 +94,38 @@ namespace RE void Unk_1B(void) override; // 1B - { echoNextUpdate = true; } // members - hkbEvent eventToSendWhenStateOrTransitionChanges; // 048 - hkRefPtr startStateChooser; // 060 - std::int32_t startStateID; // 068 - std::int32_t returnToPreviousStateEventID; // 06C - std::int32_t randomTransitionEventID; // 070 - std::int32_t transitionToNextHigherStateEventID; // 074 - std::int32_t transitionToNextLowerStateEventID; // 078 - std::int32_t syncVariableIndex; // 07C - std::int32_t currentStateID; // 080 - bool wrapAroundStateID; // 084 - std::int8_t maxSimultaneousTransitions; // 085 - stl::enumeration startStateMode; // 086 - stl::enumeration selfTransitionMode; // 087 - bool isActive; // 088 - std::uint8_t pad41; // 089 - std::uint16_t pad42; // 08A - std::uint32_t pad44; // 08C - hkArray states; // 090 - hkRefPtr wildcardTransitions; // 0A0 - hkRefVariant stateIDToIndexMap; // 0A8 - hkArray activeTransitions; // 0B0 - hkArray transitionFlags; // 0C0 - hkArray wildcardTransitionFlags; // 0D0 - hkArray delayedTransitions; // 0E0 - float timeInState; // 0F0 - float lastLocalTime; // 0F4 - std::int32_t previousStateID; // 0F8 - std::int32_t nextStartStateIndexOverride; // 0FC - bool stateOrTransitionChanged; // 100 - bool echoNextUpdate; // 101 - std::uint16_t currentStateIndexAndEntered; // 102 - std::uint32_t pad0BC; // 104 + hkbEvent eventToSendWhenStateOrTransitionChanges; // 048 + hkRefPtr startStateChooser; // 060 + std::int32_t startStateID; // 068 + std::int32_t returnToPreviousStateEventID; // 06C + std::int32_t randomTransitionEventID; // 070 + std::int32_t transitionToNextHigherStateEventID; // 074 + std::int32_t transitionToNextLowerStateEventID; // 078 + std::int32_t syncVariableIndex; // 07C + std::int32_t currentStateID; // 080 + bool wrapAroundStateID; // 084 + std::int8_t maxSimultaneousTransitions; // 085 + REX::EnumSet startStateMode; // 086 + REX::EnumSet selfTransitionMode; // 087 + bool isActive; // 088 + std::uint8_t pad41; // 089 + std::uint16_t pad42; // 08A + std::uint32_t pad44; // 08C + hkArray states; // 090 + hkRefPtr wildcardTransitions; // 0A0 + hkRefVariant stateIDToIndexMap; // 0A8 + hkArray activeTransitions; // 0B0 + hkArray transitionFlags; // 0C0 + hkArray wildcardTransitionFlags; // 0D0 + hkArray delayedTransitions; // 0E0 + float timeInState; // 0F0 + float lastLocalTime; // 0F4 + std::int32_t previousStateID; // 0F8 + std::int32_t nextStartStateIndexOverride; // 0FC + bool stateOrTransitionChanged; // 100 + bool echoNextUpdate; // 101 + std::uint16_t currentStateIndexAndEntered; // 102 + std::uint32_t pad0BC; // 104 }; static_assert(sizeof(hkbStateMachine) == 0x108); } diff --git a/include/RE/H/hkpAgentNnTrack.h b/include/RE/H/hkpAgentNnTrack.h index fe2b4e720..3cc73aa2b 100644 --- a/include/RE/H/hkpAgentNnTrack.h +++ b/include/RE/H/hkpAgentNnTrack.h @@ -17,11 +17,11 @@ namespace RE { public: // members - std::uint16_t bytesUsedInLastSector; // 00 - stl::enumeration nnTrackType; // 02 - std::uint8_t padding; // 03 - std::uint32_t pad04; // 04 - hkInplaceArray sectors; // 08 + std::uint16_t bytesUsedInLastSector; // 00 + REX::EnumSet nnTrackType; // 02 + std::uint8_t padding; // 03 + std::uint32_t pad04; // 04 + hkInplaceArray sectors; // 08 }; static_assert(sizeof(hkpAgentNnTrack) == 0x20); } diff --git a/include/RE/H/hkpBroadPhase.h b/include/RE/H/hkpBroadPhase.h index 399ccc5d5..a2c7e598b 100644 --- a/include/RE/H/hkpBroadPhase.h +++ b/include/RE/H/hkpBroadPhase.h @@ -105,12 +105,12 @@ namespace RE void CalcAabbCache(const hkArrayBase& a_overlappingCollidables, hkpBroadPhaseAabbCache* a_aabbCacheOut) const; // members - const stl::enumeration type; // 10 - const std::uint16_t size{ 0 }; // 12 - const stl::enumeration caps; // 14 - mutable hkMultiThreadCheck multiThreadCheck; // 18 - std::uint32_t pad24; // 24 - hkCriticalSection* criticalSection; // 28 + const REX::EnumSet type; // 10 + const std::uint16_t size{ 0 }; // 12 + const REX::EnumSet caps; // 14 + mutable hkMultiThreadCheck multiThreadCheck; // 18 + std::uint32_t pad24; // 24 + hkCriticalSection* criticalSection; // 28 }; static_assert(sizeof(hkpBroadPhase) == 0x30); } diff --git a/include/RE/H/hkpBvTreeShape.h b/include/RE/H/hkpBvTreeShape.h index 8812d9a89..eb72e9c65 100644 --- a/include/RE/H/hkpBvTreeShape.h +++ b/include/RE/H/hkpBvTreeShape.h @@ -31,10 +31,10 @@ namespace RE virtual std::uint32_t QueryAabbImpl(const hkAabb& a_aabb, hkpShapeKey* a_hits, std::int32_t a_maxNumKeys) const = 0; // 0C // members - stl::enumeration bvTreeType; // 20 - std::uint8_t pad21; // 21 - std::uint16_t pad22; // 22 - std::uint32_t pad24; // 24 + REX::EnumSet bvTreeType; // 20 + std::uint8_t pad21; // 21 + std::uint16_t pad22; // 22 + std::uint32_t pad24; // 24 }; static_assert(sizeof(hkpBvTreeShape) == 0x28); } diff --git a/include/RE/H/hkpCharacterContext.h b/include/RE/H/hkpCharacterContext.h index db4fb0b1e..7ee67bc9d 100644 --- a/include/RE/H/hkpCharacterContext.h +++ b/include/RE/H/hkpCharacterContext.h @@ -51,17 +51,17 @@ namespace RE ~hkpCharacterContext() override; // 00 - stl::enumeration characterType; // 10 - std::uint32_t pad14; // 14 - const hkpCharacterStateManager* stateManager; // 18 - hkpCharacterStateType currentState; // 20 - hkpCharacterStateType previousState; // 24 - bool filterEnable; // 28 - std::uint8_t pad29; // 29 - std::uint16_t pad2A; // 2A - float maxLinearAcceleration; // 2C - float maxLinearVelocity; // 30 - float gain; // 34 + REX::EnumSet characterType; // 10 + std::uint32_t pad14; // 14 + const hkpCharacterStateManager* stateManager; // 18 + hkpCharacterStateType currentState; // 20 + hkpCharacterStateType previousState; // 24 + bool filterEnable; // 28 + std::uint8_t pad29; // 29 + std::uint16_t pad2A; // 2A + float maxLinearAcceleration; // 2C + float maxLinearVelocity; // 30 + float gain; // 34 }; static_assert(sizeof(hkpCharacterContext) == 0x38); } diff --git a/include/RE/H/hkpCharacterControl.h b/include/RE/H/hkpCharacterControl.h index 622c9349e..c98c61779 100644 --- a/include/RE/H/hkpCharacterControl.h +++ b/include/RE/H/hkpCharacterControl.h @@ -13,16 +13,16 @@ namespace RE kSupported = 2 }; - stl::enumeration supportedState; // 00 - std::uint32_t pad04; // 04 - std::uint64_t pad08; // 08 - hkVector4 surfaceNormal; // 10 - hkVector4 surfaceVelocity; // 20 - float surfaceDistanceExcess; // 30 - bool surfaceIsDynamic; // 34 - std::uint8_t pad35; // 35 - std::uint16_t pad36; // 36 - std::uint64_t pad38; // 38 + REX::EnumSet supportedState; // 00 + std::uint32_t pad04; // 04 + std::uint64_t pad08; // 08 + hkVector4 surfaceNormal; // 10 + hkVector4 surfaceVelocity; // 20 + float surfaceDistanceExcess; // 30 + bool surfaceIsDynamic; // 34 + std::uint8_t pad35; // 35 + std::uint16_t pad36; // 36 + std::uint64_t pad38; // 38 }; static_assert(sizeof(hkpSurfaceInfo) == 0x40); } diff --git a/include/RE/H/hkpCollisionFilter.h b/include/RE/H/hkpCollisionFilter.h index b4d369861..f9a839a7e 100644 --- a/include/RE/H/hkpCollisionFilter.h +++ b/include/RE/H/hkpCollisionFilter.h @@ -42,12 +42,12 @@ namespace RE std::int32_t NumShapeKeyHitsLimitBreached(const hkpCollisionInput& a_input, const hkpCdBody& a_bodyA, const hkpCdBody& a_bodyB, const hkpBvTreeShape* a_shapeB, hkAabb& a_AABB, hkpShapeKey* a_shapeKeysInOut, std::int32_t a_shapeKeysCapacity) const override; // 02 // members - std::uint32_t pad30; // 30 - std::uint32_t pad34; // 34 - stl::enumeration type; // 38 - std::uint32_t pad3C; // 3C - std::uint32_t pad40; // 40 - std::uint32_t pad44; // 44 + std::uint32_t pad30; // 30 + std::uint32_t pad34; // 34 + REX::EnumSet type; // 38 + std::uint32_t pad3C; // 3C + std::uint32_t pad40; // 40 + std::uint32_t pad44; // 44 }; static_assert(sizeof(hkpCollisionFilter) == 0x48); } diff --git a/include/RE/H/hkpCompressedMeshShape.h b/include/RE/H/hkpCompressedMeshShape.h index 5d98fc8cd..a08e4b005 100644 --- a/include/RE/H/hkpCompressedMeshShape.h +++ b/include/RE/H/hkpCompressedMeshShape.h @@ -81,33 +81,33 @@ namespace RE void SetWeldingInfo(hkpShapeKey a_key, std::int16_t a_weldingInfo) override; // 0C // members - std::int32_t bitsPerIndex; // 030 - std::int32_t bitsPerWIndex; // 034 - std::int32_t wIndexMask; // 03C - std::int32_t indexMask; // 038 - float radius; // 040 - stl::enumeration weldingType; // 044 - stl::enumeration materialType; // 045 - std::uint16_t pad46; // 046 - hkArray materials; // 048 - hkArray materials16; // 058 - hkArray materials8; // 068 - hkArray transforms; // 078 - hkArray bigVertices; // 088 - hkArray bigTriangles; // 098 - hkArray chunks; // 0A8 - hkArray convexPieces; // 0B8 - float error; // 0C8 - std::uint32_t padCC; // 0CC - hkAabb bounds; // 0D0 - std::uint32_t defaultCollisionFilterInfo; // 0F0 - std::uint32_t padF4; // 0F4 - hkpMeshMaterial* meshMaterials; // 0F8 - std::uint16_t materialStriding; // 100 - std::uint16_t numMaterials; // 102 - std::uint32_t pad104; // 104 - hkArray namedMaterials; // 108 - std::uint64_t pad118; // 118 + std::int32_t bitsPerIndex; // 030 + std::int32_t bitsPerWIndex; // 034 + std::int32_t wIndexMask; // 03C + std::int32_t indexMask; // 038 + float radius; // 040 + REX::EnumSet weldingType; // 044 + REX::EnumSet materialType; // 045 + std::uint16_t pad46; // 046 + hkArray materials; // 048 + hkArray materials16; // 058 + hkArray materials8; // 068 + hkArray transforms; // 078 + hkArray bigVertices; // 088 + hkArray bigTriangles; // 098 + hkArray chunks; // 0A8 + hkArray convexPieces; // 0B8 + float error; // 0C8 + std::uint32_t padCC; // 0CC + hkAabb bounds; // 0D0 + std::uint32_t defaultCollisionFilterInfo; // 0F0 + std::uint32_t padF4; // 0F4 + hkpMeshMaterial* meshMaterials; // 0F8 + std::uint16_t materialStriding; // 100 + std::uint16_t numMaterials; // 102 + std::uint32_t pad104; // 104 + hkArray namedMaterials; // 108 + std::uint64_t pad118; // 118 }; static_assert(sizeof(hkpCompressedMeshShape) == 0x120); } diff --git a/include/RE/H/hkpConstraintAtom.h b/include/RE/H/hkpConstraintAtom.h index 54174c9f5..592f56ca5 100644 --- a/include/RE/H/hkpConstraintAtom.h +++ b/include/RE/H/hkpConstraintAtom.h @@ -65,7 +65,7 @@ namespace RE }; // members - stl::enumeration type; + REX::EnumSet type; }; static_assert(sizeof(hkpConstraintAtom) == 0x2); diff --git a/include/RE/H/hkpConstraintInstance.h b/include/RE/H/hkpConstraintInstance.h index 80c427d06..a4d50c849 100644 --- a/include/RE/H/hkpConstraintInstance.h +++ b/include/RE/H/hkpConstraintInstance.h @@ -47,37 +47,37 @@ namespace RE } // members - hkpConstraintOwner* owner; // 10 - hkpConstraintData* data; // 18 - hkpModifierConstraintAtom* constraintModifiers; // 20 - hkpEntity* entities[2]; // 28 - stl::enumeration priority; // 38 - bool wantRuntime; // 39 - stl::enumeration destructionRemapInfo; // 3A - hkSmallArray listeners; // 40 - hkStringPtr name; // 50 - uint64_t userData; // 58 - hkConstraintInternal* internal; // 60 - uint32_t uid; // 68 + hkpConstraintOwner* owner; // 10 + hkpConstraintData* data; // 18 + hkpModifierConstraintAtom* constraintModifiers; // 20 + hkpEntity* entities[2]; // 28 + REX::EnumSet priority; // 38 + bool wantRuntime; // 39 + REX::EnumSet destructionRemapInfo; // 3A + hkSmallArray listeners; // 40 + hkStringPtr name; // 50 + uint64_t userData; // 58 + hkConstraintInternal* internal; // 60 + uint32_t uid; // 68 }; static_assert(sizeof(hkpConstraintInstance) == 0x70); struct hkConstraintInternal { - hkpConstraintInstance* constraint; // 00 - hkpEntity* entities[2]; // 08 - hkpConstraintAtom* atoms; // 18 - uint16_t atomsSize; // 20 - uint8_t callbackRequest; // 22 - stl::enumeration priority; // 23 - uint16_t sizeOfSchemas; // 24 - uint16_t numSolverResults; // 26 - uint16_t numSolverElemTemps; // 28 - uint8_t whoIsMaster; // 2A - bool isNormalType; // 2B - hkpConstraintRuntime* runtime; // 30 - uint16_t runtimeSize; // 38 - hkObjectIndex slaveIndex; // 3A + hkpConstraintInstance* constraint; // 00 + hkpEntity* entities[2]; // 08 + hkpConstraintAtom* atoms; // 18 + uint16_t atomsSize; // 20 + uint8_t callbackRequest; // 22 + REX::EnumSet priority; // 23 + uint16_t sizeOfSchemas; // 24 + uint16_t numSolverResults; // 26 + uint16_t numSolverElemTemps; // 28 + uint8_t whoIsMaster; // 2A + bool isNormalType; // 2B + hkpConstraintRuntime* runtime; // 30 + uint16_t runtimeSize; // 38 + hkObjectIndex slaveIndex; // 3A }; static_assert(sizeof(hkConstraintInternal) == 0x40); } diff --git a/include/RE/H/hkpConstraintMotor.h b/include/RE/H/hkpConstraintMotor.h index dec9efe0a..1347ce932 100644 --- a/include/RE/H/hkpConstraintMotor.h +++ b/include/RE/H/hkpConstraintMotor.h @@ -23,7 +23,7 @@ namespace RE inline static constexpr auto VTABLE = VTABLE_hkpConstraintMotor; // members - stl::enumeration type; // 10 + REX::EnumSet type; // 10 }; static_assert(sizeof(hkpConstraintMotor) == 0x18); @@ -98,11 +98,11 @@ namespace RE using CallbackFunction = void(const hkpCallbackConstraintMotor& motor, const void* unk0, void* unk1); // members - CallbackFunction* func; // 20 - stl::enumeration callbackType; // 28 - std::uint64_t userData0; // 30 - std::uint64_t userData1; // 38 - std::uint64_t userData2; // 40 + CallbackFunction* func; // 20 + REX::EnumSet callbackType; // 28 + std::uint64_t userData0; // 30 + std::uint64_t userData1; // 38 + std::uint64_t userData2; // 40 }; static_assert(sizeof(hkpCallbackConstraintMotor) == 0x48); } \ No newline at end of file diff --git a/include/RE/H/hkpEntity.h b/include/RE/H/hkpEntity.h index 9fa30cf36..cbd00826a 100644 --- a/include/RE/H/hkpEntity.h +++ b/include/RE/H/hkpEntity.h @@ -51,11 +51,11 @@ namespace RE { public: // members - hkSpuCollisionCallbackUtil* util; // 00 - std::uint16_t capacity; // 08 - stl::enumeration eventFilter; // 0A - std::uint8_t userFilter; // 0B - std::uint32_t pad0C; // 0C + hkSpuCollisionCallbackUtil* util; // 00 + std::uint16_t capacity; // 08 + REX::EnumSet eventFilter; // 0A + std::uint8_t userFilter; // 0B + std::uint32_t pad0C; // 0C }; static_assert(sizeof(SpuCollisionCallback) == 0x10); diff --git a/include/RE/H/hkpMaterial.h b/include/RE/H/hkpMaterial.h index 0828863db..2555fdf43 100644 --- a/include/RE/H/hkpMaterial.h +++ b/include/RE/H/hkpMaterial.h @@ -21,11 +21,11 @@ namespace RE void SetResponseType(ResponseType a_type); // members - stl::enumeration responseType; // 00 - std::uint8_t pad01; // 01 - hkHalf rollingFrictionMultiplier; // 02 - float friction; // 04 - float restitution; // 08 + REX::EnumSet responseType; // 00 + std::uint8_t pad01; // 01 + hkHalf rollingFrictionMultiplier; // 02 + float friction; // 04 + float restitution; // 08 }; static_assert(sizeof(hkpMaterial) == 0xC); } diff --git a/include/RE/H/hkpMoppCode.h b/include/RE/H/hkpMoppCode.h index 96ac80586..497ffa011 100644 --- a/include/RE/H/hkpMoppCode.h +++ b/include/RE/H/hkpMoppCode.h @@ -30,13 +30,13 @@ namespace RE ~hkpMoppCode() override; // 00 // members - CodeInfo info; // 10 - hkArray data; // 20 - stl::enumeration buildType; // 30 - std::uint8_t pad31; // 31 - std::uint16_t pad32; // 32 - std::uint32_t pad34; // 34 - std::uint64_t pad38; // 38 + CodeInfo info; // 10 + hkArray data; // 20 + REX::EnumSet buildType; // 30 + std::uint8_t pad31; // 31 + std::uint16_t pad32; // 32 + std::uint32_t pad34; // 34 + std::uint64_t pad38; // 38 }; static_assert(sizeof(hkpMoppCode) == 0x40); } diff --git a/include/RE/H/hkpMotion.h b/include/RE/H/hkpMotion.h index 630f1b021..75ebd1252 100644 --- a/include/RE/H/hkpMotion.h +++ b/include/RE/H/hkpMotion.h @@ -71,22 +71,22 @@ namespace RE } // members - stl::enumeration type; // 010 - std::uint8_t deactivationIntegrateCounter; // 011 - std::uint16_t deactivationNumInactiveFrames[2]; // 012 - std::uint16_t pad016; // 016 - std::uint64_t pad018; // 018 - hkMotionState motionState; // 020 - hkVector4 inertiaAndMassInv; // 0D0 - hkVector4 linearVelocity; // 0E0 - hkVector4 angularVelocity; // 0F0 - hkVector4 deactivationRefPosition[2]; // 100 - std::uint32_t deactivationRefOrientation[2]; // 120 - hkpMaxSizeMotion* savedMotion; // 128 - std::uint16_t savedQualityTypeIndex; // 130 - std::uint16_t pad132; // 132 - hkHalf gravityFactor; // 134 - std::uint64_t pad138; // 138 + REX::EnumSet type; // 010 + std::uint8_t deactivationIntegrateCounter; // 011 + std::uint16_t deactivationNumInactiveFrames[2]; // 012 + std::uint16_t pad016; // 016 + std::uint64_t pad018; // 018 + hkMotionState motionState; // 020 + hkVector4 inertiaAndMassInv; // 0D0 + hkVector4 linearVelocity; // 0E0 + hkVector4 angularVelocity; // 0F0 + hkVector4 deactivationRefPosition[2]; // 100 + std::uint32_t deactivationRefOrientation[2]; // 120 + hkpMaxSizeMotion* savedMotion; // 128 + std::uint16_t savedQualityTypeIndex; // 130 + std::uint16_t pad132; // 132 + hkHalf gravityFactor; // 134 + std::uint64_t pad138; // 138 }; static_assert(sizeof(hkpMotion) == 0x140); } diff --git a/include/RE/H/hkpShapeCollection.h b/include/RE/H/hkpShapeCollection.h index 47d8bbd54..89f62857a 100644 --- a/include/RE/H/hkpShapeCollection.h +++ b/include/RE/H/hkpShapeCollection.h @@ -45,10 +45,10 @@ namespace RE virtual void SetWeldingInfo(hkpShapeKey a_key, std::int16_t a_weldingInfo); // 0C - { return; } // members - bool disableWelding; // 28 - stl::enumeration collectionType; // 29 - std::uint16_t pad2A; // 2A - std::uint32_t pad2C; // 2C + bool disableWelding; // 28 + REX::EnumSet collectionType; // 29 + std::uint16_t pad2A; // 2A + std::uint32_t pad2C; // 2C }; static_assert(sizeof(hkpShapeCollection) == 0x30); } diff --git a/include/RE/H/hkpWorld.h b/include/RE/H/hkpWorld.h index 34b0d4545..d461ffdd8 100644 --- a/include/RE/H/hkpWorld.h +++ b/include/RE/H/hkpWorld.h @@ -91,116 +91,116 @@ namespace RE } // members - hkpSimulation* simulation; // 010 - std::uint64_t pad018; // 018 - hkVector4 gravity; // 020 - hkpSimulationIsland* fixedIsland; // 030 - hkpRigidBody* fixedRigidBody; // 038 - hkArray activeSimulationIslands; // 040 - hkArray inactiveSimulationIslands; // 050 - hkArray dirtySimulationIslands; // 060 - hkpWorldMaintenanceMgr* maintenanceMgr; // 070 - hkRefPtr memoryWatchDog; // 078 - bool assertOnRunningOutOfSolverMemory; // 080 - std::uint8_t pad081; // 081 - std::uint16_t pad082; // 082 - std::uint32_t pad084; // 084 - hkpBroadPhase* broadPhase; // 088 - hkpTreeWorldManager* kdTreeManager; // 090 - bool autoUpdateTree; // 098 - std::uint8_t pad099; // 099 - std::uint16_t pad09A; // 09A - std::uint32_t pad09C; // 09C - hkpTypedBroadPhaseDispatcher* broadPhaseDispatcher; // 0A0 - hkpPhantomBroadPhaseListener* phantomBroadPhaseListener; // 0A8 - hkpEntityEntityBroadPhaseListener* entityEntityBroadPhaseListener; // 0B0 - hkpBroadPhaseBorderListener* broadPhaseBorderListener; // 0B8 - hkpMtThreadStructure* multithreadedSimulationJobData; // 0C0 - hkpProcessCollisionInput* collisionInput; // 0C8 - hkpCollisionFilter* collisionFilter; // 0D0 - hkpCollisionDispatcher* collisionDispatcher; // 0D8 - hkpConvexListFilter* convexListFilter; // 0E0 - hkpWorldOperationQueue* pendingOperations; // 0E8 - std::int32_t pendingOperationsCount; // 0F0 - std::int32_t pendingBodyOperationsCount; // 0F4 - std::int32_t criticalOperationsLockCount; // 0F8 - std::int32_t criticalOperationsLockCountForPhantoms; // 0FC - bool blockExecutingPendingOperations; // 100 - bool criticalOperationsAllowed; // 101 - std::uint16_t pad102; // 102 - std::uint32_t pad104; // 104 - hkpDebugInfoOnPendingOperationQueues* pendingOperationQueues; // 108 - std::int32_t pendingOperationQueueCount; // 110 - mutable hkMultiThreadCheck multiThreadCheck; // 114 - bool processActionsInSingleThread; // 120 - bool allowIntegrationOfIslandsWithoutConstraintsInASeparateJob; // 121 - std::uint16_t pad122; // 122 - std::uint32_t minDesiredIslandSize; // 124 - hkCriticalSection* modifyConstraintCriticalSection; // 128 - std::int32_t isLocked; // 130 - std::uint32_t pad134; // 134 - hkCriticalSection* islandDirtyListCriticalSection; // 138 - hkCriticalSection* propertyMasterLock; // 140 - bool wantSimulationIslands; // 148 - bool useHybridBroadphase; // 149 - std::uint16_t pad14A; // 14A - float snapCollisionToConvexEdgeThreshold; // 14C - float snapCollisionToConcaveEdgeThreshold; // 150 - bool enableToiWeldRejection; // 154 - bool wantDeactivation; // 155 - bool shouldActivateOnRigidBodyTransformChange; // 156 - std::uint8_t pad153; // 157 - float deactivationReferenceDistance; // 158 - float toiCollisionResponseRotateNormal; // 15C - std::int32_t maxSectorsPerMidphaseCollideTask; // 160 - std::int32_t maxSectorsPerNarrowphaseCollideTask; // 164 - bool processToisMultithreaded; // 168 - std::uint8_t pad169; // 169 - std::uint16_t pad16A; // 16A - std::int32_t maxEntriesPerToiMidphaseCollideTask; // 16C - std::int32_t maxEntriesPerToiNarrowphaseCollideTask; // 170 - std::int32_t maxNumToiCollisionPairsSinglethreaded; // 174 - stl::enumeration simulationType; // 178 - std::uint8_t pad179; // 179 - std::uint16_t pad17A; // 17A - float numToisTillAllowedPenetrationSimplifiedToi; // 17C - float numToisTillAllowedPenetrationToi; // 180 - float numToisTillAllowedPenetrationToiHigher; // 184 - float numToisTillAllowedPenetrationToiForced; // 188 - std::uint32_t lastEntityUID; // 18C - std::uint32_t lastIslandUID; // 190 - std::uint32_t lastConstraintUID; // 194 - hkArray phantoms; // 198 - hkArray actionListeners; // 1A8 - hkArray entityListeners; // 1B8 - hkArray phantomListeners; // 1C8 - hkArray constraintListeners; // 1D8 - hkArray worldDeletionListeners; // 1E8 - hkArray islandActivationListeners; // 1F8 - hkArray worldPostSimulationListeners; // 208 - hkArray worldPostIntegrateListeners; // 218 - hkArray worldPostCollideListeners; // 228 - hkArray islandPostIntegrateListeners; // 238 - hkArray islandPostCollideListeners; // 248 - hkArray contactListeners; // 258 - hkArray contactImpulseLimitBreachedListeners; // 268 - hkArray worldExtensions; // 278 - hkpViolatedConstraintArray* violatedConstraintArray; // 288 - hkpBroadPhaseBorder* broadPhaseBorder; // 290 - hkdWorld* destructionWorld; // 298 - hknpWorld* npWorld; // 2A0 - std::uint64_t pad2A8; // 2A8 - hkpWorldDynamicsStepInfo dynamicsStepInfo; // 2B0 - hkVector4 broadPhaseExtents[2]; // 3F0 - std::int32_t broadPhaseNumMarkers; // 410 - std::int32_t sizeOfToiEventQueue; // 414 - std::int32_t broadPhaseQuerySize; // 418 - std::int32_t broadPhaseUpdateSize; // 41C - stl::enumeration contactPointGeneration; // 420 - std::uint8_t pad421; // 421 - std::uint16_t pad422; // 422 - std::uint32_t pad424; // 424 - std::uint64_t pad428; // 428 + hkpSimulation* simulation; // 010 + std::uint64_t pad018; // 018 + hkVector4 gravity; // 020 + hkpSimulationIsland* fixedIsland; // 030 + hkpRigidBody* fixedRigidBody; // 038 + hkArray activeSimulationIslands; // 040 + hkArray inactiveSimulationIslands; // 050 + hkArray dirtySimulationIslands; // 060 + hkpWorldMaintenanceMgr* maintenanceMgr; // 070 + hkRefPtr memoryWatchDog; // 078 + bool assertOnRunningOutOfSolverMemory; // 080 + std::uint8_t pad081; // 081 + std::uint16_t pad082; // 082 + std::uint32_t pad084; // 084 + hkpBroadPhase* broadPhase; // 088 + hkpTreeWorldManager* kdTreeManager; // 090 + bool autoUpdateTree; // 098 + std::uint8_t pad099; // 099 + std::uint16_t pad09A; // 09A + std::uint32_t pad09C; // 09C + hkpTypedBroadPhaseDispatcher* broadPhaseDispatcher; // 0A0 + hkpPhantomBroadPhaseListener* phantomBroadPhaseListener; // 0A8 + hkpEntityEntityBroadPhaseListener* entityEntityBroadPhaseListener; // 0B0 + hkpBroadPhaseBorderListener* broadPhaseBorderListener; // 0B8 + hkpMtThreadStructure* multithreadedSimulationJobData; // 0C0 + hkpProcessCollisionInput* collisionInput; // 0C8 + hkpCollisionFilter* collisionFilter; // 0D0 + hkpCollisionDispatcher* collisionDispatcher; // 0D8 + hkpConvexListFilter* convexListFilter; // 0E0 + hkpWorldOperationQueue* pendingOperations; // 0E8 + std::int32_t pendingOperationsCount; // 0F0 + std::int32_t pendingBodyOperationsCount; // 0F4 + std::int32_t criticalOperationsLockCount; // 0F8 + std::int32_t criticalOperationsLockCountForPhantoms; // 0FC + bool blockExecutingPendingOperations; // 100 + bool criticalOperationsAllowed; // 101 + std::uint16_t pad102; // 102 + std::uint32_t pad104; // 104 + hkpDebugInfoOnPendingOperationQueues* pendingOperationQueues; // 108 + std::int32_t pendingOperationQueueCount; // 110 + mutable hkMultiThreadCheck multiThreadCheck; // 114 + bool processActionsInSingleThread; // 120 + bool allowIntegrationOfIslandsWithoutConstraintsInASeparateJob; // 121 + std::uint16_t pad122; // 122 + std::uint32_t minDesiredIslandSize; // 124 + hkCriticalSection* modifyConstraintCriticalSection; // 128 + std::int32_t isLocked; // 130 + std::uint32_t pad134; // 134 + hkCriticalSection* islandDirtyListCriticalSection; // 138 + hkCriticalSection* propertyMasterLock; // 140 + bool wantSimulationIslands; // 148 + bool useHybridBroadphase; // 149 + std::uint16_t pad14A; // 14A + float snapCollisionToConvexEdgeThreshold; // 14C + float snapCollisionToConcaveEdgeThreshold; // 150 + bool enableToiWeldRejection; // 154 + bool wantDeactivation; // 155 + bool shouldActivateOnRigidBodyTransformChange; // 156 + std::uint8_t pad153; // 157 + float deactivationReferenceDistance; // 158 + float toiCollisionResponseRotateNormal; // 15C + std::int32_t maxSectorsPerMidphaseCollideTask; // 160 + std::int32_t maxSectorsPerNarrowphaseCollideTask; // 164 + bool processToisMultithreaded; // 168 + std::uint8_t pad169; // 169 + std::uint16_t pad16A; // 16A + std::int32_t maxEntriesPerToiMidphaseCollideTask; // 16C + std::int32_t maxEntriesPerToiNarrowphaseCollideTask; // 170 + std::int32_t maxNumToiCollisionPairsSinglethreaded; // 174 + REX::EnumSet simulationType; // 178 + std::uint8_t pad179; // 179 + std::uint16_t pad17A; // 17A + float numToisTillAllowedPenetrationSimplifiedToi; // 17C + float numToisTillAllowedPenetrationToi; // 180 + float numToisTillAllowedPenetrationToiHigher; // 184 + float numToisTillAllowedPenetrationToiForced; // 188 + std::uint32_t lastEntityUID; // 18C + std::uint32_t lastIslandUID; // 190 + std::uint32_t lastConstraintUID; // 194 + hkArray phantoms; // 198 + hkArray actionListeners; // 1A8 + hkArray entityListeners; // 1B8 + hkArray phantomListeners; // 1C8 + hkArray constraintListeners; // 1D8 + hkArray worldDeletionListeners; // 1E8 + hkArray islandActivationListeners; // 1F8 + hkArray worldPostSimulationListeners; // 208 + hkArray worldPostIntegrateListeners; // 218 + hkArray worldPostCollideListeners; // 228 + hkArray islandPostIntegrateListeners; // 238 + hkArray islandPostCollideListeners; // 248 + hkArray contactListeners; // 258 + hkArray contactImpulseLimitBreachedListeners; // 268 + hkArray worldExtensions; // 278 + hkpViolatedConstraintArray* violatedConstraintArray; // 288 + hkpBroadPhaseBorder* broadPhaseBorder; // 290 + hkdWorld* destructionWorld; // 298 + hknpWorld* npWorld; // 2A0 + std::uint64_t pad2A8; // 2A8 + hkpWorldDynamicsStepInfo dynamicsStepInfo; // 2B0 + hkVector4 broadPhaseExtents[2]; // 3F0 + std::int32_t broadPhaseNumMarkers; // 410 + std::int32_t sizeOfToiEventQueue; // 414 + std::int32_t broadPhaseQuerySize; // 418 + std::int32_t broadPhaseUpdateSize; // 41C + REX::EnumSet contactPointGeneration; // 420 + std::uint8_t pad421; // 421 + std::uint16_t pad422; // 422 + std::uint32_t pad424; // 424 + std::uint64_t pad428; // 428 }; static_assert(sizeof(hkpWorld) == 0x430); } diff --git a/include/RE/H/hkpWorldCinfo.h b/include/RE/H/hkpWorldCinfo.h index a08a32e36..a306a82cc 100644 --- a/include/RE/H/hkpWorldCinfo.h +++ b/include/RE/H/hkpWorldCinfo.h @@ -65,76 +65,76 @@ namespace RE ~hkpWorldCinfo() override; // 00 // members - hkVector4 gravity; // 010 - std::int32_t broadPhaseQuerySize; // 020 - float contactRestingVelocity; // 024 - stl::enumeration broadPhaseBorderBehaviour; // 028 - bool mtPostponeAndSortBroadPhaseBorderCallbacks; // 029 - std::uint16_t pad02A; // 02A - std::uint32_t pad02C; // 02C - hkAabb broadPhaseWorldAabb; // 030 - bool useKdTree; // 050 - bool useMultipleTree; // 051 - stl::enumeration treeUpdateType; // 052 - bool autoUpdateKdTree; // 053 - float collisionTolerance; // 054 - hkRefPtr collisionFilter; // 058 - hkRefPtr convexListFilter; // 060 - float expectedMaxLinearVelocity; // 064 - std::int32_t sizeOfToiEventQueue; // 068 - float expectedMinPsiDeltaTime; // 06C - hkRefPtr memoryWatchDog; // 070 - std::int32_t broadPhaseNumMarkers; // 080 - stl::enumeration contactPointGeneration; // 084 - bool allowToSkipConfirmedCallbacks; // 085 - bool useHybridBroadphase; // 086 - std::uint8_t pad087; // 087 - float solverTau; // 088 - float solverDamp; // 08C - std::int32_t solverIterations; // 090 - std::int32_t solverMicrosteps; // 094 - float maxConstraintViolation; // 098 - bool forceCoherentConstraintOrderingInSolver; // 09C - std::uint8_t pad09D; // 09D - std::uint16_t pad09E; // 09E - float snapCollisionToConvexEdgeThreshold; // 0A0 - float snapCollisionToConcaveEdgeThreshold; // 0A4 - bool enableToiWeldRejection; // 0A8 - bool enableDeprecatedWelding; // 0A9 - std::uint16_t pad0AA; // 0AA - float iterativeLinearCastEarlyOutDistance; // 0AC - std::int32_t iterativeLinearCastMaxIterations; // 0B0 - std::uint8_t deactivationNumInactiveFramesSelectFlag0; // 0B4 - std::uint8_t deactivationNumInactiveFramesSelectFlag1; // 0B5 - std::uint8_t deactivationIntegrateCounter; // 0B6 - bool shouldActivateOnRigidBodyTransformChange; // 0B7 - float deactivationReferenceDistance; // 0B8 - float toiCollisionResponseRotateNormal; // 0BC - std::int32_t maxSectorsPerMidphaseCollideTask; // 0C0 - std::int32_t maxSectorsPerNarrowphaseCollideTask; // 0C4 - bool processToisMultithreaded; // 0C8 - std::uint8_t pad0C9; // 0C9 - std::uint16_t pad0CA; // 0CA - std::int32_t maxEntriesPerToiMidphaseCollideTask; // 0CC - std::int32_t maxEntriesPerToiNarrowphaseCollideTask; // 0D0 - std::int32_t maxNumToiCollisionPairsSinglethreaded; // 0D4 - float numToisTillAllowedPenetrationSimplifiedToi; // 0D8 - float numToisTillAllowedPenetrationToi; // 0DC - float numToisTillAllowedPenetrationToiHigher; // 0E0 - float numToisTillAllowedPenetrationToiForced; // 0E4 - bool enableDeactivation; // 0E8 - stl::enumeration simulationType; // 0E9 - bool enableSimulationIslands; // 0EA - std::uint8_t pad0EB; // 0EB - std::uint32_t minDesiredIslandSize; // 0EC - bool processActionsInSingleThread; // 0F0 - bool allowIntegrationOfIslandsWithoutConstraintsInASeparateJob; // 0F1 - std::uint16_t pad0F2; // 0F2 - float frameMarkerPsiSnap; // 0F4 - bool fireCollisionCallbacks; // 0F8 - std::uint8_t pad0F9; // 0F9 - std::uint16_t pad0FA; // 0FA - std::uint32_t pad0FC; // 0FC + hkVector4 gravity; // 010 + std::int32_t broadPhaseQuerySize; // 020 + float contactRestingVelocity; // 024 + REX::EnumSet broadPhaseBorderBehaviour; // 028 + bool mtPostponeAndSortBroadPhaseBorderCallbacks; // 029 + std::uint16_t pad02A; // 02A + std::uint32_t pad02C; // 02C + hkAabb broadPhaseWorldAabb; // 030 + bool useKdTree; // 050 + bool useMultipleTree; // 051 + REX::EnumSet treeUpdateType; // 052 + bool autoUpdateKdTree; // 053 + float collisionTolerance; // 054 + hkRefPtr collisionFilter; // 058 + hkRefPtr convexListFilter; // 060 + float expectedMaxLinearVelocity; // 064 + std::int32_t sizeOfToiEventQueue; // 068 + float expectedMinPsiDeltaTime; // 06C + hkRefPtr memoryWatchDog; // 070 + std::int32_t broadPhaseNumMarkers; // 080 + REX::EnumSet contactPointGeneration; // 084 + bool allowToSkipConfirmedCallbacks; // 085 + bool useHybridBroadphase; // 086 + std::uint8_t pad087; // 087 + float solverTau; // 088 + float solverDamp; // 08C + std::int32_t solverIterations; // 090 + std::int32_t solverMicrosteps; // 094 + float maxConstraintViolation; // 098 + bool forceCoherentConstraintOrderingInSolver; // 09C + std::uint8_t pad09D; // 09D + std::uint16_t pad09E; // 09E + float snapCollisionToConvexEdgeThreshold; // 0A0 + float snapCollisionToConcaveEdgeThreshold; // 0A4 + bool enableToiWeldRejection; // 0A8 + bool enableDeprecatedWelding; // 0A9 + std::uint16_t pad0AA; // 0AA + float iterativeLinearCastEarlyOutDistance; // 0AC + std::int32_t iterativeLinearCastMaxIterations; // 0B0 + std::uint8_t deactivationNumInactiveFramesSelectFlag0; // 0B4 + std::uint8_t deactivationNumInactiveFramesSelectFlag1; // 0B5 + std::uint8_t deactivationIntegrateCounter; // 0B6 + bool shouldActivateOnRigidBodyTransformChange; // 0B7 + float deactivationReferenceDistance; // 0B8 + float toiCollisionResponseRotateNormal; // 0BC + std::int32_t maxSectorsPerMidphaseCollideTask; // 0C0 + std::int32_t maxSectorsPerNarrowphaseCollideTask; // 0C4 + bool processToisMultithreaded; // 0C8 + std::uint8_t pad0C9; // 0C9 + std::uint16_t pad0CA; // 0CA + std::int32_t maxEntriesPerToiMidphaseCollideTask; // 0CC + std::int32_t maxEntriesPerToiNarrowphaseCollideTask; // 0D0 + std::int32_t maxNumToiCollisionPairsSinglethreaded; // 0D4 + float numToisTillAllowedPenetrationSimplifiedToi; // 0D8 + float numToisTillAllowedPenetrationToi; // 0DC + float numToisTillAllowedPenetrationToiHigher; // 0E0 + float numToisTillAllowedPenetrationToiForced; // 0E4 + bool enableDeactivation; // 0E8 + REX::EnumSet simulationType; // 0E9 + bool enableSimulationIslands; // 0EA + std::uint8_t pad0EB; // 0EB + std::uint32_t minDesiredIslandSize; // 0EC + bool processActionsInSingleThread; // 0F0 + bool allowIntegrationOfIslandsWithoutConstraintsInASeparateJob; // 0F1 + std::uint16_t pad0F2; // 0F2 + float frameMarkerPsiSnap; // 0F4 + bool fireCollisionCallbacks; // 0F8 + std::uint8_t pad0F9; // 0F9 + std::uint16_t pad0FA; // 0FA + std::uint32_t pad0FC; // 0FC }; static_assert(sizeof(hkpWorldCinfo) == 0x100); } diff --git a/include/RE/I/IMenu.h b/include/RE/I/IMenu.h index 6a32350e6..0cf395e5a 100644 --- a/include/RE/I/IMenu.h +++ b/include/RE/I/IMenu.h @@ -104,14 +104,14 @@ namespace RE [[nodiscard]] constexpr bool UsesMovementToDirection() const noexcept { return menuFlags.all(Flag::kUsesMovementToDirection); } // members - GPtr uiMovie{ nullptr }; // 10 - std::int8_t depthPriority{ 3 }; // 18 - std::uint8_t pad19{ 0 }; // 19 - std::uint16_t pad20{ 0 }; // 1A - stl::enumeration menuFlags{ Flag::kNone }; // 1C - stl::enumeration inputContext{ Context::kNone }; // 20 - std::uint32_t pad24{ 0 }; // 24 - GPtr fxDelegate{ nullptr }; // 28 + GPtr uiMovie{ nullptr }; // 10 + std::int8_t depthPriority{ 3 }; // 18 + std::uint8_t pad19{ 0 }; // 19 + std::uint16_t pad20{ 0 }; // 1A + REX::EnumSet menuFlags{ Flag::kNone }; // 1C + REX::EnumSet inputContext{ Context::kNone }; // 20 + std::uint32_t pad24{ 0 }; // 24 + GPtr fxDelegate{ nullptr }; // 28 }; static_assert(sizeof(IMenu) == 0x30); } diff --git a/include/RE/I/IVMSaveLoadInterface.h b/include/RE/I/IVMSaveLoadInterface.h index d60ec015b..706222d61 100644 --- a/include/RE/I/IVMSaveLoadInterface.h +++ b/include/RE/I/IVMSaveLoadInterface.h @@ -27,9 +27,9 @@ namespace RE static_assert(sizeof(StringEntry) == 0x10); // members - void* unk00; // 00 - BSScrapArray* entries; // 08 - stl::enumeration indexSize; // 10 + void* unk00; // 00 + BSScrapArray* entries; // 08 + REX::EnumSet indexSize; // 10 }; static_assert(sizeof(ReadableStringTable) == 0x18); @@ -37,9 +37,9 @@ namespace RE { public: // members - void* unk00; // 00 - BSTScrapHashMap* referenceMap; // 08 - stl::enumeration indexSize; // 10 + void* unk00; // 00 + BSTScrapHashMap* referenceMap; // 08 + REX::EnumSet indexSize; // 10 }; static_assert(sizeof(WritableStringTable) == 0x18); diff --git a/include/RE/I/IVirtualMachine.h b/include/RE/I/IVirtualMachine.h index 6ce3e7463..0c68c145c 100644 --- a/include/RE/I/IVirtualMachine.h +++ b/include/RE/I/IVirtualMachine.h @@ -123,7 +123,7 @@ namespace RE void RegisterLatentFunction(std::string_view a_fnName, std::string_view a_className, F a_callback, bool a_callableFromTasklets = false); template - requires is_return_convertible_v + requires is_return_convertible_v void ReturnLatentResult(VMStackID a_stackID, V result); void SetCallableFromTasklets(const char* a_className, const char* a_stateName, const char* a_fnName, bool a_callable); diff --git a/include/RE/I/ImageSpaceData.h b/include/RE/I/ImageSpaceData.h index 63b2f8364..c6587862e 100644 --- a/include/RE/I/ImageSpaceData.h +++ b/include/RE/I/ImageSpaceData.h @@ -73,11 +73,11 @@ namespace RE }; // members - float strength; // 00 - float distance; // 04 - float range; // 08 - std::uint16_t flags; // 0C - stl::enumeration skyBlurRadius; // 0E + float strength; // 00 + float distance; // 04 + float range; // 08 + std::uint16_t flags; // 0C + REX::EnumSet skyBlurRadius; // 0E }; static_assert(sizeof(DepthOfField) == 0x10); diff --git a/include/RE/I/IngredientItem.h b/include/RE/I/IngredientItem.h index 3884ff2b4..cb88d1fac 100644 --- a/include/RE/I/IngredientItem.h +++ b/include/RE/I/IngredientItem.h @@ -57,8 +57,8 @@ namespace RE { public: // members - std::int32_t costOverride; // 00 - stl::enumeration flags; // 04 + std::int32_t costOverride; // 00 + REX::EnumSet flags; // 04 }; static_assert(sizeof(Data) == 0x8); diff --git a/include/RE/I/InputEvent.h b/include/RE/I/InputEvent.h index 15ab5b758..042b8a0bd 100644 --- a/include/RE/I/InputEvent.h +++ b/include/RE/I/InputEvent.h @@ -51,9 +51,9 @@ namespace RE [[nodiscard]] const ThumbstickEvent* AsThumbstickEvent() const; // members - stl::enumeration device; // 08 - stl::enumeration eventType; // 0C - InputEvent* next; // 10 + REX::EnumSet device; // 08 + REX::EnumSet eventType; // 0C + InputEvent* next; // 10 }; static_assert(sizeof(InputEvent) == 0x18); } diff --git a/include/RE/I/InteriorData.h b/include/RE/I/InteriorData.h index 2121d0dd2..cd1688a1f 100644 --- a/include/RE/I/InteriorData.h +++ b/include/RE/I/InteriorData.h @@ -24,23 +24,23 @@ namespace RE }; // members - Color ambient; // 00 - Color directional; // 04 - Color fogColorNear; // 08 - float fogNear; // 0C - float fogFar; // 10 - std::uint32_t directionalXY; // 14 - std::uint32_t directionalZ; // 18 - float directionalFade; // 1C - float clipDist; // 20 - float fogPower; // 24 - BGSDirectionalAmbientLightingColors directionalAmbientLightingColors; // 28 - Color fogColorFar; // 48 - float fogClamp; // 4C - float lightFadeStart; // 50 - float lightFadeEnd; // 54 - stl::enumeration lightingTemplateInheritanceFlags; // 58 - std::uint32_t unk5C; // 5C - interiorOffset? + Color ambient; // 00 + Color directional; // 04 + Color fogColorNear; // 08 + float fogNear; // 0C + float fogFar; // 10 + std::uint32_t directionalXY; // 14 + std::uint32_t directionalZ; // 18 + float directionalFade; // 1C + float clipDist; // 20 + float fogPower; // 24 + BGSDirectionalAmbientLightingColors directionalAmbientLightingColors; // 28 + Color fogColorFar; // 48 + float fogClamp; // 4C + float lightFadeStart; // 50 + float lightFadeEnd; // 54 + REX::EnumSet lightingTemplateInheritanceFlags; // 58 + std::uint32_t unk5C; // 5C - interiorOffset? }; static_assert(sizeof(INTERIOR_DATA) == 0x60); } diff --git a/include/RE/M/MagicCaster.h b/include/RE/M/MagicCaster.h index ced662437..41de60ddf 100644 --- a/include/RE/M/MagicCaster.h +++ b/include/RE/M/MagicCaster.h @@ -84,16 +84,16 @@ namespace RE void UpdateImpl(float a_delta); // members - BSTArray sounds; // 08 - ObjectRefHandle desiredTarget; // 20 - std::uint32_t pad24; // 24 - MagicItem* currentSpell; // 28 - stl::enumeration state; // 30 - float castingTimer; // 34 - float currentSpellCost; // 38 - float magnitudeOverride; // 3C - float nextTargetUpdate; // 40 - float projectileTimer; // 44 + BSTArray sounds; // 08 + ObjectRefHandle desiredTarget; // 20 + std::uint32_t pad24; // 24 + MagicItem* currentSpell; // 28 + REX::EnumSet state; // 30 + float castingTimer; // 34 + float currentSpellCost; // 38 + float magnitudeOverride; // 3C + float nextTargetUpdate; // 40 + float projectileTimer; // 44 }; static_assert(sizeof(MagicCaster) == 0x48); } diff --git a/include/RE/M/MagicItemDataCollector.h b/include/RE/M/MagicItemDataCollector.h index 9f429999f..80702ac22 100644 --- a/include/RE/M/MagicItemDataCollector.h +++ b/include/RE/M/MagicItemDataCollector.h @@ -30,17 +30,17 @@ namespace RE BSContainer::ForEachResult operator()(Effect* a_effect) override; // members - BSTArray projectileEffectList; // 10 - Effect* costliestEffect; // 28 - std::int32_t maxCost; // 30 - std::uint32_t pad34; // 34 - Effect* largestAreaEffect; // 38 - float highestArea; // 40 - stl::enumeration flags; // 44 - bool summonsExtraLargeCreature; // 48 - std::uint8_t pad49; // 49 - std::uint16_t pad4A; // 4A - std::uint32_t pad4C; // 4C + BSTArray projectileEffectList; // 10 + Effect* costliestEffect; // 28 + std::int32_t maxCost; // 30 + std::uint32_t pad34; // 34 + Effect* largestAreaEffect; // 38 + float highestArea; // 40 + REX::EnumSet flags; // 44 + bool summonsExtraLargeCreature; // 48 + std::uint8_t pad49; // 49 + std::uint16_t pad4A; // 4A + std::uint32_t pad4C; // 4C }; static_assert(sizeof(MagicItemDataCollector) == 0x50); } diff --git a/include/RE/M/MenuModeChangeEvent.h b/include/RE/M/MenuModeChangeEvent.h index f824758bf..928b246d0 100644 --- a/include/RE/M/MenuModeChangeEvent.h +++ b/include/RE/M/MenuModeChangeEvent.h @@ -14,7 +14,7 @@ namespace RE kDisplayed = 1 }; - BSFixedString menu; // 00 - stl::enumeration mode; // 08 + BSFixedString menu; // 00 + REX::EnumSet mode; // 08 }; } diff --git a/include/RE/M/MiddleHighProcessData.h b/include/RE/M/MiddleHighProcessData.h index 91d18cff8..aa90e187e 100644 --- a/include/RE/M/MiddleHighProcessData.h +++ b/include/RE/M/MiddleHighProcessData.h @@ -132,129 +132,129 @@ namespace RE struct MiddleHighProcessData { public: - BSTEventSource unk000; // 000 - ActorPackage runOncePackage; // 058 - BSTArray deadDetectList; // 088 - BSSimpleList refListChairBed; // 0A0 - NiPoint3 rotation; // 0B0 - NiPoint3 rotationSpeed; // 0BC - NiPoint3 actorMountPosition; // 0C8 - NiPoint3 furniturePathPoint; // 0D4 - NiPoint3 lastSeenPosition; // 0E0 - std::uint32_t bleedoutAttacker; // 0EC - MagicSystem::WardState wardState; // 0F0 - std::uint32_t pad0F4; // 0F4 - BSTSmartPointer animResponse; // 0F8 - BSTArray commandedActors; // 100 - NiNode* damageRootNode[6]; // 118 - NiAVObject* unk148; // 148 - NiNode* weaponBone; // 150 - NiAVObject* headNode; // 158 - NiAVObject* torsoNode; // 160 - NiAVObject* faceTargetSourceNode; // 168 - BSFaceGenNiNode* faceNodeSkinned; // 170 - NiPointer lightingProperty; // 178 - std::uint64_t unk180; // 180 - QueuedItem* itemstoEquipUnequip; // 188 - HitData* lastHitData; // 190 - DeferredHideLimb* headDeferredHideLimb; // 198 - BSSimpleList* activeEffects; // 1A0 - BSTSmartPointer animationGraphManager; // 1A8 - BSAnimationGraphVariableCache* animationVariableCache; // 1B0 - BSTArray unk1B8; // 1B8 - BSTArray unk1D0; // 1D0 - mutable BSSpinLock unk1E8; // 1E8 - void* unk1F0; // 1F0 - smart ptr - std::uint16_t unk1F8; // 1F8 - std::uint16_t unk1FA; // 1FA - std::uint32_t unk1FC; // 1FC - std::uint32_t unk200; // 200 - float headHeightOffset; // 204 - ObjectRefHandle occupiedFurniture; // 208 - std::uint32_t unk20C; // 20C - TESIdleForm* unk210; // 210 - ActorHandle commandingActor; // 218 - std::uint32_t pad21C; // 21C - InventoryEntryData* leftHand; // 220 - TESIdleForm* furnitureIdle; // 228 - void* unk230; // 230 - smart ptr - BSFaceGenAnimationData* faceAnimationData; // 238 - MagicItem* currentPackageSpell; // 240 - std::uint64_t unk248; // 248 - NiPointer charController; // 250 - BSTSmartPointer penetrationDetectUtil; // 258 - InventoryEntryData* rightHand; // 260 - InventoryEntryData* bothHands; // 268 - NiPointer bodyPartPreload; // 270 - NiPointer unk278; // 278 - TESIdleForm* lastIdlePlayed; // 280 - AIPerkData* perkData; // 288 - std::uint32_t unk290; // 290 - std::uint32_t currentFurnitureSubgraphID; // 294 - float unk298; // 298 - float unk29C; // 29C - float unk2A0; // 2A0 - float unk2A4; // 2A4 - float currentMovementSpeed; // 2A8 - float unk2AC; // 2AC - float unk2B0; // 2B0 - float bleedoutRate; // 2B4 - float unk2B8; // 2B8 - float maximumWardPower; // 2BC - float unk2C0; // 2C0 - float torchEvaluationTimer; // 2C4 - float alphaMult; // 2C8 - float scriptRefractPower; // 2CC - float unk2D0; // 2D0 - float deferredKillTimer; // 2D4 - float killMoveTimer; // 2D8 - float unk2DC; // 2DC - std::uint32_t unk2E0; // 2E0 - std::uint32_t unk2E4; // 2E4 - std::uint32_t currentFurnitureMarkerID; // 2E8 - std::uint32_t unk2EC; // 2EC - std::uint64_t unk2F0; // 2F0 - std::uint32_t unk2F8; // 2F8 - std::uint32_t unk2FC; // 2FC - std::uint32_t unk300; // 300 - std::uint16_t unk304; // 304 - std::uint16_t unk306; // 306 - std::uint64_t unk308; // 308 - std::uint8_t unk310; // 310 - stl::enumeration update3DModel; // 311 - std::uint16_t unk312; // 312 - std::uint16_t unk314; // 314 - bool unk316; // 316 - bool unk317; // 317 - bool unk318; // 318 - bool unk319; // 319 - bool unk31A; // 31A - bool pickPocketed; // 31B - bool summonedCreature; // 31C - bool forceNextUpdate; // 31D - bool unk31E; // 31E - bool unk31F; // 31F - bool unk320; // 320 - bool unk321; // 321 - bool beenAttacked; // 322 - bool alwaysHit; // 323 - bool doNoDamage; // 324 - bool soulTrapped; // 325 - bool unk326; // 326 - bool unk327; // 327 - bool unk328; // 328 - bool preventCombat; // 329 - bool unk32A; // 32A - bool isFleeing; // 32B - bool unk32C; // 32C - bool hostileGuard; // 32D - bool unk32E; // 32E - bool unk32F; // 32F - bool unk330; // 330 - bool killQueued; // 331 - bool inDeferredKill; // 332 - bool pad333; // 333 - std::uint32_t pad334; // 334 + BSTEventSource unk000; // 000 + ActorPackage runOncePackage; // 058 + BSTArray deadDetectList; // 088 + BSSimpleList refListChairBed; // 0A0 + NiPoint3 rotation; // 0B0 + NiPoint3 rotationSpeed; // 0BC + NiPoint3 actorMountPosition; // 0C8 + NiPoint3 furniturePathPoint; // 0D4 + NiPoint3 lastSeenPosition; // 0E0 + std::uint32_t bleedoutAttacker; // 0EC + MagicSystem::WardState wardState; // 0F0 + std::uint32_t pad0F4; // 0F4 + BSTSmartPointer animResponse; // 0F8 + BSTArray commandedActors; // 100 + NiNode* damageRootNode[6]; // 118 + NiAVObject* unk148; // 148 + NiNode* weaponBone; // 150 + NiAVObject* headNode; // 158 + NiAVObject* torsoNode; // 160 + NiAVObject* faceTargetSourceNode; // 168 + BSFaceGenNiNode* faceNodeSkinned; // 170 + NiPointer lightingProperty; // 178 + std::uint64_t unk180; // 180 + QueuedItem* itemstoEquipUnequip; // 188 + HitData* lastHitData; // 190 + DeferredHideLimb* headDeferredHideLimb; // 198 + BSSimpleList* activeEffects; // 1A0 + BSTSmartPointer animationGraphManager; // 1A8 + BSAnimationGraphVariableCache* animationVariableCache; // 1B0 + BSTArray unk1B8; // 1B8 + BSTArray unk1D0; // 1D0 + mutable BSSpinLock unk1E8; // 1E8 + void* unk1F0; // 1F0 - smart ptr + std::uint16_t unk1F8; // 1F8 + std::uint16_t unk1FA; // 1FA + std::uint32_t unk1FC; // 1FC + std::uint32_t unk200; // 200 + float headHeightOffset; // 204 + ObjectRefHandle occupiedFurniture; // 208 + std::uint32_t unk20C; // 20C + TESIdleForm* unk210; // 210 + ActorHandle commandingActor; // 218 + std::uint32_t pad21C; // 21C + InventoryEntryData* leftHand; // 220 + TESIdleForm* furnitureIdle; // 228 + void* unk230; // 230 - smart ptr + BSFaceGenAnimationData* faceAnimationData; // 238 + MagicItem* currentPackageSpell; // 240 + std::uint64_t unk248; // 248 + NiPointer charController; // 250 + BSTSmartPointer penetrationDetectUtil; // 258 + InventoryEntryData* rightHand; // 260 + InventoryEntryData* bothHands; // 268 + NiPointer bodyPartPreload; // 270 + NiPointer unk278; // 278 + TESIdleForm* lastIdlePlayed; // 280 + AIPerkData* perkData; // 288 + std::uint32_t unk290; // 290 + std::uint32_t currentFurnitureSubgraphID; // 294 + float unk298; // 298 + float unk29C; // 29C + float unk2A0; // 2A0 + float unk2A4; // 2A4 + float currentMovementSpeed; // 2A8 + float unk2AC; // 2AC + float unk2B0; // 2B0 + float bleedoutRate; // 2B4 + float unk2B8; // 2B8 + float maximumWardPower; // 2BC + float unk2C0; // 2C0 + float torchEvaluationTimer; // 2C4 + float alphaMult; // 2C8 + float scriptRefractPower; // 2CC + float unk2D0; // 2D0 + float deferredKillTimer; // 2D4 + float killMoveTimer; // 2D8 + float unk2DC; // 2DC + std::uint32_t unk2E0; // 2E0 + std::uint32_t unk2E4; // 2E4 + std::uint32_t currentFurnitureMarkerID; // 2E8 + std::uint32_t unk2EC; // 2EC + std::uint64_t unk2F0; // 2F0 + std::uint32_t unk2F8; // 2F8 + std::uint32_t unk2FC; // 2FC + std::uint32_t unk300; // 300 + std::uint16_t unk304; // 304 + std::uint16_t unk306; // 306 + std::uint64_t unk308; // 308 + std::uint8_t unk310; // 310 + REX::EnumSet update3DModel; // 311 + std::uint16_t unk312; // 312 + std::uint16_t unk314; // 314 + bool unk316; // 316 + bool unk317; // 317 + bool unk318; // 318 + bool unk319; // 319 + bool unk31A; // 31A + bool pickPocketed; // 31B + bool summonedCreature; // 31C + bool forceNextUpdate; // 31D + bool unk31E; // 31E + bool unk31F; // 31F + bool unk320; // 320 + bool unk321; // 321 + bool beenAttacked; // 322 + bool alwaysHit; // 323 + bool doNoDamage; // 324 + bool soulTrapped; // 325 + bool unk326; // 326 + bool unk327; // 327 + bool unk328; // 328 + bool preventCombat; // 329 + bool unk32A; // 32A + bool isFleeing; // 32B + bool unk32C; // 32C + bool hostileGuard; // 32D + bool unk32E; // 32E + bool unk32F; // 32F + bool unk330; // 330 + bool killQueued; // 331 + bool inDeferredKill; // 332 + bool pad333; // 333 + std::uint32_t pad334; // 334 }; static_assert(sizeof(MiddleHighProcessData) == 0x338); } diff --git a/include/RE/M/ModelReferenceEffect.h b/include/RE/M/ModelReferenceEffect.h index 6d440faf9..a8b92a9ff 100644 --- a/include/RE/M/ModelReferenceEffect.h +++ b/include/RE/M/ModelReferenceEffect.h @@ -61,7 +61,7 @@ namespace RE BGSArtObject* artObject; // B8 BSTSmartPointer cloneTask; // C0 NiPointer artObject3D; // C8 - stl::enumeration flags; // D0 + REX::EnumSet flags; // D0 std::uint32_t padD4; // D4 }; static_assert(sizeof(ModelReferenceEffect) == 0xD8); diff --git a/include/RE/M/Moon.h b/include/RE/M/Moon.h index a3d37aaff..6ddd86d41 100644 --- a/include/RE/M/Moon.h +++ b/include/RE/M/Moon.h @@ -46,21 +46,21 @@ namespace RE void Update(Sky* a_sky, float a_arg2) override; // 03 // members - NiPointer moonNode; // 10 - NiPointer shadowNode; // 18 - NiPointer moonMesh; // 20 - NiPointer shadowMesh; // 28 - BSString stateTextures[Phase::kTotal]; // 30 - float angleFadeStart; // B0 - float angleFadeEnd; // B4 - float angleShadowEarlyFade; // B8 - float speed; // BC - float zOffset; // C0 - std::uint32_t size; // C4 - stl::enumeration updateMoonTexture; // C8 - float unkCC; // CC - float unkD0; // D0 - std::uint32_t padD4; // D4 + NiPointer moonNode; // 10 + NiPointer shadowNode; // 18 + NiPointer moonMesh; // 20 + NiPointer shadowMesh; // 28 + BSString stateTextures[Phase::kTotal]; // 30 + float angleFadeStart; // B0 + float angleFadeEnd; // B4 + float angleShadowEarlyFade; // B8 + float speed; // BC + float zOffset; // C0 + std::uint32_t size; // C4 + REX::EnumSet updateMoonTexture; // C8 + float unkCC; // CC + float unkD0; // D0 + std::uint32_t padD4; // D4 }; static_assert(sizeof(Moon) == 0xD8); } diff --git a/include/RE/N/NativeLatentFunction.h b/include/RE/N/NativeLatentFunction.h index a6b5edb9e..3b864c790 100644 --- a/include/RE/N/NativeLatentFunction.h +++ b/include/RE/N/NativeLatentFunction.h @@ -101,7 +101,7 @@ namespace RE */ template - requires is_return_convertible_v + requires is_return_convertible_v void IVirtualMachine::ReturnLatentResult(VMStackID a_stackID, V a_result) { auto var = RE::BSScript::Variable::Variable(); diff --git a/include/RE/N/NiAVObject.h b/include/RE/N/NiAVObject.h index 0d25624f3..8454f7e86 100644 --- a/include/RE/N/NiAVObject.h +++ b/include/RE/N/NiAVObject.h @@ -32,8 +32,8 @@ namespace RE kDisableCollision = 1 << 13 }; - float time; // 0 - stl::enumeration flags; // 4 + float time; // 0 + REX::EnumSet flags; // 4 }; static_assert(sizeof(NiUpdateData) == 0x8); @@ -139,22 +139,22 @@ namespace RE void UpdateRigidConstraints(bool a_enable, std::uint8_t a_arg2 = 1, std::uint32_t a_arg3 = 1); // members - NiNode* parent; // 030 - std::uint32_t parentIndex; // 038 - std::uint32_t unk03C; // 03C - NiPointer collisionObject; // 040 - NiTransform local; // 048 - NiTransform world; // 07C - NiTransform previousWorld; // 0B0 - NiBound worldBound; // 0E4 - stl::enumeration flags; // 0F4 - TESObjectREFR* userData; // 0F8 - float fadeAmount; // 100 - std::uint32_t lastUpdatedFrameCounter; // 104 - std::uint8_t unk108; // 108 - std::uint8_t flags02; // 109 - std::uint16_t unk10A; // 10A - std::uint32_t pad10C; // 10C + NiNode* parent; // 030 + std::uint32_t parentIndex; // 038 + std::uint32_t unk03C; // 03C + NiPointer collisionObject; // 040 + NiTransform local; // 048 + NiTransform world; // 07C + NiTransform previousWorld; // 0B0 + NiBound worldBound; // 0E4 + REX::EnumSet flags; // 0F4 + TESObjectREFR* userData; // 0F8 + float fadeAmount; // 100 + std::uint32_t lastUpdatedFrameCounter; // 104 + std::uint8_t unk108; // 108 + std::uint8_t flags02; // 109 + std::uint16_t unk10A; // 10A + std::uint32_t pad10C; // 10C }; static_assert(sizeof(NiAVObject) == 0x110); } diff --git a/include/RE/N/NiColor.h b/include/RE/N/NiColor.h index 86f790cb1..0c9c60538 100644 --- a/include/RE/N/NiColor.h +++ b/include/RE/N/NiColor.h @@ -46,7 +46,7 @@ namespace RE constexpr NiColor(std::uint32_t a_hexValue) noexcept : red(((a_hexValue >> 16) & 0xFF) / 255.0f), green(((a_hexValue >> 8) & 0xFF) / 255.0f), - blue(((a_hexValue)&0xFF) / 255.0f) + blue(((a_hexValue) & 0xFF) / 255.0f) { } diff --git a/include/RE/N/NiControllerSequence.h b/include/RE/N/NiControllerSequence.h index 04977dceb..795a131ce 100644 --- a/include/RE/N/NiControllerSequence.h +++ b/include/RE/N/NiControllerSequence.h @@ -85,41 +85,41 @@ namespace RE void SetPhase(float a_phase, bool a_arg2); // members - BSFixedString name; // 10 - std::uint32_t arraySize; // 18 - std::uint32_t arrayGrowBy; // 1C - SimpleArray interpArray; // 20 - SimpleArray idTagArray; // 28 - float seqWeight; // 30 - std::uint32_t pad34; // 30 - NiPointer textKeys; // 38 - stl::enumeration cycleType; // 40 - float frequency; // 44 - float beginKeyTime; // 48 - float endKeyTime; // 4C - float lastTime; // 50 - float weightedLastTime; // 54 - float lastScaledTime; // 58 - std::uint32_t pad5C; // 5C - NiControllerManager* owner; // 60 - stl::enumeration state; // 68 - float offset; // 6C - float startTime; // 70 - float endTime; // 74 - float destFrame; // 78 - std::uint32_t pad7C; // 7C - NiControllerSequence* partnerSequence; // 80 - BSFixedString accumRootName; // 88 - NiAVObject* accumRoot; // 90 - NiPointer deprecatedStringPalette; // 98 - std::int16_t curAnimNIdx; // A0 - std::uint16_t unkA2; // A2 - std::uint32_t unkA4; // A4 - SimpleArray> animNotes; // A8 - std::uint16_t numNotes; // B0 - bool removableObjects; // B2 - std::uint8_t unkB3; // B3 - std::uint32_t unkB4; // B4 + BSFixedString name; // 10 + std::uint32_t arraySize; // 18 + std::uint32_t arrayGrowBy; // 1C + SimpleArray interpArray; // 20 + SimpleArray idTagArray; // 28 + float seqWeight; // 30 + std::uint32_t pad34; // 30 + NiPointer textKeys; // 38 + REX::EnumSet cycleType; // 40 + float frequency; // 44 + float beginKeyTime; // 48 + float endKeyTime; // 4C + float lastTime; // 50 + float weightedLastTime; // 54 + float lastScaledTime; // 58 + std::uint32_t pad5C; // 5C + NiControllerManager* owner; // 60 + REX::EnumSet state; // 68 + float offset; // 6C + float startTime; // 70 + float endTime; // 74 + float destFrame; // 78 + std::uint32_t pad7C; // 7C + NiControllerSequence* partnerSequence; // 80 + BSFixedString accumRootName; // 88 + NiAVObject* accumRoot; // 90 + NiPointer deprecatedStringPalette; // 98 + std::int16_t curAnimNIdx; // A0 + std::uint16_t unkA2; // A2 + std::uint32_t unkA4; // A4 + SimpleArray> animNotes; // A8 + std::uint16_t numNotes; // B0 + bool removableObjects; // B2 + std::uint8_t unkB3; // B3 + std::uint32_t unkB4; // B4 }; static_assert(sizeof(NiControllerSequence) == 0xB8); } diff --git a/include/RE/N/NiFile.h b/include/RE/N/NiFile.h index 2291635cb..cd2338028 100644 --- a/include/RE/N/NiFile.h +++ b/include/RE/N/NiFile.h @@ -30,16 +30,16 @@ namespace RE [[nodiscard]] virtual std::uint32_t size() const; // 07 // members - std::uint32_t bufferAllocSize; // 20 - std::uint32_t bufferReadSize; // 24 - std::uint32_t pos; // 28 - std::uint32_t pad2C; // 2C - char* buffer; // 30 - std::FILE* file; // 38 - stl::enumeration mode; // 40 - bool isGood; // 44 - std::uint8_t pad45; // 45 - std::uint16_t pad46; // 46 + std::uint32_t bufferAllocSize; // 20 + std::uint32_t bufferReadSize; // 24 + std::uint32_t pos; // 28 + std::uint32_t pad2C; // 2C + char* buffer; // 30 + std::FILE* file; // 38 + REX::EnumSet mode; // 40 + bool isGood; // 44 + std::uint8_t pad45; // 45 + std::uint16_t pad46; // 46 }; static_assert(sizeof(NiFile) == 0x48); } diff --git a/include/RE/N/NiFrustumPlanes.h b/include/RE/N/NiFrustumPlanes.h index b9d000ce4..b73acc0f2 100644 --- a/include/RE/N/NiFrustumPlanes.h +++ b/include/RE/N/NiFrustumPlanes.h @@ -33,11 +33,11 @@ namespace RE }; // members - NiPlane cullingPlanes[Planes::kTotal]; // 00 - stl::enumeration activePlanes; // 60 - std::uint32_t basePlaneStates; // 64 - std::uint32_t unk68; // 68 - std::uint32_t unk6C; // 6C + NiPlane cullingPlanes[Planes::kTotal]; // 00 + REX::EnumSet activePlanes; // 60 + std::uint32_t basePlaneStates; // 64 + std::uint32_t unk68; // 68 + std::uint32_t unk6C; // 6C }; static_assert(sizeof(NiFrustumPlanes) == 0x70); } diff --git a/include/RE/N/NiGeometryData.h b/include/RE/N/NiGeometryData.h index f5e29d647..10280ca6b 100644 --- a/include/RE/N/NiGeometryData.h +++ b/include/RE/N/NiGeometryData.h @@ -80,28 +80,28 @@ namespace RE virtual void Unk_29(void) = 0; // 29 // members - std::uint16_t vertices; // 10 - std::uint16_t id; // 12 - stl::enumeration dirtyFlags; // 14 - stl::enumeration dataFlags; // 16 - NiBound bound; // 18 - NiPoint3* vertex; // 28 - NiPoint3* normal; // 30 - NiColorA* color; // 38 - NiPoint2* texture; // 40 - std::uint32_t unk48; // 48 - std::uint32_t unk4C; // 4C - std::uint32_t unk50; // 50 - std::uint32_t unk54; // 54 - NiPointer additionalGeomData; // 58 - stl::enumeration keepFlags; // 60 - stl::enumeration compressFlags; // 61 - std::uint8_t unk62; // 62 - std::uint8_t unk63; // 63 - std::uint8_t unk64; // 64 - std::uint8_t unk65; // 65 - bool hasGeoData; // 66 - std::uint8_t unk67; // 67 + std::uint16_t vertices; // 10 + std::uint16_t id; // 12 + REX::EnumSet dirtyFlags; // 14 + REX::EnumSet dataFlags; // 16 + NiBound bound; // 18 + NiPoint3* vertex; // 28 + NiPoint3* normal; // 30 + NiColorA* color; // 38 + NiPoint2* texture; // 40 + std::uint32_t unk48; // 48 + std::uint32_t unk4C; // 4C + std::uint32_t unk50; // 50 + std::uint32_t unk54; // 54 + NiPointer additionalGeomData; // 58 + REX::EnumSet keepFlags; // 60 + REX::EnumSet compressFlags; // 61 + std::uint8_t unk62; // 62 + std::uint8_t unk63; // 63 + std::uint8_t unk64; // 64 + std::uint8_t unk65; // 65 + bool hasGeoData; // 66 + std::uint8_t unk67; // 67 }; static_assert(sizeof(NiGeometryData) == 0x68); } diff --git a/include/RE/N/NiPSysGravityModifier.h b/include/RE/N/NiPSysGravityModifier.h index 7c425d93c..0e2a639cf 100644 --- a/include/RE/N/NiPSysGravityModifier.h +++ b/include/RE/N/NiPSysGravityModifier.h @@ -32,17 +32,17 @@ namespace RE bool Update(float a_time, NiPSysData* a_particleData, NiPoint3* a_position, NiPoint3* a_radii, NiColorA* a_rotation) override; // 25 // members - NiAVObject* gravityObj; // 30 - NiPoint3 gravityAxis; // 38 - float decay; // 44 - float strength; // 48 - stl::enumeration forceType; // 4C - float turbulence; // 50 - float scale; // 54 - bool worldAligned; // 58 - std::uint8_t pad59; // 59 - std::uint16_t pad5A; // 5A - std::uint32_t pad5C; // 5C + NiAVObject* gravityObj; // 30 + NiPoint3 gravityAxis; // 38 + float decay; // 44 + float strength; // 48 + REX::EnumSet forceType; // 4C + float turbulence; // 50 + float scale; // 54 + bool worldAligned; // 58 + std::uint8_t pad59; // 59 + std::uint16_t pad5A; // 5A + std::uint32_t pad5C; // 5C }; static_assert(sizeof(NiPSysGravityModifier) == 0x60); } diff --git a/include/RE/N/NiPSysModifier.h b/include/RE/N/NiPSysModifier.h index c8af0893c..faf2693e8 100644 --- a/include/RE/N/NiPSysModifier.h +++ b/include/RE/N/NiPSysModifier.h @@ -51,14 +51,14 @@ namespace RE virtual void SetSystemPointer(NiParticleSystem* a_target); // 29 // members - BSFixedString name; // 10 - stl::enumeration order; // 18 - std::uint32_t pad1C; // 1C - NiParticleSystem* target; // 20 - bool active; // 28 - std::uint8_t pad29; // 29 - std::uint16_t pad2A; // 29 - std::uint32_t pad2C; // 29 + BSFixedString name; // 10 + REX::EnumSet order; // 18 + std::uint32_t pad1C; // 1C + NiParticleSystem* target; // 20 + bool active; // 28 + std::uint8_t pad29; // 29 + std::uint16_t pad2A; // 29 + std::uint32_t pad2C; // 29 }; static_assert(sizeof(NiPSysModifier) == 0x30); } diff --git a/include/RE/N/NiTMapBase.h b/include/RE/N/NiTMapBase.h index 53d746c47..43ada4ce0 100644 --- a/include/RE/N/NiTMapBase.h +++ b/include/RE/N/NiTMapBase.h @@ -171,7 +171,7 @@ namespace RE iterator_base operator++(int) { iterator_base tmp(*this); - operator++(); + operator++(); return tmp; } diff --git a/include/RE/N/NiTexture.h b/include/RE/N/NiTexture.h index dd621371a..aac777f8c 100644 --- a/include/RE/N/NiTexture.h +++ b/include/RE/N/NiTexture.h @@ -58,10 +58,10 @@ namespace RE FormatPrefs(); // members - stl::enumeration pixelLayout; // 00 - stl::enumeration alphaFormat; // 04 - stl::enumeration mipMapped; // 08 - std::uint32_t pad0C; // 0C + REX::EnumSet pixelLayout; // 00 + REX::EnumSet alphaFormat; // 04 + REX::EnumSet mipMapped; // 08 + std::uint32_t pad0C; // 0C }; static_assert(sizeof(FormatPrefs) == 0x10); diff --git a/include/RE/N/NiTimeController.h b/include/RE/N/NiTimeController.h index 5dc1e760e..4fdba1f9f 100644 --- a/include/RE/N/NiTimeController.h +++ b/include/RE/N/NiTimeController.h @@ -72,19 +72,19 @@ namespace RE [[nodiscard]] constexpr NiTimeController* GetNext() const noexcept { return next.get(); } // members - stl::enumeration flags; // 10 - std::uint16_t pad12; // 12 - float frequency; // 14 - float phase; // 18 - float loKeyTime; // 1C - float hiKeyTime; // 20 - float startTime; // 24 - float lastTime; // 28 - float weightedLastTime; // 2C - float scaledTime; // 30 - std::uint32_t pad34; // 34 - NiObjectNET* target; // 38 - NiPointer next; // 40 - singly-linked list + REX::EnumSet flags; // 10 + std::uint16_t pad12; // 12 + float frequency; // 14 + float phase; // 18 + float loKeyTime; // 1C + float hiKeyTime; // 20 + float startTime; // 24 + float lastTime; // 28 + float weightedLastTime; // 2C + float scaledTime; // 30 + std::uint32_t pad34; // 34 + NiObjectNET* target; // 38 + NiPointer next; // 40 - singly-linked list private: NiTimeController* ctor(); diff --git a/include/RE/P/PackUnpack.h b/include/RE/P/PackUnpack.h index 9a94f598c..0e12015d6 100644 --- a/include/RE/P/PackUnpack.h +++ b/include/RE/P/PackUnpack.h @@ -67,11 +67,11 @@ namespace RE { using value_type = typename T::value_type; if constexpr (is_builtin_convertible_v) { - return *(stl::enumeration{ vm_type_v } + TypeInfo::RawType::kNoneArray); + return *(REX::EnumSet{ vm_type_v } + TypeInfo::RawType::kNoneArray); } else if constexpr (is_form_pointer_v) { - return *(stl::enumeration{ GetRawTypeFromVMType(static_cast(unwrapped_type_t::FORMTYPE)) } + TypeInfo::RawType::kObject); + return *(REX::EnumSet{ GetRawTypeFromVMType(static_cast(unwrapped_type_t::FORMTYPE)) } + TypeInfo::RawType::kObject); } else if constexpr (is_alias_pointer_v || is_active_effect_pointer_v) { - return *(stl::enumeration{ GetRawTypeFromVMType(static_cast(unwrapped_type_t::VMTYPEID)) } + TypeInfo::RawType::kObject); + return *(REX::EnumSet{ GetRawTypeFromVMType(static_cast(unwrapped_type_t::VMTYPEID)) } + TypeInfo::RawType::kObject); } else { static_assert(sizeof(T) && false); } diff --git a/include/RE/P/PackageLocation.h b/include/RE/P/PackageLocation.h index 528076496..2b236c53c 100644 --- a/include/RE/P/PackageLocation.h +++ b/include/RE/P/PackageLocation.h @@ -46,11 +46,11 @@ namespace RE bool IsRefAtLocation(AIWorldLocationContext* a_context, TESObjectREFR* a_ref) override; // 03 // members - stl::enumeration locType; // 08 - std::uint8_t pad09; // 09 - std::uint16_t pad0A; // 0A - std::uint32_t rad; // 0C - Data data; // 10 + REX::EnumSet locType; // 08 + std::uint8_t pad09; // 09 + std::uint16_t pad0A; // 0A + std::uint32_t rad; // 0C + Data data; // 10 }; static_assert(sizeof(PackageLocation) == 0x18); } diff --git a/include/RE/P/PlayerCharacter.h b/include/RE/P/PlayerCharacter.h index d69db7062..2006971e7 100644 --- a/include/RE/P/PlayerCharacter.h +++ b/include/RE/P/PlayerCharacter.h @@ -126,9 +126,9 @@ namespace RE { public: // members - float timer; // 0 - RefHandle refObj; // 4 - stl::enumeration next; // 8 + float timer; // 0 + RefHandle refObj; // 4 + REX::EnumSet next; // 8 }; static_assert(sizeof(PlayerActionObject) == 0xC); @@ -518,13 +518,13 @@ namespace RE TESImageSpaceModifier* sunGazeImageSpaceModifier; // AE0 ActorValue advanceSkill; // AE8 - advance values set, then cleared in PlayerSkills::ModSkillPoints surronding ApplyPerkEntry std::uint32_t advanceAction; // AEC - Part of AE8 and 9F0 - stl::enumeration animationObjectAction; // AF0 - stl::enumeration grabType; // AF4 + REX::EnumSet animationObjectAction; // AF0 + REX::EnumSet grabType; // AF4 std::int32_t difficulty; // AF8 ActorHandle assumedIdentity; // AFC std::int8_t murder; // B00 std::int8_t perkCount; // B01 - stl::enumeration byCharGenFlag; // B02 + REX::EnumSet byCharGenFlag; // B02 std::uint8_t padB03; // B03 std::uint32_t unkB04; // B04 Crime* resistArrestCrime; // B08 diff --git a/include/RE/P/PositionPlayerEvent.h b/include/RE/P/PositionPlayerEvent.h index d1dec1f3f..370a6be9a 100644 --- a/include/RE/P/PositionPlayerEvent.h +++ b/include/RE/P/PositionPlayerEvent.h @@ -16,7 +16,7 @@ namespace RE }; // members - stl::enumeration type; // 0 + REX::EnumSet type; // 0 }; static_assert(sizeof(PositionPlayerEvent) == 0x4); } diff --git a/include/RE/P/Projectile.h b/include/RE/P/Projectile.h index 83011a10c..8f134ff19 100644 --- a/include/RE/P/Projectile.h +++ b/include/RE/P/Projectile.h @@ -114,19 +114,19 @@ namespace RE { public: // members - NiPoint3 desiredTargetLoc; // 00 - NiPoint3 negativeVelocity; // 0C - ObjectRefHandle collidee; // 18 - NiPointer colObj; // 20 - BGSMaterialType* material; // 28 - std::int32_t damageRootNodeType; // 30 - stl::enumeration collidedLayer; // 34 - NiNode* damageRootNode; // 38 - ImpactResult impactResult; // 40 - std::uint16_t unk44; // 44 - std::uint16_t unk46; // 46 - std::uint8_t unk48; // 48 - std::uint8_t unk49; // 49 + NiPoint3 desiredTargetLoc; // 00 + NiPoint3 negativeVelocity; // 0C + ObjectRefHandle collidee; // 18 + NiPointer colObj; // 20 + BGSMaterialType* material; // 28 + std::int32_t damageRootNodeType; // 30 + REX::EnumSet collidedLayer; // 34 + NiNode* damageRootNode; // 38 + ImpactResult impactResult; // 40 + std::uint16_t unk44; // 44 + std::uint16_t unk46; // 46 + std::uint8_t unk48; // 48 + std::uint8_t unk49; // 49 }; static_assert(sizeof(ImpactData) == 0x50); @@ -236,49 +236,49 @@ namespace RE static ProjectileHandle* LaunchArrow(ProjectileHandle* a_result, Actor* a_shooter, TESAmmo* a_ammo, TESObjectWEAP* a_weap) noexcept; // members - BSSimpleList impacts; // 098 - NiTransform unk0A8; // 0A8 - float unk0DC; // 0DC - bhkSimpleShapePhantom* unk0E0; // 0E0 - smart ptr - mutable BSSpinLock unk0E8; // 0E8 - NiPoint3 velocity; // 0F0 - NiPoint3 linearVelocity; // 0FC - NiPointer light; // 108 - smart ptr - void* unk110; // 110 - smart ptr - NiPointer actorCause; // 118 - ObjectRefHandle shooter; // 120 - ObjectRefHandle desiredTarget; // 124 - BSSoundHandle sndHandle; // 128 - BSSoundHandle sndCountdown; // 134 - std::uint32_t* unk140; // 140 - InventoryEntryData* unk148; // 148 - BGSExplosion* explosion; // 150 - MagicItem* spell; // 158 - MagicSystem::CastingSource castingSource; // 160 - std::uint32_t pad164; // 164 - EffectSetting* avEffect; // 168 - NiPointer projectileDBFiles; // 170 - ModelDBHandle muzzleFlashDBHandle; // 178 - std::uint64_t unk180; // 180 - float power; // 188 - float speedMult; // 18C - float range; // 190 - float livingTime; // 194 - float weaponDamage; // 198 - float transparency; // 19C - for beam disappearing - float explosionTimer; // 1A0 - std::uint32_t unk1A4; // 1A4 - float unk1A8; // 1A8 - 0.0f - float unk1AC; // 1AC - 0.0f - TESObjectWEAP* weaponSource; // 1B0 - TESAmmo* ammoSource; // 1B8 - float distanceMoved; // 1C0 - std::uint32_t pad_1C4; // 1C4 - float scale; // 1C8 - for double cast model scale - stl::enumeration flags; // 1CC - bool unk1D0; // 1D0 - bool unk1D1; // 1D0 - char unk1D2[6]; // 1D2 + BSSimpleList impacts; // 098 + NiTransform unk0A8; // 0A8 + float unk0DC; // 0DC + bhkSimpleShapePhantom* unk0E0; // 0E0 - smart ptr + mutable BSSpinLock unk0E8; // 0E8 + NiPoint3 velocity; // 0F0 + NiPoint3 linearVelocity; // 0FC + NiPointer light; // 108 - smart ptr + void* unk110; // 110 - smart ptr + NiPointer actorCause; // 118 + ObjectRefHandle shooter; // 120 + ObjectRefHandle desiredTarget; // 124 + BSSoundHandle sndHandle; // 128 + BSSoundHandle sndCountdown; // 134 + std::uint32_t* unk140; // 140 + InventoryEntryData* unk148; // 148 + BGSExplosion* explosion; // 150 + MagicItem* spell; // 158 + MagicSystem::CastingSource castingSource; // 160 + std::uint32_t pad164; // 164 + EffectSetting* avEffect; // 168 + NiPointer projectileDBFiles; // 170 + ModelDBHandle muzzleFlashDBHandle; // 178 + std::uint64_t unk180; // 180 + float power; // 188 + float speedMult; // 18C + float range; // 190 + float livingTime; // 194 + float weaponDamage; // 198 + float transparency; // 19C - for beam disappearing + float explosionTimer; // 1A0 + std::uint32_t unk1A4; // 1A4 + float unk1A8; // 1A8 - 0.0f + float unk1AC; // 1AC - 0.0f + TESObjectWEAP* weaponSource; // 1B0 + TESAmmo* ammoSource; // 1B8 + float distanceMoved; // 1C0 + std::uint32_t pad_1C4; // 1C4 + float scale; // 1C8 - for double cast model scale + REX::EnumSet flags; // 1CC + bool unk1D0; // 1D0 + bool unk1D1; // 1D0 + char unk1D2[6]; // 1D2 }; #ifndef SKYRIM_SUPPORT_AE static_assert(sizeof(Projectile) == 0x1D8); diff --git a/include/RE/P/PropertyTypeInfo.h b/include/RE/P/PropertyTypeInfo.h index 85e0333b3..5a551496e 100644 --- a/include/RE/P/PropertyTypeInfo.h +++ b/include/RE/P/PropertyTypeInfo.h @@ -18,16 +18,16 @@ namespace RE }; // members - BSFixedString parentObjName; // 00 - BSFixedString propertyName; // 08 - TypeInfo type; // 10 - stl::enumeration permissions; // 18 - std::uint32_t pad1C; // 1C - BSTSmartPointer getFunction; // 20 - BSTSmartPointer setFunction; // 28 - std::uint32_t autoVarIndex; // 30 - std::uint32_t userFlags; // 34 - BSFixedString docString; // 38 + BSFixedString parentObjName; // 00 + BSFixedString propertyName; // 08 + TypeInfo type; // 10 + REX::EnumSet permissions; // 18 + std::uint32_t pad1C; // 1C + BSTSmartPointer getFunction; // 20 + BSTSmartPointer setFunction; // 28 + std::uint32_t autoVarIndex; // 30 + std::uint32_t userFlags; // 34 + BSFixedString docString; // 38 }; static_assert(sizeof(PropertyTypeInfo) == 0x40); } diff --git a/include/RE/R/RaceSexMenu.h b/include/RE/R/RaceSexMenu.h index 4eff3976a..1cd4566f3 100644 --- a/include/RE/R/RaceSexMenu.h +++ b/include/RE/R/RaceSexMenu.h @@ -36,21 +36,21 @@ namespace RE void ChangeName(const char* a_name); // members - BSTArray unk040[7]; // 040 - RaceSexCamera camera; // 0E8 - BSTArray unk140[2]; // 140 - BSTArray unk170; // 170 - std::uint64_t unk188; // 188 - std::uint32_t unk190; // 190 - std::uint32_t unk194; // 194 - stl::enumeration sex; // 198 - std::uint16_t unk19C; // 19C - std::uint8_t unk19E; // 19E - std::uint8_t pad19F; // 19F - std::uint8_t unk1A0; // 1A0 - std::uint8_t unk1A1; // 1A1 - std::uint16_t unk1A2; // 1A2 - std::uint32_t unk1A4; // 1A4 + BSTArray unk040[7]; // 040 + RaceSexCamera camera; // 0E8 + BSTArray unk140[2]; // 140 + BSTArray unk170; // 170 + std::uint64_t unk188; // 188 + std::uint32_t unk190; // 190 + std::uint32_t unk194; // 194 + REX::EnumSet sex; // 198 + std::uint16_t unk19C; // 19C + std::uint8_t unk19E; // 19E + std::uint8_t pad19F; // 19F + std::uint8_t unk1A0; // 1A0 + std::uint8_t unk1A1; // 1A1 + std::uint16_t unk1A2; // 1A2 + std::uint32_t unk1A4; // 1A4 }; static_assert(sizeof(RaceSexMenu) == 0x1A8); } diff --git a/include/RE/R/RenderTargetProperties.h b/include/RE/R/RenderTargetProperties.h index 16464d78a..c7f58cf41 100644 --- a/include/RE/R/RenderTargetProperties.h +++ b/include/RE/R/RenderTargetProperties.h @@ -8,16 +8,16 @@ namespace RE { struct RenderTargetProperties { - std::uint32_t width; // 00 - std::uint32_t height; // 04 - stl::enumeration format; // 08 - bool copyable; // 0C - bool supportUnorderedAccess; // 0D - bool allowMipGeneration; // 0E - bool unk0F; // 0F - std::int32_t mipLevel; // 10 - std::uint32_t textureTarget; // 14 - std::uint32_t unk18; // 18 + std::uint32_t width; // 00 + std::uint32_t height; // 04 + REX::EnumSet format; // 08 + bool copyable; // 0C + bool supportUnorderedAccess; // 0D + bool allowMipGeneration; // 0E + bool unk0F; // 0F + std::int32_t mipLevel; // 10 + std::uint32_t textureTarget; // 14 + std::uint32_t unk18; // 18 }; static_assert(sizeof(RenderTargetProperties) == 0x1C); @@ -34,9 +34,9 @@ namespace RE struct CubeMapRenderTargetProperties { - std::uint32_t width; // 00 - std::uint32_t height; // 04 - stl::enumeration format; // 08 + std::uint32_t width; // 00 + std::uint32_t height; // 04 + REX::EnumSet format; // 08 }; static_assert(sizeof(CubeMapRenderTargetProperties) == 0xC); } diff --git a/include/RE/RTTI.h b/include/RE/RTTI.h index bbf72341f..13fde40fd 100644 --- a/include/RE/RTTI.h +++ b/include/RE/RTTI.h @@ -79,10 +79,10 @@ namespace RE }; // members - RVA typeDescriptor; // 00 - std::uint32_t numContainedBases; // 04 - PMD pmd; // 08 - stl::enumeration attributes; // 14 + RVA typeDescriptor; // 00 + std::uint32_t numContainedBases; // 04 + PMD pmd; // 08 + REX::EnumSet attributes; // 14 }; static_assert(sizeof(BaseClassDescriptor) == 0x18); @@ -98,10 +98,10 @@ namespace RE }; // members - std::uint32_t signature; // 00 - stl::enumeration attributes; // 04 - std::uint32_t numBaseClasses; // 08 - RVA baseClassArray; // 0C + std::uint32_t signature; // 00 + REX::EnumSet attributes; // 04 + std::uint32_t numBaseClasses; // 08 + RVA baseClassArray; // 0C }; static_assert(sizeof(ClassHierarchyDescriptor) == 0x10); @@ -115,11 +115,11 @@ namespace RE }; // members - stl::enumeration signature; // 00 - std::uint32_t offset; // 04 - std::uint32_t ctorDispOffset; // 08 - RVA typeDescriptor; // 0C - RVA classDescriptor; // 10 + REX::EnumSet signature; // 00 + std::uint32_t offset; // 04 + std::uint32_t ctorDispOffset; // 08 + RVA typeDescriptor; // 0C + RVA classDescriptor; // 10 }; static_assert(sizeof(CompleteObjectLocator) == 0x14); } diff --git a/include/RE/S/ScriptFunction.h b/include/RE/S/ScriptFunction.h index 90fa7ea5f..15d8df199 100644 --- a/include/RE/S/ScriptFunction.h +++ b/include/RE/S/ScriptFunction.h @@ -43,23 +43,23 @@ namespace RE void SetCallableFromTasklets(bool a_callable) override; // 14 - { return; } // members - BSFixedString name; // 10 - BSFixedString objName; // 18 - BSFixedString stateName; // 20 - TypeInfo retType; // 28 - VDescTable descTable; // 30 - std::uint32_t userFlags; // 40 - std::uint32_t pad44; // 44 - ByteCode::PackedInstructionStream instructions; // 48 - stl::enumeration functionType; // 58 - bool isStatic; // 5A - std::uint8_t pad5B; // 5B - std::uint32_t pad5C; // 5C - BSFixedString docString; // 60 - BSFixedString sourceFileName; // 68 - std::uint32_t lineNumberCount; // 70 - std::uint32_t pad74; // 74 - std::uint16_t* lineNumbers; // 78 + BSFixedString name; // 10 + BSFixedString objName; // 18 + BSFixedString stateName; // 20 + TypeInfo retType; // 28 + VDescTable descTable; // 30 + std::uint32_t userFlags; // 40 + std::uint32_t pad44; // 44 + ByteCode::PackedInstructionStream instructions; // 48 + REX::EnumSet functionType; // 58 + bool isStatic; // 5A + std::uint8_t pad5B; // 5B + std::uint32_t pad5C; // 5C + BSFixedString docString; // 60 + BSFixedString sourceFileName; // 68 + std::uint32_t lineNumberCount; // 70 + std::uint32_t pad74; // 74 + std::uint16_t* lineNumbers; // 78 }; static_assert(sizeof(ScriptFunction) == 0x80); } diff --git a/include/RE/S/SendPlayerToJailFunctor.h b/include/RE/S/SendPlayerToJailFunctor.h index 25a3d1f90..5c426823d 100644 --- a/include/RE/S/SendPlayerToJailFunctor.h +++ b/include/RE/S/SendPlayerToJailFunctor.h @@ -36,7 +36,7 @@ namespace RE // members FormID faction; // 10 - stl::enumeration flags; // 14 + REX::EnumSet flags; // 14 std::uint8_t pad15; // 15 std::uint16_t pad16; // 16 BSTSmartPointer vm; // 18 diff --git a/include/RE/S/ShaderReferenceEffect.h b/include/RE/S/ShaderReferenceEffect.h index 3f9e7bc28..f893f903f 100644 --- a/include/RE/S/ShaderReferenceEffect.h +++ b/include/RE/S/ShaderReferenceEffect.h @@ -72,29 +72,29 @@ namespace RE void DetachImpl() override; // 3E // members - BSTArray textureRequests; // 048 - BSTArray> addonObjects; // 060 - smart ptrs - BSTArray modelHandles; // 078 - BSTArray particleShaders; // 090 - BSTArray unk0A8; // 0A8 - smart ptrs - BSSoundHandle soundHandle; // 0C0 - std::uint32_t pad0CC; // 0CC - NiPointer particleShaderTexture; // 0D0 - smart ptr - NiPointer particlePaletteTexture; // 0D8 - smart ptr - NiPointer fillTexture; // 0E0 - NiPointer holesTexture; // 0E8 - NiPointer paletteTexture; // 0F0 - NiPointer lastRootNode; // 0F8 - TESBoundObject* wornObject; // 100 - TESEffectShader* effectData; // 108 - BSEffectShaderData* effectShaderData; // 110 - NiPointer targetRoot; // 118 - smart ptr - float alphaTimer; // 120 - float addonAlpha; // 124 - 1.0f - float addonScale; // 128 - 1.0f - float effectShaderAge; // 12C - stl::enumeration flags; // 130 - std::uint32_t pushCount; // 134 + BSTArray textureRequests; // 048 + BSTArray> addonObjects; // 060 - smart ptrs + BSTArray modelHandles; // 078 + BSTArray particleShaders; // 090 + BSTArray unk0A8; // 0A8 - smart ptrs + BSSoundHandle soundHandle; // 0C0 + std::uint32_t pad0CC; // 0CC + NiPointer particleShaderTexture; // 0D0 - smart ptr + NiPointer particlePaletteTexture; // 0D8 - smart ptr + NiPointer fillTexture; // 0E0 + NiPointer holesTexture; // 0E8 + NiPointer paletteTexture; // 0F0 + NiPointer lastRootNode; // 0F8 + TESBoundObject* wornObject; // 100 + TESEffectShader* effectData; // 108 + BSEffectShaderData* effectShaderData; // 110 + NiPointer targetRoot; // 118 - smart ptr + float alphaTimer; // 120 + float addonAlpha; // 124 - 1.0f + float addonScale; // 128 - 1.0f + float effectShaderAge; // 12C + REX::EnumSet flags; // 130 + std::uint32_t pushCount; // 134 }; static_assert(sizeof(ShaderReferenceEffect) == 0x138); } diff --git a/include/RE/S/Sky.h b/include/RE/S/Sky.h index 69a794c81..9bd93b471 100644 --- a/include/RE/S/Sky.h +++ b/include/RE/S/Sky.h @@ -80,69 +80,69 @@ namespace RE void SetWeather(TESWeather* a_weather, bool a_override, bool a_accelerate); // members - NiPointer root; // 008 - NiPointer moonsRoot; // 010 - NiPointer auroraRoot; // 018 - ModelDBHandle auroraModel; // 020 - BGSLightingTemplate* extLightingOverride; // 028 - ObjectRefHandle currentRoom; // 030 - ObjectRefHandle previousRoom; // 034 - float lightingTransition; // 038 - float lightingTransitionTimer; // 03C - TESClimate* currentClimate; // 040 - TESWeather* currentWeather; // 048 - TESWeather* lastWeather; // 050 - TESWeather* defaultWeather; // 058 - TESWeather* overrideWeather; // 060 - TESRegion* region; // 068 - Atmosphere* atmosphere; // 070 - Stars* stars; // 078 - Sun* sun; // 080 - Clouds* clouds; // 088 - Moon* masser; // 090 - Moon* secunda; // 098 - Precipitation* precip; // 0A0 - NiColor skyColor[17]; // 0A8 - std::uint32_t unk174; // 174 - std::uint64_t unk178; // 178 - NiColor unk180; // 180 - float windSpeed; // 18C - float windAngle; // 190 - float fogNear; // 194 - float fogFar; // 198 - std::uint32_t unk19C; // 19C - std::uint32_t unk1A0; // 1A0 - std::uint32_t unk1A4; // 1A4 - float fogPower; // 1A8 - float fogClamp; // 1AC - float currentGameHour; // 1B0 - float lastWeatherUpdate; // 1B4 - float currentWeatherPct; // 1B8 - stl::enumeration mode; // 1BC - BSSimpleList* skySoundList; // 1C0 - float flash; // 1C8 - std::uint32_t pad1CC; // 1CC - std::uint32_t flashTime; // 1D0 - float windowReflectionTimer; // 1D4 - std::uint32_t lastMoonPhaseUpdate; // 1D8 - stl::enumeration flags; // 1DC - ImageSpaceModifierInstanceForm* currentWeatherImageSpaceMod; // 1E0 - ImageSpaceModifierInstanceForm* currentWeatherImageSpaceMod2; // 1E8 - ImageSpaceModifierInstanceForm* lastWeatherImageSpaceMod; // 1F0 - ImageSpaceModifierInstanceForm* lastWeatherImageSpaceMod2; // 1F8 - NiColor directionalAmbientColors[3][2]; // 200 - NiColor ambientSpecularTint; // 248 - float ambientSpecularFresnel; // 254 - float auroraInStart; // 258 - float auroraIn; // 25C - float auroraOutStart; // 260 - float auroraOut; // 264 - NiPointer currentReferenceEffect; // 268 - NiPointer lastReferenceEffect; // 270 - SkyEffectController effectController; // 278 - BSTArray> storedCloudTextures; // 280 - BSTArray> storedWorldMapCloudTextures; // 298 - BSTArray skyStaticRefData; // 2B0 + NiPointer root; // 008 + NiPointer moonsRoot; // 010 + NiPointer auroraRoot; // 018 + ModelDBHandle auroraModel; // 020 + BGSLightingTemplate* extLightingOverride; // 028 + ObjectRefHandle currentRoom; // 030 + ObjectRefHandle previousRoom; // 034 + float lightingTransition; // 038 + float lightingTransitionTimer; // 03C + TESClimate* currentClimate; // 040 + TESWeather* currentWeather; // 048 + TESWeather* lastWeather; // 050 + TESWeather* defaultWeather; // 058 + TESWeather* overrideWeather; // 060 + TESRegion* region; // 068 + Atmosphere* atmosphere; // 070 + Stars* stars; // 078 + Sun* sun; // 080 + Clouds* clouds; // 088 + Moon* masser; // 090 + Moon* secunda; // 098 + Precipitation* precip; // 0A0 + NiColor skyColor[17]; // 0A8 + std::uint32_t unk174; // 174 + std::uint64_t unk178; // 178 + NiColor unk180; // 180 + float windSpeed; // 18C + float windAngle; // 190 + float fogNear; // 194 + float fogFar; // 198 + std::uint32_t unk19C; // 19C + std::uint32_t unk1A0; // 1A0 + std::uint32_t unk1A4; // 1A4 + float fogPower; // 1A8 + float fogClamp; // 1AC + float currentGameHour; // 1B0 + float lastWeatherUpdate; // 1B4 + float currentWeatherPct; // 1B8 + REX::EnumSet mode; // 1BC + BSSimpleList* skySoundList; // 1C0 + float flash; // 1C8 + std::uint32_t pad1CC; // 1CC + std::uint32_t flashTime; // 1D0 + float windowReflectionTimer; // 1D4 + std::uint32_t lastMoonPhaseUpdate; // 1D8 + REX::EnumSet flags; // 1DC + ImageSpaceModifierInstanceForm* currentWeatherImageSpaceMod; // 1E0 + ImageSpaceModifierInstanceForm* currentWeatherImageSpaceMod2; // 1E8 + ImageSpaceModifierInstanceForm* lastWeatherImageSpaceMod; // 1F0 + ImageSpaceModifierInstanceForm* lastWeatherImageSpaceMod2; // 1F8 + NiColor directionalAmbientColors[3][2]; // 200 + NiColor ambientSpecularTint; // 248 + float ambientSpecularFresnel; // 254 + float auroraInStart; // 258 + float auroraIn; // 25C + float auroraOutStart; // 260 + float auroraOut; // 264 + NiPointer currentReferenceEffect; // 268 + NiPointer lastReferenceEffect; // 270 + SkyEffectController effectController; // 278 + BSTArray> storedCloudTextures; // 280 + BSTArray> storedWorldMapCloudTextures; // 298 + BSTArray skyStaticRefData; // 2B0 }; static_assert(sizeof(Sky) == 0x2C8); } diff --git a/include/RE/S/SpellItem.h b/include/RE/S/SpellItem.h index 598d5b7a1..358fd5c2f 100644 --- a/include/RE/S/SpellItem.h +++ b/include/RE/S/SpellItem.h @@ -46,15 +46,15 @@ namespace RE { public: // members - std::int32_t costOverride; // 00 - stl::enumeration flags; // 04 - MagicSystem::SpellType spellType; // 08 - float chargeTime; // 0C - MagicSystem::CastingType castingType; // 10 - MagicSystem::Delivery delivery; // 14 - float castDuration; // 18 - float range; // 1C - BGSPerk* castingPerk; // 20 + std::int32_t costOverride; // 00 + REX::EnumSet flags; // 04 + MagicSystem::SpellType spellType; // 08 + float chargeTime; // 0C + MagicSystem::CastingType castingType; // 10 + MagicSystem::Delivery delivery; // 14 + float castDuration; // 18 + float range; // 1C + BGSPerk* castingPerk; // 20 }; static_assert(sizeof(Data) == 0x28); diff --git a/include/RE/S/Stack.h b/include/RE/S/Stack.h index c6aef9299..d503658df 100644 --- a/include/RE/S/Stack.h +++ b/include/RE/S/Stack.h @@ -67,21 +67,21 @@ namespace RE Variable& GetStackFrameVariable(const StackFrame* a_frame, std::uint32_t a_index, std::uint32_t a_pageHint); // members - std::uint32_t pad04; // 04 - IMemoryPagePolicy* policy; // 08 - IProfilePolicy* profilePolicy; // 10 - BSTSmallArray pages; // 18 - std::uint32_t frames; // 58 - std::uint32_t pad5C; // 5C - StackFrame* top; // 60 - stl::enumeration state; // 68 - stl::enumeration freezeState; // 6C - Variable returnValue; // 70 - VMStackID stackID; // 80 - stl::enumeration stackType; // 84 - BSTSmartPointer owningTasklet; // 88 - BSTSmartPointer callback; // 90 - BSTSmartPointer nextStack; // 98 + std::uint32_t pad04; // 04 + IMemoryPagePolicy* policy; // 08 + IProfilePolicy* profilePolicy; // 10 + BSTSmallArray pages; // 18 + std::uint32_t frames; // 58 + std::uint32_t pad5C; // 5C + StackFrame* top; // 60 + REX::EnumSet state; // 68 + REX::EnumSet freezeState; // 6C + Variable returnValue; // 70 + VMStackID stackID; // 80 + REX::EnumSet stackType; // 84 + BSTSmartPointer owningTasklet; // 88 + BSTSmartPointer callback; // 90 + BSTSmartPointer nextStack; // 98 private: void Dtor(); diff --git a/include/RE/S/StatsMenu.h b/include/RE/S/StatsMenu.h index db96462ab..27e1218e8 100644 --- a/include/RE/S/StatsMenu.h +++ b/include/RE/S/StatsMenu.h @@ -59,9 +59,9 @@ namespace RE }; // members - BSEffectShaderProperty* unk00; // 00 - stl::enumeration state; // 08 - std::uint32_t unk0C; // 0C + BSEffectShaderProperty* unk00; // 00 + REX::EnumSet state; // 08 + std::uint32_t unk0C; // 0C }; static_assert(sizeof(UnkData) == 0x10); diff --git a/include/RE/T/TESActorBaseData.h b/include/RE/T/TESActorBaseData.h index a9406dc83..283a41dd8 100644 --- a/include/RE/T/TESActorBaseData.h +++ b/include/RE/T/TESActorBaseData.h @@ -63,17 +63,17 @@ namespace RE }; // members - stl::enumeration actorBaseFlags; // 00 - std::int16_t magickaOffset; // 04 - std::int16_t staminaOffset; // 06 - std::uint16_t level; // 08 - std::uint16_t calcLevelMin; // 0A - std::uint16_t calcLevelMax; // 0C - std::uint16_t speedMult; // 0E - std::uint16_t baseDisposition; // 10 - unused - stl::enumeration templateUseFlags; // 12 - std::int16_t healthOffset; // 14 - std::int16_t bleedoutOverride; // 16 + REX::EnumSet actorBaseFlags; // 00 + std::int16_t magickaOffset; // 04 + std::int16_t staminaOffset; // 06 + std::uint16_t level; // 08 + std::uint16_t calcLevelMin; // 0A + std::uint16_t calcLevelMax; // 0C + std::uint16_t speedMult; // 0E + std::uint16_t baseDisposition; // 10 - unused + REX::EnumSet templateUseFlags; // 12 + std::int16_t healthOffset; // 14 + std::int16_t bleedoutOverride; // 16 }; static_assert(sizeof(ACTOR_BASE_DATA) == 0x18); diff --git a/include/RE/T/TESAmmo.h b/include/RE/T/TESAmmo.h index 481e5c3d1..dade13d7a 100644 --- a/include/RE/T/TESAmmo.h +++ b/include/RE/T/TESAmmo.h @@ -27,11 +27,11 @@ namespace RE }; // members - BGSProjectile* projectile; // 00 - stl::enumeration flags; // 08 - std::uint8_t pa09; // 09 - std::uint16_t pa0A; // 0A - float damage; // 0C + BGSProjectile* projectile; // 00 + REX::EnumSet flags; // 08 + std::uint8_t pa09; // 09 + std::uint16_t pa0A; // 0A + float damage; // 0C }; static_assert(sizeof(AMMO_DATA) == 0x10); diff --git a/include/RE/T/TESClass.h b/include/RE/T/TESClass.h index 1c00fecf5..422d33162 100644 --- a/include/RE/T/TESClass.h +++ b/include/RE/T/TESClass.h @@ -69,14 +69,14 @@ namespace RE static_assert(sizeof(AttributeWeights) == 0x3); // members - std::uint32_t unk00; // 00 - stl::enumeration teaches; // 04 - std::uint8_t maximumTrainingLevel; // 05 - SkillWeights skillWeights; // 06 - float bleedoutDefault; // 18 - std::uint32_t voicePoints; // 1C - AttributeWeights attributeWeights; // 20 - std::uint8_t pad23; // 23 + std::uint32_t unk00; // 00 + REX::EnumSet teaches; // 04 + std::uint8_t maximumTrainingLevel; // 05 + SkillWeights skillWeights; // 06 + float bleedoutDefault; // 18 + std::uint32_t voicePoints; // 1C + AttributeWeights attributeWeights; // 20 + std::uint8_t pad23; // 23 }; static_assert(sizeof(CLASS_DATA) == 0x24); diff --git a/include/RE/T/TESClimate.h b/include/RE/T/TESClimate.h index 8a46abc62..122b03ef1 100644 --- a/include/RE/T/TESClimate.h +++ b/include/RE/T/TESClimate.h @@ -67,12 +67,12 @@ namespace RE [[nodiscard]] std::uint8_t GetPhaseLength() const; // members - Interval sunrise; // 0 - Interval sunset; // 2 - std::uint8_t volatility; // 4 - stl::enumeration moonPhaseLength; // 5 - std::uint8_t unk6; // 6 - std::uint8_t unk7; // 7 + Interval sunrise; // 0 + Interval sunset; // 2 + std::uint8_t volatility; // 4 + REX::EnumSet moonPhaseLength; // 5 + std::uint8_t unk6; // 6 + std::uint8_t unk7; // 7 }; static_assert(sizeof(Timing) == 0x8); diff --git a/include/RE/T/TESCombatEvent.h b/include/RE/T/TESCombatEvent.h index 0089eb30a..aee3e9365 100644 --- a/include/RE/T/TESCombatEvent.h +++ b/include/RE/T/TESCombatEvent.h @@ -17,10 +17,10 @@ namespace RE { public: // members - NiPointer actor; // 00 - NiPointer targetActor; // 08 - stl::enumeration newState; // 10 - std::uint32_t pad14{ 0 }; // 14 + NiPointer actor; // 00 + NiPointer targetActor; // 08 + REX::EnumSet newState; // 10 + std::uint32_t pad14{ 0 }; // 14 }; static_assert(sizeof(TESCombatEvent) == 0x18); } diff --git a/include/RE/T/TESCombatStyle.h b/include/RE/T/TESCombatStyle.h index 898dd3bbb..045c6ec07 100644 --- a/include/RE/T/TESCombatStyle.h +++ b/include/RE/T/TESCombatStyle.h @@ -94,12 +94,12 @@ namespace RE void InitItemImpl() override; // 13 // members - CombatStyleGeneralData generalData; // 20 - CSGD - CombatStyleMeleeData meleeData; // 48 - CSME - CombatStyleCloseRangeData closeRangeData; // 68 - CSCR - CombatStyleLongRangeData longRangeData; // 78 - CSLR - CombatStyleFlightData flightData; // 7C - CSFL - stl::enumeration flags; // 9C - DATA + CombatStyleGeneralData generalData; // 20 - CSGD + CombatStyleMeleeData meleeData; // 48 - CSME + CombatStyleCloseRangeData closeRangeData; // 68 - CSCR + CombatStyleLongRangeData longRangeData; // 78 - CSLR + CombatStyleFlightData flightData; // 7C - CSFL + REX::EnumSet flags; // 9C - DATA }; static_assert(sizeof(TESCombatStyle) == 0xA0); } diff --git a/include/RE/T/TESCondition.h b/include/RE/T/TESCondition.h index bd20bc6e3..df6d95d1b 100644 --- a/include/RE/T/TESCondition.h +++ b/include/RE/T/TESCondition.h @@ -887,10 +887,10 @@ namespace RE ~FUNCTION_DATA() = default; // members - stl::enumeration function; // 00 - std::uint16_t pad02; // 02 - std::uint32_t pad04; // 04 - void* params[2]; // 08 + REX::EnumSet function; // 00 + std::uint16_t pad02; // 02 + std::uint32_t pad04; // 04 + void* params[2]; // 08 }; static_assert(sizeof(FUNCTION_DATA) == 0x18); @@ -937,14 +937,14 @@ namespace RE ~CONDITION_ITEM_DATA() = default; // members - GlobalOrFloat comparisonValue; // 08 - ObjectRefHandle runOnRef; // 10 - kReference - std::uint32_t dataID; // 14 - FUNCTION_DATA functionData; // 18 - Flags flags; // 30 - stl::enumeration object; // 31 - std::uint16_t pad32; // 32 - std::uint32_t pad34; // 34 + GlobalOrFloat comparisonValue; // 08 + ObjectRefHandle runOnRef; // 10 - kReference + std::uint32_t dataID; // 14 + FUNCTION_DATA functionData; // 18 + Flags flags; // 30 + REX::EnumSet object; // 31 + std::uint16_t pad32; // 32 + std::uint32_t pad34; // 34 }; static_assert(sizeof(CONDITION_ITEM_DATA) == 0x30); diff --git a/include/RE/T/TESEffectShader.h b/include/RE/T/TESEffectShader.h index 1655fa6d7..7d9178608 100644 --- a/include/RE/T/TESEffectShader.h +++ b/include/RE/T/TESEffectShader.h @@ -169,7 +169,7 @@ namespace RE float particleShaderAnimatedFrameCount; // 188 float particleShaderAnimatedFrameCountVariance; // 18C - stl::enumeration flags; // 190 + REX::EnumSet flags; // 190 float fillTextureEffectTextureScaleU; // 194 float fillTextureEffectTextureScaleV; // 198 diff --git a/include/RE/T/TESEnchantableForm.h b/include/RE/T/TESEnchantableForm.h index ba74b238b..ea5e34f26 100644 --- a/include/RE/T/TESEnchantableForm.h +++ b/include/RE/T/TESEnchantableForm.h @@ -24,10 +24,10 @@ namespace RE [[nodiscard]] virtual MagicSystem::CastingType GetCastingType() const; // 04 - { return castingType; } // members - EnchantmentItem* formEnchanting; // 08 - EITM - stl::enumeration castingType; // 10 - std::uint16_t amountofEnchantment; // 12 - EAMT - std::uint32_t pad14; // 14 + EnchantmentItem* formEnchanting; // 08 - EITM + REX::EnumSet castingType; // 10 + std::uint16_t amountofEnchantment; // 12 - EAMT + std::uint32_t pad14; // 14 }; static_assert(sizeof(TESEnchantableForm) == 0x18); } diff --git a/include/RE/T/TESEyes.h b/include/RE/T/TESEyes.h index adf1d544e..071b8b9b2 100644 --- a/include/RE/T/TESEyes.h +++ b/include/RE/T/TESEyes.h @@ -42,10 +42,10 @@ namespace RE bool Load(TESFile* a_mod) override; // 06 - { return true; } // members - stl::enumeration flags; // 40 - DATA - std::uint8_t pad41; // 41 - std::uint16_t pad42; // 42 - std::uint32_t pad44; // 44 + REX::EnumSet flags; // 40 - DATA + std::uint8_t pad41; // 41 + std::uint16_t pad42; // 42 + std::uint32_t pad44; // 44 }; static_assert(sizeof(TESEyes) == 0x48); } diff --git a/include/RE/T/TESFile.h b/include/RE/T/TESFile.h index 353b80f55..68681e4fc 100644 --- a/include/RE/T/TESFile.h +++ b/include/RE/T/TESFile.h @@ -69,71 +69,71 @@ namespace RE bool SeekNextSubrecord(); // members - stl::enumeration lastError; // 000 - std::uint32_t pad004; // 004 - TESFile* threadSafeParent; // 008 - void* threadSafeFileMap; // 010 - NiTPointerMap* - size == 0x20 - std::uint64_t unk018; // 018 - std::uint64_t unk020; // 020 - std::uint8_t unk028; // 028 - std::uint8_t unk029; // 029 - std::uint16_t pad02A; // 02A - std::uint32_t pad02C; // 02C - BSFile* lockedFile; // 030 - BSFile* file; // 038 - TESBitArrayFile* formUserDataBitArray; // 040 - TESBitArrayFile* formVersionBitArray; // 048 - TESBitArrayFile* formIDBitArray; // 050 - char fileName[REX::W32::MAX_PATH]; // 058 - char path[REX::W32::MAX_PATH]; // 15C - char* buffer; // 260 - std::uint32_t bufferAllocSize; // 268 - std::uint32_t firstCellOffset; // 26C - std::uint32_t currCellOffset; // 270 - std::uint32_t unk274; // 274 - TESObjectCELL* currCell; // 278 - std::uint32_t currRefOffset; // 280 - FORM currentform; // 284 - std::uint32_t currentchunkID; // 29C - std::uint32_t actualChunkSize; // 2A0 - std::uint32_t filesize; // 2A4 - std::uint32_t fileOffset; // 2A8 - std::uint32_t formoffset; // 2AC - std::uint32_t chunkoffset; // 2B0 - FORM saveform; // 2B4 - std::uint32_t saveFormOffset; // 2CC - std::uint64_t saveChunkOffset; // 2D0 - std::uint64_t unk2D8; // 2D8 - std::uint64_t unk2E0; // 2E0 - std::uint8_t unk2E8; // 2E8 - bool isBigEndian; // 2E9 - std::uint8_t unk2EA; // 2EA - std::uint8_t pad2EB; // 2EB - REX::W32::WIN32_FIND_DATAA fileData; // 2EC - float unk42C; // 42C - std::uint32_t unk430; // 430 - std::uint32_t flags; // 434 - stl::enumeration recordFlags; // 438 - std::uint32_t pad43C; // 43C - BSSimpleList masters; // 440 - BSSimpleList mastersData; // 450 - std::uint32_t masterCount; // 460 - std::uint32_t pad464; // 464 - TESFile** masterPtrs; // 468 - REX::W32::FILETIME deletedFormTime; // 470 - std::uint8_t compileIndex; // 478 - std::uint8_t pad479; // 479 - std::uint16_t smallFileCompileIndex; // 47A - std::uint32_t pad47C; // 47C - BSString createdBy; // 480 - BSString summary; // 490 - char* decompressedFormBuffer; // 4A0 - std::uint32_t decompressedFormBufferSize; // 4A8 - std::uint32_t pad4AC; // 4AC - void* reservedDecompressionBuffer; // 4B0 - std::uint32_t reservedDecompressionBufferSize; // 4B8 - std::uint32_t pad4BC; // 4BC - void* unk4C0; // 4C0 + REX::EnumSet lastError; // 000 + std::uint32_t pad004; // 004 + TESFile* threadSafeParent; // 008 + void* threadSafeFileMap; // 010 - NiTPointerMap* - size == 0x20 + std::uint64_t unk018; // 018 + std::uint64_t unk020; // 020 + std::uint8_t unk028; // 028 + std::uint8_t unk029; // 029 + std::uint16_t pad02A; // 02A + std::uint32_t pad02C; // 02C + BSFile* lockedFile; // 030 + BSFile* file; // 038 + TESBitArrayFile* formUserDataBitArray; // 040 + TESBitArrayFile* formVersionBitArray; // 048 + TESBitArrayFile* formIDBitArray; // 050 + char fileName[REX::W32::MAX_PATH]; // 058 + char path[REX::W32::MAX_PATH]; // 15C + char* buffer; // 260 + std::uint32_t bufferAllocSize; // 268 + std::uint32_t firstCellOffset; // 26C + std::uint32_t currCellOffset; // 270 + std::uint32_t unk274; // 274 + TESObjectCELL* currCell; // 278 + std::uint32_t currRefOffset; // 280 + FORM currentform; // 284 + std::uint32_t currentchunkID; // 29C + std::uint32_t actualChunkSize; // 2A0 + std::uint32_t filesize; // 2A4 + std::uint32_t fileOffset; // 2A8 + std::uint32_t formoffset; // 2AC + std::uint32_t chunkoffset; // 2B0 + FORM saveform; // 2B4 + std::uint32_t saveFormOffset; // 2CC + std::uint64_t saveChunkOffset; // 2D0 + std::uint64_t unk2D8; // 2D8 + std::uint64_t unk2E0; // 2E0 + std::uint8_t unk2E8; // 2E8 + bool isBigEndian; // 2E9 + std::uint8_t unk2EA; // 2EA + std::uint8_t pad2EB; // 2EB + REX::W32::WIN32_FIND_DATAA fileData; // 2EC + float unk42C; // 42C + std::uint32_t unk430; // 430 + std::uint32_t flags; // 434 + REX::EnumSet recordFlags; // 438 + std::uint32_t pad43C; // 43C + BSSimpleList masters; // 440 + BSSimpleList mastersData; // 450 + std::uint32_t masterCount; // 460 + std::uint32_t pad464; // 464 + TESFile** masterPtrs; // 468 + REX::W32::FILETIME deletedFormTime; // 470 + std::uint8_t compileIndex; // 478 + std::uint8_t pad479; // 479 + std::uint16_t smallFileCompileIndex; // 47A + std::uint32_t pad47C; // 47C + BSString createdBy; // 480 + BSString summary; // 490 + char* decompressedFormBuffer; // 4A0 + std::uint32_t decompressedFormBufferSize; // 4A8 + std::uint32_t pad4AC; // 4AC + void* reservedDecompressionBuffer; // 4B0 + std::uint32_t reservedDecompressionBufferSize; // 4B8 + std::uint32_t pad4BC; // 4BC + void* unk4C0; // 4C0 }; static_assert(sizeof(TESFile) == 0x4C8); } diff --git a/include/RE/T/TESForm.h b/include/RE/T/TESForm.h index 565e1c5da..68b3a4c6a 100644 --- a/include/RE/T/TESForm.h +++ b/include/RE/T/TESForm.h @@ -314,7 +314,7 @@ namespace RE template [[nodiscard]] bool Is(Args... a_args) const noexcept // - requires(std::same_as&&...) + requires(std::same_as && ...) { return (Is(a_args) || ...); } @@ -334,7 +334,7 @@ namespace RE template [[nodiscard]] bool IsNot(Args... a_args) const noexcept // - requires(std::same_as&&...) + requires(std::same_as && ...) { return (IsNot(a_args) && ...); } @@ -349,13 +349,13 @@ namespace RE void SetPlayerKnows(bool a_known); // members - TESFileContainer sourceFiles; // 08 - std::uint32_t formFlags; // 10 - FormID formID; // 14 - stl::enumeration inGameFormFlags; // 18 - stl::enumeration formType; // 1A - std::uint8_t pad1B; // 1B - std::uint32_t pad1C; // 1C + TESFileContainer sourceFiles; // 08 + std::uint32_t formFlags; // 10 + FormID formID; // 14 + REX::EnumSet inGameFormFlags; // 18 + REX::EnumSet formType; // 1A + std::uint8_t pad1B; // 1B + std::uint32_t pad1C; // 1C }; static_assert(sizeof(TESForm) == 0x20); } diff --git a/include/RE/T/TESFurniture.h b/include/RE/T/TESFurniture.h index 27a2c8c9c..18143f8dc 100644 --- a/include/RE/T/TESFurniture.h +++ b/include/RE/T/TESFurniture.h @@ -81,8 +81,8 @@ namespace RE }; // members - stl::enumeration benchType; // 0 - stl::enumeration usesSkill; // 1 + REX::EnumSet benchType; // 0 + REX::EnumSet usesSkill; // 1 }; static_assert(sizeof(WorkBenchData) == 0x2); @@ -103,8 +103,8 @@ namespace RE }; // members - std::uint16_t unk0; // 0 - stl::enumeration disabledPoints; // 2 + std::uint16_t unk0; // 0 + REX::EnumSet disabledPoints; // 2 }; static_assert(sizeof(DisabledEntryPoint) == 0x4); @@ -128,11 +128,11 @@ namespace RE bool CalculateDoFavor(Actor* a_activator, bool a_arg2, TESObjectREFR* a_toActivate, float a_arg3) override; // 4D // members - BSTArray entryPointDataArray; // C8 - WorkBenchData workBenchData; // E0 - WBDT - std::uint16_t padE2; // E2 - stl::enumeration furnFlags; // E4 - SpellItem* associatedForm; // E8 + BSTArray entryPointDataArray; // C8 + WorkBenchData workBenchData; // E0 - WBDT + std::uint16_t padE2; // E2 + REX::EnumSet furnFlags; // E4 + SpellItem* associatedForm; // E8 }; static_assert(sizeof(TESFurniture) == 0xF0); } diff --git a/include/RE/T/TESFurnitureEvent.h b/include/RE/T/TESFurnitureEvent.h index 7e4070b86..b3f0514c0 100644 --- a/include/RE/T/TESFurnitureEvent.h +++ b/include/RE/T/TESFurnitureEvent.h @@ -16,9 +16,9 @@ namespace RE }; // members - NiPointer actor; // 00 - NiPointer targetFurniture; // 08 - stl::enumeration type; // 10 + NiPointer actor; // 00 + NiPointer targetFurniture; // 08 + REX::EnumSet type; // 10 }; static_assert(sizeof(TESFurnitureEvent) == 0x18); } diff --git a/include/RE/T/TESGlobal.h b/include/RE/T/TESGlobal.h index 32d723d06..ed9061a00 100644 --- a/include/RE/T/TESGlobal.h +++ b/include/RE/T/TESGlobal.h @@ -38,11 +38,11 @@ namespace RE bool SetFormEditorID(const char* a_str) override; // 33 - { formEditorID = a_str; return true; } // members - BSString formEditorID; // 20 - EDID - stl::enumeration type; // 30 - ENAM - std::uint8_t pad31; // 31 - std::uint16_t pad32; // 32 - float value; // 34 - FLTV + BSString formEditorID; // 20 - EDID + REX::EnumSet type; // 30 - ENAM + std::uint8_t pad31; // 31 + std::uint16_t pad32; // 32 + float value; // 34 - FLTV }; static_assert(sizeof(TESGlobal) == 0x38); } diff --git a/include/RE/T/TESGrass.h b/include/RE/T/TESGrass.h index 5a84772df..e01d90d34 100644 --- a/include/RE/T/TESGrass.h +++ b/include/RE/T/TESGrass.h @@ -46,20 +46,20 @@ namespace RE kFitSlope = 1 << 2 }; - std::int8_t density; // 00 - std::int8_t minSlopeDegrees; // 01 - std::int8_t maxSlopeDegrees; // 02 - std::uint8_t pad03; // 03 - std::uint16_t distanceFromWaterLevel; // 04 - std::uint16_t pad06; // 06 - stl::enumeration underwater; // 08 - float positionRange; // 0C - float heightRange; // 10 - float colorRange; // 14 - float wavePeriod; // 18 - stl::enumeration flags; // 1C - std::uint8_t pad1D; // 1D - std::uint16_t pad1E; // 1E + std::int8_t density; // 00 + std::int8_t minSlopeDegrees; // 01 + std::int8_t maxSlopeDegrees; // 02 + std::uint8_t pad03; // 03 + std::uint16_t distanceFromWaterLevel; // 04 + std::uint16_t pad06; // 06 + REX::EnumSet underwater; // 08 + float positionRange; // 0C + float heightRange; // 10 + float colorRange; // 14 + float wavePeriod; // 18 + REX::EnumSet flags; // 1C + std::uint8_t pad1D; // 1D + std::uint16_t pad1E; // 1E }; static_assert(sizeof(GRASS_DATA) == 0x20); diff --git a/include/RE/T/TESHitEvent.h b/include/RE/T/TESHitEvent.h index fe893aff3..df705b95b 100644 --- a/include/RE/T/TESHitEvent.h +++ b/include/RE/T/TESHitEvent.h @@ -23,14 +23,14 @@ namespace RE ~TESHitEvent() = default; // members - NiPointer target; // 00 - NiPointer cause; // 08 - FormID source; // 10 - FormID projectile; // 14 - stl::enumeration flags; // 18 - std::uint8_t pad19; // 19 - std::uint16_t pad1A; // 1A - std::uint32_t pad1C; // 1C + NiPointer target; // 00 + NiPointer cause; // 08 + FormID source; // 10 + FormID projectile; // 14 + REX::EnumSet flags; // 18 + std::uint8_t pad19; // 19 + std::uint16_t pad1A; // 1A + std::uint32_t pad1C; // 1C }; static_assert(sizeof(TESHitEvent) == 0x20); } diff --git a/include/RE/T/TESIdleForm.h b/include/RE/T/TESIdleForm.h index e9c625d2f..fd7b23599 100644 --- a/include/RE/T/TESIdleForm.h +++ b/include/RE/T/TESIdleForm.h @@ -25,11 +25,11 @@ namespace RE }; // members - std::int8_t loopMin; // 0 - std::int8_t loopMax; // 1 - stl::enumeration flags; // 2 - std::uint8_t animationGroupSelection; // 3 - std::uint16_t replayDelay; // 4 + std::int8_t loopMin; // 0 + std::int8_t loopMax; // 1 + REX::EnumSet flags; // 2 + std::uint8_t animationGroupSelection; // 3 + std::uint16_t replayDelay; // 4 }; static_assert(sizeof(IDLE_DATA) == 0x6); diff --git a/include/RE/T/TESImageSpaceModifier.h b/include/RE/T/TESImageSpaceModifier.h index fd680102c..e5e42d7a4 100644 --- a/include/RE/T/TESImageSpaceModifier.h +++ b/include/RE/T/TESImageSpaceModifier.h @@ -72,12 +72,12 @@ namespace RE using Mode = ImageSpaceModifierInstanceDOF::DepthOfFieldMode; // members - std::uint32_t strength; // 00 - std::uint32_t distance; // 04 - std::uint32_t range; // 08 - bool useTarget; // 0C - stl::enumeration flags; // 0D - std::uint16_t pad0E; // 0E + std::uint32_t strength; // 00 + std::uint32_t distance; // 04 + std::uint32_t range; // 08 + bool useTarget; // 0C + REX::EnumSet flags; // 0D + std::uint16_t pad0E; // 0E }; static_assert(sizeof(DOF) == 0x10); diff --git a/include/RE/T/TESNPC.h b/include/RE/T/TESNPC.h index eafc5ae33..e6b6cabf7 100644 --- a/include/RE/T/TESNPC.h +++ b/include/RE/T/TESNPC.h @@ -264,37 +264,37 @@ namespace RE void UpdateNeck(BSFaceGenNiNode* a_faceNode); // members - Skills playerSkills; // 190 - DNAM - TESClass* npcClass; // 1C0 - CNAM - HeadRelatedData* headRelatedData; // 1C8 - BGSListForm* giftFilter; // 1D0 - GNAM - TESCombatStyle* combatStyle; // 1D8 - ZNAM - std::uint32_t fileOffset; // 1E0 - std::uint32_t pad1E4; // 1E4 - TESRace* originalRace; // 1E8 - TESNPC* faceNPC; // 1F0 - float height; // 1F8 - NAM6 - float weight; // 1FC - NAM7 - Sounds sounds; // 200 - CSCR - BSFixedString shortName; // 208 - SHRT - TESObjectARMO* farSkin; // 210 - ANAM - BGSOutfit* defaultOutfit; // 218 - DOFT - BGSOutfit* sleepOutfit; // 220 - SOFT - BGSListForm* defaultPackList; // 228 - DPLT - TESFaction* crimeFaction; // 230 - CRIF - BGSHeadPart** headParts; // 238 - PNAM - std::int8_t numHeadParts; // 240 - std::uint8_t unk241; // 241 - std::uint8_t unk242; // 242 - std::uint8_t unk243; // 243 - std::uint8_t unk244; // 244 - stl::enumeration soundLevel; // 245 - NAM8 - Color bodyTintColor; // 246 - QNAM - std::uint16_t pad24A; // 24A - std::uint32_t pad24C; // 24C - BSTArray* relationships; // 250 - FaceData* faceData; // 258 - BSTArray* tintLayers; // 260 + Skills playerSkills; // 190 - DNAM + TESClass* npcClass; // 1C0 - CNAM + HeadRelatedData* headRelatedData; // 1C8 + BGSListForm* giftFilter; // 1D0 - GNAM + TESCombatStyle* combatStyle; // 1D8 - ZNAM + std::uint32_t fileOffset; // 1E0 + std::uint32_t pad1E4; // 1E4 + TESRace* originalRace; // 1E8 + TESNPC* faceNPC; // 1F0 + float height; // 1F8 - NAM6 + float weight; // 1FC - NAM7 + Sounds sounds; // 200 - CSCR + BSFixedString shortName; // 208 - SHRT + TESObjectARMO* farSkin; // 210 - ANAM + BGSOutfit* defaultOutfit; // 218 - DOFT + BGSOutfit* sleepOutfit; // 220 - SOFT + BGSListForm* defaultPackList; // 228 - DPLT + TESFaction* crimeFaction; // 230 - CRIF + BGSHeadPart** headParts; // 238 - PNAM + std::int8_t numHeadParts; // 240 + std::uint8_t unk241; // 241 + std::uint8_t unk242; // 242 + std::uint8_t unk243; // 243 + std::uint8_t unk244; // 244 + REX::EnumSet soundLevel; // 245 - NAM8 + Color bodyTintColor; // 246 - QNAM + std::uint16_t pad24A; // 24A + std::uint32_t pad24C; // 24C + BSTArray* relationships; // 250 + FaceData* faceData; // 258 + BSTArray* tintLayers; // 260 private: void CopyPerkRankArray(const std::vector& a_copiedData); diff --git a/include/RE/T/TESObjectACTI.h b/include/RE/T/TESObjectACTI.h index ccf519db0..08b96181d 100644 --- a/include/RE/T/TESObjectACTI.h +++ b/include/RE/T/TESObjectACTI.h @@ -73,12 +73,12 @@ namespace RE bool CalculateDoFavor(Actor* a_activator, bool a_arg2, TESObjectREFR* a_toActivate, float a_arg3) override; // 4D // members - BGSSoundDescriptorForm* soundLoop; // A8 - SNAM - BGSSoundDescriptorForm* soundActivate; // B0 - VNAM - TESWaterForm* waterForm; // B8 - WNAM - stl::enumeration flags; // C0 - FNAM - std::uint16_t padC2; // C2 - std::uint32_t padC4; // C4 + BGSSoundDescriptorForm* soundLoop; // A8 - SNAM + BGSSoundDescriptorForm* soundActivate; // B0 - VNAM + TESWaterForm* waterForm; // B8 - WNAM + REX::EnumSet flags; // C0 - FNAM + std::uint16_t padC2; // C2 + std::uint32_t padC4; // C4 }; static_assert(sizeof(TESObjectACTI) == 0xC8); } diff --git a/include/RE/T/TESObjectBOOK.h b/include/RE/T/TESObjectBOOK.h index 0fbda465f..28980d921 100644 --- a/include/RE/T/TESObjectBOOK.h +++ b/include/RE/T/TESObjectBOOK.h @@ -43,11 +43,11 @@ namespace RE [[nodiscard]] Flag GetSanitizedType() const; // members - stl::enumeration flags; // 00 - stl::enumeration type; // 01 - std::uint16_t pad02; // 02 - std::uint32_t pad04; // 04 - Teaches teaches; // 08 + REX::EnumSet flags; // 00 + REX::EnumSet type; // 01 + std::uint16_t pad02; // 02 + std::uint32_t pad04; // 04 + Teaches teaches; // 08 }; static_assert(sizeof(OBJ_BOOK) == 0x10); diff --git a/include/RE/T/TESObjectCELL.h b/include/RE/T/TESObjectCELL.h index 7821adebf..5a6f91f29 100644 --- a/include/RE/T/TESObjectCELL.h +++ b/include/RE/T/TESObjectCELL.h @@ -54,16 +54,16 @@ namespace RE }; // members - std::int32_t cellX; // 00 - std::int32_t cellY; // 04 - char* maxHeightData; // 08 - BGSTerrainVisibilityData* lodVisData; // 10 - float worldX; // 18 - float worldY; // 1C - stl::enumeration landHideFlags; // 20 - std::uint8_t pad21; // 21 - std::uint16_t pad22; // 22 - std::uint32_t pad24; // 24 + std::int32_t cellX; // 00 + std::int32_t cellY; // 04 + char* maxHeightData; // 08 + BGSTerrainVisibilityData* lodVisData; // 10 + float worldX; // 18 + float worldY; // 1C + REX::EnumSet landHideFlags; // 20 + std::uint8_t pad21; // 21 + std::uint16_t pad22; // 22 + std::uint32_t pad24; // 24 }; static_assert(sizeof(EXTERIOR_DATA) == 0x28); @@ -221,9 +221,9 @@ namespace RE // members mutable BSSpinLock grassCreateLock; // 030 mutable BSSpinLock grassTaskLock; // 038 - stl::enumeration cellFlags; // 040 + REX::EnumSet cellFlags; // 040 std::uint16_t cellGameFlags; // 042 - stl::enumeration cellState; // 044 + REX::EnumSet cellState; // 044 bool autoWaterLoaded; // 045 bool cellDetached; // 046 std::uint8_t pad047; // 047 diff --git a/include/RE/T/TESObjectCONT.h b/include/RE/T/TESObjectCONT.h index 05457974e..02a8490b0 100644 --- a/include/RE/T/TESObjectCONT.h +++ b/include/RE/T/TESObjectCONT.h @@ -23,7 +23,7 @@ namespace RE kShowOwner = 1 << 2 }; - stl::enumeration flags; // 0 + REX::EnumSet flags; // 0 }; static_assert(sizeof(CONT_DATA) == 0x1); diff --git a/include/RE/T/TESObjectDOOR.h b/include/RE/T/TESObjectDOOR.h index 62c3237ed..76655b467 100644 --- a/include/RE/T/TESObjectDOOR.h +++ b/include/RE/T/TESObjectDOOR.h @@ -75,15 +75,15 @@ namespace RE } // members - std::uint64_t unk90; // 90 - BGSSoundDescriptorForm* openSound; // 98 - SNAM - BGSSoundDescriptorForm* closeSound; // A0 - ANAM - BGSSoundDescriptorForm* loopSound; // A8 - BNAM - stl::enumeration flags; // B0 - FNAM - std::uint8_t padB1; // B1 - std::uint16_t padB2; // B2 - std::uint32_t padB4; // B4 - BSTArray randomTeleports; // B8 + std::uint64_t unk90; // 90 + BGSSoundDescriptorForm* openSound; // 98 - SNAM + BGSSoundDescriptorForm* closeSound; // A0 - ANAM + BGSSoundDescriptorForm* loopSound; // A8 - BNAM + REX::EnumSet flags; // B0 - FNAM + std::uint8_t padB1; // B1 + std::uint16_t padB2; // B2 + std::uint32_t padB4; // B4 + BSTArray randomTeleports; // B8 }; static_assert(sizeof(TESObjectDOOR) == 0xD0); } diff --git a/include/RE/T/TESObjectLAND.h b/include/RE/T/TESObjectLAND.h index 1a8f259c1..b5fcff0a3 100644 --- a/include/RE/T/TESObjectLAND.h +++ b/include/RE/T/TESObjectLAND.h @@ -26,7 +26,7 @@ namespace RE }; // members - stl::enumeration flags; // 0 + REX::EnumSet flags; // 0 }; static_assert(sizeof(OBJ_LAND) == 0x4); diff --git a/include/RE/T/TESObjectLIGH.h b/include/RE/T/TESObjectLIGH.h index 8bf210f4d..2ad53bb9d 100644 --- a/include/RE/T/TESObjectLIGH.h +++ b/include/RE/T/TESObjectLIGH.h @@ -42,16 +42,16 @@ namespace RE { public: // members - std::int32_t time; // 00 - std::uint32_t radius; // 04 - Color color; // 08 - stl::enumeration flags; // 0C - float fallofExponent; // 10 - float fov; // 14 - float nearDistance; // 18 - float flickerPeriodRecip; // 1C - CK value * 100 - float flickerIntensityAmplitude; // 20 - float flickerMovementAmplitude; // 24 + std::int32_t time; // 00 + std::uint32_t radius; // 04 + Color color; // 08 + REX::EnumSet flags; // 0C + float fallofExponent; // 10 + float fov; // 14 + float nearDistance; // 18 + float flickerPeriodRecip; // 1C - CK value * 100 + float flickerIntensityAmplitude; // 20 + float flickerMovementAmplitude; // 24 }; static_assert(sizeof(OBJ_LIGH) == 0x28); diff --git a/include/RE/T/TESObjectSTAT.h b/include/RE/T/TESObjectSTAT.h index a2a868935..629165657 100644 --- a/include/RE/T/TESObjectSTAT.h +++ b/include/RE/T/TESObjectSTAT.h @@ -16,11 +16,11 @@ namespace RE }; // members - float materialThresholdAngle; // 00 - (30 - 120) - std::uint32_t pad04; // 04 - BGSMaterialObject* materialObj; // 08 - stl::enumeration flags; // 10 - std::uint32_t pad14; // 14 + float materialThresholdAngle; // 00 - (30 - 120) + std::uint32_t pad04; // 04 + BGSMaterialObject* materialObj; // 08 + REX::EnumSet flags; // 10 + std::uint32_t pad14; // 14 }; static_assert(sizeof(TESObjectSTATData) == 0x18); diff --git a/include/RE/T/TESObjectTREE.h b/include/RE/T/TESObjectTREE.h index 0362df371..2d5af54f6 100644 --- a/include/RE/T/TESObjectTREE.h +++ b/include/RE/T/TESObjectTREE.h @@ -89,10 +89,10 @@ namespace RE void OnFinishScale() override; // 52 - { return; } // members - OBJ_TREE data; // 88 - BaseTreeData* baseData; // B8 - stl::enumeration type; // C0 - std::uint32_t padC4; // C4 + OBJ_TREE data; // 88 + BaseTreeData* baseData; // B8 + REX::EnumSet type; // C0 + std::uint32_t padC4; // C4 }; static_assert(sizeof(TESObjectTREE) == 0xC8); } diff --git a/include/RE/T/TESObjectWEAP.h b/include/RE/T/TESObjectWEAP.h index 766cf91da..60db63baf 100644 --- a/include/RE/T/TESObjectWEAP.h +++ b/include/RE/T/TESObjectWEAP.h @@ -96,15 +96,15 @@ namespace RE { public: // members - float sightFOV; // 00 - float unk04; // 04 - float firingRumbleLeftMotorStrength; // 08 - float firingRumbleRightMotorStrength; // 0C - float firingRumbleDuration; // 10 - stl::enumeration rumblePattern; // 14 - std::int8_t numProjectiles; // 18 - std::uint8_t pad19; // 19 - std::uint16_t pad1A; // 1A + float sightFOV; // 00 + float unk04; // 04 + float firingRumbleLeftMotorStrength; // 08 + float firingRumbleRightMotorStrength; // 0C + float firingRumbleDuration; // 10 + REX::EnumSet rumblePattern; // 14 + std::int8_t numProjectiles; // 18 + std::uint8_t pad19; // 19 + std::uint16_t pad1A; // 1A }; static_assert(sizeof(RangedData) == 0x1C); @@ -164,24 +164,24 @@ namespace RE }; // members - RangedData* rangedData; // 00 - float speed; // 08 - float reach; // 0C - float minRange; // 10 - float maxRange; // 14 - float animationAttackMult; // 18 - float unk1C; // 1C - float staggerValue; // 20 - stl::enumeration hitBehavior; // 24 - stl::enumeration skill; // 28 - stl::enumeration resistance; // 2C - stl::enumeration flags2; // 30 - std::uint8_t baseVATSToHitChance; // 32 - stl::enumeration attackAnimation; // 33 - stl::enumeration embeddedWeaponAV; // 34 - unused - stl::enumeration animationType; // 35 - stl::enumeration flags; // 36 - std::uint8_t unk37; // 37 + RangedData* rangedData; // 00 + float speed; // 08 + float reach; // 0C + float minRange; // 10 + float maxRange; // 14 + float animationAttackMult; // 18 + float unk1C; // 1C + float staggerValue; // 20 + REX::EnumSet hitBehavior; // 24 + REX::EnumSet skill; // 28 + REX::EnumSet resistance; // 2C + REX::EnumSet flags2; // 30 + std::uint8_t baseVATSToHitChance; // 32 + REX::EnumSet attackAnimation; // 33 + REX::EnumSet embeddedWeaponAV; // 34 - unused + REX::EnumSet animationType; // 35 + REX::EnumSet flags; // 36 + std::uint8_t unk37; // 37 }; static_assert(sizeof(Data) == 0x38); @@ -195,13 +195,13 @@ namespace RE }; // members - float prcntMult; // 00 - std::uint32_t pad04; // 04 - SpellItem* effect; // 08 - std::uint16_t damage; // 10 - stl::enumeration flags; // 12 - std::uint8_t pad13; // 13 - std::uint32_t pad14; // 14 + float prcntMult; // 00 + std::uint32_t pad04; // 04 + SpellItem* effect; // 08 + std::uint16_t damage; // 10 + REX::EnumSet flags; // 12 + std::uint8_t pad13; // 13 + std::uint32_t pad14; // 14 }; static_assert(sizeof(CriticalData) == 0x18); @@ -254,22 +254,22 @@ namespace RE [[nodiscard]] bool IsCrossbow() const; // members - Data weaponData; // 168 - DNAM - CriticalData criticalData; // 1A0 - CRDT - Unk1B8* unk1B8; // 1B8 - BGSSoundDescriptorForm* attackSound; // 1C0 - SNAM - BGSSoundDescriptorForm* attackSound2D; // 1C8 - XNAM - BGSSoundDescriptorForm* attackLoopSound; // 1D0 - NAM7 - BGSSoundDescriptorForm* attackFailSound; // 1D8 - TNAM - BGSSoundDescriptorForm* idleSound; // 1E0 - UNAM - BGSSoundDescriptorForm* equipSound; // 1E8 - NAM9 - BGSSoundDescriptorForm* unequipSound; // 1F0 - NAM8 - BGSImpactDataSet* impactDataSet; // 1F8 - TESObjectSTAT* firstPersonModelObject; // 200 - WNAM - TESObjectWEAP* templateWeapon; // 208 - CNAM - BSFixedString embeddedNode; // 210 - stl::enumeration soundLevel; // 218 - VNAM - std::uint32_t pad21C; // 21C + Data weaponData; // 168 - DNAM + CriticalData criticalData; // 1A0 - CRDT + Unk1B8* unk1B8; // 1B8 + BGSSoundDescriptorForm* attackSound; // 1C0 - SNAM + BGSSoundDescriptorForm* attackSound2D; // 1C8 - XNAM + BGSSoundDescriptorForm* attackLoopSound; // 1D0 - NAM7 + BGSSoundDescriptorForm* attackFailSound; // 1D8 - TNAM + BGSSoundDescriptorForm* idleSound; // 1E0 - UNAM + BGSSoundDescriptorForm* equipSound; // 1E8 - NAM9 + BGSSoundDescriptorForm* unequipSound; // 1F0 - NAM8 + BGSImpactDataSet* impactDataSet; // 1F8 + TESObjectSTAT* firstPersonModelObject; // 200 - WNAM + TESObjectWEAP* templateWeapon; // 208 - CNAM + BSFixedString embeddedNode; // 210 + REX::EnumSet soundLevel; // 218 - VNAM + std::uint32_t pad21C; // 21C }; static_assert(sizeof(TESObjectWEAP) == 0x220); } diff --git a/include/RE/T/TESPackage.h b/include/RE/T/TESPackage.h index b97e6c6fc..0054b04c5 100644 --- a/include/RE/T/TESPackage.h +++ b/include/RE/T/TESPackage.h @@ -200,13 +200,13 @@ namespace RE }; // members - stl::enumeration packFlags; // 0 - stl::enumeration packType; // 4 - stl::enumeration interruptOverrideType; // 5 - stl::enumeration maxSpeed; // 6 - std::uint8_t pad7; // 7 - stl::enumeration foBehaviorFlags; // 8 - std::uint16_t packageSpecificFlags; // A + REX::EnumSet packFlags; // 0 + REX::EnumSet packType; // 4 + REX::EnumSet interruptOverrideType; // 5 + REX::EnumSet maxSpeed; // 6 + std::uint8_t pad7; // 7 + REX::EnumSet foBehaviorFlags; // 8 + std::uint16_t packageSpecificFlags; // A }; static_assert(sizeof(PACKAGE_DATA) == 0xC); @@ -222,12 +222,12 @@ namespace RE ~Target() {} // members - ObjectRefHandle handle; - TESForm* object; - TESForm* refOrObj; - stl::enumeration objType; - std::uint32_t aliasID; - stl::enumeration interruptTarg; + ObjectRefHandle handle; + TESForm* object; + TESForm* refOrObj; + REX::EnumSet objType; + std::uint32_t aliasID; + REX::EnumSet interruptTarg; }; static_assert(sizeof(Target) == 0x8); @@ -260,15 +260,15 @@ namespace RE }; // members - std::int8_t month; // 0 - stl::enumeration dayOfWeek; // 1 - std::int8_t date; // 2 - std::int8_t hour; // 3 - std::int8_t minute; // 4 - std::uint8_t pad5; // 5 - std::uint8_t pad6; // 6 - std::uint8_t pad7; // 7 - std::int32_t duration; // 8 - minutes + std::int8_t month; // 0 + REX::EnumSet dayOfWeek; // 1 + std::int8_t date; // 2 + std::int8_t hour; // 3 + std::int8_t minute; // 4 + std::uint8_t pad5; // 5 + std::uint8_t pad6; // 6 + std::uint8_t pad7; // 7 + std::int32_t duration; // 8 - minutes }; static_assert(sizeof(PACK_SCHED_DATA) == 0xC); @@ -292,17 +292,17 @@ namespace RE }; // members - stl::enumeration type; // 00 - std::uint32_t pad04; // 04 - TESTopic* topic; // 08 + REX::EnumSet type; // 00 + std::uint32_t pad04; // 04 + TESTopic* topic; // 08 }; static_assert(sizeof(TopicData) == 0x10); // members - TESIdleForm* idle; // 00 - INAM - stl::enumeration type; // 08 - std::uint32_t pad0C; // 0C - TopicData topic; // 10 - PDTO + TESIdleForm* idle; // 00 - INAM + REX::EnumSet type; // 08 + std::uint32_t pad0C; // 0C + TopicData topic; // 10 - PDTO }; static_assert(sizeof(PackageEventAction) == 0x20); @@ -366,22 +366,22 @@ namespace RE } // members - PACKAGE_DATA packData; // 20 - PKDT - std::uint32_t pad2C; // 2C - TESPackageData* data; // 30 - PackageLocation* packLoc; // 38 - PackageTarget* packTarg; // 40 - BGSIdleCollection* idleCollection; // 48 - PackageSchedule packSched; // 50 - PSDT - std::uint32_t pad5C; // 5C - TESCondition packConditions; // 60 - TESCombatStyle* combatStyle; // 68 - CNAM - TESQuest* ownerQuest; // 70 - QNAM - PackageEventAction onBegin; // 78 - PackageEventAction onEnd; // 98 - PackageEventAction onChange; // B8 - stl::enumeration procedureType; // D8 - volatile std::uint32_t refCount; // DC + PACKAGE_DATA packData; // 20 - PKDT + std::uint32_t pad2C; // 2C + TESPackageData* data; // 30 + PackageLocation* packLoc; // 38 + PackageTarget* packTarg; // 40 + BGSIdleCollection* idleCollection; // 48 + PackageSchedule packSched; // 50 - PSDT + std::uint32_t pad5C; // 5C + TESCondition packConditions; // 60 + TESCombatStyle* combatStyle; // 68 - CNAM + TESQuest* ownerQuest; // 70 - QNAM + PackageEventAction onBegin; // 78 + PackageEventAction onEnd; // 98 + PackageEventAction onChange; // B8 + REX::EnumSet procedureType; // D8 + volatile std::uint32_t refCount; // DC }; static_assert(sizeof(TESPackage) == 0xE0); } diff --git a/include/RE/T/TESQualityForm.h b/include/RE/T/TESQualityForm.h index 2d3f12f2b..34ba9e4e4 100644 --- a/include/RE/T/TESQualityForm.h +++ b/include/RE/T/TESQualityForm.h @@ -27,8 +27,8 @@ namespace RE void CopyComponent(BaseFormComponent* a_rhs) override; // 03 // members - stl::enumeration quality; // 08 - QUAL - std::uint32_t pad0C; // 0C + REX::EnumSet quality; // 08 - QUAL + std::uint32_t pad0C; // 0C }; static_assert(sizeof(TESQualityForm) == 0x10); } diff --git a/include/RE/T/TESQuest.h b/include/RE/T/TESQuest.h index cfcc871e0..8a8cc62c4 100644 --- a/include/RE/T/TESQuest.h +++ b/include/RE/T/TESQuest.h @@ -102,10 +102,10 @@ namespace RE }; // members - float questDelayTime; // 0 - stl::enumeration flags; // 4 - std::int8_t priority; // 6 - stl::enumeration questType; // 7 + float questDelayTime; // 0 + REX::EnumSet flags; // 4 + std::int8_t priority; // 6 + REX::EnumSet questType; // 7 }; static_assert(sizeof(QUEST_DATA) == 0x8); @@ -121,10 +121,10 @@ namespace RE }; // members - std::uint16_t index; // 0 - stl::enumeration flags; // 2 - std::uint8_t pad3; // 3 - std::uint32_t pad4; // 4 + std::uint16_t index; // 0 + REX::EnumSet flags; // 2 + std::uint8_t pad3; // 3 + std::uint32_t pad4; // 4 }; static_assert(sizeof(QUEST_STAGE_DATA) == 0x8); @@ -161,15 +161,15 @@ namespace RE { public: // members - BSFixedString displayText; // 00 - NNAM - TESQuest* ownerQuest; // 08 - TESQuestTarget** targets; // 10 - QSTA - std::uint32_t numTargets; // 18 - std::uint16_t index; // 1C - QOBJ - bool initialized; // 1E - stl::enumeration state; // 1E - stl::enumeration flags; // 20 - FNAM - std::uint32_t pad24; // 24 + BSFixedString displayText; // 00 - NNAM + TESQuest* ownerQuest; // 08 + TESQuestTarget** targets; // 10 - QSTA + std::uint32_t numTargets; // 18 + std::uint16_t index; // 1C - QOBJ + bool initialized; // 1E + REX::EnumSet state; // 1E + REX::EnumSet flags; // 20 - FNAM + std::uint32_t pad24; // 24 }; static_assert(sizeof(BGSQuestObjective) == 0x28); diff --git a/include/RE/T/TESRace.h b/include/RE/T/TESRace.h index d22ba4687..d5d7ff29c 100644 --- a/include/RE/T/TESRace.h +++ b/include/RE/T/TESRace.h @@ -94,43 +94,43 @@ namespace RE { public: // members - stl::enumeration skill; // 0 - std::uint8_t bonus; // 1 + REX::EnumSet skill; // 0 + std::uint8_t bonus; // 1 }; static_assert(sizeof(SkillBoost) == 0x2); // members - SkillBoost skillBoosts[kNumSkillBoosts]; // 00 - std::uint16_t pad0E; // 0E - float height[SEXES::kTotal]; // 10 - float weight[SEXES::kTotal]; // 18 - stl::enumeration flags; // 20 - float startingHealth; // 24 - float startingMagicka; // 28 - float startingStamina; // 2C - float baseCarryWeight; // 30 - float baseMass; // 34 - float accelerate; // 38 - float decelerate; // 3C - stl::enumeration raceSize; // 40 - stl::enumeration headObject; // 44 - stl::enumeration hairObject; // 48 - float injuredHealthPercent; // 4C - stl::enumeration shieldObject; // 50 - float healthRegen; // 54 - float magickaRegen; // 58 - float staminaRegen; // 5C - float unarmedDamage; // 60 - float unarmedReach; // 64 - stl::enumeration bodyObject; // 68 - float aimAngleTolerance; // 6C - float flightRadius; // 70 - float angleAccelerate; // 74 - float angleTolerance; // 78 - stl::enumeration flags2; // 7C - NiPoint3 mountOffset; // 80 - NiPoint3 dismountOffset; // 8C - NiPoint3 mountCameraOffset; // 98 + SkillBoost skillBoosts[kNumSkillBoosts]; // 00 + std::uint16_t pad0E; // 0E + float height[SEXES::kTotal]; // 10 + float weight[SEXES::kTotal]; // 18 + REX::EnumSet flags; // 20 + float startingHealth; // 24 + float startingMagicka; // 28 + float startingStamina; // 2C + float baseCarryWeight; // 30 + float baseMass; // 34 + float accelerate; // 38 + float decelerate; // 3C + REX::EnumSet raceSize; // 40 + REX::EnumSet headObject; // 44 + REX::EnumSet hairObject; // 48 + float injuredHealthPercent; // 4C + REX::EnumSet shieldObject; // 50 + float healthRegen; // 54 + float magickaRegen; // 58 + float staminaRegen; // 5C + float unarmedDamage; // 60 + float unarmedReach; // 64 + REX::EnumSet bodyObject; // 68 + float aimAngleTolerance; // 6C + float flightRadius; // 70 + float angleAccelerate; // 74 + float angleTolerance; // 78 + REX::EnumSet flags2; // 7C + NiPoint3 mountOffset; // 80 + NiPoint3 dismountOffset; // 8C + NiPoint3 mountCameraOffset; // 98 }; static_assert(sizeof(RACE_DATA) == 0xA4); @@ -244,12 +244,12 @@ namespace RE }; // members - std::uint16_t index; // 00 - TINI - stl::enumeration skinTone; // 02 - TINP - std::uint8_t pad03; // 03 - std::uint32_t pad04; // 04 - TESTexture file; // 08 - TINT - BGSColorForm* presetDefault; // 18 - TIND + std::uint16_t index; // 00 - TINI + REX::EnumSet skinTone; // 02 - TINP + std::uint8_t pad03; // 03 + std::uint32_t pad04; // 04 + TESTexture file; // 08 - TINT + BGSColorForm* presetDefault; // 18 - TIND }; static_assert(sizeof(TintLayer) == 0x20); @@ -310,42 +310,42 @@ namespace RE [[nodiscard]] bool IsChildRace() const; // members - TESModel skeletonModels[SEXES::kTotal]; // 098 - ANAM - RACE_DATA data; // 0E8 - float clampFaceGeoValue; // 18C - PNAM - float clampFaceGeoValue2; // 18C - UNAM - std::uint32_t pad194; // 194 - BGSTextureModel bodyTextureModels[SEXES::kTotal]; // 198 - BGSBehaviorGraphModel behaviorGraphs[SEXES::kTotal]; // 1E8 - BSFixedString rootBehaviorGraphNames[SEXES::kTotal]; // 238 - BSFixedString behaviorGraphProjectNames[SEXES::kTotal]; // 248 - BGSVoiceType* defaultVoiceTypes[SEXES::kTotal]; // 258 - VTCK - BGSBodyPartData* bodyPartData; // 268 - GNAM - TESObjectARMO* decapitateArmors[SEXES::kTotal]; // 270 - DNAM - UnkData unk280; // 280 - UnkData unk298; // 298 - std::uint64_t unk2B0; // 2B0 - std::uint64_t unk2B8; // 2B8 - std::uint64_t unk2C0; // 2C0 - std::uint64_t unk2C8; // 2C8 - AttackAnimationArrayMap* attackAnimationArrayMap[SEXES::kTotal]; // 2D0 - BSFixedString formEditorID; // 2E0 - EDID - BGSMaterialType* bloodImpactMaterial; // 2E8 - NAM4 - BGSImpactDataSet* impactDataSet; // 2F0 - NAM5 - BGSArtObject* dismemberBlood; // 2F8 - NAM7 - BGSSoundDescriptorForm* corpseOpenSound; // 300 - ONAM - BGSSoundDescriptorForm* corpseCloseSound; // 308 - LNAM - BSFixedString bipedObjectNameA[BIPED_OBJECTS::kEditorTotal]; // 310 - NAME - BSTArray equipSlots; // 410 - QNAM - stl::enumeration validEquipTypes; // 428 - VNAM - bits 13+ are always set - std::uint32_t unk42C; // 42C - TESModel::unk24 - BGSEquipSlot* unarmedEquipSlot; // 430 - UNES - TESRace* morphRace; // 438 - NAM8 - TESRace* armorParentRace; // 440 - RNAM - UnkData unk448; // 448 - BSTArray phonemeTargets; // 460 - PHTN - BGSMovementType* baseMoveTypes[MovementTypes::kTotal]; // 478 - WKMV / RNMV / WMMV / FLMV / SNMV / SPMV - FaceRelatedData* faceRelatedData[SEXES::kTotal]; // 4A8 + TESModel skeletonModels[SEXES::kTotal]; // 098 - ANAM + RACE_DATA data; // 0E8 + float clampFaceGeoValue; // 18C - PNAM + float clampFaceGeoValue2; // 18C - UNAM + std::uint32_t pad194; // 194 + BGSTextureModel bodyTextureModels[SEXES::kTotal]; // 198 + BGSBehaviorGraphModel behaviorGraphs[SEXES::kTotal]; // 1E8 + BSFixedString rootBehaviorGraphNames[SEXES::kTotal]; // 238 + BSFixedString behaviorGraphProjectNames[SEXES::kTotal]; // 248 + BGSVoiceType* defaultVoiceTypes[SEXES::kTotal]; // 258 - VTCK + BGSBodyPartData* bodyPartData; // 268 - GNAM + TESObjectARMO* decapitateArmors[SEXES::kTotal]; // 270 - DNAM + UnkData unk280; // 280 + UnkData unk298; // 298 + std::uint64_t unk2B0; // 2B0 + std::uint64_t unk2B8; // 2B8 + std::uint64_t unk2C0; // 2C0 + std::uint64_t unk2C8; // 2C8 + AttackAnimationArrayMap* attackAnimationArrayMap[SEXES::kTotal]; // 2D0 + BSFixedString formEditorID; // 2E0 - EDID + BGSMaterialType* bloodImpactMaterial; // 2E8 - NAM4 + BGSImpactDataSet* impactDataSet; // 2F0 - NAM5 + BGSArtObject* dismemberBlood; // 2F8 - NAM7 + BGSSoundDescriptorForm* corpseOpenSound; // 300 - ONAM + BGSSoundDescriptorForm* corpseCloseSound; // 308 - LNAM + BSFixedString bipedObjectNameA[BIPED_OBJECTS::kEditorTotal]; // 310 - NAME + BSTArray equipSlots; // 410 - QNAM + REX::EnumSet validEquipTypes; // 428 - VNAM - bits 13+ are always set + std::uint32_t unk42C; // 42C - TESModel::unk24 + BGSEquipSlot* unarmedEquipSlot; // 430 - UNES + TESRace* morphRace; // 438 - NAM8 + TESRace* armorParentRace; // 440 - RNAM + UnkData unk448; // 448 + BSTArray phonemeTargets; // 460 - PHTN + BGSMovementType* baseMoveTypes[MovementTypes::kTotal]; // 478 - WKMV / RNMV / WMMV / FLMV / SNMV / SPMV + FaceRelatedData* faceRelatedData[SEXES::kTotal]; // 4A8 }; static_assert(sizeof(TESRace) == 0x4B8); } diff --git a/include/RE/T/TESReactionForm.h b/include/RE/T/TESReactionForm.h index f11050b61..6729f07df 100644 --- a/include/RE/T/TESReactionForm.h +++ b/include/RE/T/TESReactionForm.h @@ -29,11 +29,11 @@ namespace RE void CopyComponent(BaseFormComponent* a_rhs) override; // 03 // members - BSSimpleList reactions; // 08 - XNAM - stl::enumeration groupFormType; // 18 - std::uint8_t pad19; // 19 - std::uint16_t pad1A; // 1A - std::uint32_t pad1C; // 1C + BSSimpleList reactions; // 08 - XNAM + REX::EnumSet groupFormType; // 18 + std::uint8_t pad19; // 19 + std::uint16_t pad1A; // 1A + std::uint32_t pad1C; // 1C }; static_assert(sizeof(TESReactionForm) == 0x20); } diff --git a/include/RE/T/TESRegionData.h b/include/RE/T/TESRegionData.h index fbca2bf9c..5a8b712d2 100644 --- a/include/RE/T/TESRegionData.h +++ b/include/RE/T/TESRegionData.h @@ -31,11 +31,11 @@ namespace RE }; // members - stl::enumeration flags; // 0 - std::uint8_t unk09; // 1 - std::uint8_t priority; // 2 - std::uint8_t unk0B; // 3 - std::uint32_t unk0C; // 4 + REX::EnumSet flags; // 0 + std::uint8_t unk09; // 1 + std::uint8_t priority; // 2 + std::uint8_t unk0B; // 3 + std::uint32_t unk0C; // 4 }; static_assert(sizeof(DataHeader) == 0x8); diff --git a/include/RE/T/TESRegionDataSound.h b/include/RE/T/TESRegionDataSound.h index 49b7df93a..74a3caade 100644 --- a/include/RE/T/TESRegionDataSound.h +++ b/include/RE/T/TESRegionDataSound.h @@ -27,9 +27,9 @@ namespace RE kSnowy = 1 << 3 }; - BGSSoundDescriptorForm* sound; // 00 - stl::enumeration flags; // 08 - float chance; // 0C + BGSSoundDescriptorForm* sound; // 00 + REX::EnumSet flags; // 08 + float chance; // 0C }; static_assert(sizeof(Sound) == 0x10); diff --git a/include/RE/T/TESSoulGem.h b/include/RE/T/TESSoulGem.h index 35a21a2ec..5e4c84960 100644 --- a/include/RE/T/TESSoulGem.h +++ b/include/RE/T/TESSoulGem.h @@ -38,11 +38,11 @@ namespace RE [[nodiscard]] constexpr SOUL_LEVEL GetMaximumCapacity() const noexcept { return *soulCapacity; } // members - TESSoulGem* linkedSoulGem; // 100 - NAM0 - stl::enumeration currentSoul; // 108 - SOUL - stl::enumeration soulCapacity; // 109 - SLCP - std::uint16_t unk10A; // 10A - std::uint32_t unk10C; // 10C + TESSoulGem* linkedSoulGem; // 100 - NAM0 + REX::EnumSet currentSoul; // 108 - SOUL + REX::EnumSet soulCapacity; // 109 - SLCP + std::uint16_t unk10A; // 10A + std::uint32_t unk10C; // 10C }; static_assert(sizeof(TESSoulGem) == 0x110); } diff --git a/include/RE/T/TESTopic.h b/include/RE/T/TESTopic.h index e17ffce4f..51c92473b 100644 --- a/include/RE/T/TESTopic.h +++ b/include/RE/T/TESTopic.h @@ -123,9 +123,9 @@ namespace RE kLeaveWaterBreath = 102 }; - stl::enumeration topicFlags; // 0 - stl::enumeration type; // 1 - stl::enumeration subtype; // 2 + REX::EnumSet topicFlags; // 0 + REX::EnumSet type; // 1 + REX::EnumSet subtype; // 2 }; static_assert(sizeof(DIALOGUE_DATA) == 0x4); diff --git a/include/RE/T/TESTopicInfo.h b/include/RE/T/TESTopicInfo.h index a4d82f439..53b3ad77b 100644 --- a/include/RE/T/TESTopicInfo.h +++ b/include/RE/T/TESTopicInfo.h @@ -33,8 +33,8 @@ namespace RE [[nodiscard]] float GetResetHours() const; - stl::enumeration flags; // 0 - std::uint16_t timeUntilReset; // 2 - reset hours as a std::uint16_t + REX::EnumSet flags; // 0 + std::uint16_t timeUntilReset; // 2 - reset hours as a std::uint16_t }; static_assert(sizeof(TOPIC_INFO_DATA) == 0x4); @@ -96,22 +96,22 @@ namespace RE TES_HEAP_REDEFINE_NEW(); // members - stl::enumeration emotionType; // 00 - std::uint32_t emotionValue; // 04 - TESTopic* unk08; // 08 - std::uint8_t responseNumber; // 10 - std::uint8_t pad11; // 11 - std::uint16_t pad12; // 12 - std::uint32_t pad14; // 14 - BGSSoundDescriptorForm* sound; // 18 - stl::enumeration flags; // 20 - std::uint8_t pad21; // 21 - std::uint16_t pad22; // 22 - std::uint32_t pad24; // 24 - BSFixedString responseText; // 28 - NAM1 - TESIdleForm* speakerIdle; // 30 - TESIdleForm* listenerIdle; // 38 - ResponseData* next; // 40 + REX::EnumSet emotionType; // 00 + std::uint32_t emotionValue; // 04 + TESTopic* unk08; // 08 + std::uint8_t responseNumber; // 10 + std::uint8_t pad11; // 11 + std::uint16_t pad12; // 12 + std::uint32_t pad14; // 14 + BGSSoundDescriptorForm* sound; // 18 + REX::EnumSet flags; // 20 + std::uint8_t pad21; // 21 + std::uint16_t pad22; // 22 + std::uint32_t pad24; // 24 + BSFixedString responseText; // 28 - NAM1 + TESIdleForm* speakerIdle; // 30 + TESIdleForm* listenerIdle; // 38 + ResponseData* next; // 40 }; static_assert(sizeof(ResponseData) == 0x48); @@ -132,15 +132,15 @@ namespace RE DialogueItem GetDialogueData(TESObjectREFR* a_speaker); // members - TESTopic* parentTopic; // 20 - TESTopicInfo* dataInfo; // 28 - PNAM - TESCondition objConditions; // 30 - CTDA - std::uint16_t infoIndex; // 38 - index in infoTopics array of parent topic - bool saidOnce; // 3A - stl::enumeration favorLevel; // 3B - CNAM - TOPIC_INFO_DATA data; // 3C - ENAM - std::uint32_t fileOffset; // 40 - std::uint32_t pad44; // 44 + TESTopic* parentTopic; // 20 + TESTopicInfo* dataInfo; // 28 - PNAM + TESCondition objConditions; // 30 - CTDA + std::uint16_t infoIndex; // 38 - index in infoTopics array of parent topic + bool saidOnce; // 3A + REX::EnumSet favorLevel; // 3B - CNAM + TOPIC_INFO_DATA data; // 3C - ENAM + std::uint32_t fileOffset; // 40 + std::uint32_t pad44; // 44 }; static_assert(sizeof(TESTopicInfo) == 0x48); } diff --git a/include/RE/T/TESTopicInfoEvent.h b/include/RE/T/TESTopicInfoEvent.h index dc9366023..7d02d096d 100644 --- a/include/RE/T/TESTopicInfoEvent.h +++ b/include/RE/T/TESTopicInfoEvent.h @@ -25,7 +25,7 @@ namespace RE BSTSmartPointer callback; // 00 NiPointer speakerRef; // 08 FormID topicInfoFormID; // 10 - stl::enumeration type; // 14 + REX::EnumSet type; // 14 std::uint16_t stage; // 18 }; static_assert(sizeof(TESTopicInfoEvent) == 0x20); diff --git a/include/RE/T/TESWaterForm.h b/include/RE/T/TESWaterForm.h index 99cb640c6..c1b1e9765 100644 --- a/include/RE/T/TESWaterForm.h +++ b/include/RE/T/TESWaterForm.h @@ -113,41 +113,41 @@ namespace RE bool Activate(TESObjectREFR* a_targetRef, TESObjectREFR* a_activatorRef, std::uint8_t a_arg3, TESBoundObject* a_object, std::int32_t a_targetCount) override; // 37 // members - bool needUpdate; // 040 - std::uint8_t pad41; // 041 - std::uint16_t pad42; // 042 - NiColorA texScroll[3]; // 044 - std::uint32_t pad074; // 074 - TESTexture noiseTextures[4]; // 078 - NAM2 - NAM5 - std::int8_t alpha; // 0B8 - ANAM - stl::enumeration flags; // 0B9 - FNAM - std::uint16_t pad0BA; // 0BA - std::uint32_t pad0BC; // 0BC - BGSMaterialType* materialType; // 0C0 - TNAM - BGSSoundDescriptorForm* waterSound; // 0C8 - SNAM - WaterShaderData data; // 0D0 - DNAM - TESWaterForm* waterWeatherControl[3]; // 1B8 - std::int32_t currentTextureSelect[2]; // 1D0 - std::uint32_t frequencyX; // 1D8 - std::uint32_t frequencyY; // 1DC - std::int32_t octaves; // 1E0 - float amplitude; // 1E4 - float lacunarity; // 1E8 - float bias; // 1EC - float gain; // 1F0 - std::uint32_t pad1F4; // 1F4 - SpellItem* contactSpell; // 1F8 - XNAM - NiPointer noiseTextureData[4]; // 200 - TESObjectACTI* placeableAutoWater; // 220 - TESObjectACTI* placeableLODWater; // 228 - BSWaterShaderMaterial* waterShaderMaterial; // 230 - bool resetNoiseTextures; // 238 - std::uint8_t pad239; // 239 - std::uint16_t pad23A; // 23A - std::uint32_t pad23C; // 23C - TESImageSpace* imageSpace; // 240 - INAM - NiPoint3 linearVelocity; // 248 - NAM0 - NiPoint3 angularVelocity; // 254 - NAM1 + bool needUpdate; // 040 + std::uint8_t pad41; // 041 + std::uint16_t pad42; // 042 + NiColorA texScroll[3]; // 044 + std::uint32_t pad074; // 074 + TESTexture noiseTextures[4]; // 078 - NAM2 - NAM5 + std::int8_t alpha; // 0B8 - ANAM + REX::EnumSet flags; // 0B9 - FNAM + std::uint16_t pad0BA; // 0BA + std::uint32_t pad0BC; // 0BC + BGSMaterialType* materialType; // 0C0 - TNAM + BGSSoundDescriptorForm* waterSound; // 0C8 - SNAM + WaterShaderData data; // 0D0 - DNAM + TESWaterForm* waterWeatherControl[3]; // 1B8 + std::int32_t currentTextureSelect[2]; // 1D0 + std::uint32_t frequencyX; // 1D8 + std::uint32_t frequencyY; // 1DC + std::int32_t octaves; // 1E0 + float amplitude; // 1E4 + float lacunarity; // 1E8 + float bias; // 1EC + float gain; // 1F0 + std::uint32_t pad1F4; // 1F4 + SpellItem* contactSpell; // 1F8 - XNAM + NiPointer noiseTextureData[4]; // 200 + TESObjectACTI* placeableAutoWater; // 220 + TESObjectACTI* placeableLODWater; // 228 + BSWaterShaderMaterial* waterShaderMaterial; // 230 + bool resetNoiseTextures; // 238 + std::uint8_t pad239; // 239 + std::uint16_t pad23A; // 23A + std::uint32_t pad23C; // 23C + TESImageSpace* imageSpace; // 240 - INAM + NiPoint3 linearVelocity; // 248 - NAM0 + NiPoint3 angularVelocity; // 254 - NAM1 }; static_assert(sizeof(TESWaterForm) == 0x260); } diff --git a/include/RE/T/TESWeather.h b/include/RE/T/TESWeather.h index 69fcc12b0..d3921de70 100644 --- a/include/RE/T/TESWeather.h +++ b/include/RE/T/TESWeather.h @@ -107,24 +107,24 @@ namespace RE static_assert(sizeof(Color3) == 0x3); // members - std::uint8_t windSpeed; // 00 - std::int8_t unk01; // 01 - std::int8_t unk02; // 02 - std::int8_t transDelta; // 03 - std::int8_t sunGlare; // 04 - std::int8_t sunDamage; // 05 - std::int8_t precipitationBeginFadeIn; // 06 - std::int8_t precipitationEndFadeOut; // 07 - std::int8_t thunderLightningBeginFadeIn; // 08 - std::int8_t thunderLightningEndFadeOut; // 09 - std::int8_t thunderLightningFrequency; // 0A - stl::enumeration flags; // 0B - Color3 lightningColor; // 0C - std::int8_t visualEffectBegin; // 0F - std::int8_t visualEffectEnd; // 10 - std::int8_t windDirection; // 11 - std::int8_t windDirectionRange; // 12 - std::int8_t unk13; // 13 + std::uint8_t windSpeed; // 00 + std::int8_t unk01; // 01 + std::int8_t unk02; // 02 + std::int8_t transDelta; // 03 + std::int8_t sunGlare; // 04 + std::int8_t sunDamage; // 05 + std::int8_t precipitationBeginFadeIn; // 06 + std::int8_t precipitationEndFadeOut; // 07 + std::int8_t thunderLightningBeginFadeIn; // 08 + std::int8_t thunderLightningEndFadeOut; // 09 + std::int8_t thunderLightningFrequency; // 0A + REX::EnumSet flags; // 0B + Color3 lightningColor; // 0C + std::int8_t visualEffectBegin; // 0F + std::int8_t visualEffectEnd; // 10 + std::int8_t windDirection; // 11 + std::int8_t windDirectionRange; // 12 + std::int8_t unk13; // 13 }; static_assert(sizeof(Data) == 0x14); @@ -147,8 +147,8 @@ namespace RE { public: // members - FormID soundFormID; // 00 - stl::enumeration type; // 04 + FormID soundFormID; // 00 + REX::EnumSet type; // 04 }; static_assert(sizeof(WeatherSound) == 0x8); diff --git a/include/RE/T/TESWorldSpace.h b/include/RE/T/TESWorldSpace.h index 0a1398d36..1011333f9 100644 --- a/include/RE/T/TESWorldSpace.h +++ b/include/RE/T/TESWorldSpace.h @@ -188,9 +188,9 @@ namespace RE TESObjectCELL* persistentCell; // 088 BGSTerrainManager* terrainManager; // 090 TESClimate* climate; // 098 - CNAM - stl::enumeration flags; // 0A0 - DATA + REX::EnumSet flags; // 0A0 - DATA std::uint8_t unk0A1; // 0A1 - more flags - stl::enumeration parentUseFlags; // 0A2 - PNAM + REX::EnumSet parentUseFlags; // 0A2 - PNAM ShortPoint fixedCenter; // 0A4 - WCTR BSTHashMap>> fixedPersistentRefMap; // 0A8 BSTArray> mobilePersistentRefs; // 0D8 diff --git a/include/RE/T/TypeInfo.h b/include/RE/T/TypeInfo.h index 9eb5dabd2..6d022b1b3 100644 --- a/include/RE/T/TypeInfo.h +++ b/include/RE/T/TypeInfo.h @@ -65,7 +65,7 @@ namespace RE protected: // members - stl::enumeration _rawType; // 00 + REX::EnumSet _rawType; // 00 }; static_assert(sizeof(TypeInfo) == 0x8); } diff --git a/include/RE/U/UIMessage.h b/include/RE/U/UIMessage.h index b537e45b2..37675f4d2 100644 --- a/include/RE/U/UIMessage.h +++ b/include/RE/U/UIMessage.h @@ -27,14 +27,14 @@ namespace RE class UIMessage { public: - BSFixedString menu; // 00 - stl::enumeration type; // 08 - std::uint32_t pad0C; // 0C - IUIMessageData* data; // 10 - bool isPooled; // 18 - std::uint8_t pad19; // 19 - std::uint16_t pad1A; // 1A - std::uint32_t pad1C; // 1C + BSFixedString menu; // 00 + REX::EnumSet type; // 08 + std::uint32_t pad0C; // 0C + IUIMessageData* data; // 10 + bool isPooled; // 18 + std::uint8_t pad19; // 19 + std::uint16_t pad1A; // 1A + std::uint32_t pad1C; // 1C }; static_assert(sizeof(UIMessage) == 0x20); } diff --git a/include/RE/U/UserEventEnabled.h b/include/RE/U/UserEventEnabled.h index 3ebfbaf7c..c146612bc 100644 --- a/include/RE/U/UserEventEnabled.h +++ b/include/RE/U/UserEventEnabled.h @@ -10,8 +10,8 @@ namespace RE using UEFlag = UserEvents::USER_EVENT_FLAG; // members - stl::enumeration newUserEventFlag; // 0 - stl::enumeration oldUserEventFlag; // 4 + REX::EnumSet newUserEventFlag; // 0 + REX::EnumSet oldUserEventFlag; // 4 }; static_assert(sizeof(UserEventEnabled) == 0x8); } diff --git a/include/RE/V/VirtualMachine.h b/include/RE/V/VirtualMachine.h index eb313de72..49de92f8a 100644 --- a/include/RE/V/VirtualMachine.h +++ b/include/RE/V/VirtualMachine.h @@ -201,7 +201,7 @@ namespace RE std::uint32_t pad938C; // 938C BSScript::Stack* frozenStacks; // 9390 std::uint32_t frozenStacksCount; // 9398 - stl::enumeration freezeState; // 939C + REX::EnumSet freezeState; // 939C mutable BSSpinLock attachedScriptsLock; // 93A0 BSTHashMap> attachedScripts; // 93A8 std::uint32_t unk93D8; // 93D8 diff --git a/include/REL/ID.h b/include/REL/ID.h index a6214a429..fa4c7f9c8 100644 --- a/include/REL/ID.h +++ b/include/REL/ID.h @@ -87,10 +87,10 @@ namespace REL { const mapping_t elem{ 0, a_offset }; const auto it = std::lower_bound( - _offset2id.begin(), - _offset2id.end(), - elem, - [](auto&& a_lhs, auto&& a_rhs) { + _offset2id.begin(), + _offset2id.end(), + elem, + [](auto&& a_lhs, auto&& a_rhs) { return a_lhs.offset < a_rhs.offset; }); if (it == _offset2id.end()) { diff --git a/include/REL/Relocation.h b/include/REL/Relocation.h index 8f07112bc..c38a13738 100644 --- a/include/REL/Relocation.h +++ b/include/REL/Relocation.h @@ -267,7 +267,8 @@ namespace REL template std::invoke_result_t operator()(Args&&... a_args) const - noexcept(std::is_nothrow_invocable_v) requires(std::invocable) + noexcept(std::is_nothrow_invocable_v) + requires(std::invocable) { return REL::invoke(get(), std::forward(a_args)...); } @@ -283,48 +284,56 @@ namespace REL } template - void write(const U& a_data) requires(std::same_as) + void write(const U& a_data) + requires(std::same_as) { safe_write(address(), std::addressof(a_data), sizeof(T)); } template - void write(const std::span a_data) requires(std::same_as) + void write(const std::span a_data) + requires(std::same_as) { safe_write(address(), a_data.data(), a_data.size_bytes()); } template - std::uintptr_t write_branch(const std::uintptr_t a_dst) requires(std::same_as) + std::uintptr_t write_branch(const std::uintptr_t a_dst) + requires(std::same_as) { return SKSE::GetTrampoline().write_branch(address(), a_dst); } template - std::uintptr_t write_branch(const F a_dst) requires(std::same_as) + std::uintptr_t write_branch(const F a_dst) + requires(std::same_as) { return SKSE::GetTrampoline().write_branch(address(), stl::unrestricted_cast(a_dst)); } template - std::uintptr_t write_call(const std::uintptr_t a_dst) requires(std::same_as) + std::uintptr_t write_call(const std::uintptr_t a_dst) + requires(std::same_as) { return SKSE::GetTrampoline().write_call(address(), a_dst); } template - std::uintptr_t write_call(const F a_dst) requires(std::same_as) + std::uintptr_t write_call(const F a_dst) + requires(std::same_as) { return SKSE::GetTrampoline().write_call(address(), stl::unrestricted_cast(a_dst)); } - void write_fill(const std::uint8_t a_value, const std::size_t a_count) requires(std::same_as) + void write_fill(const std::uint8_t a_value, const std::size_t a_count) + requires(std::same_as) { safe_fill(address(), a_value, a_count); } template - std::uintptr_t write_vfunc(const std::size_t a_idx, const std::uintptr_t a_newFunc) requires(std::same_as) + std::uintptr_t write_vfunc(const std::size_t a_idx, const std::uintptr_t a_newFunc) + requires(std::same_as) { const auto addr = address() + (sizeof(void*) * a_idx); const auto result = *reinterpret_cast(addr); @@ -333,7 +342,8 @@ namespace REL } template - std::uintptr_t write_vfunc(const std::size_t a_idx, const F a_newFunc) requires(std::same_as) + std::uintptr_t write_vfunc(const std::size_t a_idx, const F a_newFunc) + requires(std::same_as) { return write_vfunc(a_idx, stl::unrestricted_cast(a_newFunc)); } diff --git a/include/REX/REX.h b/include/REX/REX.h new file mode 100644 index 000000000..c67edde6b --- /dev/null +++ b/include/REX/REX.h @@ -0,0 +1,273 @@ +#pragma once + +namespace REX +{ + template < + class E, + class U = std::underlying_type_t> + class Enum + { + public: + using enum_type = E; + using underlying_type = U; + + static_assert(std::is_enum_v, "Enum must be an enum"); + static_assert(std::is_integral_v, "Enum<..., U> must be an integral"); + + constexpr Enum() noexcept = default; + constexpr Enum(const Enum&) noexcept = default; + constexpr Enum(Enum&&) noexcept = default; + + template // NOLINTNEXTLINE(google-explicit-constructor) + constexpr Enum(Enum a_rhs) noexcept : + _impl(static_cast(a_rhs.get())) + {} + + constexpr Enum(E a_value) noexcept : + _impl(static_cast(a_value)) + {} + + ~Enum() noexcept = default; + + constexpr Enum& operator=(const Enum&) noexcept = default; + constexpr Enum& operator=(Enum&&) noexcept = default; + + template + constexpr Enum& operator=(Enum a_rhs) noexcept + { + _impl = static_cast(a_rhs.get()); + } + + constexpr Enum& operator=(E a_value) noexcept + { + _impl = static_cast(a_value); + return *this; + } + + public: + [[nodiscard]] explicit constexpr operator bool() const noexcept { return _impl != static_cast(0); } + + [[nodiscard]] constexpr E operator*() const noexcept { return get(); } + [[nodiscard]] constexpr E get() const noexcept { return static_cast(_impl); } + [[nodiscard]] constexpr U underlying() const noexcept { return _impl; } + + public: + friend constexpr bool operator==(Enum a_lhs, Enum a_rhs) noexcept { return a_lhs.underlying() == a_rhs.underlying(); } + friend constexpr bool operator==(Enum a_lhs, E a_rhs) noexcept { return a_lhs.underlying() == static_cast(a_rhs); } + friend constexpr bool operator==(E a_lhs, Enum a_rhs) noexcept { return static_cast(a_lhs) == a_rhs.underlying(); } + + private: + U _impl{ 0 }; + }; + + template + Enum(Args...) -> Enum< + std::common_type_t, + std::underlying_type_t< + std::common_type_t>>; +} + +namespace REX +{ + template < + class E, + class U = std::underlying_type_t> + class EnumSet + { + public: + using enum_type = E; + using underlying_type = U; + + static_assert(std::is_enum_v, "EnumSet must be an enum"); + static_assert(std::is_integral_v, "EnumSet<..., U> must be an integral"); + + constexpr EnumSet() noexcept = default; + constexpr EnumSet(const EnumSet&) noexcept = default; + constexpr EnumSet(EnumSet&&) noexcept = default; + + template // NOLINTNEXTLINE(google-explicit-constructor) + constexpr EnumSet(EnumSet a_rhs) noexcept : + _impl(static_cast(a_rhs.get())) + {} + + template + constexpr EnumSet(Args... a_values) noexcept + requires(std::same_as && ...) + : + _impl((static_cast(a_values) | ...)) + {} + + ~EnumSet() noexcept = default; + + constexpr EnumSet& operator=(const EnumSet&) noexcept = default; + constexpr EnumSet& operator=(EnumSet&&) noexcept = default; + + template + constexpr EnumSet& operator=(EnumSet a_rhs) noexcept + { + _impl = static_cast(a_rhs.get()); + } + + constexpr EnumSet& operator=(E a_value) noexcept + { + _impl = static_cast(a_value); + return *this; + } + + public: + [[nodiscard]] explicit constexpr operator bool() const noexcept { return _impl != static_cast(0); } + + [[nodiscard]] constexpr E operator*() const noexcept { return get(); } + [[nodiscard]] constexpr E get() const noexcept { return static_cast(_impl); } + [[nodiscard]] constexpr U underlying() const noexcept { return _impl; } + + public: + template + constexpr EnumSet& set(Args... a_args) noexcept + requires(std::same_as && ...) + { + _impl |= (static_cast(a_args) | ...); + return *this; + } + + template + constexpr EnumSet& set(bool a_set, Args... a_args) noexcept + requires(std::same_as && ...) + { + if (a_set) + _impl |= (static_cast(a_args) | ...); + else + _impl &= ~(static_cast(a_args) | ...); + + return *this; + } + + template + constexpr EnumSet& reset(Args... a_args) noexcept + requires(std::same_as && ...) + { + _impl &= ~(static_cast(a_args) | ...); + return *this; + } + + constexpr EnumSet& reset() noexcept + { + _impl = 0; + return *this; + } + + template + [[nodiscard]] constexpr bool any(Args... a_args) const noexcept + requires(std::same_as && ...) + { + return (_impl & (static_cast(a_args) | ...)) != static_cast(0); + } + + template + [[nodiscard]] constexpr bool all(Args... a_args) const noexcept + requires(std::same_as && ...) + { + return (_impl & (static_cast(a_args) | ...)) == (static_cast(a_args) | ...); + } + + template + [[nodiscard]] constexpr bool none(Args... a_args) const noexcept + requires(std::same_as && ...) + { + return (_impl & (static_cast(a_args) | ...)) == static_cast(0); + } + + public: + friend constexpr bool operator==(EnumSet a_lhs, EnumSet a_rhs) noexcept { return a_lhs.underlying() == a_rhs.underlying(); } + friend constexpr bool operator==(EnumSet a_lhs, E a_rhs) noexcept { return a_lhs.underlying() == static_cast(a_rhs); } + friend constexpr bool operator==(E a_lhs, EnumSet a_rhs) noexcept { return static_cast(a_lhs) == a_rhs.underlying(); } + + friend constexpr std::strong_ordering operator<=>(EnumSet a_lhs, EnumSet a_rhs) noexcept { return a_lhs.underlying() <=> a_rhs.underlying(); } + friend constexpr std::strong_ordering operator<=>(EnumSet a_lhs, E a_rhs) noexcept { return a_lhs.underlying() <=> static_cast(a_rhs); } + friend constexpr std::strong_ordering operator<=>(E a_lhs, EnumSet a_rhs) noexcept { return static_cast(a_lhs) <=> a_rhs.underlying(); } + + friend constexpr EnumSet operator&(EnumSet a_lhs, EnumSet a_rhs) noexcept { return static_cast(a_lhs.underlying() & a_rhs.underlying()); } + friend constexpr EnumSet operator&(EnumSet a_lhs, E a_rhs) noexcept { return static_cast(a_lhs.underlying() & static_cast(a_rhs)); } + friend constexpr EnumSet operator&(E a_lhs, EnumSet a_rhs) noexcept { return static_cast(static_cast(a_lhs) & a_rhs.underlying()); } + + friend constexpr EnumSet& operator&=(EnumSet& a_lhs, EnumSet a_rhs) noexcept { return a_lhs = a_lhs & a_rhs; } + friend constexpr EnumSet& operator&=(EnumSet& a_lhs, E a_rhs) noexcept { return a_lhs = a_lhs & a_rhs; } + + friend constexpr EnumSet operator|(EnumSet a_lhs, EnumSet a_rhs) noexcept { return static_cast(a_lhs.underlying() | a_rhs.underlying()); } + friend constexpr EnumSet operator|(EnumSet a_lhs, E a_rhs) noexcept { return static_cast(a_lhs.underlying() | static_cast(a_rhs)); } + friend constexpr EnumSet operator|(E a_lhs, EnumSet a_rhs) noexcept { return static_cast(static_cast(a_lhs) | a_rhs.underlying()); } + + friend constexpr EnumSet& operator|=(EnumSet& a_lhs, EnumSet a_rhs) noexcept { return a_lhs = a_lhs | a_rhs; } + friend constexpr EnumSet& operator|=(EnumSet& a_lhs, E a_rhs) noexcept { return a_lhs = a_lhs | a_rhs; } + + friend constexpr EnumSet operator^(EnumSet a_lhs, EnumSet a_rhs) noexcept { return static_cast(a_lhs.underlying() ^ a_rhs.underlying()); } + friend constexpr EnumSet operator^(EnumSet a_lhs, E a_rhs) noexcept { return static_cast(a_lhs.underlying() ^ static_cast(a_rhs)); } + friend constexpr EnumSet operator^(E a_lhs, EnumSet a_rhs) noexcept { return static_cast(static_cast(a_lhs) ^ a_rhs.underlying()); } + + friend constexpr EnumSet& operator^=(EnumSet& a_lhs, EnumSet a_rhs) noexcept { return a_lhs = a_lhs ^ a_rhs; } + friend constexpr EnumSet& operator^=(EnumSet& a_lhs, E a_rhs) noexcept { return a_lhs = a_lhs ^ a_rhs; } + + friend constexpr EnumSet operator+(EnumSet a_lhs, EnumSet a_rhs) noexcept { return static_cast(a_lhs.underlying() + a_rhs.underlying()); } + friend constexpr EnumSet operator+(EnumSet a_lhs, E a_rhs) noexcept { return static_cast(a_lhs.underlying() + static_cast(a_rhs)); } + friend constexpr EnumSet operator+(E a_lhs, EnumSet a_rhs) noexcept { return static_cast(static_cast(a_lhs) + a_rhs.underlying()); } + + friend constexpr EnumSet& operator+=(EnumSet& a_lhs, EnumSet a_rhs) noexcept { return a_lhs = a_lhs + a_rhs; } + friend constexpr EnumSet& operator+=(EnumSet& a_lhs, E a_rhs) noexcept { return a_lhs = a_lhs + a_rhs; } + + friend constexpr EnumSet operator-(EnumSet a_lhs, EnumSet a_rhs) noexcept { return static_cast(a_lhs.underlying() - a_rhs.underlying()); } + friend constexpr EnumSet operator-(EnumSet a_lhs, E a_rhs) noexcept { return static_cast(a_lhs.underlying() - static_cast(a_rhs)); } + friend constexpr EnumSet operator-(E a_lhs, EnumSet a_rhs) noexcept { return static_cast(static_cast(a_lhs) - a_rhs.underlying()); } + + friend constexpr EnumSet& operator-=(EnumSet& a_lhs, EnumSet a_rhs) noexcept { return a_lhs = a_lhs - a_rhs; } + friend constexpr EnumSet& operator-=(EnumSet& a_lhs, E a_rhs) noexcept { return a_lhs = a_lhs - a_rhs; } + + friend constexpr EnumSet operator<<(EnumSet a_lhs, EnumSet a_rhs) noexcept { return static_cast(a_lhs.underlying() << a_rhs.underlying()); } + friend constexpr EnumSet operator<<(EnumSet a_lhs, E a_rhs) noexcept { return static_cast(a_lhs.underlying() << static_cast(a_rhs)); } + friend constexpr EnumSet operator<<(E a_lhs, EnumSet a_rhs) noexcept { return static_cast(static_cast(a_lhs) << a_rhs.underlying()); } + + friend constexpr EnumSet& operator<<=(EnumSet& a_lhs, EnumSet a_rhs) noexcept { return a_lhs = a_lhs << a_rhs; } + friend constexpr EnumSet& operator<<=(EnumSet& a_lhs, E a_rhs) noexcept { return a_lhs = a_lhs << a_rhs; } + + friend constexpr EnumSet operator>>(EnumSet a_lhs, EnumSet a_rhs) noexcept { return static_cast(a_lhs.underlying() >> a_rhs.underlying()); } + friend constexpr EnumSet operator>>(EnumSet a_lhs, E a_rhs) noexcept { return static_cast(a_lhs.underlying() >> static_cast(a_rhs)); } + friend constexpr EnumSet operator>>(E a_lhs, EnumSet a_rhs) noexcept { return static_cast(static_cast(a_lhs) >> a_rhs.underlying()); } + + friend constexpr EnumSet& operator>>=(EnumSet& a_lhs, EnumSet a_rhs) noexcept { return a_lhs = a_lhs >> a_rhs; } + friend constexpr EnumSet& operator>>=(EnumSet& a_lhs, E a_rhs) noexcept { return a_lhs = a_lhs >> a_rhs; } + + friend constexpr EnumSet& operator~(EnumSet& a_lhs) noexcept { return a_lhs = ~a_lhs.underlying(); } + + private: + U _impl{ 0 }; + }; + + template + EnumSet(Args...) -> EnumSet< + std::common_type_t, + std::underlying_type_t< + std::common_type_t>>; +} + +namespace REX +{ + template + class Singleton + { + public: + static T* GetSingleton() + { + static T singleton; + return std::addressof(singleton); + } + + protected: + Singleton() = default; + ~Singleton() = default; + + Singleton(const Singleton&) = delete; + Singleton(Singleton&&) = delete; + + Singleton& operator=(const Singleton&) = delete; + Singleton& operator=(Singleton&&) = delete; + }; +} diff --git a/include/REX/W32.h b/include/REX/W32.h index 6deadaa11..e740fa83b 100644 --- a/include/REX/W32.h +++ b/include/REX/W32.h @@ -3,6 +3,7 @@ #include "REX/W32/BASE.h" #include "REX/W32/ADVAPI32.h" +#include "REX/W32/BCRYPT.h" #include "REX/W32/COM.h" #include "REX/W32/COMPTR.h" #include "REX/W32/D3D.h" @@ -21,6 +22,7 @@ #include "REX/W32/DXGI_5.h" #include "REX/W32/DXGI_6.h" #include "REX/W32/KERNEL32.h" +#include "REX/W32/NT.h" #include "REX/W32/OLE32.h" #include "REX/W32/USER32.h" #include "REX/W32/VERSION.h" diff --git a/include/REX/W32/BASE.h b/include/REX/W32/BASE.h index 4e517e6c6..8a44bfd2b 100644 --- a/include/REX/W32/BASE.h +++ b/include/REX/W32/BASE.h @@ -28,6 +28,7 @@ namespace REX::W32 using HRESULT = std::int32_t; using HSTRING = struct HSTRING__*; using HWND = struct HWND__*; + using NTSTATUS = std::int32_t; // general constants inline const auto INVALID_HANDLE_VALUE{ reinterpret_cast(static_cast(-1)) }; @@ -50,8 +51,8 @@ namespace REX::W32 return std::bit_cast(*this); } - std::uint32_t lo; // 00 - std::uint32_t hi; // 04 + std::uint32_t lo{}; // 00 + std::uint32_t hi{}; // 04 }; static_assert(sizeof(FILETIME) == 0x8); } @@ -76,10 +77,10 @@ namespace REX::W32 return !(a_lhs == a_rhs); } - std::uint32_t data1; // 00 - std::uint16_t data2; // 04 - std::uint16_t data3; // 08 - std::uint8_t data4[8]; // 10 + std::uint32_t data1{}; // 00 + std::uint16_t data2{}; // 04 + std::uint16_t data3{}; // 08 + std::uint8_t data4[8]{}; // 10 }; static_assert(sizeof(GUID) == 0x10); @@ -97,8 +98,8 @@ namespace REX::W32 x(a_x), y(a_y) {} - std::int32_t x; // 00 - std::int32_t y; // 04 + std::int32_t x{}; // 00 + std::int32_t y{}; // 04 }; static_assert(sizeof(POINT) == 0x8); } @@ -113,10 +114,10 @@ namespace REX::W32 x1(a_x1), y1(a_y1), x2(a_x2), y2(a_y2) {} - std::int32_t x1; // 00 - std::int32_t y1; // 04 - std::int32_t x2; // 08 - std::int32_t y2; // 10 + std::int32_t x1{}; // 00 + std::int32_t y1{}; // 04 + std::int32_t x2{}; // 08 + std::int32_t y2{}; // 10 }; static_assert(sizeof(RECT) == 0x10); } @@ -125,8 +126,8 @@ namespace REX::W32 { struct SIZE { - std::int32_t x; // 00 - std::int32_t y; // 04 + std::int32_t x{}; // 00 + std::int32_t y{}; // 04 }; static_assert(sizeof(SIZE) == 0x8); } @@ -152,6 +153,17 @@ namespace REX::W32 }; static_assert(sizeof(SECURITY_ATTRIBUTES) == 0x18); + union LARGE_INTEGER + { + struct + { + std::uint32_t lo; + std::int32_t hi; + }; + std::int64_t value; + }; + static_assert(sizeof(LARGE_INTEGER) == 0x8); + union ULARGE_INTEGER { struct @@ -161,4 +173,26 @@ namespace REX::W32 }; std::uint64_t value; }; + static_assert(sizeof(ULARGE_INTEGER) == 0x8); + + struct UNICODE_STRING + { + std::uint16_t length; + std::uint16_t maxLength; + wchar_t* buffer; + }; + static_assert(sizeof(UNICODE_STRING) == 0x10); +} + +namespace REX::W32 +{ + constexpr bool SUCCESS(const HRESULT a_result) + { + return a_result >= 0; + } + + constexpr bool NT_SUCCESS(const NTSTATUS a_status) + { + return a_status >= 0; + } } diff --git a/include/REX/W32/BCRYPT.h b/include/REX/W32/BCRYPT.h new file mode 100644 index 000000000..7cb3d9337 --- /dev/null +++ b/include/REX/W32/BCRYPT.h @@ -0,0 +1,73 @@ +#pragma once + +#include "REX/W32/BASE.h" + +namespace REX::W32 +{ + using BCRYPT_HANDLE = void*; + using BCRYPT_ALG_HANDLE = void*; + using BCRYPT_KEY_HANDLE = void*; + using BCRYPT_HASH_HANDLE = void*; + using BCRYPT_SECRET_HANDLE = void*; + + // algorithms + inline constexpr auto BCRYPT_RSA_ALGORITHM{ L"RSA" }; + inline constexpr auto BCRYPT_RSA_SIGN_ALGORITHM{ L"RSA_SIGN" }; + inline constexpr auto BCRYPT_DH_ALGORITHM{ L"DH" }; + inline constexpr auto BCRYPT_DSA_ALGORITHM{ L"DSA" }; + inline constexpr auto BCRYPT_RC2_ALGORITHM{ L"RC2" }; + inline constexpr auto BCRYPT_RC4_ALGORITHM{ L"RC4" }; + inline constexpr auto BCRYPT_AES_ALGORITHM{ L"AES" }; + inline constexpr auto BCRYPT_DES_ALGORITHM{ L"DES" }; + inline constexpr auto BCRYPT_DESX_ALGORITHM{ L"DESX" }; + inline constexpr auto BCRYPT_3DES_ALGORITHM{ L"3DES" }; + inline constexpr auto BCRYPT_3DES_112_ALGORITHM{ L"3DES_112" }; + inline constexpr auto BCRYPT_MD2_ALGORITHM{ L"MD2" }; + inline constexpr auto BCRYPT_MD4_ALGORITHM{ L"MD4" }; + inline constexpr auto BCRYPT_MD5_ALGORITHM{ L"MD5" }; + inline constexpr auto BCRYPT_SHA1_ALGORITHM{ L"SHA1" }; + inline constexpr auto BCRYPT_SHA256_ALGORITHM{ L"SHA256" }; + inline constexpr auto BCRYPT_SHA384_ALGORITHM{ L"SHA384" }; + inline constexpr auto BCRYPT_SHA512_ALGORITHM{ L"SHA512" }; + inline constexpr auto BCRYPT_AES_GMAC_ALGORITHM{ L"AES-GMAC" }; + inline constexpr auto BCRYPT_AES_CMAC_ALGORITHM{ L"AES-CMAC" }; + inline constexpr auto BCRYPT_ECDSA_P256_ALGORITHM{ L"ECDSA_P256" }; + inline constexpr auto BCRYPT_ECDSA_P384_ALGORITHM{ L"ECDSA_P384" }; + inline constexpr auto BCRYPT_ECDSA_P521_ALGORITHM{ L"ECDSA_P521" }; + inline constexpr auto BCRYPT_ECDH_P256_ALGORITHM{ L"ECDH_P256" }; + inline constexpr auto BCRYPT_ECDH_P384_ALGORITHM{ L"ECDH_P384" }; + inline constexpr auto BCRYPT_ECDH_P521_ALGORITHM{ L"ECDH_P521" }; + inline constexpr auto BCRYPT_RNG_ALGORITHM{ L"RNG" }; + inline constexpr auto BCRYPT_RNG_FIPS186_DSA_ALGORITHM{ L"FIPS186DSARNG" }; + inline constexpr auto BCRYPT_RNG_DUAL_EC_ALGORITHM{ L"DUALECRNG" }; + + // properties + inline constexpr auto BCRYPT_OBJECT_LENGTH{ L"ObjectLength" }; + inline constexpr auto BCRYPT_ALGORITHM_NAME{ L"AlgorithmName" }; + inline constexpr auto BCRYPT_PROVIDER_HANDLE{ L"ProviderHandle" }; + inline constexpr auto BCRYPT_CHAINING_MODE{ L"ChainingMode" }; + inline constexpr auto BCRYPT_BLOCK_LENGTH{ L"BlockLength" }; + inline constexpr auto BCRYPT_KEY_LENGTH{ L"KeyLength" }; + inline constexpr auto BCRYPT_KEY_OBJECT_LENGTH{ L"KeyObjectLength" }; + inline constexpr auto BCRYPT_KEY_STRENGTH{ L"KeyStrength" }; + inline constexpr auto BCRYPT_KEY_LENGTHS{ L"KeyLengths" }; + inline constexpr auto BCRYPT_BLOCK_SIZE_LIST{ L"BlockSizeList" }; + inline constexpr auto BCRYPT_EFFECTIVE_KEY_LENGTH{ L"EffectiveKeyLength" }; + inline constexpr auto BCRYPT_HASH_LENGTH{ L"HashDigestLength" }; + inline constexpr auto BCRYPT_HASH_OID_LIST{ L"HashOIDList" }; + inline constexpr auto BCRYPT_PADDING_SCHEMES{ L"PaddingSchemes" }; + inline constexpr auto BCRYPT_SIGNATURE_LENGTH{ L"SignatureLength" }; + inline constexpr auto BCRYPT_HASH_BLOCK_LENGTH{ L"HashBlockLength" }; + inline constexpr auto BCRYPT_AUTH_TAG_LENGTH{ L"AuthTagLength" }; +} + +namespace REX::W32 +{ + NTSTATUS BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE* a_algorithm, const wchar_t* a_id, const wchar_t* a_impl = nullptr, std::uint32_t a_flags = 0); + NTSTATUS BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE a_algorithm, std::uint32_t a_flags = 0); + NTSTATUS BCryptCreateHash(BCRYPT_ALG_HANDLE a_algorithm, BCRYPT_HASH_HANDLE* a_hash, std::uint8_t* a_hashObject = nullptr, std::uint32_t a_hashObjectSize = 0, std::uint8_t* a_secret = nullptr, std::uint32_t a_secretSize = 0, std::uint32_t a_flags = 0); + NTSTATUS BCryptDestroyHash(BCRYPT_HASH_HANDLE a_hash); + NTSTATUS BCryptFinishHash(BCRYPT_HASH_HANDLE a_hash, std::uint8_t* a_output, std::uint32_t a_outputSize, std::uint32_t a_flags = 0); + NTSTATUS BCryptGetProperty(BCRYPT_HANDLE a_object, const wchar_t* a_property, std::uint8_t* a_output, std::uint32_t a_outputSize, std::uint32_t* a_result, std::uint32_t a_flags = 0); + NTSTATUS BCryptHashData(BCRYPT_HASH_HANDLE a_hash, std::uint8_t* a_input, std::uint32_t a_inputSize, std::uint32_t a_flags = 0); +} diff --git a/include/REX/W32/KERNEL32.h b/include/REX/W32/KERNEL32.h index 86c7ad9d9..a82531a7c 100644 --- a/include/REX/W32/KERNEL32.h +++ b/include/REX/W32/KERNEL32.h @@ -435,8 +435,8 @@ namespace REX::W32 HANDLE CreateThread(SECURITY_ATTRIBUTES* a_threadAttr, std::size_t a_stackSize, THREAD_START_ROUTINE* a_startAddr, void* a_param, std::uint32_t a_flags, std::uint32_t* a_threadID) noexcept; void DeleteCriticalSection(CRITICAL_SECTION* a_criticalSection); void EnterCriticalSection(CRITICAL_SECTION* a_criticalSection); - std::uint32_t ExpandEnvironmentStrings(const char* a_src, char* a_dst, std::uint32_t a_dstLen) noexcept; - std::uint32_t ExpandEnvironmentStrings(const wchar_t* a_src, wchar_t* a_dst, std::uint32_t a_dstLen) noexcept; + std::uint32_t ExpandEnvironmentStringsA(const char* a_src, char* a_dst, std::uint32_t a_dstLen) noexcept; + std::uint32_t ExpandEnvironmentStringsW(const wchar_t* a_src, wchar_t* a_dst, std::uint32_t a_dstLen) noexcept; bool FindClose(HANDLE a_file) noexcept; HANDLE FindFirstFileA(const char* a_name, WIN32_FIND_DATAA* a_data) noexcept; HANDLE FindFirstFileW(const wchar_t* a_name, WIN32_FIND_DATAW* a_data) noexcept; diff --git a/include/REX/W32/NT.h b/include/REX/W32/NT.h new file mode 100644 index 000000000..9a410f64b --- /dev/null +++ b/include/REX/W32/NT.h @@ -0,0 +1,92 @@ +#pragma once + +#include "REX/W32/BASE.h" + +namespace REX::W32 +{ + struct EXCEPTION_REGISTRATION_RECORD; + struct PEB_LDR_DATA; + struct RTL_USER_PROCESS_PARAMETERS; + struct UNICODE_STRING; + + using PS_POST_PROCESS_INIT_ROUTINE = void (*)(); + + struct LIST_ENTRY + { + struct LIST_ENTRY* fLink; + struct LIST_ENTRY* bLink; + }; + + struct NT_TIB + { + EXCEPTION_REGISTRATION_RECORD* exceptionList; + void* stackBase; + void* stackLimit; + void* subSystemTib; + union + { + void* fiberData; + std::uint32_t version; + }; + void* arbitraryUserPointer; + struct NT_TIB* self; + }; + + struct PEB + { + std::byte reserved1[2]; + std::byte beingDebugged; + std::byte reserved2[1]; + void* reserved3[2]; + PEB_LDR_DATA* ldr; + RTL_USER_PROCESS_PARAMETERS* processParameters; + void* reserved4[3]; + void* atlThunkSListPtr; + void* reserved5; + std::uint32_t reserved6; + void* reserved7; + std::uint32_t reserved8; + std::uint32_t atlThunkSListPtr32; + void* reserved9[45]; + std::byte reserved10[96]; + PS_POST_PROCESS_INIT_ROUTINE postProcessInitRoutine; + std::byte reserved11[128]; + void* reserved12[1]; + std::uint32_t sessionID; + }; + + struct PEB_LDR_DATA + { + std::byte reserved1[8]; + void* reserved2[3]; + LIST_ENTRY inMemoryOrderModuleList; + }; + + struct RTL_USER_PROCESS_PARAMETERS + { + std::byte reserved1[16]; + void* reserved2[10]; + UNICODE_STRING imagePathName; + UNICODE_STRING commandLine; + }; + + struct TEB + { + void* reserved1[11]; + void* threadLocalStoragePointer; + PEB* processEnvironmentBlock; + void* reserved2[399]; + std::byte reserved3[1952]; + void* tlsSlots[64]; + std::byte reserved4[8]; + void* reserved5[26]; + void* reservedForOle; + void* reserved6[4]; + void* tlsExpansionSlots; + }; +} + +namespace REX::W32 +{ + TEB* NtCurrentTeb() noexcept; +} diff --git a/include/SKSE/Events.h b/include/SKSE/Events.h index 0bdddc4d3..efcd409b6 100644 --- a/include/SKSE/Events.h +++ b/include/SKSE/Events.h @@ -60,10 +60,10 @@ namespace SKSE }; // members - stl::enumeration type; - RE::Actor* actor; - RE::TESForm* sourceForm; - stl::enumeration slot; + REX::EnumSet type; + RE::Actor* actor; + RE::TESForm* sourceForm; + REX::EnumSet slot; }; struct NiNodeUpdateEvent diff --git a/include/SKSE/Impl/PCH.h b/include/SKSE/Impl/PCH.h index 4a87ff47b..60442a9f3 100644 --- a/include/SKSE/Impl/PCH.h +++ b/include/SKSE/Impl/PCH.h @@ -63,6 +63,7 @@ static_assert( #include #pragma warning(pop) +#include "REX/REX.h" #include "REX/W32/KERNEL32.h" #include "REX/W32/USER32.h" @@ -146,14 +147,14 @@ namespace SKSE string(const CharT (&)[N]) -> string; } - template // - requires(std::invocable>) // - class scope_exit + template + requires(std::invocable>) + class scope_exit { public: // 1) template - explicit scope_exit(Fn&& a_fn) // + explicit scope_exit(Fn&& a_fn) noexcept(std::is_nothrow_constructible_v || std::is_nothrow_constructible_v) // requires(!std::is_same_v, scope_exit> && @@ -170,7 +171,7 @@ namespace SKSE } // 2) - scope_exit(scope_exit&& a_rhs) // + scope_exit(scope_exit&& a_rhs) noexcept(std::is_nothrow_move_constructible_v || std::is_nothrow_copy_constructible_v) // requires(std::is_nothrow_move_constructible_v || @@ -210,97 +211,21 @@ namespace SKSE template scope_exit(EF) -> scope_exit; + // backwards compat template < - class Enum, - class Underlying = std::underlying_type_t> - class enumeration + class E, + class U = std::underlying_type_t> + class enumeration : public REX::EnumSet { - public: - using enum_type = Enum; - using underlying_type = Underlying; - - static_assert(std::is_enum_v, "enum_type must be an enum"); - static_assert(std::is_integral_v, "underlying_type must be an integral"); - - constexpr enumeration() noexcept = default; - - constexpr enumeration(const enumeration&) noexcept = default; - - constexpr enumeration(enumeration&&) noexcept = default; - - template // NOLINTNEXTLINE(google-explicit-constructor) - constexpr enumeration(enumeration a_rhs) noexcept : - _impl(static_cast(a_rhs.get())) - {} - - template - constexpr enumeration(Args... a_values) noexcept // - requires(std::same_as&&...) : - _impl((static_cast(a_values) | ...)) - {} - - ~enumeration() noexcept = default; - - constexpr enumeration& operator=(const enumeration&) noexcept = default; - constexpr enumeration& operator=(enumeration&&) noexcept = default; - - template - constexpr enumeration& operator=(enumeration a_rhs) noexcept - { - _impl = static_cast(a_rhs.get()); - } - - constexpr enumeration& operator=(enum_type a_value) noexcept - { - _impl = static_cast(a_value); - return *this; - } - - [[nodiscard]] explicit constexpr operator bool() const noexcept { return _impl != static_cast(0); } - - [[nodiscard]] constexpr enum_type operator*() const noexcept { return get(); } - [[nodiscard]] constexpr enum_type get() const noexcept { return static_cast(_impl); } - [[nodiscard]] constexpr underlying_type underlying() const noexcept { return _impl; } - - template - constexpr enumeration& set(Args... a_args) noexcept // - requires(std::same_as&&...) - { - _impl |= (static_cast(a_args) | ...); - return *this; - } - - template - constexpr enumeration& reset(Args... a_args) noexcept // - requires(std::same_as&&...) - { - _impl &= ~(static_cast(a_args) | ...); - return *this; - } - - template - [[nodiscard]] constexpr bool any(Args... a_args) const noexcept // - requires(std::same_as&&...) - { - return (_impl & (static_cast(a_args) | ...)) != static_cast(0); - } - - template - [[nodiscard]] constexpr bool all(Args... a_args) const noexcept // - requires(std::same_as&&...) - { - return (_impl & (static_cast(a_args) | ...)) == (static_cast(a_args) | ...); - } + using super = REX::EnumSet; - template - [[nodiscard]] constexpr bool none(Args... a_args) const noexcept // - requires(std::same_as&&...) - { - return (_impl & (static_cast(a_args) | ...)) == static_cast(0); - } + public: + using enum_type = E; + using underlying_type = U; - private: - underlying_type _impl{ 0 }; + using super::super; + using super::operator=; + using super::operator*; }; template @@ -311,125 +236,10 @@ namespace SKSE } } -#define SKSE_MAKE_LOGICAL_OP(a_op, a_result) \ - template \ - [[nodiscard]] constexpr a_result operator a_op(enumeration a_lhs, enumeration a_rhs) noexcept \ - { \ - return a_lhs.get() a_op a_rhs.get(); \ - } \ - \ - template \ - [[nodiscard]] constexpr a_result operator a_op(enumeration a_lhs, E a_rhs) noexcept \ - { \ - return a_lhs.get() a_op a_rhs; \ - } - -#define SKSE_MAKE_ARITHMETIC_OP(a_op) \ - template \ - [[nodiscard]] constexpr auto operator a_op(enumeration a_enum, U a_shift) noexcept \ - ->enumeration \ - { \ - return static_cast(static_cast(a_enum.get()) a_op a_shift); \ - } \ - \ - template \ - constexpr auto operator a_op##=(enumeration& a_enum, U a_shift) noexcept \ - ->enumeration& \ - { \ - return a_enum = a_enum a_op a_shift; \ - } - -#define SKSE_MAKE_ENUMERATION_OP(a_op) \ - template \ - [[nodiscard]] constexpr auto operator a_op(enumeration a_lhs, enumeration a_rhs) noexcept \ - ->enumeration> \ - { \ - return static_cast(static_cast(a_lhs.get()) a_op static_cast(a_rhs.get())); \ - } \ - \ - template \ - [[nodiscard]] constexpr auto operator a_op(enumeration a_lhs, E a_rhs) noexcept \ - ->enumeration \ - { \ - return static_cast(static_cast(a_lhs.get()) a_op static_cast(a_rhs)); \ - } \ - \ - template \ - [[nodiscard]] constexpr auto operator a_op(E a_lhs, enumeration a_rhs) noexcept \ - ->enumeration \ - { \ - return static_cast(static_cast(a_lhs) a_op static_cast(a_rhs.get())); \ - } \ - \ - template \ - constexpr auto operator a_op##=(enumeration& a_lhs, enumeration a_rhs) noexcept \ - ->enumeration& \ - { \ - return a_lhs = a_lhs a_op a_rhs; \ - } \ - \ - template \ - constexpr auto operator a_op##=(enumeration& a_lhs, E a_rhs) noexcept \ - ->enumeration& \ - { \ - return a_lhs = a_lhs a_op a_rhs; \ - } \ - \ - template \ - constexpr auto operator a_op##=(E& a_lhs, enumeration a_rhs) noexcept \ - ->E& \ - { \ - return a_lhs = *(a_lhs a_op a_rhs); \ - } - -#define SKSE_MAKE_INCREMENTER_OP(a_op) \ - template \ - constexpr auto operator a_op##a_op(enumeration& a_lhs) noexcept \ - ->enumeration& \ - { \ - return a_lhs a_op## = static_cast(1); \ - } \ - \ - template \ - [[nodiscard]] constexpr auto operator a_op##a_op(enumeration& a_lhs, int) noexcept \ - ->enumeration \ - { \ - const auto tmp = a_lhs; \ - a_op##a_op a_lhs; \ - return tmp; \ - } - namespace SKSE { namespace stl { - template < - class E, - class U> - [[nodiscard]] constexpr auto operator~(enumeration a_enum) noexcept - -> enumeration - { - return static_cast(~static_cast(a_enum.get())); - } - - SKSE_MAKE_LOGICAL_OP(==, bool); - SKSE_MAKE_LOGICAL_OP(<=>, std::strong_ordering); - - SKSE_MAKE_ARITHMETIC_OP(<<); - SKSE_MAKE_ENUMERATION_OP(<<); - SKSE_MAKE_ARITHMETIC_OP(>>); - SKSE_MAKE_ENUMERATION_OP(>>); - - SKSE_MAKE_ENUMERATION_OP(|); - SKSE_MAKE_ENUMERATION_OP(&); - SKSE_MAKE_ENUMERATION_OP(^); - - SKSE_MAKE_ENUMERATION_OP(+); - SKSE_MAKE_ENUMERATION_OP(-); - - SKSE_MAKE_INCREMENTER_OP(+); // ++ - SKSE_MAKE_INCREMENTER_OP(-); // -- - template class atomic_ref : public std::atomic_ref @@ -513,7 +323,7 @@ namespace SKSE template [[nodiscard]] inline auto pun_bits(Args... a_args) // - requires(std::same_as, bool>&&...) + requires(std::same_as, bool> && ...) { constexpr auto ARGC = sizeof...(Args); @@ -678,11 +488,6 @@ namespace SKSE } } -#undef SKSE_MAKE_INCREMENTER_OP -#undef SKSE_MAKE_ENUMERATION_OP -#undef SKSE_MAKE_ARITHMETIC_OP -#undef SKSE_MAKE_LOGICAL_OP - namespace RE { using namespace std::literals; diff --git a/include/SKSE/Impl/Stubs.h b/include/SKSE/Impl/Stubs.h index de1bed3e1..57647b327 100644 --- a/include/SKSE/Impl/Stubs.h +++ b/include/SKSE/Impl/Stubs.h @@ -29,70 +29,70 @@ namespace SKSE std::uint32_t runtimeVersion; std::uint32_t editorVersion; std::uint32_t isEditor; - void* (*QueryInterface)(std::uint32_t); - PluginHandle (*GetPluginHandle)(); + void* (*QueryInterface)(std::uint32_t); + PluginHandle (*GetPluginHandle)(); std::uint32_t (*GetReleaseIndex)(); - const void* (*GetPluginInfo)(const char*); + const void* (*GetPluginInfo)(const char*); }; struct SKSEMessagingInterface { std::uint32_t interfaceVersion; - bool (*RegisterListener)(PluginHandle, const char*, void*); - bool (*Dispatch)(PluginHandle, std::uint32_t, void*, std::uint32_t, const char*); - void* (*GetEventDispatcher)(std::uint32_t); + bool (*RegisterListener)(PluginHandle, const char*, void*); + bool (*Dispatch)(PluginHandle, std::uint32_t, void*, std::uint32_t, const char*); + void* (*GetEventDispatcher)(std::uint32_t); }; struct SKSEObjectInterface { - std::uint32_t interfaceVersion; - SKSEDelayFunctorManager& (*GetDelayFunctorManager)(); - SKSEObjectRegistry& (*GetObjectRegistry)(); + std::uint32_t interfaceVersion; + SKSEDelayFunctorManager& (*GetDelayFunctorManager)(); + SKSEObjectRegistry& (*GetObjectRegistry)(); SKSEPersistentObjectStorage& (*GetPersistentObjectStorage)(); }; struct SKSEPapyrusInterface { std::uint32_t interfaceVersion; - bool (*Register)(void*); + bool (*Register)(void*); }; struct SKSEScaleformInterface { std::uint32_t interfaceVersion; - bool (*Register)(const char*, void*); - void (*RegisterForInventory)(void*); + bool (*Register)(const char*, void*); + void (*RegisterForInventory)(void*); }; struct SKSESerializationInterface { std::uint32_t version; - void (*SetUniqueID)(PluginHandle, std::uint32_t); - void (*SetRevertCallback)(PluginHandle, void*); - void (*SetSaveCallback)(PluginHandle, void*); - void (*SetLoadCallback)(PluginHandle, void*); - void (*SetFormDeleteCallback)(PluginHandle, void*); - bool (*WriteRecord)(std::uint32_t, std::uint32_t, const void*, std::uint32_t); - bool (*OpenRecord)(std::uint32_t, std::uint32_t); - bool (*WriteRecordData)(const void*, std::uint32_t); - bool (*GetNextRecordInfo)(std::uint32_t*, std::uint32_t*, std::uint32_t*); + void (*SetUniqueID)(PluginHandle, std::uint32_t); + void (*SetRevertCallback)(PluginHandle, void*); + void (*SetSaveCallback)(PluginHandle, void*); + void (*SetLoadCallback)(PluginHandle, void*); + void (*SetFormDeleteCallback)(PluginHandle, void*); + bool (*WriteRecord)(std::uint32_t, std::uint32_t, const void*, std::uint32_t); + bool (*OpenRecord)(std::uint32_t, std::uint32_t); + bool (*WriteRecordData)(const void*, std::uint32_t); + bool (*GetNextRecordInfo)(std::uint32_t*, std::uint32_t*, std::uint32_t*); std::uint32_t (*ReadRecordData)(void*, std::uint32_t); - bool (*ResolveHandle)(std::uint64_t, std::uint64_t*); - bool (*ResolveFormId)(std::uint32_t, std::uint32_t*); + bool (*ResolveHandle)(std::uint64_t, std::uint64_t*); + bool (*ResolveFormId)(std::uint32_t, std::uint32_t*); }; struct SKSETaskInterface { std::uint32_t interfaceVersion; - void (*AddTask)(void*); - void (*AddUITask)(void*); + void (*AddTask)(void*); + void (*AddUITask)(void*); }; struct SKSETrampolineInterface { std::uint32_t interfaceVersion; - void* (*AllocateFromBranchPool)(PluginHandle, std::size_t); - void* (*AllocateFromLocalPool)(PluginHandle, std::size_t); + void* (*AllocateFromBranchPool)(PluginHandle, std::size_t); + void* (*AllocateFromLocalPool)(PluginHandle, std::size_t); }; class TaskDelegate diff --git a/include/SKSE/Interfaces.h b/include/SKSE/Interfaces.h index a204360cf..696cbe1a9 100644 --- a/include/SKSE/Interfaces.h +++ b/include/SKSE/Interfaces.h @@ -100,23 +100,13 @@ namespace SKSE bool WriteRecord(std::uint32_t a_type, std::uint32_t a_version, const void* a_buf, std::uint32_t a_length) const; - template < - class T, - std::enable_if_t< - std::negation_v< - std::is_pointer>, - int> = 0> + template >, int> = 0> inline bool WriteRecord(std::uint32_t a_type, std::uint32_t a_version, const T& a_buf) const { return WriteRecord(a_type, a_version, std::addressof(a_buf), sizeof(T)); } - template < - class T, - std::size_t N, - std::enable_if_t< - std::is_array_v, - int> = 0> + template , int> = 0> inline bool WriteRecord(std::uint32_t a_type, std::uint32_t a_version, const T (&a_buf)[N]) const { return WriteRecord(a_type, a_version, std::addressof(a_buf), sizeof(T) * N); @@ -125,55 +115,61 @@ namespace SKSE [[nodiscard]] bool OpenRecord(std::uint32_t a_type, std::uint32_t a_version) const; bool WriteRecordData(const void* a_buf, std::uint32_t a_length) const; + bool WriteRecordDataEx(std::uint32_t& a_diff, const void* a_buf, std::uint32_t a_length) const; - template < - class T, - std::enable_if_t< - std::negation_v< - std::is_pointer>, - int> = 0> - inline bool WriteRecordData(const T& a_buf) const + template >, int> = 0> + bool WriteRecordData(const T& a_buf) const { return WriteRecordData(std::addressof(a_buf), sizeof(T)); } - template < - class T, - std::size_t N, - std::enable_if_t< - std::is_array_v, - int> = 0> - inline bool WriteRecordData(const T (&a_buf)[N]) const + template >, int> = 0> + bool WriteRecordDataEx(std::uint32_t& a_diff, const T& a_buf) const + { + return WriteRecordDataEx(a_diff, std::addressof(a_buf), sizeof(T)); + } + + template , int> = 0> + bool WriteRecordData(const T (&a_buf)[N]) const { return WriteRecordData(std::addressof(a_buf), sizeof(T) * N); } + template , int> = 0> + bool WriteRecordDataEx(std::uint32_t& a_diff, const T (&a_buf)[N]) const + { + return WriteRecordDataEx(a_diff, std::addressof(a_buf), sizeof(T) * N); + } + bool GetNextRecordInfo(std::uint32_t& a_type, std::uint32_t& a_version, std::uint32_t& a_length) const; std::uint32_t ReadRecordData(void* a_buf, std::uint32_t a_length) const; + std::uint32_t ReadRecordDataEx(std::uint32_t& a_diff, void* a_buf, std::uint32_t a_length) const; - template < - class T, - std::enable_if_t< - std::negation_v< - std::is_pointer>, - int> = 0> - inline std::uint32_t ReadRecordData(T& a_buf) const + template >, int> = 0> + std::uint32_t ReadRecordData(T& a_buf) const { return ReadRecordData(std::addressof(a_buf), sizeof(T)); } - template < - class T, - std::size_t N, - std::enable_if_t< - std::is_array_v, - int> = 0> - inline std::uint32_t ReadRecordData(T (&a_buf)[N]) const + template >, int> = 0> + std::uint32_t ReadRecordDataEx(std::uint32_t& a_diff, T& a_buf) const + { + return ReadRecordDataEx(a_diff, std::addressof(a_buf), sizeof(T)); + } + + template , int> = 0> + std::uint32_t ReadRecordData(T (&a_buf)[N]) const { return ReadRecordData(std::addressof(a_buf), sizeof(T) * N); } + template , int> = 0> + std::uint32_t ReadRecordDataEx(std::uint32_t& a_diff, T (&a_buf)[N]) const + { + return ReadRecordDataEx(a_diff, std::addressof(a_buf), sizeof(T) * N); + } + bool ResolveFormID(RE::FormID a_oldFormID, RE::FormID& a_newFormID) const; bool ResolveHandle(RE::VMHandle a_oldHandle, RE::VMHandle& a_newHandle) const; diff --git a/src/RE/A/Array.cpp b/src/RE/A/Array.cpp index abab30b79..df9a7abb3 100644 --- a/src/RE/A/Array.cpp +++ b/src/RE/A/Array.cpp @@ -162,7 +162,7 @@ namespace RE [[nodiscard]] TypeInfo::RawType Array::type() const { - const stl::enumeration typeID = _elementType.GetRawType(); + const REX::EnumSet typeID = _elementType.GetRawType(); switch (*typeID) { case TypeInfo::RawType::kNone: case TypeInfo::RawType::kObject: diff --git a/src/RE/B/BGSSkillPerkTreeNode.cpp b/src/RE/B/BGSSkillPerkTreeNode.cpp index 910b4148a..bf2ffcd19 100644 --- a/src/RE/B/BGSSkillPerkTreeNode.cpp +++ b/src/RE/B/BGSSkillPerkTreeNode.cpp @@ -5,7 +5,7 @@ namespace RE BGSSkillPerkTreeNode::BGSSkillPerkTreeNode(std::int32_t a_index, ActorValueInfo* a_avInfo) { using func_t = BGSSkillPerkTreeNode* (*)(BGSSkillPerkTreeNode*, std::int32_t, ActorValueInfo*); - static REL::Relocation func{ Offset::BGSSkillPerkTreeNode::Ctor }; + static REL::Relocation func{ Offset::BGSSkillPerkTreeNode::Ctor }; func(this, a_index, a_avInfo); } } diff --git a/src/RE/B/BSScaleformManager.cpp b/src/RE/B/BSScaleformManager.cpp index 4fd7d2e1d..97f324dd1 100644 --- a/src/RE/B/BSScaleformManager.cpp +++ b/src/RE/B/BSScaleformManager.cpp @@ -59,8 +59,8 @@ namespace RE return false; } - const stl::enumeration loadFlags{ LoadConstants::kLoadKeepBindData, LoadConstants::kLoadWaitFrame1 }; - const auto def = loader->CreateMovie(filePath->c_str(), *loadFlags); + const REX::EnumSet loadFlags{ LoadConstants::kLoadKeepBindData, LoadConstants::kLoadWaitFrame1 }; + const auto def = loader->CreateMovie(filePath->c_str(), *loadFlags); if (!def) { return false; } @@ -119,8 +119,8 @@ namespace RE return false; } - const stl::enumeration loadFlags{ LoadConstants::kLoadKeepBindData, LoadConstants::kLoadWaitFrame1 }; - const auto def = loader->CreateMovie(filePath->c_str(), *loadFlags); + const REX::EnumSet loadFlags{ LoadConstants::kLoadKeepBindData, LoadConstants::kLoadWaitFrame1 }; + const auto def = loader->CreateMovie(filePath->c_str(), *loadFlags); if (!def) { return false; } diff --git a/src/RE/G/GFxTranslator.cpp b/src/RE/G/GFxTranslator.cpp index 1eca0e351..1d368bee3 100644 --- a/src/RE/G/GFxTranslator.cpp +++ b/src/RE/G/GFxTranslator.cpp @@ -100,12 +100,12 @@ namespace RE bool GFxTranslator::CanReceiveHTML() const { - return (stl::enumeration{ GetCaps() } & TranslateCap::kReceiveHTML) != TranslateCap::kNone; + return (REX::EnumSet{ GetCaps() } & TranslateCap::kReceiveHTML) != TranslateCap::kNone; } bool GFxTranslator::NeedStripNewLines() const { - return (stl::enumeration{ GetCaps() } & TranslateCap::kStripTrailingNewLines) != TranslateCap::kNone; + return (REX::EnumSet{ GetCaps() } & TranslateCap::kStripTrailingNewLines) != TranslateCap::kNone; } bool GFxTranslator::HandlesCustomWordWrapping() const diff --git a/src/RE/G/GFxWWHelper.cpp b/src/RE/G/GFxWWHelper.cpp index f35ee77e6..6317e1ded 100644 --- a/src/RE/G/GFxWWHelper.cpp +++ b/src/RE/G/GFxWWHelper.cpp @@ -6,7 +6,7 @@ namespace RE { bool GFxWWHelper::FindCharWithFlags(WordWrappingType a_wwMode, wchar_t a_ch, BreakInfoFlags a_charBreakFlags) { - const stl::enumeration wwMode{ a_wwMode }; + const REX::EnumSet wwMode{ a_wwMode }; if ((wwMode & WordWrappingType::kProhibition) == WordWrappingType::kNone) { return false; } @@ -29,7 +29,7 @@ namespace RE bool GFxWWHelper::IsAsianChar(WordWrappingType a_wwMode, wchar_t a_ch) { - const stl::enumeration wwMode{ a_wwMode }; + const REX::EnumSet wwMode{ a_wwMode }; if ((wwMode & WordWrappingType::kNoHangulWrap) != WordWrappingType::kNone) { if ((a_ch >= 0x1100 && a_ch <= 0x11FF) || (a_ch >= 0x3130 && a_ch <= 0x318F) || (a_ch >= 0xAC00 && a_ch <= 0xD7A3)) { return false; @@ -131,7 +131,7 @@ namespace RE { assert(a_paraText); - const stl::enumeration wwMode{ a_wwMode }; + const REX::EnumSet wwMode{ a_wwMode }; if ((wwMode & WordWrappingType::kAll) == WordWrappingType::kNone || a_lineLen == 0) { return UPINT_MAX; } diff --git a/src/RE/G/GString.cpp b/src/RE/G/GString.cpp index 2d7de830e..3728e2946 100644 --- a/src/RE/G/GString.cpp +++ b/src/RE/G/GString.cpp @@ -56,7 +56,7 @@ namespace RE _dataDesc() { std::string_view view(""); - operator=(view); + operator=(view); } GString::GString(const GString& a_rhs) : @@ -118,7 +118,7 @@ namespace RE GString& GString::operator=(const char* a_rhs) { std::string_view view(a_rhs); - return operator=(view); + return operator=(view); } GString& GString::operator=(const std::string_view& a_rhs) diff --git a/src/RE/I/Inventory3DManager.cpp b/src/RE/I/Inventory3DManager.cpp index 2c998536e..f902993da 100644 --- a/src/RE/I/Inventory3DManager.cpp +++ b/src/RE/I/Inventory3DManager.cpp @@ -24,14 +24,14 @@ namespace RE void Inventory3DManager::LoadInventoryItem(InventoryEntryData* a_objDesc) { - using func_t = void (*)(Inventory3DManager*, InventoryEntryData*); + using func_t = void (*)(Inventory3DManager*, InventoryEntryData*); static REL::Relocation func{ RELOCATION_ID(50884, 51757) }; return func(this, a_objDesc); } void Inventory3DManager::LoadInventoryItem(TESBoundObject* a_object, ExtraDataList* a_extraDataList) { - using func_t = void (*)(Inventory3DManager*, TESBoundObject*, ExtraDataList*); + using func_t = void (*)(Inventory3DManager*, TESBoundObject*, ExtraDataList*); static REL::Relocation func{ RELOCATION_ID(50885, 51758) }; return func(this, a_object, a_extraDataList); } diff --git a/src/RE/N/NiCamera.cpp b/src/RE/N/NiCamera.cpp index 5898234ab..94bcfb127 100644 --- a/src/RE/N/NiCamera.cpp +++ b/src/RE/N/NiCamera.cpp @@ -42,7 +42,7 @@ namespace RE bool NiCamera::WorldPtToScreenPt3(const float a_matrix[4][4], const NiRect& a_port, const NiPoint3& a_point, float& a_xOut, float& a_yOut, float& a_zOut, float a_zeroTolerance) { - using func_t = bool (*)(const float[4][4], const NiRect&, const NiPoint3&, float&, float&, float&, float); + using func_t = bool (*)(const float[4][4], const NiRect&, const NiPoint3&, float&, float&, float&, float); static REL::Relocation func{ Offset::NiCamera::WorldPtToScreenPt3 }; return func(a_matrix, a_port, a_point, a_xOut, a_yOut, a_zOut, a_zeroTolerance); } diff --git a/src/RE/U/UI3DSceneManager.cpp b/src/RE/U/UI3DSceneManager.cpp index 2fe2b3584..8b2034c29 100644 --- a/src/RE/U/UI3DSceneManager.cpp +++ b/src/RE/U/UI3DSceneManager.cpp @@ -15,7 +15,7 @@ namespace RE void UI3DSceneManager::AttachChild(NiAVObject* a_obj, INTERFACE_LIGHT_SCHEME a_scheme) { - using func_t = void (*)(UI3DSceneManager*, NiAVObject*, INTERFACE_LIGHT_SCHEME); + using func_t = void (*)(UI3DSceneManager*, NiAVObject*, INTERFACE_LIGHT_SCHEME); static REL::Relocation func{ RELOCATION_ID(51859, 52731) }; return func(this, a_obj, a_scheme); } diff --git a/src/REL/Relocation.cpp b/src/REL/Relocation.cpp index 4ce831bde..7a0d491eb 100644 --- a/src/REL/Relocation.cpp +++ b/src/REL/Relocation.cpp @@ -8,7 +8,7 @@ namespace REL { std::uint32_t old{ 0 }; bool success = REX::W32::VirtualProtect( - reinterpret_cast(a_dst), a_count, REX::W32::PAGE_EXECUTE_READWRITE, std::addressof(old)); + reinterpret_cast(a_dst), a_count, REX::W32::PAGE_EXECUTE_READWRITE, std::addressof(old)); if (success) { std::memcpy(reinterpret_cast(a_dst), a_src, a_count); success = REX::W32::VirtualProtect( @@ -22,7 +22,7 @@ namespace REL { std::uint32_t old{ 0 }; bool success = REX::W32::VirtualProtect( - reinterpret_cast(a_dst), a_count, REX::W32::PAGE_EXECUTE_READWRITE, std::addressof(old)); + reinterpret_cast(a_dst), a_count, REX::W32::PAGE_EXECUTE_READWRITE, std::addressof(old)); if (success) { std::fill_n(reinterpret_cast(a_dst), a_count, a_value); success = REX::W32::VirtualProtect( diff --git a/src/REX/W32.cpp b/src/REX/W32.cpp new file mode 100644 index 000000000..9a584bfff --- /dev/null +++ b/src/REX/W32.cpp @@ -0,0 +1,959 @@ +#include "REX/W32/ADVAPI32.h" +#include "REX/W32/BCRYPT.h" +#include "REX/W32/D3D11.h" +#include "REX/W32/D3DCOMPILER.h" +#include "REX/W32/DBGHELP.h" +#include "REX/W32/DXGI.h" +#include "REX/W32/KERNEL32.h" +#include "REX/W32/NT.h" +#include "REX/W32/OLE32.h" +#include "REX/W32/SHELL32.h" +#include "REX/W32/USER32.h" +#include "REX/W32/VERSION.h" + +// ADVAPI32 + +REX_W32_IMPORT(std::int32_t, RegGetValueA, REX::W32::HKEY, const char*, const char*, std::uint32_t, std::uint32_t*, void*, std::uint32_t*); +REX_W32_IMPORT(std::int32_t, RegGetValueW, REX::W32::HKEY, const wchar_t*, const wchar_t*, std::uint32_t, std::uint32_t*, void*, std::uint32_t*); + +namespace REX::W32 +{ + std::int32_t RegGetValueA(HKEY a_key, const char* a_subKey, const char* a_value, std::uint32_t a_flags, std::uint32_t* a_type, void* a_data, std::uint32_t* a_dataLen) + { + return ::W32_IMPL_RegGetValueA(a_key, a_subKey, a_value, a_flags, a_type, a_data, a_dataLen); + } + + std::int32_t RegGetValueW(HKEY a_key, const wchar_t* a_subKey, const wchar_t* a_value, std::uint32_t a_flags, std::uint32_t* a_type, void* a_data, std::uint32_t* a_dataLen) + { + return ::W32_IMPL_RegGetValueW(a_key, a_subKey, a_value, a_flags, a_type, a_data, a_dataLen); + } +} + +// BCRYPT + +REX_W32_IMPORT(REX::W32::NTSTATUS, BCryptOpenAlgorithmProvider, REX::W32::BCRYPT_ALG_HANDLE*, const wchar_t*, const wchar_t*, std::uint32_t); +REX_W32_IMPORT(REX::W32::NTSTATUS, BCryptCloseAlgorithmProvider, REX::W32::BCRYPT_ALG_HANDLE, std::uint32_t); +REX_W32_IMPORT(REX::W32::NTSTATUS, BCryptCreateHash, REX::W32::BCRYPT_ALG_HANDLE, BCRYPT_HASH_HANDLE*, std::uint8_t*, std::uint32_t, std::uint8_t*, std::uint32_t, std::uint32_t); +REX_W32_IMPORT(REX::W32::NTSTATUS, BCryptDestroyHash, REX::W32::BCRYPT_HASH_HANDLE); +REX_W32_IMPORT(REX::W32::NTSTATUS, BCryptFinishHash, REX::W32::BCRYPT_HASH_HANDLE, std::uint8_t*, std::uint32_t, std::uint32_t); +REX_W32_IMPORT(REX::W32::NTSTATUS, BCryptGetProperty, REX::W32::BCRYPT_HANDLE, const wchar_t*, std::uint8_t*, std::uint32_t, std::uint32_t*, std::uint32_t); +REX_W32_IMPORT(REX::W32::NTSTATUS, BCryptHashData, REX::W32::BCRYPT_HASH_HANDLE, std::uint8_t*, std::uint32_t, std::uint32_t); + +namespace REX::W32 +{ + NTSTATUS BCryptOpenAlgorithmProvider(BCRYPT_ALG_HANDLE* a_algorithm, const wchar_t* a_id, const wchar_t* a_impl, std::uint32_t a_flags) + { + return ::W32_IMPL_BCryptOpenAlgorithmProvider(a_algorithm, a_id, a_impl, a_flags); + } + + NTSTATUS BCryptCloseAlgorithmProvider(BCRYPT_ALG_HANDLE a_algorithm, std::uint32_t a_flags) + { + return ::W32_IMPL_BCryptCloseAlgorithmProvider(a_algorithm, a_flags); + } + + NTSTATUS BCryptCreateHash(BCRYPT_ALG_HANDLE a_algorithm, BCRYPT_HASH_HANDLE* a_hash, std::uint8_t* a_hashObject, std::uint32_t a_hashObjectSize, std::uint8_t* a_secret, std::uint32_t a_secretSize, std::uint32_t a_flags) + { + return ::W32_IMPL_BCryptCreateHash(a_algorithm, a_hash, a_hashObject, a_hashObjectSize, a_secret, a_secretSize, a_flags); + } + + NTSTATUS BCryptDestroyHash(BCRYPT_HASH_HANDLE a_hash) + { + return ::W32_IMPL_BCryptDestroyHash(a_hash); + } + + NTSTATUS BCryptFinishHash(BCRYPT_HASH_HANDLE a_hash, std::uint8_t* a_output, std::uint32_t a_outputSize, std::uint32_t a_flags) + { + return ::W32_IMPL_BCryptFinishHash(a_hash, a_output, a_outputSize, a_flags); + } + + NTSTATUS BCryptGetProperty(BCRYPT_HANDLE a_object, const wchar_t* a_property, std::uint8_t* a_output, std::uint32_t a_outputSize, std::uint32_t* a_result, std::uint32_t a_flags) + { + return ::W32_IMPL_BCryptGetProperty(a_object, a_property, a_output, a_outputSize, a_result, a_flags); + } + + NTSTATUS BCryptHashData(BCRYPT_HASH_HANDLE a_hash, std::uint8_t* a_input, std::uint32_t a_inputSize, std::uint32_t a_flags) + { + return ::W32_IMPL_BCryptHashData(a_hash, a_input, a_inputSize, a_flags); + } +} + +// D3D11 + +REX_W32_IMPORT(std::int32_t, D3D11CreateDevice, REX::W32::IDXGIAdapter*, REX::W32::D3D_DRIVER_TYPE, REX::W32::HMODULE, std::uint32_t, const REX::W32::D3D_FEATURE_LEVEL*, std::uint32_t, std::uint32_t, REX::W32::ID3D11Device**, REX::W32::D3D_FEATURE_LEVEL*, REX::W32::ID3D11DeviceContext**); +REX_W32_IMPORT(std::int32_t, D3D11CreateDeviceAndSwapChain, REX::W32::IDXGIAdapter*, REX::W32::D3D_DRIVER_TYPE, REX::W32::HMODULE, std::uint32_t, const REX::W32::D3D_FEATURE_LEVEL*, std::uint32_t, std::uint32_t, const REX::W32::DXGI_SWAP_CHAIN_DESC*, REX::W32::IDXGISwapChain**, REX::W32::ID3D11Device**, REX::W32::D3D_FEATURE_LEVEL*, REX::W32::ID3D11DeviceContext**); + +namespace REX::W32 +{ + HRESULT D3D11CreateDevice(IDXGIAdapter* a_adapter, D3D_DRIVER_TYPE a_driverType, HMODULE a_software, std::uint32_t a_flags, const D3D_FEATURE_LEVEL* a_pFeatureLevels, std::uint32_t a_featureLevels, std::uint32_t a_sdkVersion, ID3D11Device** a_device, D3D_FEATURE_LEVEL* a_pFeatureLevel, ID3D11DeviceContext** a_immediateContext) noexcept + { + return ::W32_IMPL_D3D11CreateDevice(a_adapter, a_driverType, a_software, a_flags, a_pFeatureLevels, a_featureLevels, a_sdkVersion, a_device, a_pFeatureLevel, a_immediateContext); + } + + HRESULT D3D11CreateDeviceAndSwapChain(IDXGIAdapter* a_adapter, D3D_DRIVER_TYPE a_driverType, HMODULE a_software, std::uint32_t a_flags, const D3D_FEATURE_LEVEL* a_pFeatureLevels, std::uint32_t a_featureLevels, std::uint32_t a_sdkVersion, const DXGI_SWAP_CHAIN_DESC* a_swapChainDesc, IDXGISwapChain** a_swapChain, ID3D11Device** a_device, D3D_FEATURE_LEVEL* a_pFeatureLevel, ID3D11DeviceContext** a_immediateContext) noexcept + { + return ::W32_IMPL_D3D11CreateDeviceAndSwapChain(a_adapter, a_driverType, a_software, a_flags, a_pFeatureLevels, a_featureLevels, a_sdkVersion, a_swapChainDesc, a_swapChain, a_device, a_pFeatureLevel, a_immediateContext); + } +} + +// D3DCOMPILER + +REX_W32_IMPORT(std::int32_t, D3DCompile, const void*, std::size_t, const char*, const REX::W32::D3D_SHADER_MACRO*, REX::W32::ID3DInclude*, const char*, const char*, std::uint32_t, std::uint32_t, REX::W32::ID3DBlob**, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DCompile2, const void*, std::size_t, const char*, const REX::W32::D3D_SHADER_MACRO*, REX::W32::ID3DInclude*, const char*, const char*, std::uint32_t, std::uint32_t, std::uint32_t, const void*, std::size_t, REX::W32::ID3DBlob**, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DCompileFromFile, const wchar_t*, const REX::W32::D3D_SHADER_MACRO*, REX::W32::ID3DInclude*, const char*, const char*, std::uint32_t, std::uint32_t, REX::W32::ID3DBlob**, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DCompressShaders, std::uint32_t, REX::W32::D3D_SHADER_DATA*, std::uint32_t, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DCreateBlob, std::size_t, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DCreateFunctionLinkingGraph, std::uint32_t, REX::W32::ID3D11FunctionLinkingGraph**); +REX_W32_IMPORT(std::int32_t, D3DCreateLinker, REX::W32::ID3D11Linker**); +REX_W32_IMPORT(std::int32_t, D3DDecompressShaders, const void*, std::size_t, std::uint32_t, std::uint32_t, std::uint32_t*, std::uint32_t, REX::W32::ID3DBlob**, std::uint32_t*); +REX_W32_IMPORT(std::int32_t, D3DDisassemble, const void*, std::size_t, std::uint32_t, const char*, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DDisassemble10Effect, REX::W32::ID3D10Effect*, std::uint32_t, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DDisassembleRegion, const void*, std::size_t, std::uint32_t, const char*, std::size_t, std::size_t, std::size_t*, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DGetBlobPart, const void*, std::size_t, REX::W32::D3D_BLOB_PART, std::uint32_t a_flags, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DGetDebugInfo, const void*, std::size_t, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DGetInputSignatureBlob, const void*, std::size_t, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DGetInputAndOutputSignatureBlob, const void*, std::size_t, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DGetOutputSignatureBlob, const void*, std::size_t, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DGetTraceInstructionOffsets, const void*, std::size_t, std::uint32_t, std::size_t, std::size_t, std::size_t*, std::size_t*); +REX_W32_IMPORT(std::int32_t, D3DLoadModule, const void*, std::size_t, REX::W32::ID3D11Module**); +REX_W32_IMPORT(std::int32_t, D3DPreprocess, const void*, std::size_t, const char*, const REX::W32::D3D_SHADER_MACRO*, REX::W32::ID3DInclude*, REX::W32::ID3DBlob**, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DReadFileToBlob, const wchar_t*, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DReflect, const void*, std::size_t, const REX::W32::IID&, void**); +REX_W32_IMPORT(std::int32_t, D3DReflectLibrary, const void*, std::size_t, const REX::W32::IID&, void**); +REX_W32_IMPORT(std::int32_t, D3DSetBlobPart, const void*, std::size_t, REX::W32::D3D_BLOB_PART, std::uint32_t, const void*, std::size_t, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DStripShader, const void*, std::size_t, std::uint32_t, REX::W32::ID3DBlob**); +REX_W32_IMPORT(std::int32_t, D3DWriteBlobToFile, REX::W32::ID3DBlob*, const wchar_t*, REX::W32::BOOL); + +namespace REX::W32 +{ + HRESULT D3DCompile(const void* a_srcData, std::size_t a_srcDataSize, const char* a_sourceName, const D3D_SHADER_MACRO* a_defines, ID3DInclude* a_include, const char* a_entrypoint, const char* a_target, std::uint32_t a_flags1, std::uint32_t a_flags2, ID3DBlob** a_code, ID3DBlob** a_errorMsgs) + { + return ::W32_IMPL_D3DCompile(a_srcData, a_srcDataSize, a_sourceName, a_defines, a_include, a_entrypoint, a_target, a_flags1, a_flags2, a_code, a_errorMsgs); + } + + HRESULT D3DCompile2(const void* a_srcData, std::size_t a_srcDataSize, const char* a_sourceName, const D3D_SHADER_MACRO* a_defines, ID3DInclude* a_include, const char* a_entrypoint, const char* a_target, std::uint32_t a_flags1, std::uint32_t a_flags2, std::uint32_t a_secondaryDataFlags, const void* a_secondaryData, std::size_t a_secondaryDataSize, ID3DBlob** a_code, ID3DBlob** a_errorMsgs) + { + return ::W32_IMPL_D3DCompile2(a_srcData, a_srcDataSize, a_sourceName, a_defines, a_include, a_entrypoint, a_target, a_flags1, a_flags2, a_secondaryDataFlags, a_secondaryData, a_secondaryDataSize, a_code, a_errorMsgs); + } + + HRESULT D3DCompileFromFile(const wchar_t* a_fileName, const D3D_SHADER_MACRO* a_defines, ID3DInclude* a_include, const char* a_entrypoint, const char* a_target, std::uint32_t a_flags1, std::uint32_t a_flags2, ID3DBlob** a_code, ID3DBlob** a_errorMsgs) + { + return ::W32_IMPL_D3DCompileFromFile(a_fileName, a_defines, a_include, a_entrypoint, a_target, a_flags1, a_flags2, a_code, a_errorMsgs); + } + + HRESULT D3DCompressShaders(std::uint32_t a_numShaders, D3D_SHADER_DATA* a_shaderData, std::uint32_t a_flags, ID3DBlob** a_compressedData) + { + return ::W32_IMPL_D3DCompressShaders(a_numShaders, a_shaderData, a_flags, a_compressedData); + } + + HRESULT D3DCreateBlob(std::size_t a_size, ID3DBlob** a_blob) + { + return ::W32_IMPL_D3DCreateBlob(a_size, a_blob); + } + + HRESULT D3DCreateFunctionLinkingGraph(std::uint32_t a_flags, ID3D11FunctionLinkingGraph** a_functionLinkingGraph) + { + return ::W32_IMPL_D3DCreateFunctionLinkingGraph(a_flags, a_functionLinkingGraph); + } + + HRESULT D3DCreateLinker(ID3D11Linker** a_linker) + { + return ::W32_IMPL_D3DCreateLinker(a_linker); + } + + HRESULT D3DDecompressShaders(const void* a_srcData, std::size_t a_srcDataSize, std::uint32_t a_numShaders, std::uint32_t a_startIndex, std::uint32_t* a_indices, std::uint32_t a_flags, ID3DBlob** a_shaders, std::uint32_t* a_totalShaders) + { + return ::W32_IMPL_D3DDecompressShaders(a_srcData, a_srcDataSize, a_numShaders, a_startIndex, a_indices, a_flags, a_shaders, a_totalShaders); + } + + HRESULT D3DDisassemble(const void* a_srcData, std::size_t a_srcDataSize, std::uint32_t a_flags, const char* a_comments, ID3DBlob** a_disassembly) + { + return ::W32_IMPL_D3DDisassemble(a_srcData, a_srcDataSize, a_flags, a_comments, a_disassembly); + } + + HRESULT D3DDisassemble10Effect(ID3D10Effect* a_effect, std::uint32_t a_flags, ID3DBlob** a_disassembly) + { + return ::W32_IMPL_D3DDisassemble10Effect(a_effect, a_flags, a_disassembly); + } + + HRESULT D3DDisassembleRegion(const void* a_srcData, std::size_t a_srcDataSize, std::uint32_t a_flags, const char* a_comments, std::size_t a_startByteOffset, std::size_t a_numInsts, std::size_t* a_finishByteOffset, ID3DBlob** a_disassembly) + { + return ::W32_IMPL_D3DDisassembleRegion(a_srcData, a_srcDataSize, a_flags, a_comments, a_startByteOffset, a_numInsts, a_finishByteOffset, a_disassembly); + } + + HRESULT D3DGetBlobPart(const void* a_srcData, std::size_t a_srcDataSize, D3D_BLOB_PART a_partType, std::uint32_t a_flags, ID3DBlob** a_part) + { + return ::W32_IMPL_D3DGetBlobPart(a_srcData, a_srcDataSize, a_partType, a_flags, a_part); + } + + HRESULT D3DGetDebugInfo(const void* a_srcData, std::size_t a_srcDataSize, ID3DBlob** a_debugInfo) + { + return ::W32_IMPL_D3DGetDebugInfo(a_srcData, a_srcDataSize, a_debugInfo); + } + + HRESULT D3DGetInputSignatureBlob(const void* a_srcData, std::size_t a_srcDataSize, ID3DBlob** a_signatureBlob) + { + return ::W32_IMPL_D3DGetInputSignatureBlob(a_srcData, a_srcDataSize, a_signatureBlob); + } + + HRESULT D3DGetInputAndOutputSignatureBlob(const void* a_srcData, std::size_t a_srcDataSize, ID3DBlob** a_signatureBlob) + { + return ::W32_IMPL_D3DGetInputAndOutputSignatureBlob(a_srcData, a_srcDataSize, a_signatureBlob); + } + + HRESULT D3DGetOutputSignatureBlob(const void* a_srcData, std::size_t a_srcDataSize, ID3DBlob** a_signatureBlob) + { + return ::W32_IMPL_D3DGetOutputSignatureBlob(a_srcData, a_srcDataSize, a_signatureBlob); + } + + HRESULT D3DGetTraceInstructionOffsets(const void* a_srcData, std::size_t a_srcDataSize, std::uint32_t a_flags, std::size_t a_startInstIndex, std::size_t a_numInsts, std::size_t* a_offsets, std::size_t* a_totalInsts) + { + return ::W32_IMPL_D3DGetTraceInstructionOffsets(a_srcData, a_srcDataSize, a_flags, a_startInstIndex, a_numInsts, a_offsets, a_totalInsts); + } + + HRESULT D3DLoadModule(const void* a_srcData, std::size_t a_srcDataSize, ID3D11Module** a_module) + { + return ::W32_IMPL_D3DLoadModule(a_srcData, a_srcDataSize, a_module); + } + + HRESULT D3DPreprocess(const void* a_srcData, std::size_t a_srcDataSize, const char* a_sourceName, const D3D_SHADER_MACRO* a_defines, ID3DInclude* a_include, ID3DBlob** a_codeText, ID3DBlob** a_errorMsgs) + { + return ::W32_IMPL_D3DPreprocess(a_srcData, a_srcDataSize, a_sourceName, a_defines, a_include, a_codeText, a_errorMsgs); + } + + HRESULT D3DReadFileToBlob(const wchar_t* a_fileName, ID3DBlob** a_contents) + { + return ::W32_IMPL_D3DReadFileToBlob(a_fileName, a_contents); + } + + HRESULT D3DReflect(const void* a_srcData, std::size_t a_srcDataSize, const IID& a_iid, void** a_reflector) + { + return ::W32_IMPL_D3DReflect(a_srcData, a_srcDataSize, a_iid, a_reflector); + } + + HRESULT D3DReflectLibrary(const void* a_srcData, std::size_t a_srcDataSize, const IID& a_iid, void** a_reflector) + { + return ::W32_IMPL_D3DReflectLibrary(a_srcData, a_srcDataSize, a_iid, a_reflector); + } + + HRESULT D3DSetBlobPart(const void* a_srcData, std::size_t a_srcDataSize, D3D_BLOB_PART a_partType, std::uint32_t a_flags, const void* a_part, std::size_t a_partSize, ID3DBlob** a_newShader) + { + return ::W32_IMPL_D3DSetBlobPart(a_srcData, a_srcDataSize, a_partType, a_flags, a_part, a_partSize, a_newShader); + } + + HRESULT D3DStripShader(const void* a_srcData, std::size_t a_srcDataSize, std::uint32_t a_stripFlags, ID3DBlob** a_strippedBlob) + { + return ::W32_IMPL_D3DStripShader(a_srcData, a_srcDataSize, a_stripFlags, a_strippedBlob); + } + + HRESULT D3DWriteBlobToFile(ID3DBlob* a_blob, const wchar_t* a_fileName, bool a_overwrite) + { + return ::W32_IMPL_D3DWriteBlobToFile(a_blob, a_fileName, static_cast(a_overwrite)); + } +} + +// DBGHELP + +REX_W32_IMPORT(std::uint32_t, UnDecorateSymbolName, const char*, char*, std::uint32_t, std::uint32_t); +REX_W32_IMPORT(std::uint32_t, UnDecorateSymbolNameW, const wchar_t*, wchar_t*, std::uint32_t, std::uint32_t); + +namespace REX::W32 +{ + std::uint32_t UnDecorateSymbolName(const char* a_name, char* a_buf, std::uint32_t a_bufLen, std::uint32_t a_flags) noexcept + { + return ::W32_IMPL_UnDecorateSymbolName(a_name, a_buf, a_bufLen, a_flags); + } + + std::uint32_t UnDecorateSymbolNameW(const wchar_t* a_name, wchar_t* a_buf, std::uint32_t a_bufLen, std::uint32_t a_flags) noexcept + { + return ::W32_IMPL_UnDecorateSymbolNameW(a_name, a_buf, a_bufLen, a_flags); + } +} + +// DXGI + +REX_W32_IMPORT(std::int32_t, CreateDXGIFactory, const IID&, void**); +REX_W32_IMPORT(std::int32_t, CreateDXGIFactory1, const IID&, void**); + +namespace REX::W32 +{ + HRESULT CreateDXGIFactory(const IID& a_iid, void** a_factory) noexcept + { + return ::W32_IMPL_CreateDXGIFactory(a_iid, a_factory); + } + + HRESULT CreateDXGIFactory1(const IID& a_iid, void** a_factory) noexcept + { + return ::W32_IMPL_CreateDXGIFactory1(a_iid, a_factory); + } +} + +// KERNEL32 + +REX_W32_IMPORT(REX::W32::BOOL, CloseHandle, REX::W32::HANDLE); +REX_W32_IMPORT(REX::W32::HANDLE, CreateFileA, const char*, std::uint32_t, std::uint32_t, REX::W32::SECURITY_ATTRIBUTES*, std::uint32_t, std::uint32_t, REX::W32::HANDLE); +REX_W32_IMPORT(REX::W32::HANDLE, CreateFileW, const wchar_t*, std::uint32_t, std::uint32_t, REX::W32::SECURITY_ATTRIBUTES*, std::uint32_t, std::uint32_t, REX::W32::HANDLE); +REX_W32_IMPORT(REX::W32::HANDLE, CreateFileMappingA, REX::W32::HANDLE, REX::W32::SECURITY_ATTRIBUTES*, std::uint32_t, std::uint32_t, std::uint32_t, const char*); +REX_W32_IMPORT(REX::W32::HANDLE, CreateFileMappingW, REX::W32::HANDLE, REX::W32::SECURITY_ATTRIBUTES*, std::uint32_t, std::uint32_t, std::uint32_t, const wchar_t*); +REX_W32_IMPORT(REX::W32::BOOL, CreateProcessA, const char*, char*, REX::W32::SECURITY_ATTRIBUTES*, REX::W32::SECURITY_ATTRIBUTES*, REX::W32::BOOL, std::uint32_t, void*, const char*, REX::W32::STARTUPINFOA*, REX::W32::PROCESS_INFORMATION*); +REX_W32_IMPORT(REX::W32::BOOL, CreateProcessW, const wchar_t*, wchar_t*, REX::W32::SECURITY_ATTRIBUTES*, REX::W32::SECURITY_ATTRIBUTES*, REX::W32::BOOL, std::uint32_t, void*, const wchar_t*, REX::W32::STARTUPINFOW*, REX::W32::PROCESS_INFORMATION*); +REX_W32_IMPORT(REX::W32::HANDLE, CreateRemoteThread, REX::W32::HANDLE, REX::W32::SECURITY_ATTRIBUTES*, std::size_t, REX::W32::THREAD_START_ROUTINE*, void*, std::uint32_t, std::uint32_t*); +REX_W32_IMPORT(REX::W32::HANDLE, CreateSemaphoreA, REX::W32::SECURITY_ATTRIBUTES*, std::int32_t, std::int32_t, const char*); +REX_W32_IMPORT(REX::W32::HANDLE, CreateThread, REX::W32::SECURITY_ATTRIBUTES*, std::size_t, REX::W32::THREAD_START_ROUTINE*, void*, std::uint32_t, std::uint32_t*); +REX_W32_IMPORT(void, DeleteCriticalSection, REX::W32::CRITICAL_SECTION*); +REX_W32_IMPORT(void, EnterCriticalSection, REX::W32::CRITICAL_SECTION*); +REX_W32_IMPORT(std::uint32_t, ExpandEnvironmentStringsA, const char*, char*, std::uint32_t); +REX_W32_IMPORT(std::uint32_t, ExpandEnvironmentStringsW, const wchar_t*, wchar_t*, std::uint32_t); +REX_W32_IMPORT(REX::W32::BOOL, FindClose, REX::W32::HANDLE); +REX_W32_IMPORT(REX::W32::HANDLE, FindFirstFileA, const char*, REX::W32::WIN32_FIND_DATAA*); +REX_W32_IMPORT(REX::W32::HANDLE, FindFirstFileW, const wchar_t*, REX::W32::WIN32_FIND_DATAW*); +REX_W32_IMPORT(REX::W32::BOOL, FindNextFileA, REX::W32::HANDLE, REX::W32::WIN32_FIND_DATAA*); +REX_W32_IMPORT(REX::W32::BOOL, FindNextFileW, REX::W32::HANDLE, REX::W32::WIN32_FIND_DATAW*); +REX_W32_IMPORT(REX::W32::BOOL, FlushInstructionCache, REX::W32::HANDLE, const void*, std::size_t); +REX_W32_IMPORT(REX::W32::BOOL, FreeLibrary, REX::W32::HMODULE); +REX_W32_IMPORT(REX::W32::BOOL, GetComputerNameA, char*, std::uint32_t*); +REX_W32_IMPORT(REX::W32::BOOL, GetComputerNameW, wchar_t*, std::uint32_t*); +REX_W32_IMPORT(std::uint32_t, GetCurrentDirectoryA, std::uint32_t, char*); +REX_W32_IMPORT(std::uint32_t, GetCurrentDirectoryW, std::uint32_t, wchar_t*); +REX_W32_IMPORT(REX::W32::HANDLE, GetCurrentProcess); +REX_W32_IMPORT(std::uint32_t, GetCurrentThreadId); +REX_W32_IMPORT(std::uint32_t, GetEnvironmentVariableA, const char*, char*, std::uint32_t); +REX_W32_IMPORT(std::uint32_t, GetEnvironmentVariableW, const wchar_t*, wchar_t*, std::uint32_t); +REX_W32_IMPORT(REX::W32::BOOL, GetFileSizeEx, REX::W32::HANDLE, REX::W32::LARGE_INTEGER*); +REX_W32_IMPORT(std::uint32_t, GetLastError); +REX_W32_IMPORT(std::uint32_t, GetModuleFileNameA, REX::W32::HMODULE, char*, std::uint32_t); +REX_W32_IMPORT(std::uint32_t, GetModuleFileNameW, REX::W32::HMODULE, wchar_t*, std::uint32_t); +REX_W32_IMPORT(REX::W32::HMODULE, GetModuleHandleA, const char*); +REX_W32_IMPORT(REX::W32::HMODULE, GetModuleHandleW, const wchar_t*); +REX_W32_IMPORT(std::uint32_t, GetPrivateProfileIntA, const char*, const char*, std::int32_t, const char*); +REX_W32_IMPORT(std::uint32_t, GetPrivateProfileIntW, const wchar_t*, const wchar_t*, std::int32_t, const wchar_t*); +REX_W32_IMPORT(std::uint32_t, GetPrivateProfileStringA, const char*, const char*, const char*, char*, std::uint32_t, const char*); +REX_W32_IMPORT(std::uint32_t, GetPrivateProfileStringW, const wchar_t*, const wchar_t*, const wchar_t*, wchar_t*, std::uint32_t, const wchar_t*); +REX_W32_IMPORT(void*, GetProcAddress, REX::W32::HMODULE, const char*); +REX_W32_IMPORT(void, GetSystemInfo, REX::W32::SYSTEM_INFO*); +REX_W32_IMPORT(REX::W32::BOOL, InitializeCriticalSectionAndSpinCount, REX::W32::CRITICAL_SECTION*, std::uint32_t); +REX_W32_IMPORT(REX::W32::BOOL, IsDebuggerPresent); +REX_W32_IMPORT(std::int32_t, LCMapStringEx, const wchar_t*, std::uint32_t, const wchar_t*, std::int32_t, wchar_t*, std::int32_t, REX::W32::NLSVERSIONINFO*, void*, std::intptr_t); +REX_W32_IMPORT(void, LeaveCriticalSection, REX::W32::CRITICAL_SECTION*); +REX_W32_IMPORT(REX::W32::HMODULE, LoadLibraryA, const char*); +REX_W32_IMPORT(REX::W32::HMODULE, LoadLibraryW, const wchar_t*); +REX_W32_IMPORT(void*, MapViewOfFile, REX::W32::HANDLE, std::uint32_t, std::uint32_t, std::uint32_t, std::size_t); +REX_W32_IMPORT(void*, MapViewOfFileEx, REX::W32::HANDLE, std::uint32_t, std::uint32_t, std::uint32_t, std::size_t, void*); +REX_W32_IMPORT(std::int32_t, MultiByteToWideChar, std::uint32_t, std::uint32_t, const char*, std::int32_t, wchar_t*, std::int32_t); +REX_W32_IMPORT(REX::W32::HANDLE, OpenFileMappingA, std::uint32_t, REX::W32::BOOL, const char*); +REX_W32_IMPORT(REX::W32::HANDLE, OpenFileMappingW, std::uint32_t, REX::W32::BOOL, const wchar_t*); +REX_W32_IMPORT(void, OutputDebugStringA, const char*); +REX_W32_IMPORT(void, OutputDebugStringW, const wchar_t*); +REX_W32_IMPORT(REX::W32::BOOL, QueryPerformanceCounter, std::int64_t*); +REX_W32_IMPORT(REX::W32::BOOL, QueryPerformanceFrequency, std::int64_t*); +REX_W32_IMPORT(std::uint32_t, ResumeThread, REX::W32::HANDLE); +REX_W32_IMPORT(REX::W32::BOOL, SetEnvironmentVariableA, const char*, const char*); +REX_W32_IMPORT(REX::W32::BOOL, SetEnvironmentVariableW, const wchar_t*, const wchar_t*); +REX_W32_IMPORT(void, Sleep, std::uint32_t); +REX_W32_IMPORT(REX::W32::BOOL, TerminateProcess, REX::W32::HANDLE, std::uint32_t); +REX_W32_IMPORT(void*, TlsGetValue, std::uint32_t); +REX_W32_IMPORT(REX::W32::BOOL, TlsSetValue, std::uint32_t, void*); +REX_W32_IMPORT(REX::W32::BOOL, UnmapViewOfFile, const void*); +REX_W32_IMPORT(void*, VirtualAlloc, void*, std::size_t, std::uint32_t, std::uint32_t); +REX_W32_IMPORT(void*, VirtualAllocEx, REX::W32::HANDLE, void*, std::size_t, std::uint32_t, std::uint32_t); +REX_W32_IMPORT(REX::W32::BOOL, VirtualFree, void*, std::size_t, std::uint32_t); +REX_W32_IMPORT(REX::W32::BOOL, VirtualFreeEx, REX::W32::HANDLE, void*, std::size_t, std::uint32_t); +REX_W32_IMPORT(REX::W32::BOOL, VirtualProtect, void*, std::size_t, std::uint32_t, std::uint32_t*); +REX_W32_IMPORT(REX::W32::BOOL, VirtualProtectEx, REX::W32::HANDLE, void*, std::size_t, std::uint32_t, std::uint32_t*); +REX_W32_IMPORT(std::size_t, VirtualQuery, const void*, MEMORY_BASIC_INFORMATION*, std::size_t); +REX_W32_IMPORT(std::size_t, VirtualQueryEx, REX::W32::HANDLE, const void*, MEMORY_BASIC_INFORMATION*, std::size_t); +REX_W32_IMPORT(std::uint32_t, WaitForSingleObject, REX::W32::HANDLE, std::uint32_t); +REX_W32_IMPORT(std::uint32_t, WaitForSingleObjectEx, REX::W32::HANDLE, std::uint32_t, REX::W32::BOOL); +REX_W32_IMPORT(std::int32_t, WideCharToMultiByte, std::uint32_t, std::uint32_t, const wchar_t*, std::int32_t, char*, std::int32_t, const char*, std::int32_t*); +REX_W32_IMPORT(REX::W32::BOOL, WriteProcessMemory, REX::W32::HANDLE, void*, const void*, std::size_t, std::size_t*); + +extern "C" REX::W32::IMAGE_DOS_HEADER __ImageBase; + +namespace REX::W32 +{ + bool CloseHandle(HANDLE a_handle) noexcept + { + return ::W32_IMPL_CloseHandle(a_handle); + } + + HANDLE CreateFileA(const char* a_fileName, std::uint32_t a_desiredAccess, std::uint32_t a_shareMode, SECURITY_ATTRIBUTES* a_attributes, std::uint32_t a_creationDisposition, std::uint32_t a_flags, HANDLE a_templateFile) + { + return ::W32_IMPL_CreateFileA(a_fileName, a_desiredAccess, a_shareMode, a_attributes, a_creationDisposition, a_flags, a_templateFile); + } + + HANDLE CreateFileW(const wchar_t* a_fileName, std::uint32_t a_desiredAccess, std::uint32_t a_shareMode, SECURITY_ATTRIBUTES* a_attributes, std::uint32_t a_creationDisposition, std::uint32_t a_flags, HANDLE a_templateFile) + { + return ::W32_IMPL_CreateFileW(a_fileName, a_desiredAccess, a_shareMode, a_attributes, a_creationDisposition, a_flags, a_templateFile); + } + + HANDLE CreateFileMappingA(HANDLE a_file, SECURITY_ATTRIBUTES* a_attributes, std::uint32_t a_protect, std::uint32_t a_maxSizeHigh, std::uint32_t a_maxSizeLow, const char* a_name) noexcept + { + return ::W32_IMPL_CreateFileMappingA(a_file, a_attributes, a_protect, a_maxSizeHigh, a_maxSizeLow, a_name); + } + + HANDLE CreateFileMappingW(HANDLE a_file, SECURITY_ATTRIBUTES* a_attributes, std::uint32_t a_protect, std::uint32_t a_maxSizeHigh, std::uint32_t a_maxSizeLow, const wchar_t* a_name) noexcept + { + return ::W32_IMPL_CreateFileMappingW(a_file, a_attributes, a_protect, a_maxSizeHigh, a_maxSizeLow, a_name); + } + + bool CreateProcessA(const char* a_name, char* a_cmd, SECURITY_ATTRIBUTES* a_procAttr, SECURITY_ATTRIBUTES* a_threadAttr, bool a_inheritHandles, std::uint32_t a_flags, void* a_env, const char* a_curDir, STARTUPINFOA* a_startInfo, PROCESS_INFORMATION* a_procInfo) noexcept + { + return ::W32_IMPL_CreateProcessA(a_name, a_cmd, a_procAttr, a_threadAttr, a_inheritHandles, a_flags, a_env, a_curDir, a_startInfo, a_procInfo); + } + + bool CreateProcessW(const wchar_t* a_name, wchar_t* a_cmd, SECURITY_ATTRIBUTES* a_procAttr, SECURITY_ATTRIBUTES* a_threadAttr, bool a_inheritHandles, std::uint32_t a_flags, void* a_env, const wchar_t* a_curDir, STARTUPINFOW* a_startInfo, PROCESS_INFORMATION* a_procInfo) noexcept + { + return ::W32_IMPL_CreateProcessW(a_name, a_cmd, a_procAttr, a_threadAttr, a_inheritHandles, a_flags, a_env, a_curDir, a_startInfo, a_procInfo); + } + + HANDLE CreateRemoteThread(HANDLE a_process, SECURITY_ATTRIBUTES* a_threadAttr, std::size_t a_stackSize, THREAD_START_ROUTINE* a_startAddr, void* a_param, std::uint32_t a_flags, std::uint32_t* a_threadID) noexcept + { + return ::W32_IMPL_CreateRemoteThread(a_process, a_threadAttr, a_stackSize, a_startAddr, a_param, a_flags, a_threadID); + } + + HANDLE CreateSemaphoreA(SECURITY_ATTRIBUTES* a_semaphoreAttr, std::int32_t a_initCount, std::int32_t a_maxCount, const char* a_name) + { + return ::W32_IMPL_CreateSemaphoreA(a_semaphoreAttr, a_initCount, a_maxCount, a_name); + } + + HANDLE CreateThread(SECURITY_ATTRIBUTES* a_threadAttr, std::size_t a_stackSize, THREAD_START_ROUTINE* a_startAddr, void* a_param, std::uint32_t a_flags, std::uint32_t* a_threadID) noexcept + { + return ::W32_IMPL_CreateThread(a_threadAttr, a_stackSize, a_startAddr, a_param, a_flags, a_threadID); + } + + void DeleteCriticalSection(CRITICAL_SECTION* a_criticalSection) + { + ::W32_IMPL_DeleteCriticalSection(a_criticalSection); + } + + void EnterCriticalSection(CRITICAL_SECTION* a_criticalSection) + { + ::W32_IMPL_EnterCriticalSection(a_criticalSection); + } + + std::uint32_t ExpandEnvironmentStringsA(const char* a_src, char* a_dst, std::uint32_t a_dstLen) noexcept + { + return ::W32_IMPL_ExpandEnvironmentStringsA(a_src, a_dst, a_dstLen); + } + + std::uint32_t ExpandEnvironmentStringsW(const wchar_t* a_src, wchar_t* a_dst, std::uint32_t a_dstLen) noexcept + { + return ::W32_IMPL_ExpandEnvironmentStringsW(a_src, a_dst, a_dstLen); + } + + bool FindClose(HANDLE a_file) noexcept + { + return ::W32_IMPL_FindClose(a_file); + } + + HANDLE FindFirstFileA(const char* a_name, WIN32_FIND_DATAA* a_data) noexcept + { + return ::W32_IMPL_FindFirstFileA(a_name, a_data); + } + + HANDLE FindFirstFileW(const wchar_t* a_name, WIN32_FIND_DATAW* a_data) noexcept + { + return ::W32_IMPL_FindFirstFileW(a_name, a_data); + } + + bool FindNextFileA(HANDLE a_file, WIN32_FIND_DATAA* a_data) noexcept + { + return ::W32_IMPL_FindNextFileA(a_file, a_data); + } + + bool FindNextFileW(HANDLE a_file, WIN32_FIND_DATAW* a_data) noexcept + { + return ::W32_IMPL_FindNextFileW(a_file, a_data); + } + + bool FlushInstructionCache(HANDLE a_process, const void* a_baseAddr, std::size_t a_size) noexcept + { + return ::W32_IMPL_FlushInstructionCache(a_process, a_baseAddr, a_size); + } + + bool FreeLibrary(HMODULE a_module) noexcept + { + return ::W32_IMPL_FreeLibrary(a_module); + } + + bool GetComputerNameA(char* a_buffer, std::uint32_t* a_size) noexcept + { + return ::W32_IMPL_GetComputerNameA(a_buffer, a_size); + } + + bool GetComputerNameW(wchar_t* a_buffer, std::uint32_t* a_size) noexcept + { + return ::W32_IMPL_GetComputerNameW(a_buffer, a_size); + } + + std::uint32_t GetCurrentDirectoryA(std::uint32_t a_size, char* a_buffer) noexcept + { + return ::W32_IMPL_GetCurrentDirectoryA(a_size, a_buffer); + } + + std::uint32_t GetCurrentDirectoryW(std::uint32_t a_size, wchar_t* a_buffer) noexcept + { + return ::W32_IMPL_GetCurrentDirectoryW(a_size, a_buffer); + } + + HMODULE GetCurrentModule() noexcept + { + return reinterpret_cast(std::addressof(__ImageBase)); + } + + HANDLE GetCurrentProcess() noexcept + { + return ::W32_IMPL_GetCurrentProcess(); + } + + std::uint32_t GetCurrentThreadId() noexcept + { + return ::W32_IMPL_GetCurrentThreadId(); + } + + std::uint32_t GetEnvironmentVariableA(const char* a_name, char* a_buf, std::uint32_t a_bufLen) noexcept + { + return ::W32_IMPL_GetEnvironmentVariableA(a_name, a_buf, a_bufLen); + } + + std::uint32_t GetEnvironmentVariableW(const wchar_t* a_name, wchar_t* a_buf, std::uint32_t a_bufLen) noexcept + { + return ::W32_IMPL_GetEnvironmentVariableW(a_name, a_buf, a_bufLen); + } + + bool GetFileSizeEx(HANDLE a_file, LARGE_INTEGER* a_fileSize) noexcept + { + return ::W32_IMPL_GetFileSizeEx(a_file, a_fileSize); + } + + std::uint32_t GetLastError() noexcept + { + return ::W32_IMPL_GetLastError(); + } + + std::uint32_t GetModuleFileNameA(HMODULE a_module, char* a_name, std::uint32_t a_nameLen) noexcept + { + return ::W32_IMPL_GetModuleFileNameA(a_module, a_name, a_nameLen); + } + + std::uint32_t GetModuleFileNameW(HMODULE a_module, wchar_t* a_name, std::uint32_t a_nameLen) noexcept + { + return ::W32_IMPL_GetModuleFileNameW(a_module, a_name, a_nameLen); + } + + HMODULE GetModuleHandleA(const char* a_name) noexcept + { + return ::W32_IMPL_GetModuleHandleA(a_name); + } + + HMODULE GetModuleHandleW(const wchar_t* a_name) noexcept + { + return ::W32_IMPL_GetModuleHandleW(a_name); + } + + std::uint32_t GetPrivateProfileIntA(const char* a_app, const char* a_key, std::int32_t a_default, const char* a_name) noexcept + { + return ::W32_IMPL_GetPrivateProfileIntA(a_app, a_key, a_default, a_name); + } + + std::uint32_t GetPrivateProfileIntW(const wchar_t* a_app, const wchar_t* a_key, std::int32_t a_default, const wchar_t* a_name) noexcept + { + return ::W32_IMPL_GetPrivateProfileIntW(a_app, a_key, a_default, a_name); + } + + std::uint32_t GetPrivateProfileStringA(const char* a_app, const char* a_key, const char* a_default, char* a_buf, std::uint32_t a_bufLen, const char* a_name) noexcept + { + return ::W32_IMPL_GetPrivateProfileStringA(a_app, a_key, a_default, a_buf, a_bufLen, a_name); + } + + std::uint32_t GetPrivateProfileStringW(const wchar_t* a_app, const wchar_t* a_key, const wchar_t* a_default, wchar_t* a_buf, std::uint32_t a_bufLen, const wchar_t* a_name) noexcept + { + return ::W32_IMPL_GetPrivateProfileStringW(a_app, a_key, a_default, a_buf, a_bufLen, a_name); + } + + void* GetProcAddress(HMODULE a_module, const char* a_name) noexcept + { + return ::W32_IMPL_GetProcAddress(a_module, a_name); + } + + void GetSystemInfo(SYSTEM_INFO* a_info) noexcept + { + return ::W32_IMPL_GetSystemInfo(a_info); + } + + bool IMAGE_SNAP_BY_ORDINAL64(std::uint64_t a_ordinal) noexcept + { + return (a_ordinal & IMAGE_ORDINAL_FLAG64) != 0; + } + + IMAGE_SECTION_HEADER* IMAGE_FIRST_SECTION(const IMAGE_NT_HEADERS64* a_header) noexcept + { + constexpr auto opt = __builtin_offsetof(IMAGE_NT_HEADERS64, optionalHeader); + const auto optSize = a_header->fileHeader.optionalHeaderSize; + const auto section = reinterpret_cast(a_header) + opt + optSize; + return reinterpret_cast(section); + } + + bool InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION* a_criticalSection, std::uint32_t a_spinCount) + { + return ::W32_IMPL_InitializeCriticalSectionAndSpinCount(a_criticalSection, a_spinCount); + } + + std::uint32_t InterlockedCompareExchange(volatile std::uint32_t* a_target, std::uint32_t a_value, std::uint32_t a_compare) noexcept + { + return _InterlockedCompareExchange((volatile long*)a_target, a_value, a_compare); + } + + std::uint64_t InterlockedCompareExchange64(volatile std::uint64_t* a_target, std::uint64_t a_value, std::uint64_t a_compare) noexcept + { + return _InterlockedCompareExchange64((volatile long long*)a_target, a_value, a_compare); + } + + std::uint32_t InterlockedDecrement(volatile std::uint32_t* a_target) noexcept + { + return _InterlockedDecrement((volatile long*)a_target); + } + + std::uint64_t InterlockedDecrement64(volatile std::uint64_t* a_target) noexcept + { + return _InterlockedDecrement64((volatile long long*)a_target); + } + + std::uint32_t InterlockedExchange(volatile std::uint32_t* a_target, std::uint32_t a_value) noexcept + { + return _InterlockedExchange((volatile long*)a_target, a_value); + } + + std::uint64_t InterlockedExchange64(volatile std::uint64_t* a_target, std::uint64_t a_value) noexcept + { + return _InterlockedExchange64((volatile long long*)a_target, a_value); + } + + std::uint32_t InterlockedIncrement(volatile std::uint32_t* a_target) noexcept + { + return _InterlockedIncrement((volatile long*)a_target); + } + + std::uint64_t InterlockedIncrement64(volatile std::uint64_t* a_target) noexcept + { + return _InterlockedIncrement64((volatile long long*)a_target); + } + + bool IsDebuggerPresent() noexcept + { + return ::W32_IMPL_IsDebuggerPresent(); + } + + std::int32_t LCMapStringEx(const wchar_t* a_locale, std::uint32_t a_flags, const wchar_t* a_src, std::int32_t a_srcLen, wchar_t* a_dst, std::int32_t a_dstLen, NLSVERSIONINFO* a_info, void* a_reserved, std::intptr_t a_sortHandle) noexcept + { + return ::W32_IMPL_LCMapStringEx(a_locale, a_flags, a_src, a_srcLen, a_dst, a_dstLen, a_info, a_reserved, a_sortHandle); + } + + void LeaveCriticalSection(CRITICAL_SECTION* a_criticalSection) + { + ::W32_IMPL_LeaveCriticalSection(a_criticalSection); + } + + HMODULE LoadLibraryA(const char* a_name) noexcept + { + return ::W32_IMPL_LoadLibraryA(a_name); + } + + HMODULE LoadLibraryW(const wchar_t* a_name) noexcept + { + return ::W32_IMPL_LoadLibraryW(a_name); + } + + void* MapViewOfFile(HANDLE a_object, std::uint32_t a_desiredAccess, std::uint32_t a_fileOffsetHi, std::uint32_t a_fileOffsetLo, std::size_t a_numBytes) noexcept + { + return ::W32_IMPL_MapViewOfFile(a_object, a_desiredAccess, a_fileOffsetHi, a_fileOffsetLo, a_numBytes); + } + + void* MapViewOfFileEx(HANDLE a_object, std::uint32_t a_desiredAccess, std::uint32_t a_fileOffsetHi, std::uint32_t a_fileOffsetLo, std::size_t a_numBytes, void* a_baseAddr) noexcept + { + return ::W32_IMPL_MapViewOfFileEx(a_object, a_desiredAccess, a_fileOffsetHi, a_fileOffsetLo, a_numBytes, a_baseAddr); + } + + std::int32_t MultiByteToWideChar(std::uint32_t a_codePage, std::uint32_t a_flags, const char* a_src, std::int32_t a_srcLen, wchar_t* a_dst, std::int32_t a_dstLen) noexcept + { + return ::W32_IMPL_MultiByteToWideChar(a_codePage, a_flags, a_src, a_srcLen, a_dst, a_dstLen); + } + + HANDLE OpenFileMappingA(std::uint32_t a_desiredAccess, bool a_inheritHandle, const char* a_name) noexcept + { + return ::W32_IMPL_OpenFileMappingA(a_desiredAccess, a_inheritHandle, a_name); + } + + HANDLE OpenFileMappingW(std::uint32_t a_desiredAccess, bool a_inheritHandle, const wchar_t* a_name) noexcept + { + return ::W32_IMPL_OpenFileMappingW(a_desiredAccess, a_inheritHandle, a_name); + } + + void OutputDebugStringA(const char* a_str) noexcept + { + ::W32_IMPL_OutputDebugStringA(a_str); + } + + void OutputDebugStringW(const wchar_t* a_str) noexcept + { + ::W32_IMPL_OutputDebugStringW(a_str); + } + + bool QueryPerformanceCounter(std::int64_t* a_counter) noexcept + { + return ::W32_IMPL_QueryPerformanceCounter(a_counter); + } + + bool QueryPerformanceFrequency(std::int64_t* a_frequency) noexcept + { + return ::W32_IMPL_QueryPerformanceFrequency(a_frequency); + } + + std::uint32_t ResumeThread(HANDLE a_handle) noexcept + { + return ::W32_IMPL_ResumeThread(a_handle); + } + + bool SetEnvironmentVariableA(const char* a_name, const char* a_value) noexcept + { + return ::W32_IMPL_SetEnvironmentVariableA(a_name, a_value); + } + + bool SetEnvironmentVariableW(const wchar_t* a_name, const wchar_t* a_value) noexcept + { + return ::W32_IMPL_SetEnvironmentVariableW(a_name, a_value); + } + + void Sleep(std::uint32_t a_milliseconds) noexcept + { + ::W32_IMPL_Sleep(a_milliseconds); + } + + bool TerminateProcess(HANDLE a_process, std::uint32_t a_exitCode) noexcept + { + return ::W32_IMPL_TerminateProcess(a_process, a_exitCode); + } + + void* TlsGetValue(std::uint32_t a_index) noexcept + { + return ::W32_IMPL_TlsGetValue(a_index); + } + + bool TlsSetValue(std::uint32_t a_index, void* a_value) noexcept + { + return ::W32_IMPL_TlsSetValue(a_index, a_value); + } + + bool UnmapViewOfFile(const void* a_baseAddress) noexcept + { + return ::W32_IMPL_UnmapViewOfFile(a_baseAddress); + } + + void* VirtualAlloc(void* a_address, std::size_t a_size, std::uint32_t a_type, std::uint32_t a_protect) noexcept + { + return ::W32_IMPL_VirtualAlloc(a_address, a_size, a_type, a_protect); + } + + void* VirtualAllocEx(HANDLE a_process, void* a_address, std::size_t a_size, std::uint32_t a_type, std::uint32_t a_protect) noexcept + { + return ::W32_IMPL_VirtualAllocEx(a_process, a_address, a_size, a_type, a_protect); + } + + bool VirtualFree(void* a_address, std::size_t a_size, std::uint32_t a_type) noexcept + { + return ::W32_IMPL_VirtualFree(a_address, a_size, a_type); + } + + bool VirtualFreeEx(HANDLE a_process, void* a_address, std::size_t a_size, std::uint32_t a_type) noexcept + { + return ::W32_IMPL_VirtualFreeEx(a_process, a_address, a_size, a_type); + } + + bool VirtualProtect(void* a_address, std::size_t a_size, std::uint32_t a_newProtect, std::uint32_t* a_oldProtect) noexcept + { + return ::W32_IMPL_VirtualProtect(a_address, a_size, a_newProtect, a_oldProtect); + } + + bool VirtualProtectEx(HANDLE a_process, void* a_address, std::size_t a_size, std::uint32_t a_newProtect, std::uint32_t* a_oldProtect) noexcept + { + return ::W32_IMPL_VirtualProtectEx(a_process, a_address, a_size, a_newProtect, a_oldProtect); + } + + std::size_t VirtualQuery(const void* a_address, MEMORY_BASIC_INFORMATION* a_buf, std::size_t a_bufLen) noexcept + { + return ::W32_IMPL_VirtualQuery(a_address, a_buf, a_bufLen); + } + + std::size_t VirtualQueryEx(HANDLE a_process, const void* a_address, MEMORY_BASIC_INFORMATION* a_buf, std::size_t a_bufLen) noexcept + { + return ::W32_IMPL_VirtualQueryEx(a_process, a_address, a_buf, a_bufLen); + } + + std::uint32_t WaitForSingleObject(HANDLE a_handle, std::uint32_t a_milliseconds) noexcept + { + return ::W32_IMPL_WaitForSingleObject(a_handle, a_milliseconds); + } + + std::uint32_t WaitForSingleObjectEx(HANDLE a_handle, std::uint32_t a_milliseconds, bool a_alertable) noexcept + { + return ::W32_IMPL_WaitForSingleObjectEx(a_handle, a_milliseconds, a_alertable); + } + + std::int32_t WideCharToMultiByte(std::uint32_t a_codePage, std::uint32_t a_flags, const wchar_t* a_src, std::int32_t a_srcLen, char* a_dst, std::int32_t a_dstLen, const char* a_default, std::int32_t* a_defaultLen) + { + return ::W32_IMPL_WideCharToMultiByte(a_codePage, a_flags, a_src, a_srcLen, a_dst, a_dstLen, a_default, a_defaultLen); + } + + bool WriteProcessMemory(HANDLE a_process, void* a_address, const void* a_buf, std::size_t a_bufLen, std::size_t* a_bufWritten) noexcept + { + return ::W32_IMPL_WriteProcessMemory(a_process, a_address, a_buf, a_bufLen, a_bufWritten); + } +} + +// NT +namespace REX::W32 +{ + TEB* NtCurrentTeb() noexcept + { + return reinterpret_cast(__readgsqword(offsetof(NT_TIB, self))); + } +} + +// OLE32 + +REX_W32_IMPORT(void, CoTaskMemFree, void*); + +namespace REX::W32 +{ + void CoTaskMemFree(void* a_block) noexcept + { + ::W32_IMPL_CoTaskMemFree(a_block); + } +} + +// SHELL32 + +REX_W32_IMPORT(std::int32_t, SHGetKnownFolderPath, const REX::W32::GUID&, std::uint32_t, void*, wchar_t**); + +namespace REX::W32 +{ + std::int32_t SHGetKnownFolderPath(const GUID& a_id, std::uint32_t a_flags, void* a_token, wchar_t** a_path) noexcept + { + return ::W32_IMPL_SHGetKnownFolderPath(a_id, a_flags, a_token, a_path); + } +} + +// USER32 + +REX_W32_IMPORT(REX::W32::BOOL, GetClientRect, REX::W32::HWND, REX::W32::RECT*); +REX_W32_IMPORT(std::int32_t, GetKeyNameTextA, std::int32_t, char*, std::int32_t); +REX_W32_IMPORT(std::int32_t, GetKeyNameTextW, std::int32_t, wchar_t*, std::int32_t); +REX_W32_IMPORT(std::int16_t, GetKeyState, std::int32_t); +REX_W32_IMPORT(REX::W32::BOOL, GetWindowRect, REX::W32::HWND, REX::W32::RECT*); +REX_W32_IMPORT(std::int32_t, MessageBoxA, REX::W32::HWND, const char*, const char*, std::uint32_t); +REX_W32_IMPORT(std::int32_t, MessageBoxW, REX::W32::HWND, const wchar_t*, const wchar_t*, std::uint32_t); +REX_W32_IMPORT(std::intptr_t, SetWindowLongPtrA, REX::W32::HWND, std::int32_t, std::intptr_t); +REX_W32_IMPORT(std::int32_t, ShowCursor, REX::W32::BOOL); + +namespace REX::W32 +{ + bool GetClientRect(HWND a_wnd, RECT* a_rect) noexcept + { + return ::W32_IMPL_GetClientRect(a_wnd, a_rect); + } + + std::int32_t GetKeyNameTextA(std::int32_t a_param, char* a_buf, std::int32_t a_bufLen) noexcept + { + return ::W32_IMPL_GetKeyNameTextA(a_param, a_buf, a_bufLen); + } + + std::int32_t GetKeyNameTextW(std::int32_t a_param, wchar_t* a_buf, std::int32_t a_bufLen) noexcept + { + return ::W32_IMPL_GetKeyNameTextW(a_param, a_buf, a_bufLen); + } + + std::int16_t GetKeyState(std::int32_t a_key) noexcept + { + return ::W32_IMPL_GetKeyState(a_key); + } + + bool GetWindowRect(HWND a_wnd, RECT* a_rect) noexcept + { + return ::W32_IMPL_GetWindowRect(a_wnd, a_rect); + } + + std::int32_t MessageBoxA(HWND a_wnd, const char* a_text, const char* a_caption, std::uint32_t a_type) noexcept + { + return ::W32_IMPL_MessageBoxA(a_wnd, a_text, a_caption, a_type); + } + + std::int32_t MessageBoxW(HWND a_wnd, const wchar_t* a_text, const wchar_t* a_caption, std::uint32_t a_type) noexcept + { + return ::W32_IMPL_MessageBoxW(a_wnd, a_text, a_caption, a_type); + } + + std::intptr_t SetWindowLongPtrA(HWND a_wnd, std::int32_t a_index, std::intptr_t a_newPtr) noexcept + { + return ::W32_IMPL_SetWindowLongPtrA(a_wnd, a_index, a_newPtr); + } + + std::int32_t ShowCursor(bool a_show) noexcept + { + return ::W32_IMPL_ShowCursor(a_show); + } +} + +// VERSION + +REX_W32_IMPORT(REX::W32::BOOL, GetFileVersionInfoA, const char*, std::uint32_t, std::uint32_t, void*); +REX_W32_IMPORT(REX::W32::BOOL, GetFileVersionInfoW, const wchar_t*, std::uint32_t, std::uint32_t, void*); +REX_W32_IMPORT(std::uint32_t, GetFileVersionInfoSizeA, const char*, std::uint32_t*); +//REX_W32_IMPORT(std::uint32_t, GetFileVersionInfoSizeExA, std::uint32_t, const char*, std::uint32_t*); +REX_W32_IMPORT(std::uint32_t, GetFileVersionInfoSizeExW, std::uint32_t, const wchar_t*, std::uint32_t*); +REX_W32_IMPORT(std::uint32_t, GetFileVersionInfoSizeW, const wchar_t*, std::uint32_t*); +REX_W32_IMPORT(REX::W32::BOOL, VerQueryValueA, const void*, const char*, void**, std::uint32_t*); +REX_W32_IMPORT(REX::W32::BOOL, VerQueryValueW, const void*, const wchar_t*, void**, std::uint32_t*); + +namespace REX::W32 +{ + bool GetFileVersionInfoA(const char* a_name, std::uint32_t a_handle, std::uint32_t a_dataLen, void* a_data) noexcept + { + return ::W32_IMPL_GetFileVersionInfoA(a_name, a_handle, a_dataLen, a_data); + } + + std::uint32_t GetFileVersionInfoSizeA(const char* a_name, std::uint32_t* a_handle) noexcept + { + return ::W32_IMPL_GetFileVersionInfoSizeA(a_name, a_handle); + } + + /* + std::uint32_t GetFileVersionInfoSizeExA(std::uint32_t a_flags, const char* a_name, std::uint32_t* a_handle) noexcept + { + return ::W32_IMPL_GetFileVersionInfoSizeExA(a_flags, a_name, a_handle); + } + */ + + std::uint32_t GetFileVersionInfoSizeExW(std::uint32_t a_flags, const wchar_t* a_name, std::uint32_t* a_handle) noexcept + { + return ::W32_IMPL_GetFileVersionInfoSizeExW(a_flags, a_name, a_handle); + } + + std::uint32_t GetFileVersionInfoSizeW(const wchar_t* a_name, std::uint32_t* a_handle) noexcept + { + return ::W32_IMPL_GetFileVersionInfoSizeW(a_name, a_handle); + } + + bool GetFileVersionInfoW(const wchar_t* a_name, std::uint32_t a_handle, std::uint32_t a_dataLen, void* a_data) noexcept + { + return ::W32_IMPL_GetFileVersionInfoW(a_name, a_handle, a_dataLen, a_data); + } + + bool VerQueryValueA(const void* a_block, const char* a_subBlock, void** a_buf, std::uint32_t* a_bufLen) noexcept + { + return ::W32_IMPL_VerQueryValueA(a_block, a_subBlock, a_buf, a_bufLen); + } + + bool VerQueryValueW(const void* a_block, const wchar_t* a_subBlock, void** a_buf, std::uint32_t* a_bufLen) noexcept + { + return ::W32_IMPL_VerQueryValueW(a_block, a_subBlock, a_buf, a_bufLen); + } +} diff --git a/src/REX/W32/ADVAPI32.cpp b/src/REX/W32/ADVAPI32.cpp deleted file mode 100644 index a84eb0b01..000000000 --- a/src/REX/W32/ADVAPI32.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "REX/W32/ADVAPI32.h" - -REX_W32_IMPORT(std::int32_t, RegGetValueA, REX::W32::HKEY, const char*, const char*, std::uint32_t, std::uint32_t*, void*, std::uint32_t*); -REX_W32_IMPORT(std::int32_t, RegGetValueW, REX::W32::HKEY, const wchar_t*, const wchar_t*, std::uint32_t, std::uint32_t*, void*, std::uint32_t*); - -namespace REX::W32 -{ - std::int32_t RegGetValueA(HKEY a_key, const char* a_subKey, const char* a_value, std::uint32_t a_flags, std::uint32_t* a_type, void* a_data, std::uint32_t* a_dataLen) - { - return ::W32_IMPL_RegGetValueA(a_key, a_subKey, a_value, a_flags, a_type, a_data, a_dataLen); - } - - std::int32_t RegGetValueW(HKEY a_key, const wchar_t* a_subKey, const wchar_t* a_value, std::uint32_t a_flags, std::uint32_t* a_type, void* a_data, std::uint32_t* a_dataLen) - { - return ::W32_IMPL_RegGetValueW(a_key, a_subKey, a_value, a_flags, a_type, a_data, a_dataLen); - } -} diff --git a/src/REX/W32/D3D11.cpp b/src/REX/W32/D3D11.cpp deleted file mode 100644 index f69676ae9..000000000 --- a/src/REX/W32/D3D11.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "REX/W32/D3D11.h" - -REX_W32_IMPORT(std::int32_t, D3D11CreateDevice, REX::W32::IDXGIAdapter*, REX::W32::D3D_DRIVER_TYPE, REX::W32::HMODULE, std::uint32_t, const REX::W32::D3D_FEATURE_LEVEL*, std::uint32_t, std::uint32_t, REX::W32::ID3D11Device**, REX::W32::D3D_FEATURE_LEVEL*, REX::W32::ID3D11DeviceContext**); -REX_W32_IMPORT(std::int32_t, D3D11CreateDeviceAndSwapChain, REX::W32::IDXGIAdapter*, REX::W32::D3D_DRIVER_TYPE, REX::W32::HMODULE, std::uint32_t, const REX::W32::D3D_FEATURE_LEVEL*, std::uint32_t, std::uint32_t, const REX::W32::DXGI_SWAP_CHAIN_DESC*, REX::W32::IDXGISwapChain**, REX::W32::ID3D11Device**, REX::W32::D3D_FEATURE_LEVEL*, REX::W32::ID3D11DeviceContext**); - -namespace REX::W32 -{ - HRESULT D3D11CreateDevice(IDXGIAdapter* a_adapter, D3D_DRIVER_TYPE a_driverType, HMODULE a_software, std::uint32_t a_flags, const D3D_FEATURE_LEVEL* a_pFeatureLevels, std::uint32_t a_featureLevels, std::uint32_t a_sdkVersion, ID3D11Device** a_device, D3D_FEATURE_LEVEL* a_pFeatureLevel, ID3D11DeviceContext** a_immediateContext) noexcept - { - return ::W32_IMPL_D3D11CreateDevice(a_adapter, a_driverType, a_software, a_flags, a_pFeatureLevels, a_featureLevels, a_sdkVersion, a_device, a_pFeatureLevel, a_immediateContext); - } - - HRESULT D3D11CreateDeviceAndSwapChain(IDXGIAdapter* a_adapter, D3D_DRIVER_TYPE a_driverType, HMODULE a_software, std::uint32_t a_flags, const D3D_FEATURE_LEVEL* a_pFeatureLevels, std::uint32_t a_featureLevels, std::uint32_t a_sdkVersion, const DXGI_SWAP_CHAIN_DESC* a_swapChainDesc, IDXGISwapChain** a_swapChain, ID3D11Device** a_device, D3D_FEATURE_LEVEL* a_pFeatureLevel, ID3D11DeviceContext** a_immediateContext) noexcept - { - return ::W32_IMPL_D3D11CreateDeviceAndSwapChain(a_adapter, a_driverType, a_software, a_flags, a_pFeatureLevels, a_featureLevels, a_sdkVersion, a_swapChainDesc, a_swapChain, a_device, a_pFeatureLevel, a_immediateContext); - } -} diff --git a/src/REX/W32/D3DCOMPILER.cpp b/src/REX/W32/D3DCOMPILER.cpp deleted file mode 100644 index d4964425a..000000000 --- a/src/REX/W32/D3DCOMPILER.cpp +++ /dev/null @@ -1,155 +0,0 @@ -#include "REX/W32/D3DCOMPILER.h" - -REX_W32_IMPORT(std::int32_t, D3DCompile, const void*, std::size_t, const char*, const REX::W32::D3D_SHADER_MACRO*, REX::W32::ID3DInclude*, const char*, const char*, std::uint32_t, std::uint32_t, REX::W32::ID3DBlob**, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DCompile2, const void*, std::size_t, const char*, const REX::W32::D3D_SHADER_MACRO*, REX::W32::ID3DInclude*, const char*, const char*, std::uint32_t, std::uint32_t, std::uint32_t, const void*, std::size_t, REX::W32::ID3DBlob**, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DCompileFromFile, const wchar_t*, const REX::W32::D3D_SHADER_MACRO*, REX::W32::ID3DInclude*, const char*, const char*, std::uint32_t, std::uint32_t, REX::W32::ID3DBlob**, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DCompressShaders, std::uint32_t, REX::W32::D3D_SHADER_DATA*, std::uint32_t, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DCreateBlob, std::size_t, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DCreateFunctionLinkingGraph, std::uint32_t, REX::W32::ID3D11FunctionLinkingGraph**); -REX_W32_IMPORT(std::int32_t, D3DCreateLinker, REX::W32::ID3D11Linker**); -REX_W32_IMPORT(std::int32_t, D3DDecompressShaders, const void*, std::size_t, std::uint32_t, std::uint32_t, std::uint32_t*, std::uint32_t, REX::W32::ID3DBlob**, std::uint32_t*); -REX_W32_IMPORT(std::int32_t, D3DDisassemble, const void*, std::size_t, std::uint32_t, const char*, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DDisassemble10Effect, REX::W32::ID3D10Effect*, std::uint32_t, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DDisassembleRegion, const void*, std::size_t, std::uint32_t, const char*, std::size_t, std::size_t, std::size_t*, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DGetBlobPart, const void*, std::size_t, REX::W32::D3D_BLOB_PART, std::uint32_t a_flags, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DGetDebugInfo, const void*, std::size_t, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DGetInputSignatureBlob, const void*, std::size_t, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DGetInputAndOutputSignatureBlob, const void*, std::size_t, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DGetOutputSignatureBlob, const void*, std::size_t, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DGetTraceInstructionOffsets, const void*, std::size_t, std::uint32_t, std::size_t, std::size_t, std::size_t*, std::size_t*); -REX_W32_IMPORT(std::int32_t, D3DLoadModule, const void*, std::size_t, REX::W32::ID3D11Module**); -REX_W32_IMPORT(std::int32_t, D3DPreprocess, const void*, std::size_t, const char*, const REX::W32::D3D_SHADER_MACRO*, REX::W32::ID3DInclude*, REX::W32::ID3DBlob**, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DReadFileToBlob, const wchar_t*, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DReflect, const void*, std::size_t, const REX::W32::IID&, void**); -REX_W32_IMPORT(std::int32_t, D3DReflectLibrary, const void*, std::size_t, const REX::W32::IID&, void**); -REX_W32_IMPORT(std::int32_t, D3DSetBlobPart, const void*, std::size_t, REX::W32::D3D_BLOB_PART, std::uint32_t, const void*, std::size_t, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DStripShader, const void*, std::size_t, std::uint32_t, REX::W32::ID3DBlob**); -REX_W32_IMPORT(std::int32_t, D3DWriteBlobToFile, REX::W32::ID3DBlob*, const wchar_t*, REX::W32::BOOL); - -namespace REX::W32 -{ - HRESULT D3DCompile(const void* a_srcData, std::size_t a_srcDataSize, const char* a_sourceName, const D3D_SHADER_MACRO* a_defines, ID3DInclude* a_include, const char* a_entrypoint, const char* a_target, std::uint32_t a_flags1, std::uint32_t a_flags2, ID3DBlob** a_code, ID3DBlob** a_errorMsgs) - { - return ::W32_IMPL_D3DCompile(a_srcData, a_srcDataSize, a_sourceName, a_defines, a_include, a_entrypoint, a_target, a_flags1, a_flags2, a_code, a_errorMsgs); - } - - HRESULT D3DCompile2(const void* a_srcData, std::size_t a_srcDataSize, const char* a_sourceName, const D3D_SHADER_MACRO* a_defines, ID3DInclude* a_include, const char* a_entrypoint, const char* a_target, std::uint32_t a_flags1, std::uint32_t a_flags2, std::uint32_t a_secondaryDataFlags, const void* a_secondaryData, std::size_t a_secondaryDataSize, ID3DBlob** a_code, ID3DBlob** a_errorMsgs) - { - return ::W32_IMPL_D3DCompile2(a_srcData, a_srcDataSize, a_sourceName, a_defines, a_include, a_entrypoint, a_target, a_flags1, a_flags2, a_secondaryDataFlags, a_secondaryData, a_secondaryDataSize, a_code, a_errorMsgs); - } - - HRESULT D3DCompileFromFile(const wchar_t* a_fileName, const D3D_SHADER_MACRO* a_defines, ID3DInclude* a_include, const char* a_entrypoint, const char* a_target, std::uint32_t a_flags1, std::uint32_t a_flags2, ID3DBlob** a_code, ID3DBlob** a_errorMsgs) - { - return ::W32_IMPL_D3DCompileFromFile(a_fileName, a_defines, a_include, a_entrypoint, a_target, a_flags1, a_flags2, a_code, a_errorMsgs); - } - - HRESULT D3DCompressShaders(std::uint32_t a_numShaders, D3D_SHADER_DATA* a_shaderData, std::uint32_t a_flags, ID3DBlob** a_compressedData) - { - return ::W32_IMPL_D3DCompressShaders(a_numShaders, a_shaderData, a_flags, a_compressedData); - } - - HRESULT D3DCreateBlob(std::size_t a_size, ID3DBlob** a_blob) - { - return ::W32_IMPL_D3DCreateBlob(a_size, a_blob); - } - - HRESULT D3DCreateFunctionLinkingGraph(std::uint32_t a_flags, ID3D11FunctionLinkingGraph** a_functionLinkingGraph) - { - return ::W32_IMPL_D3DCreateFunctionLinkingGraph(a_flags, a_functionLinkingGraph); - } - - HRESULT D3DCreateLinker(ID3D11Linker** a_linker) - { - return ::W32_IMPL_D3DCreateLinker(a_linker); - } - - HRESULT D3DDecompressShaders(const void* a_srcData, std::size_t a_srcDataSize, std::uint32_t a_numShaders, std::uint32_t a_startIndex, std::uint32_t* a_indices, std::uint32_t a_flags, ID3DBlob** a_shaders, std::uint32_t* a_totalShaders) - { - return ::W32_IMPL_D3DDecompressShaders(a_srcData, a_srcDataSize, a_numShaders, a_startIndex, a_indices, a_flags, a_shaders, a_totalShaders); - } - - HRESULT D3DDisassemble(const void* a_srcData, std::size_t a_srcDataSize, std::uint32_t a_flags, const char* a_comments, ID3DBlob** a_disassembly) - { - return ::W32_IMPL_D3DDisassemble(a_srcData, a_srcDataSize, a_flags, a_comments, a_disassembly); - } - - HRESULT D3DDisassemble10Effect(ID3D10Effect* a_effect, std::uint32_t a_flags, ID3DBlob** a_disassembly) - { - return ::W32_IMPL_D3DDisassemble10Effect(a_effect, a_flags, a_disassembly); - } - - HRESULT D3DDisassembleRegion(const void* a_srcData, std::size_t a_srcDataSize, std::uint32_t a_flags, const char* a_comments, std::size_t a_startByteOffset, std::size_t a_numInsts, std::size_t* a_finishByteOffset, ID3DBlob** a_disassembly) - { - return ::W32_IMPL_D3DDisassembleRegion(a_srcData, a_srcDataSize, a_flags, a_comments, a_startByteOffset, a_numInsts, a_finishByteOffset, a_disassembly); - } - - HRESULT D3DGetBlobPart(const void* a_srcData, std::size_t a_srcDataSize, D3D_BLOB_PART a_partType, std::uint32_t a_flags, ID3DBlob** a_part) - { - return ::W32_IMPL_D3DGetBlobPart(a_srcData, a_srcDataSize, a_partType, a_flags, a_part); - } - - HRESULT D3DGetDebugInfo(const void* a_srcData, std::size_t a_srcDataSize, ID3DBlob** a_debugInfo) - { - return ::W32_IMPL_D3DGetDebugInfo(a_srcData, a_srcDataSize, a_debugInfo); - } - - HRESULT D3DGetInputSignatureBlob(const void* a_srcData, std::size_t a_srcDataSize, ID3DBlob** a_signatureBlob) - { - return ::W32_IMPL_D3DGetInputSignatureBlob(a_srcData, a_srcDataSize, a_signatureBlob); - } - - HRESULT D3DGetInputAndOutputSignatureBlob(const void* a_srcData, std::size_t a_srcDataSize, ID3DBlob** a_signatureBlob) - { - return ::W32_IMPL_D3DGetInputAndOutputSignatureBlob(a_srcData, a_srcDataSize, a_signatureBlob); - } - - HRESULT D3DGetOutputSignatureBlob(const void* a_srcData, std::size_t a_srcDataSize, ID3DBlob** a_signatureBlob) - { - return ::W32_IMPL_D3DGetOutputSignatureBlob(a_srcData, a_srcDataSize, a_signatureBlob); - } - - HRESULT D3DGetTraceInstructionOffsets(const void* a_srcData, std::size_t a_srcDataSize, std::uint32_t a_flags, std::size_t a_startInstIndex, std::size_t a_numInsts, std::size_t* a_offsets, std::size_t* a_totalInsts) - { - return ::W32_IMPL_D3DGetTraceInstructionOffsets(a_srcData, a_srcDataSize, a_flags, a_startInstIndex, a_numInsts, a_offsets, a_totalInsts); - } - - HRESULT D3DLoadModule(const void* a_srcData, std::size_t a_srcDataSize, ID3D11Module** a_module) - { - return ::W32_IMPL_D3DLoadModule(a_srcData, a_srcDataSize, a_module); - } - - HRESULT D3DPreprocess(const void* a_srcData, std::size_t a_srcDataSize, const char* a_sourceName, const D3D_SHADER_MACRO* a_defines, ID3DInclude* a_include, ID3DBlob** a_codeText, ID3DBlob** a_errorMsgs) - { - return ::W32_IMPL_D3DPreprocess(a_srcData, a_srcDataSize, a_sourceName, a_defines, a_include, a_codeText, a_errorMsgs); - } - - HRESULT D3DReadFileToBlob(const wchar_t* a_fileName, ID3DBlob** a_contents) - { - return ::W32_IMPL_D3DReadFileToBlob(a_fileName, a_contents); - } - - HRESULT D3DReflect(const void* a_srcData, std::size_t a_srcDataSize, const IID& a_iid, void** a_reflector) - { - return ::W32_IMPL_D3DReflect(a_srcData, a_srcDataSize, a_iid, a_reflector); - } - - HRESULT D3DReflectLibrary(const void* a_srcData, std::size_t a_srcDataSize, const IID& a_iid, void** a_reflector) - { - return ::W32_IMPL_D3DReflectLibrary(a_srcData, a_srcDataSize, a_iid, a_reflector); - } - - HRESULT D3DSetBlobPart(const void* a_srcData, std::size_t a_srcDataSize, D3D_BLOB_PART a_partType, std::uint32_t a_flags, const void* a_part, std::size_t a_partSize, ID3DBlob** a_newShader) - { - return ::W32_IMPL_D3DSetBlobPart(a_srcData, a_srcDataSize, a_partType, a_flags, a_part, a_partSize, a_newShader); - } - - HRESULT D3DStripShader(const void* a_srcData, std::size_t a_srcDataSize, std::uint32_t a_stripFlags, ID3DBlob** a_strippedBlob) - { - return ::W32_IMPL_D3DStripShader(a_srcData, a_srcDataSize, a_stripFlags, a_strippedBlob); - } - - HRESULT D3DWriteBlobToFile(ID3DBlob* a_blob, const wchar_t* a_fileName, bool a_overwrite) - { - return ::W32_IMPL_D3DWriteBlobToFile(a_blob, a_fileName, static_cast(a_overwrite)); - } -} diff --git a/src/REX/W32/DBGHELP.cpp b/src/REX/W32/DBGHELP.cpp deleted file mode 100644 index dc532bc39..000000000 --- a/src/REX/W32/DBGHELP.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "REX/W32/DBGHELP.h" - -REX_W32_IMPORT(std::uint32_t, UnDecorateSymbolName, const char*, char*, std::uint32_t, std::uint32_t); -REX_W32_IMPORT(std::uint32_t, UnDecorateSymbolNameW, const wchar_t*, wchar_t*, std::uint32_t, std::uint32_t); - -namespace REX::W32 -{ - std::uint32_t UnDecorateSymbolName(const char* a_name, char* a_buf, std::uint32_t a_bufLen, std::uint32_t a_flags) noexcept - { - return ::W32_IMPL_UnDecorateSymbolName(a_name, a_buf, a_bufLen, a_flags); - } - - std::uint32_t UnDecorateSymbolNameW(const wchar_t* a_name, wchar_t* a_buf, std::uint32_t a_bufLen, std::uint32_t a_flags) noexcept - { - return ::W32_IMPL_UnDecorateSymbolNameW(a_name, a_buf, a_bufLen, a_flags); - } -} diff --git a/src/REX/W32/DXGI.cpp b/src/REX/W32/DXGI.cpp deleted file mode 100644 index 0d96643dc..000000000 --- a/src/REX/W32/DXGI.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "REX/W32/DXGI.h" - -REX_W32_IMPORT(std::int32_t, CreateDXGIFactory, const IID&, void**); -REX_W32_IMPORT(std::int32_t, CreateDXGIFactory1, const IID&, void**); - -namespace REX::W32 -{ - HRESULT CreateDXGIFactory(const IID& a_iid, void** a_factory) noexcept - { - return ::W32_IMPL_CreateDXGIFactory(a_iid, a_factory); - } - - HRESULT CreateDXGIFactory1(const IID& a_iid, void** a_factory) noexcept - { - return ::W32_IMPL_CreateDXGIFactory1(a_iid, a_factory); - } -} diff --git a/src/REX/W32/KERNEL32.cpp b/src/REX/W32/KERNEL32.cpp deleted file mode 100644 index 53b352eac..000000000 --- a/src/REX/W32/KERNEL32.cpp +++ /dev/null @@ -1,467 +0,0 @@ -#include "REX/W32/KERNEL32.h" - -REX_W32_IMPORT(REX::W32::BOOL, CloseHandle, REX::W32::HANDLE); -REX_W32_IMPORT(REX::W32::HANDLE, CreateFileMappingA, REX::W32::HANDLE, REX::W32::SECURITY_ATTRIBUTES*, std::uint32_t, std::uint32_t, std::uint32_t, const char*); -REX_W32_IMPORT(REX::W32::HANDLE, CreateFileMappingW, REX::W32::HANDLE, REX::W32::SECURITY_ATTRIBUTES*, std::uint32_t, std::uint32_t, std::uint32_t, const wchar_t*); -REX_W32_IMPORT(REX::W32::BOOL, CreateProcessA, const char*, char*, REX::W32::SECURITY_ATTRIBUTES*, REX::W32::SECURITY_ATTRIBUTES*, REX::W32::BOOL, std::uint32_t, void*, const char*, REX::W32::STARTUPINFOA*, REX::W32::PROCESS_INFORMATION*); -REX_W32_IMPORT(REX::W32::BOOL, CreateProcessW, const wchar_t*, wchar_t*, REX::W32::SECURITY_ATTRIBUTES*, REX::W32::SECURITY_ATTRIBUTES*, REX::W32::BOOL, std::uint32_t, void*, const wchar_t*, REX::W32::STARTUPINFOW*, REX::W32::PROCESS_INFORMATION*); -REX_W32_IMPORT(REX::W32::HANDLE, CreateRemoteThread, REX::W32::HANDLE, REX::W32::SECURITY_ATTRIBUTES*, std::size_t, REX::W32::THREAD_START_ROUTINE*, void*, std::uint32_t, std::uint32_t*); -REX_W32_IMPORT(REX::W32::HANDLE, CreateSemaphoreA, REX::W32::SECURITY_ATTRIBUTES*, std::int32_t, std::int32_t, const char*); -REX_W32_IMPORT(REX::W32::HANDLE, CreateThread, REX::W32::SECURITY_ATTRIBUTES*, std::size_t, REX::W32::THREAD_START_ROUTINE*, void*, std::uint32_t, std::uint32_t*); -REX_W32_IMPORT(void, DeleteCriticalSection, REX::W32::CRITICAL_SECTION*); -REX_W32_IMPORT(void, EnterCriticalSection, REX::W32::CRITICAL_SECTION*); -REX_W32_IMPORT(std::uint32_t, ExpandEnvironmentStringsA, const char*, char*, std::uint32_t); -REX_W32_IMPORT(std::uint32_t, ExpandEnvironmentStringsW, const wchar_t*, wchar_t*, std::uint32_t); -REX_W32_IMPORT(REX::W32::BOOL, FindClose, REX::W32::HANDLE); -REX_W32_IMPORT(REX::W32::HANDLE, FindFirstFileA, const char*, REX::W32::WIN32_FIND_DATAA*); -REX_W32_IMPORT(REX::W32::HANDLE, FindFirstFileW, const wchar_t*, REX::W32::WIN32_FIND_DATAW*); -REX_W32_IMPORT(REX::W32::BOOL, FindNextFileA, REX::W32::HANDLE, REX::W32::WIN32_FIND_DATAA*); -REX_W32_IMPORT(REX::W32::BOOL, FindNextFileW, REX::W32::HANDLE, REX::W32::WIN32_FIND_DATAW*); -REX_W32_IMPORT(REX::W32::BOOL, FlushInstructionCache, REX::W32::HANDLE, const void*, std::size_t); -REX_W32_IMPORT(REX::W32::BOOL, FreeLibrary, REX::W32::HMODULE); -REX_W32_IMPORT(REX::W32::HANDLE, GetCurrentProcess); -REX_W32_IMPORT(std::uint32_t, GetCurrentThreadId); -REX_W32_IMPORT(std::uint32_t, GetEnvironmentVariableA, const char*, char*, std::uint32_t); -REX_W32_IMPORT(std::uint32_t, GetEnvironmentVariableW, const wchar_t*, wchar_t*, std::uint32_t); -REX_W32_IMPORT(std::uint32_t, GetLastError); -REX_W32_IMPORT(std::uint32_t, GetModuleFileNameA, REX::W32::HMODULE, char*, std::uint32_t); -REX_W32_IMPORT(std::uint32_t, GetModuleFileNameW, REX::W32::HMODULE, wchar_t*, std::uint32_t); -REX_W32_IMPORT(REX::W32::HMODULE, GetModuleHandleA, const char*); -REX_W32_IMPORT(REX::W32::HMODULE, GetModuleHandleW, const wchar_t*); -REX_W32_IMPORT(std::uint32_t, GetPrivateProfileStringA, const char*, const char*, const char*, char*, std::uint32_t, const char*); -REX_W32_IMPORT(std::uint32_t, GetPrivateProfileStringW, const wchar_t*, const wchar_t*, const wchar_t*, wchar_t*, std::uint32_t, const wchar_t*); -REX_W32_IMPORT(void*, GetProcAddress, REX::W32::HMODULE, const char*); -REX_W32_IMPORT(void, GetSystemInfo, REX::W32::SYSTEM_INFO*); -REX_W32_IMPORT(REX::W32::BOOL, InitializeCriticalSectionAndSpinCount, REX::W32::CRITICAL_SECTION*, std::uint32_t); -REX_W32_IMPORT(REX::W32::BOOL, IsDebuggerPresent); -REX_W32_IMPORT(std::int32_t, LCMapStringEx, const wchar_t*, std::uint32_t, const wchar_t*, std::int32_t, wchar_t*, std::int32_t, REX::W32::NLSVERSIONINFO*, void*, std::intptr_t); -REX_W32_IMPORT(void, LeaveCriticalSection, REX::W32::CRITICAL_SECTION*); -REX_W32_IMPORT(REX::W32::HMODULE, LoadLibraryA, const char*); -REX_W32_IMPORT(REX::W32::HMODULE, LoadLibraryW, const wchar_t*); -REX_W32_IMPORT(void*, MapViewOfFile, REX::W32::HANDLE, std::uint32_t, std::uint32_t, std::uint32_t, std::size_t); -REX_W32_IMPORT(void*, MapViewOfFileEx, REX::W32::HANDLE, std::uint32_t, std::uint32_t, std::uint32_t, std::size_t, void*); -REX_W32_IMPORT(std::int32_t, MultiByteToWideChar, std::uint32_t, std::uint32_t, const char*, std::int32_t, wchar_t*, std::int32_t); -REX_W32_IMPORT(REX::W32::HANDLE, OpenFileMappingA, std::uint32_t, REX::W32::BOOL, const char*); -REX_W32_IMPORT(REX::W32::HANDLE, OpenFileMappingW, std::uint32_t, REX::W32::BOOL, const wchar_t*); -REX_W32_IMPORT(void, OutputDebugStringA, const char*); -REX_W32_IMPORT(void, OutputDebugStringW, const wchar_t*); -REX_W32_IMPORT(REX::W32::BOOL, QueryPerformanceCounter, std::int64_t*); -REX_W32_IMPORT(REX::W32::BOOL, QueryPerformanceFrequency, std::int64_t*); -REX_W32_IMPORT(std::uint32_t, ResumeThread, REX::W32::HANDLE); -REX_W32_IMPORT(REX::W32::BOOL, SetEnvironmentVariableA, const char*, const char*); -REX_W32_IMPORT(REX::W32::BOOL, SetEnvironmentVariableW, const wchar_t*, const wchar_t*); -REX_W32_IMPORT(void, Sleep, std::uint32_t); -REX_W32_IMPORT(REX::W32::BOOL, TerminateProcess, REX::W32::HANDLE, std::uint32_t); -REX_W32_IMPORT(void*, TlsGetValue, std::uint32_t); -REX_W32_IMPORT(REX::W32::BOOL, TlsSetValue, std::uint32_t, void*); -REX_W32_IMPORT(REX::W32::BOOL, UnmapViewOfFile, const void*); -REX_W32_IMPORT(void*, VirtualAlloc, void*, std::size_t, std::uint32_t, std::uint32_t); -REX_W32_IMPORT(void*, VirtualAllocEx, REX::W32::HANDLE, void*, std::size_t, std::uint32_t, std::uint32_t); -REX_W32_IMPORT(REX::W32::BOOL, VirtualFree, void*, std::size_t, std::uint32_t); -REX_W32_IMPORT(REX::W32::BOOL, VirtualFreeEx, REX::W32::HANDLE, void*, std::size_t, std::uint32_t); -REX_W32_IMPORT(REX::W32::BOOL, VirtualProtect, void*, std::size_t, std::uint32_t, std::uint32_t*); -REX_W32_IMPORT(REX::W32::BOOL, VirtualProtectEx, REX::W32::HANDLE, void*, std::size_t, std::uint32_t, std::uint32_t*); -REX_W32_IMPORT(std::size_t, VirtualQuery, const void*, MEMORY_BASIC_INFORMATION*, std::size_t); -REX_W32_IMPORT(std::size_t, VirtualQueryEx, REX::W32::HANDLE, const void*, MEMORY_BASIC_INFORMATION*, std::size_t); -REX_W32_IMPORT(std::uint32_t, WaitForSingleObject, REX::W32::HANDLE, std::uint32_t); -REX_W32_IMPORT(std::uint32_t, WaitForSingleObjectEx, REX::W32::HANDLE, std::uint32_t, REX::W32::BOOL); -REX_W32_IMPORT(std::int32_t, WideCharToMultiByte, std::uint32_t, std::uint32_t, const wchar_t*, std::int32_t, char*, std::int32_t, const char*, std::int32_t*); -REX_W32_IMPORT(REX::W32::BOOL, WriteProcessMemory, REX::W32::HANDLE, void*, const void*, std::size_t, std::size_t*); - -extern "C" REX::W32::IMAGE_DOS_HEADER __ImageBase; - -namespace REX::W32 -{ - bool CloseHandle(HANDLE a_handle) noexcept - { - return ::W32_IMPL_CloseHandle(a_handle); - } - - HANDLE CreateFileMappingA(HANDLE a_file, SECURITY_ATTRIBUTES* a_attributes, std::uint32_t a_protect, std::uint32_t a_maxSizeHigh, std::uint32_t a_maxSizeLow, const char* a_name) noexcept - { - return ::W32_IMPL_CreateFileMappingA(a_file, a_attributes, a_protect, a_maxSizeHigh, a_maxSizeLow, a_name); - } - - HANDLE CreateFileMappingW(HANDLE a_file, SECURITY_ATTRIBUTES* a_attributes, std::uint32_t a_protect, std::uint32_t a_maxSizeHigh, std::uint32_t a_maxSizeLow, const wchar_t* a_name) noexcept - { - return ::W32_IMPL_CreateFileMappingW(a_file, a_attributes, a_protect, a_maxSizeHigh, a_maxSizeLow, a_name); - } - - bool CreateProcessA(const char* a_name, char* a_cmd, SECURITY_ATTRIBUTES* a_procAttr, SECURITY_ATTRIBUTES* a_threadAttr, bool a_inheritHandles, std::uint32_t a_flags, void* a_env, const char* a_curDir, STARTUPINFOA* a_startInfo, PROCESS_INFORMATION* a_procInfo) noexcept - { - return ::W32_IMPL_CreateProcessA(a_name, a_cmd, a_procAttr, a_threadAttr, a_inheritHandles, a_flags, a_env, a_curDir, a_startInfo, a_procInfo); - } - - bool CreateProcessW(const wchar_t* a_name, wchar_t* a_cmd, SECURITY_ATTRIBUTES* a_procAttr, SECURITY_ATTRIBUTES* a_threadAttr, bool a_inheritHandles, std::uint32_t a_flags, void* a_env, const wchar_t* a_curDir, STARTUPINFOW* a_startInfo, PROCESS_INFORMATION* a_procInfo) noexcept - { - return ::W32_IMPL_CreateProcessW(a_name, a_cmd, a_procAttr, a_threadAttr, a_inheritHandles, a_flags, a_env, a_curDir, a_startInfo, a_procInfo); - } - - HANDLE CreateRemoteThread(HANDLE a_process, SECURITY_ATTRIBUTES* a_threadAttr, std::size_t a_stackSize, THREAD_START_ROUTINE* a_startAddr, void* a_param, std::uint32_t a_flags, std::uint32_t* a_threadID) noexcept - { - return ::W32_IMPL_CreateRemoteThread(a_process, a_threadAttr, a_stackSize, a_startAddr, a_param, a_flags, a_threadID); - } - - HANDLE CreateSemaphoreA(SECURITY_ATTRIBUTES* a_semaphoreAttr, std::int32_t a_initCount, std::int32_t a_maxCount, const char* a_name) - { - return ::W32_IMPL_CreateSemaphoreA(a_semaphoreAttr, a_initCount, a_maxCount, a_name); - } - - HANDLE CreateThread(SECURITY_ATTRIBUTES* a_threadAttr, std::size_t a_stackSize, THREAD_START_ROUTINE* a_startAddr, void* a_param, std::uint32_t a_flags, std::uint32_t* a_threadID) noexcept - { - return ::W32_IMPL_CreateThread(a_threadAttr, a_stackSize, a_startAddr, a_param, a_flags, a_threadID); - } - - void DeleteCriticalSection(CRITICAL_SECTION* a_criticalSection) - { - ::W32_IMPL_DeleteCriticalSection(a_criticalSection); - } - - void EnterCriticalSection(CRITICAL_SECTION* a_criticalSection) - { - ::W32_IMPL_EnterCriticalSection(a_criticalSection); - } - - std::uint32_t ExpandEnvironmentStringsA(const char* a_src, char* a_dst, std::uint32_t a_dstLen) noexcept - { - return ::W32_IMPL_ExpandEnvironmentStringsA(a_src, a_dst, a_dstLen); - } - - std::uint32_t ExpandEnvironmentStringsW(const wchar_t* a_src, wchar_t* a_dst, std::uint32_t a_dstLen) noexcept - { - return ::W32_IMPL_ExpandEnvironmentStringsW(a_src, a_dst, a_dstLen); - } - - bool FindClose(HANDLE a_file) noexcept - { - return ::W32_IMPL_FindClose(a_file); - } - - HANDLE FindFirstFileA(const char* a_name, WIN32_FIND_DATAA* a_data) noexcept - { - return ::W32_IMPL_FindFirstFileA(a_name, a_data); - } - - HANDLE FindFirstFileW(const wchar_t* a_name, WIN32_FIND_DATAW* a_data) noexcept - { - return ::W32_IMPL_FindFirstFileW(a_name, a_data); - } - - bool FindNextFileA(HANDLE a_file, WIN32_FIND_DATAA* a_data) noexcept - { - return ::W32_IMPL_FindNextFileA(a_file, a_data); - } - - bool FindNextFileW(HANDLE a_file, WIN32_FIND_DATAW* a_data) noexcept - { - return ::W32_IMPL_FindNextFileW(a_file, a_data); - } - - bool FlushInstructionCache(HANDLE a_process, const void* a_baseAddr, std::size_t a_size) noexcept - { - return ::W32_IMPL_FlushInstructionCache(a_process, a_baseAddr, a_size); - } - - bool FreeLibrary(HMODULE a_module) noexcept - { - return ::W32_IMPL_FreeLibrary(a_module); - } - - HMODULE GetCurrentModule() noexcept - { - return reinterpret_cast(std::addressof(__ImageBase)); - } - - HANDLE GetCurrentProcess() noexcept - { - return ::W32_IMPL_GetCurrentProcess(); - } - - std::uint32_t GetCurrentThreadId() noexcept - { - return ::W32_IMPL_GetCurrentThreadId(); - } - - std::uint32_t GetEnvironmentVariableA(const char* a_name, char* a_buf, std::uint32_t a_bufLen) noexcept - { - return ::W32_IMPL_GetEnvironmentVariableA(a_name, a_buf, a_bufLen); - } - - std::uint32_t GetEnvironmentVariableW(const wchar_t* a_name, wchar_t* a_buf, std::uint32_t a_bufLen) noexcept - { - return ::W32_IMPL_GetEnvironmentVariableW(a_name, a_buf, a_bufLen); - } - - std::uint32_t GetLastError() noexcept - { - return ::W32_IMPL_GetLastError(); - } - - std::uint32_t GetModuleFileNameA(HMODULE a_module, char* a_name, std::uint32_t a_nameLen) noexcept - { - return ::W32_IMPL_GetModuleFileNameA(a_module, a_name, a_nameLen); - } - - std::uint32_t GetModuleFileNameW(HMODULE a_module, wchar_t* a_name, std::uint32_t a_nameLen) noexcept - { - return ::W32_IMPL_GetModuleFileNameW(a_module, a_name, a_nameLen); - } - - HMODULE GetModuleHandleA(const char* a_name) noexcept - { - return ::W32_IMPL_GetModuleHandleA(a_name); - } - - HMODULE GetModuleHandleW(const wchar_t* a_name) noexcept - { - return ::W32_IMPL_GetModuleHandleW(a_name); - } - - std::uint32_t GetPrivateProfileStringA(const char* a_app, const char* a_key, const char* a_default, char* a_buf, std::uint32_t a_bufLen, const char* a_name) noexcept - { - return ::W32_IMPL_GetPrivateProfileStringA(a_app, a_key, a_default, a_buf, a_bufLen, a_name); - } - - std::uint32_t GetPrivateProfileStringW(const wchar_t* a_app, const wchar_t* a_key, const wchar_t* a_default, wchar_t* a_buf, std::uint32_t a_bufLen, const wchar_t* a_name) noexcept - { - return ::W32_IMPL_GetPrivateProfileStringW(a_app, a_key, a_default, a_buf, a_bufLen, a_name); - } - - void* GetProcAddress(HMODULE a_module, const char* a_name) noexcept - { - return ::W32_IMPL_GetProcAddress(a_module, a_name); - } - - void GetSystemInfo(SYSTEM_INFO* a_info) noexcept - { - return ::W32_IMPL_GetSystemInfo(a_info); - } - - bool IMAGE_SNAP_BY_ORDINAL64(std::uint64_t a_ordinal) noexcept - { - return (a_ordinal & IMAGE_ORDINAL_FLAG64) != 0; - } - - IMAGE_SECTION_HEADER* IMAGE_FIRST_SECTION(const IMAGE_NT_HEADERS64* a_header) noexcept - { - constexpr auto opt = __builtin_offsetof(IMAGE_NT_HEADERS64, optionalHeader); - const auto optSize = a_header->fileHeader.optionalHeaderSize; - const auto section = reinterpret_cast(a_header) + opt + optSize; - return reinterpret_cast(section); - } - - bool InitializeCriticalSectionAndSpinCount(CRITICAL_SECTION* a_criticalSection, std::uint32_t a_spinCount) - { - return ::W32_IMPL_InitializeCriticalSectionAndSpinCount(a_criticalSection, a_spinCount); - } - - std::uint32_t InterlockedCompareExchange(volatile std::uint32_t* a_target, std::uint32_t a_value, std::uint32_t a_compare) noexcept - { - return _InterlockedCompareExchange((volatile long*)a_target, a_value, a_compare); - } - - std::uint64_t InterlockedCompareExchange64(volatile std::uint64_t* a_target, std::uint64_t a_value, std::uint64_t a_compare) noexcept - { - return _InterlockedCompareExchange64((volatile long long*)a_target, a_value, a_compare); - } - - std::uint32_t InterlockedDecrement(volatile std::uint32_t* a_target) noexcept - { - return _InterlockedDecrement((volatile long*)a_target); - } - - std::uint64_t InterlockedDecrement64(volatile std::uint64_t* a_target) noexcept - { - return _InterlockedDecrement64((volatile long long*)a_target); - } - - std::uint32_t InterlockedExchange(volatile std::uint32_t* a_target, std::uint32_t a_value) noexcept - { - return _InterlockedExchange((volatile long*)a_target, a_value); - } - - std::uint64_t InterlockedExchange64(volatile std::uint64_t* a_target, std::uint64_t a_value) noexcept - { - return _InterlockedExchange64((volatile long long*)a_target, a_value); - } - - std::uint32_t InterlockedIncrement(volatile std::uint32_t* a_target) noexcept - { - return _InterlockedIncrement((volatile long*)a_target); - } - - std::uint64_t InterlockedIncrement64(volatile std::uint64_t* a_target) noexcept - { - return _InterlockedIncrement64((volatile long long*)a_target); - } - - bool IsDebuggerPresent() noexcept - { - return ::W32_IMPL_IsDebuggerPresent(); - } - - std::int32_t LCMapStringEx(const wchar_t* a_locale, std::uint32_t a_flags, const wchar_t* a_src, std::int32_t a_srcLen, wchar_t* a_dst, std::int32_t a_dstLen, NLSVERSIONINFO* a_info, void* a_reserved, std::intptr_t a_sortHandle) noexcept - { - return ::W32_IMPL_LCMapStringEx(a_locale, a_flags, a_src, a_srcLen, a_dst, a_dstLen, a_info, a_reserved, a_sortHandle); - } - - void LeaveCriticalSection(CRITICAL_SECTION* a_criticalSection) - { - ::W32_IMPL_LeaveCriticalSection(a_criticalSection); - } - - HMODULE LoadLibraryA(const char* a_name) noexcept - { - return ::W32_IMPL_LoadLibraryA(a_name); - } - - HMODULE LoadLibraryW(const wchar_t* a_name) noexcept - { - return ::W32_IMPL_LoadLibraryW(a_name); - } - - void* MapViewOfFile(HANDLE a_object, std::uint32_t a_desiredAccess, std::uint32_t a_fileOffsetHi, std::uint32_t a_fileOffsetLo, std::size_t a_numBytes) noexcept - { - return ::W32_IMPL_MapViewOfFile(a_object, a_desiredAccess, a_fileOffsetHi, a_fileOffsetLo, a_numBytes); - } - - void* MapViewOfFileEx(HANDLE a_object, std::uint32_t a_desiredAccess, std::uint32_t a_fileOffsetHi, std::uint32_t a_fileOffsetLo, std::size_t a_numBytes, void* a_baseAddr) noexcept - { - return ::W32_IMPL_MapViewOfFileEx(a_object, a_desiredAccess, a_fileOffsetHi, a_fileOffsetLo, a_numBytes, a_baseAddr); - } - - std::int32_t MultiByteToWideChar(std::uint32_t a_codePage, std::uint32_t a_flags, const char* a_src, std::int32_t a_srcLen, wchar_t* a_dst, std::int32_t a_dstLen) noexcept - { - return ::W32_IMPL_MultiByteToWideChar(a_codePage, a_flags, a_src, a_srcLen, a_dst, a_dstLen); - } - - HANDLE OpenFileMappingA(std::uint32_t a_desiredAccess, bool a_inheritHandle, const char* a_name) noexcept - { - return ::W32_IMPL_OpenFileMappingA(a_desiredAccess, a_inheritHandle, a_name); - } - - HANDLE OpenFileMappingW(std::uint32_t a_desiredAccess, bool a_inheritHandle, const wchar_t* a_name) noexcept - { - return ::W32_IMPL_OpenFileMappingW(a_desiredAccess, a_inheritHandle, a_name); - } - - void OutputDebugStringA(const char* a_str) noexcept - { - ::W32_IMPL_OutputDebugStringA(a_str); - } - - void OutputDebugStringW(const wchar_t* a_str) noexcept - { - ::W32_IMPL_OutputDebugStringW(a_str); - } - - bool QueryPerformanceCounter(std::int64_t* a_counter) noexcept - { - return ::W32_IMPL_QueryPerformanceCounter(a_counter); - } - - bool QueryPerformanceFrequency(std::int64_t* a_frequency) noexcept - { - return ::W32_IMPL_QueryPerformanceFrequency(a_frequency); - } - - std::uint32_t ResumeThread(HANDLE a_handle) noexcept - { - return ::W32_IMPL_ResumeThread(a_handle); - } - - bool SetEnvironmentVariableA(const char* a_name, const char* a_value) noexcept - { - return ::W32_IMPL_SetEnvironmentVariableA(a_name, a_value); - } - - bool SetEnvironmentVariableW(const wchar_t* a_name, const wchar_t* a_value) noexcept - { - return ::W32_IMPL_SetEnvironmentVariableW(a_name, a_value); - } - - void Sleep(std::uint32_t a_milliseconds) noexcept - { - ::W32_IMPL_Sleep(a_milliseconds); - } - - bool TerminateProcess(HANDLE a_process, std::uint32_t a_exitCode) noexcept - { - return ::W32_IMPL_TerminateProcess(a_process, a_exitCode); - } - - void* TlsGetValue(std::uint32_t a_index) noexcept - { - return ::W32_IMPL_TlsGetValue(a_index); - } - - bool TlsSetValue(std::uint32_t a_index, void* a_value) noexcept - { - return ::W32_IMPL_TlsSetValue(a_index, a_value); - } - - bool UnmapViewOfFile(const void* a_baseAddress) noexcept - { - return ::W32_IMPL_UnmapViewOfFile(a_baseAddress); - } - - void* VirtualAlloc(void* a_address, std::size_t a_size, std::uint32_t a_type, std::uint32_t a_protect) noexcept - { - return ::W32_IMPL_VirtualAlloc(a_address, a_size, a_type, a_protect); - } - - void* VirtualAllocEx(HANDLE a_process, void* a_address, std::size_t a_size, std::uint32_t a_type, std::uint32_t a_protect) noexcept - { - return ::W32_IMPL_VirtualAllocEx(a_process, a_address, a_size, a_type, a_protect); - } - - bool VirtualFree(void* a_address, std::size_t a_size, std::uint32_t a_type) noexcept - { - return ::W32_IMPL_VirtualFree(a_address, a_size, a_type); - } - - bool VirtualFreeEx(HANDLE a_process, void* a_address, std::size_t a_size, std::uint32_t a_type) noexcept - { - return ::W32_IMPL_VirtualFreeEx(a_process, a_address, a_size, a_type); - } - - bool VirtualProtect(void* a_address, std::size_t a_size, std::uint32_t a_newProtect, std::uint32_t* a_oldProtect) noexcept - { - return ::W32_IMPL_VirtualProtect(a_address, a_size, a_newProtect, a_oldProtect); - } - - bool VirtualProtectEx(HANDLE a_process, void* a_address, std::size_t a_size, std::uint32_t a_newProtect, std::uint32_t* a_oldProtect) noexcept - { - return ::W32_IMPL_VirtualProtectEx(a_process, a_address, a_size, a_newProtect, a_oldProtect); - } - - std::size_t VirtualQuery(const void* a_address, MEMORY_BASIC_INFORMATION* a_buf, std::size_t a_bufLen) noexcept - { - return ::W32_IMPL_VirtualQuery(a_address, a_buf, a_bufLen); - } - - std::size_t VirtualQueryEx(HANDLE a_process, const void* a_address, MEMORY_BASIC_INFORMATION* a_buf, std::size_t a_bufLen) noexcept - { - return ::W32_IMPL_VirtualQueryEx(a_process, a_address, a_buf, a_bufLen); - } - - std::uint32_t WaitForSingleObject(HANDLE a_handle, std::uint32_t a_milliseconds) noexcept - { - return ::W32_IMPL_WaitForSingleObject(a_handle, a_milliseconds); - } - - std::uint32_t WaitForSingleObjectEx(HANDLE a_handle, std::uint32_t a_milliseconds, bool a_alertable) noexcept - { - return ::W32_IMPL_WaitForSingleObjectEx(a_handle, a_milliseconds, a_alertable); - } - - std::int32_t WideCharToMultiByte(std::uint32_t a_codePage, std::uint32_t a_flags, const wchar_t* a_src, std::int32_t a_srcLen, char* a_dst, std::int32_t a_dstLen, const char* a_default, std::int32_t* a_defaultLen) - { - return ::W32_IMPL_WideCharToMultiByte(a_codePage, a_flags, a_src, a_srcLen, a_dst, a_dstLen, a_default, a_defaultLen); - } - - bool WriteProcessMemory(HANDLE a_process, void* a_address, const void* a_buf, std::size_t a_bufLen, std::size_t* a_bufWritten) noexcept - { - return ::W32_IMPL_WriteProcessMemory(a_process, a_address, a_buf, a_bufLen, a_bufWritten); - } -} diff --git a/src/REX/W32/OLE32.cpp b/src/REX/W32/OLE32.cpp deleted file mode 100644 index 2e20d0b7f..000000000 --- a/src/REX/W32/OLE32.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "REX/W32/OLE32.h" - -REX_W32_IMPORT(void, CoTaskMemFree, void*); - -namespace REX::W32 -{ - void CoTaskMemFree(void* a_block) noexcept - { - ::W32_IMPL_CoTaskMemFree(a_block); - } -} diff --git a/src/REX/W32/SHELL32.cpp b/src/REX/W32/SHELL32.cpp deleted file mode 100644 index fd52204e4..000000000 --- a/src/REX/W32/SHELL32.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "REX/W32/SHELL32.h" - -REX_W32_IMPORT(std::int32_t, SHGetKnownFolderPath, const REX::W32::GUID&, std::uint32_t, void*, wchar_t**); - -namespace REX::W32 -{ - std::int32_t SHGetKnownFolderPath(const GUID& a_id, std::uint32_t a_flags, void* a_token, wchar_t** a_path) noexcept - { - return ::W32_IMPL_SHGetKnownFolderPath(a_id, a_flags, a_token, a_path); - } -} diff --git a/src/REX/W32/USER32.cpp b/src/REX/W32/USER32.cpp deleted file mode 100644 index aac4229d2..000000000 --- a/src/REX/W32/USER32.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include "REX/W32/KERNEL32.h" - -REX_W32_IMPORT(REX::W32::BOOL, GetClientRect, REX::W32::HWND, REX::W32::RECT*); -REX_W32_IMPORT(std::int32_t, GetKeyNameTextA, std::int32_t, char*, std::int32_t); -REX_W32_IMPORT(std::int32_t, GetKeyNameTextW, std::int32_t, wchar_t*, std::int32_t); -REX_W32_IMPORT(std::int16_t, GetKeyState, std::int32_t); -REX_W32_IMPORT(REX::W32::BOOL, GetWindowRect, REX::W32::HWND, REX::W32::RECT*); -REX_W32_IMPORT(std::int32_t, MessageBoxA, REX::W32::HWND, const char*, const char*, std::uint32_t); -REX_W32_IMPORT(std::int32_t, MessageBoxW, REX::W32::HWND, const wchar_t*, const wchar_t*, std::uint32_t); -REX_W32_IMPORT(std::intptr_t, SetWindowLongPtrA, REX::W32::HWND, std::int32_t, std::intptr_t); -REX_W32_IMPORT(std::int32_t, ShowCursor, REX::W32::BOOL); - -namespace REX::W32 -{ - bool GetClientRect(HWND a_wnd, RECT* a_rect) noexcept - { - return ::W32_IMPL_GetClientRect(a_wnd, a_rect); - } - - std::int32_t GetKeyNameTextA(std::int32_t a_param, char* a_buf, std::int32_t a_bufLen) noexcept - { - return ::W32_IMPL_GetKeyNameTextA(a_param, a_buf, a_bufLen); - } - - std::int32_t GetKeyNameTextW(std::int32_t a_param, wchar_t* a_buf, std::int32_t a_bufLen) noexcept - { - return ::W32_IMPL_GetKeyNameTextW(a_param, a_buf, a_bufLen); - } - - std::int16_t GetKeyState(std::int32_t a_key) noexcept - { - return ::W32_IMPL_GetKeyState(a_key); - } - - bool GetWindowRect(HWND a_wnd, RECT* a_rect) noexcept - { - return ::W32_IMPL_GetWindowRect(a_wnd, a_rect); - } - - std::int32_t MessageBoxA(HWND a_wnd, const char* a_text, const char* a_caption, std::uint32_t a_type) noexcept - { - return ::W32_IMPL_MessageBoxA(a_wnd, a_text, a_caption, a_type); - } - - std::int32_t MessageBoxW(HWND a_wnd, const wchar_t* a_text, const wchar_t* a_caption, std::uint32_t a_type) noexcept - { - return ::W32_IMPL_MessageBoxW(a_wnd, a_text, a_caption, a_type); - } - - std::intptr_t SetWindowLongPtrA(HWND a_wnd, std::int32_t a_index, std::intptr_t a_newPtr) noexcept - { - return ::W32_IMPL_SetWindowLongPtrA(a_wnd, a_index, a_newPtr); - } - - std::int32_t ShowCursor(bool a_show) noexcept - { - return ::W32_IMPL_ShowCursor(a_show); - } -} diff --git a/src/REX/W32/VERSION.cpp b/src/REX/W32/VERSION.cpp deleted file mode 100644 index ce249a491..000000000 --- a/src/REX/W32/VERSION.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "REX/W32/VERSION.h" - -REX_W32_IMPORT(REX::W32::BOOL, GetFileVersionInfoA, const char*, std::uint32_t, std::uint32_t, void*); -REX_W32_IMPORT(REX::W32::BOOL, GetFileVersionInfoW, const wchar_t*, std::uint32_t, std::uint32_t, void*); -REX_W32_IMPORT(std::uint32_t, GetFileVersionInfoSizeA, const char*, std::uint32_t*); -//REX_W32_IMPORT(std::uint32_t, GetFileVersionInfoSizeExA, std::uint32_t, const char*, std::uint32_t*); -REX_W32_IMPORT(std::uint32_t, GetFileVersionInfoSizeExW, std::uint32_t, const wchar_t*, std::uint32_t*); -REX_W32_IMPORT(std::uint32_t, GetFileVersionInfoSizeW, const wchar_t*, std::uint32_t*); -REX_W32_IMPORT(REX::W32::BOOL, VerQueryValueA, const void*, const char*, void**, std::uint32_t*); -REX_W32_IMPORT(REX::W32::BOOL, VerQueryValueW, const void*, const wchar_t*, void**, std::uint32_t*); - -namespace REX::W32 -{ - bool GetFileVersionInfoA(const char* a_name, std::uint32_t a_handle, std::uint32_t a_dataLen, void* a_data) noexcept - { - return ::W32_IMPL_GetFileVersionInfoA(a_name, a_handle, a_dataLen, a_data); - } - - std::uint32_t GetFileVersionInfoSizeA(const char* a_name, std::uint32_t* a_handle) noexcept - { - return ::W32_IMPL_GetFileVersionInfoSizeA(a_name, a_handle); - } - - //std::uint32_t GetFileVersionInfoSizeExA(std::uint32_t a_flags, const char* a_name, std::uint32_t* a_handle) noexcept - //{ - // return ::W32_IMPL_GetFileVersionInfoSizeExA(a_flags, a_name, a_handle); - //} - - std::uint32_t GetFileVersionInfoSizeExW(std::uint32_t a_flags, const wchar_t* a_name, std::uint32_t* a_handle) noexcept - { - return ::W32_IMPL_GetFileVersionInfoSizeExW(a_flags, a_name, a_handle); - } - - std::uint32_t GetFileVersionInfoSizeW(const wchar_t* a_name, std::uint32_t* a_handle) noexcept - { - return ::W32_IMPL_GetFileVersionInfoSizeW(a_name, a_handle); - } - - bool GetFileVersionInfoW(const wchar_t* a_name, std::uint32_t a_handle, std::uint32_t a_dataLen, void* a_data) noexcept - { - return ::W32_IMPL_GetFileVersionInfoW(a_name, a_handle, a_dataLen, a_data); - } - - bool VerQueryValueA(const void* a_block, const char* a_subBlock, void** a_buf, std::uint32_t* a_bufLen) noexcept - { - return ::W32_IMPL_VerQueryValueA(a_block, a_subBlock, a_buf, a_bufLen); - } - - bool VerQueryValueW(const void* a_block, const wchar_t* a_subBlock, void** a_buf, std::uint32_t* a_bufLen) noexcept - { - return ::W32_IMPL_VerQueryValueW(a_block, a_subBlock, a_buf, a_bufLen); - } -} diff --git a/src/SKSE/Interfaces.cpp b/src/SKSE/Interfaces.cpp index 0308c34ac..4776e0a0f 100644 --- a/src/SKSE/Interfaces.cpp +++ b/src/SKSE/Interfaces.cpp @@ -128,6 +128,12 @@ namespace SKSE return GetProxy()->WriteRecordData(a_buf, a_length); } + bool SerializationInterface::WriteRecordDataEx(std::uint32_t& a_diff, const void* a_buf, std::uint32_t a_length) const + { + a_diff += a_length; + return GetProxy()->WriteRecordData(a_buf, a_length); + } + bool SerializationInterface::GetNextRecordInfo(std::uint32_t& a_type, std::uint32_t& a_version, std::uint32_t& a_length) const { return GetProxy()->GetNextRecordInfo(&a_type, &a_version, &a_length); @@ -138,6 +144,13 @@ namespace SKSE return GetProxy()->ReadRecordData(a_buf, a_length); } + std::uint32_t SerializationInterface::ReadRecordDataEx(std::uint32_t& a_diff, void* a_buf, std::uint32_t a_length) const + { + const auto result = GetProxy()->ReadRecordData(a_buf, a_length); + a_diff -= result; + return result; + } + bool SerializationInterface::ResolveFormID(RE::FormID a_oldFormID, RE::FormID& a_newFormID) const { return GetProxy()->ResolveFormId(a_oldFormID, &a_newFormID); diff --git a/xmake.lua b/xmake.lua index c87965913..a62ac95ca 100644 --- a/xmake.lua +++ b/xmake.lua @@ -54,7 +54,7 @@ target("commonlibsse") add_options("skyrim_ae", "skse_xbyak", { public = true }) -- add system links - add_syslinks("advapi32", "d3d11", "d3dcompiler", "dbghelp", "dxgi", "ole32", "shell32", "user32", "version") + add_syslinks("advapi32", "bcrypt", "d3d11", "d3dcompiler", "dbghelp", "dxgi", "ole32", "shell32", "user32", "version") -- add source files add_files("src/**.cpp")