mirror of
https://github.com/halpz/re3.git
synced 2025-07-21 17:59:46 +00:00
Merge branch 'miami' of https://github.com/GTAmodding/re3 into miami
This commit is contained in:
@ -64,6 +64,13 @@ CClouds::Update(void)
|
||||
float s = Sin(TheCamera.Orientation - 0.85f);
|
||||
CloudRotation += CWeather::Wind*s*0.001f;
|
||||
IndividualRotation += (CWeather::Wind*CTimer::GetTimeStep()*0.5f + 0.3f) * 60.0f;
|
||||
#ifdef FIX_BUGS
|
||||
CloudRotation += CWeather::Wind*s*0.001f*CTimer::GetTimeStepFix();
|
||||
IndividualRotation += (CWeather::Wind*CTimer::GetTimeStep()*0.5f + 0.3f*CTimer::GetTimeStepFix()) * 60.0f;
|
||||
#else
|
||||
CloudRotation += CWeather::Wind*s*0.001f;
|
||||
IndividualRotation += (CWeather::Wind*CTimer::GetTimeStep()*0.5f + 0.3f) * 60.0f;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -593,15 +593,20 @@ void CHud::Draw()
|
||||
else
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.2f), SCREEN_SCALE_Y(1.2f));
|
||||
|
||||
CFont::SetSlantRefPoint(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f));
|
||||
CFont::SetSlant(0.15f);
|
||||
|
||||
CFont::SetRightJustifyOn();
|
||||
CFont::SetRightJustifyWrap(0.0f);
|
||||
CFont::SetBackGroundOnlyTextOff();
|
||||
CFont::SetFontStyle(FONT_BANK);
|
||||
CFont::SetColor(CRGBA(0, 0, 0, fZoneAlpha));
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X(1.0f), SCREEN_SCALE_FROM_BOTTOM(30.0f) + SCREEN_SCALE_Y(1.0f), m_ZoneToPrint);
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X(1.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f) + SCREEN_SCALE_Y(1.0f), m_ZoneToPrint);
|
||||
|
||||
CFont::SetColor(CRGBA(ZONE_COLOR.r, ZONE_COLOR.g, ZONE_COLOR.b, fZoneAlpha));
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(30.0f), m_ZoneToPrint);
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(128.0f), m_ZoneToPrint);
|
||||
|
||||
CFont::SetSlant(0.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -687,15 +692,20 @@ void CHud::Draw()
|
||||
else
|
||||
CFont::SetScale(SCREEN_SCALE_X(1.2f * 0.85f), SCREEN_SCALE_Y(1.2f));
|
||||
|
||||
CFont::SetSlantRefPoint(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(105.0f));
|
||||
CFont::SetSlant(0.15f);
|
||||
|
||||
CFont::SetRightJustifyOn();
|
||||
CFont::SetRightJustifyWrap(0.0f);
|
||||
CFont::SetBackGroundOnlyTextOff();
|
||||
CFont::SetFontStyle(FONT_BANK);
|
||||
CFont::SetColor(CRGBA(0, 0, 0, fVehicleAlpha));
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X(1.0f), SCREEN_SCALE_FROM_BOTTOM(55.0f) + SCREEN_SCALE_Y(1.0f), m_pVehicleNameToPrint);
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f) + SCREEN_SCALE_X(1.0f), SCREEN_SCALE_FROM_BOTTOM(105.f) + SCREEN_SCALE_Y(1.0f), m_pVehicleNameToPrint);
|
||||
|
||||
CFont::SetColor(CRGBA(VEHICLE_COLOR.r, VEHICLE_COLOR.g, VEHICLE_COLOR.b, fVehicleAlpha));
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(55.0f), m_pVehicleNameToPrint);
|
||||
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(32.0f), SCREEN_SCALE_FROM_BOTTOM(105.0f), m_pVehicleNameToPrint);
|
||||
|
||||
CFont::SetSlant(0.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,42 @@
|
||||
|
||||
#include "Occlusion.h"
|
||||
|
||||
int32 COcclusion::NumOccludersOnMap;
|
||||
int16 COcclusion::FarAwayList;
|
||||
int16 COcclusion::NearbyList;
|
||||
int16 COcclusion::ListWalkThroughFA;
|
||||
int16 COcclusion::PreviousListWalkThroughFA;
|
||||
COccluder COcclusion::aOccluders[NUMOCCLUSIONVOLUMES];
|
||||
|
||||
void
|
||||
COcclusion::Init(void)
|
||||
{
|
||||
NumOccludersOnMap = 0;
|
||||
FarAwayList = -1;
|
||||
NearbyList = -1;
|
||||
ListWalkThroughFA = -1;
|
||||
PreviousListWalkThroughFA = -1;
|
||||
}
|
||||
|
||||
void
|
||||
COcclusion::AddOne(float x, float y, float z, float width, float length, float height, float angle)
|
||||
{
|
||||
if(NumOccludersOnMap >= NUMOCCLUSIONVOLUMES)
|
||||
return;
|
||||
|
||||
aOccluders[NumOccludersOnMap].x = x;
|
||||
aOccluders[NumOccludersOnMap].y = y;
|
||||
aOccluders[NumOccludersOnMap].z = z;
|
||||
aOccluders[NumOccludersOnMap].width = width;
|
||||
aOccluders[NumOccludersOnMap].length = length;
|
||||
aOccluders[NumOccludersOnMap].height = height;
|
||||
while(angle < 0.0f) angle += 360.0f;
|
||||
while(angle > 360.0f) angle -= 360.0f;
|
||||
aOccluders[NumOccludersOnMap].angle = angle * UINT16_MAX/360.0f;
|
||||
aOccluders[NumOccludersOnMap].listIndex = FarAwayList;
|
||||
FarAwayList = NumOccludersOnMap++;
|
||||
}
|
||||
|
||||
void
|
||||
COcclusion::ProcessBeforeRendering(void)
|
||||
{
|
||||
|
@ -1,7 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
class COccluder
|
||||
{
|
||||
public:
|
||||
int16 width, length, height;
|
||||
int16 x, y, z;
|
||||
uint16 angle;
|
||||
int16 listIndex;
|
||||
};
|
||||
|
||||
class COcclusion
|
||||
{
|
||||
public:
|
||||
static int32 NumOccludersOnMap;
|
||||
static int16 FarAwayList;
|
||||
static int16 NearbyList;
|
||||
static int16 ListWalkThroughFA;
|
||||
static int16 PreviousListWalkThroughFA;
|
||||
|
||||
static COccluder aOccluders[NUMOCCLUSIONVOLUMES];
|
||||
|
||||
static void Init(void);
|
||||
static void AddOne(float x, float y, float z, float width, float length, float height, float angle);
|
||||
static void ProcessBeforeRendering(void);
|
||||
};
|
||||
|
Reference in New Issue
Block a user