Skip to content

Commit

Permalink
Interface3D::Renderer function defs
Browse files Browse the repository at this point in the history
  • Loading branch information
shad0wshayd3 committed Aug 3, 2023
1 parent 3289dea commit 40c0fa8
Showing 1 changed file with 242 additions and 0 deletions.
242 changes: 242 additions & 0 deletions CommonLibF4/include/RE/Bethesda/Interface3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,241 @@ namespace RE
};
static_assert(sizeof(LightParams) == 0x28);

static Renderer* Create(const BSFixedString& a_name, RE::UI_DEPTH_PRIORITY a_depth, float a_fov, bool a_alwaysRenderWhenEnabled)
{
using func_t = decltype(&Renderer::Create);
REL::Relocation<func_t> func{ REL::ID(88488) };
return func(a_name, a_depth, a_fov, a_alwaysRenderWhenEnabled);
}

[[nodiscard]] static Renderer* GetByName(const BSFixedString& a_name)
{
using func_t = decltype(&Renderer::GetByName);
REL::Relocation<func_t> func{ REL::ID(140387) };
return func(a_name);
}

void MainScreen_AddPointLight(
NiPoint3 a_translation,
NiColor a_diffuse,
float a_radius,
float a_dimmerVal)
{
using func_t = decltype(&Renderer::MainScreen_AddPointLight);
REL::Relocation<func_t> func{ REL::ID(1335675) };
return func(this, a_translation, a_diffuse, a_radius, a_dimmerVal);
}

void MainScreen_AddSpotLight(
NiPoint3 a_translation,
NiPoint3 a_lookAtPosition,
NiAVObject* a_lookAtObject,
float a_fov,
NiColor a_diffuse,
float a_radius,
float a_dimmerVal,
bool a_castShadows)
{
using func_t = decltype(&Renderer::MainScreen_AddSpotLight);
REL::Relocation<func_t> func{ REL::ID(1056093) };
return func(this, a_translation, a_lookAtPosition, a_lookAtObject, a_fov, a_diffuse, a_radius, a_dimmerVal, a_castShadows);
}

void MainScreen_ClearLights()
{
using func_t = decltype(&Renderer::MainScreen_ClearLights);
REL::Relocation<func_t> func{ REL::ID(683530) };
return func(this);
}

void MainScreen_EnableAO(bool a_value)
{
enableAO = a_value;
}

void MainScreen_EnableScreenAttached3DMasking(
const char* a_maskedGeomName,
const char* a_maskedMaterialName)
{
maskedGeomName = a_maskedGeomName;
maskedMaterialName = a_maskedMaterialName;
}

void MainScreen_RegisterGeometryRequiringFullViewport(NiAVObject* a_geometry)
{
elementRequiringFullVieport = a_geometry;
}

void MainScreen_SetBackgroundMode(BackgroundMode a_mode)
{
bgmode = a_mode;
}

void MainScreen_SetClearDepthStencil(bool a_clear)
{
clearDepthStencilMainScreen = a_clear;
}

void MainScreen_SetMenuBlendMode(OffscreenMenuBlendMode a_mode)
{
menuBlend = a_mode;
}

void MainScreen_SetMenuIntensity(float a_diffuse, float a_emit)
{
menuDiffuseIntensity = a_diffuse;
menuEmitIntensity = a_emit;
}

void MainScreen_SetOpacityAlpha(float a_opacityAlpha)
{
opacityAlpha = a_opacityAlpha;
}

void MainScreen_SetPostAA(bool a_value)
{
postAA = a_value;
}

void MainScreen_SetScreenAttached3D(NiAVObject* a_root3D)
{
using func_t = decltype(&Renderer::MainScreen_SetScreenAttached3D);
REL::Relocation<func_t> func{ REL::ID(817727) };
return func(this, a_root3D);
}

void MainScreen_SetUseDeferredRenderer(bool a_value)
{
defRenderMainScreen = a_value;
}

void MainScreen_SetWorldAttached3D(NiAVObject* a_root3D)
{
using func_t = decltype(&Renderer::MainScreen_SetWorldAttached3D);
REL::Relocation<func_t> func{ REL::ID(724778) };
return func(this, a_root3D);
}

void MainScreen_SetWorldAttachedMenuIntensity(float a_diffuse, float a_emit)
{
menuDiffuseIntensityWA = a_diffuse;
menuEmitIntensityWA = a_emit;
}

void MainScreen_SetHideScreenWhenDisabled(bool a_value)
{
hideScreenWhenDisabled = a_value;
}

void Offscreen_AddLight(
NiPoint3 a_translation,
NiColor a_diffuse,
NiColor a_specular,
float a_dimmerVal)
{
using func_t = decltype(&Renderer::Offscreen_AddLight);
REL::Relocation<func_t> func{ REL::ID(1267198) };
return func(this, a_translation, a_diffuse, a_specular, a_dimmerVal);
}

void Offscreen_Clear3D()
{
using func_t = decltype(&Renderer::Offscreen_Clear3D);
REL::Relocation<func_t> func{ REL::ID(1533262) };
return func(this);
}

void Offscreen_ClearLights()
{
using func_t = decltype(&Renderer::Offscreen_ClearLights);
REL::Relocation<func_t> func{ REL::ID(1039253) };
return func(this);
}

void Offscreen_Enable3D(bool a_value)
{
offscreen3DEnabled = a_value;
}

std::uint32_t Offscreen_GetRenderTargetHeight()
{
using func_t = decltype(&Renderer::Offscreen_GetRenderTargetHeight);
REL::Relocation<func_t> func{ REL::ID(1280897) };
return func(this);
}

std::uint32_t Offscreen_GetRenderTargetWidth()
{
using func_t = decltype(&Renderer::Offscreen_GetRenderTargetWidth);
REL::Relocation<func_t> func{ REL::ID(403273) };
return func(this);
}

void Offscreen_Set3D(NiAVObject* a_3D)
{
using func_t = decltype(&Renderer::Offscreen_Set3D);
REL::Relocation<func_t> func{ REL::ID(43983) };
return func(this, a_3D);
}

void Offscreen_SetBackgroundColor(const NiColorA& a_color)
{
clearColor = a_color;
}

void Offscreen_SetClearDepthStencil(bool a_clear)
{
clearDepthStencilOffscreen = a_clear;
}

void Offscreen_SetClearRenderTarget(bool a_clear)
{
clearRenderTarget = a_clear;
}

void Offscreen_SetDebugMode(bool a_on, bool a_small, std::uint32_t a_target)
{
using func_t = decltype(&Renderer::Offscreen_SetDebugMode);
REL::Relocation<func_t> func{ REL::ID(1277879) };
return func(this, a_on, a_small, a_target);
}

void Offscreen_SetDirectionalLight(
float a_xyPlaneAngle,
float a_zAngle,
NiColor a_diffuse,
float a_dimmerVal)
{
using func_t = decltype(&Renderer::Offscreen_SetDirectionalLight);
REL::Relocation<func_t> func{ REL::ID(987144) };
return func(this, a_xyPlaneAngle, a_zAngle, a_diffuse, a_dimmerVal);
}

void Offscreen_SetDisplayMode(
ScreenMode a_mode,
const char* a_screenGeomName,
const char* a_screenMaterialName)
{
screenmode = a_mode;
screenGeomName = a_screenGeomName;
screenMaterialName = a_screenMaterialName;
}

void Offscreen_SetPostEffect(PostEffect a_effect)
{
postfx = a_effect;
}

void Offscreen_SetRenderTargetSize(OffscreenMenuSize a_size)
{
omsize = a_size;
}

void Offscreen_SetUseLongRangeCamera(bool a_use)
{
useLongRangeCamera = a_use;
}

void Enable(bool a_unhideGeometries = false)
{
using func_t = decltype(&Renderer::Enable);
Expand All @@ -142,6 +370,20 @@ namespace RE
return func(this);
}

void Release()
{
using func_t = decltype(&Renderer::Release);
REL::Relocation<func_t> func{ REL::ID(74749) };
return func(this);
}

void SetViewport(RE::Scaleform::GFx::Movie& a_ui, const NiRect<float>& a_renderArea)
{
using func_t = decltype(&Renderer::SetViewport);
REL::Relocation<func_t> func{ REL::ID(825410) };
return func(this, a_ui, a_renderArea);
}

// members
BSTAlignedArray<UIShaderFXInfo> colorFXInfos; // 000
BSTAlignedArray<UIShaderFXInfo> backgroundFXInfos; // 018
Expand Down

0 comments on commit 40c0fa8

Please sign in to comment.