CEntity and friends

This commit is contained in:
aap
2020-05-19 20:56:42 +02:00
parent 8a90e32f1b
commit bdbe5d1080
26 changed files with 581 additions and 650 deletions

View File

@ -4,7 +4,8 @@ enum {
EFFECT_LIGHT,
EFFECT_PARTICLE,
EFFECT_ATTRACTOR,
EFFECT_PED_ATTRACTOR
EFFECT_PED_ATTRACTOR,
EFFECT_SUNGLARE
};
enum {
@ -35,6 +36,8 @@ enum {
// same order as CPointLights flags, must start at 2
LIGHTFLAG_FOG_NORMAL = 2, // can have light and fog
LIGHTFLAG_FOG_ALWAYS = 4, // fog only
LIGHTFLAG_HIDE_OBJECT = 8, // hide the object instead of rendering light (???)
LIGHTFLAG_LONG_DIST = 16,
LIGHTFLAG_FOG = (LIGHTFLAG_FOG_NORMAL|LIGHTFLAG_FOG_ALWAYS)
};

View File

@ -62,8 +62,6 @@ void
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;

View File

@ -129,7 +129,8 @@ CCoronas::Update(void)
void
CCoronas::RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 alpha,
const CVector &coors, float size, float drawDist, RwTexture *tex,
int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle)
int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle,
bool longDist, float nearDist)
{
int i;
@ -192,11 +193,13 @@ CCoronas::RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 al
void
CCoronas::RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 alpha,
const CVector &coors, float size, float drawDist, uint8 type,
int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle)
const CVector &coors, float size, float drawDist, uint8 type,
int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle,
bool longDist, float nearDist)
{
RegisterCorona(id, red, green, blue, alpha, coors, size, drawDist,
gpCoronaTexture[type], flareType, reflection, LOScheck, drawStreak, someAngle);
gpCoronaTexture[type], flareType, reflection, LOScheck, drawStreak, someAngle,
longDist, nearDist);
}
void

View File

@ -90,10 +90,12 @@ public:
static void Update(void);
static void RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 alpha,
const CVector &coors, float size, float drawDist, RwTexture *tex,
int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle);
int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle,
bool longDist = false, float nearClip = 1.5f);
static void RegisterCorona(uint32 id, uint8 red, uint8 green, uint8 blue, uint8 alpha,
const CVector &coors, float size, float drawDist, uint8 type,
int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle);
int8 flareType, uint8 reflection, uint8 LOScheck, uint8 drawStreak, float someAngle,
bool longDist = false, float nearClip = 1.5f);
static void UpdateCoronaCoors(uint32 id, const CVector &coors, float drawDist, float someAngle);
static void Render(void);
static void RenderReflections(void);

View File

@ -1245,9 +1245,11 @@ CRenderer::ShouldModelBeStreamed(CEntity *ent, const CVector &campos)
void
CRenderer::RemoveVehiclePedLights(CEntity *ent, bool reset)
{
if(ent->bRenderScorched)
return;
CPointLights::RemoveLightsAffectingObject();
if(reset)
ReSetAmbientAndDirectionalColours();
if(!ent->bRenderScorched){
CPointLights::RemoveLightsAffectingObject();
if(reset)
ReSetAmbientAndDirectionalColours();
}
SetAmbientColours();
DeActivateDirectional();
}

View File

@ -0,0 +1,8 @@
#include "common.h"
#include "WindModifiers.h"
int32
CWindModifiers::FindWindModifier(CVector pos, float *x, float *y)
{
return 0;
}

View File

@ -0,0 +1,7 @@
#pragma once
class CWindModifiers
{
public:
static int32 FindWindModifier(CVector pos, float *x, float *y);
};