forked from rosebudai/OpenRCT2-Web
Drop unused variables (#3586)
This commit is contained in:
1 parent
feb140b84c
commit
ca430e1b23
50 files changed
+15
-109
No files matched your search
@@ -590,7 +590,6 @@ int cmdline_for_sprite(const char **argv, int argc)
|
||||
int resourceLength = strlen(resourcePath);
|
||||
|
||||
bool silent = (argc >= 4 && strcmp(argv[3], "silent") == 0);
|
||||
bool fileExists = true;
|
||||
SDL_RWops *file;
|
||||
|
||||
spriteFileHeader.num_entries = 0;
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
#include "openrct2.h"
|
||||
#include "util/util.h"
|
||||
|
||||
// Magic number for original game cfg file
|
||||
static const int MagicNumber = 0x0003113A;
|
||||
|
||||
enum {
|
||||
CONFIG_VALUE_TYPE_BOOLEAN,
|
||||
CONFIG_VALUE_TYPE_UINT8,
|
||||
@@ -1196,7 +1193,6 @@ static void title_sequence_open(const char *path, const char *customName)
|
||||
SDL_RWops *file;
|
||||
int fileEnumHandle, i, preset;
|
||||
char parts[3 * 128], *token, *part1, *part2;
|
||||
char separator = platform_get_path_separator();
|
||||
|
||||
// Check for the script file
|
||||
safe_strcpy(scriptPath, path, MAX_PATH);
|
||||
|
||||
@@ -204,7 +204,6 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot
|
||||
right |= colour;
|
||||
RCT2_GLOBAL(0xEDF838,sint32) = right;
|
||||
//right <<= 4;
|
||||
int edi = esi;
|
||||
esi = RCT2_GLOBAL(0xEDF828,sint32);
|
||||
esi *= 0x40;
|
||||
left = 0;
|
||||
|
||||
@@ -67,7 +67,6 @@ int gfx_get_string_width_new_lined(utf8 *text)
|
||||
utf8 backup;
|
||||
int codepoint;
|
||||
|
||||
int width = 0;
|
||||
int maxWidth = 0;
|
||||
while ((codepoint = utf8_get_next(ch, (const utf8**)&nextCh)) != 0) {
|
||||
if (codepoint == FORMAT_NEWLINE || codepoint == FORMAT_NEWLINE_SMALLER) {
|
||||
@@ -979,7 +978,6 @@ static void ttf_draw_string_raw_ttf(rct_drawpixelinfo *dpi, const utf8 *text, te
|
||||
}
|
||||
}
|
||||
|
||||
int fontSize = font_get_size_from_sprite_base(info->font_sprite_base);
|
||||
int drawX = info->x + fontDesc->offset_x;
|
||||
int drawY = info->y + fontDesc->offset_y;
|
||||
int width = surface->w;
|
||||
|
||||
@@ -414,7 +414,6 @@ UITheme * UITheme::FromJson(const json_t * json)
|
||||
}
|
||||
|
||||
json_t * jsonEntries = json_object_get(json, "entries");
|
||||
size_t numEntries = json_object_size(jsonEntries);
|
||||
|
||||
UITheme * result = nullptr;
|
||||
try
|
||||
@@ -436,7 +435,6 @@ UITheme * UITheme::FromJson(const json_t * json)
|
||||
|
||||
const char * jkey;
|
||||
json_t * jvalue;
|
||||
size_t i = 0;
|
||||
json_object_foreach(jsonEntries, jkey, jvalue)
|
||||
{
|
||||
const WindowThemeDesc * wtDesc = GetWindowThemeDescriptor(jkey);
|
||||
|
||||
@@ -54,7 +54,6 @@ static utf8 _consoleBuffer[CONSOLE_BUFFER_SIZE] = { 0 };
|
||||
static utf8 *_consoleBufferPointer = _consoleBuffer;
|
||||
static utf8 *_consoleViewBufferStart = _consoleBuffer;
|
||||
static utf8 _consoleCurrentLine[CONSOLE_INPUT_SIZE];
|
||||
static utf8 *_consoleCurrentLinePointer = _consoleCurrentLine;
|
||||
static int _consoleCaretTicks;
|
||||
static utf8 _consolePrintfBuffer[CONSOLE_BUFFER_2_SIZE];
|
||||
static utf8 _consoleErrorBuffer[CONSOLE_BUFFER_2_SIZE];
|
||||
@@ -806,8 +805,6 @@ static int cc_load_object(const utf8 **argv, int argc) {
|
||||
utf8 path[MAX_PATH];
|
||||
|
||||
substitute_path(path, RCT2_ADDRESS(RCT2_ADDRESS_OBJECT_DATA_PATH, char), argv[0]);
|
||||
// Require pointer to start of filename
|
||||
utf8* last_char = path + strlen(path);
|
||||
strcat(path, ".DAT\0");
|
||||
|
||||
rct_object_entry entry;
|
||||
|
||||
@@ -180,7 +180,6 @@ void title_sequence_delete_preset(int preset)
|
||||
if (preset >= TITLE_SEQUENCE_DEFAULT_PRESETS && preset < gConfigTitleSequences.num_presets) {
|
||||
// Delete the folder
|
||||
utf8 path[MAX_PATH];
|
||||
char separator = platform_get_path_separator();
|
||||
platform_get_user_directory(path, "title sequences");
|
||||
strcat(path, gConfigTitleSequences.presets[preset].name);
|
||||
if (!platform_directory_delete(path)) {
|
||||
|
||||
@@ -662,7 +662,9 @@ void viewport_render(rct_drawpixelinfo *dpi, rct_viewport *viewport, int left, i
|
||||
if (left >= viewport->x + viewport->width)return;
|
||||
if (top >= viewport->y + viewport->height)return;
|
||||
|
||||
#ifdef DEBUG_SHOW_DIRTY_BOX
|
||||
int l = left, t = top, r = right, b = bottom;
|
||||
#endif
|
||||
|
||||
left = max(left - viewport->x, 0);
|
||||
right = min(right - viewport->x, viewport->width);
|
||||
@@ -783,7 +785,6 @@ void viewport_paint(rct_viewport* viewport, rct_drawpixelinfo* dpi, int left, in
|
||||
}
|
||||
RCT2_GLOBAL(0xEE7880, uint32) = 0xF1A4CC;
|
||||
RCT2_GLOBAL(0x140E9A8, uint32) = (int)dpi2;
|
||||
int ebp = 0, ebx = 0, esi = 0, ecx = 0;
|
||||
painter_setup();
|
||||
viewport_paint_setup();
|
||||
sub_688217();
|
||||
|
||||
@@ -1937,9 +1937,6 @@ void window_event_unknown_0E_call(rct_window *w)
|
||||
void window_get_scroll_size(rct_window *w, int scrollIndex, int *width, int *height)
|
||||
{
|
||||
if (w->event_handlers->get_scroll_size != NULL) {
|
||||
rct_widget *widget = window_get_scroll_widget(w, scrollIndex);
|
||||
int widgetIndex = window_get_widget_index(w, widget);
|
||||
|
||||
w->event_handlers->get_scroll_size(w, scrollIndex, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ void intro_update()
|
||||
{
|
||||
rct_drawpixelinfo *screenDPI = &gScreenDPI;
|
||||
int screenWidth = gScreenWidth;
|
||||
int screenHeight = gScreenHeight;
|
||||
uint8 (*part) = RCT2_ADDRESS(RCT2_ADDRESS_RUN_INTRO_TICK_PART, uint8);
|
||||
|
||||
screen_intro_process_mouse_input();
|
||||
|
||||
@@ -213,7 +213,6 @@ void finance_update_daily_profit()
|
||||
rct_peep *peep;
|
||||
|
||||
FOR_ALL_STAFF(sprite_index, peep) {
|
||||
uint8 staff_type = peep->staff_type;
|
||||
current_profit -= wage_table[peep->staff_type];
|
||||
}
|
||||
|
||||
|
||||
@@ -274,7 +274,6 @@ void news_item_add_to_queue(uint8 type, rct_string_id string_id, uint32 assoc)
|
||||
|
||||
void news_item_add_to_queue_raw(uint8 type, const utf8 *text, uint32 assoc)
|
||||
{
|
||||
int i = 0;
|
||||
rct_news_item *newsItem = RCT2_ADDRESS(RCT2_ADDRESS_NEWS_ITEM_LIST, rct_news_item);
|
||||
|
||||
// find first open slot
|
||||
@@ -404,7 +403,6 @@ void news_item_disable_news(uint8 type, uint32 assoc)
|
||||
|
||||
void news_item_add_to_queue_custom(rct_news_item *newNewsItem)
|
||||
{
|
||||
int i = 0;
|
||||
rct_news_item *newsItem = RCT2_ADDRESS(RCT2_ADDRESS_NEWS_ITEM_LIST, rct_news_item);
|
||||
|
||||
// Find first open slot
|
||||
|
||||
@@ -598,7 +598,6 @@ void research_insert_ride_entry(uint8 entryIndex, bool researched)
|
||||
|
||||
void research_insert_scenery_group_entry(uint8 entryIndex, bool researched)
|
||||
{
|
||||
rct_scenery_set_entry *scenerySetEntry = g_scenerySetEntries[entryIndex];
|
||||
research_insert(researched, entryIndex, RESEARCH_CATEGORY_SCENERYSET);
|
||||
}
|
||||
|
||||
|
||||
@@ -1012,7 +1012,6 @@ bool Network::CheckSRAND(uint32 tick, uint32 srand0)
|
||||
|
||||
void Network::KickPlayer(int playerId)
|
||||
{
|
||||
NetworkPlayer *player = GetPlayerByID(playerId);
|
||||
for(auto it = client_connection_list.begin(); it != client_connection_list.end(); it++) {
|
||||
if ((*it)->player->id == playerId) {
|
||||
// Disconnect the client gracefully
|
||||
|
||||
@@ -511,7 +511,6 @@ namespace Twitch
|
||||
*/
|
||||
static char * strchrm(const char * str, const char * find)
|
||||
{
|
||||
const char * result = nullptr;
|
||||
do
|
||||
{
|
||||
const char * fch = find;
|
||||
|
||||
@@ -359,7 +359,6 @@ int object_load_packed(SDL_RWops* rw)
|
||||
for (char* curr_char = last_char - 1;; --curr_char){
|
||||
if (*curr_char == '\\'){
|
||||
substitute_path(path, RCT2_ADDRESS(RCT2_ADDRESS_OBJECT_DATA_PATH, char), "00000000.DAT");
|
||||
char* last_char = path + strlen(path);
|
||||
break;
|
||||
}
|
||||
if (*curr_char < '0') *curr_char = '0';
|
||||
|
||||
@@ -775,8 +775,6 @@ static uint32 install_object_entry(rct_object_entry* entry, rct_object_entry* in
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8 objectType = entry->flags & 0xF;
|
||||
|
||||
// See above note
|
||||
RCT2_GLOBAL(0x009ADAF4, sint32) = -1;
|
||||
RCT2_GLOBAL(0x009ADAFD, uint8) = 0;
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
*/
|
||||
void ride_entrance_exit_paint(uint8 direction, int height, rct_map_element* map_element)
|
||||
{
|
||||
rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*);
|
||||
uint8 is_exit = map_element->properties.entrance.type == ENTRANCE_TYPE_RIDE_EXIT;
|
||||
|
||||
if (RCT2_GLOBAL(0x9DEA6F, uint8_t) & 1){
|
||||
@@ -234,7 +233,7 @@ void park_entrance_paint(uint8 direction, int height, rct_map_element* map_eleme
|
||||
if (entrance->scrolling_mode == 0xFF)
|
||||
break;
|
||||
|
||||
sub_98199C(scrolling_text_setup(park_text_id, scroll, entrance->scrolling_mode + direction / 2), 0, 0, 0x1C, 0x1C, 0x2F, height + entrance->text_height, 2, 2, height + entrance->text_height, get_current_rotation());
|
||||
sub_98199C(scrolling_text_setup(park_text_id, scroll, entrance->scrolling_mode + direction / 2), 0, 0, 0x1C, 0x1C, 0x2F, height + entrance->text_height, 2, 2, height + entrance->text_height, get_current_rotation());
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
|
||||
@@ -42,7 +42,6 @@ static void sub_68B3FB(int x, int y);
|
||||
*/
|
||||
void map_element_paint_setup(int x, int y)
|
||||
{
|
||||
rct_drawpixelinfo *dpi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*);
|
||||
if (
|
||||
x < gMapSizeUnits &&
|
||||
y < gMapSizeUnits &&
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ void game_command_hire_new_staff_member(int* eax, int* ebx, int* ecx, int* edx,
|
||||
|
||||
int newStaffId = i;
|
||||
|
||||
int _eax, _ebx, _ecx = _cx;
|
||||
int _eax, _ebx;
|
||||
rct_sprite_bounds *spriteBounds;
|
||||
_ebx = _bl;
|
||||
|
||||
|
||||
@@ -224,8 +224,6 @@ bool platform_open_common_file_dialog(utf8 *outFilename, file_dialog_desc *desc)
|
||||
char *flags;
|
||||
char filter[MAX_PATH] = { 0 };
|
||||
char filterPatternRegex[64];
|
||||
char *allFilesPatternDescription;
|
||||
int allFilesPatternLength = 0;
|
||||
|
||||
size = MAX_PATH;
|
||||
dtype = get_dialog_app(executable, &size);
|
||||
@@ -397,7 +395,6 @@ utf8 *platform_open_directory_browser(utf8 *title) {
|
||||
void platform_show_messagebox(char *message) {
|
||||
size_t size;
|
||||
dialog_type dtype;
|
||||
int exit_value;
|
||||
char cmd[MAX_PATH];
|
||||
char executable[MAX_PATH];
|
||||
|
||||
|
||||
@@ -332,7 +332,6 @@ int platform_enumerate_files_begin(const utf8 *pattern)
|
||||
enumFileInfo->paths = malloc(cnt * sizeof(char *));
|
||||
char **paths = enumFileInfo->paths;
|
||||
// 256 is size of dirent.d_name
|
||||
const int buf_len = min(MAX_PATH, 256);
|
||||
const int dir_name_len = strnlen(dir_name, MAX_PATH);
|
||||
char separator[] = {platform_get_path_separator(), 0};
|
||||
for (int idx = 0; idx < cnt; idx++)
|
||||
@@ -472,7 +471,6 @@ int platform_enumerate_directories_begin(const utf8 *directory)
|
||||
enumFileInfo->paths = malloc(cnt * sizeof(char *));
|
||||
char **paths = enumFileInfo->paths;
|
||||
// 256 is size of dirent.d_name
|
||||
const int buf_len = min(MAX_PATH, 256);
|
||||
const int dir_name_len = strnlen(npattern, MAX_PATH);
|
||||
char separator[] = {platform_get_path_separator(), 0};
|
||||
for (int idx = 0; idx < cnt; idx++)
|
||||
@@ -878,8 +876,6 @@ datetime64 platform_get_datetime_now_utc()
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
|
||||
uint64 utcEpoch = tv.tv_sec;
|
||||
|
||||
// Epoch starts from: 1970-01-01T00:00:00Z
|
||||
// Convert to ticks from 0001-01-01T00:00:00Z
|
||||
uint64 utcEpochTicks = (uint64)tv.tv_sec * 10000000ULL + tv.tv_usec * 10;
|
||||
|
||||
@@ -232,7 +232,6 @@ void S4Importer::AddAvailableEntriesFromMap()
|
||||
{
|
||||
uint8 pathColour = mapElement->type & 3;
|
||||
uint8 pathType = (mapElement->properties.path.type & 0xF0) >> 4;
|
||||
uint8 supportsType = (mapElement->flags & 0x60) >> 5;
|
||||
|
||||
pathType = (pathType << 2) | pathColour;
|
||||
uint8 pathAdditionsType = mapElement->properties.path.additions & 0x0F;
|
||||
@@ -1062,7 +1061,7 @@ void S4Importer::ImportSavedView()
|
||||
|
||||
void S4Importer::ClearExtraTileEntries()
|
||||
{
|
||||
// Reset the map tile pointers
|
||||
// Reset the map tile pointers
|
||||
for (int i = 0; i < 0x10000; i++)
|
||||
{
|
||||
gMapElementTilePointers[i] = (rct_map_element *)-1;
|
||||
@@ -1103,7 +1102,7 @@ void S4Importer::ClearExtraTileEntries()
|
||||
}
|
||||
}
|
||||
|
||||
// 128 extra rows left to fill with blank tiles
|
||||
// 128 extra rows left to fill with blank tiles
|
||||
for (int y = 0; y < 128 * 256; y++)
|
||||
{
|
||||
nextFreeMapElement->type = MAP_ELEMENT_TYPE_SURFACE;
|
||||
@@ -1233,7 +1232,6 @@ void S4Importer::FixPaths()
|
||||
// Type
|
||||
uint8 pathColour = mapElement->type & 3;
|
||||
uint8 pathType = (mapElement->properties.path.type & 0xF0) >> 4;
|
||||
uint8 supportsType = (mapElement->flags & 0x60) >> 5;
|
||||
|
||||
pathType = (pathType << 2) | pathColour;
|
||||
uint8 entryIndex = _pathTypeToEntryMap[pathType];
|
||||
|
||||
+1
-1
@@ -326,7 +326,7 @@ static void rct2_draw_fps()
|
||||
int y = 2;
|
||||
|
||||
// Measure FPS
|
||||
float fps = rct2_measure_fps();
|
||||
rct2_measure_fps();
|
||||
|
||||
// Format string
|
||||
utf8 buffer[64];
|
||||
|
||||
@@ -395,8 +395,6 @@ bool sub_6DF21B_loop(rct_vehicle* vehicle) {
|
||||
*/
|
||||
int cable_lift_update_track_motion(rct_vehicle *cableLift)
|
||||
{
|
||||
rct_ride* ride = get_ride(cableLift->ride);
|
||||
|
||||
RCT2_GLOBAL(0x00F64E2C, uint8) = 0;
|
||||
RCT2_GLOBAL(0x00F64E04, rct_vehicle*) = cableLift;
|
||||
RCT2_GLOBAL(0x00F64E18, uint32) = 0;
|
||||
|
||||
+7
-8
@@ -3374,19 +3374,19 @@ int ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint
|
||||
break;
|
||||
}
|
||||
rct_viewport* viewport = RCT2_GLOBAL(0x00F438A4, rct_viewport*);
|
||||
sint16 view_width = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_width;
|
||||
sint16 view_width = viewport->view_width;
|
||||
sint16 view_width2 = view_width * 2;
|
||||
sint16 view_x = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_x - view_width2;
|
||||
sint16 view_y = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_y - view_width;
|
||||
sint16 view_x2 = view_width2 + view_width2 + RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_width + view_x;
|
||||
sint16 view_y2 = view_width + view_width + RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_height + view_y;
|
||||
sint16 view_x = viewport->view_x - view_width2;
|
||||
sint16 view_y = viewport->view_y - view_width;
|
||||
sint16 view_x2 = view_width2 + view_width2 + viewport->view_width + view_x;
|
||||
sint16 view_y2 = view_width + view_width + viewport->view_height + view_y;
|
||||
if (view_x >= rotatedCoords.x ||
|
||||
view_y >= rotatedCoords.y ||
|
||||
view_x2 < rotatedCoords.x ||
|
||||
view_y2 < rotatedCoords.y) {
|
||||
goto label58;
|
||||
}
|
||||
int x2 = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->x + ((rotatedCoords.x - RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_x) >> RCT2_GLOBAL(0x00F438A4, rct_viewport*)->zoom);
|
||||
int x2 = viewport->x + ((rotatedCoords.x - viewport->view_x) >> viewport->zoom);
|
||||
x2 *= 0x10000;
|
||||
uint16 screenwidth = gScreenWidth;
|
||||
if (screenwidth < 64) {
|
||||
@@ -3394,7 +3394,7 @@ int ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint
|
||||
}
|
||||
int pan_x = ((x2 / screenwidth) - 0x8000) >> 4;
|
||||
|
||||
int y2 = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->y + ((rotatedCoords.y - RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_y) >> RCT2_GLOBAL(0x00F438A4, rct_viewport*)->zoom);
|
||||
int y2 = viewport->y + ((rotatedCoords.y - viewport->view_y) >> viewport->zoom);
|
||||
y2 *= 0x10000;
|
||||
uint16 screenheight = gScreenHeight;
|
||||
if (screenheight < 64) {
|
||||
@@ -4788,7 +4788,6 @@ bool ride_create_vehicles(rct_ride *ride, int rideIndex, rct_xy_element *element
|
||||
for (int i = 0; i < ride->num_vehicles; i++) {
|
||||
rct_vehicle *vehicle = GET_VEHICLE(ride->vehicles[i]);
|
||||
|
||||
rct_ride_entry *rideType = get_ride_entry(vehicle->vehicle_type);
|
||||
rct_ride_entry_vehicle *vehicleEntry = vehicle_get_vehicle_entry(vehicle);
|
||||
|
||||
if (!(vehicleEntry->flags_b & VEHICLE_ENTRY_FLAG_B_15)) {
|
||||
|
||||
@@ -791,8 +791,6 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
|
||||
}
|
||||
|
||||
//6c53dc
|
||||
// push baseZ and clearanceZ
|
||||
int cur_z = baseZ * 8;
|
||||
|
||||
if ((flags & GAME_COMMAND_FLAG_APPLY) && !(flags & GAME_COMMAND_FLAG_GHOST)) {
|
||||
footpath_remove_litter(x, y, z);
|
||||
|
||||
@@ -1077,7 +1077,6 @@ bool track_design_place_ride(rct_track_td6 *td6, sint16 x, sint16 y, sint16 z, u
|
||||
|
||||
//di
|
||||
sint16 tempZ = z - trackCoordinates->z_begin;
|
||||
uint32 trackFlags = track->flags;
|
||||
uint32 edi =
|
||||
((track->flags & 0x0F) << 17) |
|
||||
((track->flags & 0x0F) << 28) |
|
||||
|
||||
@@ -3160,9 +3160,6 @@ static void vehicle_update_travelling_cable_lift(rct_vehicle* vehicle) {
|
||||
}
|
||||
}
|
||||
|
||||
rct_ride_entry* rideEntry = get_ride_entry(vehicle->ride_subtype);
|
||||
rct_ride_entry_vehicle* vehicleEntry = &rideEntry->vehicles[vehicle->vehicle_type];
|
||||
|
||||
if (vehicle->velocity <= 439800) {
|
||||
vehicle->acceleration = 4398;
|
||||
}
|
||||
@@ -8013,8 +8010,6 @@ int vehicle_update_track_motion(rct_vehicle *vehicle, int *outStation)
|
||||
rct_ride_entry *rideEntry = get_ride_entry(vehicle->ride_subtype);
|
||||
rct_ride_entry_vehicle *vehicleEntry = vehicle_get_vehicle_entry(vehicle);
|
||||
|
||||
rct_map_element *mapElement = NULL;
|
||||
|
||||
if (vehicleEntry->flags_a & VEHICLE_ENTRY_FLAG_A_MINI_GOLF) {
|
||||
return vehicle_update_track_motion_mini_golf(vehicle, outStation);
|
||||
}
|
||||
|
||||
@@ -773,7 +773,6 @@ int scenario_write_available_objects(FILE *file)
|
||||
void scenario_fix_ghosts(rct_s6_data *s6)
|
||||
{
|
||||
// Remove all ghost elements
|
||||
size_t mapElementTotalSize = MAX_MAP_ELEMENTS * sizeof(rct_map_element);
|
||||
rct_map_element *destinationElement = s6->map_elements;
|
||||
|
||||
for (int y = 0; y < 256; y++) {
|
||||
|
||||
@@ -331,7 +331,6 @@ static void visible_list_refresh(rct_window *w)
|
||||
for (int i = 0; i < numObjects; i++) {
|
||||
rct_object_filters *filter = get_object_filter(i);
|
||||
int type = entry->flags & 0x0F;
|
||||
int source = (entry->flags & 0xF0) >> 4;
|
||||
if (type == w->selected_tab && !(*itemFlags & OBJECT_SELECTION_FLAG_6) && filter_source(entry) && filter_string(entry, filter) && filter_chunks(entry, filter)) {
|
||||
currentListItem->entry = entry;
|
||||
currentListItem->filter = filter;
|
||||
|
||||
@@ -1043,8 +1043,6 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi
|
||||
*/
|
||||
static void window_editor_objective_options_rides_mouseup(rct_window *w, int widgetIndex)
|
||||
{
|
||||
rct_s6_info *s6Info = (rct_s6_info*)0x00141F570;
|
||||
|
||||
switch (widgetIndex) {
|
||||
case WIDX_CLOSE:
|
||||
window_close(w);
|
||||
|
||||
@@ -850,7 +850,6 @@ static void window_guest_list_find_groups()
|
||||
if (groupIndex >= 240)
|
||||
break;
|
||||
|
||||
int ax = peep->sprite_index;
|
||||
_window_guest_list_num_groups++;
|
||||
_window_guest_list_groups_num_guests[groupIndex] = 1;
|
||||
peep->flags &= ~(SPRITE_FLAGS_PEEP_VISIBLE);
|
||||
|
||||
@@ -328,7 +328,6 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
y += 10;
|
||||
|
||||
// Drop height is multiplied by 0.75
|
||||
uint16 dropHeight = (td6->highest_drop_height + (td6->highest_drop_height / 2)) / 2;
|
||||
gfx_draw_string_left(dpi, STR_HIGHEST_DROP_HEIGHT, &drops, 0, x, y);
|
||||
y += 10;
|
||||
}
|
||||
|
||||
@@ -338,10 +338,6 @@ static void window_multiplayer_players_scrollmousedown(rct_window *w, int scroll
|
||||
w->selected_list_item = index;
|
||||
window_invalidate(w);
|
||||
|
||||
rct_widget *listWidget = &w->widgets[WIDX_LIST];
|
||||
int ddx = w->x + listWidget->left + x - w->scrolls[0].h_left;
|
||||
int ddy = w->y + listWidget->top + y - w->scrolls[0].v_top;
|
||||
|
||||
window_player_open(network_get_player_id(index));
|
||||
}
|
||||
|
||||
@@ -559,10 +555,6 @@ static void window_multiplayer_groups_scrollmousedown(rct_window *w, int scrollI
|
||||
w->selected_list_item = index;
|
||||
window_invalidate(w);
|
||||
|
||||
rct_widget *listWidget = &w->widgets[WIDX_LIST];
|
||||
int ddx = w->x + listWidget->left + x - w->scrolls[0].h_left;
|
||||
int ddy = w->y + listWidget->top + y - w->scrolls[0].v_top;
|
||||
|
||||
game_do_command(2 | (_selectedGroup << 8), GAME_COMMAND_FLAG_APPLY, index, 0, GAME_COMMAND_MODIFY_GROUPS, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,6 @@ void window_player_open(uint8 id)
|
||||
{
|
||||
rct_window* window;
|
||||
|
||||
int player = network_get_player_index(id);
|
||||
window = window_bring_to_front_by_number(WC_PLAYER, id);
|
||||
if (window == NULL) {
|
||||
window = window_create_auto_pos(240, 170, &window_player_overview_events, WC_PLAYER, WF_RESIZABLE);
|
||||
|
||||
@@ -521,7 +521,6 @@ static void window_research_funding_invalidate(rct_window *w)
|
||||
|
||||
// Checkboxes
|
||||
uint8 activeResearchTypes = gResearchPriorities;
|
||||
int uncompletedResearchTypes = gResearchUncompletedCategories;
|
||||
for (int i = 0; i < 7; i++) {
|
||||
int mask = 1 << i;
|
||||
int widgetMask = 1 << (i + WIDX_TRANSPORT_RIDES);
|
||||
|
||||
@@ -4627,8 +4627,6 @@ static void cancel_scenery_selection(){
|
||||
*/
|
||||
static void setup_scenery_selection(rct_window* w)
|
||||
{
|
||||
rct_ride* ride = get_ride(w->number);
|
||||
|
||||
if (RCT2_GLOBAL(0x009DEA6F, uint8) & 1){
|
||||
cancel_scenery_selection();
|
||||
}
|
||||
@@ -4755,8 +4753,6 @@ static void window_ride_measurements_mousedown(int widgetIndex, rct_window *w, r
|
||||
if (widgetIndex != WIDX_SAVE_TRACK_DESIGN)
|
||||
return;
|
||||
|
||||
rct_ride *ride = get_ride(w->number);
|
||||
|
||||
gDropdownItemsFormat[0] = STR_SAVE_TRACK_DESIGN_ITEM;
|
||||
gDropdownItemsFormat[1] = STR_SAVE_TRACK_DESIGN_WITH_SCENERY_ITEM;
|
||||
|
||||
|
||||
@@ -3939,7 +3939,7 @@ static void ride_construction_tooldown_entrance_exit(int screenX, int screenY)
|
||||
STR_CANT_BUILD_MOVE_EXIT_FOR_THIS_RIDE_ATTRACTION;
|
||||
|
||||
game_command_callback = game_command_callback_place_ride_entrance_or_exit;
|
||||
money32 cost = game_do_command(
|
||||
game_do_command(
|
||||
RCT2_GLOBAL(0x00F44188, uint16),
|
||||
(GAME_COMMAND_FLAG_APPLY) | ((RCT2_GLOBAL(0x00F44194, uint8) ^ 2) << 8),
|
||||
RCT2_GLOBAL(0x00F4418A, uint16),
|
||||
|
||||
@@ -284,8 +284,6 @@ static void window_server_list_scroll_mousedown(rct_window *w, int scrollIndex,
|
||||
if (serverIndex < 0) return;
|
||||
if (serverIndex >= _numServerEntries) return;
|
||||
|
||||
char *serverAddress = _serverEntries[serverIndex].address;
|
||||
|
||||
rct_widget *listWidget = &w->widgets[WIDX_LIST];
|
||||
int ddx = w->x + listWidget->left + x + 2 - w->scrolls[0].h_left;
|
||||
int ddy = w->y + listWidget->top + y + 2 - w->scrolls[0].v_top;
|
||||
@@ -782,7 +780,6 @@ static void fetch_servers_callback(http_json_response* response)
|
||||
json_t *maxPlayers = json_object_get(server, "maxPlayers");
|
||||
json_t *ip = json_object_get(server, "ip");
|
||||
json_t *ip4 = json_object_get(ip, "v4");
|
||||
json_t *ip6 = json_object_get(ip, "v6");
|
||||
json_t *addressIp = json_array_get(ip4, 0);
|
||||
|
||||
if (name == NULL || version == NULL)
|
||||
|
||||
@@ -536,8 +536,6 @@ static void window_sign_small_mouseup(rct_window *w, int widgetIndex)
|
||||
*/
|
||||
static void window_sign_small_dropdown(rct_window *w, int widgetIndex, int dropdownIndex)
|
||||
{
|
||||
rct_banner* banner = &gBanners[w->number];
|
||||
|
||||
switch (widgetIndex){
|
||||
case WIDX_MAIN_COLOUR:
|
||||
if (dropdownIndex == -1) return;
|
||||
|
||||
@@ -556,8 +556,6 @@ void window_staff_overview_dropdown(rct_window *w, int widgetIndex, int dropdown
|
||||
// Clear patrol
|
||||
if (dropdownIndex == 1) {
|
||||
rct_peep* peep = GET_PEEP(w->number);
|
||||
int edi = peep->staff_id;
|
||||
int ebx = edi << 9;
|
||||
|
||||
for (int i = 0; i < 128; i++)
|
||||
{
|
||||
|
||||
@@ -180,8 +180,6 @@ void window_staff_list_open()
|
||||
}
|
||||
|
||||
void window_staff_list_cancel_tools(rct_window *w) {
|
||||
int toolWindowClassification = gCurrentToolWidget.window_classification;
|
||||
int toolWindowNumber = gCurrentToolWidget.window_number;
|
||||
if (gInputFlags & INPUT_FLAG_TOOL_ACTIVE)
|
||||
if (w->classification == gCurrentToolWidget.window_classification && w->number == gCurrentToolWidget.window_number)
|
||||
tool_cancel();
|
||||
|
||||
@@ -342,7 +342,6 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
|
||||
void window_text_input_key(rct_window* w, int key)
|
||||
{
|
||||
int text = key;
|
||||
char new_char = platform_scancode_to_rct_keycode(0xFF&key);
|
||||
|
||||
// If the return button is pressed stop text input
|
||||
|
||||
@@ -20,11 +20,6 @@
|
||||
#include "../interface/widget.h"
|
||||
#include "../interface/window.h"
|
||||
|
||||
static rct_widget window_title_logo_widgets[] = {
|
||||
{ WWT_EMPTY, 0, 0, 0, 0, 0, 0xFFFFFFFF, STR_NONE },
|
||||
{ WIDGETS_END },
|
||||
};
|
||||
|
||||
static void window_title_logo_paint(rct_window *w, rct_drawpixelinfo *dpi);
|
||||
|
||||
static rct_window_event_list window_title_logo_events = {
|
||||
|
||||
@@ -1442,12 +1442,10 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window *w
|
||||
|
||||
int selectedTab = window_scenery_selected_scenery_by_tab[window_scenery_active_tab_index];
|
||||
uint8 sceneryType = (selectedTab & 0xFF00) >> 8;
|
||||
uint8 selectedScenery = selectedTab & 0xFF;
|
||||
|
||||
if (selectedTab == -1) return;
|
||||
|
||||
sint16 gridX, gridY;
|
||||
int ebp = selectedTab;
|
||||
uint32 parameter_1, parameter_2, parameter_3;
|
||||
|
||||
sub_6E1F34(x, y, selectedTab, &gridX, &gridY, ¶meter_1, ¶meter_2, ¶meter_3);
|
||||
@@ -2110,7 +2108,6 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa
|
||||
scenery_remove_ghost_tool_placement();
|
||||
|
||||
uint8 scenery_type = (selected_tab & 0xFF00) >> 8;
|
||||
uint8 selected_scenery = selected_tab & 0xFF;
|
||||
money32 cost = 0;
|
||||
rct_map_element* mapElement;
|
||||
|
||||
|
||||
@@ -515,7 +515,6 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
||||
y += 10;
|
||||
|
||||
// Drop height is multiplied by 0.75
|
||||
uint16 dropHeight = (td6->highest_drop_height + (td6->highest_drop_height / 2)) / 2;
|
||||
gfx_draw_string_left(dpi, STR_HIGHEST_DROP_HEIGHT, &drops, 0, x, y);
|
||||
y += 10;
|
||||
}
|
||||
|
||||
@@ -1040,7 +1040,6 @@ void game_command_set_scenery_colour(int* eax, int* ebx, int* ecx, int* edx, int
|
||||
}
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
rct_map_element *map_element = map_get_small_scenery_element_at(x, y, base_height, scenery_type, quadrant);
|
||||
|
||||
if (map_element == NULL) {
|
||||
@@ -1093,7 +1092,6 @@ void game_command_set_fence_colour(int* eax, int* ebx, int* ecx, int* edx, int*
|
||||
return;
|
||||
}
|
||||
|
||||
bool fence_found = false;
|
||||
rct_map_element* map_element = map_get_fence_element_at(x, y, base_height, map_element_direction);
|
||||
|
||||
if (map_element == NULL) {
|
||||
@@ -4160,7 +4158,6 @@ int map_can_construct_with_clear_at(int x, int y, int zLow, int zHigh, CLEAR_FUN
|
||||
}
|
||||
loc_68BABC:
|
||||
if (clearFunc != NULL) {
|
||||
int zero = 0;
|
||||
if (!clearFunc(&map_element, x, y, flags, price)) {
|
||||
continue;
|
||||
}
|
||||
@@ -4171,7 +4168,6 @@ int map_can_construct_with_clear_at(int x, int y, int zLow, int zHigh, CLEAR_FUN
|
||||
return false;
|
||||
loc_68BAE6:
|
||||
if (clearFunc != NULL) {
|
||||
int zero = 0;
|
||||
if (!clearFunc(&map_element, x, y, flags, price)) {
|
||||
goto loc_68B9B7;
|
||||
}
|
||||
|
||||
@@ -310,7 +310,6 @@ static bool map_animation_invalidate_track_onridephoto(int x, int y, int baseZ)
|
||||
{
|
||||
rct_map_element *mapElement;
|
||||
|
||||
bool wasInvalidated = false;
|
||||
mapElement = map_get_first_element_at(x >> 5, y >> 5);
|
||||
do {
|
||||
if (mapElement->base_height != baseZ)
|
||||
@@ -319,7 +318,6 @@ static bool map_animation_invalidate_track_onridephoto(int x, int y, int baseZ)
|
||||
continue;
|
||||
|
||||
if (mapElement->properties.track.type == TRACK_ELEM_ON_RIDE_PHOTO) {
|
||||
int z = mapElement->base_height * 8;
|
||||
map_invalidate_tile_zoom1(x, y, mapElement->base_height * 8, mapElement->clearance_height * 8);
|
||||
if (game_is_paused()) {
|
||||
return false;
|
||||
|
||||
@@ -275,7 +275,6 @@ static void sprite_steam_particle_update(rct_steam_particle *steam)
|
||||
{
|
||||
invalidate_sprite_2((rct_sprite*)steam);
|
||||
|
||||
int original_var24 = steam->var_24;
|
||||
steam->var_24 += 0x5555;
|
||||
if (steam->var_24 < 0x5555) {
|
||||
sprite_move(
|
||||
|
||||
Reference in new issue
Block a user