1
0
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:
Gymnasiast
2017-01-26 23:02:29 +01:00
committed by Ted John
parent 6d8a617712
commit c92792a973
3 changed files with 15 additions and 7 deletions

View File

@@ -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));
}
}
}
/**

View File

@@ -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);

View File

@@ -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();
}