-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!:
TESNPC
and related classes RE (#140)
- Loading branch information
Showing
25 changed files
with
554 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include "RE/B/BGSTypedKeywordValueArray.h" | ||
|
||
namespace RE | ||
{ | ||
class BGSAttachParentArray : | ||
public BaseFormComponent, // 00 | ||
public BGSTypedKeywordValueArray<KeywordType::kAttachPoint> // 08 | ||
{ | ||
public: | ||
SF_RTTI_VTABLE(BGSAttachParentArray); | ||
|
||
~BGSAttachParentArray() override; | ||
}; | ||
static_assert(sizeof(BGSAttachParentArray) == 0x18); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#pragma once | ||
|
||
#include "RE/B/BGSKeyword.h" | ||
|
||
namespace RE | ||
{ | ||
enum class KeywordType | ||
{ | ||
kNone, | ||
kComponentTechLevel, | ||
kAttachPoint, | ||
kComponentProperty, | ||
kInstantiationFilter, | ||
kModAssociation, | ||
kSound, | ||
kAnimArchetype, | ||
kFunctionCall, | ||
kRecipeFilter, | ||
kAttractionType, | ||
kDialogueSubtype, | ||
kQuestTarget, | ||
kAnimFlavor, | ||
kAnimGender, | ||
kAnimFaceArchetype, | ||
kQuestGroup, | ||
kAnimInjured, | ||
kDispelEffect, | ||
|
||
kTotal | ||
}; | ||
|
||
template <KeywordType TYPE> | ||
class BGSTypedKeywordValue | ||
{ | ||
public: | ||
// members | ||
std::uint16_t keywordIndex; // 0 | ||
}; | ||
|
||
namespace detail | ||
{ | ||
[[nodiscard]] BGSKeyword* BGSKeywordGetTypedKeywordByIndex(KeywordType a_type, std::uint16_t a_index); | ||
} | ||
|
||
template <KeywordType TYPE> | ||
class BGSTypedKeywordValueArray | ||
{ | ||
public: | ||
[[nodiscard]] bool HasKeyword(BGSKeyword* a_keyword) | ||
{ | ||
for (std::uint32_t i = 0; i < size; ++i) { | ||
const auto kywd = detail::BGSKeywordGetTypedKeywordByIndex(TYPE, array[i].keywordIndex); | ||
if (kywd == a_keyword) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
|
||
// members | ||
BGSTypedKeywordValue<TYPE>* array; // 00 | ||
std::uint32_t size; // 08 | ||
}; | ||
static_assert(sizeof(BGSTypedKeywordValueArray<KeywordType::kNone>) == 0x10); | ||
} |
Oops, something went wrong.