docs: add plugin setup guide

This commit is contained in:
2026-05-30 18:33:24 +12:00
parent f3db41c402
commit b61043a3fe
1776 changed files with 122386 additions and 2 deletions
@@ -0,0 +1,33 @@
#pragma once
#include "RE/N/NiRefObject.h"
namespace RE
{
class __declspec(novtable) BSHandleRefObject :
public NiRefObject // 00
{
public:
static constexpr auto RTTI{ RTTI::BSHandleRefObject };
static constexpr auto VTABLE{ VTABLE::BSHandleRefObject };
std::uint32_t DecRefCount()
{
REX::TAtomicRef myRefCount{ refCount };
const auto newRefCount = --myRefCount & 0x3FF;
if (newRefCount == 0) {
DeleteThis();
}
return newRefCount;
}
void IncRefCount()
{
REX::TAtomicRef myRefCount{ refCount };
++myRefCount;
}
[[nodiscard]] std::uint32_t QRefCount() const noexcept { return refCount & 0x3FF; }
};
static_assert(sizeof(BSHandleRefObject) == 0x10);
}