mirror of https://github.com/OpenRCT2/OpenRCT2.git
Name some track design flags
This commit is contained in:
parent
05ac1a49b6
commit
ff7e119b46
|
@ -683,12 +683,12 @@ static int track_design_place_scenery(rct_td6_scenery_element *scenery_start, ui
|
||||||
if (!find_object_in_entry_group(&scenery->scenery_object, &entry_type, &entry_index)){
|
if (!find_object_in_entry_group(&scenery->scenery_object, &entry_type, &entry_index)){
|
||||||
entry_type = scenery->scenery_object.flags & 0xF;
|
entry_type = scenery->scenery_object.flags & 0xF;
|
||||||
if (entry_type != OBJECT_TYPE_PATHS){
|
if (entry_type != OBJECT_TYPE_PATHS){
|
||||||
byte_F4414E |= 1 << 1;
|
byte_F4414E |= BYTE_F4414E_SCENERY_UNAVAILABLE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gScreenFlags&SCREEN_FLAGS_TRACK_DESIGNER){
|
if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER){
|
||||||
byte_F4414E |= 1 << 1;
|
byte_F4414E |= BYTE_F4414E_SCENERY_UNAVAILABLE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -699,12 +699,12 @@ static int track_design_place_scenery(rct_td6_scenery_element *scenery_start, ui
|
||||||
|
|
||||||
if (path == (rct_footpath_entry*)-1)
|
if (path == (rct_footpath_entry*)-1)
|
||||||
continue;
|
continue;
|
||||||
if (path->flags & (1 << 2))
|
if (path->flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entry_index == object_entry_group_counts[OBJECT_TYPE_PATHS]){
|
if (entry_index == object_entry_group_counts[OBJECT_TYPE_PATHS]){
|
||||||
byte_F4414E |= 1 << 1;
|
byte_F4414E |= BYTE_F4414E_SCENERY_UNAVAILABLE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -847,7 +847,7 @@ static int track_design_place_scenery(rct_td6_scenery_element *scenery_start, ui
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
byte_F4414E |= 1 << 1;
|
byte_F4414E |= BYTE_F4414E_SCENERY_UNAVAILABLE;
|
||||||
continue;
|
continue;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1350,9 +1350,9 @@ static bool sub_6D2189(rct_track_td6 *td6, money32 *cost, uint8 *rideId, uint8 *
|
||||||
z += 16 - word_F44129;
|
z += 16 - word_F44129;
|
||||||
|
|
||||||
int operation = PTD_OPERATION_GET_COST;
|
int operation = PTD_OPERATION_GET_COST;
|
||||||
if (byte_F4414E & 2) {
|
if (byte_F4414E & BYTE_F4414E_SCENERY_UNAVAILABLE) {
|
||||||
operation |= 0x80;
|
operation |= 0x80;
|
||||||
*flags |= 1;
|
*flags |= TRACK_DESIGN_FLAG_SCENERY_UNAVAILABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
money32 resultCost = sub_6D01B3(td6, operation, rideIndex, mapSize, mapSize, z);
|
money32 resultCost = sub_6D01B3(td6, operation, rideIndex, mapSize, mapSize, z);
|
||||||
|
@ -1360,7 +1360,7 @@ static bool sub_6D2189(rct_track_td6 *td6, money32 *cost, uint8 *rideId, uint8 *
|
||||||
|
|
||||||
if (resultCost != MONEY32_UNDEFINED) {
|
if (resultCost != MONEY32_UNDEFINED) {
|
||||||
if (!find_object_in_entry_group(&td6->vehicle_object, &entry_type, &entry_index)){
|
if (!find_object_in_entry_group(&td6->vehicle_object, &entry_type, &entry_index)){
|
||||||
*flags |= 4;
|
*flags |= TRACK_DESIGN_FLAG_VEHICLE_UNAVAILABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
_currentTrackPieceDirection = backup_rotation;
|
_currentTrackPieceDirection = backup_rotation;
|
||||||
|
@ -1422,7 +1422,7 @@ static money32 place_track_design(sint16 x, sint16 y, sint16 z, uint8 flags, uin
|
||||||
if (!(flags & GAME_COMMAND_FLAG_APPLY)) {
|
if (!(flags & GAME_COMMAND_FLAG_APPLY)) {
|
||||||
byte_F44150 = 0;
|
byte_F44150 = 0;
|
||||||
cost = sub_6D01B3(td6, PTD_OPERATION_1, rideIndex, x, y, z);
|
cost = sub_6D01B3(td6, PTD_OPERATION_1, rideIndex, x, y, z);
|
||||||
if (byte_F4414E & (1 << 1)) {
|
if (byte_F4414E & BYTE_F4414E_SCENERY_UNAVAILABLE) {
|
||||||
byte_F44150 |= 1 << 7;
|
byte_F44150 |= 1 << 7;
|
||||||
cost = sub_6D01B3(td6, 0x80 | PTD_OPERATION_1, rideIndex, x, y, z);
|
cost = sub_6D01B3(td6, 0x80 | PTD_OPERATION_1, rideIndex, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,6 +166,15 @@ enum {
|
||||||
TDPF_PLACE_SCENERY = 1 << 0,
|
TDPF_PLACE_SCENERY = 1 << 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
TRACK_DESIGN_FLAG_SCENERY_UNAVAILABLE = (1 << 0),
|
||||||
|
TRACK_DESIGN_FLAG_VEHICLE_UNAVAILABLE = (1 << 2),
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
BYTE_F4414E_SCENERY_UNAVAILABLE = (1 << 1),
|
||||||
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PTD_OPERATION_DRAW_OUTLINES,
|
PTD_OPERATION_DRAW_OUTLINES,
|
||||||
PTD_OPERATION_1,
|
PTD_OPERATION_1,
|
||||||
|
|
|
@ -590,7 +590,7 @@ static void window_footpath_show_footpath_types_dialog(rct_window *w, rct_widget
|
||||||
rct_footpath_entry *pathType;
|
rct_footpath_entry *pathType;
|
||||||
|
|
||||||
numPathTypes = 0;
|
numPathTypes = 0;
|
||||||
flags = 4;
|
flags = FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR;
|
||||||
// If the game is in sandbox mode, also show paths that are normally restricted to the scenario editor, but not their queues (since these usually shouldn't have one)
|
// If the game is in sandbox mode, also show paths that are normally restricted to the scenario editor, but not their queues (since these usually shouldn't have one)
|
||||||
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || (gCheatsSandboxMode && !showQueues))
|
if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || (gCheatsSandboxMode && !showQueues))
|
||||||
flags = 0;
|
flags = 0;
|
||||||
|
|
|
@ -429,13 +429,13 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||||
|
|
||||||
RCT2_GLOBAL(0x00F44153, uint8) = 0;
|
RCT2_GLOBAL(0x00F44153, uint8) = 0;
|
||||||
// Warnings
|
// Warnings
|
||||||
if ((td6->track_flags & 4) && !(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
|
if ((td6->track_flags & TRACK_DESIGN_FLAG_VEHICLE_UNAVAILABLE) && !(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) {
|
||||||
// Vehicle design not available
|
// Vehicle design not available
|
||||||
gfx_draw_string_centred_clipped(dpi, STR_VEHICLE_DESIGN_UNAVAILABLE, NULL, 0, x, y, 368);
|
gfx_draw_string_centred_clipped(dpi, STR_VEHICLE_DESIGN_UNAVAILABLE, NULL, 0, x, y, 368);
|
||||||
y -= 10;
|
y -= 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (td6->track_flags & 1) {
|
if (td6->track_flags & TRACK_DESIGN_FLAG_SCENERY_UNAVAILABLE) {
|
||||||
RCT2_GLOBAL(0x00F44153, uint8) = 1;
|
RCT2_GLOBAL(0x00F44153, uint8) = 1;
|
||||||
if (!gTrackDesignSceneryToggle) {
|
if (!gTrackDesignSceneryToggle) {
|
||||||
// Scenery not available
|
// Scenery not available
|
||||||
|
|
|
@ -39,6 +39,10 @@ typedef struct rct_footpath_entry {
|
||||||
assert_struct_size(rct_footpath_entry, 13);
|
assert_struct_size(rct_footpath_entry, 13);
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
enum {
|
||||||
|
FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR = (1 << 2),
|
||||||
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
FOOTPATH_SEARCH_SUCCESS,
|
FOOTPATH_SEARCH_SUCCESS,
|
||||||
FOOTPATH_SEARCH_NOT_FOUND,
|
FOOTPATH_SEARCH_NOT_FOUND,
|
||||||
|
|
Loading…
Reference in New Issue