mirror of
https://github.com/halpz/re3.git
synced 2025-07-25 12:12:47 +00:00
PlayerInfo functions reordered into original order, FindPlayer... functions moved to PlayerInfo, improved CVector <-> RwV3d conversion, small fixes
This commit is contained in:
@ -133,7 +133,7 @@ CClouds::Render(void)
|
||||
CSprite::InitSpriteBuffer();
|
||||
|
||||
int minute = CClock::GetHours()*60 + CClock::GetMinutes();
|
||||
RwV3d campos = *(RwV3d*)&TheCamera.GetPosition();
|
||||
RwV3d campos = TheCamera.GetPosition();
|
||||
|
||||
// Moon
|
||||
int moonfadeout = Abs(minute - 180); // fully visible at 3AM
|
||||
|
@ -255,7 +255,7 @@ CCoronas::Render(void)
|
||||
|
||||
CVector spriteCoors;
|
||||
float spritew, spriteh;
|
||||
if(!CSprite::CalcScreenCoors(aCoronas[i].coors, spriteCoors, &spritew, &spriteh, true)){
|
||||
if(!CSprite::CalcScreenCoors(aCoronas[i].coors, &spriteCoors, &spritew, &spriteh, true)){
|
||||
aCoronas[i].offScreen = true;
|
||||
aCoronas[i].sightClear = false;
|
||||
}else{
|
||||
@ -464,7 +464,7 @@ CCoronas::RenderReflections(void)
|
||||
|
||||
CVector spriteCoors;
|
||||
float spritew, spriteh;
|
||||
if(CSprite::CalcScreenCoors(coors, spriteCoors, &spritew, &spriteh, true)){
|
||||
if(CSprite::CalcScreenCoors(coors, &spriteCoors, &spritew, &spriteh, true)){
|
||||
float drawDist = 0.75f * aCoronas[i].drawDist;
|
||||
drawDist = Min(drawDist, 55.0f);
|
||||
if(spriteCoors.z < drawDist){
|
||||
@ -531,7 +531,7 @@ CCoronas::DoSunAndMoon(void)
|
||||
|
||||
CVector spriteCoors;
|
||||
float spritew, spriteh;
|
||||
if(CSprite::CalcScreenCoors(sunCoors, spriteCoors, &spritew, &spriteh, true)){
|
||||
if(CSprite::CalcScreenCoors(sunCoors, &spriteCoors, &spritew, &spriteh, true)){
|
||||
SunScreenX = spriteCoors.x;
|
||||
SunScreenY = spriteCoors.y;
|
||||
}else{
|
||||
|
@ -655,7 +655,7 @@ void CScrollBar::Render()
|
||||
RwRenderStateSet(rwRENDERSTATEZTESTENABLE, (void*)TRUE);
|
||||
|
||||
CVector coronaCoord, screenCoord;
|
||||
float screenW, screenH;
|
||||
float screenW, screenH;
|
||||
for (int i = 1; i < ARRAY_SIZE(m_MessageBar); ++i)
|
||||
{
|
||||
for (int j = 0; j < 5; ++j)
|
||||
@ -667,7 +667,7 @@ void CScrollBar::Render()
|
||||
// Render main coronas
|
||||
if (m_MessageBar[i] & (1 << j))
|
||||
{
|
||||
if (CSprite::CalcScreenCoors(coronaCoord, screenCoord, &screenW, &screenH, true))
|
||||
if (CSprite::CalcScreenCoors(coronaCoord, &screenCoord, &screenW, &screenH, true))
|
||||
{
|
||||
CSprite::RenderBufferedOneXLUSprite(
|
||||
screenCoord.x, screenCoord.y, screenCoord.z,
|
||||
@ -679,7 +679,7 @@ void CScrollBar::Render()
|
||||
// Render smaller and faded coronas for a trailing effect
|
||||
else if (m_MessageBar[i - 1] & (1 << j))
|
||||
{
|
||||
if (CSprite::CalcScreenCoors(coronaCoord, screenCoord, &screenW, &screenH, true))
|
||||
if (CSprite::CalcScreenCoors(coronaCoord, &screenCoord, &screenW, &screenH, true))
|
||||
{
|
||||
CSprite::RenderBufferedOneXLUSprite(
|
||||
screenCoord.x, screenCoord.y, screenCoord.z,
|
||||
@ -834,7 +834,7 @@ void CDigitalClock::Render()
|
||||
const char* clockMessage = FindDigitalClockMessage();
|
||||
|
||||
CVector coronaCoord, screenCoord;
|
||||
float screenW, screenH;
|
||||
float screenW, screenH;
|
||||
for (int c = 0; c < 5; ++c) // for each char to be displayed
|
||||
{
|
||||
for (int i = 0; i < 5; ++i) // for each column of coronas
|
||||
@ -847,7 +847,7 @@ void CDigitalClock::Render()
|
||||
coronaCoord.y = m_Position.y + (8 * c + i) * m_Size.y * m_fScale / 8.0f;
|
||||
coronaCoord.z = m_Position.z + j * m_fScale / 8.0f;
|
||||
|
||||
if (CSprite::CalcScreenCoors(coronaCoord, screenCoord, &screenW, &screenH, true))
|
||||
if (CSprite::CalcScreenCoors(coronaCoord, &screenCoord, &screenW, &screenH, true))
|
||||
{
|
||||
CSprite::RenderBufferedOneXLUSprite(
|
||||
screenCoord.x, screenCoord.y, screenCoord.z,
|
||||
|
@ -1570,7 +1570,7 @@ void CParticle::Render()
|
||||
float w;
|
||||
float h;
|
||||
|
||||
if ( CSprite::CalcScreenCoors(particle->m_vecPosition, coors, &w, &h, true) )
|
||||
if ( CSprite::CalcScreenCoors(particle->m_vecPosition, &coors, &w, &h, true) )
|
||||
{
|
||||
#ifdef PC_PARTICLE
|
||||
if ( (!particleBanned || SCREEN_WIDTH * fParticleScaleLimit >= w)
|
||||
@ -1650,7 +1650,7 @@ void CParticle::Render()
|
||||
float fRotation;
|
||||
float fTrailLength;
|
||||
|
||||
if ( CSprite::CalcScreenCoors(vecPrevPos, particle->m_vecScreenPosition, &fTrailLength, &fRotation, true) )
|
||||
if ( CSprite::CalcScreenCoors(vecPrevPos, &particle->m_vecScreenPosition, &fTrailLength, &fRotation, true) )
|
||||
{
|
||||
CVector2D vecDist
|
||||
(
|
||||
|
@ -218,7 +218,7 @@ CPointLights::RenderFogEffect(void)
|
||||
// more intensity the closer to line
|
||||
intensity *= 1.0f - sq(Sqrt(linedistsq) / FOG_AREA_WIDTH);
|
||||
|
||||
if(CSprite::CalcScreenCoors(fogcoors, spriteCoors, &spritew, &spriteh, true)){
|
||||
if(CSprite::CalcScreenCoors(fogcoors, &spriteCoors, &spritew, &spriteh, true)){
|
||||
float rotation = (CTimer::GetTimeInMilliseconds()&0x1FFF) * 2*3.14f / 0x2000;
|
||||
float size = FogSizes[r>>1];
|
||||
CSprite::RenderOneXLUSprite_Rotate_Aspect(spriteCoors.x, spriteCoors.y, spriteCoors.z,
|
||||
@ -267,7 +267,7 @@ CPointLights::RenderFogEffect(void)
|
||||
intensity *= 1.0f - sq(lightdist / FOG_AREA_RADIUS);
|
||||
|
||||
CVector fogcoors(xi, yi, point.point.z + 1.6f);
|
||||
if(CSprite::CalcScreenCoors(fogcoors, spriteCoors, &spritew, &spriteh, true)){
|
||||
if(CSprite::CalcScreenCoors(fogcoors, &spriteCoors, &spritew, &spriteh, true)){
|
||||
float rotation = (CTimer::GetTimeInMilliseconds()&0x3FFF) * 2*3.14f / 0x4000;
|
||||
float size = FogSizes[r>>1];
|
||||
CSprite::RenderOneXLUSprite_Rotate_Aspect(spriteCoors.x, spriteCoors.y, spriteCoors.z,
|
||||
|
@ -741,7 +741,7 @@ CRenderer::ScanWorld(void)
|
||||
vectors[CORNER_PRIO_RIGHT].x = vectors[CORNER_LOD_RIGHT].x * 0.2f;
|
||||
vectors[CORNER_PRIO_RIGHT].y = vectors[CORNER_LOD_RIGHT].y * 0.2f;
|
||||
vectors[CORNER_PRIO_RIGHT].z = vectors[CORNER_LOD_RIGHT].z;
|
||||
RwV3dTransformPoints((RwV3d*)vectors, (RwV3d*)vectors, 9, cammatrix);
|
||||
RwV3dTransformPoints(vectors, vectors, 9, cammatrix);
|
||||
|
||||
m_loadingPriority = false;
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN ||
|
||||
@ -881,7 +881,7 @@ CRenderer::RequestObjectsInFrustum(void)
|
||||
vectors[CORNER_PRIO_RIGHT].x = vectors[CORNER_LOD_RIGHT].x * 0.2f;
|
||||
vectors[CORNER_PRIO_RIGHT].y = vectors[CORNER_LOD_RIGHT].y * 0.2f;
|
||||
vectors[CORNER_PRIO_RIGHT].z = vectors[CORNER_LOD_RIGHT].z;
|
||||
RwV3dTransformPoints((RwV3d*)vectors, (RwV3d*)vectors, 9, cammatrix);
|
||||
RwV3dTransformPoints(vectors, vectors, 9, cammatrix);
|
||||
|
||||
if(TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN ||
|
||||
#ifdef FIX_BUGS
|
||||
|
@ -359,7 +359,7 @@ void CWeather::AddRain()
|
||||
RwCameraGetFarClipPlane(TheCamera.m_pRwCamera) / (RwCameraGetFarClipPlane(TheCamera.m_pRwCamera) * *(CVector2D*)RwCameraGetViewWindow(TheCamera.m_pRwCamera)).Magnitude();
|
||||
splash_points[3] = 4.0f * CVector(RwCameraGetViewWindow(TheCamera.m_pRwCamera)->x, RwCameraGetViewWindow(TheCamera.m_pRwCamera)->y, 1.0f) *
|
||||
RwCameraGetFarClipPlane(TheCamera.m_pRwCamera) / (RwCameraGetFarClipPlane(TheCamera.m_pRwCamera) * *(CVector2D*)RwCameraGetViewWindow(TheCamera.m_pRwCamera)).Magnitude();
|
||||
RwV3dTransformPoints((RwV3d*)splash_points, (RwV3d*)splash_points, 4, RwFrameGetMatrix(RwCameraGetFrame(TheCamera.m_pRwCamera)));
|
||||
RwV3dTransformPoints(splash_points, splash_points, 4, RwFrameGetMatrix(RwCameraGetFrame(TheCamera.m_pRwCamera)));
|
||||
CVector fp = (splash_points[0] + splash_points[1] + splash_points[2] + splash_points[3]) / 4;
|
||||
for (int i = 0; i < num_splash_attempts; i++) {
|
||||
CColPoint point;
|
||||
|
Reference in New Issue
Block a user