Skip to content

Commit

Permalink
feat: ChargenMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
qudix committed Oct 5, 2024
1 parent 0af341a commit 0564f80
Show file tree
Hide file tree
Showing 7 changed files with 215 additions and 18 deletions.
127 changes: 127 additions & 0 deletions include/RE/C/ChargenMenu.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#pragma once

#include "RE/G/GameMenuBase.h"
#include "RE/I/IDataModel.h"

namespace RE
{
class MenuPaperDoll;
class TESNPC;

struct CharGen_CloseMenu;
struct CharGen_PresetChange;
struct CharGen_HeadpartPresetChange;
struct CharGen_SetSex;
struct CharGen_SetSlider;
struct CharGen_StartTextEntry;
struct CharGen_EndTextEntry;
struct CharGen_CancelTextEntry;
struct CharGen_ShowPlayerRenameMessage;
struct CharGen_ShowChooseBackgroundMessage;
struct CharGen_SetBodyValues;
struct CharGen_SetCameraPosition;
struct CharGen_HeadpartPlusSelectorChange;
struct CharGen_SkintoneChange;
struct CharGen_DirtScarsEtcChange;
struct CharGen_ToggleMarking;
struct CharGen_SetTrait;
struct CharGen_SetBackground;
struct CharGen_EyeColorChange;
struct CharGen_BrowChange;
struct CharGen_HairChange;
struct CharGen_HairColorChange;
struct CharGen_FacialHairChange;
struct CharGen_FacialHairColorChange;
struct CharGen_BrowColorChange;
struct CharGen_TeethChange;
struct CharGen_CyclePronoun;
struct CharGen_SetPronoun;
struct CharGen_TogglePreviewHabSuit;
struct CharGen_SwitchLocomotion;
struct CharGen_SwitchBodyType;
struct CharGen_RotatePaperdoll;
struct CharGen_RollOnLocomotion;
struct CharGen_RollOffLocomotion;
struct CharGen_TeethRollOn;
struct CharGen_TeethRollOff;
struct CharGen_JewelryChange;
struct CharGen_JewelryColorChange;
struct CharGen_StartBodyChange;
struct CharGen_EndBodyChange;
struct CharGen_SetAdditionalSlider;
struct CharGen_SetBlockInputUnderPopup;
struct CharGen_PostBlendFaceChange;
struct CharGen_PostBlendColorOptionChange;
struct CharGen_PostBlendIntensityChange;
struct CharGen_MakeupChange;
struct CharGen_MarkingsChange;
struct UIMenuChargenMenuDisablePaperdoll;

class ChargenMenu :
public GameMenuBase, // 000
public IDataModel, // 138
public BSTEventSink<CharGen_CloseMenu>, // 140
public BSTEventSink<CharGen_PresetChange>, // 148
public BSTEventSink<CharGen_HeadpartPresetChange>, // 150
public BSTEventSink<CharGen_SetSex>, // 158
public BSTEventSink<CharGen_SetSlider>, // 160
public BSTEventSink<CharGen_StartTextEntry>, // 168
public BSTEventSink<CharGen_EndTextEntry>, // 170
public BSTEventSink<CharGen_CancelTextEntry>, // 178
public BSTEventSink<CharGen_ShowPlayerRenameMessage>, // 180
public BSTEventSink<CharGen_ShowChooseBackgroundMessage>, // 188
public BSTEventSink<CharGen_SetBodyValues>, // 190
public BSTEventSink<CharGen_SetCameraPosition>, // 198
public BSTEventSink<CharGen_HeadpartPlusSelectorChange>, // 1A0
public BSTEventSink<CharGen_SkintoneChange>, // 1A8
public BSTEventSink<CharGen_DirtScarsEtcChange>, // 1B0
public BSTEventSink<CharGen_ToggleMarking>, // 1B8
public BSTEventSink<CharGen_SetTrait>, // 1C0
public BSTEventSink<CharGen_SetBackground>, // 1C8
public BSTEventSink<CharGen_EyeColorChange>, // 1D0
public BSTEventSink<CharGen_BrowChange>, // 1D8
public BSTEventSink<CharGen_HairChange>, // 1E0
public BSTEventSink<CharGen_HairColorChange>, // 1E8
public BSTEventSink<CharGen_FacialHairChange>, // 1F0
public BSTEventSink<CharGen_FacialHairColorChange>, // 1F8
public BSTEventSink<CharGen_BrowColorChange>, // 200
public BSTEventSink<CharGen_TeethChange>, // 208
public BSTEventSink<CharGen_CyclePronoun>, // 210
public BSTEventSink<CharGen_SetPronoun>, // 218
public BSTEventSink<CharGen_TogglePreviewHabSuit>, // 220
public BSTEventSink<CharGen_SwitchLocomotion>, // 228
public BSTEventSink<CharGen_SwitchBodyType>, // 230
public BSTEventSink<CharGen_RotatePaperdoll>, // 238
public BSTEventSink<CharGen_RollOnLocomotion>, // 240
public BSTEventSink<CharGen_RollOffLocomotion>, // 248
public BSTEventSink<CharGen_TeethRollOn>, // 250
public BSTEventSink<CharGen_TeethRollOff>, // 258
public BSTEventSink<CharGen_JewelryChange>, // 260
public BSTEventSink<CharGen_JewelryColorChange>, // 268
public BSTEventSink<CharGen_StartBodyChange>, // 270
public BSTEventSink<CharGen_EndBodyChange>, // 278
public BSTEventSink<CharGen_SetAdditionalSlider>, // 280
public BSTEventSink<CharGen_SetBlockInputUnderPopup>, // 288
public BSTEventSink<CharGen_PostBlendFaceChange>, // 290
public BSTEventSink<CharGen_PostBlendColorOptionChange>, // 298
public BSTEventSink<CharGen_PostBlendIntensityChange>, // 2A0
public BSTEventSink<CharGen_MakeupChange>, // 2A8
public BSTEventSink<CharGen_MarkingsChange>, // 2B0
public BSTEventSink<UIMenuChargenMenuDisablePaperdoll> // 2B8
{
public:
SF_RTTI_VTABLE(ChargenMenu);
SF_MENU_NAME("ChargenMenu");

virtual ~ChargenMenu(); // 00

// members
MenuPaperDoll* paperDoll; // 2C8
TESNPC* npc; // 2D0
std::byte pad2D8[(0x5B8 - 0x2D8)]; // 2D8
std::uint32_t cameraPosition; // 5B8
std::uint32_t unk5BC; // 5BC
std::byte pad5C0[(0x650 - 0x5C0)]; // 5C0
};
static_assert(sizeof(ChargenMenu) == 0x650);
}
6 changes: 3 additions & 3 deletions include/RE/G/GameMenuBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ namespace RE
virtual ~GameMenuBase() = default; // 00

//override
virtual uint64_t Unk10() override
virtual std::uint64_t Unk10() override
{
using func_t = decltype(&GameMenuBase::Unk10);
static REL::Relocation<func_t> func(REL::ID(141505));
return func(this);
};

virtual uint64_t Unk11() override
virtual std::uint64_t Unk11() override
{
using func_t = decltype(&GameMenuBase::Unk11);
static REL::Relocation<func_t> func(REL::ID(141506));
Expand Down Expand Up @@ -65,7 +65,7 @@ namespace RE
return result;
}

void RegisterNativeFunction(const char* a_name, uint64_t a_idx)
void RegisterNativeFunction(const char* a_name, std::uint64_t a_idx)
{
if (!uiMovie) {
return;
Expand Down
19 changes: 19 additions & 0 deletions include/RE/I/IDataModel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

namespace RE
{
class IDataModel
{
public:
SF_RTTI_VTABLE(IDataModel);

virtual ~IDataModel();

virtual void Unk01();
virtual void Unk02();
virtual void Unk03();

// members
void* unk08; // 08 - model object?
};
}
1 change: 1 addition & 0 deletions include/RE/I/IMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ namespace RE
std::uint64_t unk118; // 118
std::uint64_t unk120; // 120
std::uint64_t unk128; // 128
std::uint64_t unk130; // 130
};
static_assert(offsetof(IMenu, uiMovie) == 0x088);
static_assert(offsetof(IMenu, menuName) == 0x0B0);
Expand Down
35 changes: 35 additions & 0 deletions include/RE/M/MenuPaperDoll.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#pragma once

#include "RE/U/UICellRenderer.h"

namespace RE
{
class BGSKeyword;
class MenuActor;
class TESObjectREFR;

class MenuPaperDoll :
public UICellRenderer
{
public:
SF_RTTI_VTABLE(MenuPaperDoll);

virtual ~MenuPaperDoll(); // 00

// members
std::uint64_t unk070; // 070
std::uint64_t unk078; // 078
std::uint64_t unk080; // 080
std::uint64_t unk088; // 088
std::uint64_t unk090; // 090
std::uint64_t unk098; // 098
std::uint64_t unk0A0; // 0A0
std::uint64_t unk0A8; // 0A8
MenuActor* menuActor; // 0B0
std::byte pad0B8[(0x1A0 - 0xB8)]; // 0B8
BGSKeyword* unk1A0; // 1A0
TESObjectREFR* unk1A8; // 1A8
};
static_assert(offsetof(MenuPaperDoll, menuActor) == 0xB0);
static_assert(offsetof(MenuPaperDoll, unk1A0) == 0x1A0);
}
16 changes: 1 addition & 15 deletions include/RE/T/TESNPCData.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
#pragma once

#include "RE/B/BSTSingleton.h"
#include "RE/I/IDataModel.h"

namespace RE
{
class MenuActor;

class IDataModel
{
public:
SF_RTTI_VTABLE(IDataModel);

virtual ~IDataModel();

virtual void Unk01();
virtual void Unk02();
virtual void Unk03();

// members
void* unk08; // 08 - model object?
};
}

namespace RE::TESNPCData
Expand Down
29 changes: 29 additions & 0 deletions include/RE/U/UICellRenderer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once

#include "RE/B/BSIntrusiveRefCounted.h"

namespace RE
{
class TESObjectCELL;

class UICellRenderer :
public BSIntrusiveRefCounted
{
public:
SF_RTTI_VTABLE(UICellRenderer);

virtual ~UICellRenderer(); // 00

// members
TESObjectCELL* unk10; // 10
void* unk18; // 18 - const BSResource2::TEntryType<0,LoadedCellDB::DBTraits, BSResource2::DBDefaultStreamPolicy>
float unk20; // 20
float unk24; // 24
std::uint64_t unk28; // 28
void* unk30[4]; // 30 - const BSResource2::TEntryType<0,TextureDB::DBTraits, BSResource2::DBDefaultStreamPolicy>
std::uint64_t unk50; // 50
std::uint8_t unk58[8]; // 58
std::uint64_t unk60; // 60
std::uint64_t unk68; // 68 - BSMenu3D::Scene
};
}

0 comments on commit 0564f80

Please sign in to comment.