1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

add temp RCT2 memory copy for scrolling text paint

Fixes #3628: assertion
Fixes #3634: wrong queue banner text

Until path_paint is implemented, this variable is used by scrolling_text_setup to use the old string arguments array. Remove when scrolling_text_setup is no longer hooked.
This commit is contained in:
Ted John
2016-05-16 18:44:44 +01:00
parent 0293218890
commit 975eacc5f9
2 changed files with 13 additions and 0 deletions

View File

@@ -125,6 +125,8 @@ static void scrolling_text_format(utf8 *dst, rct_draw_scroll_text *scrollText)
}
}
extern bool TempForScrollText;
/**
*
* rct2: 0x006C42D9
@@ -135,6 +137,10 @@ static void scrolling_text_format(utf8 *dst, rct_draw_scroll_text *scrollText)
*/
int scrolling_text_setup(rct_string_id stringId, uint16 scroll, uint16 scrollingMode)
{
if (TempForScrollText) {
memcpy(gCommonFormatArgs, (const void*)0x013CE952, 16);
}
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
if (dpi->zoom_level != 0) return 0x626;

View File

@@ -18,6 +18,13 @@
#include "../../addresses.h"
#include "../../world/map.h"
// #3628: Until path_paint is implemented, this variable is used by scrolling_text_setup
// to use the old string arguments array. Remove when scrolling_text_setup is no
// longer hooked.
bool TempForScrollText = false;
void path_paint(uint8 direction, uint16 height, rct_map_element *mapElement) {
TempForScrollText = true;
RCT2_CALLPROC_X(0x6A3590, 0, 0, direction, height, (int)mapElement, 0, 0);
TempForScrollText = false;
}