F4MP/tiltedcode/Code/client/Games/Skyrim/Interface/Menus/HUDMenuUtils.cpp
Jous99 37b16f1547 code upload
codigo original de f4mp y tilted para referencias
2026-01-06 18:45:00 +01:00

24 lines
776 B
C++

#include <Games/Skyrim/Interface/Menus/HUDMenuUtils.h>
#include <Games/Skyrim/NetImmerse/NiCamera.h>
namespace HUDMenuUtils
{
static float (*CameraWorldToCam)[4][4] = nullptr;
static const NiRect<float>* CameraPort = nullptr;
bool WorldPtToScreenPt3(const NiPoint3& aWorldPt, NiPoint3& aScreenPt)
{
return NiCamera::WorldPtToScreenPt3(reinterpret_cast<float*>(CameraWorldToCam), CameraPort, &aWorldPt, &aScreenPt.x, &aScreenPt.y, &aScreenPt.z, 1e-5f);
}
} // namespace HUDMenuUtils
static TiltedPhoques::Initializer s_Init(
[]()
{
POINTER_SKYRIMSE(float[4][4], s_matrix, 406126);
POINTER_SKYRIMSE(NiRect<float>, s_port, 406160);
HUDMenuUtils::CameraWorldToCam = s_matrix.Get();
HUDMenuUtils::CameraPort = s_port.Get();
});