Implemented scenery_set_setup for research.

I've also labelled ride_type->flags.
This commit is contained in:
Duncan Frost 2015-06-06 09:46:01 +01:00
parent cd22f9bd08
commit 97966ac707
12 changed files with 129 additions and 56 deletions

View File

@ -183,12 +183,12 @@ void research_finish_item(sint32 entryIndex)
RCT2_ADDRESS(0x01357644, uint32)[ebx] = RCT2_ADDRESS(0x0097C5D4, uint32)[ebx];
}
RCT2_ADDRESS(0x001357424, uint32)[rideEntryIndex >> 5] |= 1 << (rideEntryIndex & 0x1F);
if (!(rideEntry->var_008 & 0x2000)) {
if (!(rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE)) {
for (i = 0; i < 128; i++) {
rideEntry2 = GET_RIDE_ENTRY(i);
if (rideEntry2 == (rct_ride_type*)-1)
continue;
if (rideEntry2->var_008 & 0x2000)
if (rideEntry2->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE)
continue;
if (rideEntry2->ride_type[0] == ecx || rideEntry2->ride_type[1] == ecx || rideEntry2->ride_type[2] == ecx)
@ -198,7 +198,7 @@ void research_finish_item(sint32 entryIndex)
// I don't think 0x009AC06C is ever not 0, so probably redundant
if (RCT2_GLOBAL(0x009AC06C, uint8) == 0) {
RCT2_GLOBAL(0x013CE952, rct_string_id) = rideEntry->var_008 & 0x1000 ?
RCT2_GLOBAL(0x013CE952, rct_string_id) = rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME ?
rideEntry->name : ecx + 2;
if (!gSilentResearch)
news_item_add_to_queue(NEWS_ITEM_RESEARCH, 2249, entryIndex);
@ -352,7 +352,9 @@ void research_remove_non_separate_vehicle_types()
researchItem->entryIndex >= 0x10000
) {
rct_ride_type *rideEntry = GET_RIDE_ENTRY(researchItem->entryIndex & 0xFF);
if (!(rideEntry->var_008 & 0x3000)) {
if (!(rideEntry->flags &
(RIDE_ENTRY_FLAG_SEPERATE_RIDE |
RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME))) {
// Check if ride type already exists further up for a vehicle type that isn't displayed as a ride
researchItem2 = researchItem - 1;
do {
@ -361,7 +363,10 @@ void research_remove_non_separate_vehicle_types()
researchItem2->entryIndex >= 0x10000
) {
rideEntry = GET_RIDE_ENTRY(researchItem2->entryIndex & 0xFF);
if (!(rideEntry->var_008 & 0x3000)) {
if (!(rideEntry->flags &
(RIDE_ENTRY_FLAG_SEPERATE_RIDE |
RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME))) {
if (((researchItem->entryIndex >> 8) & 0xFF) == ((researchItem2->entryIndex >> 8) & 0xFF)) {
// Remove item
researchItem2 = researchItem;

View File

@ -677,7 +677,7 @@ int paint_ride_entry(int flags, int ebx, int ecx, int edx, rct_drawpixelinfo* dp
int di = ride_type->ride_type[0] | (ride_type->ride_type[1] << 8) | (ride_type->ride_type[2] << 16);
if (ride_type->var_008 & 0x1000) di |= 0x1000000;
if (ride_type->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME) di |= 0x1000000;
RCT2_GLOBAL(0xF433DD, uint32) = di;
return 0;// flags;
@ -755,7 +755,7 @@ int paint_ride_entry(int flags, int ebx, int ecx, int edx, rct_drawpixelinfo* dp
int width = w->x + w->width - x - 4;
int format_args = ride_type->description;
if (!(ride_type->var_008 & 0x1000))
if (!(ride_type->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME))
{
format_args = ride_type->ride_type[0];
if ((format_args & 0xFF) == 0xFF)

View File

@ -647,7 +647,7 @@ static uint32 install_object_entry(rct_object_entry* entry, rct_object_entry* in
uint8* chunk = RCT2_GLOBAL(RCT2_ADDRESS_CURR_OBJECT_CHUNK_POINTER, uint8*); // Loaded in object_load
// When made of two parts i.e Wooden Roller Coaster (Dream Woodie Cars)
if ((objectType == OBJECT_TYPE_RIDE) && !((((rct_ride_type*)chunk)->var_008) & 0x1000)) {
if ((objectType == OBJECT_TYPE_RIDE) && !((((rct_ride_type*)chunk)->flags) & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME)) {
rct_ride_type* ride_type = (rct_ride_type*)chunk;
rct_string_id obj_string = ride_type->ride_type[0];
if (obj_string == 0xFF){

View File

@ -1624,7 +1624,7 @@ static int ride_get_new_breakdown_problem(rct_ride *ride)
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RAIN_LEVEL, uint8) == 0 ? 3 : 20;
entry = ride_get_entry(ride);
if (entry->var_008 & 0x4000)
if (entry->flags & RIDE_ENTRY_FLAG_14)
return -1;
availableBreakdownProblems = RideAvailableBreakdowns[ride->type];
@ -3147,7 +3147,7 @@ void game_command_set_ride_setting(int *eax, int *ebx, int *ecx, int *edx, int *
for (int i = 0; i < ride->type; i++) {
while (*(available_modes++) != 255) {}
}
if (ride_entry->var_008 & (1 << 17)){
if (ride_entry->flags & RIDE_ENTRY_FLAG_17){
available_modes += 2;
}
@ -3160,7 +3160,7 @@ void game_command_set_ride_setting(int *eax, int *ebx, int *ecx, int *edx, int *
if (*available_modes == 0xFF) new_value = default_mode;
if (available_modes[1] == 0xFF){
if (ride_entry->var_008 & (1 << 15))
if (ride_entry->flags & RIDE_ENTRY_FLAG_15)
new_value = default_mode;
}
@ -3701,14 +3701,14 @@ int ride_is_valid_for_test(int rideIndex, int goingToBeOpen, int isApplying)
if (ride->subtype != 255) {
rct_ride_type *rideType = GET_RIDE_ENTRY(ride->subtype);
if (rideType->var_008 & 2) {
if (rideType->flags & RIDE_ENTRY_FLAG_1) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TRACK_UNSUITABLE_FOR_TYPE_OF_TRAIN;
if (ride_check_track_suitability_a(&trackElement, &problematicTrackElement)) {
loc_6B528A(&problematicTrackElement);
return 0;
}
}
if (rideType->var_008 & 4) {
if (rideType->flags & RIDE_ENTRY_FLAG_2) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TRACK_UNSUITABLE_FOR_TYPE_OF_TRAIN;
if (ride_check_track_suitability_b(&trackElement, &problematicTrackElement)) {
loc_6B528A(&problematicTrackElement);
@ -3830,14 +3830,14 @@ int ride_is_valid_for_open(int rideIndex, int goingToBeOpen, int isApplying)
if (ride->subtype != 255) {
rct_ride_type *rideType = GET_RIDE_ENTRY(ride->subtype);
if (rideType->var_008 & 2) {
if (rideType->flags & RIDE_ENTRY_FLAG_1) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TRACK_UNSUITABLE_FOR_TYPE_OF_TRAIN;
if (ride_check_track_suitability_a(&trackElement, &problematicTrackElement)) {
loc_6B528A(&problematicTrackElement);
return 0;
}
}
if (rideType->var_008 & 4) {
if (rideType->flags & RIDE_ENTRY_FLAG_2) {
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TRACK_UNSUITABLE_FOR_TYPE_OF_TRAIN;
if (ride_check_track_suitability_b(&trackElement, &problematicTrackElement)) {
loc_6B528A(&problematicTrackElement);

View File

@ -101,7 +101,7 @@ typedef struct {
rct_string_id name; // 0x000
rct_string_id description; // 0x002
uint32 images_offset; // 0x004
uint32 var_008;
uint32 flags; // 0x008
uint8 ride_type[3]; // 0x00C
uint8 min_cars_in_train; // 0x00F
uint8 max_cars_in_train; // 0x010
@ -371,6 +371,42 @@ enum {
RIDE_LIFECYCLE_CRASHED_WINDOW_OPENED = 1 << 20
};
// Constants used by the ride_type->flags property at 0x008
enum {
RIDE_ENTRY_FLAG_0 = 1 << 0, // 0x1
RIDE_ENTRY_FLAG_1 = 1 << 1, // 0x2
RIDE_ENTRY_FLAG_2 = 1 << 2, // 0x4
RIDE_ENTRY_FLAG_3 = 1 << 3, // 0x8
RIDE_ENTRY_FLAG_4 = 1 << 4, // 0x10
RIDE_ENTRY_FLAG_5 = 1 << 5, // 0x20
RIDE_ENTRY_FLAG_6 = 1 << 6, // 0x40
RIDE_ENTRY_FLAG_7 = 1 << 7, // 0x80
RIDE_ENTRY_FLAG_8 = 1 << 8, // 0x100
RIDE_ENTRY_FLAG_9 = 1 << 9, // 0x200
RIDE_ENTRY_FLAG_COVERED_RIDE = 1 << 10, // 0x400
RIDE_ENTRY_FLAG_11 = 1 << 11, // 0x800
RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME = 1 << 12, // 0x1000
RIDE_ENTRY_FLAG_SEPERATE_RIDE = 1 << 13, // 0x2000
RIDE_ENTRY_FLAG_14 = 1 << 14, // 0x4000
RIDE_ENTRY_FLAG_15 = 1 << 15, // 0x8000
RIDE_ENTRY_FLAG_16 = 1 << 16, // 0x10000
RIDE_ENTRY_FLAG_17 = 1 << 17, // 0x20000
RIDE_ENTRY_FLAG_18 = 1 << 18, // 0x40000
RIDE_ENTRY_FLAG_19 = 1 << 19, // 0x80000
RIDE_ENTRY_FLAG_20 = 1 << 20, // 0x100000
RIDE_ENTRY_FLAG_21 = 1 << 21, // 0x200000
RIDE_ENTRY_FLAG_22 = 1 << 22, // 0x400000
RIDE_ENTRY_FLAG_23 = 1 << 23, // 0x800000
RIDE_ENTRY_FLAG_24 = 1 << 24, // 0x1000000
RIDE_ENTRY_FLAG_25 = 1 << 25, // 0x2000000
RIDE_ENTRY_FLAG_26 = 1 << 26, // 0x4000000
RIDE_ENTRY_FLAG_27 = 1 << 27, // 0x8000000
RIDE_ENTRY_FLAG_28 = 1 << 28, // 0x10000000
RIDE_ENTRY_FLAG_29 = 1 << 29, // 0x20000000
RIDE_ENTRY_FLAG_30 = 1 << 30, // 0x40000000
RIDE_ENTRY_FLAG_31 = 1 << 31, // 0x80000000
};
enum {
RIDE_TYPE_NULL = 255,
RIDE_TYPE_SPIRAL_ROLLER_COASTER = 0,

View File

@ -535,7 +535,7 @@ static void ride_ratings_apply_adjustments(rct_ride *ride, rating_tuple *ratings
uint16 flags = RCT2_GLOBAL(0x0097D4F2 + ride->type * 8, uint16);
if (flags & 0x80) {
uint16 totalAirTime = ride->total_air_time;
if (rideEntry->var_008 & 0x800) {
if (rideEntry->flags & RIDE_ENTRY_FLAG_11) {
if (totalAirTime >= 96) {
totalAirTime -= 96;
ratings->excitement -= totalAirTime / 8;
@ -608,7 +608,7 @@ static int sub_65E72D(rct_ride *ride)
int dh = numShelteredEighths;
rct_ride_type *rideType = GET_RIDE_ENTRY(ride->subtype);
if (rideType->var_008 & RIDE_TYPE_FLAG_HAS_DROPS)
if (rideType->flags & RIDE_ENTRY_FLAG_COVERED_RIDE)
numShelteredEighths = 7;
return (dh << 8) | numShelteredEighths;

View File

@ -344,7 +344,10 @@ void track_list_populate(ride_list_item item, uint8* track_list_cache){
}
else{
if (find_object_in_entry_group(track_object, &entry_type, &entry_index)){
if (GET_RIDE_ENTRY(entry_index)->var_008 & 0x3000)continue;
if (GET_RIDE_ENTRY(entry_index)->flags &
(RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME |
RIDE_ENTRY_FLAG_SEPERATE_RIDE))
continue;
}
else{
uint32* esi = sub_6AB49A(track_object);
@ -393,7 +396,7 @@ void track_load_list(ride_list_item item)
if (item.type < 0x80){
rct_ride_type* ride_type = gRideTypeList[item.entry_index];
if (!(ride_type->var_008 & 0x2000)){
if (!(ride_type->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE)){
item.entry_index = 0xFF;
}
}

View File

@ -165,18 +165,20 @@ static int research_item_is_always_researched(rct_research_item *researchItem)
return (researchItem->entryIndex & 0x60000000) != 0;
}
/* rct2: 0x0068596F */
static void sub_68596F(){
/* rct2: 0x0068596F
* Sets rides that are in use to be always researched
*/
static void research_rides_setup(){
// Reset all objects to not required
for (uint8 object_type = OBJECT_TYPE_RIDE; object_type < 11; object_type++){
uint8* esi = RCT2_ADDRESS(0x0098DA38, uint8*)[object_type];
uint8* in_use = RCT2_ADDRESS(0x0098DA38, uint8*)[object_type];
for (uint8 num_objects = object_entry_group_counts[object_type]; num_objects != 0; num_objects--){
*esi++ = 0;
*in_use++ = 0;
}
}
// Set research required for rides in use
for (uint16 rideIndex = 0; rideIndex <= 0xFF; rideIndex++){
for (uint16 rideIndex = 0; rideIndex < 255; rideIndex++){
rct_ride* ride = &g_ride_list[rideIndex];
if (ride->type == RIDE_TYPE_NULL)continue;
RCT2_ADDRESS(0x0098DA38, uint8*)[OBJECT_TYPE_RIDE][ride->subtype] |= 1;
@ -190,28 +192,29 @@ static void sub_68596F(){
if ((research->entryIndex & 0xFFFFFF) < 0x10000)
continue;
uint8 ah = (research->entryIndex >> 8) & 0xFF;
uint8 ride_base_type = (research->entryIndex >> 8) & 0xFF;
uint8 object_index = research->entryIndex & 0xFF;
rct_ride_type* ride_entry = GET_RIDE_ENTRY(object_index);
uint8 master_found = 0;
if (!(ride_entry->var_008 & (1 << 13))){
if (!(ride_entry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE)){
for (uint8 rideType = 0; rideType < object_entry_group_counts[OBJECT_TYPE_RIDE]; rideType++){
rct_ride_type* master_ride = GET_RIDE_ENTRY(rideType);
if (master_ride == NULL || (uint32)master_ride == 0xFFFFFFFF)
continue;
if (master_ride->var_008 & (1 << 13))
if (master_ride->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE)
continue;
// If master ride not in use
if (!(RCT2_ADDRESS(0x0098DA38, uint8*)[OBJECT_TYPE_RIDE][rideType] & (1 << 0)))
continue;
if (ah == master_ride->ride_type[0] ||
ah == master_ride->ride_type[1] ||
ah == master_ride->ride_type[2]){
if (ride_base_type == master_ride->ride_type[0] ||
ride_base_type == master_ride->ride_type[1] ||
ride_base_type == master_ride->ride_type[2]){
master_found = 1;
break;
}
@ -219,11 +222,12 @@ static void sub_68596F(){
}
if (!master_found){
// If not in use
if (!(RCT2_ADDRESS(0x0098DA38, uint8*)[OBJECT_TYPE_RIDE][object_index] & (1 << 0)))
continue;
if (ah != ride_entry->ride_type[0] &&
ah != ride_entry->ride_type[1] &&
ah != ride_entry->ride_type[2]){
if (ride_base_type != ride_entry->ride_type[0] &&
ride_base_type != ride_entry->ride_type[1] &&
ride_base_type != ride_entry->ride_type[2]){
continue;
}
}
@ -236,19 +240,44 @@ static void sub_68596F(){
}
}
/* rct2: 0x0068590C */
static void sub_68590C(){
RCT2_CALLPROC_EBPSAFE(0x0068590C);
/* rct2: 0x0068590C
* Sets the critical scenery sets to always researched
*/
static void research_scenery_sets_setup(){
for (rct_object_entry* object = RCT2_ADDRESS(0x0098DA74, rct_object_entry);
(object->flags & 0xFF) != 0xFF;
object++){
uint8 entry_type, entry_index;
if (!find_object_in_entry_group(object, &entry_type, &entry_index))
continue;
if (entry_type != OBJECT_TYPE_SCENERY_SETS)
continue;
rct_research_item* research = gResearchItems;
for (; research->entryIndex != RESEARCHED_ITEMS_END; research++){
if ((research->entryIndex & 0xFFFFFF) != entry_index)
continue;
research->entryIndex |= (1 << 29);
_editorInventionsListDraggedItem = research;
move_research_item(gResearchItems);
_editorInventionsListDraggedItem = NULL;
}
}
}
/**
*
* rct2: 0x00685901
*/
static void sub_685901()
static void research_always_researched_setup()
{
sub_68596F();
sub_68590C();
research_rides_setup();
research_scenery_sets_setup();
}
/**
@ -288,7 +317,7 @@ static rct_string_id research_item_get_name(uint32 researchItem)
if (rideEntry == NULL || rideEntry == (rct_ride_type*)0xFFFFFFFF)
return 0;
if (rideEntry->var_008 & 0x1000)
if (rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME)
return rideEntry->name;
return ((researchItem >> 8) & 0xFF) + 2;
@ -499,7 +528,7 @@ void window_editor_inventions_list_open()
if (w != NULL)
return;
sub_685901();
research_always_researched_setup();
w = window_create_centred(
600,

View File

@ -317,7 +317,7 @@ static void window_new_ride_populate_list()
if (currentCategory != rideEntry->category[0] && currentCategory != rideEntry->category[1])
continue;
if (rideEntry->var_008 & 0x2000) {
if (rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE) {
dh &= ~4;
nextListItem->type = rideType;
nextListItem->entry_index = rideEntryIndex;
@ -785,7 +785,7 @@ static void window_new_ride_paint()
uint32 typeId = RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_ITEM, uint32);
if (typeId >= 0x10000) {
rct_ride_type *rideEntry = RCT2_GLOBAL(0x009ACFA4 + (typeId & 0xFF) * 4, rct_ride_type*);
stringId = rideEntry->var_008 & 0x1000 ?
stringId = rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME ?
rideEntry->name :
(typeId & 0xFF00) + 2;
}
@ -823,7 +823,7 @@ static void window_new_ride_paint()
if (typeId != 0xFFFFFFFF) {
if (typeId >= 0x10000) {
rct_ride_type *rideEntry = RCT2_GLOBAL(0x009ACFA4 + (typeId & 0xFF) * 4, rct_ride_type*);
stringId = rideEntry->var_008 & 0x1000 ?
stringId = rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME ?
rideEntry->name :
((typeId >> 8) & 0xFF) + 2;
@ -942,7 +942,7 @@ static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixeli
// Ride name and description
rct_string_id rideName = rideEntry->name;
rct_string_id rideDescription = rideEntry->description;
if (!(rideEntry->var_008 & 0x1000)) {
if (!(rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME)) {
rideName = item.type + 2;
rideDescription = item.type + 512;
}

View File

@ -359,7 +359,7 @@ static void window_research_development_paint()
uint32 typeId = RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_ITEM, uint32);
if (typeId >= 0x10000) {
rct_ride_type *rideEntry = RCT2_GLOBAL(0x009ACFA4 + (typeId & 0xFF) * 4, rct_ride_type*);
stringId = rideEntry->var_008 & 0x1000 ?
stringId = rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME ?
rideEntry->name :
((typeId >> 8) & 0xFF) + 2;
}
@ -397,7 +397,7 @@ static void window_research_development_paint()
if (typeId != 0xFFFFFFFF) {
if (typeId >= 0x10000) {
rct_ride_type *rideEntry = RCT2_GLOBAL(0x009ACFA4 + (typeId & 0xFF) * 4, rct_ride_type*);
stringId = rideEntry->var_008 & 0x1000 ?
stringId = rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME ?
rideEntry->name :
((typeId >> 8) & 0xFF) + 2;

View File

@ -1028,7 +1028,7 @@ static void window_ride_draw_tab_vehicle(rct_drawpixelinfo *dpi, rct_window *w)
RCT2_CALLPROC_X(0x006DE4CD, (ride->num_cars_per_train << 8) | ride->subtype, 0, 0, 0, 0, 0, 0);
rideEntry = ride_get_entry(ride);
if (rideEntry->var_008 & 1) {
if (rideEntry->flags & RIDE_ENTRY_FLAG_0) {
dpi->zoom_level = 1;
dpi->width *= 2;
dpi->height *= 2;
@ -1141,7 +1141,7 @@ void window_ride_disable_tabs(rct_window *w)
rct_ride_type *type = GET_RIDE_ENTRY(ride->subtype);
if ((type->var_008 & 0x80000) != 0)
if ((type->flags & RIDE_ENTRY_FLAG_19) != 0)
disabled_tabs |= (1 << WIDX_TAB_5); // 0x100
w->disabled_widgets = disabled_tabs;
@ -2287,7 +2287,7 @@ static void window_ride_vehicle_mousedown(int widgetIndex, rct_window *w, rct_wi
rideEntryIndex = *currentRideEntryIndex;
currentRideEntry = GET_RIDE_ENTRY(rideEntryIndex);
// Skip if vehicle has the same track type, but not same subtype, unless subtype switching is enabled
if ((currentRideEntry->var_008 & 0x3000) && !gConfigInterface.allow_subtype_switching)
if ((currentRideEntry->flags & (RIDE_ENTRY_FLAG_SEPERATE_RIDE | RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME)) && !gConfigInterface.allow_subtype_switching)
continue;
quadIndex = rideEntryIndex >> 5;
@ -2448,7 +2448,7 @@ static void window_ride_vehicle_invalidate()
// Vehicle type
window_ride_vehicle_widgets[WIDX_VEHICLE_TYPE].image = rideEntry->name;
// Always show a dropdown button when changing subtypes is allowed
if ((var_496(w) <= 1 || (rideEntry->var_008 & (1 << 13))) && !gConfigInterface.allow_subtype_switching ) {
if ((var_496(w) <= 1 || (rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE)) && !gConfigInterface.allow_subtype_switching) {
window_ride_vehicle_widgets[WIDX_VEHICLE_TYPE].type = WWT_14;
window_ride_vehicle_widgets[WIDX_VEHICLE_TYPE_DROPDOWN].type = WWT_EMPTY;
w->enabled_widgets &= ~(1 << WIDX_VEHICLE_TYPE);
@ -2522,7 +2522,7 @@ static void window_ride_vehicle_paint()
gfx_draw_string_left(dpi, 3142, &stringId, 0, x, y);
y += 15;
if (!(rideEntry->var_008 & 0x2000) && var_496(w) > 1) {
if (!(rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE) && var_496(w) > 1) {
// Excitement Factor
factor = rideEntry->excitement_multipler;
if (factor > 0) {
@ -2749,11 +2749,11 @@ static void window_ride_mode_dropdown(rct_window *w, rct_widget *widget)
} while (*(mode++) != 255);
// ?
if (rideEntry->var_008 & 0x8000)
if (rideEntry->flags & RIDE_ENTRY_FLAG_15)
numAvailableModes--;
// ?
if (rideEntry->var_008 & 0x20000) {
if (rideEntry->flags & RIDE_ENTRY_FLAG_17) {
availableModes += 2;
numAvailableModes -= 2;
}

View File

@ -349,7 +349,7 @@ static void window_track_list_invalidate()
entry = GET_RIDE_ENTRY(_window_track_list_item.entry_index);
stringId = entry->name;
if (!(entry->var_008 & 0x1000))
if (!(entry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME))
stringId = _window_track_list_item.type + 2;
RCT2_GLOBAL(0x013CE952, uint16) = stringId;