mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix scrolling banners drawing invalid text
This commit is contained in:
parent
15490010e1
commit
e5eb61d38d
|
@ -92,6 +92,9 @@ public:
|
|||
intent.putExtra(INTENT_EXTRA_BANNER_INDEX, _bannerIndex);
|
||||
context_broadcast_intent(&intent);
|
||||
|
||||
scrolling_text_invalidate();
|
||||
gfx_invalidate_screen();
|
||||
|
||||
return MakeResult();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -92,7 +92,9 @@ public:
|
|||
LogAction(oldName);
|
||||
}
|
||||
|
||||
scrolling_text_invalidate();
|
||||
gfx_invalidate_screen();
|
||||
|
||||
return MakeResult();
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "../Context.h"
|
||||
#include "../GameState.h"
|
||||
#include "../core/MemoryStream.h"
|
||||
#include "../drawing/Drawing.h"
|
||||
#include "../interface/Window.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
#include "../management/NewsItem.h"
|
||||
|
@ -251,6 +252,9 @@ private:
|
|||
windowManager->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_RIDE_LIST));
|
||||
windowManager->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_GUEST_LIST));
|
||||
|
||||
scrolling_text_invalidate();
|
||||
gfx_invalidate_screen();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ public:
|
|||
user_string_free(ride->name);
|
||||
ride->name = newUserStringId;
|
||||
|
||||
scrolling_text_invalidate();
|
||||
gfx_invalidate_screen();
|
||||
|
||||
// Refresh windows that display ride name
|
||||
|
|
|
@ -85,6 +85,8 @@ public:
|
|||
user_string_free(prev_string_id);
|
||||
|
||||
banner->flags &= ~(BANNER_FLAG_LINKED_TO_RIDE);
|
||||
|
||||
scrolling_text_invalidate();
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
else
|
||||
|
@ -108,6 +110,7 @@ public:
|
|||
banner->string_idx = STR_DEFAULT_SIGN;
|
||||
user_string_free(prev_string_id);
|
||||
|
||||
scrolling_text_invalidate();
|
||||
gfx_invalidate_screen();
|
||||
}
|
||||
|
||||
|
|
|
@ -368,6 +368,7 @@ void ttf_draw_string(rct_drawpixelinfo* dpi, const_utf8string text, int32_t colo
|
|||
|
||||
// scrolling text
|
||||
void scrolling_text_initialise_bitmaps();
|
||||
void scrolling_text_invalidate();
|
||||
int32_t scrolling_text_setup(struct paint_session* session, rct_string_id stringId, uint16_t scroll, uint16_t scrollingMode);
|
||||
|
||||
rct_size16 FASTCALL gfx_get_sprite_size(uint32_t image_id);
|
||||
|
|
|
@ -1451,6 +1451,17 @@ static constexpr const int16_t* _scrollPositions[MAX_SCROLLING_TEXT_MODES] = {
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
void scrolling_text_invalidate()
|
||||
{
|
||||
for (int32_t i = 0; i < MAX_SCROLLING_TEXT_ENTRIES; i++)
|
||||
{
|
||||
rct_draw_scroll_text& scrollText = _drawScrollTextList[i];
|
||||
scrollText.string_id = 0;
|
||||
scrollText.string_args_0 = 0;
|
||||
scrollText.string_args_1 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006C42D9
|
||||
|
|
Loading…
Reference in New Issue