MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / updateDisplayAtari

Function updateDisplayAtari

src/OpenLoco/src/Intro.cpp:80–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79
80 static void updateDisplayAtari(Gfx::DrawingContext& drawingCtx)
81 {
82 _introTicks++;
83 uint8_t modifier = 0;
84 if (_introTicks >= 0)
85 {
86 modifier = _introTicks;
87 if (_introTicks >= 55)
88 {
89 modifier = 110 - _introTicks;
90 }
91 }
92 modifier = std::min(255, modifier * 8);
93
94 Gfx::loadPalette(ImageIds::atari_intro_palette, modifier);
95
96 if (_introTicks >= 110)
97 {
98 Gfx::loadPalette(ImageIds::chris_sawyer_intro_palette, 0);
99
100 drawingCtx.clearSingle(PaletteIndex::black0);
101
102 const auto pos = Ui::Point(Ui::width() / 2 - 320 + 70, Ui::height() / 2 - 58);
103 drawingCtx.drawImage(pos, ImageId(ImageIds::chris_sawyer_logo_intro_left));
104 drawingCtx.drawImage(pos + Ui::Point(250, 0), ImageId(ImageIds::chris_sawyer_logo_intro_right));
105
106 _introTicks = 0;
107 _state = State::displayCS;
108 }
109 }
110 static void updateDisplayCS(Gfx::DrawingContext& drawingCtx)
111 {
112 _introTicks++;

Callers

nothing calls this directly

Calls 6

loadPaletteFunction · 0.85
widthFunction · 0.85
heightFunction · 0.85
ImageIdClass · 0.85
clearSingleMethod · 0.80
drawImageMethod · 0.45

Tested by

no test coverage detected