实体

阴影 CShadows

地面影、车灯影与永久影

CShadows.h

地面影、车灯影、永久影。绘制相关,注意调用时机。

存待绘影子

StoreShadowToBeRendered

两套重载(贴图 / 纹理类型)。

static void StoreShadowToBeRendered(unsigned char type, RwTexture* texture, CVector const* posn,
    float topX, float topY, float rightX, float rightY, short intensity, unsigned char red, unsigned char green, unsigned char blue,
    float zDistance, bool drawOnWater, float scale, CRealTimeShadow* realTimeShadow, bool drawOnBuildings);
static void StoreShadowToBeRendered(unsigned char shadowTextureType, CVector const* posn,
    float frontX, float frontY, float sideX, float sideY, short intensity, unsigned char red, unsigned char green, unsigned char blue);

静态 / 永久影

StoreStaticShadow / AddPermanentShadow
static bool StoreStaticShadow(unsigned int id, unsigned char type, RwTexture* texture, CVector* posn,
    float frontX, float frontY, float sideX, float sideY, short intensity, unsigned char red, unsigned char green, unsigned char blue,
    float zDistane, float scale, float drawDistance, bool temporaryShadow, float upDistance);
static void AddPermanentShadow(unsigned char type, RwTexture* texture, CVector* posn,
    float topX, float topY, float rightX, float rightY, short intensity, unsigned char red, unsigned char greeb, unsigned char blue,
    float drawDistance, unsigned int time, float upDistance);
static void UpdateStaticShadows();
static void UpdatePermanentShadows();

实体影

StoreShadowForVehicle / StoreShadowForPedObject
static void StoreShadowForVehicle(CVehicle* vehicle, VEH_SHD_TYPE vehShadowType);
static void StoreShadowForPedObject(CEntity* ped, float displacementX, float displacementY, float frontX, float frontY, float sideX, float sideY);
static void StoreCarLightShadow(CVehicle* vehicle, int id, RwTexture* texture, CVector* posn,
    float frontX, float frontY, float sideX, float sideY, unsigned char red, unsigned char green, unsigned char blue, float maxViewAngle);
static void StoreRealTimeShadow(CPhysical* physical, float displacementX, float displacementY, float frontX, float frontY, float sideX, float sideY);

指示标影子

RenderIndicatorShadow

任务标记类投影。

static void RenderIndicatorShadow(unsigned int id, unsigned char shadowType, RwTexture* texture, CVector* posn,
    float frontX, float frontY, float sideX, float sideY, short intensity);

清理与油渍

TidyUpShadows / RemoveOilInArea
static void TidyUpShadows();
static void RemoveOilInArea(float x1, float y1, float x2, float y2);
static void GunShotSetsOilOnFire(CVector const* shotOrigin, CVector const* shotTarget);

全局缓冲

asShadowsStored / aStaticShadows / aPermanentShadows
static CRegisteredShadow* asShadowsStored;
static CStaticShadow* aStaticShadows;
static CPermanentShadow* aPermanentShadows;
// MAX_STORED_SHADOWS 等 extern

On this page