Skip to content

Add classes and functions needed for LooksMenu - #60

Draft
ZenoArrows wants to merge 1 commit into
libxse:mainfrom
ZenoArrows:looksmenu
Draft

Add classes and functions needed for LooksMenu#60
ZenoArrows wants to merge 1 commit into
libxse:mainfrom
ZenoArrows:looksmenu

Conversation

@ZenoArrows

Copy link
Copy Markdown

These are all the needed changes to make LooksMenu successfully compile again CommonLibF4.

Marked as draft until I finish debugging and testing.

@ZenoArrows
ZenoArrows marked this pull request as draft August 24, 2026 16:29

// 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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to be able to construct new shader property objects, thus I had to ensure the parent class wasn't abstract.

Comment thread include/RE/B/BSGeometry.h
namespace BSSkin
{
class Instance;
class Instance : public NiObject {};

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed a casing typo that caused a type conflict.

Comment thread include/RE/N/NiProperty.h

// add
virtual std::int32_t Type() = 0; // 28
virtual std::int32_t Type(); // 28

@ZenoArrows ZenoArrows Aug 24, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to be able to construct shader property objects.


[[nodiscard]] static PlayerCharacter* GetPlayer()
{
static REL::Relocation<NiPointer<PlayerCharacter>*> singleton{ ID::PlayerCharacter::Player };

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ZenoArrows ZenoArrows Aug 24, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ZenoArrows ZenoArrows Aug 24, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant