Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions include/RE/B/BGSTerrainManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#pragma once

#include "RE/B/BSSpinLock.h"
#include "RE/B/BSTArray.h"
#include "RE/N/NiPoint2.h"
#include "RE/N/NiPoint3.h"

namespace RE
{
class BGSTerrainNode;
class NiCamera;
class TESWorldSpace;

class BGSTerrainManager
{
public:
class CullState
{
public:
bool cullRoot; // 00
bool cullLand; // 01
bool cullTrees; // 02
bool cullObjects; // 03
bool cullInstanced; // 04
};

class QuickCullDAta
{
public:
NiPoint2 frustNearLeft; // 000
NiPoint2 frustFarLeft; // 008
NiPoint2 frustNearRight; // 010
NiPoint2 frustFarRight; // 018
};

void RecomputeQuickCullData(const NiCamera* a_camera)
{
using func_t = decltype(&BGSTerrainManager::RecomputeQuickCullData);
static REL::Relocation<func_t> func{ ID::BGSTerrainManager::RecomputeQuickCullData };
return func(this, a_camera);
}

// members
bool mapMode; // 000
TESWorldSpace* world; // 008
BGSTerrainNode* rootNode; // 010
std::int16_t minCellX; // 018
std::int16_t minCellY; // 01A
std::uint32_t maxLevel; // 01C
std::uint32_t minLevel; // 020
std::uint32_t rootLevel; // 024
std::uint32_t segmentedBlockLevel; // 028
std::uint32_t treeLevel; // 02C
CullState savedCullState; // 030
CullState activeCullState; // 035
bool cullActive; // 03A
bool needsImmediateUpdate; // 03B
bool initialUpdateDone; // 03C
bool hasLOD; // 03D
QuickCullDAta cullData; // 040
bool staticDataLoaded; // 060
BSTArray<BGSTerrainNode*> updateUpdates; // 068
std::uint32_t nextUpdateNode; // 080
BSTArray<BGSTerrainNode*> immediateUpdates; // 088
BSSpinLock immediateUpdateLock; // 0A0
bool lockedLOD; // 0A8
std::uint32_t lockedTerrainLOD; // 0AC
std::uint32_t lockedObjectLOD; // 0B0
std::uint32_t totalChildNodes; // 0B4
std::uint8_t* childNodeBufferStart; // 0B8
std::uint8_t* childNodeBufferCurr; // 0C0
std::uint8_t* childNodeBufferEnd; // 0C8
std::uint32_t nodeCount; // 0D0
std::uint32_t loadedRectUpdateDelay; // 0D4
NiPoint3 interiorAdjustedOffset; // 0D8
BSTArray<BGSTerrainNode*> fadeNodeA; // 0E8
};
static_assert(sizeof(BGSTerrainManager) == 0x100);
}
8 changes: 4 additions & 4 deletions include/RE/E/EXTRA_DATA_TYPE.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace RE
kSeenData, //
kEditorID, // ExtraEditorID
kCellMusicType, //
kSkyRegion, //
kSkyRegion, // ExtraCellSkyRegion
kCellMidLowProcess, //
kCellDetachTime, //
kPersistentCell, //
Expand Down Expand Up @@ -48,7 +48,7 @@ namespace RE
kLight, // ExtraLight
kLock, // ExtraLock
kTeleport, // ExtraTeleport
kMapMarker, //
kMapMarker, // ExtraMapMarker
kLeveledCreature, // ExtraLeveledCreature
kLevelItem, //
kScale, //
Expand Down Expand Up @@ -84,8 +84,8 @@ namespace RE
kNoRumors, //
kSound, //
kTerminalState, //
kLinkedRef, //
kLinkedRefChildren, //
kLinkedRef, // ExtraLinkedRef
kLinkedRefChildren, // ExtraLinkedRefChildren
kActivateRef, //
kActivateRefChildren, //
kTalkToPlayer, //
Expand Down
20 changes: 20 additions & 0 deletions include/RE/E/ExtraCellSkyRegion.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once

#include "RE/B/BSExtraData.h"

namespace RE
{
class TESRegion;

class __declspec(novtable) ExtraCellSkyRegion :
public BSExtraData // 00
{
static constexpr auto RTTI{ RTTI::ExtraCellSkyRegion };
static constexpr auto VTABLE{ VTABLE::ExtraCellSkyRegion };
static constexpr auto TYPE{ EXTRA_DATA_TYPE::kSkyRegion };

// members
TESRegion* skyRegion; // 18
};
static_assert(sizeof(ExtraCellSkyRegion) == 0x20);
}
31 changes: 31 additions & 0 deletions include/RE/E/ExtraLinkedRef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#pragma once

#include "RE/B/BSExtraData.h"
#include "RE/B/BSTArray.h"

namespace RE
{
class BGSKeyword;
class TESObjectREFR;

class __declspec(novtable) ExtraLinkedRef :
public BSExtraData // 00
{
public:
static constexpr auto RTTI{ RTTI::ExtraLinkedRef };
static constexpr auto VTABLE{ VTABLE::ExtraLinkedRef };
static constexpr auto TYPE{ EXTRA_DATA_TYPE::kLinkedRef };

class LinkedRef
{
public:
BGSKeyword* keyword; // 00
TESObjectREFR* REFR; // 08
};

// members
BSTSmallArray<LinkedRef, 1> linkedRefs; // 018
bool transientRefs; // 038
};
static_assert(sizeof(ExtraLinkedRef) == 0x40);
}
31 changes: 31 additions & 0 deletions include/RE/E/ExtraLinkedRefChildren.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#pragma once

#include "RE/B/BSExtraData.h"
#include "RE/B/BSPointerHandle.h"
#include "RE/B/BSTArray.h"

namespace RE
{
class BGSKeyword;
class TESObjectREFR;

class __declspec(novtable) ExtraLinkedRefChildren :
public BSExtraData // 00
{
public:
static constexpr auto RTTI{ RTTI::ExtraLinkedRefChildren };
static constexpr auto VTABLE{ VTABLE::ExtraLinkedRefChildren };
static constexpr auto TYPE{ EXTRA_DATA_TYPE::kLinkedRefChildren };

class LinkedRefChild
{
public:
BGSKeyword* keyword; // 00
ObjectRefHandle REFR; // 08
};

// members
BSTSmallArray<LinkedRefChild, 1> linkedChildren; // 018
};
static_assert(sizeof(ExtraLinkedRefChildren) == 0x38);
}
19 changes: 19 additions & 0 deletions include/RE/F/FastTravelCommand.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include "RE/P/PipboyCommand.h"

namespace RE
{
class __declspec(novtable) FastTravelCommand :
public PipboyCommand // 000
{
public:
static constexpr auto RTTI{ RTTI::FastTravelCommand };
static constexpr auto VTABLE{ VTABLE::FastTravelCommand };

// members
uint32_t markerId; // 028
};
static_assert(sizeof(FastTravelCommand) == 0x30);

}
6 changes: 6 additions & 0 deletions include/RE/Fallout.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
#include "RE/B/BGSSynchronizedAnimationManager.h"
#include "RE/B/BGSTalkingActivator.h"
#include "RE/B/BGSTerminal.h"
#include "RE/B/BGSTerrainManager.h"
#include "RE/B/BGSTextureModel.h"
#include "RE/B/BGSTextureSet.h"
#include "RE/B/BGSTopicSubtypeUnion.h"
Expand Down Expand Up @@ -664,6 +665,7 @@
#include "RE/E/ExtraAliasInstanceArray.h"
#include "RE/E/ExtraAmmo.h"
#include "RE/E/ExtraBendableSplineParams.h"
#include "RE/E/ExtraCellSkyRegion.h"
#include "RE/E/ExtraCellWaterType.h"
#include "RE/E/ExtraCharge.h"
#include "RE/E/ExtraDataList.h"
Expand All @@ -674,6 +676,8 @@
#include "RE/E/ExtraInstanceData.h"
#include "RE/E/ExtraLeveledCreature.h"
#include "RE/E/ExtraLight.h"
#include "RE/E/ExtraLinkedRef.h"
#include "RE/E/ExtraLinkedRefChildren.h"
#include "RE/E/ExtraLocation.h"
#include "RE/E/ExtraLock.h"
#include "RE/E/ExtraMapMarker.h"
Expand Down Expand Up @@ -701,6 +705,7 @@
#include "RE/F/FORM.h"
#include "RE/F/FORM_ENUM_STRING.h"
#include "RE/F/FUNCTION_DATA.h"
#include "RE/F/FastTravelCommand.h"
#include "RE/F/FatmanDeaths.h"
#include "RE/F/FavoriteMgr_Events.h"
#include "RE/F/FavoritesManager.h"
Expand Down Expand Up @@ -959,6 +964,7 @@
#include "RE/M/MagicTarget.h"
#include "RE/M/Main.h"
#include "RE/M/MainMenu.h"
#include "RE/M/MapMarker.h"
#include "RE/M/MapMarkerData.h"
#include "RE/M/MarkerIconTypes.h"
#include "RE/M/MeleeThrowHandler.h"
Expand Down
27 changes: 27 additions & 0 deletions include/RE/IDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,11 @@ namespace RE::ID
inline constexpr REL::ID Activate{ 2197778 };
}

namespace BGSTerrainManager
{
inline constexpr REL::ID RecomputeQuickCullData{ 2213622 };
}

namespace bhkCharacterController
{
inline constexpr REL::ID Jump{ 2278191 };
Expand Down Expand Up @@ -517,6 +522,12 @@ namespace RE::ID
inline constexpr REL::ID Singleton{ 2255115 };
}

namespace BSCullingProcess
{
inline constexpr REL::ID Process1{ 2275931 };
inline constexpr REL::ID Process2{ 2275932 };
}

namespace BSGFxDisplayObject
{
inline constexpr REL::ID RemoveChild{ 2287327 };
Expand Down Expand Up @@ -1460,6 +1471,8 @@ namespace RE::ID
inline constexpr REL::ID QGameSystemsShouldUpdate{ 2698031 };
inline constexpr REL::ID QGameDataLoaded{ 2698032 };
inline constexpr REL::ID SetCameraFOV{ 2228973 };
inline constexpr REL::ID LandLODRoot{ 2698035 };
inline constexpr REL::ID ObjectLODRoot{ 2698036 };
}

namespace MapMarkerData
Expand Down Expand Up @@ -1557,6 +1570,11 @@ namespace RE::ID
inline constexpr REL::ID Activate{ 2271861 };
}

namespace NiCullingProcess
{
inline constexpr REL::ID SetFrustum{ 2270782 };
}

namespace NiMatrix3
{
inline constexpr REL::ID ToEulerAnglesXYZ{ 2269806 };
Expand Down Expand Up @@ -1696,6 +1714,11 @@ namespace RE::ID
inline constexpr REL::ID UpdateCursorConstraint{ 2225488 };
}

namespace PipboyMapData
{
inline constexpr REL::ID GetTravelLocationRefr{ 2225515 };
}

namespace PipboyMapMenu
{
inline constexpr REL::ID UpdateData{ 2224074 };
Expand Down Expand Up @@ -1820,6 +1843,8 @@ namespace RE::ID
inline constexpr REL::ID HasLOSToTarget{ 2233004 };
inline constexpr REL::ID TryUnlockObject{ 2233040 };
inline constexpr REL::ID EnableRadio{ 2233211 };
inline constexpr REL::ID UpdateAnimation{ 2233005 };
inline constexpr REL::ID HandlePositionPlayerRequest{ 2232905 };
}

namespace PlayerControls
Expand Down Expand Up @@ -2008,6 +2033,7 @@ namespace RE::ID
namespace TES
{
inline constexpr REL::ID Singleton{ 2698044 };
inline constexpr REL::ID UpdateMultiBoundVisibility{ 2192134 };
}

namespace TESActivateEvent
Expand Down Expand Up @@ -2345,6 +2371,7 @@ namespace RE::ID
{
inline constexpr REL::ID DefaultWater{ 4799138 };
inline constexpr REL::ID GetSkyCell{ 2202924 };
inline constexpr REL::ID AdjustMapMarkerCoord{ 2202880 };
}

namespace UI
Expand Down
16 changes: 14 additions & 2 deletions include/RE/M/Main.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ namespace RE
return func();
}

[[nodiscard]] static SceneGraph* WorldRootNode()
[[nodiscard]] static SceneGraph* GetWorldRootNode()
{
static REL::Relocation<NiPointer<SceneGraph>*> nodePtr{ ID::Main::WorldRootCamera };
static REL::Relocation<NiPointer<SceneGraph>*> nodePtr{ ID::Main::WorldRootNode };
return nodePtr->get();
}

Expand All @@ -63,6 +63,18 @@ namespace RE
return func(this, a_fov);
}

inline static NiNode* GetLandLODRoot()
{
static REL::Relocation<NiNode*> value{ ID::Main::LandLODRoot };
return value.get();
}

inline static NiNode* GetObjectLODRoot()
{
static REL::Relocation<NiNode*> value{ ID::Main::ObjectLODRoot };
return value.get();
}

// members
BSTArray<BSTTuple<float, ActorHandle>> sortedVisibleHighActors; // 08
std::uint32_t localMapRenderDelay; // 20
Expand Down
13 changes: 13 additions & 0 deletions include/RE/M/MapMarker.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once
Comment thread
FalloutCascadia marked this conversation as resolved.

namespace RE
{
namespace MapMarker
{
enum class MARKER_SCOPE
{
kWorld = 0x0,
kLocal = 0x1
};
}
}
Loading