mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-01 09:18:00 +03:00

- moved InitialiseHair to hair.cpp. - changed while() to for() in LoadObjects() in inventory. - fixed INV_OBJECT_PASSPORT name (old: INV_OBJECT_PASSAPORT). - changed objectMip to zoneType. while be used in InitialiseSlot. - renamed usingDrawanimatingItem to use usingDrawAnimatingItem.
28 lines
No EOL
753 B
C++
28 lines
No EOL
753 B
C++
#include "camera.h"
|
|
#include <d3d9.h>
|
|
#include <d3dx9.h>
|
|
#include <stdio.h>
|
|
#include "draw.h"
|
|
|
|
void LookAt(int posX, int posY, int posZ, int targetX, int targetY, int targetZ, short roll)
|
|
{
|
|
Vector3 position = Vector3(posX, posY, posZ);
|
|
Vector3 target = Vector3(targetX, targetY, targetZ);
|
|
Vector3 up = Vector3(0.0f, -1.0f, 0.0f);
|
|
float fov = TR_ANGLE_TO_RAD(CurrentFOV / 1.333333f);
|
|
float r = TR_ANGLE_TO_RAD(roll);
|
|
|
|
g_Renderer->UpdateCameraMatrices(posX, posY, posZ, targetX, targetY, targetZ, r, fov);
|
|
}
|
|
|
|
void AlterFOV(int value)
|
|
{
|
|
CurrentFOV = value;
|
|
PhdPerspective = PhdWidth / 2 * COS(CurrentFOV / 2) / SIN(CurrentFOV / 2);
|
|
}
|
|
|
|
void Inject_Camera()
|
|
{
|
|
INJECT(0x0048EDC0, AlterFOV);
|
|
INJECT(0x0048F760, LookAt);
|
|
} |