Add classes and functions needed for LooksMenu - #60
Conversation
|
|
||
| // add | ||
| virtual RenderPassArray* GetRenderPasses(BSGeometry* a_geom, std::uint32_t a_renderMode, BSShaderAccumulator* a_accumulator) = 0; // 2B | ||
| virtual RenderPassArray* GetRenderPasses(BSGeometry* a_geom, std::uint32_t a_renderMode, BSShaderAccumulator* a_accumulator) { return nullptr; } // 2B |
There was a problem hiding this comment.
I needed to be able to construct new shader property objects, thus I had to ensure the parent class wasn't abstract.
| namespace BSSkin | ||
| { | ||
| class Instance; | ||
| class Instance : public NiObject {}; |
There was a problem hiding this comment.
LooksMenu doesn't actually interact with this object other than assigning it from one class to another, but that does mean we need a stub implementation that'll at least allow us to track the reference count.
|
|
||
| virtual ~Entry(); // 00 | ||
|
|
||
| F4_HEAP_REDEFINE_NEW(Entry); |
There was a problem hiding this comment.
LooksMenu needs to construct new instances of these entries, thus I added the new operators and made the parent class non-abstract.
| namespace RE | ||
| { | ||
| class NiAvObject; | ||
| class NiAVObject; |
There was a problem hiding this comment.
Fixed a casing typo that caused a type conflict.
|
|
||
| // add | ||
| virtual std::int32_t Type() = 0; // 28 | ||
| virtual std::int32_t Type(); // 28 |
There was a problem hiding this comment.
Needed to be able to construct shader property objects.
|
|
||
| [[nodiscard]] static PlayerCharacter* GetPlayer() | ||
| { | ||
| static REL::Relocation<NiPointer<PlayerCharacter>*> singleton{ ID::PlayerCharacter::Player }; |
There was a problem hiding this comment.
I can't recall why I made this REL::Relocation<NiPointer<PlayerCharacter>*> instead of REL::Relocation<PlayerCharacter**>, might not be correct.
| std::uint8_t uTextureClampMode; // B4 | ||
| std::uint8_t uLightingInfluence; // B5 - divided by 255 | ||
| std::uint8_t uEnvironmentMapMinLOD; // B6 | ||
| std::uint8_t unkB7; // B7 |
There was a problem hiding this comment.
I based the names on F4SE for now, should be double-checked and ideally figure out what unkB7 is.
| BSParticleShaderCubeEmitter* envCubeEmitter; // 70 | ||
| NiColor* externalEmitColor; // 78 | ||
| std::uint32_t baseTextureIndex; // 80 | ||
| float unk84; // 84 |
There was a problem hiding this comment.
I based the names on F4SE for now, should be double-checked and ideally figure out what unk84 is.
| static constexpr auto VTABLE{ VTABLE::BSLightingShaderProperty }; | ||
| static constexpr auto Ni_RTTI{ Ni_RTTI::BSLightingShaderProperty }; | ||
|
|
||
| void LoadTextureSet(std::uint32_t unused = 0) noexcept |
There was a problem hiding this comment.
Checked against the disassembly, this parameter looks like it is being passed in, but I can't find any evidence of it actually being used.
These are all the needed changes to make LooksMenu successfully compile again CommonLibF4.
Marked as draft until I finish debugging and testing.