mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge branch 'MaciekBaron-master'
This commit is contained in:
commit
bfbb5b810b
|
@ -96,7 +96,7 @@
|
|||
<ClCompile Include="..\src\window_park.c" />
|
||||
<ClCompile Include="..\src\window_finances.c" />
|
||||
<ClCompile Include="..\src\window_footpath.c" />
|
||||
<ClCompile Include="..\src\window_ride_construction.c" />
|
||||
<ClCompile Include="..\src\window_new_ride.c" />
|
||||
<ClCompile Include="..\src\window_ride_list.c" />
|
||||
<ClCompile Include="..\src\window_save_prompt.c" />
|
||||
<ClCompile Include="..\src\window_staff.c" />
|
||||
|
|
|
@ -281,9 +281,6 @@
|
|||
<ClCompile Include="..\src\finance.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\window_ride_construction.c">
|
||||
<Filter>Windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\window_finances.c">
|
||||
<Filter>Windows</Filter>
|
||||
</ClCompile>
|
||||
|
@ -293,6 +290,9 @@
|
|||
<ClCompile Include="..\src\window_banner.c">
|
||||
<Filter>Windows</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\window_new_ride.c">
|
||||
<Filter>Windows</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\openrct2.exe">
|
||||
|
|
|
@ -62,7 +62,7 @@ void editor_load()
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
RCT2_GLOBAL(0x0141F570, uint8) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
window_ride_construction_init_vars();
|
||||
window_new_ride_init_vars();
|
||||
RCT2_GLOBAL(0x0141F571, uint8) = 4;
|
||||
viewport_init_all();
|
||||
news_item_init_queue();
|
||||
|
@ -110,7 +110,7 @@ void trackdesigner_load()
|
|||
window_staff_init_vars();
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TRACK_DESIGNER;
|
||||
RCT2_GLOBAL(0x0141F570, uint8) = 0;
|
||||
window_ride_construction_init_vars();
|
||||
window_new_ride_init_vars();
|
||||
viewport_init_all();
|
||||
news_item_init_queue();
|
||||
RCT2_CALLPROC_EBPSAFE(0x0066EF38); // window_main_editor_create
|
||||
|
@ -148,7 +148,7 @@ void trackmanager_load()
|
|||
window_staff_init_vars();
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_TRACK_MANAGER;
|
||||
RCT2_GLOBAL(0x0141F570, uint8) = 0;
|
||||
window_ride_construction_init_vars();
|
||||
window_new_ride_init_vars();
|
||||
viewport_init_all();
|
||||
news_item_init_queue();
|
||||
RCT2_CALLPROC_EBPSAFE(0x0066EF38); // window_main_editor_create
|
||||
|
|
|
@ -1520,7 +1520,7 @@ int game_load_save()
|
|||
|
||||
RCT2_CALLPROC_EBPSAFE(0x0069E9A7);
|
||||
RCT2_CALLPROC_EBPSAFE(0x006DFEE4);
|
||||
window_ride_construction_init_vars();
|
||||
window_new_ride_init_vars();
|
||||
RCT2_GLOBAL(0x009DEB7C, uint16) = 0;
|
||||
if (RCT2_GLOBAL(0x0013587C4, uint32) == 0) // this check is not in scenario play
|
||||
RCT2_CALLPROC_EBPSAFE(0x0069E869);
|
||||
|
|
|
@ -135,7 +135,7 @@ void rct2_init()
|
|||
date_reset();
|
||||
climate_reset(CLIMATE_COOL_AND_WET);
|
||||
RCT2_CALLPROC_EBPSAFE(0x006DFEE4);
|
||||
window_ride_construction_init_vars();
|
||||
window_new_ride_init_vars();
|
||||
window_guest_list_init_vars_b();
|
||||
window_staff_init_vars();
|
||||
|
||||
|
|
17
src/ride.c
17
src/ride.c
|
@ -150,3 +150,20 @@ void ride_init_all()
|
|||
ride_measurement->var_00 = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006B7A38
|
||||
*/
|
||||
void reset_all_ride_build_dates() {
|
||||
int i;
|
||||
rct_ride *ride;
|
||||
for (i = 0; i < MAX_RIDES; i++) {
|
||||
ride = GET_RIDE(i);
|
||||
if (ride->type != RIDE_TYPE_NULL) {
|
||||
//mov ax, current_month_year
|
||||
//sub [esi + 180h], ax
|
||||
ride->build_date -= RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, uint16);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -72,7 +72,9 @@ typedef struct {
|
|||
uint8 var_14D;
|
||||
uint8 pad_14E[0x0A];
|
||||
uint16 var_158;
|
||||
uint8 pad_15A[0x3C];
|
||||
uint8 pad_15A[0x26];
|
||||
uint16 build_date;
|
||||
uint8 pad_182[0x14];
|
||||
uint16 var_196;
|
||||
uint8 pad_198;
|
||||
uint8 var_199;
|
||||
|
@ -257,5 +259,6 @@ int ride_get_count();
|
|||
int ride_get_total_queue_length(rct_ride *ride);
|
||||
int ride_get_max_queue_time(rct_ride *ride);
|
||||
void ride_init_all();
|
||||
void reset_all_ride_build_dates();
|
||||
|
||||
#endif
|
||||
|
|
|
@ -450,7 +450,7 @@ void scenario_load_and_play(rct_scenario_basic *scenario)
|
|||
window_invalidate(mainWindow);
|
||||
|
||||
RCT2_CALLPROC_EBPSAFE(0x0069E9A7);
|
||||
window_ride_construction_init_vars();
|
||||
window_new_ride_init_vars();
|
||||
|
||||
RCT2_GLOBAL(0x00F663B0, sint32) = RCT2_GLOBAL(0x009AA0F0, sint32);
|
||||
RCT2_GLOBAL(0x00F663B4, sint32) = RCT2_GLOBAL(0x009AA0F4, sint32);
|
||||
|
@ -513,7 +513,7 @@ void scenario_load_and_play(rct_scenario_basic *scenario)
|
|||
RCT2_GLOBAL(0x013587D8, uint16) = 63;
|
||||
RCT2_CALLPROC_EBPSAFE(0x0069E869); // (loan related, called above already)
|
||||
RCT2_CALLPROC_EBPSAFE(0x0066729F); // reset history / finance / awards
|
||||
RCT2_CALLPROC_EBPSAFE(0x006B7A38); // reset_all_ride_build_dates
|
||||
reset_all_ride_build_dates();
|
||||
date_reset();
|
||||
RCT2_CALLPROC_EBPSAFE(0x00674576);
|
||||
park_calculate_size();
|
||||
|
|
|
@ -103,7 +103,7 @@ void title_load()
|
|||
date_reset();
|
||||
RCT2_CALLPROC_X(0x006C45ED, 0, 0, 0, 0, 0, 0, 0);
|
||||
RCT2_CALLPROC_EBPSAFE(0x006DFEE4);
|
||||
window_ride_construction_init_vars();
|
||||
window_new_ride_init_vars();
|
||||
window_guest_list_init_vars_b();
|
||||
window_staff_init_vars();
|
||||
RCT2_CALLPROC_EBPSAFE(0x0068AFFD);
|
||||
|
@ -191,7 +191,7 @@ static void title_update_showcase()
|
|||
|
||||
window_invalidate(w);
|
||||
RCT2_CALLPROC_EBPSAFE(0x0069E9A7);
|
||||
window_ride_construction_init_vars();
|
||||
window_new_ride_init_vars();
|
||||
RCT2_CALLPROC_EBPSAFE(0x00684AC3);
|
||||
RCT2_CALLPROC_EBPSAFE(0x006DFEE4);
|
||||
news_item_init_queue();
|
||||
|
|
|
@ -358,7 +358,7 @@ void window_cheats_open();
|
|||
void window_guest_list_init_vars_a();
|
||||
void window_guest_list_init_vars_b();
|
||||
|
||||
void window_ride_construction_init_vars();
|
||||
void window_new_ride_init_vars();
|
||||
|
||||
void window_staff_init_vars();
|
||||
|
||||
|
|
|
@ -24,26 +24,26 @@
|
|||
#include "window.h"
|
||||
|
||||
enum {
|
||||
WINDOW_RIDE_CONSTRUCTION_TAB_TRANSPORT,
|
||||
WINDOW_RIDE_CONSTRUCTION_TAB_GENTLE,
|
||||
WINDOW_RIDE_CONSTRUCTION_TAB_ROLLER_COASTER,
|
||||
WINDOW_RIDE_CONSTRUCTION_TAB_THRILL,
|
||||
WINDOW_RIDE_CONSTRUCTION_TAB_WATER,
|
||||
WINDOW_RIDE_CONSTRUCTION_TAB_SHOP,
|
||||
WINDOW_RIDE_CONSTRUCTION_TAB_RESEARCH
|
||||
WINDOW_NEW_RIDE_TAB_TRANSPORT,
|
||||
WINDOW_NEW_RIDE_TAB_GENTLE,
|
||||
WINDOW_NEW_RIDE_TAB_ROLLER_COASTER,
|
||||
WINDOW_NEW_RIDE_TAB_THRILL,
|
||||
WINDOW_NEW_RIDE_TAB_WATER,
|
||||
WINDOW_NEW_RIDE_TAB_SHOP,
|
||||
WINDOW_NEW_RIDE_TAB_RESEARCH
|
||||
} WINDOW_RIDE_CONSTRUCTION_TAB;
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006ACA58
|
||||
*/
|
||||
void window_ride_construction_init_vars() {
|
||||
void window_new_ride_init_vars() {
|
||||
// If we are in the track designer, default to the Roller Coaster tab
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_RIDE_LIST_SELECTED_TAB, uint8) = WINDOW_RIDE_CONSTRUCTION_TAB_ROLLER_COASTER;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_RIDE_LIST_SELECTED_TAB, uint8) = WINDOW_NEW_RIDE_TAB_ROLLER_COASTER;
|
||||
}
|
||||
else {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_RIDE_LIST_SELECTED_TAB, uint8) = WINDOW_RIDE_CONSTRUCTION_TAB_TRANSPORT;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_RIDE_LIST_SELECTED_TAB, uint8) = WINDOW_NEW_RIDE_TAB_TRANSPORT;
|
||||
}
|
||||
|
||||
for (short i = 0; i < 6; i++) {
|
Loading…
Reference in New Issue