1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

start work on new ride window

This commit is contained in:
IntelOrca
2014-08-17 23:57:41 +01:00
parent 4d929709f4
commit e222b88581
3 changed files with 71 additions and 15 deletions

View File

@@ -375,6 +375,7 @@ void window_park_rating_open();
void window_finances_open();
void window_new_campaign_open(int campaignType);
void window_ride_list_open();
void window_new_ride_open();
void window_banner_open();
void window_cheats_open();
void window_research_open();

View File

@@ -190,18 +190,7 @@ static void window_game_top_toolbar_mouseup()
short widgetIndex;
rct_window *w, *mainWindow;
#ifdef _MSC_VER
__asm mov widgetIndex, dx
#else
__asm__ ( "mov %[widgetIndex], dx " : [widgetIndex] "+m" (widgetIndex) );
#endif
#ifdef _MSC_VER
__asm mov w, esi
#else
__asm__ ( "mov %[w], esi " : [w] "+m" (w) );
#endif
window_mouse_up_get_registers(w, widgetIndex);
switch (widgetIndex) {
case WIDX_PAUSE:
@@ -231,7 +220,6 @@ static void window_game_top_toolbar_mouseup()
window_rotate_camera(mainWindow);
break;
case WIDX_MAP:
//RCT2_CALLPROC_EBPSAFE(0x0068C88A);
window_map_open();
break;
case WIDX_CLEAR_SCENERY:
@@ -282,7 +270,7 @@ static void window_game_top_toolbar_mouseup()
}
break;
case WIDX_CONSTRUCT_RIDE:
RCT2_CALLPROC_EBPSAFE(0x006B3CFF);
window_new_ride_open();
break;
case WIDX_RIDES:
window_ride_list_open();
@@ -292,7 +280,6 @@ static void window_game_top_toolbar_mouseup()
break;
case WIDX_STAFF:
window_staff_open();
//RCT2_CALLPROC_EBPSAFE(0x006BD3CC);
break;
case WIDX_GUESTS:
window_guest_list_open();

View File

@@ -33,6 +33,24 @@ enum {
WINDOW_NEW_RIDE_TAB_RESEARCH
} WINDOW_RIDE_CONSTRUCTION_TAB;
enum {
WIDX_BACKGROUND,
WIDX_TITLE,
WIDX_CLOSE,
WIDX_PAGE_BACKGROUND,
WIDX_TAB_1,
WIDX_TAB_2,
WIDX_TAB_3,
WIDX_TAB_4,
WIDX_TAB_5,
WIDX_TAB_6,
WIDX_TAB_7,
WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP,
WIDX_LAST_DEVELOPMENT_GROUP,
WIDX_LAST_DEVELOPMENT_BUTTON
};
/**
*
* rct2: 0x006ACA58
@@ -55,4 +73,54 @@ void window_new_ride_init_vars() {
}
RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_RIDE_LIST_INFORMATION_TYPE, uint8) = 0;
}
/**
*
* rct2: 0x006B3CFF
*/
void window_new_ride_open()
{
rct_window *w;
w = window_bring_to_front_by_id(WC_CONSTRUCT_RIDE, 0);
if (w != NULL)
return;
// Not sure what these windows are
window_close_by_id(161, 0);
window_close_by_id(162, 0);
w = window_create_auto_pos(601, 370, (uint32*)0x0098E354, WC_CONSTRUCT_RIDE, 0x400);
w->widgets = (rct_widget*)0x009AEBF4;
w->enabled_widgets =
(1 << WIDX_CLOSE) |
(1 << WIDX_TAB_1) |
(1 << WIDX_TAB_2) |
(1 << WIDX_TAB_3) |
(1 << WIDX_TAB_4) |
(1 << WIDX_TAB_5) |
(1 << WIDX_TAB_6) |
(1 << WIDX_TAB_7) |
(1 << 14) |
(1 << 15);
window_init_scroll_widgets(w);
w->frame_no = 0;
w->colours[0] = 24;
w->colours[1] = 26;
w->colours[2] = 26;
w->var_480 = -1;
w->var_482 = -1;
RCT2_GLOBAL(0x00F43866, sint16) = -1;
RCT2_CALLPROC_EBPSAFE(0x006B6F3E);
w->var_482 = RCT2_ADDRESS(0x00F43825, sint16)[RCT2_GLOBAL(0x00F43824, uint8)];
if (w->var_482 == -1)
w->var_482 = RCT2_GLOBAL(0x00F43523, sint16);
w->width = 1;
RCT2_CALLPROC_EBPSAFE(0x006B3DF1); // initialise window size and widgets
RCT2_CALLPROC_EBPSAFE(0x006B7220);
}