1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Fix: scrolling intro background switches colour halfway through

This commit is contained in:
Gymnasiast
2025-10-16 13:51:08 +02:00
parent 063a3118e2
commit 739d83e321
3 changed files with 13 additions and 10 deletions

View File

@@ -11,6 +11,7 @@
- Fix: [#25299] The Mine Train Coaster left large helix draws incorrect sprites at certain angles (original bug). - Fix: [#25299] The Mine Train Coaster left large helix draws incorrect sprites at certain angles (original bug).
- Fix: [#25328] Spiral Slide in Blackpool Pleasure Beach has its entrance and exit the wrong way round (bug in the original scenario). - Fix: [#25328] Spiral Slide in Blackpool Pleasure Beach has its entrance and exit the wrong way round (bug in the original scenario).
- Fix: [#25342] The Go-Karts medium right gentle sloped turn does not have a tunnel at the end. - Fix: [#25342] The Go-Karts medium right gentle sloped turn does not have a tunnel at the end.
- Fix: [#25350] The scrolling intro background switches colour halfway through (original bug).
- Fix: [#25358] The Stand Up Roller Coaster left corkscrew does not block supports correctly. - Fix: [#25358] The Stand Up Roller Coaster left corkscrew does not block supports correctly.
- Fix: [#25363] The Mine Train Coaster flat-to-steep track pieces do not block all metal supports. - Fix: [#25363] The Mine Train Coaster flat-to-steep track pieces do not block all metal supports.
- Fix: [#25369] The Go-Karts medium turns and small flat and sloped turns do not block metal supports correctly. - Fix: [#25369] The Go-Karts medium turns and small flat and sloped turns do not block metal supports correctly.

View File

@@ -703,9 +703,11 @@ void GfxTransposePalette(int32_t pal, uint8_t product)
for (; width > 0; width--) for (; width > 0; width--)
{ {
auto& dest_pointer = gGamePalette[x]; auto& dest_pointer = gGamePalette[x];
dest_pointer.Blue = (source_pointer[0] * product) >> 8; // Make sure the image never gets darker than the void colour (not-quite-block), to the background colour jumping
dest_pointer.Green = (source_pointer[1] * product) >> 8; // between void and 100% black.
dest_pointer.Red = (source_pointer[2] * product) >> 8; dest_pointer.Blue = std::max<uint8_t>(35, ((source_pointer[0] * product) >> 8));
dest_pointer.Green = std::max<uint8_t>(35, ((source_pointer[1] * product) >> 8));
dest_pointer.Red = std::max<uint8_t>(23, ((source_pointer[2] * product) >> 8));
source_pointer += 3; source_pointer += 3;
x++; x++;

View File

@@ -27,8 +27,8 @@ namespace OpenRCT2
static constexpr PaletteIndex kBackgroundColourLogo = PaletteIndex::pi245; static constexpr PaletteIndex kBackgroundColourLogo = PaletteIndex::pi245;
static constexpr PaletteIndex kBorderColourPublisher = PaletteIndex::pi129; static constexpr PaletteIndex kBorderColourPublisher = PaletteIndex::pi129;
constexpr int32_t PALETTE_G1_IDX_DEVELOPER = 23217; static constexpr ImageIndex kPaletteChrisSawyerLogo = 23217;
constexpr int32_t PALETTE_G1_IDX_LOGO = 23224; static constexpr ImageIndex kPaletteRCT2Logo = 23224;
static IntroState _introState; static IntroState _introState;
@@ -220,7 +220,7 @@ namespace OpenRCT2
break; break;
case IntroState::DeveloperBegin: case IntroState::DeveloperBegin:
GfxClear(rt, kBackgroundColourDark); GfxClear(rt, kBackgroundColourDark);
GfxTransposePalette(PALETTE_G1_IDX_DEVELOPER, 255); GfxTransposePalette(kPaletteChrisSawyerLogo, 255);
break; break;
case IntroState::DeveloperScroll: case IntroState::DeveloperScroll:
GfxClear(rt, kBackgroundColourDark); GfxClear(rt, kBackgroundColourDark);
@@ -232,11 +232,11 @@ namespace OpenRCT2
case IntroState::LogoFadeIn: case IntroState::LogoFadeIn:
if (_introStateCounter <= 0xFF00) if (_introStateCounter <= 0xFF00)
{ {
GfxTransposePalette(PALETTE_G1_IDX_LOGO, (_introStateCounter >> 8) & 0xFF); GfxTransposePalette(kPaletteRCT2Logo, (_introStateCounter >> 8) & 0xFF);
} }
else else
{ {
GfxTransposePalette(PALETTE_G1_IDX_LOGO, 255); GfxTransposePalette(kPaletteRCT2Logo, 255);
} }
ScreenIntroDrawLogo(rt); ScreenIntroDrawLogo(rt);
break; break;
@@ -246,11 +246,11 @@ namespace OpenRCT2
case IntroState::LogoFadeOut: case IntroState::LogoFadeOut:
if (_introStateCounter >= 0) if (_introStateCounter >= 0)
{ {
GfxTransposePalette(PALETTE_G1_IDX_LOGO, (_introStateCounter >> 8) & 0xFF); GfxTransposePalette(kPaletteRCT2Logo, (_introStateCounter >> 8) & 0xFF);
} }
else else
{ {
GfxTransposePalette(PALETTE_G1_IDX_LOGO, 0); GfxTransposePalette(kPaletteRCT2Logo, 0);
} }
ScreenIntroDrawLogo(rt); ScreenIntroDrawLogo(rt);
break; break;