From 9b7c386d0355e756b4153416a76b0532f755f8de Mon Sep 17 00:00:00 2001 From: kkEngine <78795688+kkEngine@users.noreply.github.com> Date: Mon, 25 Mar 2024 01:43:17 +0300 Subject: [PATCH] Fix namespace mismatching and access modifier (#77) * - fixed namespace mismatching. In Logger.h "add_papyrus_sink" and "remove_papyrus_sink" functions in the SKSE::log namespace * - fixed access modifier to the MenuModeChangeEvent class * - Very basic BGSTerrainManager RE and MapMenu findings by @Vermunds * - Added TintMask definition * - TintMask minor changes --------- Co-authored-by: John Stewart --- include/RE/M/MapMenu.h | 44 +++++++++++++++++----------------- include/RE/P/PlayerCharacter.h | 2 +- include/RE/Skyrim.h | 1 + include/RE/T/TESNPC.h | 2 +- include/RE/T/TintMask.h | 39 ++++++++++++++++++++++++++++++ 5 files changed, 64 insertions(+), 24 deletions(-) create mode 100644 include/RE/T/TintMask.h diff --git a/include/RE/M/MapMenu.h b/include/RE/M/MapMenu.h index dfa5e1535..3d6ed403a 100644 --- a/include/RE/M/MapMenu.h +++ b/include/RE/M/MapMenu.h @@ -81,12 +81,12 @@ namespace RE struct RUNTIME_DATA { -#define RUNTIME_DATA_CONTENT \ - BSTSmartPointer moveHandler; /* 00 */ \ - BSTSmartPointer lookHandler; /* 08 */ \ - BSTSmartPointer zoomHandler; /* 10 */ \ +#define RUNTIME_DATA_CONTENT \ + BSTSmartPointer moveHandler; /* 00 */ \ + BSTSmartPointer lookHandler; /* 08 */ \ + BSTSmartPointer zoomHandler; /* 10 */ \ ObjectRefHandle mapMarker; /* 18 */ \ - LocalMapMenu localMapMenu; /* 20 */ + LocalMapMenu localMapMenu; /* 20 */ RUNTIME_DATA_CONTENT }; @@ -98,23 +98,23 @@ namespace RE struct RUNTIME_DATA2 { -#define RUNTIME_DATA2_CONTENT \ - RefHandle unk30460; /* 000 */ \ - NiPoint3 playerMarkerPosition; /* 004 */ \ - BSTArray unk30470; /* 010 */ \ - BSTArray unk30488; /* 028 */ \ - MapCamera camera; /* 040 */ \ - std::uint64_t unk30530; /* 0D0 */ \ - TESWorldSpace* worldSpace; /* 0D8 */ \ - GFxValue unk30540; /* 0E0 */ \ - std::uint32_t unk30558; /* 0F8 */ \ - NiPoint3 unk3055C; /* 0FC */ \ - NiPoint3 unk30568; /* 108 */ \ - BSSoundHandle unk30574; /* 114 */ \ - std::uint64_t unk30580; /* 120 */ \ - std::uint64_t unk30588; /* 128 */ \ - std::uint64_t unk30590; /* 130 */ - +#define RUNTIME_DATA2_CONTENT \ + RefHandle unk30460; /* 000 */ \ + NiPoint3 playerMarkerPosition; /* 004 */ \ + BSTArray unk30470; /* 010 */ \ + BSTArray unk30488; /* 028 */ \ + MapCamera camera; /* 040 */ \ + std::uint64_t unk30530; /* 0D0 */ \ + TESWorldSpace* worldSpace; /* 0D8 */ \ + GFxValue unk30540; /* 0E0 */ \ + std::uint64_t unk30558; /* 0F8 */ \ + std::uint64_t unk30560; /* 100 */ \ + std::uint64_t unk30568; /* 108 */ \ + std::uint32_t unk30570; /* 110 */ \ + BSSoundHandle unk30574; /* 114 */ \ + std::uint64_t unk30580; /* 120 */ \ + std::uint64_t unk30588; /* 128 */ \ + std::uint64_t unk30590; /* 130 */ RUNTIME_DATA2_CONTENT }; static_assert(sizeof(RUNTIME_DATA2) == 0x138); diff --git a/include/RE/P/PlayerCharacter.h b/include/RE/P/PlayerCharacter.h index 11f93674e..d42cd7942 100644 --- a/include/RE/P/PlayerCharacter.h +++ b/include/RE/P/PlayerCharacter.h @@ -19,6 +19,7 @@ #include "RE/P/PositionPlayerEvent.h" #include "RE/T/TESObjectWEAP.h" #include "RE/T/TESQuest.h" +#include "RE/T/TintMask.h" namespace RE { @@ -43,7 +44,6 @@ namespace RE class ObjectListItem; class TESObject; class TESObjectREFR; - class TintMask; class UserEventEnabledEvent; struct BGSActorCellEvent; struct BGSActorDeathEvent; diff --git a/include/RE/Skyrim.h b/include/RE/Skyrim.h index ac0965f61..6164acd68 100644 --- a/include/RE/Skyrim.h +++ b/include/RE/Skyrim.h @@ -1590,6 +1590,7 @@ #include "RE/T/TextureFormat.h" #include "RE/T/ThirdPersonState.h" #include "RE/T/ThumbstickEvent.h" +#include "RE/T/TintMask.h" #include "RE/T/TitleSequenceMenu.h" #include "RE/T/TogglePOVHandler.h" #include "RE/T/ToggleRunHandler.h" diff --git a/include/RE/T/TESNPC.h b/include/RE/T/TESNPC.h index eafc5ae33..92ca51d86 100644 --- a/include/RE/T/TESNPC.h +++ b/include/RE/T/TESNPC.h @@ -12,13 +12,13 @@ #include "RE/S/SoundLevels.h" #include "RE/T/TESActorBase.h" #include "RE/T/TESRaceForm.h" +#include "RE/T/TintMask.h" namespace RE { class BSFaceGenNiNode; class MenuOpenCloseEvent; class NiColorA; - class TintMask; class CreatureSounds { diff --git a/include/RE/T/TintMask.h b/include/RE/T/TintMask.h new file mode 100644 index 000000000..ce5a7e0d5 --- /dev/null +++ b/include/RE/T/TintMask.h @@ -0,0 +1,39 @@ +#pragma once + +#include "RE/T/TESTexture.h" +#include "RE/C/Color.h" + +namespace RE +{ + class TintMask + { + public: + enum class Type + { + kFrekles = 0, + kLips, + kCheeks, + kEyeliner, + kUpperEyeSocket, + kLowerEyeSocket, + kSkinTone, + kWarPaint, + kFrownLines, + kLowerCheeks, + kNose, + kChin, + kNeck, + kForehead, + kDirt, + + kTotal + }; + + // members + TESTexture* texture; + Color color; + float alpha; + stl::enumeration type; + }; + static_assert(sizeof(TintMask) == 0x18); +}