mirror of https://github.com/OpenRCT2/OpenRCT2.git
Integrate news items
This commit is contained in:
parent
73d453228a
commit
d5eb3b9488
|
@ -25,7 +25,7 @@
|
|||
#include "../util/util.h"
|
||||
#include "news_item.h"
|
||||
|
||||
rct_news_item *gNewsItems = RCT2_ADDRESS(RCT2_ADDRESS_NEWS_ITEM_LIST, rct_news_item);
|
||||
rct_news_item gNewsItems[MAX_NEWS_ITEMS];
|
||||
|
||||
/** rct2: 0x0097BE7C */
|
||||
const uint8 news_type_properties[] = {
|
||||
|
@ -144,7 +144,7 @@ void news_item_update_current()
|
|||
void news_item_close_current()
|
||||
{
|
||||
int i;
|
||||
rct_news_item *newsItems = RCT2_ADDRESS(RCT2_ADDRESS_NEWS_ITEM_LIST, rct_news_item);
|
||||
rct_news_item *newsItems = gNewsItems;
|
||||
|
||||
// Check if there is a current message
|
||||
if (news_item_is_queue_empty())
|
||||
|
@ -280,7 +280,7 @@ void news_item_get_subject_location(int type, int subject, int *x, int *y, int *
|
|||
*/
|
||||
void news_item_add_to_queue(uint8 type, rct_string_id string_id, uint32 assoc)
|
||||
{
|
||||
utf8 *buffer = RCT2_ADDRESS(0x0141EF68, char);
|
||||
utf8 buffer[256];
|
||||
void *args = gCommonFormatArgs;
|
||||
|
||||
format_string(buffer, string_id, args); // overflows possible?
|
||||
|
@ -289,7 +289,7 @@ void news_item_add_to_queue(uint8 type, rct_string_id string_id, uint32 assoc)
|
|||
|
||||
void news_item_add_to_queue_raw(uint8 type, const utf8 *text, uint32 assoc)
|
||||
{
|
||||
rct_news_item *newsItem = RCT2_ADDRESS(RCT2_ADDRESS_NEWS_ITEM_LIST, rct_news_item);
|
||||
rct_news_item *newsItem = gNewsItems;
|
||||
|
||||
// find first open slot
|
||||
while (newsItem->type != NEWS_ITEM_NULL) {
|
||||
|
@ -417,7 +417,7 @@ void news_item_disable_news(uint8 type, uint32 assoc)
|
|||
|
||||
void news_item_add_to_queue_custom(rct_news_item *newNewsItem)
|
||||
{
|
||||
rct_news_item *newsItem = RCT2_ADDRESS(RCT2_ADDRESS_NEWS_ITEM_LIST, rct_news_item);
|
||||
rct_news_item *newsItem = gNewsItems;
|
||||
|
||||
// Find first open slot
|
||||
while (newsItem->type != NEWS_ITEM_NULL) {
|
||||
|
|
|
@ -57,9 +57,9 @@ typedef struct rct_news_item {
|
|||
assert_struct_size(rct_news_item, 12 + 256);
|
||||
#pragma pack(pop)
|
||||
|
||||
#define MAX_NEWS_ITEMS 60
|
||||
#define MAX_NEWS_ITEMS 61
|
||||
|
||||
extern rct_news_item *gNewsItems;
|
||||
extern rct_news_item gNewsItems[MAX_NEWS_ITEMS];
|
||||
|
||||
void news_item_init_queue();
|
||||
void news_item_update_current();
|
||||
|
|
|
@ -979,8 +979,8 @@ void S4Importer::ImportParkFlags()
|
|||
}
|
||||
|
||||
// News items
|
||||
rct_news_item *newsItems = RCT2_ADDRESS(RCT2_ADDRESS_NEWS_ITEM_LIST, rct_news_item);
|
||||
for (int i = 0; i < 61; i++)
|
||||
rct_news_item *newsItems = gNewsItems;
|
||||
for (int i = 0; i < MAX_NEWS_ITEMS; i++)
|
||||
{
|
||||
newsItems[i] = _s4.messages[i];
|
||||
}
|
||||
|
|
|
@ -321,7 +321,7 @@ typedef struct rct_s6_data {
|
|||
uint8 next_weather_gloom;
|
||||
uint8 current_rain_level;
|
||||
uint8 next_rain_level;
|
||||
rct_news_item news_items[61];
|
||||
rct_news_item news_items[MAX_NEWS_ITEMS];
|
||||
uint8 pad_13CE730[64];
|
||||
uint32 rct1_scenario_flags;
|
||||
uint16 wide_path_tile_loop_x;
|
||||
|
|
Loading…
Reference in New Issue