Skip to content
Permalink
Browse files
Commiting so I can go back to build 1226 to help an annoying Lithuani…
…an guy

git-svn-id: svn://localhost/vcspc/trunk@37 9f344024-d43e-4b27-bde7-3d027e20192d
  • Loading branch information
silent committed Mar 10, 2014
1 parent b30a4bb commit 4d41a98729725fe32686a1e8cf7d750b1107fd26
@@ -11,7 +11,7 @@ WRAPPER bool CCamera::IsPositionVisible(const CVector& vecPos, float fRadius) {

void CCamera::GetScreenRect(CRect& rect)
{
float fScreenRatio = *ScreenAspectRatio;
float fScreenRatio = ScreenAspectRatio;
float dScreenHeightWeWannaCut = ((-9.0f/16.0f) * fScreenRatio + 1.0f);
float dBorderProportionsFix = ((-144643.0f/50000.0f) * fScreenRatio * fScreenRatio) + ((807321.0f/100000.0f) * fScreenRatio) - (551143.0f/100000.0f);

@@ -31,6 +31,8 @@ class CWanted

public:
inline int GetWantedLevel() { return m_WantedLevel; }
inline int GetWantedLevelBeforeParole() { return m_WantedLevelBeforeParole; }
inline int GetTimeWantedLevelChanged() { return m_LastTimeWantedLevelChanged; }

bool ShouldSendViceSquad();
};
@@ -119,6 +119,10 @@ void CEmpireManager::Initialise()
sscanf(pLine, "%d %c %f %f %f %f", &nTypeID, &nSubgroup, &tempData.m_translate.x, &tempData.m_translate.y, &tempData.m_translate.z, &tempData.m_heading);
nSubgroup = static_cast<char>(tolower(nSubgroup));

// Normalize the angle
while ( tempData.m_heading < 0.0f )
tempData.m_heading += 360.0f;

// Get the index and increase it afterwards
unsigned char nIndex = countMap[PackKey(static_cast<unsigned short>(nTypeID), nSubgroup)];
pCurrentModelForDataParsing->GetEmpireData()->AddEntry(static_cast<unsigned short>(nTypeID), nSubgroup, nIndex++, tempData);
@@ -384,7 +384,7 @@ void CMenuManager::DrawBackEnd()
{
// Calculate proper dimensions
// Displayed image is 16:9
CVector2D vecSplashScale = WidescreenSupport::GetFullscreenImageDimensions(16.0f/9.0f, *ScreenAspectRatio, false);
CVector2D vecSplashScale = WidescreenSupport::GetFullscreenImageDimensions(16.0f/9.0f, ScreenAspectRatio, false);

CSprite2d::DrawRect(CRect(-5.0f, RsGlobal.MaximumHeight + 5.0f, RsGlobal.MaximumWidth + 5.0f, RsGlobal.MaximumHeight * 0.95f - 5.0f), CRGBA(7, 7, 7, 255));
textures[13].Draw(CRect(-2.5f - (vecSplashScale.x-RsGlobal.MaximumWidth), RsGlobal.MaximumHeight * 0.95f, RsGlobal.MaximumWidth + 2.5f, -2.5f - (vecSplashScale.y-RsGlobal.MaximumHeight)), CRGBA(255, 255, 255, 255));
@@ -638,7 +638,7 @@ void CMenuManager::DrawOutroSplash()
{
LoadSplashes(true, 0);

CVector2D vecSplashScale = WidescreenSupport::GetFullscreenImageDimensions(512.0f/400.0f, *ScreenAspectRatio, true);
CVector2D vecSplashScale = WidescreenSupport::GetFullscreenImageDimensions(512.0f/400.0f, ScreenAspectRatio, true);

rectSpriteDimensions.x1 = 0.5f * (RsGlobal.MaximumWidth - vecSplashScale.x);
rectSpriteDimensions.y1 = 0.5f * (RsGlobal.MaximumHeight + vecSplashScale.y);
BIN +3.31 KB (100%) VCS PC/Hud.cpp
Binary file not shown.
@@ -88,6 +88,7 @@ class CHud
static bool HelpMessageShown();

static void DrawHUD();
static void DrawWanted();
static void DrawOnscreenTimer();
static void DrawPermanentTexts();
static void DrawRadioName(void* object, const char* radioName);
@@ -197,6 +197,14 @@ class CMatrix
matrix.pos.x = 0.0f; matrix.pos.y = 0.0f; matrix.pos.z = 0.0f;
}

inline void SetScale(float fScale)
{
matrix.right.x = fScale; matrix.right.y = 0.0f; matrix.right.z = 0.0f;
matrix.up.x = 0.0f; matrix.up.y = fScale; matrix.up.z = 0.0f;
matrix.at.x = 0.0f; matrix.at.y = 0.0f; matrix.at.z = fScale;
matrix.pos.x = 0.0f; matrix.pos.y = 0.0f; matrix.pos.z = 0.0f;
}

inline void RotateX(float fAngle)
{
CMatrix RotationMatrix;
@@ -61,8 +61,9 @@
//#define ROTORS_TEST
//#define DEBUG_GETMODELINFO_WRAPPER
//#define FANCY_FRONTEND_CONTROLLERS_TEST
#define SHOW_FOV_FANCY_RHYME

#define NEW_SHADOWS_TEST
//#define NEW_SHADOWS_TEST

//#define MAKE_ZZCOOL_MOVIE_DEMO

@@ -159,7 +160,7 @@ extern DWORD* memoryAvailable;
extern DWORD* memoryUsed;
extern float* WidthAspectRatio;
extern float* HeightAspectRatio;
extern float* ScreenAspectRatio;
extern float& ScreenAspectRatio;
extern float* fFOV;
extern BYTE* bWants_To_Draw_Hud;
extern BYTE* radarGrey;
@@ -0,0 +1,5 @@
#include "StdAfx.h"
#include "TimeCycle.h"

int& CTimeCycle::m_CurrentStoredValue = *(int*)0xB79FD0;
CVector* const CTimeCycle::m_VectorToSun = (CVector*)0xB7CA50;
@@ -0,0 +1,11 @@
#ifndef __TIMECYCLE
#define __TIMECYCLE

class CTimeCycle
{
public:
static int& m_CurrentStoredValue;
static CVector* const m_VectorToSun;
};

#endif
@@ -4,4 +4,4 @@
int& CTimer::m_snTimeInMilliseconds = *(int*)0xB7CB84;
int& CTimer::m_snTimeInMillisecondsPauseMode = *(int*)0xB7CB7C;
float& CTimer::ms_fTimeStep = *(float*)0xB7CB5C;
unsigned int& CTimer::m_FrameCounter = *(unsigned int*)0xB7CB4C;
//unsigned int& CTimer::m_FrameCounter = *(unsigned int*)0xB7CB4C;
@@ -7,7 +7,12 @@ class CTimer
static int& m_snTimeInMilliseconds;
static int& m_snTimeInMillisecondsPauseMode;
static float& ms_fTimeStep;
static unsigned int& m_FrameCounter;
//static unsigned int& m_FrameCounter;
};

inline bool ShowFlashingItem(signed int nOnDuration, signed int nOffDuration)
{
return CTimer::m_snTimeInMillisecondsPauseMode % (nOnDuration+nOffDuration) < nOnDuration;
}

#endif
@@ -366,6 +366,7 @@ popd</Command>
</ClCompile>
<ClCompile Include="Streaming.cpp" />
<ClCompile Include="Text.cpp" />
<ClCompile Include="TimeCycle.cpp" />
<ClCompile Include="Timer.cpp" />
<ClCompile Include="TxdStore.cpp" />
<ClCompile Include="UpdateManager.cpp" />
@@ -433,6 +434,7 @@ popd</Command>
<ClInclude Include="Messages.h" />
<ClInclude Include="Streaming.h" />
<ClInclude Include="Text.h" />
<ClInclude Include="TimeCycle.h" />
<ClInclude Include="Timer.h" />
<ClInclude Include="TxdStore.h" />
<ClInclude Include="UpdateManager.h" />
@@ -213,6 +213,9 @@
<ClCompile Include="Antennas.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TimeCycle.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CCam.h">
@@ -428,6 +431,9 @@
<ClInclude Include="Maths.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="TimeCycle.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="LoadVars.inc">

0 comments on commit 4d41a98

Please sign in to comment.