mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 12:33:17 +01:00
Also import news items in S4 files correctly
This commit is contained in:
@@ -729,14 +729,20 @@ void game_convert_strings_to_utf8()
|
||||
}
|
||||
}
|
||||
|
||||
// News items
|
||||
for (sint32 i = 0; i < MAX_NEWS_ITEMS; i++) {
|
||||
NewsItem *newsItem = news_item_get(i);
|
||||
// News items
|
||||
game_convert_news_items_to_utf8();
|
||||
|
||||
if (!str_is_null_or_empty(newsItem->Text)) {
|
||||
rct2_to_utf8_self(newsItem->Text, sizeof(newsItem->Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void game_convert_news_items_to_utf8()
|
||||
{
|
||||
for (sint32 i = 0; i < MAX_NEWS_ITEMS; i++) {
|
||||
NewsItem *newsItem = news_item_get(i);
|
||||
|
||||
if (!str_is_null_or_empty(newsItem->Text)) {
|
||||
rct2_to_utf8_self(newsItem->Text, sizeof(newsItem->Text));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -181,6 +181,7 @@ void rct2_exit();
|
||||
void rct2_exit_reason(rct_string_id title, rct_string_id body);
|
||||
void game_autosave();
|
||||
void game_convert_strings_to_utf8();
|
||||
void game_convert_news_items_to_utf8();
|
||||
void game_convert_strings_to_rct2(rct_s6_data *s6);
|
||||
void game_fix_save_vars();
|
||||
bool game_load_save_or_scenario(const utf8 * path);
|
||||
|
||||
@@ -164,6 +164,7 @@ public:
|
||||
|
||||
// Importing the strings is done later on, although that approach needs looking at.
|
||||
//game_convert_strings_to_utf8();
|
||||
game_convert_news_items_to_utf8();
|
||||
map_count_remaining_land_rights();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user