mirror of
https://github.com/halpz/re3.git
synced 2025-06-27 03:06:17 +00:00
implemented CutsceneObject; little fixes
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
#include "ModelIndices.h"
|
||||
#include "Streaming.h"
|
||||
#include "Shadows.h"
|
||||
#include "PointLights.h"
|
||||
#include "Renderer.h"
|
||||
|
||||
bool gbShowPedRoadGroups;
|
||||
@ -1153,6 +1154,16 @@ CRenderer::IsVehicleCullZoneVisible(CEntity *ent)
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
CRenderer::RemoveVehiclePedLights(CEntity *ent, bool reset)
|
||||
{
|
||||
if(ent->bRenderScorched)
|
||||
WorldReplaceScorchedLightsWithNormal(Scene.world);
|
||||
CPointLights::RemoveLightsAffectingObject();
|
||||
if(reset)
|
||||
ReSetAmbientAndDirectionalColours();
|
||||
}
|
||||
|
||||
STARTPATCHES
|
||||
InjectHook(0x4A7680, CRenderer::Init, PATCH_JUMP);
|
||||
|
||||
@ -1185,4 +1196,6 @@ STARTPATCHES
|
||||
InjectHook(0x4A9840, CRenderer::ShouldModelBeStreamed, PATCH_JUMP);
|
||||
InjectHook(0x4AAA00, CRenderer::IsEntityCullZoneVisible, PATCH_JUMP);
|
||||
InjectHook(0x4AAAA0, CRenderer::IsVehicleCullZoneVisible, PATCH_JUMP);
|
||||
|
||||
InjectHook(0x4A7CF0, CRenderer::RemoveVehiclePedLights, PATCH_JUMP);
|
||||
ENDPATCHES
|
||||
|
@ -56,4 +56,6 @@ public:
|
||||
static bool ShouldModelBeStreamed(CEntity *ent);
|
||||
static bool IsEntityCullZoneVisible(CEntity *ent);
|
||||
static bool IsVehicleCullZoneVisible(CEntity *ent);
|
||||
|
||||
static void RemoveVehiclePedLights(CEntity *ent, bool reset);
|
||||
};
|
||||
|
@ -6,4 +6,5 @@ WRAPPER void CShadows::AddPermanentShadow(unsigned char ShadowType, RwTexture* p
|
||||
WRAPPER void CShadows::RenderStaticShadows(void) { EAXJMP(0x5145F0); }
|
||||
WRAPPER void CShadows::RenderStoredShadows(void) { EAXJMP(0x514010); }
|
||||
WRAPPER void CShadows::RenderExtraPlayerShadows(void) { EAXJMP(0x516F90); }
|
||||
WRAPPER void CShadows::CalcPedShadowValues(CVector light, float *frontX, float *frontY, float *sideX, float *sideY, float *dispX, float *dispY) { EAXJMP(0x516EB0); }
|
||||
WRAPPER void CShadows::CalcPedShadowValues(CVector light, float *frontX, float *frontY, float *sideX, float *sideY, float *dispX, float *dispY) { EAXJMP(0x516EB0); }
|
||||
WRAPPER void CShadows::StoreShadowForPedObject(CEntity *ent, float dispX, float dispY, float frontX, float frontY, float sideX, float sideY) { EAXJMP(0x513CB0); }
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
struct RwTexture;
|
||||
class CEntity;
|
||||
|
||||
class CShadows
|
||||
{
|
||||
@ -10,4 +11,5 @@ public:
|
||||
static void RenderStoredShadows(void);
|
||||
static void RenderExtraPlayerShadows(void);
|
||||
static void CalcPedShadowValues(CVector light, float *frontX, float *frontY, float *sideX, float *sideY, float *dispX, float *dispY);
|
||||
static void StoreShadowForPedObject(CEntity *ent, float dispX, float dispY, float frontX, float frontY, float sideX, float sideY);
|
||||
};
|
||||
|
@ -145,7 +145,7 @@ CSprite2d::Draw(const CRect &rect, const CRGBA &c0, const CRGBA &c1, const CRGBA
|
||||
void
|
||||
CSprite2d::Draw(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, const CRGBA &col)
|
||||
{
|
||||
SetVertices(x1, y2, x2, y2, x3, y3, x4, y4, col, col, col, col);
|
||||
SetVertices(x1, y1, x2, y2, x3, y3, x4, y4, col, col, col, col);
|
||||
SetRenderState();
|
||||
RwIm2DRenderPrimitive(rwPRIMTYPETRIFAN, CSprite2d::maVertices, 4);
|
||||
}
|
||||
|
Reference in New Issue
Block a user