2022-07-31 18:55:11 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Based on Ryan McKenzie's Flat Map Markers
|
2023-12-11 01:44:41 +00:00
|
|
|
// CommonLibSSE-NG update by Eddoursul
|
2022-07-31 18:55:11 +00:00
|
|
|
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()
|
|
|
|
{
|
2023-12-21 11:41:08 +00:00
|
|
|
// Checked: 1.5.97, 1.6.640, 1.6.659, 1.6.1130
|
2023-12-11 01:44:41 +00:00
|
|
|
REL::Relocation<std::uintptr_t> offset{ REL::RelocationID(52224, 53111), REL::Relocate(0x22F, 0x21F) };
|
2023-12-10 20:10:58 +00:00
|
|
|
SKSE::AllocTrampoline(14);
|
2023-12-21 11:41:08 +00:00
|
|
|
SKSE::GetTrampoline().write_call<5>(offset.address(), &Hook_WorldPtToScreenPt3);
|
2022-07-31 18:55:11 +00:00
|
|
|
}
|
|
|
|
}
|