Glass cosmetic fixes

This commit is contained in:
Fire_Head 2020-04-02 05:37:22 +03:00 committed by GitHub
parent 13fb853fd8
commit c394bd2a6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ CFallingGlassPane CGlass::aGlassPanes[NUM_GLASSPANES];
CVector2D CentersWithTriangle[NUM_GLASSTRIANGLES]; CVector2D CentersWithTriangle[NUM_GLASSTRIANGLES];
CVector2D CoorsWithTriangle[NUM_GLASSTRIANGLES][3] = const CVector2D CoorsWithTriangle[NUM_GLASSTRIANGLES][3] =
{ {
{ {
CVector2D(0.0f, 0.0f), CVector2D(0.0f, 0.0f),
@ -116,7 +116,7 @@ CFallingGlassPane::Update(void)
CParticle::AddParticle(PARTICLE_CAR_DEBRIS, CParticle::AddParticle(PARTICLE_CAR_DEBRIS,
pos, pos,
dir, dir,
NULL, nil,
CGeneral::GetRandomNumberInRange(0.02f, 0.2f), CGeneral::GetRandomNumberInRange(0.02f, 0.2f),
color, color,
CGeneral::GetRandomNumberInRange(-40, 40), CGeneral::GetRandomNumberInRange(-40, 40),
@ -287,7 +287,7 @@ CGlass::FindFreePane(void)
return &aGlassPanes[i]; return &aGlassPanes[i];
} }
return NULL; return nil;
} }
void void
@ -539,7 +539,7 @@ CGlass::RenderHiLightPolys(void)
LittleTest(); LittleTest();
if ( RwIm3DTransform(TempBufferRenderVertices, TempBufferVerticesStoredHiLight, NULL, rwIM3D_VERTEXUV) ) if ( RwIm3DTransform(TempBufferRenderVertices, TempBufferVerticesStoredHiLight, nil, rwIM3D_VERTEXUV) )
{ {
RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, TempBufferRenderIndexList, TempBufferIndicesStoredHiLight); RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, TempBufferRenderIndexList, TempBufferIndicesStoredHiLight);
RwIm3DEnd(); RwIm3DEnd();
@ -561,7 +561,7 @@ CGlass::RenderShatteredPolys(void)
LittleTest(); LittleTest();
if ( RwIm3DTransform(&TempBufferRenderVertices[TEMPBUFFERVERTSHATTEREDOFFSET], TempBufferVerticesStoredShattered - TEMPBUFFERVERTSHATTEREDOFFSET, NULL, rwIM3D_VERTEXUV) ) if ( RwIm3DTransform(&TempBufferRenderVertices[TEMPBUFFERVERTSHATTEREDOFFSET], TempBufferVerticesStoredShattered - TEMPBUFFERVERTSHATTEREDOFFSET, nil, rwIM3D_VERTEXUV) )
{ {
RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, &TempBufferRenderIndexList[TEMPBUFFERINDEXSHATTEREDOFFSET], TempBufferIndicesStoredShattered - TEMPBUFFERINDEXSHATTEREDOFFSET); RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, &TempBufferRenderIndexList[TEMPBUFFERINDEXSHATTEREDOFFSET], TempBufferIndicesStoredShattered - TEMPBUFFERINDEXSHATTEREDOFFSET);
RwIm3DEnd(); RwIm3DEnd();
@ -583,7 +583,7 @@ CGlass::RenderReflectionPolys(void)
LittleTest(); LittleTest();
if ( RwIm3DTransform(&TempBufferRenderVertices[TEMPBUFFERVERTREFLECTIONOFFSET], TempBufferVerticesStoredReflection - TEMPBUFFERVERTREFLECTIONOFFSET, NULL, rwIM3D_VERTEXUV) ) if ( RwIm3DTransform(&TempBufferRenderVertices[TEMPBUFFERVERTREFLECTIONOFFSET], TempBufferVerticesStoredReflection - TEMPBUFFERVERTREFLECTIONOFFSET, nil, rwIM3D_VERTEXUV) )
{ {
RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, &TempBufferRenderIndexList[TEMPBUFFERINDEXREFLECTIONOFFSET], TempBufferIndicesStoredReflection - TEMPBUFFERINDEXREFLECTIONOFFSET); RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, &TempBufferRenderIndexList[TEMPBUFFERINDEXREFLECTIONOFFSET], TempBufferIndicesStoredReflection - TEMPBUFFERINDEXREFLECTIONOFFSET);
RwIm3DEnd(); RwIm3DEnd();
@ -718,4 +718,4 @@ STARTPATCHES
//InjectHook(0x504880, `global constructor keyed to'glass.cpp, PATCH_JUMP); //InjectHook(0x504880, `global constructor keyed to'glass.cpp, PATCH_JUMP);
//InjectHook(0x5048D0, CFallingGlassPane::~CFallingGlassPane, PATCH_JUMP); //InjectHook(0x5048D0, CFallingGlassPane::~CFallingGlassPane, PATCH_JUMP);
//InjectHook(0x5048E0, CFallingGlassPane::CFallingGlassPane, PATCH_JUMP); //InjectHook(0x5048E0, CFallingGlassPane::CFallingGlassPane, PATCH_JUMP);
ENDPATCHES ENDPATCHES