mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Remove drawing of expansion packs on title screen
This never worked anyway as we no longer read the registry keys for it.
This commit is contained in:
@@ -57,33 +57,13 @@ static rct_window_event_list window_title_logo_events = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static void window_title_logo_draw_expansion_packs(rct_drawpixelinfo *dpi);
|
||||
|
||||
/**
|
||||
* Creates the window containing the logo and the expansion packs on the title screen.
|
||||
* rct2: 0x0066B679 (part of 0x0066B3E8)
|
||||
*/
|
||||
void window_title_logo_open()
|
||||
{
|
||||
int i, packs;
|
||||
rct_window *window;
|
||||
|
||||
// Count number of expansion packs
|
||||
packs = 0;
|
||||
for (i = 0; i < 16; i++)
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_EXPANSION_FLAGS, uint16) & (1 << i))
|
||||
packs++;
|
||||
|
||||
// Create the window
|
||||
window = window_create(
|
||||
0,
|
||||
0,
|
||||
200,
|
||||
106 + (10 * packs),
|
||||
&window_title_logo_events,
|
||||
WC_TITLE_LOGO,
|
||||
WF_STICK_TO_BACK | WF_TRANSPARENT
|
||||
);
|
||||
rct_window *window = window_create(0, 0, 200, 106, &window_title_logo_events, WC_TITLE_LOGO, WF_STICK_TO_BACK | WF_TRANSPARENT);
|
||||
window->widgets = window_title_logo_widgets;
|
||||
window_init_scroll_widgets(window);
|
||||
window->colours[0] = TRANSLUCENT(COLOUR_GREY);
|
||||
@@ -97,47 +77,8 @@ void window_title_logo_open()
|
||||
*/
|
||||
static void window_title_logo_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
{
|
||||
// gfx_draw_sprite(dpi, SPR_MENU_LOGO, w->x, w->y, 0);
|
||||
int x = 2, y = 2;
|
||||
int x = 2;
|
||||
int y = 2;
|
||||
gfx_draw_sprite(dpi, SPR_G2_LOGO, w->x + x, w->y + y, 0);
|
||||
gfx_draw_sprite(dpi, SPR_G2_TITLE, w->x + x + 104, w->y + y + 18, 0);
|
||||
window_title_logo_draw_expansion_packs(dpi);
|
||||
}
|
||||
|
||||
static void window_title_logo_draw_expansion_packs(rct_drawpixelinfo *dpi)
|
||||
{
|
||||
int packs, x, y, i;
|
||||
char *buffer, *names;
|
||||
|
||||
x = 0;
|
||||
y = 105;
|
||||
|
||||
packs = RCT2_GLOBAL(RCT2_ADDRESS_EXPANSION_FLAGS, uint16);
|
||||
names = RCT2_ADDRESS(RCT2_ADDRESS_EXPANSION_NAMES, char);
|
||||
buffer = RCT2_ADDRESS(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, char);
|
||||
while (packs != 0) {
|
||||
if (packs & 1) {
|
||||
// TODO: Should probably be localisable
|
||||
// Prefix for expansion name
|
||||
buffer[0] = '\n';
|
||||
buffer[1] = '\v';
|
||||
buffer[2] = FORMAT_YELLOW; // Colour of the text
|
||||
buffer[3] = '+';
|
||||
buffer[4] = ' ';
|
||||
|
||||
// Copies the expansion name to the buffer, offset by 5
|
||||
i = 0;
|
||||
do {
|
||||
buffer[5 + i] = names[i];
|
||||
i++;
|
||||
} while (names[i - 1] != 0);
|
||||
|
||||
gCurrentFontSpriteBase = FONT_SPRITE_BASE_SMALL;
|
||||
gfx_draw_string(dpi, buffer, 0, x, y);
|
||||
y += 10;
|
||||
}
|
||||
|
||||
packs = packs >> 1;
|
||||
names += 128;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user