Updates Draw.cpp, MusicManager.cpp.

This commit is contained in:
_AG
2019-06-16 00:20:55 +02:00
parent 92cc1cf3af
commit b83a0d469a
11 changed files with 561 additions and 21 deletions

View File

@ -1,6 +1,10 @@
#include "common.h"
#include "patcher.h"
#include "Draw.h"
#include "Frontend.h"
#include "Camera.h"
float CDraw::ms_fAspectRatio;
float &CDraw::ms_fNearClipZ = *(float*)0x8E2DC4;
float &CDraw::ms_fFarClipZ = *(float*)0x9434F0;
@ -11,6 +15,18 @@ uint8 &CDraw::FadeRed = *(uint8*)0x95CD90;
uint8 &CDraw::FadeGreen = *(uint8*)0x95CD71;
uint8 &CDraw::FadeBlue = *(uint8*)0x95CD53;
void CDraw::CalculateAspectRatio() {
if (FrontEndMenuManager.m_PrefsUseWideScreen) {
ms_fAspectRatio = 1.7777778f;
}
else if (TheCamera.m_WideScreenOn) {
ms_fAspectRatio = 1.25f;
}
else {
ms_fAspectRatio = 1.3333334f;
}
}
static float hFov2vFov(float hfov)
{
float w = SCREENW;

View File

@ -6,6 +6,8 @@ private:
static float &ms_fNearClipZ;
static float &ms_fFarClipZ;
static float &ms_fFOV;
static float ms_fAspectRatio;
public:
static uint8 &FadeValue;
static uint8 &FadeRed;
@ -16,6 +18,11 @@ public:
static float GetNearClipZ(void) { return ms_fNearClipZ; }
static void SetFarClipZ(float farclip) { ms_fFarClipZ = farclip; }
static float GetFarClipZ(void) { return ms_fFarClipZ; }
static void SetFOV(float fov);
static float GetFOV(void) { return ms_fFOV; }
static void CalculateAspectRatio();
static float GetAspectRatio(void) { return ms_fAspectRatio; }
};

View File

@ -53,7 +53,6 @@ wchar* CHud::m_pLastVehicleName = *(wchar **)0x8E2DD8;
wchar* CHud::m_pVehicleNameToPrint;
wchar* CHud::m_Message = (wchar*)0x72E318;
wchar* CHud::m_PagerMessage = (wchar*)0x878840;
Bool &CHud::m_bRetuneInProgress = *(Bool*)0x650B80;
Bool &CHud::m_Wants_To_Draw_Hud = *(Bool*)0x95CD89;
Bool &CHud::m_Wants_To_Draw_3dMarkers = *(Bool*)0x95CD62;
wchar(*CHud::m_BigMessage)[128] = (wchar(*)[128])0x664CE0;

View File

@ -49,7 +49,6 @@ public:
static int32 m_VehicleNameTimer;
static wchar* m_Message;
static wchar* m_PagerMessage;
static Bool &m_bRetuneInProgress;
static Bool &m_Wants_To_Draw_Hud;
static Bool &m_Wants_To_Draw_3dMarkers;
static wchar(*m_BigMessage)[128];