mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Merge pull request #25350 from Gymnasiast/fix/scrolling-intro
Fix: scrolling intro background switches colour halfway through
This commit is contained in:
@@ -11,6 +11,9 @@
|
||||
- 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: [#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: [#25350] When skipping the scrolling intro, the screen does not get cleared properly.
|
||||
- Fix: [#25350] Scrolling intro cannot be skipped using a mouse click.
|
||||
- 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: [#25369] The Go-Karts medium turns and small flat and sloped turns do not block metal supports correctly.
|
||||
|
||||
@@ -703,9 +703,11 @@ void GfxTransposePalette(int32_t pal, uint8_t product)
|
||||
for (; width > 0; width--)
|
||||
{
|
||||
auto& dest_pointer = gGamePalette[x];
|
||||
dest_pointer.Blue = (source_pointer[0] * product) >> 8;
|
||||
dest_pointer.Green = (source_pointer[1] * product) >> 8;
|
||||
dest_pointer.Red = (source_pointer[2] * product) >> 8;
|
||||
// Make sure the image never gets darker than the void colour (not-quite-block), to the background colour jumping
|
||||
// between void and 100% black.
|
||||
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;
|
||||
|
||||
x++;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "../../Context.h"
|
||||
#include "../../Input.h"
|
||||
#include "../../OpenRCT2.h"
|
||||
#include "../../SpriteIds.h"
|
||||
#include "../../audio/Audio.h"
|
||||
#include "../../audio/AudioChannel.h"
|
||||
@@ -27,8 +28,8 @@ namespace OpenRCT2
|
||||
static constexpr PaletteIndex kBackgroundColourLogo = PaletteIndex::pi245;
|
||||
static constexpr PaletteIndex kBorderColourPublisher = PaletteIndex::pi129;
|
||||
|
||||
constexpr int32_t PALETTE_G1_IDX_DEVELOPER = 23217;
|
||||
constexpr int32_t PALETTE_G1_IDX_LOGO = 23224;
|
||||
static constexpr ImageIndex kPaletteChrisSawyerLogo = 23217;
|
||||
static constexpr ImageIndex kPaletteRCT2Logo = 23224;
|
||||
|
||||
static IntroState _introState;
|
||||
|
||||
@@ -67,11 +68,6 @@ namespace OpenRCT2
|
||||
|
||||
switch (_introState)
|
||||
{
|
||||
case IntroState::Disclaimer1:
|
||||
case IntroState::Disclaimer2:
|
||||
// Originally used for the disclaimer text
|
||||
_introState = IntroState::PublisherBegin;
|
||||
[[fallthrough]];
|
||||
case IntroState::PublisherBegin:
|
||||
LoadPalette();
|
||||
|
||||
@@ -174,9 +170,12 @@ namespace OpenRCT2
|
||||
_soundChannel = nullptr;
|
||||
}
|
||||
|
||||
// Move to next part
|
||||
_introState = IntroState::Finish;
|
||||
_introStateCounter = 0;
|
||||
if (gOpenRCT2Headless)
|
||||
{
|
||||
// Move to next part
|
||||
_introState = IntroState::Finish;
|
||||
_introStateCounter = 0;
|
||||
}
|
||||
break;
|
||||
case IntroState::Finish:
|
||||
{
|
||||
@@ -195,9 +194,6 @@ namespace OpenRCT2
|
||||
|
||||
switch (_introState)
|
||||
{
|
||||
case IntroState::Disclaimer1:
|
||||
case IntroState::Disclaimer2:
|
||||
break;
|
||||
case IntroState::PublisherBegin:
|
||||
GfxClear(rt, kBackgroundColourDark);
|
||||
break;
|
||||
@@ -220,7 +216,7 @@ namespace OpenRCT2
|
||||
break;
|
||||
case IntroState::DeveloperBegin:
|
||||
GfxClear(rt, kBackgroundColourDark);
|
||||
GfxTransposePalette(PALETTE_G1_IDX_DEVELOPER, 255);
|
||||
GfxTransposePalette(kPaletteChrisSawyerLogo, 255);
|
||||
break;
|
||||
case IntroState::DeveloperScroll:
|
||||
GfxClear(rt, kBackgroundColourDark);
|
||||
@@ -232,11 +228,11 @@ namespace OpenRCT2
|
||||
case IntroState::LogoFadeIn:
|
||||
if (_introStateCounter <= 0xFF00)
|
||||
{
|
||||
GfxTransposePalette(PALETTE_G1_IDX_LOGO, (_introStateCounter >> 8) & 0xFF);
|
||||
GfxTransposePalette(kPaletteRCT2Logo, (_introStateCounter >> 8) & 0xFF);
|
||||
}
|
||||
else
|
||||
{
|
||||
GfxTransposePalette(PALETTE_G1_IDX_LOGO, 255);
|
||||
GfxTransposePalette(kPaletteRCT2Logo, 255);
|
||||
}
|
||||
ScreenIntroDrawLogo(rt);
|
||||
break;
|
||||
@@ -246,16 +242,20 @@ namespace OpenRCT2
|
||||
case IntroState::LogoFadeOut:
|
||||
if (_introStateCounter >= 0)
|
||||
{
|
||||
GfxTransposePalette(PALETTE_G1_IDX_LOGO, (_introStateCounter >> 8) & 0xFF);
|
||||
GfxTransposePalette(kPaletteRCT2Logo, (_introStateCounter >> 8) & 0xFF);
|
||||
}
|
||||
else
|
||||
{
|
||||
GfxTransposePalette(PALETTE_G1_IDX_LOGO, 0);
|
||||
GfxTransposePalette(kPaletteRCT2Logo, 0);
|
||||
}
|
||||
ScreenIntroDrawLogo(rt);
|
||||
break;
|
||||
case IntroState::Clear:
|
||||
GfxClear(rt, kBackgroundColourDark);
|
||||
|
||||
// Move to next part. Has to be done here to ensure the screen is cleared.
|
||||
_introState = IntroState::Finish;
|
||||
_introStateCounter = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -264,7 +264,7 @@ namespace OpenRCT2
|
||||
|
||||
static void ScreenIntroProcessMouseInput()
|
||||
{
|
||||
if (ContextGetCursorState()->any == CURSOR_PRESSED)
|
||||
if (ContextGetCursorState()->any & CURSOR_DOWN)
|
||||
{
|
||||
ScreenIntroSkipPart();
|
||||
}
|
||||
@@ -293,9 +293,6 @@ namespace OpenRCT2
|
||||
{
|
||||
case IntroState::None:
|
||||
break;
|
||||
case IntroState::Disclaimer2:
|
||||
_introState = IntroState::PublisherBegin;
|
||||
break;
|
||||
default:
|
||||
_introState = IntroState::Clear;
|
||||
break;
|
||||
|
||||
@@ -27,8 +27,6 @@ namespace OpenRCT2
|
||||
LogoFadeIn,
|
||||
LogoWait,
|
||||
LogoFadeOut,
|
||||
Disclaimer1,
|
||||
Disclaimer2,
|
||||
Clear = 254,
|
||||
Finish = 255,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user