mirror of
https://github.com/halpz/re3.git
synced 2025-07-25 14:32:47 +00:00
Merge branch 'miami' of https://github.com/GTAmodding/re3 into VCSanim
This commit is contained in:
@ -406,16 +406,19 @@ CFont::DrawButton(float x, float y)
|
||||
if (PS2Symbol != BUTTON_NONE) {
|
||||
CRect rect;
|
||||
rect.left = x;
|
||||
rect.top = Details.scaleY + Details.scaleY + y;
|
||||
rect.right = Details.scaleY * 17.0f + x;
|
||||
rect.bottom = Details.scaleY * 19.0f + y;
|
||||
rect.top = RenderState.scaleY + RenderState.scaleY + y;
|
||||
rect.right = RenderState.scaleY * 17.0f + x;
|
||||
rect.bottom = RenderState.scaleY * 19.0f + y;
|
||||
|
||||
int vertexAlphaState;
|
||||
void *raster;
|
||||
RwRenderStateGet(rwRENDERSTATEVERTEXALPHAENABLE, &vertexAlphaState);
|
||||
RwRenderStateGet(rwRENDERSTATETEXTURERASTER, &raster);
|
||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)TRUE);
|
||||
ButtonSprite[PS2Symbol].Draw(rect, CRGBA(255, 255, 255, Details.color.a));
|
||||
if (RenderState.bIsShadow)
|
||||
ButtonSprite[PS2Symbol].Draw(rect, RenderState.color);
|
||||
else
|
||||
ButtonSprite[PS2Symbol].Draw(rect, CRGBA(255, 255, 255, RenderState.color.a));
|
||||
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, raster);
|
||||
RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void *)vertexAlphaState);
|
||||
}
|
||||
@ -585,7 +588,7 @@ CFont::RenderFontBuffer()
|
||||
#ifdef BUTTON_ICONS
|
||||
if(PS2Symbol != BUTTON_NONE) {
|
||||
DrawButton(textPosX, textPosY);
|
||||
textPosX += Details.scaleY * 17.0f;
|
||||
textPosX += RenderState.scaleY * 17.0f;
|
||||
PS2Symbol = BUTTON_NONE;
|
||||
}
|
||||
#endif
|
||||
|
@ -1140,18 +1140,18 @@ void CHud::Draw()
|
||||
if (IntroRect.m_nTextureId >= 0) {
|
||||
CRect rect (
|
||||
IntroRect.m_sRect.left,
|
||||
IntroRect.m_sRect.top,
|
||||
IntroRect.m_sRect.bottom,
|
||||
IntroRect.m_sRect.right,
|
||||
IntroRect.m_sRect.bottom );
|
||||
IntroRect.m_sRect.top );
|
||||
|
||||
CTheScripts::ScriptSprites[IntroRect.m_nTextureId].Draw(rect, IntroRect.m_sColor);
|
||||
}
|
||||
else {
|
||||
CRect rect (
|
||||
IntroRect.m_sRect.left,
|
||||
IntroRect.m_sRect.top,
|
||||
IntroRect.m_sRect.bottom,
|
||||
IntroRect.m_sRect.right,
|
||||
IntroRect.m_sRect.bottom );
|
||||
IntroRect.m_sRect.top );
|
||||
|
||||
CSprite2d::DrawRect(rect, IntroRect.m_sColor);
|
||||
}
|
||||
@ -1172,7 +1172,14 @@ void CHud::Draw()
|
||||
CFont::SetBackgroundColor(CRGBA(0, 0, 0, 128));
|
||||
CFont::SetCentreOn();
|
||||
CFont::SetPropOn();
|
||||
CFont::SetDropShadowPosition(0);
|
||||
#ifdef CUTSCENE_BORDERS_SWITCH
|
||||
if (!FrontEndMenuManager.m_PrefsCutsceneBorders) {
|
||||
CFont::SetDropColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::SetDropShadowPosition(2);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
CFont::SetDropShadowPosition(0);
|
||||
CFont::SetFontStyle(FONT_LOCALE(FONT_STANDARD));
|
||||
CFont::SetColor(CRGBA(225, 225, 225, 255));
|
||||
|
||||
@ -1182,10 +1189,6 @@ void CHud::Draw()
|
||||
onceItWasWidescreen = true;
|
||||
|
||||
if (FrontEndMenuManager.m_PrefsShowSubtitles || !CCutsceneMgr::IsRunning()) {
|
||||
#ifdef CUTSCENE_BORDERS_SWITCH
|
||||
if (!FrontEndMenuManager.m_PrefsCutsceneBorders)
|
||||
CFont::SetDropShadowPosition(2);
|
||||
#endif
|
||||
CFont::SetCentreSize(SCREEN_WIDTH - SCREEN_SCALE_X(60.0f));
|
||||
CFont::SetScale(SCREEN_SCALE_X(0.58f), SCREEN_SCALE_Y(1.2f));
|
||||
CFont::PrintString(SCREEN_WIDTH / 2.f, SCREEN_SCALE_FROM_BOTTOM(80.0f), m_Message);
|
||||
@ -1224,7 +1227,7 @@ void CHud::Draw()
|
||||
m_HelpMessageDisplayTime = CMessages::GetWideStringLength(m_HelpMessage) * 0.05f + 3.0f;
|
||||
|
||||
if (TheCamera.m_ScreenReductionPercentage == 0.0f)
|
||||
DMAudio.PlayFrontEndSound(SOUND_HUD_SOUND, 0);
|
||||
DMAudio.PlayFrontEndSound(SOUND_HUD, 0);
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
|
@ -1394,6 +1394,10 @@ CRenderer::ScanSectorPoly(RwV2d *poly, int32 numVertices, void (*scanfunc)(CPtrL
|
||||
void
|
||||
CRenderer::InsertEntityIntoList(CEntity *ent)
|
||||
{
|
||||
#ifdef FIX_BUGS
|
||||
if (!ent->m_rwObject) return;
|
||||
#endif
|
||||
|
||||
#ifdef NEW_RENDERER
|
||||
// TODO: there are more flags being checked here
|
||||
if(gbNewRenderer && (ent->IsVehicle() || ent->IsPed()))
|
||||
|
@ -73,7 +73,7 @@ RwRaster *gpWaterEnvBaseRaster;
|
||||
RwRaster *gpWaterWakeRaster;
|
||||
|
||||
bool _bSeaLife;
|
||||
float _fWaterZOffset = 0.5f;
|
||||
float _fWaterZOffset = WATER_Z_OFFSET;
|
||||
|
||||
#ifdef PC_WATER
|
||||
float fEnvScale = 0.25f;
|
||||
@ -318,6 +318,7 @@ CWaterLevel::Shutdown()
|
||||
|
||||
_DELETE_TEXTURE(gpWaterTex);
|
||||
_DELETE_TEXTURE(gpWaterEnvTex);
|
||||
_DELETE_TEXTURE(gpWaterWakeTex);
|
||||
_DELETE_TEXTURE(gpWaterEnvBaseTex);
|
||||
|
||||
#undef _DELETE_TEXTURE
|
||||
@ -714,9 +715,9 @@ CWaterLevel::GetWaterLevel(float fX, float fY, float fZ, float *pfOutLevel, bool
|
||||
if ( y < 0 || y >= MAX_SMALL_SECTORS ) return false;
|
||||
#endif
|
||||
|
||||
uint8 nBlock = aWaterFineBlockList[x][y];
|
||||
int8 nBlock = aWaterFineBlockList[x][y];
|
||||
|
||||
if ( nBlock == 0x80 )
|
||||
if ( nBlock == NO_WATER )
|
||||
return false;
|
||||
|
||||
ASSERT( pfOutLevel != nil );
|
||||
@ -756,9 +757,9 @@ CWaterLevel::GetWaterLevelNoWaves(float fX, float fY, float fZ, float *pfOutLeve
|
||||
if ( y < 0 || y >= MAX_SMALL_SECTORS ) return false;
|
||||
#endif
|
||||
|
||||
uint8 nBlock = aWaterFineBlockList[x][y];
|
||||
int8 nBlock = aWaterFineBlockList[x][y];
|
||||
|
||||
if ( nBlock == 0x80 )
|
||||
if ( nBlock == NO_WATER )
|
||||
return false;
|
||||
|
||||
ASSERT( pfOutLevel != nil );
|
||||
@ -1076,7 +1077,7 @@ CWaterLevel::RenderWater()
|
||||
{
|
||||
for ( int32 y = 0; y < 5; y++ )
|
||||
{
|
||||
float fX = WATER_SIGN_X(float(x) * EXTRAHUGE_SECTOR_SIZE) - 1280.0f - 400.0f;
|
||||
float fX = WATER_SIGN_X(float(x) * EXTRAHUGE_SECTOR_SIZE) - 1280.0f - WATER_X_OFFSET;
|
||||
float fY = WATER_SIGN_Y(float(y) * EXTRAHUGE_SECTOR_SIZE) - 1280.0f;
|
||||
|
||||
if ( !bUseCamStartY )
|
||||
@ -1462,7 +1463,7 @@ CWaterLevel::RenderTransparentWater(void)
|
||||
|
||||
int32 nBlock;
|
||||
|
||||
int32 BlockX = WATER_TO_SMALL_SECTOR_X(fCamX + 400.0f) + 1;
|
||||
int32 BlockX = WATER_TO_SMALL_SECTOR_X(fCamX + WATER_X_OFFSET) + 1;
|
||||
int32 BlockY = WATER_TO_SMALL_SECTOR_Y(fCamY) + 1;
|
||||
|
||||
if (_IsColideWithBlock(BlockX, BlockY, nBlock))
|
||||
@ -1472,7 +1473,7 @@ CWaterLevel::RenderTransparentWater(void)
|
||||
float fMaskX = Floor(fCamX / 2.0f) * 2.0f;
|
||||
float fMaskY = Floor(fCamY / 2.0f) * 2.0f;
|
||||
float fWaterZ = CWaterLevel::ms_aWaterZs[nBlock];
|
||||
float fSectorX = WATER_FROM_SMALL_SECTOR_X(BlockX) - 400.0f;
|
||||
float fSectorX = WATER_FROM_SMALL_SECTOR_X(BlockX) - WATER_X_OFFSET;
|
||||
float fSectorY = WATER_FROM_SMALL_SECTOR_Y(BlockY);
|
||||
|
||||
RenderWavyMask(fMaskX, fMaskY, fWaterZ,
|
||||
|
Reference in New Issue
Block a user