summaryrefslogtreecommitdiff
path: root/src/rw
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-02-16 18:08:19 +0200
committerSergeanur <s.anureev@yandex.ua>2021-02-16 18:08:19 +0200
commite38467ef3affef25b83daf0c0c3b8a61f04e8a65 (patch)
tree3628aed1314f21147e7a46f3095fa341088d8044 /src/rw
parent78f4e8fdcab597e2fadfa605c351486663f96a14 (diff)
parentb451be6c7f354c5faef204085402ee19a5dd4d44 (diff)
Merge remote-tracking branch 'origin/miami' into lcs
# Conflicts: # .github/workflows/reLCS_msvc_amd64.yml # .github/workflows/reLCS_msvc_x86.yml # README.md # gamefiles/TEXT/american.gxt # gamefiles/TEXT/french.gxt # gamefiles/TEXT/german.gxt # gamefiles/TEXT/italian.gxt # gamefiles/TEXT/spanish.gxt # premake5.lua # src/animation/AnimManager.cpp # src/animation/AnimationId.h # src/audio/MusicManager.cpp # src/audio/audio_enums.h # src/control/Script7.cpp # src/core/FileLoader.cpp # src/core/re3.cpp # src/extras/custompipes_d3d9.cpp # src/extras/custompipes_gl.cpp # src/extras/postfx.cpp # src/extras/shaders/colourfilterVC.frag # src/extras/shaders/colourfilterVC_PS.hlsl # src/extras/shaders/make_hlsl.cmd # src/extras/shaders/obj/colourfilterVC_PS.cso # src/extras/shaders/obj/colourfilterVC_PS.inc # src/extras/shaders/obj/colourfilterVC_frag.inc # src/peds/PedFight.cpp # src/render/Font.cpp # src/render/Hud.cpp # src/render/Particle.cpp # src/render/WaterCannon.cpp # src/skel/win/gtavc.ico # src/vehicles/Automobile.cpp # utils/gxt/american.txt # utils/gxt/french.txt # utils/gxt/german.txt # utils/gxt/italian.txt # utils/gxt/spanish.txt
Diffstat (limited to 'src/rw')
-rw-r--r--src/rw/TexRead.cpp9
-rw-r--r--src/rw/VisibilityPlugins.cpp4
2 files changed, 13 insertions, 0 deletions
diff --git a/src/rw/TexRead.cpp b/src/rw/TexRead.cpp
index 632cec02..1f96180b 100644
--- a/src/rw/TexRead.cpp
+++ b/src/rw/TexRead.cpp
@@ -1,6 +1,7 @@
#pragma warning( push )
#pragma warning( disable : 4005)
#pragma warning( pop )
+#define FORCE_PC_SCALING
#ifndef LIBRW
#define WITHD3D
#endif
@@ -320,7 +321,11 @@ ConvertingTexturesScreen(uint32 num, uint32 count, const char *text)
splash->Draw(CRect(0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT), CRGBA(255, 255, 255, 255));
CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(240.0f), SCREEN_SCALE_FROM_RIGHT(200.0f), SCREEN_SCALE_Y(248.0f)), CRGBA(64, 64, 64, 255));
+#ifdef FIX_BUGS
+ CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(240.0f), (SCREEN_SCALE_FROM_RIGHT(200.0f) - SCREEN_SCALE_X(200.0f)) * ((float)num / (float)count) + SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(248.0f)), CRGBA(255, 150, 225, 255));
+#else
CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(240.0f), (SCREEN_SCALE_FROM_RIGHT(200.0f) - SCREEN_SCALE_X(200.0f)) * ((float)num / (float)count) + SCREEN_SCALE_X(200.0f), SCREEN_SCALE_Y(248.0f)), CRGBA(255, 217, 106, 255));
+#endif
CSprite2d::DrawRect(CRect(SCREEN_SCALE_X(120.0f), SCREEN_SCALE_Y(150.0f), SCREEN_SCALE_FROM_RIGHT(120.0f), SCREEN_HEIGHT - SCREEN_SCALE_Y(220.0f)), CRGBA(50, 50, 50, 210));
CFont::SetBackgroundOff();
@@ -329,7 +334,11 @@ ConvertingTexturesScreen(uint32 num, uint32 count, const char *text)
CFont::SetCentreOff();
CFont::SetWrapx(SCREEN_SCALE_FROM_RIGHT(170.0f));
CFont::SetJustifyOff();
+#ifdef FIX_BUGS
+ CFont::SetColor(CRGBA(255, 150, 225, 255));
+#else
CFont::SetColor(CRGBA(255, 217, 106, 255));
+#endif
CFont::SetBackGroundOnlyTextOff();
CFont::SetFontStyle(FONT_STANDARD);
CFont::PrintString(SCREEN_SCALE_X(170.0f), SCREEN_SCALE_Y(160.0f), TheText.Get(text));
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp
index 754c8778..69e30c1b 100644
--- a/src/rw/VisibilityPlugins.cpp
+++ b/src/rw/VisibilityPlugins.cpp
@@ -96,6 +96,10 @@ CVisibilityPlugins::InitAlphaEntityList(void)
bool
CVisibilityPlugins::InsertEntityIntoSortedList(CEntity *e, float dist)
{
+#ifdef FIX_BUGS
+ if (!e->m_rwObject) return true;
+#endif
+
AlphaObjectInfo item;
item.entity = e;
item.sort = dist;