Eddoursul
f2150e94ef
- Cross-runtime build, tested on SE and AE - Intergrated Flat Map Markers and Stay At The System Page - Added tons of sanity checks - Automatically overrides bFreebiesSeen, bInvalidateOlderFiles, and bModManagerMenuEnabled INI values
21 lines
687 B
C++
21 lines
687 B
C++
#pragma once
|
|
|
|
#include "Util.h"
|
|
|
|
// Based on Ryan McKenzie's Flat Map Markers
|
|
namespace FlatMapMarkers
|
|
{
|
|
inline void Hook_WorldPtToScreenPt3(RE::NiCamera* a_camera, RE::NiPoint3& a_in, float& a_xOut, float& a_yOut, float& a_zOut, float a_zeroTolerance)
|
|
{
|
|
a_in.z = 100000.156250;
|
|
RE::NiCamera::WorldPtToScreenPt3(a_camera->GetRuntimeData().worldToCam, a_camera->GetRuntimeData2().port, a_in, a_xOut, a_yOut, a_zOut, a_zeroTolerance);
|
|
}
|
|
|
|
inline void Install()
|
|
{
|
|
REL::Relocation<std::uintptr_t> offset{ RELOCATION_ID(52224, 53111), IsSE() ? 0x22F : 0x21F };
|
|
auto& trampoline = SKSE::GetTrampoline();
|
|
trampoline.write_call<5>(offset.address(), &Hook_WorldPtToScreenPt3);
|
|
}
|
|
}
|