From 7d0ce00baba5cb871d355f68ecd11f4cdd3cd893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Tue, 20 Oct 2015 20:16:30 +0200 Subject: [PATCH] Strip all whitespace --- distribution/windows/install.nsi | 24 +- projects/resource.h | 2 +- src/audio/mixer.cpp | 4 +- src/audio/mixer.h | 4 +- src/cheats.h | 4 +- src/cmdline.c | 6 +- src/cmdline.h | 4 +- src/cmdline_sprite.c | 20 +- src/config.h | 4 +- src/drawing/drawing.h | 6 +- src/drawing/font.c | 4 +- src/drawing/line.c | 4 +- src/drawing/rain.c | 14 +- src/drawing/rect.c | 20 +- src/drawing/scrolling_text.c | 10 +- src/drawing/sprite.c | 20 +- src/editor.c | 14 +- src/editor.h | 4 +- src/game.h | 6 +- src/hook.h | 4 +- src/input.c | 42 ++-- src/input.h | 4 +- src/interface/console.c | 4 +- src/interface/graph.c | 4 +- src/interface/graph.h | 4 +- src/interface/keyboard_shortcut.c | 8 +- src/interface/keyboard_shortcut.h | 4 +- src/interface/screenshot.h | 4 +- src/interface/themes.c | 4 +- src/interface/title_sequences.c | 10 +- src/interface/viewport.h | 4 +- src/interface/viewport_interaction.c | 34 +-- src/interface/widget.c | 54 ++--- src/interface/widget.h | 4 +- src/interface/window.h | 10 +- src/intro.c | 8 +- src/intro.h | 6 +- src/management/award.c | 6 +- src/management/award.h | 4 +- src/management/finance.c | 4 +- src/management/marketing.c | 8 +- src/management/marketing.h | 4 +- src/management/news_item.c | 10 +- src/management/news_item.h | 4 +- src/management/research.c | 12 +- src/management/research.h | 6 +- src/network/network.cpp | 12 +- src/network/network.h | 4 +- src/network/twitch.cpp | 2 +- src/openrct2.h | 4 +- src/peep/peep.c | 4 +- src/peep/peep.h | 12 +- src/peep/staff.c | 6 +- src/peep/staff.h | 4 +- src/platform/osx.c | 4 +- src/platform/shared.c | 2 +- src/rct1.c | 18 +- src/rct1.h | 6 +- src/rct2.c | 22 +- src/ride/ride.h | 8 +- src/ride/ride_data.h | 4 +- src/ride/ride_ratings.c | 98 ++++---- src/ride/ride_ratings.h | 4 +- src/ride/station.c | 6 +- src/ride/station.h | 4 +- src/ride/track.h | 6 +- src/ride/track_data.c | 138 +++++------ src/ride/vehicle.c | 14 +- src/ride/vehicle.h | 4 +- src/scenario_list.c | 10 +- src/sprites.h | 6 +- src/title.h | 6 +- src/tutorial.c | 4 +- src/tutorial.h | 4 +- src/util/util.c | 4 +- src/util/util.h | 4 +- src/windows/about.c | 12 +- src/windows/banner.c | 32 +-- src/windows/cheats.c | 10 +- src/windows/clear_scenery.c | 10 +- src/windows/dropdown.c | 12 +- src/windows/dropdown.h | 4 +- src/windows/editor_bottom_toolbar.c | 14 +- src/windows/editor_inventions_list.c | 18 +- src/windows/editor_object_selection.c | 46 ++-- src/windows/editor_objective_options.c | 6 +- src/windows/editor_scenario_options.c | 10 +- src/windows/error.c | 12 +- src/windows/error.h | 4 +- src/windows/finances.c | 58 ++--- src/windows/footpath.c | 58 ++--- src/windows/game_bottom_toolbar.c | 18 +- src/windows/guest_list.c | 48 ++-- src/windows/install_track.c | 4 +- src/windows/land.c | 4 +- src/windows/land_rights.c | 4 +- src/windows/loadsave.c | 8 +- src/windows/main.c | 6 +- src/windows/map.c | 30 +-- src/windows/map_tooltip.c | 12 +- src/windows/mapgen.c | 8 +- src/windows/maze_construction.c | 18 +- src/windows/music_credits.c | 4 +- src/windows/network_status.c | 4 +- src/windows/new_campaign.c | 22 +- src/windows/new_ride.c | 14 +- src/windows/news.c | 22 +- src/windows/options.c | 20 +- src/windows/park.c | 66 +++--- src/windows/player_list.c | 4 +- src/windows/research.c | 26 +- src/windows/ride.c | 314 ++++++++++++------------- src/windows/ride_construction.c | 66 +++--- src/windows/ride_list.c | 40 ++-- src/windows/save_prompt.c | 4 +- src/windows/scenery.c | 28 +-- src/windows/server_list.c | 4 +- src/windows/shortcut_keys.c | 6 +- src/windows/sign.c | 6 +- src/windows/staff.c | 30 +-- src/windows/staff_fire_prompt.c | 8 +- src/windows/staff_list.c | 8 +- src/windows/text_input.c | 14 +- src/windows/themes.c | 2 +- src/windows/tile_inspector.c | 2 +- src/windows/title_command_editor.c | 14 +- src/windows/title_editor.c | 28 +-- src/windows/title_exit.c | 6 +- src/windows/title_logo.c | 6 +- src/windows/title_menu.c | 4 +- src/windows/title_options.c | 4 +- src/windows/title_scenarioselect.c | 8 +- src/windows/tooltip.c | 18 +- src/windows/tooltip.h | 4 +- src/windows/top_toolbar.c | 80 +++---- src/windows/track_list.c | 6 +- src/windows/track_manage.c | 4 +- src/windows/track_place.c | 20 +- src/windows/viewport.c | 6 +- src/windows/water.c | 6 +- src/world/banner.c | 4 +- src/world/banner.h | 4 +- src/world/climate.c | 24 +- src/world/climate.h | 4 +- src/world/footpath.c | 40 ++-- src/world/footpath.h | 4 +- src/world/fountain.c | 10 +- src/world/fountain.h | 4 +- src/world/map.c | 84 +++---- src/world/map.h | 4 +- src/world/map_animation.c | 8 +- src/world/map_animation.h | 4 +- src/world/map_helpers.c | 12 +- src/world/map_helpers.h | 4 +- src/world/mapgen.c | 8 +- src/world/mapgen.h | 4 +- src/world/park.c | 40 ++-- src/world/park.h | 4 +- src/world/scenery.c | 12 +- src/world/scenery.h | 4 +- src/world/sprite.c | 10 +- src/world/sprite.h | 4 +- test/tests.c | 2 +- 163 files changed, 1280 insertions(+), 1280 deletions(-) diff --git a/distribution/windows/install.nsi b/distribution/windows/install.nsi index 83c2e0ea5d..837658b62f 100644 --- a/distribution/windows/install.nsi +++ b/distribution/windows/install.nsi @@ -121,7 +121,7 @@ Section "!OpenRCT2" Section1 ; Copy the rest of the stuff SetOutPath "$INSTDIR\" - + ; Copy curl ca file File ..\..\curl-ca-bundle.crt @@ -370,14 +370,14 @@ FunctionEnd ; $var=2 Version2 is newer Function VersionCompare !define VersionCompare `!insertmacro VersionCompareCall` - + !macro VersionCompareCall _VER1 _VER2 _RESULT Push `${_VER1}` Push `${_VER2}` Call VersionCompare Pop ${_RESULT} !macroend - + Exch $1 Exch Exch $0 @@ -388,7 +388,7 @@ Function VersionCompare Push $5 Push $6 Push $7 - + begin: StrCpy $2 -1 IntOp $2 $2 + 1 @@ -398,7 +398,7 @@ Function VersionCompare StrCpy $4 $0 $2 IntOp $2 $2 + 1 StrCpy $0 $0 '' $2 - + StrCpy $2 -1 IntOp $2 $2 + 1 StrCpy $3 $1 1 $2 @@ -407,32 +407,32 @@ Function VersionCompare StrCpy $5 $1 $2 IntOp $2 $2 + 1 StrCpy $1 $1 '' $2 - + StrCmp $4$5 '' equal - + StrCpy $6 -1 IntOp $6 $6 + 1 StrCpy $3 $4 1 $6 StrCmp $3 '0' -2 StrCmp $3 '' 0 +2 StrCpy $4 0 - + StrCpy $7 -1 IntOp $7 $7 + 1 StrCpy $3 $5 1 $7 StrCmp $3 '0' -2 StrCmp $3 '' 0 +2 StrCpy $5 0 - + StrCmp $4 0 0 +2 StrCmp $5 0 begin newer2 StrCmp $5 0 newer1 IntCmp $6 $7 0 newer1 newer2 - + StrCpy $4 '1$4' StrCpy $5 '1$5' IntCmp $4 $5 begin newer2 newer1 - + equal: StrCpy $0 0 goto end @@ -441,7 +441,7 @@ Function VersionCompare goto end newer2: StrCpy $0 2 - + end: Pop $7 Pop $6 diff --git a/projects/resource.h b/projects/resource.h index f70ccbffb2..545b58f6b5 100644 --- a/projects/resource.h +++ b/projects/resource.h @@ -3,7 +3,7 @@ // Used by openrct2.rc // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 diff --git a/src/audio/mixer.cpp b/src/audio/mixer.cpp index 75685e5209..ef0b5a6f7f 100644 --- a/src/audio/mixer.cpp +++ b/src/audio/mixer.cpp @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/audio/mixer.h b/src/audio/mixer.h index 35fa5b92e1..0e6faf3218 100644 --- a/src/audio/mixer.h +++ b/src/audio/mixer.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/cheats.h b/src/cheats.h index 3c9c2d292d..ab46cfb676 100644 --- a/src/cheats.h +++ b/src/cheats.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/cmdline.c b/src/cmdline.c index a5619c103e..bfe317abe1 100644 --- a/src/cmdline.c +++ b/src/cmdline.c @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * + * * This file is part of OpenRCT2. - * + * * OpenRCT2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -70,7 +70,7 @@ static const char *const usage[] = { */ int cmdline_run(const char **argv, int argc) { - // + // int version = 0, headless = 0, verbose = 0, width = 0, height = 0, port = 0; char *server = NULL; diff --git a/src/cmdline.h b/src/cmdline.h index f8e99229d1..91e2e33bc4 100644 --- a/src/cmdline.h +++ b/src/cmdline.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/cmdline_sprite.c b/src/cmdline_sprite.c index 80360d2590..a967c211fe 100644 --- a/src/cmdline_sprite.c +++ b/src/cmdline_sprite.c @@ -89,7 +89,7 @@ bool sprite_file_save(const char *path) SDL_RWops *file = SDL_RWFromFile(path, "wb"); if (file == NULL) return false; - + if (SDL_RWwrite(file, &spriteFileHeader, sizeof(rct_sprite_file_header), 1) != 1) { SDL_RWclose(file); return false; @@ -218,7 +218,7 @@ int get_closest_palette_index(sint16 *colour){ } int get_palette_index(sint16 *colour) -{ +{ if (is_transparent_pixel(colour)) return -1; @@ -267,7 +267,7 @@ bool sprite_file_import(const char *path, rct_g1_element *outElement, uint8 **ou } uint8 *dst = buffer + (height * 2); - + for (unsigned int y = 0; y < height; y++) { rle_code *previousCode, *currentCode; @@ -285,7 +285,7 @@ bool sprite_file_import(const char *path, rct_g1_element *outElement, uint8 **ou if (mode == MODE_CLOSEST || mode == MODE_DITHERING) if (paletteIndex == -1 && !is_transparent_pixel(src)) paletteIndex = get_closest_palette_index(src); - + if (mode == MODE_DITHERING) if (!is_transparent_pixel(src) && is_changable_pixel(get_palette_index(src))){ @@ -487,7 +487,7 @@ int cmdline_for_sprite(const char **argv, int argc) int maxIndex = (int)spriteFileHeader.num_entries; int numbers = (int)floor(log(maxIndex)); - + strncpy(outputPath, argv[2], MAX_PATH); int pathLen = strlen(outputPath); @@ -560,7 +560,7 @@ int cmdline_for_sprite(const char **argv, int argc) fprintf(stderr, "Unable to open input sprite file.\n"); return -1; } - + spriteFileHeader.num_entries++; spriteFileHeader.total_size += bufferLength; spriteFileEntries = realloc(spriteFileEntries, spriteFileHeader.num_entries * sizeof(rct_g1_element)); @@ -572,7 +572,7 @@ int cmdline_for_sprite(const char **argv, int argc) spriteFileEntries[spriteFileHeader.num_entries - 1] = spriteElement; memcpy(spriteFileData + (spriteFileHeader.total_size - bufferLength), buffer, bufferLength); spriteFileEntries[spriteFileHeader.num_entries - 1].offset = spriteFileData + (spriteFileHeader.total_size - bufferLength); - + free(buffer); if (!sprite_file_save(spriteFilePath)) return -1; @@ -672,7 +672,7 @@ static rct_sprite_file_palette_entry _standardPalette[256] = { { 0, 0, 0, 255 }, { 0, 0, 0, 255 }, - // + // { 35, 35, 23, 255 }, { 51, 51, 35, 255 }, { 67, 67, 47, 255 }, @@ -865,9 +865,9 @@ static rct_sprite_file_palette_entry _standardPalette[256] = { { 207, 207, 131, 255 }, { 231, 231, 171, 255 }, { 255, 255, 207, 255 }, - + // 203 - 214 (Secondary remap) - { 27, 0, 63, 255 }, + { 27, 0, 63, 255 }, { 51, 0, 103, 255 }, { 63, 11, 123, 255 }, { 79, 23, 143, 255 }, diff --git a/src/config.h b/src/config.h index 7708042d0a..8db4a4fe03 100644 --- a/src/config.h +++ b/src/config.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/drawing/drawing.h b/src/drawing/drawing.h index 64ce9c6018..302be8a37f 100644 --- a/src/drawing/drawing.h +++ b/src/drawing/drawing.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -79,7 +79,7 @@ extern int gLastDrawStringY; extern rct_g1_element *g1Elements; extern rct_gx g2; -// +// rct_drawpixelinfo* clip_drawpixelinfo(rct_drawpixelinfo* dpi, int left, int width, int top, int height); void gfx_set_dirty_blocks(sint16 left, sint16 top, sint16 right, sint16 bottom); void gfx_draw_all_dirty_blocks(); diff --git a/src/drawing/font.c b/src/drawing/font.c index cde247dc04..eaadbd1901 100644 --- a/src/drawing/font.c +++ b/src/drawing/font.c @@ -21,7 +21,7 @@ void font_sprite_initialise_characters() int glyphOffset = fontSize * FONT_SPRITE_GLYPH_COUNT; for (uint8 glyphIndex = 0; glyphIndex < FONT_SPRITE_GLYPH_COUNT; glyphIndex++) { rct_g1_element g1 = g1Elements[glyphIndex + SPR_CHAR_START + glyphOffset]; - + int width = fontSize == FONT_SIZE_BIG ? g1.width + 1 : g1.width - 1; if (glyphIndex >= (FORMAT_ARGUMENT_CODE_START - 32) && glyphIndex < (FORMAT_COLOUR_CODE_END - 32)) { width = 0; @@ -29,7 +29,7 @@ void font_sprite_initialise_characters() *pCharacterWidth++ = (uint8)width; } } - + scrolling_text_initialise_bitmaps(); for (int i = 0; i < 32; i++) { diff --git a/src/drawing/line.c b/src/drawing/line.c index 28bfbe7db6..82676eb376 100644 --- a/src/drawing/line.c +++ b/src/drawing/line.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/drawing/rain.c b/src/drawing/rain.c index 2357ef7069..7aaed208a8 100644 --- a/src/drawing/rain.c +++ b/src/drawing/rain.c @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2014 + * Copyright (c) 2014 * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. * * This file is part of OpenRCT2. @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -105,7 +105,7 @@ static void draw_rain_window(rct_window* original_w, short left, short right, sh draw_rain_window(original_w, left, w_right, top, bottom, draw_rain_func); left = w_right; - draw_rain_window(original_w, left, right, top, bottom, draw_rain_func); + draw_rain_window(original_w, left, right, top, bottom, draw_rain_func); return; } @@ -113,7 +113,7 @@ static void draw_rain_window(rct_window* original_w, short left, short right, sh draw_rain_window(original_w, left, right, top, w->y, draw_rain_func); top = w->y; - draw_rain_window(original_w, left, right, top, bottom, draw_rain_func); + draw_rain_window(original_w, left, right, top, bottom, draw_rain_func); return; } @@ -122,7 +122,7 @@ static void draw_rain_window(rct_window* original_w, short left, short right, sh draw_rain_window(original_w, left, right, top, w_bottom, draw_rain_func); top = w_bottom; - draw_rain_window(original_w, left, right, top, bottom, draw_rain_func); + draw_rain_window(original_w, left, right, top, bottom, draw_rain_func); return; } } @@ -147,7 +147,7 @@ static void draw_rain_animation(uint32 draw_rain_func) } /** - * + * * rct2: 0x00684218 */ void update_rain_animation() diff --git a/src/drawing/rect.c b/src/drawing/rect.c index 70894fe0ac..071875890a 100644 --- a/src/drawing/rect.c +++ b/src/drawing/rect.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -42,7 +42,7 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot top_ = top; bottom_ = bottom; dpi_ = dpi; - + if ((left > right) || (top > bottom) || (dpi->x > right) || (left >= (dpi->x + dpi->width)) || (bottom < dpi->y) || (top >= (dpi->y + dpi->height))) return; @@ -52,7 +52,7 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot uint16 cross_pattern = 0; int start_x = left - dpi->x; - if (start_x < 0){ + if (start_x < 0){ cross_pattern ^= start_x; start_x = 0; } @@ -65,7 +65,7 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot int width = end_x - start_x; int start_y = top - dpi->y; - if (start_y < 0){ + if (start_y < 0){ cross_pattern ^= start_y; start_y = 0; } @@ -80,14 +80,14 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot // 00678B2E 00678BE5 //Cross hatching uint8* dest_pointer = (start_y * (dpi->width + dpi->pitch)) + start_x + dpi->bits; - + uint32 ecx; for (int i = 0; i < height; ++i) { uint8* next_dest_pointer = dest_pointer + dpi->width + dpi->pitch; ecx = cross_pattern; // Rotate right ecx = (ecx >> 1) | (ecx << (sizeof(ecx) * CHAR_BIT - 1)); - ecx = (ecx & 0xFFFF0000) | width; + ecx = (ecx & 0xFFFF0000) | width; // Fill every other pixel with the colour for (; (ecx & 0xFFFF) > 0; ecx--) { ecx = ecx ^ 0x80000000; @@ -98,7 +98,7 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot } cross_pattern ^= 1; dest_pointer = next_dest_pointer; - + } return; } @@ -143,7 +143,7 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot for (int no_lines = height; no_lines > 0; no_lines--) { char* next_dest_pointer = dest_pointer + dpi->width + dpi->pitch; - uint16 pattern = pattern_pointer[pattern_y]; + uint16 pattern = pattern_pointer[pattern_y]; for (int no_pixels = width; no_pixels > 0; --no_pixels) { if (pattern & (1 << pattern_x)) @@ -168,7 +168,7 @@ void gfx_fill_rect(rct_drawpixelinfo *dpi, int left, int top, int right, int bot left -= dpi->x;//0x4 if ( left < 0 ){ RCT2_GLOBAL(0xEDF824,sint32) -= left; - left = 0; + left = 0; } right -= dpi->x; right++; diff --git a/src/drawing/scrolling_text.c b/src/drawing/scrolling_text.c index cd877b8490..ed7a36a210 100644 --- a/src/drawing/scrolling_text.c +++ b/src/drawing/scrolling_text.c @@ -33,7 +33,7 @@ void scrolling_text_initialise_bitmaps() .zoom_level = 0 }; - + for (int i = 0; i < 224; i++) { memset(drawingSurface, 0, sizeof(drawingSurface)); gfx_draw_sprite(&dpi, i + 0x10D5, -1, 0, 0); @@ -136,7 +136,7 @@ int scrolling_text_setup(rct_string_id stringId, uint16 scroll, uint16 scrolling scrolling_text_format(scrollString, scrollText); sint16* scrollingModePositions = RCT2_ADDRESS(RCT2_ADDRESS_SCROLLING_MODE_POSITIONS, uint16*)[scrollingMode]; - + memset(scrollText->bitmap, 0, 320 * 8); if (gUseTrueTypeFont) { scrolling_text_set_bitmap_for_ttf(scrollString, scroll, scrollText->bitmap, scrollingModePositions); @@ -186,8 +186,8 @@ void scrolling_text_set_bitmap_for_sprite(utf8 *text, int scroll, uint8 *bitmap, uint8 *dst = &bitmap[scrollPosition]; for (uint8 char_bitmap = *characterBitmap; char_bitmap != 0; char_bitmap >>= 1){ if (char_bitmap & 1) *dst = characterColour; - - // Jump to next row + + // Jump to next row dst += 64; } } @@ -261,7 +261,7 @@ void scrolling_text_set_bitmap_for_ttf(utf8 *text, int scroll, uint8 *bitmap, si for (int y = 0; y < height; y++) { if (src[y * pitch + x] != 0) *dst = colour; - // Jump to next row + // Jump to next row dst += 64; } } diff --git a/src/drawing/sprite.c b/src/drawing/sprite.c index 28529b1038..dcd3fbc683 100644 --- a/src/drawing/sprite.c +++ b/src/drawing/sprite.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -32,7 +32,7 @@ rct_gx g2; rct_g1_element *g1Elements = (rct_g1_element*)RCT2_ADDRESS_G1_ELEMENTS; /** - * + * * rct2: 0x00678998 */ int gfx_load_g1() @@ -267,8 +267,8 @@ void gfx_rle_sprite_to_buffer(uint8* source_bits_pointer, uint8* dest_bits_point int line_width = (dpi->width >> zoom_level) + dpi->pitch; - if (source_y_start < 0){ - source_y_start += zoom_amount; + if (source_y_start < 0){ + source_y_start += zoom_amount; next_dest_pointer += line_width; height -= zoom_amount; } @@ -351,7 +351,7 @@ void gfx_rle_sprite_to_buffer(uint8* source_bits_pointer, uint8* dest_bits_point else if (image_type & IMAGE_TYPE_MIX_BACKGROUND){//In the .exe these are all unraveled loops //Doesnt use source pointer ??? mix with background only? //Not Tested - + for (; no_pixels > 0; no_pixels -= zoom_amount, dest_pointer++){ uint8 pixel = *dest_pointer; pixel = palette_pointer[pixel]; @@ -374,7 +374,7 @@ void gfx_rle_sprite_to_buffer(uint8* source_bits_pointer, uint8* dest_bits_point /** * * rct2: 0x0067A28E - * image_id (ebx) + * image_id (ebx) * image_id as below * 0b_111X_XXXX_XXXX_XXXX_XXXX_XXXX_XXXX_XXXX image_type * 0b_XXX1_11XX_XXXX_XXXX_XXXX_XXXX_XXXX_XXXX image_sub_type (unknown pointer) @@ -444,7 +444,7 @@ void gfx_draw_sprite(rct_drawpixelinfo *dpi, int image_id, int x, int y, uint32 uint32 top_offset = palette_to_g1_offset[top_type]; //RCT2_ADDRESS(0x97FCBC, uint32)[top_type]; rct_g1_element top_palette = g1Elements[top_offset]; memcpy(palette_pointer + 0xF3, top_palette.offset + 0xF3, 12); - + //Trousers int trouser_type = (image_id >> 24) & 0x1f; uint32 trouser_offset = palette_to_g1_offset[trouser_type]; //RCT2_ADDRESS(0x97FCBC, uint32)[trouser_type]; @@ -471,7 +471,7 @@ void gfx_draw_sprite_palette_set(rct_drawpixelinfo *dpi, int image_id, int x, in { int image_element = image_id & 0x7FFFF; int image_type = (image_id & 0xE0000000) >> 28; - + rct_g1_element* g1_source; if (image_element < SPR_G2_BEGIN) { g1_source = &g1Elements[image_element]; @@ -598,7 +598,7 @@ void gfx_draw_sprite_palette_set(rct_drawpixelinfo *dpi, int image_id, int x, in uint8* dest_pointer = (uint8*)dpi->bits; //Move the pointer to the start point of the destination dest_pointer += ((dpi->width / zoom_amount) + dpi->pitch)*dest_start_y + dest_start_x; - + if (g1_source->flags & G1_FLAG_RLE_COMPRESSION){ //We have to use a different method to move the source pointer for //rle encoded sprites so that will be handled within this function diff --git a/src/editor.c b/src/editor.c index 991ec7fe4b..76756700b5 100644 --- a/src/editor.c +++ b/src/editor.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -183,7 +183,7 @@ void trackdesigner_load() banner_init(); reset_park_entrances(); user_string_clear_all(); - reset_sprite_list(); + reset_sprite_list(); ride_init_all(); window_guest_list_init_vars_a(); staff_reset_modes(); @@ -261,7 +261,7 @@ static void set_all_land_owned() void editor_load_landscape(const char *path) { window_close_construction_windows(); - + char *extension = strrchr(path, '.'); if (extension != NULL) { if (_stricmp(extension, ".sv4") == 0) { @@ -413,19 +413,19 @@ static int editor_read_s6(const char *path) map_update_tile_pointers(); map_remove_all_rides(); - // + // for (i = 0; i < MAX_BANNERS; i++) if (gBanners[i].type == 255) gBanners[i].flags &= ~BANNER_FLAG_2; - // + // rct_ride *ride; FOR_ALL_RIDES(i, ride) user_string_free(ride->name); ride_init_all(); - // + // for (i = 0; i < MAX_SPRITES; i++) { rct_sprite *sprite = &g_sprite_list[i]; user_string_free(sprite->unknown.name_string_idx); diff --git a/src/editor.h b/src/editor.h index 54044a3dfa..83b0f46f8c 100644 --- a/src/editor.h +++ b/src/editor.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/game.h b/src/game.h index 115030495e..ec806a8cc4 100644 --- a/src/game.h +++ b/src/game.h @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * + * * This file is part of OpenRCT2. - * + * * OpenRCT2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ - + #ifndef _GAME_H_ #define _GAME_H_ diff --git a/src/hook.h b/src/hook.h index 1e0628b95b..7f2289f059 100644 --- a/src/hook.h +++ b/src/hook.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/input.c b/src/input.c index c2d63a34c4..343213b720 100644 --- a/src/input.c +++ b/src/input.c @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * + * * This file is part of OpenRCT2. - * + * * OpenRCT2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -98,7 +98,7 @@ static void sub_6EA2AA(rct_window *w, int widgetIndex, int x, int y, int edi); #pragma region Mouse input /** - * + * * rct2: 0x006EA627 */ void game_handle_input() @@ -144,7 +144,7 @@ void game_handle_input() } /** - * + * * rct2: 0x006E83C7 */ static void game_get_next_input(int *x, int *y, int *state) @@ -165,7 +165,7 @@ static void game_get_next_input(int *x, int *y, int *state) } /** - * + * * rct2: 0x00407074 */ static rct_mouse_data* get_mouse_input() @@ -181,7 +181,7 @@ static rct_mouse_data* get_mouse_input() } /** - * + * * rct2: 0x006E8655 */ static void game_handle_input_mouse(int x, int y, int state) @@ -330,7 +330,7 @@ static void game_handle_input_mouse(int x, int y, int state) break; } } - + #pragma region Window positioning / resizing void input_window_position_begin(rct_window *w, int widgetIndex, int x, int y) @@ -512,7 +512,7 @@ static void input_scroll_begin(rct_window *w, int widgetIndex, int x, int y) case SCROLL_PART_HSCROLLBAR_RIGHT: scroll->h_left = min(scroll->h_left + 3, widget_width); break; - case SCROLL_PART_HSCROLLBAR_LEFT_TROUGH: + case SCROLL_PART_HSCROLLBAR_LEFT_TROUGH: scroll->h_left = max(scroll->h_left - widget_width , 0); break; case SCROLL_PART_HSCROLLBAR_RIGHT_TROUGH: @@ -556,9 +556,9 @@ static void input_scroll_continue(rct_window *w, int widgetIndex, int state, int invalidate_scroll(); return; } - + widget_scroll_get_part(w, widget, x, y, &x2, &y2, &scroll_part, &scroll_id); - + if (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_SCROLL_AREA, uint16) == SCROLL_PART_HSCROLLBAR_THUMB){ int temp_x = x; x -= RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_CURSOR_X, uint16); @@ -780,7 +780,7 @@ static void input_scroll_part_update_vbottom(rct_window *w, int widgetIndex, int #pragma region Widgets /** - * + * * rct2: 0x006E9253 */ static void input_widget_over(int x, int y, rct_window *w, int widgetIndex) @@ -818,7 +818,7 @@ static void input_widget_over(int x, int y, rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006E9269 */ static void input_widget_over_change_check(rct_windowclass windowClass, rct_windownumber windowNumber, int widgetIndex) @@ -871,7 +871,7 @@ static void input_widget_over_flatbutton_invalidate() } /** - * + * * rct2: 0x006E95F9 */ static void input_widget_left(int x, int y, rct_window *w, int widgetIndex) @@ -956,7 +956,7 @@ static void input_widget_left(int x, int y, rct_window *w, int widgetIndex) #pragma endregion /** - * + * * rct2: 0x006ED833 */ void process_mouse_over(int x, int y) @@ -1072,7 +1072,7 @@ void process_mouse_tool(int x, int y) } /** - * + * * rct2: 0x006E8DA7 */ void input_state_widget_pressed(int x, int y, int state, int widgetIndex, rct_window *w, rct_widget *widget) @@ -1270,14 +1270,14 @@ static void input_update_tooltip(rct_window *w, int widgetIndex, int x, int y) #pragma region Keyboard input /** - * + * * rct2: 0x006E3B43 */ void title_handle_keyboard_input() { rct_window *w; int key; - + if (!gConsoleOpen) { // Handle modifier keys and key scrolling RCT2_GLOBAL(RCT2_ADDRESS_PLACE_OBJECT_MODIFIER, uint8) = 0; @@ -1294,7 +1294,7 @@ void title_handle_keyboard_input() while ((key = get_next_key()) != 0) { if (key == 255) continue; - + // Reserve backtick for console if (key == SDL_SCANCODE_GRAVE) { if (gConfigGeneral.debugging_tools || gConsoleOpen) { @@ -1320,7 +1320,7 @@ void title_handle_keyboard_input() } /** - * + * * rct2: 0x006E3B43 */ void game_handle_keyboard_input() @@ -1464,7 +1464,7 @@ static void sub_6EA2AA(rct_window *w, int widgetIndex, int x, int y, int edi) } /** - * + * * rct2: 0x00406CD2 */ int get_next_key() @@ -1505,7 +1505,7 @@ void sub_6ED990(char cursor_id){ /** - * + * * rct2: 0x006E876D */ void invalidate_scroll() diff --git a/src/input.h b/src/input.h index 3d36382961..493b0faaa7 100644 --- a/src/input.h +++ b/src/input.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/interface/console.c b/src/interface/console.c index e0c7871ea3..b1f3e014aa 100644 --- a/src/interface/console.c +++ b/src/interface/console.c @@ -154,7 +154,7 @@ void console_draw(rct_drawpixelinfo *dpi) int x = _consoleLeft + 4; int y = _consoleTop + 4; - + // Draw previous lines utf8 lineBuffer[2 + 256], *lineCh; ch = _consoleViewBufferStart; @@ -933,7 +933,7 @@ console_command console_command_table[] = { { "windows", cc_windows, "Lists all the windows that can be opened.", "windows" }, { "load_object", cc_load_object, "Loads the object file into the scenario.\n" "Loading a scenery group will not load its associated objects.\n" - "This is a safer method opposed to \"open object_selection\".", + "This is a safer method opposed to \"open object_selection\".", "load_object " }, { "object_count", cc_object_count, "Shows the number of objects of each type in the scenario.", "object_count" }, { "twitch", cc_twitch, "Twitch API" }, diff --git a/src/interface/graph.c b/src/interface/graph.c index 96917c88af..53bc2fffb5 100644 --- a/src/interface/graph.c +++ b/src/interface/graph.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/interface/graph.h b/src/interface/graph.h index 82a0f7fa6c..e6c9aee74e 100644 --- a/src/interface/graph.h +++ b/src/interface/graph.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/interface/keyboard_shortcut.c b/src/interface/keyboard_shortcut.c index b8d919dde5..946ab53dcf 100644 --- a/src/interface/keyboard_shortcut.c +++ b/src/interface/keyboard_shortcut.c @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * + * * This file is part of OpenRCT2. - * + * * OpenRCT2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -35,7 +35,7 @@ typedef void (*shortcut_action)(); static const shortcut_action shortcut_table[SHORTCUT_COUNT]; /** - * + * * rct2: 0x006E3E91 */ void keyboard_shortcut_set(int key) @@ -58,7 +58,7 @@ void keyboard_shortcut_set(int key) } /** - * + * * rct2: 0x006E3E68 */ void keyboard_shortcut_handle(int key) diff --git a/src/interface/keyboard_shortcut.h b/src/interface/keyboard_shortcut.h index d9e4e20535..3b9dc2599e 100644 --- a/src/interface/keyboard_shortcut.h +++ b/src/interface/keyboard_shortcut.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/interface/screenshot.h b/src/interface/screenshot.h index 0672a135bb..81feb53801 100644 --- a/src/interface/screenshot.h +++ b/src/interface/screenshot.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/interface/themes.c b/src/interface/themes.c index f10aa752f7..dd6244376d 100644 --- a/src/interface/themes.c +++ b/src/interface/themes.c @@ -98,7 +98,7 @@ theme_window_preset gThemeWindowsRCT1[] = { { WC_GUEST_LIST, COLOURS_RCT1(22, 26, 26, 0, 0, 0) }, { WC_STAFF_LIST, COLOURS_RCT1(12, 4, 4, 0, 0, 0) }, { WC_FINANCES, COLOURS_RCT1(4, 1, 1, 0, 0, 0) }, - { WC_TITLE_MENU, COLOURS_RCT1(129, 129, 129, 0, 0, 0) }, + { WC_TITLE_MENU, COLOURS_RCT1(129, 129, 129, 0, 0, 0) }, { WC_TITLE_EXIT, COLOURS_RCT1(129, 129, 129, 0, 0, 0) }, { WC_NEW_CAMPAIGN, COLOURS_RCT1(4, 4, 1, 0, 0, 0) }, { WC_TITLE_OPTIONS, COLOURS_RCT1(129, 129, 129, 0, 0, 0) }, @@ -156,7 +156,7 @@ void colour_scheme_update(rct_window *window) void colour_scheme_update_by_class(rct_window *window, rct_windowclass classification) { theme_window* theme = theme_window_get_by_class(classification); - + bool transparent = false; for (int i = 0; i < 6; i++) { window->colours[i] = theme->colours[i]; diff --git a/src/interface/title_sequences.c b/src/interface/title_sequences.c index e1753a4971..b008df572b 100644 --- a/src/interface/title_sequences.c +++ b/src/interface/title_sequences.c @@ -100,7 +100,7 @@ void title_sequence_create_preset(const char *name) strcat(path, gConfigTitleSequences.presets[preset].name); platform_file_delete(path); platform_ensure_directory_exists(path); - + title_sequence_save_preset_script(preset); gCurrentTitleSequence = preset; } @@ -164,7 +164,7 @@ void title_sequence_duplicate_preset(int duplicate, const char *name) if (loadmm) { title_sequence_add_save(preset, get_file_path(PATH_ID_SIXFLAGS_MAGICMOUNTAIN), "Six Flags Magic Mountain.SC6"); } - + title_sequence_save_preset_script(preset); gCurrentTitleSequence = preset; } @@ -241,7 +241,7 @@ void title_sequence_add_save(int preset, const char *path, const char *newName) gConfigTitleSequences.presets[preset].num_saves++; gConfigTitleSequences.presets[preset].saves = realloc(gConfigTitleSequences.presets[preset].saves, sizeof(char[TITLE_SEQUENCE_MAX_SAVE_LENGTH]) * (size_t)gConfigTitleSequences.presets[preset].num_saves); - + strcpy(gConfigTitleSequences.presets[preset].saves[gConfigTitleSequences.presets[preset].num_saves - 1], newName); // Add the appropriate extension if needed if (_stricmp(extension, ".sv6") != 0 && _stricmp(extension, ".sc6") != 0) @@ -260,7 +260,7 @@ void title_sequence_remove_save(int preset, int index) strncat(path, &separator, 1); strcat(path, gConfigTitleSequences.presets[preset].saves[index]); platform_file_delete(path); - + // Remove all references to this save in the commands and decrement save indecies for (int i = 0; i < gConfigTitleSequences.presets[preset].num_commands; i++) { if (gConfigTitleSequences.presets[preset].commands[i].command == TITLE_SCRIPT_LOAD) { @@ -270,7 +270,7 @@ void title_sequence_remove_save(int preset, int index) gConfigTitleSequences.presets[preset].commands[i].saveIndex--; } } - + for (int i = index; i < gConfigTitleSequences.presets[preset].num_saves - 1; i++) { strcpy(gConfigTitleSequences.presets[preset].saves[i], gConfigTitleSequences.presets[preset].saves[i + 1]); } diff --git a/src/interface/viewport.h b/src/interface/viewport.h index aad675b6d9..a1fd91a45d 100644 --- a/src/interface/viewport.h +++ b/src/interface/viewport.h @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * + * * This file is part of OpenRCT2. - * + * * OpenRCT2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or diff --git a/src/interface/viewport_interaction.c b/src/interface/viewport_interaction.c index 7f95d9e53a..b8ef2602e1 100644 --- a/src/interface/viewport_interaction.c +++ b/src/interface/viewport_interaction.c @@ -56,7 +56,7 @@ int viewport_interaction_get_item_left(int x, int y, viewport_interaction_info * if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_MANAGER)) return info->type = VIEWPORT_INTERACTION_ITEM_NONE; - // + // if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) && s6Info->editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER) return info->type = VIEWPORT_INTERACTION_ITEM_NONE; @@ -162,7 +162,7 @@ int viewport_interaction_left_click(int x, int y) } /** - * + * * rct2: 0x006EDE88 */ int viewport_interaction_get_item_right(int x, int y, viewport_interaction_info *info) @@ -179,7 +179,7 @@ int viewport_interaction_get_item_right(int x, int y, viewport_interaction_info if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_MANAGER)) return info->type = VIEWPORT_INTERACTION_ITEM_NONE; - // + // if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) && s6Info->editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER) return info->type = VIEWPORT_INTERACTION_ITEM_NONE; @@ -336,7 +336,7 @@ int viewport_interaction_right_over(int x, int y) } /** - * + * * rct2: 0x006E8A62 */ int viewport_interaction_right_click(int x, int y) @@ -385,7 +385,7 @@ int viewport_interaction_right_click(int x, int y) } /** - * + * * rct2: 0x006E08D2 */ static void viewport_interaction_remove_scenery(rct_map_element *mapElement, int x, int y) @@ -403,7 +403,7 @@ static void viewport_interaction_remove_scenery(rct_map_element *mapElement, int } /** - * + * * rct2: 0x006A614A */ static void viewport_interaction_remove_footpath(rct_map_element *mapElement, int x, int y) @@ -413,7 +413,7 @@ static void viewport_interaction_remove_footpath(rct_map_element *mapElement, in rct_map_element *mapElement2; z = mapElement->base_height; - + w = window_find_by_class(WC_FOOTPATH); if (w != NULL) footpath_provisional_update(); @@ -429,7 +429,7 @@ static void viewport_interaction_remove_footpath(rct_map_element *mapElement, in } /** - * + * * rct2: 0x006A61AB */ static void viewport_interaction_remove_footpath_item(rct_map_element *mapElement, int x, int y) @@ -453,7 +453,7 @@ static void viewport_interaction_remove_footpath_item(rct_map_element *mapElemen } /** - * + * * rct2: 0x00666C0E */ void viewport_interaction_remove_park_entrance(rct_map_element *mapElement, int x, int y) @@ -474,7 +474,7 @@ void viewport_interaction_remove_park_entrance(rct_map_element *mapElement, int } /** - * + * * rct2: 0x006E57A9 */ static void viewport_interaction_remove_park_wall(rct_map_element *mapElement, int x, int y) @@ -499,7 +499,7 @@ static void viewport_interaction_remove_park_wall(rct_map_element *mapElement, i } /** - * + * * rct2: 0x006B88DC */ static void viewport_interaction_remove_large_scenery(rct_map_element *mapElement, int x, int y) @@ -516,12 +516,12 @@ static void viewport_interaction_remove_large_scenery(rct_map_element *mapElemen } else { RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_REMOVE_THIS; game_do_command( - x, - 1 | ((mapElement->type & 0x3) << 8), - y, + x, + 1 | ((mapElement->type & 0x3) << 8), + y, mapElement->base_height | ((mapElement->properties.scenerymultiple.type >> 10) << 8), - GAME_COMMAND_REMOVE_LARGE_SCENERY, - 0, + GAME_COMMAND_REMOVE_LARGE_SCENERY, + 0, 0 ); } @@ -538,7 +538,7 @@ static rct_peep *viewport_interaction_get_closest_peep(int x, int y, int maxDist w = window_find_from_point(x, y); if (w == NULL) return 0; - + viewport = w->viewport; if (viewport == NULL || viewport->zoom >= 2) return 0; diff --git a/src/interface/widget.c b/src/interface/widget.c index 25f7aab9d2..1ed283347b 100644 --- a/src/interface/widget.c +++ b/src/interface/widget.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -48,7 +48,7 @@ static void widget_vscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, i static void widget_draw_image(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex); /** - * + * * rct2: 0x006EAF26 */ void widget_scroll_update_thumbs(rct_window *w, int widget_index) @@ -102,7 +102,7 @@ void widget_scroll_update_thumbs(rct_window *w, int widget_index) } /** - * + * * rct2: 0x006EB2A8 */ void widget_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -170,7 +170,7 @@ void widget_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006EB6CE */ static void widget_frame_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -188,7 +188,7 @@ static void widget_frame_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetI r = w->x + widget->right; b = w->y + widget->bottom; - // + // press = (w->flags & WF_10 ? 0x80 : 0); // Get the colour @@ -210,7 +210,7 @@ static void widget_frame_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetI } /** - * + * * rct2: 0x006EB765 */ static void widget_resize_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -247,7 +247,7 @@ static void widget_resize_draw(rct_drawpixelinfo *dpi, rct_window *w, int widget } /** - * + * * rct2: 0x006EB8E5 */ static void widget_button_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -297,7 +297,7 @@ static void widget_tab_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetInd // Get the widget widget = &w->widgets[widgetIndex]; - // + // if (widget->image == -1) return; @@ -330,7 +330,7 @@ static void widget_tab_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetInd } /** - * + * * rct2: 0x006EB861 */ static void widget_flat_button_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -373,7 +373,7 @@ static void widget_flat_button_draw(rct_drawpixelinfo *dpi, rct_window *w, int w } /** - * + * * rct2: 0x006EBBEB */ static void widget_text_button(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -403,7 +403,7 @@ static void widget_text_button(rct_drawpixelinfo *dpi, rct_window *w, int widget } /** - * + * * rct2: 0x006EBC41 */ static void widget_text_unknown(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -462,7 +462,7 @@ static void widget_text_unknown(rct_drawpixelinfo *dpi, rct_window *w, int widge } /** - * + * * rct2: 0x006EBD52 */ static void widget_text(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -492,7 +492,7 @@ static void widget_text(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006EBD1F */ static void widget_text_inset(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -518,7 +518,7 @@ static void widget_text_inset(rct_drawpixelinfo *dpi, rct_window *w, int widgetI } /** - * + * * rct2: 0x006EC1A6 */ static void widget_text_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -546,12 +546,12 @@ static void widget_text_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIn gfx_fill_rect_inset(dpi, l, t, r, b, colour, press); // TODO - + gfx_fill_rect(dpi, l, t, r, b, colour); } /** - * + * * rct2: 0x006EB535 */ static void widget_groupbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -611,7 +611,7 @@ static void widget_groupbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg } /** - * + * * rct2: 0x006EB2F9 */ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -632,7 +632,7 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, int widge // Get the colour colour = w->colours[widget->colour]; - // + // if (w->var_4B8 != -1) { gfx_draw_sprite(dpi, *((char*)(0x013CA742 + w->var_4B8)) << 19, l + 1, t + 1, 0); if (w->width > 638) @@ -643,7 +643,7 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, int widge gfx_draw_sprite(dpi, *((char*)(0x013CA742 + w->var_4B9)) << 19, l + 1 + 638, t + 1, 0); } - // + // press = 0x70; if (w->flags & WF_10) press |= 0x80; @@ -651,7 +651,7 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, int widge gfx_fill_rect_inset(dpi, l, t, r, b, colour, press); gfx_fill_rect(dpi, r + 1, t, r + 1, b, *((char*)(0x0141FC47 + (colour * 8)))); } else { - // + // press = 0x60; if (w->flags & WF_10) press |= 0x80; @@ -682,7 +682,7 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, int widge } /** - * + * * rct2: 0x006EBB85 */ static void widget_closebox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -726,7 +726,7 @@ static void widget_closebox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg } /** - * + * * rct2: 0x006EBAD9 */ static void widget_checkbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -770,7 +770,7 @@ static void widget_checkbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg } /** - * + * * rct2: 0x006EBD96 */ static void widget_scroll_draw(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) @@ -858,11 +858,11 @@ static void widget_hscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, i gfx_fill_rect(dpi, l + 10, t + 3, r - 10, t + 3, *((char*)(0x0141FC4B + (colour * 8)))); gfx_fill_rect(dpi, l + 10, t + 7, r - 10, t + 7, *((char*)(0x0141FC47 + (colour * 8)))); gfx_fill_rect(dpi, l + 10, t + 8, r - 10, t + 8, *((char*)(0x0141FC4B + (colour * 8)))); - + // Left button gfx_fill_rect_inset(dpi, l, t, l + 9, b, colour, (scroll->flags & HSCROLLBAR_LEFT_PRESSED ? 0x20 : 0)); gfx_draw_string(dpi, (char*)BlackLeftArrowString, 0, l + 1, t); - + // Thumb gfx_fill_rect_inset(dpi, max(l + 10, l + scroll->h_thumb_left - 1), t, @@ -901,7 +901,7 @@ static void widget_vscrollbar_draw(rct_drawpixelinfo *dpi, rct_scroll *scroll, i } /** - * + * * rct2: 0x006EB951 */ static void widget_draw_image(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex) diff --git a/src/interface/widget.h b/src/interface/widget.h index ad7e4d0b35..8a8c5022c4 100644 --- a/src/interface/widget.h +++ b/src/interface/widget.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/interface/window.h b/src/interface/window.h index 6a5b288aba..3df13ba0a4 100644 --- a/src/interface/window.h +++ b/src/interface/window.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -102,7 +102,7 @@ typedef struct { uint16 v_thumb_bottom; // 0x10 } rct_scroll; -/** +/** * Viewport focus structure. * size: 0xA * Use sprite.type to work out type. @@ -122,7 +122,7 @@ typedef struct{ uint16 sprite_id; //0x482 uint8 pad_484; uint8 type; //0x485 & VIEWPORT_FOCUS_TYPE_MASK - uint16 pad_486; + uint16 pad_486; uint8 rotation; //0x488 uint8 zoom; //0x489 } sprite_focus; @@ -286,7 +286,7 @@ typedef enum { WE_RESIZE = 2, WE_MOUSE_DOWN = 3, WE_DROPDOWN = 4, - WE_UNKNOWN_05 = 5, + WE_UNKNOWN_05 = 5, // Unknown 05: Used to update tabs that are not being animated // see window_peep. When the overview tab is not highlighted the // items being carried such as hats/balloons still need to be shown diff --git a/src/intro.c b/src/intro.c index f067568a85..3021a78860 100644 --- a/src/intro.c +++ b/src/intro.c @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * + * * This file is part of OpenRCT2. - * + * * OpenRCT2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ - + #include "addresses.h" #include "audio/audio.h" #include "drawing/drawing.h" @@ -101,7 +101,7 @@ void intro_update() break; case 3: - // + // _tick_counter += 5; // Clear the screen diff --git a/src/intro.h b/src/intro.h index b0f09cb462..b3df910e2c 100644 --- a/src/intro.h +++ b/src/intro.h @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * + * * This file is part of OpenRCT2. - * + * * OpenRCT2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ - + #ifndef _INTRO_H_ #define _INTRO_H_ diff --git a/src/management/award.c b/src/management/award.c index 5bbb728899..6eac789f6b 100644 --- a/src/management/award.c +++ b/src/management/award.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -416,7 +416,7 @@ static int award_is_deserved_most_disappointing(int awardType, int activeAwardTy FOR_ALL_RIDES(i, ride) { if (ride->excitement == (ride_rating)0xFFFF || ride->popularity == 0xFF) continue; - + countedRides++; // Unpopular diff --git a/src/management/award.h b/src/management/award.h index 1fb14d5843..87e21fd6c3 100644 --- a/src/management/award.h +++ b/src/management/award.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/management/finance.c b/src/management/finance.c index d17415ced0..17b474b64f 100644 --- a/src/management/finance.c +++ b/src/management/finance.c @@ -66,7 +66,7 @@ void finance_payment(money32 amount, rct_expenditure_type type) RCT2_ADDRESS(RCT2_ADDRESS_EXPENDITURE_TABLE, money32)[type] -= amount; if (dword_988E60[type] & 1) RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_EXPENDITURE, money32) -= amount; // Cumulative amount of money spent this day - + RCT2_GLOBAL(RCT2_ADDRESS_BTM_TOOLBAR_DIRTY_FLAGS, uint32) |= BTM_TB_DIRTY_FLAG_MONEY; window_invalidate_by_class(WC_FINANCES); @@ -353,7 +353,7 @@ void finance_shift_expenditure_table() { } /** - * + * * rct2: 0x0069E89B */ void finance_reset_cash_to_initial() diff --git a/src/management/marketing.c b/src/management/marketing.c index 58566554ed..7a45392083 100644 --- a/src/management/marketing.c +++ b/src/management/marketing.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -85,7 +85,7 @@ void marketing_update() gMarketingCampaignDaysLeft[campaign] &= ~CAMPAIGN_ACTIVE_FLAG; if (active) continue; - + if (--gMarketingCampaignDaysLeft[campaign] != 0) continue; @@ -143,7 +143,7 @@ void marketing_start_campaign(int type, int rideOrItem, int numWeeks) } /** - * + * * rct2: 0x0069E73C */ void game_command_start_campaign(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp) diff --git a/src/management/marketing.h b/src/management/marketing.h index 67a35ed651..080289ad9d 100644 --- a/src/management/marketing.h +++ b/src/management/marketing.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/management/news_item.c b/src/management/news_item.c index 4522321c99..7135785bf3 100644 --- a/src/management/news_item.c +++ b/src/management/news_item.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -103,7 +103,7 @@ static bool news_item_is_current_old() } /** - * + * * rct2: 0x0066E252 */ void news_item_update_current() @@ -156,7 +156,7 @@ void news_item_update_current() } /** - * + * * rct2: 0x0066E377 */ void news_item_close_current() @@ -381,7 +381,7 @@ void news_item_open_subject(int type, int subject) } } } - + // Switch to new scenery tab window = window_find_by_class(WC_SCENERY); if (window != NULL) diff --git a/src/management/news_item.h b/src/management/news_item.h index a23be1c19e..8e1cea3c41 100644 --- a/src/management/news_item.h +++ b/src/management/news_item.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/management/research.c b/src/management/research.c index 83ae23e1c4..e84f2986e0 100644 --- a/src/management/research.c +++ b/src/management/research.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -91,7 +91,7 @@ static void research_calculate_expected_date() expectedDay = currentDay + (daysRemaining & 0xFFFF); dayQuotient = expectedDay / 0x10000; dayRemainder = expectedDay % 0x10000; - + expectedMonth = date_get_month(currentMonth + dayQuotient + (daysRemaining >> 16)); expectedDay = (dayRemainder * days_in_month[expectedMonth]) >> 16; @@ -299,7 +299,7 @@ void sub_684AC3(){ ebp->entryIndex = (research + 1)->entryIndex; uint8 cat = edx->category; - edx->category = ebp->category; + edx->category = ebp->category; ebp->category = cat; } @@ -322,7 +322,7 @@ void sub_684AC3(){ } } - + for (research = gResearchItems; research->entryIndex != RESEARCHED_ITEMS_SEPARATOR; research++){ research_finish_item(research->entryIndex); } @@ -351,7 +351,7 @@ void research_remove_non_separate_vehicle_types() researchItem != gResearchItems && researchItem->entryIndex != RESEARCHED_ITEMS_SEPARATOR && researchItem->entryIndex != RESEARCHED_ITEMS_END && - researchItem->entryIndex >= 0x10000 + researchItem->entryIndex >= 0x10000 ) { rct_ride_type *rideEntry = GET_RIDE_ENTRY(researchItem->entryIndex & 0xFF); if (!(rideEntry->flags & (RIDE_ENTRY_FLAG_SEPARATE_RIDE | RIDE_ENTRY_FLAG_SEPARATE_RIDE_NAME))) { diff --git a/src/management/research.h b/src/management/research.h index 6d6de71a0e..f8cf061082 100644 --- a/src/management/research.h +++ b/src/management/research.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -29,7 +29,7 @@ typedef struct { uint8 category; } rct_research_item; -enum{ +enum{ RESEARCH_ENTRY_FLAG_SCENERY_SET_ALWAYS_RESEARCHED = (1 << 29), RESEARCH_ENTRY_FLAG_RIDE_ALWAYS_RESEARCHED = (1 << 30), }; diff --git a/src/network/network.cpp b/src/network/network.cpp index e7f80fcc90..8aeb41dc62 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -166,7 +166,7 @@ int NetworkConnection::ReadPacket() if (LAST_SOCKET_ERROR() != EWOULDBLOCK && LAST_SOCKET_ERROR() != EAGAIN) { return NETWORK_DISCONNECTED; } else { - return NETWORK_NO_DATA; + return NETWORK_NO_DATA; } } inboundpacket.transferred += readBytes; @@ -613,14 +613,14 @@ void Network::Server_Send_CHAT(const char* text) void Network::Client_Send_GAMECMD(uint32 eax, uint32 ebx, uint32 ecx, uint32 edx, uint32 esi, uint32 edi, uint32 ebp, uint8 callback) { std::unique_ptr packet = std::move(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_GAMECMD << (uint32)RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TICKS, uint32) << eax << (ebx | GAME_COMMAND_FLAG_NETWORKED) << ecx << edx << esi << edi << ebp << callback; + *packet << (uint32)NETWORK_COMMAND_GAMECMD << (uint32)RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TICKS, uint32) << eax << (ebx | GAME_COMMAND_FLAG_NETWORKED) << ecx << edx << esi << edi << ebp << callback; server_connection.QueuePacket(std::move(packet)); } void Network::Server_Send_GAMECMD(uint32 eax, uint32 ebx, uint32 ecx, uint32 edx, uint32 esi, uint32 edi, uint32 ebp, uint8 playerid, uint8 callback) { std::unique_ptr packet = std::move(NetworkPacket::Allocate()); - *packet << (uint32)NETWORK_COMMAND_GAMECMD << (uint32)RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TICKS, uint32) << eax << (ebx | GAME_COMMAND_FLAG_NETWORKED) << ecx << edx << esi << edi << ebp << playerid << callback; + *packet << (uint32)NETWORK_COMMAND_GAMECMD << (uint32)RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TICKS, uint32) << eax << (ebx | GAME_COMMAND_FLAG_NETWORKED) << ecx << edx << esi << edi << ebp << playerid << callback; SendPacketToClients(*packet); } @@ -803,7 +803,7 @@ void Network::PrintError() char *s = strerror(LAST_SOCKET_ERROR()); fprintf(stderr, "%s\n", s); #endif - + } int Network::Client_Handle_AUTH(NetworkConnection& connection, NetworkPacket& packet) diff --git a/src/network/network.h b/src/network/network.h index e1d698d5e8..12f1f84e47 100644 --- a/src/network/network.h +++ b/src/network/network.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/network/twitch.cpp b/src/network/twitch.cpp index 1e36c0526b..bdc1633313 100644 --- a/src/network/twitch.cpp +++ b/src/network/twitch.cpp @@ -175,7 +175,7 @@ static void twitch_leave() // http_request_json_dispose(jsonResponse); // _twitchState = TWITCH_STATE_LEFT; // _twitchIdle = true; - // + // // console_writeline("Left twitch channel."); // }); } diff --git a/src/openrct2.h b/src/openrct2.h index da306caa9c..2d8ac7daf5 100644 --- a/src/openrct2.h +++ b/src/openrct2.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/peep/peep.c b/src/peep/peep.c index f012a56fb4..c1ca5f5c1d 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -8379,7 +8379,7 @@ static bool peep_should_go_on_ride(rct_peep *peep, int rideIndex, int entranceNu // Nausea calculations. ride_rating maxNausea = NauseaMaximumThresholds[(peep->nausea_tolerance & 3)] + peep->happiness; - + if (ride->nausea > maxNausea) { if (peepAtRide) { peep_insert_new_thought(peep, PEEP_THOUGHT_TYPE_SICKENING, rideIndex); @@ -9125,7 +9125,7 @@ money32 set_peep_name(int flags, int state, uint16 sprite_index, uint8* text_1, peep->flags |= PEEP_FLAGS_LEAVING_PARK; peep->flags &= ~PEEP_FLAGS_PARK_ENTRANCE_CHOSEN; } - + peep->flags &= ~PEEP_FLAGS_PURPLE; if (peep_check_easteregg_name(EASTEREGG_PEEP_NAME_EMMA_GARRELL, peep)) { peep->flags |= PEEP_FLAGS_PURPLE; diff --git a/src/peep/peep.h b/src/peep/peep.h index fa1fb85201..c758f335b7 100644 --- a/src/peep/peep.h +++ b/src/peep/peep.h @@ -210,16 +210,16 @@ enum PEEP_STATE { PEEP_STATE_INSPECTING = 23 }; -enum PEEP_ACTION_EVENTS { +enum PEEP_ACTION_EVENTS { PEEP_ACTION_CHECK_TIME = 0, // If no food then check watch PEEP_ACTION_EAT_FOOD = 1, PEEP_ACTION_SHAKE_HEAD = 2, - PEEP_ACTION_EMPTY_POCKETS = 3, + PEEP_ACTION_EMPTY_POCKETS = 3, PEEP_ACTION_SITTING_EAT_FOOD = 4, PEEP_ACTION_SITTING_CHECK_WATCH = 4, PEEP_ACTION_SITTING_LOOK_AROUND_LEFT = 5, - PEEP_ACTION_SITTING_LOOK_AROUND_RIGHT = 6, + PEEP_ACTION_SITTING_LOOK_AROUND_RIGHT = 6, PEEP_ACTION_WOW = 7, PEEP_ACTION_THROW_UP = 8, PEEP_ACTION_JUMP = 9, @@ -413,14 +413,14 @@ typedef struct { uint8 sub_state; // 0x2C uint8 sprite_type; // 0x2D uint8 type; // 0x2E - union{ + union{ uint8 staff_type; // 0x2F uint8 no_of_rides; // 0x2F }; uint8 tshirt_colour; // 0x30 uint8 trousers_colour; // 0x31 uint16 destination_x; // 0x32 Location that the peep is trying to get to - uint16 destination_y; // 0x34 + uint16 destination_y; // 0x34 uint8 destination_tolerence; // 0x36 How close to destination before next action/state 0 = exact uint8 var_37; uint8 energy; // 0x38 @@ -477,7 +477,7 @@ typedef struct { }; uint8 var_79; uint16 time_in_queue; // 0x7A - uint8 rides_been_on[32]; // 0x7C + uint8 rides_been_on[32]; // 0x7C // 255 bit bitmap of every ride the peep has been on see // window_peep_rides_update for how to use. uint32 id; // 0x9C diff --git a/src/peep/staff.c b/src/peep/staff.c index 1a23c2cf3e..3d44d0cb53 100644 --- a/src/peep/staff.c +++ b/src/peep/staff.c @@ -56,7 +56,7 @@ void game_command_update_staff_colour(int *eax, int *ebx, int *ecx, int *edx, in uint8 staffType, colour; int spriteIndex; rct_peep *peep; - + staffType = (*ebx >> 8) & 0xFF; colour = (*edx >> 8) & 0xFF; @@ -125,7 +125,7 @@ void game_command_hire_new_staff_member(int* eax, int* ebx, int* ecx, int* edx, sprite_remove((rct_sprite*)newPeep); } else { move_sprite_to_list((rct_sprite *)newPeep, SPRITE_LINKEDLIST_OFFSET_PEEP); - + newPeep->sprite_identifier = 1; newPeep->window_invalidate_flags = 0; newPeep->action = PEEP_ACTION_NONE_2; @@ -412,7 +412,7 @@ void staff_update_greyed_patrol_areas() { for (int i = 0; i < 128; ++i) RCT2_ADDRESS(RCT2_ADDRESS_STAFF_PATROL_AREAS + ((staff_type + STAFF_MAX_COUNT) * 512), uint32)[i] = 0; - + for (uint16 sprite_index = RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_START_PEEP, uint16); sprite_index != SPRITE_INDEX_NULL; sprite_index = peep->next) { peep = GET_PEEP(sprite_index); diff --git a/src/peep/staff.h b/src/peep/staff.h index 68b2b32321..396246edd3 100644 --- a/src/peep/staff.h +++ b/src/peep/staff.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/platform/osx.c b/src/platform/osx.c index d16040f99d..4f08d128f1 100644 --- a/src/platform/osx.c +++ b/src/platform/osx.c @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * + * * This file is part of OpenRCT2. - * + * * OpenRCT2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or diff --git a/src/platform/shared.c b/src/platform/shared.c index 60898cad58..d57a75dcb5 100644 --- a/src/platform/shared.c +++ b/src/platform/shared.c @@ -861,7 +861,7 @@ void platform_refresh_video() if (gConfigGeneral.hardware_display) { if (gRenderer == NULL) gRenderer = SDL_CreateRenderer(gWindow, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); - + if (gRenderer == NULL) { log_fatal("SDL_CreateRenderer %s", SDL_GetError()); exit(-1); diff --git a/src/rct1.c b/src/rct1.c index d373ea9488..0a3a454f41 100644 --- a/src/rct1.c +++ b/src/rct1.c @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * + * * This file is part of OpenRCT2. - * + * * OpenRCT2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -163,7 +163,7 @@ void rct1_import_s4(rct1_s4 *s4) memset(edi, 0, 64); edi += 64; } while (--edx > 0); edi += 0xA800; - + edx = 4; do { ebx = 32; @@ -366,7 +366,7 @@ static void rct1_load_default_objects() } /** - * + * * rct2: 0x006A29B9 */ static void rct1_fix_terrain() @@ -380,7 +380,7 @@ static void rct1_fix_terrain() if (map_element_get_type(element) != MAP_ELEMENT_TYPE_SURFACE) continue; - + // Convert terrain map_element_set_terrain(element, RCT1TerrainConvertTable[map_element_get_terrain(element)]); map_element_set_terrain_edge(element, RCT1TerrainEdgeConvertTable[map_element_get_terrain_edge(element)]); @@ -423,7 +423,7 @@ static void rct1_fix_entrance_positions() { rct_map_element *element; map_element_iterator it; - + for (int i = 0; i < 4; i++) RCT2_ADDRESS(RCT2_ADDRESS_PARK_ENTRANCE_X, uint16)[i] = 0x8000; @@ -534,10 +534,10 @@ static void rct1_reset_park_entrance_path_type() static void rct1_clear_extra_sprite_entries() { rct_unk_sprite *sprite; - + for (int i = 5000; i < MAX_SPRITES; i++) { sprite = &(g_sprite_list[i].unknown); - + memset(&g_sprite_list[i], 0, sizeof(rct_sprite)); sprite->sprite_identifier = 255; @@ -563,7 +563,7 @@ static void rct1_clear_extra_tile_entries() for (int i = 0; i < 0x10000; i++) { gMapElementTilePointers[i] = (rct_map_element*)-1; } - + // Get the first free map element rct_map_element *nextFreeMapElement = gMapElements; for (int i = 0; i < 128 * 128; i++) { diff --git a/src/rct1.h b/src/rct1.h index 159d1ce984..b1c7616e4a 100644 --- a/src/rct1.h +++ b/src/rct1.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -92,7 +92,7 @@ typedef struct { uint8 unk_B2[18]; union { uint8 num_inversions; - uint8 num_holes; + uint8 num_holes; }; uint8 num_drops; uint8 unk_C6; diff --git a/src/rct2.c b/src/rct2.c index 4cff9cab88..154b1aab9c 100644 --- a/src/rct2.c +++ b/src/rct2.c @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (c) 2014 Ted John, Matthias Lanzinger * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * + * * This file is part of OpenRCT2. - * + * * OpenRCT2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -137,7 +137,7 @@ int rct2_init() } /** - * + * * rct2: 0x00683499 */ int rct2_init_directories() @@ -202,7 +202,7 @@ void subsitute_path(char *dest, const char *path, const char *filename) } /** - * + * * rct2: 0x00674B42 */ int rct2_startup_checks() @@ -212,7 +212,7 @@ int rct2_startup_checks() if (!check_files_integrity()) return 0; - + return 1; } @@ -257,7 +257,7 @@ void rct2_draw() } else { //game } - + gCurrentDrawCount++; } @@ -288,7 +288,7 @@ int rct2_open_file(const char *path) } /** - * + * * rct2: 0x00674C95 */ int check_file_paths() @@ -301,7 +301,7 @@ int check_file_paths() } /** - * + * * rct2: 0x00674CA5 */ int check_file_path(int pathId) @@ -342,7 +342,7 @@ int check_file_path(int pathId) } /** - * + * * rct2: 0x00674C0B */ int check_files_integrity() @@ -416,7 +416,7 @@ void rct2_endupdate() } /** - * + * * rct2: 0x00674E6C */ const utf8 *get_file_path(int pathId) @@ -511,7 +511,7 @@ void get_system_info() HDC screenHandle = GetDC(NULL); if (screenHandle) { RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_CAP_BPP, sint32) = GetDeviceCaps(screenHandle, BITSPIXEL); - RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_CAP_RASTER_STRETCH, sint32) = GetDeviceCaps(screenHandle, RASTERCAPS) >> 8; + RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_CAP_RASTER_STRETCH, sint32) = GetDeviceCaps(screenHandle, RASTERCAPS) >> 8; ReleaseDC(NULL, screenHandle); } else { RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_CAP_BPP, sint32) = 0; diff --git a/src/ride/ride.h b/src/ride/ride.h index 8992644adb..a8d269a2a3 100644 --- a/src/ride/ride.h +++ b/src/ride/ride.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -70,7 +70,7 @@ typedef struct { vehicle_colour list[256]; } vehicle_colour_preset_list; -/** +/** * Ride type vehicle structure. * size: 0x65 */ @@ -219,7 +219,7 @@ typedef struct { // bit 7: whirlpool uint8 special_track_elements; // 0x0D5 uint8 pad_0D6[2]; - // Divide this value by 29127 to get the human-readable max speed + // Divide this value by 29127 to get the human-readable max speed // (in RCT2, display_speed = (max_speed * 9) >> 18) sint32 max_speed; // 0x0D8 sint32 average_speed; // 0x0DC diff --git a/src/ride/ride_data.h b/src/ride/ride_data.h index c8731e6f5b..bd124525b5 100644 --- a/src/ride/ride_data.h +++ b/src/ride/ride_data.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/ride/ride_ratings.c b/src/ride/ride_ratings.c index 3c8491958a..48a69ac9cb 100644 --- a/src/ride/ride_ratings.c +++ b/src/ride/ride_ratings.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -195,7 +195,7 @@ static void ride_ratings_update_state_2() if (ride->entrances[entranceIndex] == 0xFFFF) RCT2_GLOBAL(0x0138B5CE, uint16) |= 1; } - + ride_ratings_score_close_proximity(mapElement); trackElement.x = _rideRatingsProximityX; @@ -759,7 +759,7 @@ static uint16 ride_compute_upkeep(rct_ride *ride) upkeep += 160; } else if (ride->mode == RIDE_MODE_LIM_POWERED_LAUNCH) { upkeep += 320; - } else if (ride->mode == RIDE_MODE_POWERED_LAUNCH || + } else if (ride->mode == RIDE_MODE_POWERED_LAUNCH || ride->mode == RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED) { upkeep += 220; } @@ -782,7 +782,7 @@ static uint16 ride_compute_upkeep(rct_ride *ride) static void ride_ratings_apply_adjustments(rct_ride *ride, rating_tuple *ratings) { rct_ride_type *rideEntry; - + rideEntry = gRideTypeList[ride->subtype]; // Apply ride entry multipliers @@ -1024,7 +1024,7 @@ static rating_tuple get_special_track_elements_rating(uint8 type, rct_ride *ride excitement += 50; intensity += 30; nausea += 20; - } + } if (ride_has_waterfall(ride)) { excitement += 55; intensity += 30; @@ -1400,7 +1400,7 @@ static void ride_ratings_calculate_spiral_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 14; set_unreliability_factor(ride); @@ -1417,12 +1417,12 @@ static void ride_ratings_calculate_spiral_roller_coaster(rct_ride *ride) ride_ratings_apply_65E1C2(&ratings, ride, 15420, 32768, 35108); ride_ratings_apply_proximity(&ratings, ride, 20130); ride_ratings_apply_scenery(&ratings, ride, 6693); - + if ((ride->inversions & 0x1F) == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 12, 2, 2, 2); - + ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - + if ((ride->inversions & 0x1F) == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 40), 2, 2, 2); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); @@ -1446,7 +1446,7 @@ static void ride_ratings_calculate_stand_up_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 17; set_unreliability_factor(ride); @@ -1485,7 +1485,7 @@ static void ride_ratings_calculate_suspended_swinging_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 18; set_unreliability_factor(ride); @@ -1526,7 +1526,7 @@ static void ride_ratings_calculate_inverted_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 17; set_unreliability_factor(ride); @@ -1543,12 +1543,12 @@ static void ride_ratings_calculate_inverted_roller_coaster(rct_ride *ride) ride_ratings_apply_65E1C2(&ratings, ride, 15420, 15291, 35108); ride_ratings_apply_proximity(&ratings, ride, 15657); ride_ratings_apply_scenery(&ratings, ride, 8366); - + if ((ride->inversions & 0x1F) == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 12, 2, 2, 2); - + ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - + if ((ride->inversions & 0x1F) == 0) ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0,30), 2, 2, 2); @@ -1570,7 +1570,7 @@ static void ride_ratings_calculate_junior_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 13; set_unreliability_factor(ride); @@ -1683,7 +1683,7 @@ static void ride_ratings_calculate_mini_suspended_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 15; set_unreliability_factor(ride); @@ -1755,7 +1755,7 @@ static void ride_ratings_calculate_wooden_wild_mouse(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 14; set_unreliability_factor(ride); @@ -1797,7 +1797,7 @@ static void ride_ratings_calculate_steeplechase(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 14; set_unreliability_factor(ride); @@ -1909,7 +1909,7 @@ static void ride_ratings_calculate_bobsleigh_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 16; set_unreliability_factor(ride); @@ -1980,7 +1980,7 @@ static void ride_ratings_calculate_looping_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = ride_is_powered_launched(ride) ? 20 : 15; set_unreliability_factor(ride); @@ -2002,7 +2002,7 @@ static void ride_ratings_calculate_looping_roller_coaster(rct_ride *ride) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 14, 2, 2, 2); ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - + if ((ride->inversions & 0x1F) == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 10), 2, 2, 2); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); @@ -2026,7 +2026,7 @@ static void ride_ratings_calculate_dinghy_slide(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 13; set_unreliability_factor(ride); @@ -2065,7 +2065,7 @@ static void ride_ratings_calculate_mine_train_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 16; set_unreliability_factor(ride); @@ -2121,7 +2121,7 @@ static void ride_ratings_calculate_chairlift(rct_ride *ride) ride_ratings_apply_proximity(&ratings, ride, 11183); ride_ratings_apply_scenery(&ratings, ride, 25098); ride_ratings_apply_first_length_penalty(&ratings, ride, 0x960000, 2, 2, 2); - + ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); @@ -2149,7 +2149,7 @@ static void ride_ratings_calculate_corkscrew_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 16; set_unreliability_factor(ride); @@ -2203,7 +2203,7 @@ static void ride_ratings_calculate_maze(rct_ride *ride) int size = min(ride->maze_tiles, 100); ratings.excitement += size; ratings.intensity += size * 2; - + ride_ratings_apply_scenery(&ratings, ride, 22310); ride_ratings_apply_intensity_penalty(&ratings); @@ -2262,7 +2262,7 @@ static void ride_ratings_calculate_go_karts(rct_ride *ride) ride_ratings_set(&ratings, RIDE_RATING(1,42), RIDE_RATING(1,73), RIDE_RATING(0,40)); ride_ratings_apply_length(&ratings, ride, 700, 32768); - + if (ride->mode == RIDE_MODE_RACE && ride->num_vehicles >= 4) { ratings.excitement += RIDE_RATING(1,40); ratings.intensity += RIDE_RATING(0,50); @@ -2692,7 +2692,7 @@ static void ride_ratings_calculate_reverse_freefall_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 25; set_unreliability_factor(ride); @@ -2759,7 +2759,7 @@ static void ride_ratings_calculate_vertical_drop_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 16; set_unreliability_factor(ride); @@ -2814,10 +2814,10 @@ static void ride_ratings_calculate_twist(rct_ride *ride) ratings.nausea += ride->rotations * 20; ride_ratings_apply_scenery(&ratings, ride, 13943); - + ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); - + ride->ratings = ratings; ride->upkeep_cost = ride_compute_upkeep(ride); @@ -2858,7 +2858,7 @@ static void ride_ratings_calculate_flying_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 17; set_unreliability_factor(ride); @@ -2904,7 +2904,7 @@ static void ride_ratings_calculate_virginia_reel(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 19; set_unreliability_factor(ride); @@ -3012,7 +3012,7 @@ static void ride_ratings_calculate_lay_down_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 18; set_unreliability_factor(ride); @@ -3098,7 +3098,7 @@ static void ride_ratings_calculate_reverser_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 19; set_unreliability_factor(ride); @@ -3146,7 +3146,7 @@ static void ride_ratings_calculate_heartline_twister_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 18; set_unreliability_factor(ride); @@ -3292,7 +3292,7 @@ static void ride_ratings_calculate_twister_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 15; set_unreliability_factor(ride); @@ -3338,7 +3338,7 @@ static void ride_ratings_calculate_wooden_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 19; set_unreliability_factor(ride); @@ -3379,7 +3379,7 @@ static void ride_ratings_calculate_side_friction_roller_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 19; set_unreliability_factor(ride); @@ -3419,7 +3419,7 @@ static void ride_ratings_calculate_wild_mouse(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 14; set_unreliability_factor(ride); @@ -3460,7 +3460,7 @@ static void ride_ratings_calculate_multi_dimension_roller_coaster(rct_ride *ride if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 18; set_unreliability_factor(ride); @@ -3506,7 +3506,7 @@ static void ride_ratings_calculate_giga_coaster(rct_ride *ride) if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) return; - + ride->unreliability_factor = 14; set_unreliability_factor(ride); @@ -3526,9 +3526,9 @@ static void ride_ratings_calculate_giga_coaster(rct_ride *ride) if ((ride->inversions & 0x1F) == 0) ride_ratings_apply_highest_drop_height_penalty(&ratings, ride, 16, 2, 2, 2); - + ride_ratings_apply_max_speed_penalty(&ratings, ride, 0xA0000, 2, 2, 2); - + if ((ride->inversions & 0x1F) == 0) { ride_ratings_apply_max_negative_g_penalty(&ratings, ride, FIXED_2DP(0, 40), 2, 2, 2); ride_ratings_apply_num_drops_penalty(&ratings, ride, 2, 2, 2, 2); @@ -3851,7 +3851,7 @@ static void ride_ratings_calculate_magic_carpet(rct_ride *ride) ratings.nausea += ride->operation_option * 20; ride_ratings_apply_scenery(&ratings, ride, 11155); - + ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); @@ -3909,7 +3909,7 @@ static void ride_ratings_calculate_river_rafts(rct_ride *ride) ride_ratings_apply_drops(&ratings, ride, 78643, 93622, 62259); ride_ratings_apply_proximity(&ratings, ride, 13420); ride_ratings_apply_scenery(&ratings, ride, 11155); - + ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); @@ -3941,7 +3941,7 @@ static void ride_ratings_calculate_enterprise(rct_ride *ride) ratings.nausea += ride->operation_option * 16; ride_ratings_apply_scenery(&ratings, ride, 19521); - + ride_ratings_apply_intensity_penalty(&ratings); ride_ratings_apply_adjustments(ride, &ratings); diff --git a/src/ride/ride_ratings.h b/src/ride/ride_ratings.h index 5baa99e2e9..29c5c92fff 100644 --- a/src/ride/ride_ratings.h +++ b/src/ride/ride_ratings.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/ride/station.c b/src/ride/station.c index 9dffe1680a..fcdda75918 100644 --- a/src/ride/station.c +++ b/src/ride/station.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -222,7 +222,7 @@ static void ride_update_station_race(rct_ride *ride, int stationIndex) return; } } - + // Begin the race ride_race_init_vehicle_speeds(ride); ride->lifecycle_flags |= RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; diff --git a/src/ride/station.h b/src/ride/station.h index b71f1dc27d..8614e5b059 100644 --- a/src/ride/station.h +++ b/src/ride/station.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/ride/track.h b/src/ride/track.h index e279fa1400..07d4a6343d 100644 --- a/src/ride/track.h +++ b/src/ride/track.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -129,7 +129,7 @@ typedef struct { uint32 flags; // 0x02 }; union{ - // After loading the track this is converted to + // After loading the track this is converted to // a flags register uint8 ride_mode; // 0x06 uint8 track_flags; // 0x06 diff --git a/src/ride/track_data.c b/src/ride/track_data.c index 2a44f51788..1ba63b6e65 100644 --- a/src/ride/track_data.c +++ b/src/ride/track_data.c @@ -4878,75 +4878,75 @@ const uint8 TrackPieceLengths[256] = { 100, // TRACK_ELEM_RIGHT_LARGE_HALF_LOOP_UP 100, // TRACK_ELEM_RIGHT_LARGE_HALF_LOOP_DOWN 100, // TRACK_ELEM_LEFT_LARGE_HALF_LOOP_DOWN - 96, // - 96, // - 96, // - 96, // - 64, // - 64, // - 64, // - 64, // - 64, // - 64, // - 16, // - 16, // - 64, // - 64, // - 32, // - 32, // - 32, // - 32, // - 32, // - 80, // - 80, // - 80, // - 64, // - 64, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 32, // - 80, // - 80, // - 80, // + 96, // + 96, // + 96, // + 96, // + 64, // + 64, // + 64, // + 64, // + 64, // + 64, // + 16, // + 16, // + 64, // + 64, // + 32, // + 32, // + 32, // + 32, // + 32, // + 80, // + 80, // + 80, // + 64, // + 64, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 32, // + 80, // + 80, // + 80, // }; // rct2: 0x00998C95 diff --git a/src/ride/vehicle.c b/src/ride/vehicle.c index 4b03ba9c20..285704aa1c 100644 --- a/src/ride/vehicle.c +++ b/src/ride/vehicle.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -320,7 +320,7 @@ void vehicle_sounds_update() if (sprite->vehicle.sound1_id == (uint8)-1) { if (vehicle_sound->sound1_id != (uint16)-1) { vehicle_sound->sound1_id = -1; - Mixer_Stop_Channel(vehicle_sound->sound1_channel); + Mixer_Stop_Channel(vehicle_sound->sound1_channel); } } else { if (vehicle_sound->sound1_id == (uint16)-1) { @@ -424,7 +424,7 @@ void vehicle_sounds_update() } /** - * + * * rct2: 0x006D4204 */ void vehicle_update_all() @@ -449,7 +449,7 @@ void vehicle_update_all() } /** - * + * * rct2: 0x006D77F2 */ static void vehicle_update(rct_vehicle *vehicle) @@ -458,7 +458,7 @@ static void vehicle_update(rct_vehicle *vehicle) } /** - * + * * rct2: 0x006D73D0 * ax: verticalG * dx: lateralG @@ -470,7 +470,7 @@ void vehicle_get_g_forces(rct_vehicle *vehicle, int *verticalG, int *lateralG) esi = (int)vehicle; RCT2_CALLFUNC_X(0x006D73D0, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp); - + if (verticalG != NULL) *verticalG = (sint16)(eax & 0xFFFF); if (lateralG != NULL) *lateralG = (sint16)(edx & 0xFFFF); } diff --git a/src/ride/vehicle.h b/src/ride/vehicle.h index dc7327cb98..542fac531a 100644 --- a/src/ride/vehicle.h +++ b/src/ride/vehicle.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/scenario_list.c b/src/scenario_list.c index 695c8c9208..4d38ffa338 100644 --- a/src/scenario_list.c +++ b/src/scenario_list.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -43,7 +43,7 @@ rct_scenario_basic *get_scenario_by_filename(const char *filename) } /** - * + * * rct2: 0x006775A8 */ void scenario_load_list() @@ -161,7 +161,7 @@ static void scenario_scores_get_path(utf8 *outPath) } /** - * + * * rct2: 0x006775A8 */ static int scenario_scores_load() @@ -217,7 +217,7 @@ static int scenario_scores_load() } /** - * + * * rct2: 0x00677B50 */ int scenario_scores_save() diff --git a/src/sprites.h b/src/sprites.h index df08a21df1..95194a2a70 100644 --- a/src/sprites.h +++ b/src/sprites.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -32,7 +32,7 @@ enum { SPR_HOT_AND_DRY = 3292, SPR_COLD = 3293, - // This is the start of every character there are + // This is the start of every character there are // 224 characters per font (first 32 are control codes hence why it doesn't go to 255) // 4 fonts // = 896 sprites diff --git a/src/title.h b/src/title.h index 234adb6fe7..c856674fe3 100644 --- a/src/title.h +++ b/src/title.h @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (c) 2014 Ted John * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. - * + * * This file is part of OpenRCT2. - * + * * OpenRCT2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ - + #ifndef _TITLE_H_ #define _TITLE_H_ diff --git a/src/tutorial.c b/src/tutorial.c index 778cf47812..07e6b4c725 100644 --- a/src/tutorial.c +++ b/src/tutorial.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/tutorial.h b/src/tutorial.h index a9db5b71db..d1b2eced61 100644 --- a/src/tutorial.h +++ b/src/tutorial.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/util/util.c b/src/util/util.c index d7f081357b..68db4cfd74 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/util/util.h b/src/util/util.h index c0e75feb61..398ca173c4 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/about.c b/src/windows/about.c index c0c18c75dc..a513d5bf41 100644 --- a/src/windows/about.c +++ b/src/windows/about.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -77,7 +77,7 @@ static rct_window_event_list window_about_events = { }; /** - * + * * rct2: 0x0066D2AC */ void window_about_open() @@ -106,7 +106,7 @@ void window_about_open() } /** - * + * * rct2: 0x0066D4D5 */ static void window_about_mouseup(rct_window *w, int widgetIndex) @@ -125,7 +125,7 @@ static void window_about_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x0066D321 */ static void window_about_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -140,7 +140,7 @@ static void window_about_paint(rct_window *w, rct_drawpixelinfo *dpi) // Version RCT2_GLOBAL(0x009C383C, uint8) = 49; gfx_draw_string_centred(dpi, STR_VERSION_X, x, y, 0, (void*)0x009E2D28); - + // Credits RCT2_GLOBAL(0x009C383C, uint8) = 48; y += 10; diff --git a/src/windows/banner.c b/src/windows/banner.c index 6ff97c3bb4..01f6d4ec1d 100644 --- a/src/windows/banner.c +++ b/src/windows/banner.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -75,8 +75,8 @@ static rct_window_event_list window_banner_events = { NULL, window_banner_mouseup, NULL, - window_banner_mousedown, - window_banner_dropdown, + window_banner_mousedown, + window_banner_dropdown, NULL, NULL, NULL, @@ -133,7 +133,7 @@ void window_banner_open(rct_windownumber number) int view_x = gBanners[w->number].x << 5; int view_y = gBanners[w->number].y << 5; - + rct_map_element* map_element = map_get_first_element_at(view_x / 32, view_y / 32); while(1) { if ( @@ -220,25 +220,25 @@ static void window_banner_mousedown(int widgetIndex, rct_window*w, rct_widget* w window_dropdown_show_colour(w, widget, w->colours[1] | 0x80, banner->colour); break; case WIDX_TEXT_COLOR_DROPDOWN_BUTTON: - + for( int i = 0; i < 13; ++i){ gDropdownItemsFormat[i] = 1142; gDropdownItemsArgs[i] = 2997 + i; } - + //Switch to the dropdown box widget. widget--; window_dropdown_show_text_custom_width( - widget->left + w->x, - widget->top + w->y, + widget->left + w->x, + widget->top + w->y, widget->bottom - widget->top + 1, - w->colours[1], + w->colours[1], DROPDOWN_FLAG_STAY_OPEN, - 13, + 13, widget->right - widget->left - 3); - + dropdown_set_checked(banner->text_colour - 1, true); break; } @@ -246,7 +246,7 @@ static void window_banner_mousedown(int widgetIndex, rct_window*w, rct_widget* w /* rct2: 0x6ba517 */ static void window_banner_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) -{ +{ rct_banner* banner = &gBanners[w->number]; switch(widgetIndex){ @@ -323,16 +323,16 @@ static void window_banner_invalidate(rct_window *w) rct_scenery_entry* sceneryEntry = g_bannerSceneryEntries[banner->type]; if (sceneryEntry->banner.flags & 1) colour_btn->type = WWT_COLORBTN; - + w->pressed_widgets &= ~(1ULL<disabled_widgets &= ~( (1ULL<flags & BANNER_FLAG_NO_ENTRY){ w->pressed_widgets |= (1ULL<disabled_widgets |= + w->disabled_widgets |= (1ULL<. *****************************************************************************/ @@ -1131,7 +1131,7 @@ static void window_cheats_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) sprite_idx += (w->frame_no / 2) % 8; gfx_draw_sprite(dpi, sprite_idx, w->x + w->widgets[WIDX_TAB_1].left, w->y + w->widgets[WIDX_TAB_1].top, 0); } - + // Guests tab if (!(w->disabled_widgets & (1 << WIDX_TAB_2))) { sprite_idx = 5568; @@ -1159,9 +1159,9 @@ static void window_cheats_set_page(rct_window *w, int page) { w->page = page; w->frame_no = 0; - + w->enabled_widgets = window_cheats_page_enabled_widgets[page]; - + w->pressed_widgets = 0; w->event_handlers = window_cheats_page_events[page]; diff --git a/src/windows/clear_scenery.c b/src/windows/clear_scenery.c index fcbb6a50c5..e6ef342c3d 100644 --- a/src/windows/clear_scenery.c +++ b/src/windows/clear_scenery.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -97,7 +97,7 @@ static rct_window_event_list window_clear_scenery_events = { }; /** - * + * * rct2: 0x0068E0A7 */ void window_clear_scenery_open() @@ -221,11 +221,11 @@ static void window_clear_scenery_invalidate(rct_window *w) // Set the preview image button to be pressed down w->pressed_widgets = (1 << WIDX_PREVIEW) | (gClearSmallScenery ? (1 << WIDX_SMALL_SCENERY) : 0) | - (gClearLargeScenery ? (1 << WIDX_LARGE_SCENERY) : 0) | + (gClearLargeScenery ? (1 << WIDX_LARGE_SCENERY) : 0) | (gClearFootpath ? (1 << WIDX_FOOTPATH) : 0); // Update the preview image (for tool sizes up to 7) - window_clear_scenery_widgets[WIDX_PREVIEW].image = RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) <= 7 ? + window_clear_scenery_widgets[WIDX_PREVIEW].image = RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) <= 7 ? SPR_LAND_TOOL_SIZE_0 + RCT2_GLOBAL(RCT2_ADDRESS_LAND_TOOL_SIZE, sint16) : 0xFFFFFFFF; } diff --git a/src/windows/dropdown.c b/src/windows/dropdown.c index a593e4c69f..6e3335e92c 100644 --- a/src/windows/dropdown.c +++ b/src/windows/dropdown.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -170,7 +170,7 @@ void window_dropdown_show_text_custom_width(int x, int y, int extray, uint8 colo _dropdown_item_height = 10; if (flags & 0x40) _dropdown_item_height = flags & 0x3F; - + // Set the widgets gDropdownNumItems = num_items; _dropdown_num_rows = num_items; @@ -314,7 +314,7 @@ static void window_dropdown_paint(rct_window *w, rct_drawpixelinfo *dpi) *((char*)(0x00141FC4B + (w->colours[0] * 8)))); } } else { - // + // if (i == gDropdownHighlightedIndex) { l = w->x + 2 + (cell_x * _dropdown_item_width); t = w->y + 2 + (cell_y * _dropdown_item_height); @@ -366,7 +366,7 @@ static void window_dropdown_paint(rct_window *w, rct_drawpixelinfo *dpi) } } -/* New function based on 6e914e +/* New function based on 6e914e * returns -1 if index is invalid */ int dropdown_index_from_point(int x, int y, rct_window *w) @@ -408,7 +408,7 @@ void window_dropdown_show_colour_available(rct_window *w, rct_widget *widget, ui uint32 availableColours) { int i, numItems; - + // Count number of available colours numItems = 0; for (i = 0; i < 32; i++) diff --git a/src/windows/dropdown.h b/src/windows/dropdown.h index 5096e2ae92..43dcc4cf0d 100644 --- a/src/windows/dropdown.h +++ b/src/windows/dropdown.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/editor_bottom_toolbar.c b/src/windows/editor_bottom_toolbar.c index 278820e9dc..1dcbd2a15b 100644 --- a/src/windows/editor_bottom_toolbar.c +++ b/src/windows/editor_bottom_toolbar.c @@ -109,7 +109,7 @@ static EMPTY_ARGS_VOID_POINTER *previous_button_mouseup_events[] = { }; static EMPTY_ARGS_VOID_POINTER *next_button_mouseup_events[] = { - window_editor_bottom_toolbar_jump_forward_from_object_selection, + window_editor_bottom_toolbar_jump_forward_from_object_selection, window_editor_bottom_toolbar_jump_forward_to_invention_list_set_up, window_editor_bottom_toolbar_jump_forward_to_options_selection, window_editor_bottom_toolbar_jump_forward_to_objective_selection, @@ -371,7 +371,7 @@ void window_editor_bottom_toolbar_jump_forward_to_save_scenario() return; } - // + // s6Info->editor_step = 255; // Ensure path has .SC6 extension @@ -467,16 +467,16 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) if (g_editor_step == EDITOR_STEP_OBJECT_SELECTION) { drawNextButton = true; - } + } else if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) { drawPreviousButton = true; - } + } else if (RCT2_GLOBAL(0x13573C8, uint16) != 0x2710) { drawNextButton = true; } else if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_18) { drawNextButton = true; - } + } else { drawPreviousButton = true; } @@ -502,7 +502,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_MANAGER)) { - + if (drawPreviousButton) { gfx_fill_rect_inset(dpi, @@ -566,7 +566,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) short textX = (window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].left + window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].right - 30) / 2 + w->x; short textY = window_editor_bottom_toolbar_widgets[WIDX_NEXT_IMAGE].top + 6 + w->y; - + short stringId = STR_OBJECT_SELECTION_STEP + g_editor_step + 1; if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) stringId = STR_ROLLERCOASTER_DESIGNER_STEP; diff --git a/src/windows/editor_inventions_list.c b/src/windows/editor_inventions_list.c index 66feb1b2fd..396512b107 100644 --- a/src/windows/editor_inventions_list.c +++ b/src/windows/editor_inventions_list.c @@ -164,7 +164,7 @@ static int research_item_is_always_researched(rct_research_item *researchItem) return (researchItem->entryIndex & (RESEARCH_ENTRY_FLAG_RIDE_ALWAYS_RESEARCHED | RESEARCH_ENTRY_FLAG_SCENERY_SET_ALWAYS_RESEARCHED)) != 0; } -/* rct2: 0x0068596F +/* rct2: 0x0068596F * Sets rides that are in use to be always researched */ static void research_rides_setup(){ @@ -239,11 +239,11 @@ static void research_rides_setup(){ } } -/* rct2: 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++){ @@ -284,8 +284,8 @@ static void research_always_researched_setup() * rct2: 0x00685A79 */ static void sub_685A79() -{ - for (rct_research_item* research = gResearchItems; +{ + for (rct_research_item* research = gResearchItems; research->entryIndex != RESEARCHED_ITEMS_END_2; research++){ @@ -304,7 +304,7 @@ static rct_string_id research_item_get_name(uint32 researchItem) { rct_ride_type *rideEntry; rct_scenery_set_entry *sceneryEntry; - + if (researchItem < 0x10000) { sceneryEntry = g_scenerySetEntries[researchItem & 0xFF]; if (sceneryEntry == NULL || sceneryEntry == (rct_scenery_set_entry*)0xFFFFFFFF) @@ -624,7 +624,7 @@ static void window_editor_inventions_list_scrollgetheight(rct_window *w, int scr // Count / skip pre-researched items for (researchItem = gResearchItems; researchItem->entryIndex != RESEARCHED_ITEMS_SEPARATOR; researchItem++) *height += 10; - + if (scrollIndex == 1) { researchItem++; @@ -736,7 +736,7 @@ static void window_editor_inventions_list_paint(rct_window *w, rct_drawpixelinfo int x, y, width; window_draw_widgets(w, dpi); - + // Tab image x = w->x + w->widgets[WIDX_TAB_1].left; y = w->y + w->widgets[WIDX_TAB_1].top; @@ -831,7 +831,7 @@ static void window_editor_inventions_list_scrollpaint(rct_window *w, rct_drawpix // Since this is now a do while need to conteract the +10 itemY = -10; - do{ + do{ itemY += 10; if (itemY + 10 < dpi->y || itemY >= dpi->y + dpi->height) continue; diff --git a/src/windows/editor_object_selection.c b/src/windows/editor_object_selection.c index 67f032ecfb..b6e064aed3 100644 --- a/src/windows/editor_object_selection.c +++ b/src/windows/editor_object_selection.c @@ -50,7 +50,7 @@ enum { FILTER_RIDE_WATER = (1 << 9), FILTER_RIDE_STALL = (1 << 10), - + FILTER_ALL = 0x7EF, } FILTER_FLAGS; @@ -628,8 +628,8 @@ static void setup_in_use_selection_flags(){ uint8 entry_type, entry_index; if (find_object_in_entry_group(installedObject, &entry_type, &entry_index)){ if (RCT2_ADDRESS(0x0098DA38, uint8*)[entry_type][entry_index] & (1 << 0)){ - *selection_flags |= - OBJECT_SELECTION_FLAG_IN_USE | + *selection_flags |= + OBJECT_SELECTION_FLAG_IN_USE | OBJECT_SELECTION_FLAG_SELECTED; } if (RCT2_ADDRESS(0x0098DA38, uint8*)[entry_type][entry_index] & (1 << 1)){ @@ -733,7 +733,7 @@ void unload_unselected_objects(){ } /** - * + * * rct2: 0x006AB199 */ static void window_editor_object_selection_close(rct_window *w) @@ -765,7 +765,7 @@ static void window_editor_object_selection_close(rct_window *w) } /** - * + * * rct2: 0x006AAFAB */ static void window_editor_object_selection_mouseup(rct_window *w, int widgetIndex) @@ -910,7 +910,7 @@ void window_editor_object_selection_mousedown(int widgetIndex, rct_window*w, rct gDropdownItemsChecked = _filter_flags & 0xF; break; - + } } @@ -935,7 +935,7 @@ static void window_editor_object_selection_dropdown(rct_window *w, int widgetInd } /** - * + * * rct2: 0x006AB031 */ static void window_editor_object_selection_scrollgetsize(rct_window *w, int scrollIndex, int *width, int *height) @@ -944,7 +944,7 @@ static void window_editor_object_selection_scrollgetsize(rct_window *w, int scro } /** - * + * * rct2: 0x006AB0B6 */ static void window_editor_object_selection_scroll_mousedown(rct_window *w, int scrollIndex, int x, int y) @@ -999,7 +999,7 @@ static void window_editor_object_selection_scroll_mousedown(rct_window *w, int s } /** - * + * * rct2: 0x006AB079 */ static void window_editor_object_selection_scroll_mouseover(rct_window *w, int scrollIndex, int x, int y) @@ -1027,7 +1027,7 @@ static void window_editor_object_selection_scroll_mouseover(rct_window *w, int s } /** - * + * * rct2: 0x006AB058 */ static void window_editor_object_selection_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) @@ -1054,7 +1054,7 @@ static void window_editor_object_selection_tooltip(rct_window* w, int widgetInde } /** - * + * * rct2: 0x006AA9FD */ static void window_editor_object_selection_invalidate(rct_window *w) @@ -1180,14 +1180,14 @@ static void window_editor_object_selection_invalidate(rct_window *w) (1 << WIDX_FILTER_RIDE_TAB_WATER) | (1 << WIDX_FILTER_RIDE_TAB_STALL)); for (int i = WIDX_FILTER_RIDE_TAB_FRAME; i <= WIDX_FILTER_RIDE_TAB_STALL; i++) w->widgets[i].type = WWT_EMPTY; - + w->widgets[WIDX_LIST_SORT_TYPE].type = WWT_EMPTY; w->widgets[WIDX_LIST_SORT_RIDE].type = WWT_EMPTY; } } /** - * + * * rct2: 0x006AAB56 */ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -1363,7 +1363,7 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf strcpy(stringBuffer, name); } gfx_draw_string_centred_clipped(dpi, stringId, NULL, 0, x, y, width); - + // Draw description of object x = w->x + w->widgets[WIDX_LIST].right + 4; y += 15; @@ -1379,7 +1379,7 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf } gfx_draw_string_right(dpi, stringId, NULL, 2, w->x + w->width - 5, w->y + w->height - 3 - 12 - 14); - // + // if (w->selected_tab == WINDOW_OBJECT_SELECTION_PAGE_RIDE_VEHICLES_ATTRACTIONS) { y = w->y + w->height - 3 - 12 - 14 - 14; @@ -1404,7 +1404,7 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf } /** - * + * * rct2: 0x006AADA3 */ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex) @@ -1651,7 +1651,7 @@ void reset_required_object_flags(){ set_required_object_flags(required_object); required_object++; } - + } selection_flags++; @@ -1659,9 +1659,9 @@ void reset_required_object_flags(){ } } -/* +/* * Master objects are objects that are not - * optional / required dependants of an + * optional / required dependants of an * object. */ void set_object_selection_error(uint8 is_master_object, rct_string_id error_msg){ @@ -1814,7 +1814,7 @@ static int window_editor_object_selection_select_object(uint8 bh, int flags, rct // Skip size of chunk pos += 4; - uint8 num_required_objects = *pos++; + uint8 num_required_objects = *pos++; rct_object_entry* required_objects = (rct_object_entry*)pos; for (; num_required_objects != 0; num_required_objects--){ if (!window_editor_object_selection_select_object(++bh, flags, required_objects)){ @@ -1837,7 +1837,7 @@ static int window_editor_object_selection_select_object(uint8 bh, int flags, rct } theme_object++; } - + if (bh != 0 && !(flags&(1 << 1))){ uint32* arguments = RCT2_ADDRESS(0x0013CE952, uint32); object_create_identifier_name((char*)0x009BC95A, installedObject); @@ -1888,7 +1888,7 @@ static int get_object_from_object_selection(uint8 object_type, int y, uint8 *obj } /** - * + * * rct2: 0x006D33E2 */ static void window_editor_object_selection_manage_tracks() @@ -1927,7 +1927,7 @@ static void window_editor_object_selection_manage_tracks() } /** - * + * * rct2: 0x006ABBBE */ static void editor_load_selected_objects() diff --git a/src/windows/editor_objective_options.c b/src/windows/editor_objective_options.c index 1712de45fd..0a4909d758 100644 --- a/src/windows/editor_objective_options.c +++ b/src/windows/editor_objective_options.c @@ -506,7 +506,7 @@ static void window_editor_objective_options_show_climate_dropdown(rct_window *w) { int i; rct_widget *dropdownWidget; - + dropdownWidget = &w->widgets[WIDX_CLIMATE]; for (i = 0; i < 4; i++) { @@ -530,7 +530,7 @@ static void window_editor_objective_options_show_category_dropdown(rct_window *w rct_s6_info *s6Info = (rct_s6_info*)0x00141F570; int i; rct_widget *dropdownWidget; - + dropdownWidget = &w->widgets[WIDX_CATEGORY]; for (i = 0; i < 5; i++) { @@ -1224,7 +1224,7 @@ static void window_editor_objective_options_update_disabled_widgets(rct_window * numRides++; } } - + if (numRides == 0) { w->disabled_widgets &= ~(1 << WIDX_TAB_2); } else { diff --git a/src/windows/editor_scenario_options.c b/src/windows/editor_scenario_options.c index 24ee1454e4..f1bb0880fb 100644 --- a/src/windows/editor_scenario_options.c +++ b/src/windows/editor_scenario_options.c @@ -830,7 +830,7 @@ static void window_editor_scenario_options_guests_invalidate(rct_window *w) } else { w->widgets[WIDX_CASH_PER_GUEST].type = WWT_SPINNER; w->widgets[WIDX_CASH_PER_GUEST_INCREASE].type = WWT_DROPDOWN_BUTTON; - w->widgets[WIDX_CASH_PER_GUEST_DECREASE].type = WWT_DROPDOWN_BUTTON; + w->widgets[WIDX_CASH_PER_GUEST_DECREASE].type = WWT_DROPDOWN_BUTTON; } // Guests prefer less intense rides checkbox @@ -874,7 +874,7 @@ static void window_editor_scenario_options_guests_paint(rct_window *w, rct_drawp arg = RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_CASH, money16); gfx_draw_string_left(dpi, 3246, &arg, 0, x, y); } - + // Guest initial happiness label x = w->x + 8; y = w->y + w->widgets[WIDX_GUEST_INITIAL_HAPPINESS].top; @@ -1177,7 +1177,7 @@ static void window_editor_scenario_options_park_paint(rct_window *w, rct_drawpix x = w->x + 8; y = w->y + w->widgets[WIDX_LAND_COST].top; gfx_draw_string_left(dpi, 3277, NULL, 0, x, y); - + // Cost to buy land value x = w->x + w->widgets[WIDX_LAND_COST].left + 1; y = w->y + w->widgets[WIDX_LAND_COST].top; @@ -1190,7 +1190,7 @@ static void window_editor_scenario_options_park_paint(rct_window *w, rct_drawpix x = w->x + 8; y = w->y + w->widgets[WIDX_CONSTRUCTION_RIGHTS_COST].top; gfx_draw_string_left(dpi, 3278, NULL, 0, x, y); - + // Cost to buy construction rights value x = w->x + w->widgets[WIDX_CONSTRUCTION_RIGHTS_COST].left + 1; y = w->y + w->widgets[WIDX_CONSTRUCTION_RIGHTS_COST].top; @@ -1208,7 +1208,7 @@ static void window_editor_scenario_options_park_paint(rct_window *w, rct_drawpix stringId = RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY ? 3279 : 3280; gfx_draw_string_left(dpi, 1193, &stringId, 0, x, y); } - + if (w->widgets[WIDX_ENTRY_PRICE].type != WWT_EMPTY) { // Entry price label x = w->x + w->widgets[WIDX_PAY_FOR_PARK_OR_RIDES].right + 8; diff --git a/src/windows/error.c b/src/windows/error.c index 90576f6b61..b93d15da65 100644 --- a/src/windows/error.c +++ b/src/windows/error.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -72,7 +72,7 @@ static char _window_error_text[512]; static uint16 _window_error_num_lines; /** - * + * * rct2: 0x0066792F * * bx: title @@ -133,7 +133,7 @@ void window_error_open(rct_string_id title, rct_string_id message) y = y - height - 40; y = min(y, maxY); } - + w = window_create(x, y, width, height, &window_error_events, WC_ERROR, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_RESIZABLE); w->widgets = window_error_widgets; w->error.var_480 = 0; @@ -142,7 +142,7 @@ void window_error_open(rct_string_id title, rct_string_id message) } /** - * + * * rct2: 0x00667BFE */ static void window_error_unknown5(rct_window *w) @@ -153,7 +153,7 @@ static void window_error_unknown5(rct_window *w) } /** - * + * * rct2: 0x00667AA3 */ static void window_error_paint(rct_window *w, rct_drawpixelinfo *dpi) diff --git a/src/windows/error.h b/src/windows/error.h index 3ddb36c1c9..6f30cc74f2 100644 --- a/src/windows/error.h +++ b/src/windows/error.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/finances.c b/src/windows/finances.c index 11ad495297..3b74bd95c8 100644 --- a/src/windows/finances.c +++ b/src/windows/finances.c @@ -627,7 +627,7 @@ static void window_finances_summary_update(rct_window *w) } /** - * + * * rct2: 0x0069C732 */ static void window_finances_summary_invalidate(rct_window *w) @@ -644,7 +644,7 @@ static void window_finances_summary_invalidate(rct_window *w) } /** - * + * * rct2: 0x0069C771 */ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -693,7 +693,7 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi) y - 1 ); y += 14; - + // Month expenditures money32 profit = 0; money32 *expenditures = &RCT2_ADDRESS(RCT2_ADDRESS_EXPENDITURE_TABLE, money32)[i * 14]; @@ -728,7 +728,7 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi) x += 80; } - + // Horizontal rule below expenditure / income table gfx_fill_rect_inset(dpi, w->x + 8, w->y + 223, w->x + 8 + 513, w->y + 223 + 1, w->colours[1], 0x20); @@ -765,7 +765,7 @@ static void window_finances_summary_paint(rct_window *w, rct_drawpixelinfo *dpi) #pragma region Financial graph page /** - * + * * rct2: 0x0069CF70 */ static void window_finances_financial_graph_mouseup(rct_window *w, int widgetIndex) @@ -777,7 +777,7 @@ static void window_finances_financial_graph_mouseup(rct_window *w, int widgetInd } /** - * + * * rct2: 0x0069CF8B */ static void window_finances_financial_graph_update(rct_window *w) @@ -789,7 +789,7 @@ static void window_finances_financial_graph_update(rct_window *w) } /** - * + * * rct2: 0x0069CBDB */ static void window_finances_financial_graph_invalidate(rct_window *w) @@ -805,7 +805,7 @@ static void window_finances_financial_graph_invalidate(rct_window *w) } /** - * + * * rct2: 0x0069CC10 */ static void window_finances_financial_graph_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -875,7 +875,7 @@ static void window_finances_financial_graph_paint(rct_window *w, rct_drawpixelin #pragma region Value graph page /** - * + * * rct2: 0x0069D338 */ static void window_finances_park_value_graph_mouseup(rct_window *w, int widgetIndex) @@ -887,7 +887,7 @@ static void window_finances_park_value_graph_mouseup(rct_window *w, int widgetIn } /** - * + * * rct2: 0x0069D353 */ static void window_finances_park_value_graph_update(rct_window *w) @@ -899,7 +899,7 @@ static void window_finances_park_value_graph_update(rct_window *w) } /** - * + * * rct2: 0x0069CFC0 */ static void window_finances_park_value_graph_invalidate(rct_window *w) @@ -915,7 +915,7 @@ static void window_finances_park_value_graph_invalidate(rct_window *w) } /** - * + * * rct2: 0x0069CFF5 */ static void window_finances_park_value_graph_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -981,7 +981,7 @@ static void window_finances_park_value_graph_paint(rct_window *w, rct_drawpixeli #pragma region Profit graph page /** - * + * * rct2: 0x0069D715 */ static void window_finances_profit_graph_mouseup(rct_window *w, int widgetIndex) @@ -993,7 +993,7 @@ static void window_finances_profit_graph_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x0069D730 */ static void window_finances_profit_graph_update(rct_window *w) @@ -1005,7 +1005,7 @@ static void window_finances_profit_graph_update(rct_window *w) } /** - * + * * rct2: 0x0069D388 */ static void window_finances_profit_graph_invalidate(rct_window *w) @@ -1021,7 +1021,7 @@ static void window_finances_profit_graph_invalidate(rct_window *w) } /** - * + * * rct2: 0x0069D3BD */ static void window_finances_profit_graph_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -1087,7 +1087,7 @@ static void window_finances_profit_graph_paint(rct_window *w, rct_drawpixelinfo #pragma region Marketing page /** - * + * * rct2: 0x0069D9F9 */ static void window_finances_marketing_mouseup(rct_window *w, int widgetIndex) @@ -1102,7 +1102,7 @@ static void window_finances_marketing_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x0069DA2F */ static void window_finances_marketing_update(rct_window *w) @@ -1114,7 +1114,7 @@ static void window_finances_marketing_update(rct_window *w) } /** - * + * * rct2: 0x0069D765 */ static void window_finances_marketing_invalidate(rct_window *w) @@ -1162,7 +1162,7 @@ static void window_finances_marketing_invalidate(rct_window *w) } /** - * + * * rct2: 0x0069D834 */ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -1236,7 +1236,7 @@ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dp #pragma region Research page /** - * + * * rct2: 0x0069DB3F */ static void window_finances_research_mouseup(rct_window *w, int widgetIndex) @@ -1270,14 +1270,14 @@ static void window_finances_research_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x0069DB66 */ static void window_finances_research_mousedown(int widgetIndex, rct_window *w, rct_widget* widget) { rct_widget *dropdownWidget; int i; - + if (widgetIndex != WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON) return; @@ -1302,7 +1302,7 @@ static void window_finances_research_mousedown(int widgetIndex, rct_window *w, r } /** - * + * * rct2: 0x0069DB6D */ static void window_finances_research_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -1314,7 +1314,7 @@ static void window_finances_research_dropdown(rct_window *w, int widgetIndex, in } /** - * + * * rct2: 0x0069DC23 */ static void window_finances_research_update(rct_window *w) @@ -1326,7 +1326,7 @@ static void window_finances_research_update(rct_window *w) } /** - * + * * rct2: 0x0069DA64 */ static void window_finances_research_invalidate(rct_window *w) @@ -1347,7 +1347,7 @@ static void window_finances_research_invalidate(rct_window *w) // Current funding window_finances_research_widgets[WIDX_RESEARCH_FUNDING].image = STR_NO_FUNDING + currentResearchLevel; - + // Checkboxes int activeResearchTypes = RCT2_GLOBAL(RCT2_ADDRESS_ACTIVE_RESEARCH_TYPES, uint16); int uncompletedResearchTypes = gResearchUncompletedCategories; @@ -1372,7 +1372,7 @@ static void window_finances_research_invalidate(rct_window *w) } /** - * + * * rct2: 0x0069DAF0 */ static void window_finances_research_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -1406,7 +1406,7 @@ static void window_finances_set_page(rct_window *w, int page) w->widgets = window_finances_page_widgets[page]; w->disabled_widgets = 0; w->pressed_widgets = 0; - + window_invalidate(w); if (w->page == WINDOW_FINANCES_PAGE_RESEARCH) { w->width = 320; diff --git a/src/windows/footpath.c b/src/windows/footpath.c index 2dcbfe94e0..adcd719edb 100644 --- a/src/windows/footpath.c +++ b/src/windows/footpath.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -162,7 +162,7 @@ static void window_footpath_set_enabled_and_pressed_widgets(); static void footpath_get_next_path_info(int *type, int *x, int *y, int *z, int *slope); /** - * + * * rct2: 0x006A7C43 */ void window_footpath_open() @@ -222,7 +222,7 @@ void window_footpath_open() } /** - * + * * rct2: 0x006A852F */ static void window_footpath_close(rct_window *w) @@ -236,7 +236,7 @@ static void window_footpath_close(rct_window *w) } /** - * + * * rct2: 0x006A7E92 */ static void window_footpath_mouseup(rct_window *w, int widgetIndex) @@ -285,7 +285,7 @@ static void window_footpath_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006A7EC5 */ static void window_footpath_mousedown(int widgetIndex, rct_window*w, rct_widget* widget) @@ -322,7 +322,7 @@ static void window_footpath_mousedown(int widgetIndex, rct_window*w, rct_widget* } /** - * + * * rct2: 0x006A7F18 */ static void window_footpath_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -336,7 +336,7 @@ static void window_footpath_dropdown(rct_window *w, int widgetIndex, int dropdow RCT2_GLOBAL(RCT2_ADDRESS_SELECTED_PATH_TYPE, uint8) = SELECTED_PATH_TYPE_QUEUE; else return; - + // Get path id pathId = dropdownIndex; if (pathId == -1) { @@ -372,7 +372,7 @@ static void window_footpath_dropdown(rct_window *w, int widgetIndex, int dropdow } /** - * + * * rct2: 0x006A8032 */ static void window_footpath_toolupdate(rct_window* w, int widgetIndex, int x, int y) @@ -385,7 +385,7 @@ static void window_footpath_toolupdate(rct_window* w, int widgetIndex, int x, in } /** - * + * * rct2: 0x006A8047 */ static void window_footpath_tooldown(rct_window* w, int widgetIndex, int x, int y) @@ -397,7 +397,7 @@ static void window_footpath_tooldown(rct_window* w, int widgetIndex, int x, int } /** - * + * * rct2: 0x006A8067 */ static void window_footpath_tooldrag(rct_window* w, int widgetIndex, int x, int y) @@ -408,7 +408,7 @@ static void window_footpath_tooldrag(rct_window* w, int widgetIndex, int x, int } /** - * + * * rct2: 0x006A8066 */ static void window_footpath_toolup(rct_window* w, int widgetIndex, int x, int y) @@ -420,7 +420,7 @@ static void window_footpath_toolup(rct_window* w, int widgetIndex, int x, int y) } /** - * + * * rct2: 0x006A7760 */ static void window_footpath_update_provisional_path_for_bridge_mode(rct_window *w) @@ -455,7 +455,7 @@ static void window_footpath_update_provisional_path_for_bridge_mode(rct_window * } /** - * + * * rct2: 0x006A84BB */ static void window_footpath_update(rct_window *w) @@ -482,7 +482,7 @@ static void window_footpath_update(rct_window *w) } /** - * + * * rct2: 0x006A7D1C */ static void window_footpath_invalidate(rct_window *w) @@ -491,7 +491,7 @@ static void window_footpath_invalidate(rct_window *w) rct_path_type *pathType; colour_scheme_update(w); - + // Press / unpress footpath and queue type buttons w->pressed_widgets &= ~(1 << WIDX_FOOTPATH_TYPE); w->pressed_widgets &= ~(1 << WIDX_QUEUELINE_TYPE); @@ -517,7 +517,7 @@ static void window_footpath_invalidate(rct_window *w) window_footpath_widgets[WIDX_QUEUELINE_TYPE].type = WWT_FLATBTN; } else { window_footpath_widgets[WIDX_QUEUELINE_TYPE].type = WWT_EMPTY; - } + } // Disable queue line button if in Scenario Editor if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) @@ -525,7 +525,7 @@ static void window_footpath_invalidate(rct_window *w) } /** - * + * * rct2: 0x006A7D8B */ static void window_footpath_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -570,7 +570,7 @@ static void window_footpath_paint(rct_window *w, rct_drawpixelinfo *dpi) } /** - * + * * rct2: 0x006A7F88 */ static void window_footpath_show_footpath_types_dialog(rct_window *w, rct_widget *widget, int showQueues) @@ -636,7 +636,7 @@ static void window_footpath_mousedown_slope(int slope) } /** - * + * * rct2: 0x006A81FB */ static void window_footpath_set_provisional_path_at_point(int x, int y) @@ -724,7 +724,7 @@ static void window_footpath_set_selection_start_bridge_at_point(int screenX, int } /** - * + * * rct2: 0x006A82C5 */ static void window_footpath_place_path_at_point(int x, int y) @@ -767,7 +767,7 @@ static void window_footpath_place_path_at_point(int x, int y) } /** - * + * * rct2: 0x006A840F */ static void window_footpath_start_bridge_at_point(int screenX, int screenY) @@ -800,7 +800,7 @@ static void window_footpath_start_bridge_at_point(int screenX, int screenY) } } } - + tool_cancel(); RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCT_PATH_FROM_X, uint16) = x; RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCT_PATH_FROM_Y, uint16) = y; @@ -878,7 +878,7 @@ static void window_footpath_construct() } /** - * + * * rct2: 0x006A78EF */ static void footpath_remove_map_element(rct_map_element *mapElement) @@ -929,7 +929,7 @@ static void footpath_remove_map_element(rct_map_element *mapElement) } /** - * + * * rct2: 0x006A7873 */ static rct_map_element *footpath_get_map_element_to_remove() @@ -958,7 +958,7 @@ static rct_map_element *footpath_get_map_element_to_remove() if (!(mapElement->properties.path.type & 4)) if ((mapElement->properties.path.type & 3) == RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCT_PATH_DIRECTION, uint8)) continue; - + return mapElement; } } @@ -968,7 +968,7 @@ static rct_map_element *footpath_get_map_element_to_remove() } /** - * + * * rct2: 0x006A7863 */ static void window_footpath_remove() @@ -986,7 +986,7 @@ static void window_footpath_remove() } /** - * + * * rct2: 0x006A855C */ static void window_footpath_set_enabled_and_pressed_widgets() @@ -1061,7 +1061,7 @@ static void window_footpath_set_enabled_and_pressed_widgets() } /** - * + * * rct2: 0x006A7B20 */ static void footpath_get_next_path_info(int *type, int *x, int *y, int *z, int *slope) diff --git a/src/windows/game_bottom_toolbar.c b/src/windows/game_bottom_toolbar.c index c9e001f09e..5867e645f8 100644 --- a/src/windows/game_bottom_toolbar.c +++ b/src/windows/game_bottom_toolbar.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -158,7 +158,7 @@ void window_game_bottom_toolbar_open() } /** - * + * * rct2: 0x0066C588 */ static void window_game_bottom_toolbar_mouseup(rct_window *w, int widgetIndex) @@ -225,7 +225,7 @@ static void window_game_bottom_toolbar_tooltip(rct_window* w, int widgetIndex, r case WIDX_DATE: month = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, sint16) & 7; day = ((RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_TICKS, uint16) * days_in_month[month]) >> 16) & 0xFF; - + RCT2_GLOBAL(0x013CE952, short) = STR_DATE_DAY_1 + day; RCT2_GLOBAL(0x013CE954, short) = STR_MONTH_MARCH + month; break; @@ -233,7 +233,7 @@ static void window_game_bottom_toolbar_tooltip(rct_window* w, int widgetIndex, r } /** - * + * * rct2: 0x0066BBA0 */ static void window_game_bottom_toolbar_invalidate(rct_window *w) @@ -314,7 +314,7 @@ static void window_game_bottom_toolbar_invalidate(rct_window *w) } /** - * + * * rct2: 0x0066BB79 */ void window_game_bottom_toolbar_invalidate_news_item() @@ -325,7 +325,7 @@ void window_game_bottom_toolbar_invalidate_news_item() } /** - * + * * rct2: 0x0066BC87 */ static void window_game_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -411,7 +411,7 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, r } /** - * + * * rct2: 0x0066C76C */ static void window_game_bottom_toolbar_draw_park_rating(rct_drawpixelinfo *dpi, rct_window *w, int colour, int x, int y, uint8 factor) @@ -493,7 +493,7 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi, } /** - * + * * rct2: 0x0066BFA5 */ static void window_game_bottom_toolbar_draw_news_item(rct_drawpixelinfo *dpi, rct_window *w) diff --git a/src/windows/guest_list.c b/src/windows/guest_list.c index d1b097b92b..517569c438 100644 --- a/src/windows/guest_list.c +++ b/src/windows/guest_list.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -138,7 +138,7 @@ static void window_guest_list_find_groups(); static void get_arguments_from_peep(rct_peep *peep, uint32 *argument_1, uint32* argument_2); /** - * + * * rct2: 0x006992E3 */ void window_guest_list_open() @@ -267,7 +267,7 @@ void window_guest_list_open_with_filter(int type, int index) } /** - * + * * rct2: 0x00699AAF */ static void window_guest_list_mouseup(rct_window *w, int widgetIndex) @@ -292,7 +292,7 @@ static void window_guest_list_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x00699EA3 */ static void window_guest_list_resize(rct_window *w) @@ -310,7 +310,7 @@ static void window_guest_list_resize(rct_window *w) } /** - * + * * rct2: 0x00699AC4 */ static void window_guest_list_mousedown(int widgetIndex, rct_window*w, rct_widget* widget) @@ -378,7 +378,7 @@ static void window_guest_list_mousedown(int widgetIndex, rct_window*w, rct_widge } /** - * + * * rct2: 0x00699AE1 */ static void window_guest_list_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -400,7 +400,7 @@ static void window_guest_list_dropdown(rct_window *w, int widgetIndex, int dropd } /** - * + * * rct2: 0x00699E54 */ static void window_guest_list_update(rct_window *w) @@ -414,7 +414,7 @@ static void window_guest_list_update(rct_window *w) } /** - * + * * rct2: 0x00699C55 */ static void window_guest_list_scrollgetsize(rct_window *w, int scrollIndex, int *width, int *height) @@ -474,7 +474,7 @@ static void window_guest_list_scrollgetsize(rct_window *w, int scrollIndex, int } /** - * + * * rct2: 0x00699D7D */ static void window_guest_list_scrollmousedown(rct_window *w, int scrollIndex, int x, int y) @@ -498,7 +498,7 @@ static void window_guest_list_scrollmousedown(rct_window *w, int scrollIndex, in if (i == 0) { // Open guest window window_guest_open(peep); - + break; } else { i--; @@ -521,7 +521,7 @@ static void window_guest_list_scrollmousedown(rct_window *w, int scrollIndex, in } /** - * + * * rct2: 0x00699D3B */ static void window_guest_list_scrollmouseover(rct_window *w, int scrollIndex, int x, int y) @@ -537,7 +537,7 @@ static void window_guest_list_scrollmouseover(rct_window *w, int scrollIndex, in } /** - * + * * rct2: 0x00699E4A */ static void window_guest_list_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) @@ -546,7 +546,7 @@ static void window_guest_list_tooltip(rct_window* w, int widgetIndex, rct_string } /** - * + * * rct2: 0x00699511 */ static void window_guest_list_invalidate(rct_window *w) @@ -576,7 +576,7 @@ static void window_guest_list_invalidate(rct_window *w) } /** - * + * * rct2: 0x006995CC */ static void window_guest_list_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -632,7 +632,7 @@ static void window_guest_list_paint(rct_window *w, rct_drawpixelinfo *dpi) } /** - * + * * rct2: 0x00699701 */ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex) @@ -664,7 +664,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, if (_window_guest_list_tracking_only && !(peep->flags & PEEP_FLAGS_TRACKING)) continue; - // + // if (y + 11 >= -0x7FFF && y + 11 > dpi->y && y < 0x7FFF) { // Check if y is beyond the scroll control if (y > dpi->y + dpi->height) @@ -690,9 +690,9 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, // Tracking icon if (peep->flags & PEEP_FLAGS_TRACKING) gfx_draw_sprite(dpi, 5129, 112, y, 0); - + // Action - + get_arguments_from_action(peep, &argument_1, &argument_2); RCT2_GLOBAL(0x013CE952, uint32) = argument_1; @@ -709,7 +709,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, continue; if (thought->var_2 > 5) break; - + get_arguments_from_thought(peep->thoughts[j], &argument_1, &argument_2); RCT2_GLOBAL(0x013CE952, uint32) = argument_1; @@ -789,7 +789,7 @@ static int window_guest_list_is_peep_in_filter(rct_peep* peep) return 1; } -/** +/** * rct2:0x0069B7EA * Calculates a hash value (arguments) for comparing peep actions/thoughts * peep (esi) @@ -817,7 +817,7 @@ static void get_arguments_from_peep(rct_peep *peep, uint32 *argument_1, uint32* } /** - * + * * rct2: 0x0069B5AE */ static void window_guest_list_find_groups() @@ -854,11 +854,11 @@ static void window_guest_list_find_groups() _window_guest_list_num_groups++; _window_guest_list_groups_num_guests[groupIndex] = 1; peep->var_0C &= ~(1 << 8); - + get_arguments_from_peep( peep, &_window_guest_list_groups_argument_1[groupIndex], &_window_guest_list_groups_argument_2[groupIndex]); RCT2_GLOBAL(0x00F1EDF6, uint32) = _window_guest_list_groups_argument_1[groupIndex]; RCT2_GLOBAL(0x00F1EDFA, uint32) = _window_guest_list_groups_argument_2[groupIndex]; - + RCT2_ADDRESS(0x00F1AF26, uint8)[groupIndex] = groupIndex; faceIndex = groupIndex * 56; _window_guest_list_groups_guest_faces[faceIndex++] = get_peep_face_sprite_small(peep) - 5486; diff --git a/src/windows/install_track.c b/src/windows/install_track.c index 70615409f6..b0591080b7 100644 --- a/src/windows/install_track.c +++ b/src/windows/install_track.c @@ -270,7 +270,7 @@ static void window_install_track_invalidate(rct_window *w) else w->pressed_widgets &= ~(1 << WIDX_TOGGLE_SCENERY); - if (w->track_list.var_482 != 0xFFFF) { + if (w->track_list.var_482 != 0xFFFF) { w->disabled_widgets &= ~(1 << WIDX_TRACK_PREVIEW); } else { @@ -326,7 +326,7 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi) y = w->y + widget->bottom - 12; RCT2_GLOBAL(0x00F44153, uint8) = 0; - + // Warnings if (track_td6->track_flags & 1) { RCT2_GLOBAL(0x00F44153, uint8) = 1; diff --git a/src/windows/land.c b/src/windows/land.c index 82cb1e99cd..366c9f2a2f 100644 --- a/src/windows/land.c +++ b/src/windows/land.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/land_rights.c b/src/windows/land_rights.c index ce0ea3cf89..b59432fee9 100644 --- a/src/windows/land_rights.c +++ b/src/windows/land_rights.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/loadsave.c b/src/windows/loadsave.c index b3f584ac28..9e2d0e1c97 100644 --- a/src/windows/loadsave.c +++ b/src/windows/loadsave.c @@ -18,7 +18,7 @@ * along with this program. If not, see . *****************************************************************************/ -#include +#include #include "../addresses.h" #include "../config.h" #include "../game.h" @@ -399,7 +399,7 @@ static void window_loadsave_scrollmouseover(rct_window *w, int scrollIndex, int selectedItem = y / 10; if (selectedItem >= w->no_list_items) return; - + w->selected_list_item = selectedItem; window_invalidate(w); @@ -530,13 +530,13 @@ static void window_loadsave_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, i char *templateString; gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, RCT2_ADDRESS(0x0141FC48,uint8)[w->colours[1] * 8]); - + templateString = (char*)language_get_string(templateStringId); for (i = 0; i < w->no_list_items; i++) { y = i * 10; if (y > dpi->y + dpi->height) break; - + if (y + 10 < dpi->y) continue; diff --git a/src/windows/main.c b/src/windows/main.c index 1d6fdb8d10..e1bdf08aa8 100644 --- a/src/windows/main.c +++ b/src/windows/main.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -92,7 +92,7 @@ void window_main_open() /** * - * rct2: 0x66CCAE + * rct2: 0x66CCAE * This function immediately jumps to 0x00685BE1 this is the second function * decompiled. */ diff --git a/src/windows/map.c b/src/windows/map.c index f7d8728b1b..e8174c9ed4 100644 --- a/src/windows/map.c +++ b/src/windows/map.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -847,7 +847,7 @@ static void window_map_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int sc window_map_paint_peep_overlay(dpi); else window_map_paint_train_overlay(dpi); - + window_map_paint_hud_rectangle(dpi); } @@ -855,7 +855,7 @@ static void window_map_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int sc * * rct2: 0x0068CA6C */ -static void window_map_init_map() +static void window_map_init_map() { memset(RCT2_GLOBAL(RCT2_ADDRESS_MAP_IMAGE_DATA, void*), 0x0A0A0A0A, 256 * 256 * sizeof(uint32)); RCT2_GLOBAL(0x00F1AD6C, uint32) = 0; @@ -887,7 +887,7 @@ static void window_map_center_on_view_point() dx = ((w->viewport->view_height >> 1) + w->viewport->view_y) >> 4; cx += offset.x; dx += offset.y; - + // calculate width and height of minimap ax = w_map->widgets[WIDX_MAP].right - w_map->widgets[WIDX_MAP].left - 11; @@ -1078,7 +1078,7 @@ static void window_map_paint_train_overlay(rct_drawpixelinfo *dpi) /** * The call to gfx_fill_rect was originally wrapped in sub_68DABD which made sure that arguments were ordered correctly, * but it doesn't look like it's ever necessary here so the call was removed. - * + * * rct2: 0x0068D8CE */ static void window_map_paint_hud_rectangle(rct_drawpixelinfo *dpi) @@ -1115,7 +1115,7 @@ static void window_map_paint_hud_rectangle(rct_drawpixelinfo *dpi) } /** - * + * * rct2: 0x0068D24E */ static void window_map_set_land_rights_tool_update(int x, int y) @@ -1148,7 +1148,7 @@ static void window_map_set_land_rights_tool_update(int x, int y) } /** - * + * * rct2: 0x00666EEF */ void sub_666EEF(int x, int y, sint16 *mapX, sint16 *mapY, sint16 *mapZ, int *direction) @@ -1174,7 +1174,7 @@ void sub_666EEF(int x, int y, sint16 *mapX, sint16 *mapY, sint16 *mapZ, int *dir } /** - * + * * rct2: 0x00666FD0 */ static void window_map_place_park_entrance_tool_update(int x, int y) @@ -1218,7 +1218,7 @@ static void window_map_place_park_entrance_tool_update(int x, int y) } /** - * + * * rct2: 0x0068D4E9 */ static void window_map_set_peep_spawn_tool_update(int x, int y) @@ -1256,7 +1256,7 @@ static void window_map_set_peep_spawn_tool_update(int x, int y) } /** - * + * * rct2: 0x006670A4 */ static void window_map_place_park_entrance_tool_down(int x, int y) @@ -1293,7 +1293,7 @@ static void window_map_place_park_entrance_tool_down(int x, int y) } /** - * + * * rct2: 0x0068D573 */ static void window_map_set_peep_spawn_tool_down(int x, int y) @@ -1327,7 +1327,7 @@ static void window_map_set_peep_spawn_tool_down(int x, int y) } /** - * + * * rct2: 0x0068D641 */ static void map_window_increase_map_size() @@ -1348,7 +1348,7 @@ static void map_window_increase_map_size() } /** - * + * * rct2: 0x0068D6B4 */ static void map_window_decrease_map_size() @@ -1596,7 +1596,7 @@ static void map_window_set_pixels(rct_window *w) { uint16 colour, *destination; int x, y, dx, dy; - + destination = (uint16*)((RCT2_GLOBAL(0x00F1AD6C, uint32) * 511) + RCT2_GLOBAL(0x00F1AD68, uint32) + 255); switch (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint8)) { case 0: diff --git a/src/windows/map_tooltip.c b/src/windows/map_tooltip.c index 0356c31197..8499a0b7d2 100644 --- a/src/windows/map_tooltip.c +++ b/src/windows/map_tooltip.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -63,7 +63,7 @@ static rct_window_event_list window_map_tooltip_events = { NULL }; -#define MAP_TOOLTIP_ARGS +#define MAP_TOOLTIP_ARGS static int _lastCursorX; static int _lastCursorY; @@ -105,7 +105,7 @@ void window_map_tooltip_update_visibility() } /** - * + * * rct2: 0x006A7C43 */ static void window_map_tooltip_open() @@ -134,7 +134,7 @@ static void window_map_tooltip_open() } /** - * + * * rct2: 0x006EE8CE */ static void window_map_tooltip_update(rct_window *w) @@ -143,7 +143,7 @@ static void window_map_tooltip_update(rct_window *w) } /** - * + * * rct2: 0x006EE894 */ static void window_map_tooltip_paint(rct_window *w, rct_drawpixelinfo *dpi) diff --git a/src/windows/mapgen.c b/src/windows/mapgen.c index 87d9fe573e..dd7336dd70 100644 --- a/src/windows/mapgen.c +++ b/src/windows/mapgen.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -168,7 +168,7 @@ static rct_widget window_mapgen_simplex_widgets[] = { { WWT_FLATBTN, 1, 225, 271, 68, 103, 0xFFFFFFFF, STR_CHANGE_BASE_LAND_TIP }, { WWT_FLATBTN, 1, 225, 271, 104, 139, 0xFFFFFFFF, STR_CHANGE_VERTICAL_LAND_TIP }, - + { WIDGETS_END }, }; @@ -978,7 +978,7 @@ static void window_mapgen_simplex_paint(rct_window *w, rct_drawpixelinfo *dpi) uint16 mapSizeArgs[2] = { _mapSize, _mapSize }; gfx_draw_string_left(dpi, 839, mapSizeArgs, w->colours[1], w->x + w->widgets[WIDX_SIMPLEX_MAP_SIZE].left + 1, w->y + w->widgets[WIDX_SIMPLEX_MAP_SIZE].top + 1); - + arg = (_waterLevel - 12) / 2; gfx_draw_string_left(dpi, 1737, &arg, w->colours[1], w->x + w->widgets[WIDX_SIMPLEX_WATER_LEVEL].left + 1, w->y + w->widgets[WIDX_SIMPLEX_WATER_LEVEL].top + 1); } diff --git a/src/windows/maze_construction.c b/src/windows/maze_construction.c index 00f0d90576..5dc90c56f6 100644 --- a/src/windows/maze_construction.c +++ b/src/windows/maze_construction.c @@ -172,7 +172,7 @@ static void window_maze_construction_close(rct_window *w) // In order to cancel the yellow arrow correctly the // selection tool should be cancelled. tool_cancel(); - + hide_gridlines(); uint8 rideIndex = _currentRideIndex; @@ -360,12 +360,12 @@ static void window_maze_construction_entrance_tooldown(int x, int y, rct_window* RCT2_GLOBAL(0x00141E9AE, rct_string_id) = is_exit ? 1144 : 1145; money32 cost = game_do_command( - x, - GAME_COMMAND_FLAG_APPLY | ((direction ^ 2) << 8), - y, + x, + GAME_COMMAND_FLAG_APPLY | ((direction ^ 2) << 8), + y, rideIndex | (is_exit << 8), - GAME_COMMAND_PLACE_RIDE_ENTRANCE_OR_EXIT, - RCT2_GLOBAL(0x00F44193, uint8), + GAME_COMMAND_PLACE_RIDE_ENTRANCE_OR_EXIT, + RCT2_GLOBAL(0x00F44193, uint8), 0); if (cost == MONEY32_UNDEFINED) @@ -392,7 +392,7 @@ static void window_maze_construction_entrance_tooldown(int x, int y, rct_window* } /** - * + * * rct2: 0x006CD65D */ static void window_maze_construction_tooldown(rct_window* w, int widgetIndex, int x, int y) @@ -431,13 +431,13 @@ static void window_maze_construction_paint(rct_window *w, rct_drawpixelinfo *dpi } /** - * + * * rct2: 0x006CD887 */ void window_maze_construction_update_pressed_widgets() { rct_window *w; - + w = window_find_by_class(WC_RIDE_CONSTRUCTION); if (w == NULL) return; diff --git a/src/windows/music_credits.c b/src/windows/music_credits.c index 0fad3895c8..8908fc8520 100644 --- a/src/windows/music_credits.c +++ b/src/windows/music_credits.c @@ -102,7 +102,7 @@ void window_music_credits_open() window->colours[0] = 7; window->colours[1] = 7; window->colours[2] = 7; - + } /** @@ -172,5 +172,5 @@ static void window_music_credits_scrollpaint(rct_window *w, rct_drawpixelinfo *d y += 10; string += 1; } - + } \ No newline at end of file diff --git a/src/windows/network_status.c b/src/windows/network_status.c index 813e7e9620..7073aaf203 100644 --- a/src/windows/network_status.c +++ b/src/windows/network_status.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/new_campaign.c b/src/windows/new_campaign.c index 7d87a96f86..73aaa03bb2 100644 --- a/src/windows/new_campaign.c +++ b/src/windows/new_campaign.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -126,7 +126,7 @@ int ride_name_compare(const void *a, const void *b) } /** - * + * * rct2: 0x0069E16F */ void window_new_campaign_open(sint16 campaignType) @@ -134,7 +134,7 @@ void window_new_campaign_open(sint16 campaignType) rct_window *w; rct_ride *ride; int i, numApplicableRides; - + w = window_bring_to_front_by_class(WC_NEW_CAMPAIGN); if (w != NULL) { if (w->campaign.campaign_type == campaignType) @@ -189,7 +189,7 @@ void window_new_campaign_open(sint16 campaignType) } /** - * + * * rct2: 0x0069E320 */ static void window_new_campaign_get_shop_items() @@ -208,7 +208,7 @@ static void window_new_campaign_get_shop_items() // Remove certain items? items &= 0x0011FF78036BA3E0; - // + // numItems = 0; for (i = 0; i < 64; i++) if (items & (1LL << i)) @@ -217,7 +217,7 @@ static void window_new_campaign_get_shop_items() } /** - * + * * rct2: 0x0069E50B */ static void window_new_campaign_mouseup(rct_window *w, int widgetIndex) @@ -234,7 +234,7 @@ static void window_new_campaign_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x0069E51C */ static void window_new_campaign_mousedown(int widgetIndex, rct_window *w, rct_widget* widget) @@ -304,7 +304,7 @@ static void window_new_campaign_mousedown(int widgetIndex, rct_window *w, rct_wi } /** - * + * * rct2: 0x0069E537 */ static void window_new_campaign_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -322,7 +322,7 @@ static void window_new_campaign_dropdown(rct_window *w, int widgetIndex, int dro } /** - * + * * rct2: 0x0069E397 */ static void window_new_campaign_invalidate(rct_window *w) @@ -367,7 +367,7 @@ static void window_new_campaign_invalidate(rct_window *w) } /** - * + * * rct2: 0x0069E493 */ static void window_new_campaign_paint(rct_window *w, rct_drawpixelinfo *dpi) diff --git a/src/windows/new_ride.c b/src/windows/new_ride.c index a1b35e7b8c..b0fb38d021 100644 --- a/src/windows/new_ride.c +++ b/src/windows/new_ride.c @@ -383,7 +383,7 @@ static void window_new_ride_scroll_to_focused_ride(rct_window *w) int scrollWidth = 0; int scrollHeight = 0; window_get_scroll_size(w, 0, &scrollWidth, &scrollHeight); - + // Find row index of the focused ride type rct_widget *listWidget = &window_new_ride_widgets[WIDX_RIDE_LIST]; int focusRideType = RCT2_ADDRESS(RCT2_ADDRESS_WINDOW_RIDE_LIST_HIGHLIGHTED_ITEM, uint16)[_window_new_ride_current_tab]; @@ -443,13 +443,13 @@ rct_window *window_new_ride_open() w->new_ride.highlighted_ride_id = -1; _lastTrackDesignCountRideType.type = 255; _lastTrackDesignCountRideType.entry_index = 255; - + window_new_ride_populate_list(); - + w->new_ride.highlighted_ride_id = RCT2_ADDRESS(RCT2_ADDRESS_WINDOW_RIDE_LIST_HIGHLIGHTED_ITEM, sint16)[_window_new_ride_current_tab]; if (w->new_ride.highlighted_ride_id == -1) w->new_ride.highlighted_ride_id = RCT2_GLOBAL(0x00F43523, sint16); - + w->width = 1; window_new_ride_refresh_widget_sizing(w); window_new_ride_scroll_to_focused_ride(w); @@ -460,7 +460,7 @@ rct_window *window_new_ride_open() rct_window *window_new_ride_open_research() { rct_window *w; - + w = window_new_ride_open(); window_new_ride_set_page(w, WINDOW_NEW_RIDE_PAGE_RESEARCH); return w; @@ -790,7 +790,7 @@ static void window_new_ride_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, i flags |= 0x20; if (w->new_ride.highlighted_ride_id == *((sint16*)listItem) || flags != 0) gfx_fill_rect_inset(dpi, x, y, x + 115, y + 115, w->colours[1], 0x80 | flags); - + // Draw ride image with feathered border rideEntry = rideEntries[listItem->entry_index]; int image_id = rideEntry->images_offset; @@ -911,7 +911,7 @@ static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixeli } price = (price >> 17) * 10 * RCT2_GLOBAL(0x0097D21D + (item.type * 8), uint8); - // + // rct_string_id stringId = 1691; if (!ride_type_has_flag(item.type, RIDE_TYPE_FLAG_15)) stringId++; diff --git a/src/windows/news.c b/src/windows/news.c index 623aa7a073..8e6b1677b5 100644 --- a/src/windows/news.c +++ b/src/windows/news.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -85,7 +85,7 @@ static rct_window_event_list window_news_events = { }; /** - * + * * rct2: 0x0066E464 */ void window_news_open() @@ -121,7 +121,7 @@ void window_news_open() } /** - * + * * rct2: 0x0066D4D5 */ static void window_news_mouseup(rct_window *w, int widgetIndex) @@ -134,7 +134,7 @@ static void window_news_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x0066EAB8 */ static void window_news_update(rct_window *w) @@ -176,7 +176,7 @@ static void window_news_update(rct_window *w) } /** - * + * * rct2: 0x0066EA3C */ static void window_news_scrollgetsize(rct_window *w, int scrollIndex, int *width, int *height) @@ -193,7 +193,7 @@ static void window_news_scrollgetsize(rct_window *w, int scrollIndex, int *width } /** - * + * * rct2: 0x0066EA5C */ static void window_news_scrollmousedown(rct_window *w, int scrollIndex, int x, int y) @@ -244,7 +244,7 @@ static void window_news_scrollmousedown(rct_window *w, int scrollIndex, int x, i } /** - * + * * rct2: 0x0066EAAE */ static void window_news_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) @@ -253,7 +253,7 @@ static void window_news_tooltip(rct_window* w, int widgetIndex, rct_string_id *s } /** - * + * * rct2: 0x0066E4E8 */ static void window_news_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -267,7 +267,7 @@ static void window_news_invalidate(rct_window *w) } /** - * + * * rct2: 0x0066E4EE */ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex) @@ -346,7 +346,7 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int s gfx_draw_sprite(cliped_dpi, image_id, clip_x, clip_y, 0); rct2_free(cliped_dpi); - break; + break; } case NEWS_ITEM_MONEY: gfx_draw_sprite(dpi, SPR_FINANCE, x, yy, 0); diff --git a/src/windows/options.c b/src/windows/options.c index 68d69f3d69..26982daa7d 100644 --- a/src/windows/options.c +++ b/src/windows/options.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -87,7 +87,7 @@ enum WINDOW_OPTIONS_WIDGET_IDX { WIDX_CONSTRUCTION_MARKER_DROPDOWN, WIDX_DAY_NIGHT_CHECKBOX, WIDX_UPPER_CASE_BANNERS_CHECKBOX, - + // Culture / Units WIDX_LANGUAGE = WIDX_PAGE_START, WIDX_LANGUAGE_DROPDOWN, @@ -199,7 +199,7 @@ static rct_widget window_options_culture_widgets[] = { { WWT_DROPDOWN, 1, 155, 299, 83, 94, 872, STR_NONE }, // distance { WWT_DROPDOWN_BUTTON, 1, 288, 298, 84, 93, STR_DROPDOWN_GLYPH, STR_NONE }, { WWT_DROPDOWN, 1, 155, 299, 98, 110, 875, STR_NONE }, // temperature - { WWT_DROPDOWN_BUTTON, 1, 288, 298, 99, 108, STR_DROPDOWN_GLYPH, STR_NONE }, + { WWT_DROPDOWN_BUTTON, 1, 288, 298, 99, 108, STR_DROPDOWN_GLYPH, STR_NONE }, { WWT_DROPDOWN, 1, 155, 299, 113, 124, 868, STR_NONE }, // height labels { WWT_DROPDOWN_BUTTON, 1, 288, 298, 114, 123, STR_DROPDOWN_GLYPH, STR_NONE }, { WWT_DROPDOWN, 1, 155, 299, 128, 139, STR_NONE, STR_NONE }, // date format @@ -263,7 +263,7 @@ static rct_widget window_options_misc_widgets[] = { static rct_widget window_options_twitch_widgets[] = { MAIN_OPTIONS_WIDGETS, - { WWT_DROPDOWN_BUTTON, 2, 10, 299, 54, 65, STR_TWITCH_NAME, STR_NONE }, // Twitch channel name + { WWT_DROPDOWN_BUTTON, 2, 10, 299, 54, 65, STR_TWITCH_NAME, STR_NONE }, // Twitch channel name { WWT_CHECKBOX, 2, 10, 299, 69, 80, STR_TWITCH_PEEP_FOLLOWERS, STR_TWITCH_PEEP_FOLLOWERS_TIP }, // Twitch name peeps by follows { WWT_CHECKBOX, 2, 10, 299, 84, 95, STR_TWITCH_FOLLOWERS_TRACK, STR_TWITCH_FOLLOWERS_TRACK_TIP }, // Twitch information on for follows { WWT_CHECKBOX, 2, 10, 299, 99, 110, STR_TWITCH_PEEP_CHAT, STR_TWITCH_PEEP_CHAT_TIP }, // Twitch name peeps by chat @@ -412,7 +412,7 @@ static uint32 window_options_page_enabled_widgets[] = { (1 << WIDX_DEBUGGING_TOOLS) | (1 << WIDX_TITLE_SEQUENCE) | (1 << WIDX_TITLE_SEQUENCE_DROPDOWN) | - (1 << WIDX_TITLE_SEQUENCE_BUTTON) | + (1 << WIDX_TITLE_SEQUENCE_BUTTON) | (1 << WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM) | (1 << WIDX_STAY_CONNECTED_AFTER_DESYNC), @@ -695,7 +695,7 @@ static void window_options_mouseup(rct_window *w, int widgetIndex) static void window_options_mousedown(int widgetIndex, rct_window*w, rct_widget* widget) { int num_items, i; - + widget = &w->widgets[widgetIndex - 1]; switch (w->page) { @@ -1093,7 +1093,7 @@ static void window_options_dropdown(rct_window *w, int widgetIndex, int dropdown } /** -* +* * rct2: 0x006BAD48 */ static void window_options_invalidate(rct_window *w) @@ -1399,7 +1399,7 @@ static void window_options_paint(rct_window *w, rct_drawpixelinfo *dpi) w->x + window_options_misc_widgets[WIDX_AUTOSAVE].left + 1, w->y + window_options_misc_widgets[WIDX_AUTOSAVE].top ); - + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint32) = (uint32)&gConfigTitleSequences.presets[gCurrentPreviewTitleSequence].name; gfx_draw_string_left(dpi, STR_TITLE_SEQUENCE, w, w->colours[1], w->x + 10, w->y + window_options_misc_widgets[WIDX_TITLE_SEQUENCE].top + 1); gfx_draw_string_left_clipped( @@ -1429,7 +1429,7 @@ static void window_options_show_dropdown(rct_window *w, rct_widget *widget, int ); } -static void window_options_update_height_markers() +static void window_options_update_height_markers() { RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_HEIGHT_MARKERS, uint16) = gConfigGeneral.show_height_as_units ? 0 : (gConfigGeneral.measurement_format + 1) * 256; diff --git a/src/windows/park.c b/src/windows/park.c index c4d4e0998d..d456fab6db 100644 --- a/src/windows/park.c +++ b/src/windows/park.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -122,7 +122,7 @@ static rct_widget window_park_guests_widgets[] = { static rct_widget window_park_price_widgets[] = { MAIN_PARK_WIDGETS, - { WWT_24, 1, 7, 146, 50, 61, STR_ADMISSION_PRICE, STR_NONE }, // + { WWT_24, 1, 7, 146, 50, 61, STR_ADMISSION_PRICE, STR_NONE }, // { WWT_SPINNER, 1, 147, 222, 50, 61, 0x595, STR_NONE }, // price { WWT_DROPDOWN_BUTTON, 1, 211, 221, 51, 55, STR_NUMERIC_UP, STR_NONE }, // increase price { WWT_DROPDOWN_BUTTON, 1, 211, 221, 56, 60, STR_NUMERIC_DOWN, STR_NONE }, // decrease price @@ -486,7 +486,7 @@ static uint32 window_park_page_enabled_widgets[] = { (1 << WIDX_TAB_5) | (1 << WIDX_TAB_6) | (1 << WIDX_TAB_7) | - (1 << WIDX_INCREASE_PRICE) | + (1 << WIDX_INCREASE_PRICE) | (1 << WIDX_DECREASE_PRICE), (1 << WIDX_CLOSE) | @@ -541,7 +541,7 @@ static void window_park_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w); static void window_park_set_disabled_tabs(rct_window *w); /** - * + * * rct2: 0x00667F11 */ rct_window *window_park_open() @@ -582,7 +582,7 @@ static void window_park_prepare_window_title_text() #pragma region Entrance page /** - * + * * rct2: 0x00667C48 */ void window_park_entrance_open() @@ -607,7 +607,7 @@ void window_park_entrance_open() } /** - * + * * rct2: 0x0066860C */ static void window_park_entrance_close(rct_window *w) @@ -699,7 +699,7 @@ static void window_park_entrance_mousedown(int widgetIndex, rct_window*w, rct_wi } /** - * + * * rct2: 0x006682B8 */ static void window_park_entrance_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -719,7 +719,7 @@ static void window_park_entrance_dropdown(rct_window *w, int widgetIndex, int dr } /** - * + * * rct2: 0x006686B5 */ static void window_park_entrance_update(rct_window *w) @@ -807,7 +807,7 @@ void window_park_entrance_tool_update_land_rights(sint16 x, sint16 y){ } /** - * + * * rct2: 0x006681D1 */ static void window_park_entrance_toolupdate(rct_window* w, int widgetIndex, int x, int y) @@ -820,7 +820,7 @@ static void window_park_entrance_toolupdate(rct_window* w, int widgetIndex, int } /** - * + * * rct2: 0x006681E6 */ static void window_park_entrance_tooldown(rct_window* w, int widgetIndex, int x, int y) @@ -860,13 +860,13 @@ static void window_park_entrance_tooldown(rct_window* w, int widgetIndex, int x, } /** - * + * * rct2: 0x006681FB */ static void window_park_entrance_tooldrag(rct_window* w, int widgetIndex, int x, int y) { rct_window* w2 = window_find_by_number(0xB, 0); - + if (!w2) { switch (widgetIndex){ case WIDX_BUY_LAND_RIGHTS: @@ -904,7 +904,7 @@ static void window_park_entrance_tooldrag(rct_window* w, int widgetIndex, int x, } /** - * + * * rct2: 0x0066822A */ static void window_park_entrance_toolabort(rct_window *w, int widgetIndex) @@ -915,7 +915,7 @@ static void window_park_entrance_toolabort(rct_window *w, int widgetIndex) hide_land_rights(); else hide_construction_rights(); - } + } //else if (widgetIndex == WIDX_BUY_CONSTRUCTION_RIGHTS) { // hide_gridlines(); // hide_construction_rights(); @@ -923,7 +923,7 @@ static void window_park_entrance_toolabort(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x0066848B */ static void window_park_entrance_textinput(rct_window *w, int widgetIndex, char *text) @@ -933,7 +933,7 @@ static void window_park_entrance_textinput(rct_window *w, int widgetIndex, char } /** - * + * * rct2: 0x00667FDC */ static void window_park_entrance_invalidate(rct_window *w) @@ -961,7 +961,7 @@ static void window_park_entrance_invalidate(rct_window *w) w->disabled_widgets |= (1 << WIDX_OPEN_OR_CLOSE) | (1 << WIDX_CLOSE_LIGHT) | (1 << WIDX_OPEN_LIGHT); else w->disabled_widgets &= ~((1 << WIDX_OPEN_OR_CLOSE) | (1 << WIDX_CLOSE_LIGHT) | (1 << WIDX_OPEN_LIGHT)); - + // Only allow purchase of land when there is money if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) window_park_entrance_widgets[WIDX_BUY_LAND_RIGHTS].type = WWT_EMPTY; @@ -977,7 +977,7 @@ static void window_park_entrance_invalidate(rct_window *w) window_park_entrance_widgets[WIDX_STATUS].right = w->width - 26; window_park_entrance_widgets[WIDX_STATUS].top = w->height - 13; window_park_entrance_widgets[WIDX_STATUS].bottom = w->height - 3; - + if (theme_get_preset()->features.rct1_park_lights) { window_park_entrance_widgets[WIDX_OPEN_OR_CLOSE].type = WWT_EMPTY; if (RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_TYPE, uint8) == OBJECTIVE_GUESTS_AND_RATING) { @@ -1014,7 +1014,7 @@ static void window_park_entrance_invalidate(rct_window *w) } /** - * + * * rct2: 0x006680D0 */ static void window_park_entrance_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -1047,7 +1047,7 @@ static void window_park_entrance_paint(rct_window *w, rct_drawpixelinfo *dpi) } /** - * + * * rct2: 0x00669B55 */ static void window_park_init_viewport(rct_window *w) @@ -1481,7 +1481,7 @@ static void window_park_price_invalidate(rct_window *w) static void window_park_price_paint(rct_window *w, rct_drawpixelinfo *dpi) { int x, y; - + window_draw_widgets(w, dpi); window_park_draw_tab_images(dpi, w); @@ -1574,7 +1574,7 @@ static void window_park_stats_invalidate(rct_window *w) static void window_park_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) { int x, y, parkSize, stringIndex; - + window_draw_widgets(w, dpi); window_park_draw_tab_images(dpi, w); @@ -1615,7 +1615,7 @@ static void window_park_stats_paint(rct_window *w, rct_drawpixelinfo *dpi) #pragma region Objective page /** - * + * * rct2: 0x00667E57 */ void window_park_objective_open() @@ -1647,7 +1647,7 @@ void window_park_objective_open() } /** - * + * * rct2: 0x006695AA */ static void window_park_objective_mouseup(rct_window *w, int widgetIndex) @@ -1689,7 +1689,7 @@ static void window_park_objective_resize(rct_window *w) } /** - * + * * rct2: 0x0066966C */ static void window_park_objective_update(rct_window *w) @@ -1699,7 +1699,7 @@ static void window_park_objective_update(rct_window *w) } /** - * + * * rct2: 0x006695CC */ static void window_park_objective_textinput(rct_window *w, int widgetIndex, char *text) @@ -1711,7 +1711,7 @@ static void window_park_objective_textinput(rct_window *w, int widgetIndex, char } /** - * + * * rct2: 0x006693B2 */ static void window_park_objective_invalidate(rct_window *w) @@ -1721,7 +1721,7 @@ static void window_park_objective_invalidate(rct_window *w) window_park_set_pressed_tab(w); window_park_prepare_window_title_text(); - // + // if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT) window_park_objective_widgets[WIDX_ENTER_NAME].type = WWT_DROPDOWN_BUTTON; else @@ -1732,13 +1732,13 @@ static void window_park_objective_invalidate(rct_window *w) } /** - * + * * rct2: 0x0066945C */ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi) { int x, y; - + window_draw_widgets(w, dpi); window_park_draw_tab_images(dpi, w); @@ -1761,7 +1761,7 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi) y += gfx_draw_string_left_wrapped(dpi, (void*)0x013CE952, x, y, 221, 2385 + RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_TYPE, uint8), 0); y += 5; - + // Objective outcome if (RCT2_GLOBAL(RCT2_ADDRESS_COMPLETED_COMPANY_VALUE, money32) != MONEY32_UNDEFINED) { if (RCT2_GLOBAL(RCT2_ADDRESS_COMPLETED_COMPANY_VALUE, money32) == 0x80000001) { @@ -1980,7 +1980,7 @@ static void window_park_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) if (w->page == WINDOW_PARK_PAGE_GUESTS) sprite_idx += (w->frame_no / 8) % 8; gfx_draw_sprite(dpi, sprite_idx, w->x + w->widgets[WIDX_TAB_3].left, w->y + w->widgets[WIDX_TAB_3].top, 0); - + sprite_idx = *RCT2_GLOBAL(0x00982708, sint32*) + 1; if (w->page == WINDOW_PARK_PAGE_GUESTS) sprite_idx += w->var_492 & 0xFFFFFFFC; diff --git a/src/windows/player_list.c b/src/windows/player_list.c index 2a75e6b42a..8733f05780 100644 --- a/src/windows/player_list.c +++ b/src/windows/player_list.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/research.c b/src/windows/research.c index c58ce270ec..ff381a5fad 100644 --- a/src/windows/research.c +++ b/src/windows/research.c @@ -121,7 +121,7 @@ static void window_research_funding_update(rct_window *w); static void window_research_funding_invalidate(rct_window *w); static void window_research_funding_paint(rct_window *w, rct_drawpixelinfo *dpi); -// +// static rct_window_event_list window_research_development_events = { NULL, window_research_development_mouseup, @@ -288,7 +288,7 @@ static void window_research_development_update(rct_window *w) } /** - * + * * rct2: 0x006B6819 */ static void window_research_development_invalidate(rct_window *w) @@ -311,7 +311,7 @@ static void window_research_development_invalidate(rct_window *w) } /** - * + * * rct2: 0x006B689B */ static void window_research_development_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -407,7 +407,7 @@ void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dp #pragma region Funding page /** - * + * * rct2: 0x0069DB3F */ static void window_research_funding_mouseup(rct_window *w, int widgetIndex) @@ -437,14 +437,14 @@ static void window_research_funding_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x0069DB66 */ static void window_research_funding_mousedown(int widgetIndex, rct_window *w, rct_widget* widget) { rct_widget *dropdownWidget; int i; - + if (widgetIndex != WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON) return; @@ -469,7 +469,7 @@ static void window_research_funding_mousedown(int widgetIndex, rct_window *w, rc } /** - * + * * rct2: 0x0069DB6D */ static void window_research_funding_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -482,7 +482,7 @@ static void window_research_funding_dropdown(rct_window *w, int widgetIndex, int } /** - * + * * rct2: 0x0069DC23 */ static void window_research_funding_update(rct_window *w) @@ -494,7 +494,7 @@ static void window_research_funding_update(rct_window *w) } /** - * + * * rct2: 0x0069DA64 */ static void window_research_funding_invalidate(rct_window *w) @@ -508,7 +508,7 @@ static void window_research_funding_invalidate(rct_window *w) window_research_set_pressed_tab(w); - if ((RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) || + if ((RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) || (RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) == RESEARCH_STAGE_FINISHED_ALL)) { //window_research_funding_widgets[WIDX_FUNDING_GROUP].type = WWT_EMPTY; window_research_funding_widgets[WIDX_RESEARCH_FUNDING].type = WWT_EMPTY; @@ -522,7 +522,7 @@ static void window_research_funding_invalidate(rct_window *w) int currentResearchLevel = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RESEARCH_LEVEL, uint8); window_research_funding_widgets[WIDX_RESEARCH_FUNDING].image = STR_NO_FUNDING + currentResearchLevel; } - + // Checkboxes int activeResearchTypes = RCT2_GLOBAL(RCT2_ADDRESS_ACTIVE_RESEARCH_TYPES, uint16); int uncompletedResearchTypes = gResearchUncompletedCategories; @@ -547,7 +547,7 @@ static void window_research_funding_invalidate(rct_window *w) } /** - * + * * rct2: 0x0069DAF0 */ static void window_research_funding_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -591,7 +591,7 @@ static void window_research_set_page(rct_window *w, int page) w->widgets = window_research_page_widgets[page]; w->disabled_widgets = 0; w->pressed_widgets = 0; - + window_invalidate(w); if (w->page == WINDOW_RESEARCH_PAGE_DEVELOPMENT) { w->width = 300; diff --git a/src/windows/ride.c b/src/windows/ride.c index f757342726..4a0fa1c03d 100644 --- a/src/windows/ride.c +++ b/src/windows/ride.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -969,7 +969,7 @@ static void window_ride_draw_tab_image(rct_drawpixelinfo *dpi, rct_window *w, in } /** - * + * * rct2: 0x006B2E88 */ static void window_ride_draw_tab_main(rct_drawpixelinfo *dpi, rct_window *w) @@ -1003,7 +1003,7 @@ static void window_ride_draw_tab_main(rct_drawpixelinfo *dpi, rct_window *w) } /** - * + * * rct2: 0x006B2B68 */ static void window_ride_draw_tab_vehicle(rct_drawpixelinfo *dpi, rct_window *w) @@ -1072,7 +1072,7 @@ static void window_ride_draw_tab_vehicle(rct_drawpixelinfo *dpi, rct_window *w) } /** - * + * * rct2: 0x006B2F42 */ static void window_ride_draw_tab_customer(rct_drawpixelinfo *dpi, rct_window *w) @@ -1089,13 +1089,13 @@ static void window_ride_draw_tab_customer(rct_drawpixelinfo *dpi, rct_window *w) spriteIndex += RCT2_GLOBAL(RCT2_GLOBAL(0x00982708, uint32), uint32); spriteIndex += 1; spriteIndex |= 0xA9E00000; - + gfx_draw_sprite(dpi, spriteIndex, w->x + (widget->left + widget->right) / 2, w->y + widget->bottom - 6, 0); } } /** - * + * * rct2: 0x006B2B35 */ static void window_ride_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) @@ -1163,7 +1163,7 @@ void window_ride_disable_tabs(rct_window *w) } /** - * + * * rct2: 0x006AEAB4 */ rct_window *window_ride_open(int rideIndex) @@ -1206,7 +1206,7 @@ rct_window *window_ride_open(int rideIndex) } /** - * + * * rct2: 0x006ACC28 */ rct_window *window_ride_main_open(int rideIndex) @@ -1245,7 +1245,7 @@ rct_window *window_ride_main_open(int rideIndex) } /** - * + * * rct2: 0x006ACCCE */ rct_window *window_ride_open_station(int rideIndex, int stationIndex) @@ -1314,7 +1314,7 @@ rct_window *window_ride_open_track(rct_map_element *mapElement) } /** - * + * * rct2: 0x006ACAC2 */ rct_window *window_ride_open_vehicle(rct_vehicle *vehicle) @@ -1335,7 +1335,7 @@ rct_window *window_ride_open_vehicle(rct_vehicle *vehicle) for (i = 0; i < 32; i++) { if (ride->vehicles[i] == headVehicleSpriteIndex) break; - + view++; } @@ -1471,7 +1471,7 @@ static void window_ride_anchor_border_widgets(rct_window *w) #pragma region Main /** - * + * * rct2: 0x006AF994 */ static void window_ride_init_viewport(rct_window *w) @@ -1489,7 +1489,7 @@ static void window_ride_init_viewport(rct_window *w) focus.sprite.sprite_id = -1; focus.coordinate.zoom = 0; focus.coordinate.rotation = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint8); - + if (eax >= 0 && eax < ride->num_vehicles && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK){ focus.sprite.sprite_id = ride->vehicles[eax]; @@ -1511,7 +1511,7 @@ static void window_ride_init_viewport(rct_window *w) } while (count >= 0); eax = ride->station_starts[stationIndex]; - + focus.coordinate.x = (eax & 0xFF) << 5; focus.coordinate.y = (eax & 0xFF00) >> 3; focus.coordinate.z = ride->station_heights[stationIndex] << 3; @@ -1570,16 +1570,16 @@ static void window_ride_init_viewport(rct_window *w) int width = view_widget->right - view_widget->left - 1; int height = view_widget->bottom - view_widget->top - 1; viewport_create( - w, - x, - y, - width, - height, + w, + x, + y, + width, + height, focus.coordinate.zoom, - focus.coordinate.x, - focus.coordinate.y & VIEWPORT_FOCUS_Y_MASK, - focus.coordinate.z, - focus.sprite.type & VIEWPORT_FOCUS_TYPE_MASK, + focus.coordinate.x, + focus.coordinate.y & VIEWPORT_FOCUS_Y_MASK, + focus.coordinate.z, + focus.sprite.type & VIEWPORT_FOCUS_TYPE_MASK, focus.sprite.sprite_id); w->flags |= WF_NO_SCROLLING; @@ -1592,7 +1592,7 @@ static void window_ride_init_viewport(rct_window *w) } /** - * + * * rct2: 0x006B4971 */ void window_ride_construct(rct_window *w) @@ -1602,7 +1602,7 @@ void window_ride_construct(rct_window *w) } /** - * + * * rct2: 0x006AF315 */ static void window_ride_rename(rct_window *w) @@ -1615,7 +1615,7 @@ static void window_ride_rename(rct_window *w) } /** - * + * * rct2: 0x006AF17E */ static void window_ride_main_mouseup(rct_window *w, int widgetIndex) @@ -1680,7 +1680,7 @@ static void window_ride_main_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006AF4A2 */ static void window_ride_main_resize(rct_window *w) @@ -1710,7 +1710,7 @@ static void window_ride_main_resize(rct_window *w) } /** - * + * * rct2: 0x006AF825 */ static void window_ride_show_view_dropdown(rct_window *w, rct_widget *widget) @@ -1773,7 +1773,7 @@ static void window_ride_show_view_dropdown(rct_window *w, rct_widget *widget) } /** - * + * * rct2: 0x006AF64C */ static void window_ride_show_open_dropdown(rct_window *w, rct_widget *widget) @@ -1797,7 +1797,7 @@ static void window_ride_show_open_dropdown(rct_window *w, rct_widget *widget) gDropdownItemsFormat[numItems] = 1142; gDropdownItemsArgs[numItems] = STR_OPEN_RIDE; numItems++; - + window_dropdown_show_text( w->x + widget->left, w->y + widget->top, @@ -1849,7 +1849,7 @@ static void window_ride_show_open_dropdown(rct_window *w, rct_widget *widget) } /** - * + * * rct2: 0x006AF1BD */ static void window_ride_main_mousedown(int widgetIndex, rct_window *w, rct_widget *widget) @@ -1865,7 +1865,7 @@ static void window_ride_main_mousedown(int widgetIndex, rct_window *w, rct_widge } /** - * + * * rct2: 0x006AF300 */ static void window_ride_main_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -1921,7 +1921,7 @@ static void window_ride_main_dropdown(rct_window *w, int widgetIndex, int dropdo } /** - * + * * rct2: 0x006AF40F */ static void window_ride_main_update(rct_window *w) @@ -1965,7 +1965,7 @@ static void window_ride_main_update(rct_window *w) } /** - * + * * rct2: 0x006AF2F9 */ static void window_ride_main_textinput(rct_window *w, int widgetIndex, char *text) @@ -1977,7 +1977,7 @@ static void window_ride_main_textinput(rct_window *w, int widgetIndex, char *tex } /** - * + * * rct2: 0x006AF55A */ static void window_ride_main_unknown_14(rct_window *w) @@ -1986,7 +1986,7 @@ static void window_ride_main_unknown_14(rct_window *w) } /** - * + * * rct2: 0x006AECF6 */ static void window_ride_main_invalidate(rct_window *w) @@ -2036,7 +2036,7 @@ static void window_ride_main_invalidate(rct_window *w) window_ride_main_widgets[WIDX_CLOSE_LIGHT].type = WWT_IMGBTN; window_ride_main_widgets[WIDX_TEST_LIGHT].type = (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_NO_TEST_MODE) ? WWT_EMPTY : WWT_IMGBTN); window_ride_main_widgets[WIDX_OPEN_LIGHT].type = WWT_IMGBTN; - + height = 62; if (window_ride_main_widgets[WIDX_TEST_LIGHT].type != WWT_EMPTY) { window_ride_main_widgets[WIDX_TEST_LIGHT].top = height; @@ -2071,7 +2071,7 @@ static void window_ride_main_invalidate(rct_window *w) } /** - * + * * rct2: 0x006AF10A */ static rct_string_id window_ride_get_status_overall_view(rct_window *w, void *arguments) @@ -2090,7 +2090,7 @@ static rct_string_id window_ride_get_status_overall_view(rct_window *w, void *ar } /** - * + * * rct2: 0x006AEFEF */ static rct_string_id window_ride_get_status_vehicle(rct_window *w, void *arguments) @@ -2140,7 +2140,7 @@ static rct_string_id window_ride_get_status_vehicle(rct_window *w, void *argumen } /** - * + * * rct2: 0x006AEF65 */ static rct_string_id window_ride_get_status_station(rct_window *w, void *arguments) @@ -2188,7 +2188,7 @@ static rct_string_id window_ride_get_status_station(rct_window *w, void *argumen } /** - * + * * rct2: 0x006AEE73 */ static rct_string_id window_ride_get_status(rct_window *w, void *arguments) @@ -2205,7 +2205,7 @@ static rct_string_id window_ride_get_status(rct_window *w, void *arguments) } /** - * + * * rct2: 0x006AEE73 */ static void window_ride_main_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -2266,7 +2266,7 @@ static void window_ride_main_paint(rct_window *w, rct_drawpixelinfo *dpi) #pragma region Vehicle /** - * + * * rct2: 0x006B272D */ static void window_ride_vehicle_mouseup(rct_window *w, int widgetIndex) @@ -2295,7 +2295,7 @@ static void window_ride_vehicle_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006B2ABB */ static void window_ride_vehicle_resize(rct_window *w) @@ -2304,7 +2304,7 @@ static void window_ride_vehicle_resize(rct_window *w) } /** - * + * * rct2: 0x006B2748 */ static void window_ride_vehicle_mousedown(int widgetIndex, rct_window *w, rct_widget *widget) @@ -2431,7 +2431,7 @@ static void window_ride_vehicle_mousedown(int widgetIndex, rct_window *w, rct_wi } /** - * + * * rct2: 0x006B2767 */ static void window_ride_vehicle_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -2460,7 +2460,7 @@ static void window_ride_vehicle_dropdown(rct_window *w, int widgetIndex, int dro } /** - * + * * rct2: 0x006B2AA1 */ static void window_ride_vehicle_update(rct_window *w) @@ -2471,7 +2471,7 @@ static void window_ride_vehicle_update(rct_window *w) } /** - * + * * rct2: 0x006B222C */ static void window_ride_vehicle_invalidate(rct_window *w) @@ -2481,7 +2481,7 @@ static void window_ride_vehicle_invalidate(rct_window *w) rct_ride_type *rideEntry; rct_string_id stringId; int carsPerTrain; - + colour_scheme_update(w); widgets = window_ride_page_widgets[w->page]; @@ -2545,7 +2545,7 @@ static void window_ride_vehicle_invalidate(rct_window *w) } /** - * + * * rct2: 0x006B23DC */ static void window_ride_vehicle_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -2608,7 +2608,7 @@ typedef struct { rct_vehichle_paintinfo _sprites_to_draw[144]; /** - * + * * rct2: 0x006B2502 */ static void window_ride_vehicle_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex) @@ -2734,7 +2734,7 @@ static void window_ride_mode_tweak_set(rct_window *w, uint8 value) } /** - * + * * rct2: 0x006B11D5 */ static void window_ride_mode_tweak_increase(rct_window *w) @@ -2755,7 +2755,7 @@ static void window_ride_mode_tweak_increase(rct_window *w) } /** - * + * * rct2: 0x006B120A */ static void window_ride_mode_tweak_decrease(rct_window *w) @@ -2769,7 +2769,7 @@ static void window_ride_mode_tweak_decrease(rct_window *w) } /** - * + * * rct2: 0x006B1631 */ static void window_ride_mode_dropdown(rct_window *w, rct_widget *widget) @@ -2789,7 +2789,7 @@ static void window_ride_mode_dropdown(rct_window *w, rct_widget *widget) // Count number of available modes mode = availableModes; - numAvailableModes = -1; + numAvailableModes = -1; do { numAvailableModes++; } while (*(mode++) != 255); @@ -2828,7 +2828,7 @@ static void window_ride_mode_dropdown(rct_window *w, rct_widget *widget) } /** - * + * * rct2: 0x006B15C0 */ static void window_ride_load_dropdown(rct_window *w, rct_widget *widget) @@ -2857,7 +2857,7 @@ static void window_ride_load_dropdown(rct_window *w, rct_widget *widget) } /** - * + * * rct2: 0x006B10A7 */ static void window_ride_operating_mouseup(rct_window *w, int widgetIndex) @@ -2901,7 +2901,7 @@ static void window_ride_operating_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006B1715 */ static void window_ride_operating_resize(rct_window *w) @@ -2910,7 +2910,7 @@ static void window_ride_operating_resize(rct_window *w) } /** - * + * * rct2: 0x006B10F4 */ static void window_ride_operating_mousedown(int widgetIndex, rct_window *w, rct_widget *widget) @@ -2965,7 +2965,7 @@ static void window_ride_operating_mousedown(int widgetIndex, rct_window *w, rct_ } /** - * + * * rct2: 0x006B1165 */ static void window_ride_operating_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -2992,7 +2992,7 @@ static void window_ride_operating_dropdown(rct_window *w, int widgetIndex, int d } /** - * + * * rct2: 0x006B178E */ static void window_ride_operating_update(rct_window *w) @@ -3011,7 +3011,7 @@ static void window_ride_operating_update(rct_window *w) } /** - * + * * rct2: 0x006B0B30 */ static void window_ride_operating_invalidate(rct_window *w) @@ -3067,7 +3067,7 @@ static void window_ride_operating_invalidate(rct_window *w) window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS_INCREASE].type = WWT_EMPTY; window_ride_operating_widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS_DECREASE].type = WWT_EMPTY; } - + // Leave if another vehicle arrives at station if ( ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_HAS_LEAVE_WHEN_ANOTHER_VEHICLE_ARRIVES_AT_STATION) && @@ -3219,7 +3219,7 @@ static void window_ride_operating_invalidate(rct_window *w) } /** - * + * * rct2: 0x006B1001 */ static void window_ride_operating_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -3255,7 +3255,7 @@ static void window_ride_operating_paint(rct_window *w, rct_drawpixelinfo *dpi) #pragma region Maintenance /** - * + * * rct2: 0x006B1AE4 */ static void window_ride_locate_mechanic(rct_window *w) @@ -3279,7 +3279,7 @@ static void window_ride_locate_mechanic(rct_window *w) } /** - * + * * rct2: 0x006B7D08 */ static void window_ride_maintenance_draw_bar(rct_window *w, rct_drawpixelinfo *dpi, int x, int y, int value, int unk) @@ -3298,7 +3298,7 @@ static void window_ride_maintenance_draw_bar(rct_window *w, rct_drawpixelinfo *d } /** - * + * * rct2: 0x006B1AAD */ static void window_ride_maintenance_mouseup(rct_window *w, int widgetIndex) @@ -3326,7 +3326,7 @@ static void window_ride_maintenance_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006B1D70 */ static void window_ride_maintenance_resize(rct_window *w) @@ -3335,7 +3335,7 @@ static void window_ride_maintenance_resize(rct_window *w) } /** - * + * * rct2: 0x006B1ACE */ static void window_ride_maintenance_mousedown(int widgetIndex, rct_window *w, rct_widget *widget) @@ -3345,7 +3345,7 @@ static void window_ride_maintenance_mousedown(int widgetIndex, rct_window *w, rc rct_widget *dropdownWidget; int i, j, num_items; uint8 breakdownReason; - + dropdownWidget = widget; ride = GET_RIDE(w->number); @@ -3402,7 +3402,7 @@ static void window_ride_maintenance_mousedown(int widgetIndex, rct_window *w, rc DROPDOWN_FLAG_STAY_OPEN, num_items ); - + num_items = 1; breakdownReason = ride->breakdown_reason_pending; if (breakdownReason != BREAKDOWN_NONE && (ride->lifecycle_flags & RIDE_LIFECYCLE_BREAKDOWN_PENDING)) { @@ -3429,11 +3429,11 @@ static void window_ride_maintenance_mousedown(int widgetIndex, rct_window *w, rc } break; } - + } /** - * + * * rct2: 0x006B1AD9 */ static void window_ride_maintenance_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -3445,7 +3445,7 @@ static void window_ride_maintenance_dropdown(rct_window *w, int widgetIndex, int if (dropdownIndex == -1) return; - + ride = GET_RIDE(w->number); ride_type = gRideTypeList[ride->subtype]; @@ -3505,7 +3505,7 @@ static void window_ride_maintenance_dropdown(rct_window *w, int widgetIndex, int } /** - * + * * rct2: 0x006B1D37 */ static void window_ride_maintenance_update(rct_window *w) @@ -3524,7 +3524,7 @@ static void window_ride_maintenance_update(rct_window *w) } /** - * + * * rct2: 0x006B17C8 */ static void window_ride_maintenance_invalidate(rct_window *w) @@ -3560,7 +3560,7 @@ static void window_ride_maintenance_invalidate(rct_window *w) } /** - * + * * rct2: 0x006B1877 */ static void window_ride_maintenance_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -3657,7 +3657,7 @@ static void window_ride_maintenance_paint(rct_window *w, rct_drawpixelinfo *dpi) RCT2_GLOBAL(0x013CE952 + 2, uint32) = mechanicSprite->id; gfx_draw_string_left_wrapped(dpi, (void*)0x013CE952, x + 4, y, 280, stringId, 0); } - } + } } } } @@ -3725,7 +3725,7 @@ static void window_ride_set_track_colour_scheme(rct_window *w, int x, int y) } /** - * + * * rct2: 0x006B04FA */ static void window_ride_colour_close(rct_window *w) @@ -3743,7 +3743,7 @@ static void window_ride_colour_close(rct_window *w) } /** - * + * * rct2: 0x006B02A1 */ static void window_ride_colour_mouseup(rct_window *w, int widgetIndex) @@ -3771,7 +3771,7 @@ static void window_ride_colour_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006B0AB6 */ static void window_ride_colour_resize(rct_window *w) @@ -3780,7 +3780,7 @@ static void window_ride_colour_resize(rct_window *w) } /** - * + * * rct2: 0x006B02C6 */ static void window_ride_colour_mousedown(int widgetIndex, rct_window *w, rct_widget *widget) @@ -3924,7 +3924,7 @@ static void window_ride_colour_mousedown(int widgetIndex, rct_window *w, rct_wid } /** - * + * * rct2: 0x006B0331 */ static void window_ride_colour_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -3973,7 +3973,7 @@ static void window_ride_colour_dropdown(rct_window *w, int widgetIndex, int drop } /** - * + * * rct2: 0x006B0A8F */ static void window_ride_colour_update(rct_window *w) @@ -3985,27 +3985,27 @@ static void window_ride_colour_update(rct_window *w) } /** - * + * * rct2: 0x006B04EC */ static void window_ride_colour_tooldown(rct_window *w, int widgetIndex, int x, int y) -{ +{ if (widgetIndex == WIDX_PAINT_INDIVIDUAL_AREA) window_ride_set_track_colour_scheme(w, x, y); } /** - * + * * rct2: 0x006B04F3 */ static void window_ride_colour_tooldrag(rct_window *w, int widgetIndex, int x, int y) -{ +{ if (widgetIndex == WIDX_PAINT_INDIVIDUAL_AREA) window_ride_set_track_colour_scheme(w, x, y); } /** - * + * * rct2: 0x006AFB36 */ static void window_ride_colour_invalidate(rct_window *w) @@ -4057,7 +4057,7 @@ static void window_ride_colour_invalidate(rct_window *w) window_ride_colour_widgets[WIDX_TRACK_COLOUR_SCHEME_DROPDOWN].type = WWT_EMPTY; window_ride_colour_widgets[WIDX_PAINT_INDIVIDUAL_AREA].type = WWT_EMPTY; } - + // Track main colour if (window_ride_has_track_colour(ride, 0)) { window_ride_colour_widgets[WIDX_TRACK_MAIN_COLOUR].type = WWT_COLORBTN; @@ -4073,7 +4073,7 @@ static void window_ride_colour_invalidate(rct_window *w) } else { window_ride_colour_widgets[WIDX_TRACK_ADDITIONAL_COLOUR].type = WWT_EMPTY; } - + // Track supports colour if (window_ride_has_track_colour(ride, 2) && ride->type != RIDE_TYPE_MAZE) { window_ride_colour_widgets[WIDX_TRACK_SUPPORT_COLOUR].type = WWT_COLORBTN; @@ -4112,7 +4112,7 @@ static void window_ride_colour_invalidate(rct_window *w) window_ride_colour_widgets[WIDX_VEHICLE_PREVIEW].type = WWT_SCROLL; window_ride_colour_widgets[WIDX_VEHICLE_MAIN_COLOUR].type = WWT_COLORBTN; window_ride_colour_widgets[WIDX_VEHICLE_MAIN_COLOUR].image = window_ride_get_colour_button_image(vehicleColour.main); - + uint8 trainLayout[16]; ride_entry_get_train_layout(ride->subtype, ride->num_cars_per_train, trainLayout); @@ -4180,7 +4180,7 @@ static void window_ride_colour_invalidate(rct_window *w) } /** - * + * * rct2: 0x006AFF3E */ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -4202,10 +4202,10 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi) widget = &window_ride_colour_widgets[WIDX_TRACK_PREVIEW]; if (widget->type != WWT_EMPTY) gfx_fill_rect(dpi, w->x + widget->left + 1, w->y + widget->top + 1, w->x + widget->right - 1, w->y + widget->bottom - 1, 12); - + trackColour = ride_get_track_colour(ride, *((uint16*)&w->var_494)); - // + // if (rideEntry->shop_item == 0xFF) { x = w->x + widget->left; y = w->y + widget->top; @@ -4277,7 +4277,7 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi) } /** - * + * * rct2: 0x006B0192 */ static void window_ride_colour_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex) @@ -4360,7 +4360,7 @@ const uint8 MusicStyleOrder[] = { static uint8 window_ride_current_music_style_order[42]; /** - * + * * rct2: 0x006B215D */ static void window_ride_toggle_music(rct_window *w) @@ -4374,7 +4374,7 @@ static void window_ride_toggle_music(rct_window *w) } /** - * + * * rct2: 0x006B1ED7 */ static void window_ride_music_mouseup(rct_window *w, int widgetIndex) @@ -4402,7 +4402,7 @@ static void window_ride_music_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006AF4A2 */ static void window_ride_music_resize(rct_window *w) @@ -4412,7 +4412,7 @@ static void window_ride_music_resize(rct_window *w) } /** - * + * * rct2: 0x006B1EFC */ static void window_ride_music_mousedown(int widgetIndex, rct_window *w, rct_widget *widget) @@ -4428,7 +4428,7 @@ static void window_ride_music_mousedown(int widgetIndex, rct_window *w, rct_widg int numItems = 0; if (ride->type == RIDE_TYPE_MERRY_GO_ROUND) { - window_ride_current_music_style_order[numItems++] = MUSIC_STYLE_FAIRGROUND_ORGAN; + window_ride_current_music_style_order[numItems++] = MUSIC_STYLE_FAIRGROUND_ORGAN; } else { for (i = 0; i < countof(MusicStyleOrder); i++) window_ride_current_music_style_order[numItems++] = MusicStyleOrder[i]; @@ -4462,7 +4462,7 @@ static void window_ride_music_mousedown(int widgetIndex, rct_window *w, rct_widg } /** - * + * * rct2: 0x006B1F03 */ static void window_ride_music_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -4480,7 +4480,7 @@ static void window_ride_music_dropdown(rct_window *w, int widgetIndex, int dropd } /** - * + * * rct2: 0x006B2198 */ static void window_ride_music_update(rct_window *w) @@ -4491,7 +4491,7 @@ static void window_ride_music_update(rct_window *w) } /** - * + * * rct2: 0x006B1DEA */ static void window_ride_music_invalidate(rct_window *w) @@ -4533,7 +4533,7 @@ static void window_ride_music_invalidate(rct_window *w) } /** - * + * * rct2: 0x006B1ECC */ static void window_ride_music_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -4591,7 +4591,7 @@ static void setup_scenery_selection(rct_window* w){ } /** - * + * * rct2: 0x006D3026 */ static void window_ride_measurements_design_reset() @@ -4600,7 +4600,7 @@ static void window_ride_measurements_design_reset() } /** - * + * * rct2: 0x006D303D */ static void window_ride_measurements_design_select_nearby_scenery() @@ -4609,7 +4609,7 @@ static void window_ride_measurements_design_select_nearby_scenery() } /** - * + * * rct2: 0x006AD4DA */ static void window_ride_measurements_design_cancel() @@ -4619,7 +4619,7 @@ static void window_ride_measurements_design_cancel() } /** - * + * * rct2: 0x006AD4CD */ static void window_ride_measurements_design_save(rct_window *w) @@ -4630,7 +4630,7 @@ static void window_ride_measurements_design_save(rct_window *w) } /** - * + * * rct2: 0x006AD4DA */ static void window_ride_measurements_close(rct_window *w) @@ -4639,7 +4639,7 @@ static void window_ride_measurements_close(rct_window *w) } /** - * + * * rct2: 0x006AD478 */ static void window_ride_measurements_mouseup(rct_window *w, int widgetIndex) @@ -4676,7 +4676,7 @@ static void window_ride_measurements_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006AD564 */ static void window_ride_measurements_resize(rct_window *w) @@ -4685,7 +4685,7 @@ static void window_ride_measurements_resize(rct_window *w) } /** - * + * * rct2: 0x006AD4AB */ static void window_ride_measurements_mousedown(int widgetIndex, rct_window *w, rct_widget *widget) @@ -4712,7 +4712,7 @@ static void window_ride_measurements_mousedown(int widgetIndex, rct_window *w, r } /** - * + * * rct2: 0x006AD4B2 */ static void window_ride_measurements_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -4730,7 +4730,7 @@ static void window_ride_measurements_dropdown(rct_window *w, int widgetIndex, in } /** - * + * * rct2: 0x006AD5DD */ static void window_ride_measurements_update(rct_window *w) @@ -4741,7 +4741,7 @@ static void window_ride_measurements_update(rct_window *w) } /** - * + * * rct2: 0x006D2AE7 */ static void window_ride_measurements_tooldown(rct_window *w, int widgetIndex, int x, int y) @@ -4762,7 +4762,7 @@ static void window_ride_measurements_tooldown(rct_window *w, int widgetIndex, in } /** - * + * * rct2: 0x006AD4DA */ static void window_ride_measurements_toolabort(rct_window *w, int widgetIndex) @@ -4771,7 +4771,7 @@ static void window_ride_measurements_toolabort(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006ACDBC */ static void window_ride_measurements_invalidate(rct_window *w) @@ -4822,7 +4822,7 @@ static void window_ride_measurements_invalidate(rct_window *w) } /** - * + * * rct2: 0x006ACF07 */ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -4849,7 +4849,7 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi gfx_fill_rect_inset(dpi, x, y, w->x + 312, y + 1, w->colours[1], 0x20); } else { ride = GET_RIDE(w->number); - + x = w->x + window_ride_measurements_widgets[WIDX_PAGE_BACKGROUND].left + 4; y = w->y + window_ride_measurements_widgets[WIDX_PAGE_BACKGROUND].top + 4; @@ -5016,7 +5016,7 @@ enum { }; /** - * + * * rct2: 0x006AE8A6 */ static void window_ride_set_graph(rct_window *w, int type) @@ -5031,7 +5031,7 @@ static void window_ride_set_graph(rct_window *w, int type) } /** - * + * * rct2: 0x006AE85D */ static void window_ride_graphs_mouseup(rct_window *w, int widgetIndex) @@ -5056,7 +5056,7 @@ static void window_ride_graphs_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006AE8DA */ static void window_ride_graphs_resize(rct_window *w) @@ -5065,7 +5065,7 @@ static void window_ride_graphs_resize(rct_window *w) } /** - * + * * rct2: 0x006AE878 */ static void window_ride_graphs_mousedown(int widgetIndex, rct_window *w, rct_widget *widget) @@ -5087,7 +5087,7 @@ static void window_ride_graphs_mousedown(int widgetIndex, rct_window *w, rct_wid } /** - * + * * rct2: 0x006AE95D */ static void window_ride_graphs_update(rct_window *w) @@ -5116,7 +5116,7 @@ static void window_ride_graphs_update(rct_window *w) } /** - * + * * rct2: 0x006AEA75 */ static void window_ride_graphs_scrollgetheight(rct_window *w, int scrollIndex, int *width, int *height) @@ -5135,7 +5135,7 @@ static void window_ride_graphs_scrollgetheight(rct_window *w, int scrollIndex, i } /** - * + * * rct2: 0x006AE953 */ static void window_ride_graphs_15(rct_window *w, int scrollIndex, int scrollAreaType) @@ -5144,7 +5144,7 @@ static void window_ride_graphs_15(rct_window *w, int scrollIndex, int scrollArea } /** - * + * * rct2: 0x006AEA05 */ static void window_ride_graphs_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) @@ -5169,7 +5169,7 @@ static void window_ride_graphs_tooltip(rct_window* w, int widgetIndex, rct_strin } /** - * + * * rct2: 0x006AE372 */ static void window_ride_graphs_invalidate(rct_window *w) @@ -5199,7 +5199,7 @@ static void window_ride_graphs_invalidate(rct_window *w) w->pressed_widgets &= ~(1 << WIDX_GRAPH_VERTICAL); w->pressed_widgets &= ~(1 << WIDX_GRAPH_LATERAL); w->pressed_widgets |= (1LL << (WIDX_GRAPH_VELOCITY + (w->list_information_type & 0xFF))); - + // Hide graph buttons that are not applicable if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_HAS_G_FORCES)) { window_ride_graphs_widgets[WIDX_GRAPH_VERTICAL].type = WWT_DROPDOWN_BUTTON; @@ -5231,7 +5231,7 @@ static void window_ride_graphs_invalidate(rct_window *w) } /** - * + * * rct2: 0x006AE4BC */ static void window_ride_graphs_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -5241,7 +5241,7 @@ static void window_ride_graphs_paint(rct_window *w, rct_drawpixelinfo *dpi) } /** - * + * * rct2: 0x006AE4C7 */ static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex) @@ -5359,7 +5359,7 @@ static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi #pragma region Income /** - * + * * rct2: 0x006ADEFD */ static void window_ride_income_toggle_primary_price(rct_window *w) @@ -5371,7 +5371,7 @@ static void window_ride_income_toggle_primary_price(rct_window *w) ride = GET_RIDE(w->number); ride_type = gRideTypeList[ride->subtype]; - + if (ride->type == RIDE_TYPE_TOILETS) { shop_item = 0x1F; } @@ -5406,7 +5406,7 @@ static void window_ride_income_toggle_primary_price(rct_window *w) } /** - * + * * rct2: 0x006AE06E */ static void window_ride_income_toggle_secondary_price(rct_window *w) @@ -5418,7 +5418,7 @@ static void window_ride_income_toggle_secondary_price(rct_window *w) ride = GET_RIDE(w->number); ride_type = gRideTypeList[ride->subtype]; - + shop_item = ride_type->shop_item_secondary; if (shop_item == 0xFF) shop_item = RCT2_GLOBAL(0x0097D7CB + (ride->type * 4), uint8); @@ -5449,7 +5449,7 @@ static void window_ride_income_toggle_secondary_price(rct_window *w) } /** - * + * * rct2: 0x006AE1E4 */ static void window_ride_income_increase_primary_price(rct_window *w) @@ -5459,7 +5459,7 @@ static void window_ride_income_increase_primary_price(rct_window *w) ride = GET_RIDE(w->number); ride_type = gRideTypeList[ride->subtype]; - + if ((RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY) == 0) { if (ride->type != RIDE_TYPE_TOILETS && ride_type->shop_item == 0xFF) { if (!gConfigCheat.unlock_all_prices) @@ -5474,7 +5474,7 @@ static void window_ride_income_increase_primary_price(rct_window *w) } /** - * + * * rct2: 0x006AE237 */ static void window_ride_income_decrease_primary_price(rct_window *w) @@ -5499,7 +5499,7 @@ static void window_ride_income_decrease_primary_price(rct_window *w) } /** - * + * * rct2: 0x006AE269 */ static void window_ride_income_increase_secondary_price(rct_window *w) @@ -5509,7 +5509,7 @@ static void window_ride_income_increase_secondary_price(rct_window *w) ride = GET_RIDE(w->number); ride_type = gRideTypeList[ride->subtype]; - + money16 price = ride->price_secondary; if (price < MONEY(20, 00)) price++; @@ -5518,7 +5518,7 @@ static void window_ride_income_increase_secondary_price(rct_window *w) } /** - * + * * rct2: 0x006AE28D */ static void window_ride_income_decrease_secondary_price(rct_window *w) @@ -5528,7 +5528,7 @@ static void window_ride_income_decrease_secondary_price(rct_window *w) ride = GET_RIDE(w->number); ride_type = gRideTypeList[ride->subtype]; - + money16 price = ride->price_secondary; if (price > MONEY(0, 00)) price--; @@ -5537,7 +5537,7 @@ static void window_ride_income_decrease_secondary_price(rct_window *w) } /** - * + * * rct2: 0x006ADEA9 */ static void window_ride_income_mouseup(rct_window *w, int widgetIndex) @@ -5568,7 +5568,7 @@ static void window_ride_income_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006AE2F8 */ static void window_ride_income_resize(rct_window *w) @@ -5577,7 +5577,7 @@ static void window_ride_income_resize(rct_window *w) } /** - * + * * rct2: 0x006ADED4 */ static void window_ride_income_mousedown(int widgetIndex, rct_window *w, rct_widget *widget) @@ -5599,7 +5599,7 @@ static void window_ride_income_mousedown(int widgetIndex, rct_window *w, rct_wid } /** - * + * * rct2: 0x006AE2BF */ static void window_ride_income_update(rct_window *w) @@ -5618,7 +5618,7 @@ static void window_ride_income_update(rct_window *w) } /** - * + * * rct2: 0x006ADAA3 */ static void window_ride_income_invalidate(rct_window *w) @@ -5658,7 +5658,7 @@ static void window_ride_income_invalidate(rct_window *w) window_ride_income_widgets[WIDX_PRIMARY_PRICE_LABEL].image = STR_RIDE_INCOME_ADMISSION_PRICE; window_ride_income_widgets[WIDX_SECONDARY_PRICE_LABEL].image = STR_ON_RIDE_PHOTO_PRICE; window_ride_income_widgets[WIDX_PRIMARY_PRICE_SAME_THROUGHOUT_PARK].type = WWT_EMPTY; - + window_ride_income_widgets[WIDX_PRIMARY_PRICE].image = 1429; RCT2_GLOBAL(0x013CE952 + 6, money32) = ride->price; if (ride->price == 0) @@ -5735,7 +5735,7 @@ static void window_ride_income_invalidate(rct_window *w) } /** - * + * * rct2: 0x006ADCE5 */ static void window_ride_income_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -5822,7 +5822,7 @@ static void window_ride_income_paint(rct_window *w, rct_drawpixelinfo *dpi) #pragma region Customer /** - * + * * rct2: 0x006AD986 */ static void window_ride_customer_mouseup(rct_window *w, int widgetIndex) @@ -5856,7 +5856,7 @@ static void window_ride_customer_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006ADA29 */ static void window_ride_customer_resize(rct_window *w) @@ -5866,7 +5866,7 @@ static void window_ride_customer_resize(rct_window *w) } /** - * + * * rct2: 0x006AD9DD */ static void window_ride_customer_update(rct_window *w) @@ -5888,7 +5888,7 @@ static void window_ride_customer_update(rct_window *w) } /** - * + * * rct2: 0x006AD5F8 */ static void window_ride_customer_invalidate(rct_window *w) @@ -5923,7 +5923,7 @@ static void window_ride_customer_invalidate(rct_window *w) } /** - * + * * rct2: 0x006AD6CD */ static void window_ride_customer_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -5985,7 +5985,7 @@ static void window_ride_customer_paint(rct_window *w, rct_drawpixelinfo *dpi) gfx_draw_string_left(dpi, STR_ITEMS_SOLD, (void*)0x013CE952, 0, x, y); y += 10; } - + // Secondary shop items sold / on-ride photos sold shopItem = ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO ? RCT2_GLOBAL(0x0097D7CB + (ride->type * 4), uint8) : diff --git a/src/windows/ride_construction.c b/src/windows/ride_construction.c index 6257ecf9ad..34d4cd9b2e 100644 --- a/src/windows/ride_construction.c +++ b/src/windows/ride_construction.c @@ -1752,7 +1752,7 @@ static void window_ride_construction_mouseup_demolish(rct_window* w) sub_6C84CE(); return; } - + if (gotoStartPlacementMode) { z &= 0xFFF0; _currentTrackBeginZ = z; @@ -2005,7 +2005,7 @@ static void window_ride_construction_toolupdate(rct_window* w, int widgetIndex, } /** - * + * * rct2: 0x006C8248 */ static void window_ride_construction_tooldown(rct_window* w, int widgetIndex, int x, int y) @@ -2065,7 +2065,7 @@ static void window_ride_construction_paint(rct_window *w, rct_drawpixelinfo *dpi int x, y, width, height; window_draw_widgets(w, dpi); - + widget = &window_ride_construction_widgets[WIDX_CONSTRUCT]; if (widget->type == WWT_EMPTY) return; @@ -2309,7 +2309,7 @@ static void sub_6CBCE2( } /** - * + * * rct2: 0x006C84CE */ void sub_6C84CE() @@ -2338,11 +2338,11 @@ void sub_6C84CE() } window_ride_construction_update_possible_ride_configurations(); - window_ride_construction_update_widgets(w); + window_ride_construction_update_widgets(w); } /** - * + * * rct2: 0x006CA2DF * bh: trackRotation (out) * dl: ??? (out) @@ -2367,7 +2367,7 @@ static bool sub_6CA2DF(int *trackType, int *trackDirection, int *rideIndex, int } /** - * + * * rct2: 0x006C6A77 */ static void window_ride_construction_update_enabled_track_pieces() @@ -2381,7 +2381,7 @@ static void window_ride_construction_update_enabled_track_pieces() } /** - * + * * rct2: 0x006CA162 */ money32 sub_6CA162(int rideIndex, int trackType, int trackDirection, int edxRS16, int x, int y, int z) @@ -2416,7 +2416,7 @@ money32 sub_6CA162(int rideIndex, int trackType, int trackDirection, int edxRS16 z += ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_FLAT_RIDE) ? RCT2_GLOBAL(0x009972BD + (trackType * 10), uint16) : RCT2_GLOBAL(0x009968BD + (trackType * 10), uint16); - + RCT2_GLOBAL(0x00F440C9, uint16) = z; RCT2_GLOBAL(0x00F440CB, uint8) = trackDirection; _currentTrackSelectionFlags |= 2; @@ -2429,7 +2429,7 @@ money32 sub_6CA162(int rideIndex, int trackType, int trackDirection, int edxRS16 } /** - * + * * rct2: 0x006C94D8 */ void sub_6C94D8() @@ -2521,7 +2521,7 @@ void sub_6C94D8() } /** - * + * * rct2: 0x006C84E2 */ static void window_ride_construction_update_map_selection() @@ -2561,7 +2561,7 @@ static void window_ride_construction_update_map_selection() } /** - * + * * rct2: 0x006C8648 */ static void window_ride_construction_update_possible_ride_configurations() @@ -2634,7 +2634,7 @@ static void window_ride_construction_update_possible_ride_configurations() if (bank == TRACK_BANK_UPSIDE_DOWN && bank != _previousTrackBankEnd) continue; - + _currentPossibleRideConfigurations[currentPossibleRideConfigurationIndex] = trackType; RCT2_GLOBAL(0x00F4409C, uint32) |= (1 << currentPossibleRideConfigurationIndex); if ( @@ -2652,7 +2652,7 @@ static void window_ride_construction_update_possible_ride_configurations() } /** - * + * * rct2: 0x006C87F5 */ static void window_ride_construction_update_widgets(rct_window *w) @@ -2671,7 +2671,7 @@ static void window_ride_construction_update_widgets(rct_window *w) window_ride_construction_widgets[WIDX_ENTRANCE].type = WWT_DROPDOWN_BUTTON; window_ride_construction_widgets[WIDX_EXIT].type = WWT_DROPDOWN_BUTTON; } - + if (_numCurrentPossibleSpecialTrackPieces == 0) { window_ride_construction_widgets[WIDX_SPECIAL_TRACK_DROPDOWN].type = WWT_EMPTY; } else { @@ -3146,7 +3146,7 @@ static void window_ride_construction_select_map_tiles(rct_ride *ride, int trackT } /** - * + * * rct2: 0x006C776D */ static void window_ride_construction_show_special_track_dropdown(rct_window *w, rct_widget *widget) @@ -3179,7 +3179,7 @@ static void window_ride_construction_show_special_track_dropdown(rct_window *w, } /** - * + * * rct2: 0x006C7630 */ static void ride_selected_track_set_seat_rotation(int seatRotation) @@ -3193,7 +3193,7 @@ static void ride_selected_track_set_seat_rotation(int seatRotation) } /** - * + * * rct2: 0x006C7502 */ static void loc_6C7502(int al) @@ -3209,7 +3209,7 @@ static void loc_6C7502(int al) } /** - * + * * rct2: 0x006C76E9 */ static void ride_construction_set_brakes_speed(int brakesSpeed) @@ -3235,7 +3235,7 @@ static void ride_construction_set_brakes_speed(int brakesSpeed) } /** - * + * * rct2: 0x006CC6A8 */ void ride_construction_toolupdate_construct(int screenX, int screenY) @@ -3251,7 +3251,7 @@ void ride_construction_toolupdate_construct(int screenX, int screenY) map_invalidate_map_selection_tiles(); return; } - + z = RCT2_GLOBAL(0x00F44163, uint16); if (z == 0) z = map_get_highest_z(x >> 5, y >> 5); @@ -3276,7 +3276,7 @@ void ride_construction_toolupdate_construct(int screenX, int screenY) } _currentTrackPieceType = trackType; ride = GET_RIDE(_currentRideIndex); - + // Re-using this other code, very slight difference from original // - Original code checks for MSB mask instead of 255 on trackPart->var_00 // - Original code checks this first as its already set origin tile, probably just a micro optimisation @@ -3374,7 +3374,7 @@ void ride_construction_toolupdate_construct(int screenX, int screenY) } /** - * + * * rct2: 0x006CD354 */ void ride_construction_toolupdate_entrance_exit(int screenX, int screenY) @@ -3419,7 +3419,7 @@ void ride_construction_toolupdate_entrance_exit(int screenX, int screenY) } /** - * + * * rct2: 0x006CCA73 */ void ride_construction_tooldown_construct(int screenX, int screenY) @@ -3494,15 +3494,15 @@ void ride_construction_tooldown_construct(int screenX, int screenY) break; RCT2_GLOBAL(0x009A8C29, uint8) |= 1; - + RCT2_GLOBAL(0x00141E9AE, rct_string_id) = 927; RCT2_GLOBAL(0x00F44074, money32) = game_do_command( - _currentTrackBeginX, - GAME_COMMAND_FLAG_APPLY | (4 << 8), - _currentTrackBeginY, - _currentRideIndex, - GAME_COMMAND_SET_MAZE_TRACK, - _currentTrackBeginZ, + _currentTrackBeginX, + GAME_COMMAND_FLAG_APPLY | (4 << 8), + _currentTrackBeginY, + _currentRideIndex, + GAME_COMMAND_SET_MAZE_TRACK, + _currentTrackBeginZ, 0); RCT2_GLOBAL(0x009A8C29, uint8) &= ~1; @@ -3580,7 +3580,7 @@ void ride_construction_tooldown_construct(int screenX, int screenY) int saveCurrentTrackBankEnd = _currentTrackBankEnd; int saveCurrentTrackCovered = _currentTrackCovered; int saveCurrentTrackLiftHill = _currentTrackLiftHill; - + sub_6CC3FB(_currentRideIndex); _currentTrackPieceDirection = saveTrackDirection; @@ -3615,7 +3615,7 @@ void ride_construction_tooldown_construct(int screenX, int screenY) } /** - * + * * rct2: 0x006CCA73 */ static void ride_construction_tooldown_entrance_exit(int screenX, int screenY) diff --git a/src/windows/ride_list.c b/src/windows/ride_list.c index 835a87eec7..27be37c6cb 100644 --- a/src/windows/ride_list.c +++ b/src/windows/ride_list.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -135,7 +135,7 @@ static void window_ride_list_close_all(rct_window *w); static void window_ride_list_open_all(rct_window *w); /** - * + * * rct2: 0x006B30BC */ void window_ride_list_open() @@ -173,7 +173,7 @@ void window_ride_list_open() } /** - * + * * rct2: 0x006B3511 */ static void window_ride_list_mouseup(rct_window *w, int widgetIndex) @@ -211,7 +211,7 @@ static void window_ride_list_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x006B38A7 */ static void window_ride_list_resize(rct_window *w) @@ -231,7 +231,7 @@ static void window_ride_list_resize(rct_window *w) } /** - * + * * rct2: 0x006B3532 */ static void window_ride_list_mousedown(int widgetIndex, rct_window*w, rct_widget* widget) @@ -272,7 +272,7 @@ static void window_ride_list_mousedown(int widgetIndex, rct_window*w, rct_widget } /** - * + * * rct2: 0x006B3547 */ static void window_ride_list_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) @@ -292,7 +292,7 @@ static void window_ride_list_dropdown(rct_window *w, int widgetIndex, int dropdo } /** - * + * * rct2: 0x006B386B */ static void window_ride_list_update(rct_window *w) @@ -304,7 +304,7 @@ static void window_ride_list_update(rct_window *w) } /** - * + * * rct2: 0x006B35A1 */ static void window_ride_list_scrollgetsize(rct_window *w, int scrollIndex, int *width, int *height) @@ -327,7 +327,7 @@ static void window_ride_list_scrollgetsize(rct_window *w, int scrollIndex, int * } /** - * + * * rct2: 0x006B361F */ static void window_ride_list_scrollmousedown(rct_window *w, int scrollIndex, int x, int y) @@ -343,7 +343,7 @@ static void window_ride_list_scrollmousedown(rct_window *w, int scrollIndex, int } /** - * + * * rct2: 0x006B35EF */ static void window_ride_list_scrollmouseover(rct_window *w, int scrollIndex, int x, int y) @@ -359,7 +359,7 @@ static void window_ride_list_scrollmouseover(rct_window *w, int scrollIndex, int } /** - * + * * rct2: 0x006B3861 */ static void window_ride_list_tooltip(rct_window* w, int widgetIndex, rct_string_id *stringId) @@ -368,7 +368,7 @@ static void window_ride_list_tooltip(rct_window* w, int widgetIndex, rct_string_ } /** - * + * * rct2: 0x006B3182 */ static void window_ride_list_invalidate(rct_window *w) @@ -407,7 +407,7 @@ static void window_ride_list_invalidate(rct_window *w) w->widgets[WIDX_OPEN_CLOSE_ALL].type = WWT_EMPTY; w->widgets[WIDX_CLOSE_LIGHT].type = WWT_IMGBTN; w->widgets[WIDX_OPEN_LIGHT].type = WWT_IMGBTN; - + sint8 allClosed = -1; sint8 allOpen = -1; FOR_ALL_RIDES(i, ride) { @@ -433,7 +433,7 @@ static void window_ride_list_invalidate(rct_window *w) } /** - * + * * rct2: 0x006B3235 */ static void window_ride_list_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -443,7 +443,7 @@ static void window_ride_list_paint(rct_window *w, rct_drawpixelinfo *dpi) } /** - * + * * rct2: 0x006B3240 */ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex) @@ -462,7 +462,7 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, gfx_fill_rect(dpi, 0, y, 800, y + 9, 0x02000031); format = 1193; } - + // Get ride ride = &g_ride_list[w->list_item_positions[i]]; @@ -543,7 +543,7 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, } /** - * + * * rct2: 0x006B38EA */ static void window_ride_list_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w) @@ -572,7 +572,7 @@ static void window_ride_list_draw_tab_images(rct_drawpixelinfo *dpi, rct_window /** - * + * * rct2: 0x006B39A8 */ static void window_ride_list_refresh_list(rct_window *w) @@ -592,7 +592,7 @@ static void window_ride_list_refresh_list(rct_window *w) countB++; } } - + if (countB != 0) window_invalidate(w); diff --git a/src/windows/save_prompt.c b/src/windows/save_prompt.c index 03e0b42ce8..020630df44 100644 --- a/src/windows/save_prompt.c +++ b/src/windows/save_prompt.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/scenery.c b/src/windows/scenery.c index 1e7760c359..d189f02e41 100644 --- a/src/windows/scenery.c +++ b/src/windows/scenery.c @@ -256,7 +256,7 @@ void init_scenery() } } - // small scenery + // small scenery for (uint16 sceneryId = 0; sceneryId < 0xFC; sceneryId++) { if ((uint32)g_smallSceneryEntries[sceneryId] == 0xFFFFFFFF) continue; @@ -722,7 +722,7 @@ static void window_scenery_update(rct_window *w) } window_invalidate(w); - + if (!window_scenery_is_scenery_tool_active()){ window_close(w); return; @@ -861,7 +861,7 @@ void window_scenery_invalidate(rct_window *w) uint32 titleStringId = 1813; if (tabIndex < 19) titleStringId = g_scenerySetEntries[tabIndex]->name; - + window_scenery_widgets[WIDX_SCENERY_TITLE].image = titleStringId; w->pressed_widgets = (((uint32)w->pressed_widgets & 0xFF00000F) | (1 << (tabIndex + 4))) & 0xBBFFFFFF; @@ -871,10 +871,10 @@ void window_scenery_invalidate(rct_window *w) if (window_scenery_is_build_cluster_tool_on == 1) w->pressed_widgets |= (1 << WIDX_SCENERY_BUILD_CLUSTER_BUTTON); - + window_scenery_widgets[WIDX_SCENERY_ROTATE_OBJECTS_BUTTON].type = WWT_EMPTY; window_scenery_widgets[WIDX_SCENERY_BUILD_CLUSTER_BUTTON].type = WWT_EMPTY; - + sint16 tabSelectedSceneryId = window_scenery_selected_scenery_by_tab[tabIndex]; if (tabSelectedSceneryId != -1) { if (tabSelectedSceneryId < 0x100) { @@ -901,7 +901,7 @@ void window_scenery_invalidate(rct_window *w) window_scenery_widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].type = WWT_EMPTY; window_scenery_widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].type = WWT_EMPTY; window_scenery_widgets[WIDX_SCENERY_TERTIARY_COLOUR_BUTTON].type = WWT_EMPTY; - + if (window_scenery_is_repaint_scenery_tool_on & 1) { // repaint colored scenery tool is on window_scenery_widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].type = WWT_COLORBTN; window_scenery_widgets[WIDX_SCENERY_SECONDARY_COLOUR_BUTTON].type = WWT_COLORBTN; @@ -912,7 +912,7 @@ void window_scenery_invalidate(rct_window *w) if (tabSelectedSceneryId >= 0x400) { sceneryEntry = g_bannerSceneryEntries[tabSelectedSceneryId - 0x400]; - + if (sceneryEntry->banner.flags & 1) window_scenery_widgets[WIDX_SCENERY_PRIMARY_COLOUR_BUTTON].type = WWT_COLORBTN; } else if (tabSelectedSceneryId >= 0x300) { @@ -984,12 +984,12 @@ void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi) uint16 tabIndex = window_scenery_active_tab_index; uint16 selectedWidgetId = tabIndex + 4; uint32 imageId = ((w->colours[1] << 19) | window_scenery_widgets[selectedWidgetId].image) + 1ul; - + gfx_draw_sprite(dpi, imageId, w->x + window_scenery_widgets[selectedWidgetId].left, w->y + window_scenery_widgets[selectedWidgetId].top, selectedWidgetId); - + sint16 selectedSceneryEntryId = w->scenery.selected_scenery_id; if (selectedSceneryEntryId == -1) { if (window_scenery_is_repaint_scenery_tool_on & 1) // repaint colored scenery tool is on @@ -1051,10 +1051,10 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrol int sceneryTabItemIndex = 0; sint16 currentSceneryGlobalId = -1; sint16 left = 0, top = 0; - + while ((currentSceneryGlobalId = window_scenery_tab_entries[tabIndex][sceneryTabItemIndex]) != -1) { uint16 tabSelectedSceneryId = window_scenery_selected_scenery_by_tab[tabIndex]; - + if (window_scenery_is_repaint_scenery_tool_on == 1) { if (w->scenery.selected_scenery_id == currentSceneryGlobalId) { @@ -1117,8 +1117,8 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrol imageId &= 0xDFFFFFFF; tertiaryColour = window_scenery_tertiary_colour; } - - } + + } gfx_draw_sprite(clipdpi, imageId, 0x2F, (sceneryEntry->wall.height * 2) + 0x32, tertiaryColour); @@ -1175,7 +1175,7 @@ void window_scenery_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrol rct2_free(clipdpi); } } - + left += SCENERY_BUTTON_WIDTH; if (left >= 594) { top += SCENERY_BUTTON_HEIGHT; diff --git a/src/windows/server_list.c b/src/windows/server_list.c index 8d109d1d3a..8cd531f841 100644 --- a/src/windows/server_list.c +++ b/src/windows/server_list.c @@ -215,7 +215,7 @@ static void window_server_list_scroll_mousedown(rct_window *w, int scrollIndex, if (serverIndex >= _numSavedServers) return; char *serverAddress = _savedServers[serverIndex].address; - + switch (_hoverButtonIndex) { case WIDX_LIST_REMOVE: remove_saved_server(serverIndex); @@ -425,7 +425,7 @@ static void server_list_load_saved_servers() // Read number of saved servers SDL_RWread(file, &_numSavedServers, sizeof(uint32), 1); _savedServers = malloc(_numSavedServers * sizeof(saved_server)); - + // Load each saved server for (int i = 0; i < _numSavedServers; i++) { saved_server *serverInfo = &_savedServers[i]; diff --git a/src/windows/shortcut_keys.c b/src/windows/shortcut_keys.c index 02d2cd295d..5328e522d5 100644 --- a/src/windows/shortcut_keys.c +++ b/src/windows/shortcut_keys.c @@ -228,20 +228,20 @@ static void window_shortcut_scrollmouseover(rct_window *w, int scrollIndex, int int selected_item = y / 10; if (selected_item >= w->no_list_items) return; - + w->selected_list_item = selected_item; window_invalidate(w); } /** - * + * * rct2: 0x006E38E6 */ static void window_shortcut_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex) { gfx_fill_rect(dpi, dpi->x, dpi->y, dpi->x + dpi->width - 1, dpi->y + dpi->height - 1, RCT2_ADDRESS(0x0141FC48,uint8)[w->colours[1] * 8]); - + for (int i = 0; i < w->no_list_items; ++i) { int y = i * 10; if (y > dpi->y + dpi->height) diff --git a/src/windows/sign.c b/src/windows/sign.c index 9c2a56dfe5..d1e288a816 100644 --- a/src/windows/sign.c +++ b/src/windows/sign.c @@ -248,8 +248,8 @@ static void window_sign_mouseup(rct_window *w, int widgetIndex) 1 | ((map_element->type&0x3) << 8), y, map_element->base_height | ((map_element->properties.scenerymultiple.type >> 10) << 8), - GAME_COMMAND_REMOVE_LARGE_SCENERY, - 0, + GAME_COMMAND_REMOVE_LARGE_SCENERY, + 0, 0); break; case WIDX_SIGN_TEXT: @@ -451,7 +451,7 @@ void window_sign_small_open(rct_windownumber number){ int view_x = gBanners[w->number].x << 5; int view_y = gBanners[w->number].y << 5; - + rct_map_element* map_element = map_get_first_element_at(view_x / 32, view_y / 32); while (1){ diff --git a/src/windows/staff.c b/src/windows/staff.c index 4b306cf126..d47741ee1c 100644 --- a/src/windows/staff.c +++ b/src/windows/staff.c @@ -70,7 +70,7 @@ enum WINDOW_STAFF_WIDGET_IDX { WIDX_COSTUME_BTN, }; -rct_widget window_staff_overview_widgets[] = { +rct_widget window_staff_overview_widgets[] = { { WWT_FRAME, 0, 0, WW - 1, 0, WH - 1, 0x0FFFFFFFF, STR_NONE }, // Panel / Background { WWT_CAPTION, 0, 1, WW - 2, 1, 14, 0x361, STR_WINDOW_TITLE_TIP }, // Title { WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // Close x button @@ -90,7 +90,7 @@ rct_widget window_staff_overview_widgets[] = { }; //0x9AF910 -rct_widget window_staff_options_widgets[] = { +rct_widget window_staff_options_widgets[] = { { WWT_FRAME, 0, 0, WW - 1, 0, WH - 1, 0x0FFFFFFFF, STR_NONE }, // Panel / Background { WWT_CAPTION, 0, 1, WW - 2, 1, 14, 0x361, STR_WINDOW_TITLE_TIP }, // Title { WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // Close x button @@ -109,7 +109,7 @@ rct_widget window_staff_options_widgets[] = { }; //0x9AF9F4 -rct_widget window_staff_stats_widgets[] = { +rct_widget window_staff_stats_widgets[] = { { WWT_FRAME, 0, 0, WW - 1, 0, WH - 1, 0x0FFFFFFFF, STR_NONE }, // Panel / Background { WWT_CAPTION, 0, 1, WW - 2, 1, 14, 0x361, STR_WINDOW_TITLE_TIP }, // Title { WWT_CLOSEBOX, 0, WW - 13, WW - 3, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // Close x button @@ -388,16 +388,16 @@ void window_staff_set_page(rct_window* w, int page) if(w->number == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWNUMBER, rct_windownumber) && w->classification == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, rct_windowclass)) tool_cancel(); - + } - + int listen = 0; if (page == WINDOW_STAFF_OVERVIEW && w->page == WINDOW_STAFF_OVERVIEW && w->viewport){ if (!(w->viewport->flags & VIEWPORT_FLAG_SOUND_ON)) listen = 1; } - + w->page = page; w->frame_no = 0; @@ -514,7 +514,7 @@ void window_staff_overview_resize(rct_window *w) window_staff_viewport_init(w); } -/** +/** * Handle the dropdown of patrol button. * rct2: 0x006BDF98 */ @@ -575,7 +575,7 @@ void window_staff_overview_dropdown(rct_window *w, int widgetIndex, int dropdown /** * Update the animation frame of the tab icon. - * rct2: 0x6BE602 + * rct2: 0x6BE602 */ void window_staff_overview_update(rct_window* w) { @@ -646,10 +646,10 @@ void window_staff_stats_mouseup(rct_window *w, int widgetIndex) void window_staff_stats_resize(rct_window *w) { w->min_width = 190; - w->max_width = 190; + w->max_width = 190; w->min_height = 119; w->max_height = 119; - + if (w->width < w->min_width) { w->width = w->min_width; window_invalidate(w); @@ -805,7 +805,7 @@ void window_staff_overview_invalidate(rct_window *w) } w->pressed_widgets |= 1ULL << (w->page + WIDX_TAB_1); - + rct_peep* peep = GET_PEEP(w->number); RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; @@ -1073,7 +1073,7 @@ void window_staff_overview_tool_down(rct_window* w, int widgetIndex, int x, int if (dest_x == (sint16)0x8000)return; - // Set the coordinate of destination to be exactly + // Set the coordinate of destination to be exactly // in the middle of a tile. dest_x += 16; dest_y += 16; @@ -1271,7 +1271,7 @@ void window_staff_options_mousedown(int widgetIndex, rct_window* w, rct_widget* rct_peep* peep = GET_PEEP(w->number); int item_checked = 0; - //This will be moved below where Items Checked is when all + //This will be moved below where Items Checked is when all //of dropdown related functions are finished. This prevents //the dropdown from not working on first click. for (int i = 0; i < no_entries; ++i){ @@ -1285,13 +1285,13 @@ void window_staff_options_mousedown(int widgetIndex, rct_window* w, rct_widget* //Get the dropdown box widget instead of button. widget--; - + int x = widget->left + w->x; int y = widget->top + w->y; int extray = widget->bottom - widget->top + 1; int width = widget->right - widget->left - 3; window_dropdown_show_text_custom_width(x, y, extray, w->colours[1], DROPDOWN_FLAG_STAY_OPEN, no_entries, width); - + // See above note. gDropdownItemsChecked = item_checked; } diff --git a/src/windows/staff_fire_prompt.c b/src/windows/staff_fire_prompt.c index 0669f0bd8b..564888159c 100644 --- a/src/windows/staff_fire_prompt.c +++ b/src/windows/staff_fire_prompt.c @@ -112,7 +112,7 @@ void window_staff_fire_prompt_open(rct_peep* peep) static void window_staff_fire_mouseup(rct_window *w, int widgetIndex) { rct_peep* peep = &g_sprite_list[w->number].peep; - + switch (widgetIndex){ case WIDX_YES: game_do_command(peep->x, 1, peep->y, w->number, GAME_COMMAND_FIRE_STAFF_MEMBER, 0, 0); @@ -137,12 +137,12 @@ static void window_staff_fire_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); rct_peep* peep = &g_sprite_list[w->number].peep; - + RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx; RCT2_GLOBAL(0x13CE954, uint32) = peep->id; - + int x = w->x + WW / 2; int y = w->y + (WH / 2) - 3; - + gfx_draw_string_centred_wrapped(dpi, (void*)0x13CE952, x, y, WW - 4, STR_FIRE_STAFF_ID, 0); } diff --git a/src/windows/staff_list.c b/src/windows/staff_list.c index cff9782bbb..da0fe1edf2 100644 --- a/src/windows/staff_list.c +++ b/src/windows/staff_list.c @@ -412,7 +412,7 @@ void window_staff_list_scrollgetsize(rct_window *w, int scrollIndex, int *width, RCT2_GLOBAL(RCT2_ADDRESS_STAFF_HIGHLIGHTED_INDEX, short) = -1; window_invalidate(w); } - + *height = staffCount * 10; i = *height - window_staff_list_widgets[WIDX_STAFF_LIST_LIST].bottom + window_staff_list_widgets[WIDX_STAFF_LIST_LIST].top + 21; if (i < 0) @@ -493,7 +493,7 @@ void window_staff_list_invalidate(rct_window *w) w->pressed_widgets = pressed_widgets | (1 << widgetIndex); window_staff_list_widgets[WIDX_STAFF_LIST_HIRE_BUTTON].image = STR_HIRE_HANDYMAN + tabIndex; window_staff_list_widgets[WIDX_STAFF_LIST_UNIFORM_COLOR_PICKER].type = WWT_EMPTY; - + if (tabIndex < 3) { window_staff_list_widgets[WIDX_STAFF_LIST_UNIFORM_COLOR_PICKER].type = WWT_COLORBTN; window_staff_list_widgets[WIDX_STAFF_LIST_UNIFORM_COLOR_PICKER].image = @@ -573,8 +573,8 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi) window_staff_list_widgets[WIDX_STAFF_LIST_ENTERTAINERS_TAB].top + w->y + 1, window_staff_list_widgets[WIDX_STAFF_LIST_ENTERTAINERS_TAB].bottom - window_staff_list_widgets[WIDX_STAFF_LIST_ENTERTAINERS_TAB].top - 1 ); - - + + if (sprite_dpi != NULL) { // Entertainers tab image diff --git a/src/windows/text_input.c b/src/windows/text_input.c index b2df708142..19aff71d4b 100644 --- a/src/windows/text_input.c +++ b/src/windows/text_input.c @@ -21,7 +21,7 @@ /** * Text Input Window * - * This is a new window created to replace the windows dialog box + * This is a new window created to replace the windows dialog box * that is used for inputing new text for ride names and peep names. */ @@ -137,9 +137,9 @@ void window_text_input_open(rct_window* call_w, int call_widget, rct_string_id t // Window will be in the center of the screen rct_window* w = window_create_centred( - WW, + WW, height, - &window_text_input_events, + &window_text_input_events, WC_TEXTINPUT, WF_STICK_TO_FRONT ); @@ -260,10 +260,10 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) window_draw_widgets(w, dpi); int y = w->y + 25; - + int no_lines = 0; int font_height = 0; - + gfx_draw_string_centred(dpi, input_text_description, w->x + WW / 2, y, w->colours[1], &TextInputDescriptionArgs); @@ -316,7 +316,7 @@ static void window_text_input_paint(rct_window *w, rct_drawpixelinfo *dpi) cur_drawn++; } - + wrap_pointer += string_length + 1; if (text_input[char_count + string_length] == ' ')char_count++; @@ -359,7 +359,7 @@ void window_text_input_key(rct_window* w, int key) if (calling_w) window_event_textinput_call(calling_w, calling_widget, text_input); } - + window_invalidate(w); } diff --git a/src/windows/themes.c b/src/windows/themes.c index 94b04f68a9..ed65866a49 100644 --- a/src/windows/themes.c +++ b/src/windows/themes.c @@ -754,7 +754,7 @@ void window_themes_invalidate(rct_window *w) window_themes_widgets[WIDX_THEMES_LIST].right = w->width - 4; window_themes_widgets[WIDX_THEMES_LIST].bottom = w->height - 0x0F; - + window_themes_widgets[WIDX_THEMES_LIST].type = WWT_EMPTY; window_themes_widgets[WIDX_THEMES_RCT1_RIDE_LIGHTS].type = WWT_EMPTY; window_themes_widgets[WIDX_THEMES_RCT1_PARK_LIGHTS].type = WWT_EMPTY; diff --git a/src/windows/tile_inspector.c b/src/windows/tile_inspector.c index c04026e863..72a8b71993 100644 --- a/src/windows/tile_inspector.c +++ b/src/windows/tile_inspector.c @@ -274,7 +274,7 @@ static void window_tile_inspector_paint(rct_window *w, rct_drawpixelinfo *dpi) draw_string_left_underline(dpi, STR_TILE_INSPECTOR_BASE_HEIGHT, NULL, 12, x + 200, y); draw_string_left_underline(dpi, STR_TILE_INSPECTOR_CLEARANGE_HEIGHT, NULL, 12, x + 280, y); draw_string_left_underline(dpi, STR_TILE_INSPECTOR_FLAGS, NULL, 12, x + 390, y); - + } static void window_tile_inspector_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int scrollIndex) diff --git a/src/windows/title_command_editor.c b/src/windows/title_command_editor.c index 7fb1c66aca..9cc7a77199 100644 --- a/src/windows/title_command_editor.c +++ b/src/windows/title_command_editor.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -96,7 +96,7 @@ static rct_widget window_title_command_editor_widgets[] = { { WWT_DROPDOWN_BUTTON, 1, WW-28, WW-18, BY2+1, BY2+10, 876, STR_NONE }, { WWT_DROPDOWN_BUTTON, 1, WS+WHA+3, WW-WS-1, BY2-14, BY2-3, 5446, STR_NONE }, // Get location/zoom/etc - + { WWT_DROPDOWN_BUTTON, 1, 10, 80, WH-21, WH-10, STR_OK, STR_NONE }, // OKAY { WWT_DROPDOWN_BUTTON, 1, WW-80, WW-10, WH-21, WH-10, STR_CANCEL, STR_NONE }, // Cancel @@ -203,9 +203,9 @@ void window_title_command_editor_open(int index, bool insert) return; window = window_create_centred( - WW, + WW, WH, - &window_title_command_editor_events, + &window_title_command_editor_events, WC_TITLE_COMMAND_EDITOR, WF_STICK_TO_FRONT ); @@ -311,7 +311,7 @@ static void window_title_command_editor_mousedown(int widgetIndex, rct_window* w gDropdownItemsFormat[i] = 1142; gDropdownItemsArgs[i] = window_title_command_editor_orders[i].nameStringId; } - + window_dropdown_show_text_custom_width( w->x + widget->left, w->y + widget->top, @@ -370,7 +370,7 @@ static void window_title_command_editor_mousedown(int widgetIndex, rct_window* w static void window_title_command_editor_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) { rct_xy16 mapCoord; - + if (dropdownIndex == -1) return; diff --git a/src/windows/title_editor.c b/src/windows/title_editor.c index 5832f8c17d..78edd9a61c 100644 --- a/src/windows/title_editor.c +++ b/src/windows/title_editor.c @@ -102,7 +102,7 @@ enum WINDOW_TITLE_EDITOR_WIDGET_IDX { WIDX_TITLE_EDITOR_SAVES_TAB, WIDX_TITLE_EDITOR_SCRIPT_TAB, WIDX_TITLE_EDITOR_LIST, - + // Presets Tab WIDX_TITLE_EDITOR_PRESETS, WIDX_TITLE_EDITOR_PRESETS_DROPDOWN, @@ -123,7 +123,7 @@ enum WINDOW_TITLE_EDITOR_WIDGET_IDX { WIDX_TITLE_EDITOR_DELETE, //WIDX_TITLE_EDITOR_RELOAD, WIDX_TITLE_EDITOR_SKIP_TO, - + WIDX_TITLE_EDITOR_MOVE_UP, WIDX_TITLE_EDITOR_MOVE_DOWN, @@ -155,7 +155,7 @@ static rct_widget window_title_editor_widgets[] = { { WWT_TAB, 1, 34, 64, 17, 43, 0x02000144E, 5377 }, // saves tab { WWT_TAB, 1, 65, 95, 17, 43, 0x02000144E, 5378 }, // script tab { WWT_SCROLL, 1, BX+BW+9,WW-4, 48, WH-4, 3, STR_NONE }, // command/save list - + // Presets Tab { WWT_DROPDOWN, 1, 125, 299, 60, 71, STR_NONE, STR_NONE }, // Preset title sequences { WWT_DROPDOWN_BUTTON, 1, 288, 298, 61, 70, 876, STR_NONE }, @@ -163,7 +163,7 @@ static rct_widget window_title_editor_widgets[] = { { WWT_DROPDOWN_BUTTON, 1, 10, 100, 82+20, 93+20, 5239, 5383 }, // Duplicate button { WWT_DROPDOWN_BUTTON, 1, 110, 200, 82, 93, 3349, 5384 }, // Delete button { WWT_DROPDOWN_BUTTON, 1, 210, 300, 82, 93, 3348, 5385 }, // Rename button - + // Saves Tab { WWT_DROPDOWN_BUTTON, 1, BX, BX+BW-1,BY, BH, 5407, 5392 }, // Add { WWT_DROPDOWN_BUTTON, 1, BX, BX+BW-1,BY+(BS*1), BH+(BS*1), 5408, 5393 }, // Remove @@ -267,7 +267,7 @@ void window_title_editor_open(int tab) (1 << WIDX_TITLE_EDITOR_STOP) | (1 << WIDX_TITLE_EDITOR_REPLAY) | (1 << WIDX_TITLE_EDITOR_SKIP); - + window_init_scroll_widgets(window); window->list_information_type = 0; @@ -495,7 +495,7 @@ static void window_title_editor_mouseup(rct_window *w, int widgetIndex) } static void window_title_editor_resize(rct_window *w) -{ +{ if (w->selected_tab == WINDOW_TITLE_EDITOR_TAB_PRESETS) { w->min_width = WW; w->min_height = WH2; @@ -594,7 +594,7 @@ static void window_title_editor_mousedown(int widgetIndex, rct_window* w, rct_wi } static void window_title_editor_dropdown(rct_window *w, int widgetIndex, int dropdownIndex) -{ +{ if (dropdownIndex == -1) return; @@ -630,7 +630,7 @@ void window_title_editor_scrollgetsize(rct_window *w, int scrollIndex, int *widt lineCount = gConfigTitleSequences.presets[gCurrentTitleSequence].num_saves; else if (w->selected_tab == WINDOW_TITLE_EDITOR_TAB_SCRIPT) lineCount = gConfigTitleSequences.presets[gCurrentTitleSequence].num_commands; - + *height = lineCount * ROW_HEIGHT; i = *height - window_title_editor_widgets[WIDX_TITLE_EDITOR_LIST].bottom + window_title_editor_widgets[WIDX_TITLE_EDITOR_LIST].top + 21; if (i < 0) @@ -669,7 +669,7 @@ void window_title_editor_scrollmouseover(rct_window *w, int scrollIndex, int x, { int index; sint16 oldHighlightedIndex; - + index = y / ROW_HEIGHT; switch (w->selected_tab) { oldHighlightedIndex = _window_title_editor_highlighted_index; @@ -751,7 +751,7 @@ void window_title_editor_invalidate(rct_window *w) uint8 widgetIndex = w->selected_tab + 4; w->pressed_widgets = pressed_widgets | (1 << widgetIndex); - + window_title_editor_widgets[WIDX_TITLE_EDITOR_LIST].type = WWT_EMPTY; window_title_editor_widgets[WIDX_TITLE_EDITOR_PRESETS].type = WWT_EMPTY; @@ -777,7 +777,7 @@ void window_title_editor_invalidate(rct_window *w) window_title_editor_widgets[WIDX_TITLE_EDITOR_STOP].type = WWT_EMPTY; window_title_editor_widgets[WIDX_TITLE_EDITOR_REPLAY].type = WWT_EMPTY; window_title_editor_widgets[WIDX_TITLE_EDITOR_SKIP].type = WWT_EMPTY; - + switch (w->selected_tab) { case WINDOW_TITLE_EDITOR_TAB_PRESETS: window_title_editor_widgets[WIDX_TITLE_EDITOR_PRESETS].type = WWT_DROPDOWN; @@ -813,7 +813,7 @@ void window_title_editor_invalidate(rct_window *w) window_title_editor_widgets[WIDX_TITLE_EDITOR_SKIP].type = WWT_IMGBTN; break; } - + window_title_editor_widgets[WIDX_TITLE_EDITOR_BACKGROUND].right = w->width - 1; window_title_editor_widgets[WIDX_TITLE_EDITOR_BACKGROUND].bottom = w->height - 1; window_title_editor_widgets[WIDX_TITLE_EDITOR_TAB_CONTENT_PANEL].right = w->width - 1; @@ -910,7 +910,7 @@ void window_title_editor_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int else if (i & 1) { gfx_fill_rect(dpi, x, y, x + SCROLL_WIDTH + 100, y + ROW_HEIGHT - 1, RCT2_GLOBAL(0x0141FC4A + (w->colours[1] * 8), uint8) | 0x1000000); } - + RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint32) = (uint32)&title->saves[i]; if (selected || hover) { format_string(buffer, 1170, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS); @@ -985,7 +985,7 @@ void window_title_editor_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int commandName = 5426; break; } - + if ((selected || hover) && !error) { format_string(buffer, commandName, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS); } diff --git a/src/windows/title_exit.c b/src/windows/title_exit.c index b78c788ca5..7bcefd86a8 100644 --- a/src/windows/title_exit.c +++ b/src/windows/title_exit.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -102,7 +102,7 @@ static void window_title_exit_mouseup(rct_window *w, int widgetIndex) } /** -* +* * rct2: 0x0066B836 */ static void window_title_exit_paint(rct_window *w, rct_drawpixelinfo *dpi) diff --git a/src/windows/title_logo.c b/src/windows/title_logo.c index 001be0e02d..9e338a8e63 100644 --- a/src/windows/title_logo.c +++ b/src/windows/title_logo.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -72,7 +72,7 @@ void window_title_logo_open() { int i, packs; rct_window *window; - + // Count number of expansion packs packs = 0; for (i = 0; i < 16; i++) diff --git a/src/windows/title_menu.c b/src/windows/title_menu.c index 970d021ca8..a42588d59c 100644 --- a/src/windows/title_menu.c +++ b/src/windows/title_menu.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/title_options.c b/src/windows/title_options.c index 40be52d339..f841862d37 100644 --- a/src/windows/title_options.c +++ b/src/windows/title_options.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/title_scenarioselect.c b/src/windows/title_scenarioselect.c index b817b6113a..c370e6a373 100644 --- a/src/windows/title_scenarioselect.c +++ b/src/windows/title_scenarioselect.c @@ -99,7 +99,7 @@ static rct_window_event_list window_scenarioselect_events = { }; /** - * + * * rct2: 0x006781B5 */ void window_scenarioselect_open() @@ -120,7 +120,7 @@ void window_scenarioselect_open() WF_10 ); window->widgets = window_scenarioselect_widgets; - + window->enabled_widgets = 0x04 | 0x10 | 0x20 | 0x40 | 0x80 | 0x100; window_init_scroll_widgets(window); window->viewport_focus_coordinates.var_480 = -1; @@ -132,7 +132,7 @@ void window_scenarioselect_open() } /** - * + * * rct2: 0x00677C8A */ static void window_scenarioselect_init_tabs() @@ -262,7 +262,7 @@ static void window_scenarioselect_paint(rct_window *w, rct_drawpixelinfo *dpi) rct_scenario_basic *scenario; window_draw_widgets(w, dpi); - + format = (theme_get_preset()->features.rct1_scenario_font) ? 5138 : 1193; // Text for each tab diff --git a/src/windows/tooltip.c b/src/windows/tooltip.c index c723cd9332..d8edd3dd65 100644 --- a/src/windows/tooltip.c +++ b/src/windows/tooltip.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -138,13 +138,13 @@ void window_tooltip_show(rct_string_id id, int x, int y) } /** - * + * * rct2: 0x006EA10D */ void window_tooltip_open(rct_window *widgetWindow, int widgetIndex, int x, int y) { rct_widget *widget; - + if (widgetWindow == NULL || widgetIndex == -1) return; @@ -164,7 +164,7 @@ void window_tooltip_open(rct_window *widgetWindow, int widgetIndex, int x, int y } /** - * + * * rct2: 0x006E98C6 */ void window_tooltip_close() @@ -177,7 +177,7 @@ void window_tooltip_close() } /** - * + * * rct2: 0x006EA578 */ static void window_tooltip_onclose(rct_window *w) @@ -186,7 +186,7 @@ static void window_tooltip_onclose(rct_window *w) } /** - * + * * rct2: 0x006EA580 */ static void window_tooltip_update(rct_window *w) @@ -196,7 +196,7 @@ static void window_tooltip_update(rct_window *w) } /** - * + * * rct2: 0x006EA41D */ static void window_tooltip_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -221,7 +221,7 @@ static void window_tooltip_paint(rct_window *w, rct_drawpixelinfo *dpi) gfx_draw_pixel(dpi, right - 1, top + 1, 0x0200002F); gfx_draw_pixel(dpi, left + 1, bottom - 1, 0x0200002F); gfx_draw_pixel(dpi, right - 1, bottom - 1, 0x0200002F); - + // Text left = w->x + ((w->width + 1) / 2) - 1; top = w->y + 1; diff --git a/src/windows/tooltip.h b/src/windows/tooltip.h index a05e5e18b8..b5b649463c 100644 --- a/src/windows/tooltip.h +++ b/src/windows/tooltip.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/top_toolbar.c b/src/windows/top_toolbar.c index 1b01e3361f..3eb2511f76 100644 --- a/src/windows/top_toolbar.c +++ b/src/windows/top_toolbar.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -188,7 +188,7 @@ static rct_widget window_top_toolbar_widgets[] = { { WWT_TRNBTN, 3, 0x001E, 0x003B, 0, 27, 0x20000000 | 0x15F9, STR_FINANCES_RESEARCH_TIP }, // Research { WWT_TRNBTN, 3, 0x001E, 0x003B, 0, 27, 0x20000000 | 0x15F9, STR_SHOW_RECENT_MESSAGES_TIP }, // News { WWT_TRNBTN, 0, 0x001E, 0x003B, 0, 27, 0x20000000 | 0x15F9, STR_SHOW_MULTIPLAYER_STATUS_TIP }, // Network - + { WWT_EMPTY, 0, 0, 10-1, 0, 0, 0xFFFFFFFF, STR_NONE }, // Artificial widget separator { WIDGETS_END }, }; @@ -277,7 +277,7 @@ void window_top_toolbar_open() } /** - * + * * rct2: 0x0066C957 */ static void window_top_toolbar_mouseup(rct_window *w, int widgetIndex) @@ -342,7 +342,7 @@ static void window_top_toolbar_mouseup(rct_window *w, int widgetIndex) } /** - * + * * rct2: 0x0066CA3B */ static void window_top_toolbar_mousedown(int widgetIndex, rct_window*w, rct_widget* widget) @@ -597,7 +597,7 @@ static void window_top_toolbar_dropdown(rct_window *w, int widgetIndex, int drop } /** - * + * * rct2: 0x0066C810 */ static void window_top_toolbar_invalidate(rct_window *w) @@ -653,7 +653,7 @@ static void window_top_toolbar_invalidate(rct_window *w) window_top_toolbar_widgets[WIDX_PATH].type = WWT_EMPTY; window_top_toolbar_widgets[WIDX_CLEAR_SCENERY].type = WWT_EMPTY; } - + if (g_editor_step != EDITOR_STEP_ROLLERCOASTER_DESIGNER) { window_top_toolbar_widgets[WIDX_CONSTRUCT_RIDE].type = WWT_EMPTY; window_top_toolbar_widgets[WIDX_FASTFORWARD].type = WWT_EMPTY; @@ -759,7 +759,7 @@ static void window_top_toolbar_invalidate(rct_window *w) } /** - * + * * rct2: 0x0066C8EC */ static void window_top_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi) @@ -965,7 +965,7 @@ static void repaint_scenery_tool_down(sint16 x, sint16 y, sint16 widgetIndex){ } } -/* rct2: 0x006E1F34 +/* rct2: 0x006E1F34 * Outputs * eax : grid_x * ebx : parameter_1 @@ -1053,7 +1053,7 @@ void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid_x, sin } } } - + switch (scenery_type){ case 0: { @@ -1129,7 +1129,7 @@ void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid_x, sin // If CTRL not pressed if (RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_TOOL_CTRL_PRESSED, uint8) == 0){ - uint16 flags = + uint16 flags = VIEWPORT_INTERACTION_MASK_TERRAIN & VIEWPORT_INTERACTION_MASK_WATER; int interaction_type = 0; @@ -1208,7 +1208,7 @@ void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid_x, sin { // Path bits - uint16 flags = + uint16 flags = VIEWPORT_INTERACTION_MASK_FOOTPATH & VIEWPORT_INTERACTION_MASK_FOOTPATH_ITEM; int interaction_type = 0; @@ -1373,7 +1373,7 @@ void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid_x, sin uint8 rotation = window_scenery_rotation; rotation -= RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint8); rotation &= 0x3; - + sint16 z = map_element->base_height; if (map_element->properties.path.type & (1 << 2)){ @@ -1394,7 +1394,7 @@ void sub_6E1F34(sint16 x, sint16 y, uint16 selected_scenery, sint16* grid_x, sin } /** - * + * * rct2: 0x006E2CC6 */ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window *w, short widgetIndex) @@ -1418,7 +1418,7 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window *w sub_6E1F34(x, y, selectedTab, &gridX, &gridY, ¶meter_1, ¶meter_2, ¶meter_3); if (gridX == (sint16)0x8000) return; - + switch (sceneryType){ case SCENERY_TYPE_SMALL: { @@ -1457,7 +1457,7 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window *w ) { zAttemptRange = 20; } - + bool success = false; for (; zAttemptRange != 0; zAttemptRange--){ int flags = GAME_COMMAND_FLAG_APPLY | (parameter_1 & 0xFF00); @@ -1569,7 +1569,7 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window *w for (; zAttemptRange != 0; zAttemptRange--) { int flags = (parameter_1 & 0xFF00) | GAME_COMMAND_FLAG_APPLY; - + RCT2_GLOBAL(0x009A8C29, uint8) |= 1; RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = STR_CANT_POSITION_THIS_HERE; int cost = game_do_command(gridX, flags, gridY, parameter_2, GAME_COMMAND_PLACE_LARGE_SCENERY, parameter_3, RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16)); @@ -1783,7 +1783,7 @@ void top_toolbar_tool_update_land(sint16 x, sint16 y){ money32 lower_cost = selection_lower_land(0); money32 raise_cost = selection_raise_land(0); - if (RCT2_GLOBAL(RCT2_ADDRESS_LAND_RAISE_COST, money32) != raise_cost || + if (RCT2_GLOBAL(RCT2_ADDRESS_LAND_RAISE_COST, money32) != raise_cost || RCT2_GLOBAL(RCT2_ADDRESS_LAND_LOWER_COST, money32) != lower_cost){ RCT2_GLOBAL(RCT2_ADDRESS_LAND_RAISE_COST, money32) = raise_cost; RCT2_GLOBAL(RCT2_ADDRESS_LAND_LOWER_COST, money32) = lower_cost; @@ -1889,7 +1889,7 @@ void top_toolbar_tool_update_land(sint16 x, sint16 y){ state_changed++; } - + if (tool_size == 0) tool_size = 1; @@ -1978,11 +1978,11 @@ void top_toolbar_tool_update_water(sint16 x, sint16 y){ rct_xy16 mapTile = { 0 }; int interaction_type = 0; get_map_coordinates_from_pos( - x, - y, - VIEWPORT_INTERACTION_MASK_TERRAIN & VIEWPORT_INTERACTION_MASK_WATER, - &mapTile.x, - &mapTile.y, + x, + y, + VIEWPORT_INTERACTION_MASK_TERRAIN & VIEWPORT_INTERACTION_MASK_WATER, + &mapTile.x, + &mapTile.y, &interaction_type, NULL, NULL); @@ -2073,7 +2073,7 @@ void top_toolbar_tool_update_water(sint16 x, sint16 y){ } } -/* rct2: 0x006E24F6 +/* rct2: 0x006E24F6 * On failure returns MONEY32_UNDEFINED * On success places ghost scenery and returns cost to place proper */ @@ -2090,12 +2090,12 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa // Small Scenery //6e252b cost = game_do_command( - map_tile.x, + map_tile.x, parameter_1 | 0x69, - map_tile.y, - parameter_2, - GAME_COMMAND_PLACE_SCENERY, - parameter_3, + map_tile.y, + parameter_2, + GAME_COMMAND_PLACE_SCENERY, + parameter_3, RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16)); if (cost == MONEY32_UNDEFINED) @@ -2168,7 +2168,7 @@ money32 try_place_ghost_scenery(rct_xy16 map_tile, uint32 parameter_1, uint32 pa RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_X, sint16) = map_tile.x; RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Y, sint16) = map_tile.y; RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_WALL_ROTATION, uint8) = (parameter_2 & 0xFF); - + mapElement = RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT, rct_map_element*); RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_Z, uint8) = mapElement->base_height; @@ -2264,7 +2264,7 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){ scenery_remove_ghost_tool_placement(); return; } - + rct_scenery_entry* scenery; uint8 bl; money32 cost; @@ -2293,7 +2293,7 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){ (parameter2 & 0xFF) == RCT2_GLOBAL(0x00F64F0E, uint8)&& RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_Z_COORDINATE, sint16) == RCT2_GLOBAL(0x00F64F0A, sint16) && RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_SELECTED_OBJECT, uint16) == selected_tab){ - return; + return; } scenery_remove_ghost_tool_placement(); @@ -2403,9 +2403,9 @@ void top_toolbar_tool_update_scenery(sint16 x, sint16 y){ rct_xy16* selectedTile = gMapSelectionTiles; for (rct_large_scenery_tile* tile = scenery->large_scenery.tiles; tile->x_offset != (sint16)0xFFFF; tile++){ - rct_xy16 tileLocation = { - .x = tile->x_offset, - .y = tile->y_offset + rct_xy16 tileLocation = { + .x = tile->x_offset, + .y = tile->y_offset }; rotate_map_coordinates(&tileLocation.x, &tileLocation.y, (parameter1 >> 8) & 0xFF); @@ -2566,7 +2566,7 @@ static void window_top_toolbar_tool_down(rct_window* w, int widgetIndex, int x, } /** -* +* * rct2: 0x006644DD */ money32 selection_raise_land(uint8 flags) @@ -2780,11 +2780,11 @@ static void window_top_toolbar_tool_drag(rct_window* w, int widgetIndex, int x, } /** - * + * * rct2: 0x0066CC5B */ static void window_top_toolbar_tool_up(rct_window* w, int widgetIndex, int x, int y) -{ +{ switch (widgetIndex) { case WIDX_LAND: map_invalidate_selection_rect(); @@ -2805,7 +2805,7 @@ static void window_top_toolbar_tool_up(rct_window* w, int widgetIndex, int x, in } /** - * + * * rct2: 0x0066CA58 */ static void window_top_toolbar_tool_abort(rct_window *w, int widgetIndex) diff --git a/src/windows/track_list.c b/src/windows/track_list.c index d5970907eb..fa9c2f1697 100644 --- a/src/windows/track_list.c +++ b/src/windows/track_list.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -514,7 +514,7 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi) } } } - + if (ride_type_has_flag(track_td6->type, RIDE_TYPE_FLAG_HAS_DROPS)) { // Drops drops = track_td6->drops & 0x3F; diff --git a/src/windows/track_manage.c b/src/windows/track_manage.c index eaa9c122b3..4b1ac29344 100644 --- a/src/windows/track_manage.c +++ b/src/windows/track_manage.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/windows/track_place.c b/src/windows/track_place.c index 4d61006534..9d73faee30 100644 --- a/src/windows/track_place.c +++ b/src/windows/track_place.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -166,7 +166,7 @@ static void window_track_place_draw_mini_preview() while (trackBlock->index != 255) { x = originX; y = originY; - + switch (rotation & 3) { case 0: x += trackBlock->x; @@ -310,7 +310,7 @@ static void window_track_place_clear_provisional() if (_window_track_place_last_was_valid) { sub_6D01B3( 6, - RCT2_GLOBAL(0x00F440EB, uint8), + RCT2_GLOBAL(0x00F440EB, uint8), _window_track_place_last_valid_x, _window_track_place_last_valid_y, _window_track_place_last_valid_z @@ -327,7 +327,7 @@ static int window_track_place_get_base_z(int x, int y) { rct_map_element *mapElement; int z; - + mapElement = map_get_surface_element_at(x >> 5, y >> 5); z = mapElement->base_height * 8; @@ -343,7 +343,7 @@ static int window_track_place_get_base_z(int x, int y) // Increase Z above water if (mapElement->properties.surface.terrain & 0x1F) z = max(z, (mapElement->properties.surface.terrain & 0x1F) << 4); - + return z + sub_6D01B3(3, 0, x, y, z); } @@ -486,7 +486,7 @@ static void window_track_place_toolupdate(rct_window* w, int widgetIndex, int x, mapZ = window_track_place_get_base_z(mapX, mapY); if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) == 0 || gConfigCheat.build_in_pause_mode) { window_track_place_clear_provisional(); - + // Try increasing Z until a feasible placement is found for (i = 0; i < 7; i++) { window_track_place_attempt_placement(mapX, mapY, mapZ, 105, &cost, &rideIndex); @@ -508,7 +508,7 @@ static void window_track_place_toolupdate(rct_window* w, int widgetIndex, int x, _window_track_place_last_cost = cost; widget_invalidate(w, WIDX_PRICE); } - + sub_6D01B3(0, 0, mapX, mapY, mapZ); } @@ -530,7 +530,7 @@ static void window_track_place_tooldown(rct_window* w, int widgetIndex, int x, i sub_68A15E(x, y, &mapX, &mapY, NULL, NULL); if (mapX == (short)0x8000) return; - + // Try increasing Z until a feasible placement is found mapZ = window_track_place_get_base_z(mapX, mapY); for (i = 0; i < 7; i++) { @@ -596,7 +596,7 @@ static void window_track_place_paint(rct_window *w, rct_drawpixelinfo *dpi) { rct_drawpixelinfo *clippedDpi; rct_g1_element tmpElement, *subsituteElement; - + window_draw_widgets(w, dpi); // Draw mini tile preview diff --git a/src/windows/viewport.c b/src/windows/viewport.c index 43803bef5b..166759a19a 100644 --- a/src/windows/viewport.c +++ b/src/windows/viewport.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -229,7 +229,7 @@ static void window_viewport_invalidate(rct_window *w) w->disabled_widgets |= 1 << WIDX_ZOOM_IN; if (viewport->zoom >= 3) w->disabled_widgets |= 1 << WIDX_ZOOM_OUT; - + viewport->x = w->x + viewportWidget->left; viewport->y = w->y + viewportWidget->top; viewport->width = viewportWidget->right - viewportWidget->left; diff --git a/src/windows/water.c b/src/windows/water.c index ea3de071c3..85ccc87f36 100644 --- a/src/windows/water.c +++ b/src/windows/water.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -91,7 +91,7 @@ static rct_window_event_list window_water_events = { }; /** - * + * * rct2: 0x006E6A40 */ void window_water_open() diff --git a/src/world/banner.c b/src/world/banner.c index 64b1bbeaeb..44521c90f2 100644 --- a/src/world/banner.c +++ b/src/world/banner.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/world/banner.h b/src/world/banner.h index 131fc1d9c4..7b836d0815 100644 --- a/src/world/banner.h +++ b/src/world/banner.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/world/climate.c b/src/world/climate.c index f65b22563b..dd1316d117 100644 --- a/src/world/climate.c +++ b/src/world/climate.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -43,9 +43,9 @@ typedef struct { // These still need to be read / written when loading and saving // int gClimateNextWeather; -// +// // static int _climateCurrentWeatherEffect; -// +// // static int _climateNextTemperature; // static int _climateNextWeatherEffect; // static int _climateNextWeatherGloom; @@ -103,7 +103,7 @@ void climate_reset(int climate) RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_WEATHER_EFFECT, sint8) = climate_weather_data[weather].effect_level; RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_WEATHER_GLOOM, sint8) = climate_weather_data[weather].gloom_level; RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RAIN_LEVEL, sint8) = climate_weather_data[weather].rain_level; - + _lightningTimer = 0; _thunderTimer = 0; if (_rainVolume != 1){ @@ -135,7 +135,7 @@ void toggle_climate_lock() /** * Weather & climate update iteration. * Gradually changes the weather parameters towards their determined next values. - * + * * rct2: 0x006C46B1 */ void climate_update() @@ -162,7 +162,7 @@ void climate_update() RCT2_GLOBAL(RCT2_ADDRESS_CLIMATE_UPDATE_TIMER, sint16)--; } else if (!(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TICKS, uint32) & 0x7F)) { - + if (temperature == target_temperature) { if (cur_gloom == next_gloom) { _climateCurrentWeatherEffect = _climateNextWeatherEffect; @@ -196,14 +196,14 @@ void climate_force_weather(uint8 weather){ RCT2_GLOBAL(RCT2_ADDRESS_CLIMATE_UPDATE_TIMER, sint16) = 1920; climate_update(); - + // Incase of change in gloom level force a complete redraw gfx_invalidate_screen(); } /** * Calculates future weather development. - * RCT2 implements this as discrete probability distributions dependant on month and climate + * RCT2 implements this as discrete probability distributions dependant on month and climate * for next_weather. The other weather parameters are then looked up depending only on the * next weather. * @@ -215,7 +215,7 @@ static void climate_determine_future_weather() const rct_weather_transition* climate_table = climate_transitions[climate]; sint8 month = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, sint16) & 7; rct_weather_transition transition = climate_table[month]; - + // Generate a random variable with values 0 upto distribution_size-1 and chose weather from the distribution table accordingly sint8 next_weather = transition.distribution[ ((scenario_rand() & 0xFF) * transition.distribution_size) >> 8 ]; gClimateNextWeather = next_weather; @@ -224,12 +224,12 @@ static void climate_determine_future_weather() _climateNextWeatherEffect = climate_weather_data[next_weather].effect_level; _climateNextWeatherGloom = climate_weather_data[next_weather].gloom_level; _climateNextRainLevel = climate_weather_data[next_weather].rain_level; - + RCT2_GLOBAL(RCT2_ADDRESS_CLIMATE_UPDATE_TIMER, sint16) = 1920; } /** - * + * * rct2: 0x006BCB91 */ void climate_update_sound() diff --git a/src/world/climate.h b/src/world/climate.h index 0ab10b5be3..7acf000483 100644 --- a/src/world/climate.h +++ b/src/world/climate.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/world/footpath.c b/src/world/footpath.c index bbf281036e..943981c9ea 100644 --- a/src/world/footpath.c +++ b/src/world/footpath.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -113,7 +113,7 @@ rct_map_element *map_get_footpath_element_slope(int x, int y, int z, int slope) return mapElement; } } while (!map_element_is_last_for_tile(mapElement++)); - + return NULL; } @@ -159,7 +159,7 @@ static money32 footpath_element_insert(int type, int x, int y, int z, int slope, RCT2_GLOBAL(0x00F3EF84, uint16) = x; RCT2_GLOBAL(0x00F3EF86, uint16) = y; - + // Ugh, hack until 0x006A6733 is written // 0x006A6733 expects the flags to be at (*0xF3EF7C) + 8 RCT2_GLOBAL(0x00F3EF7C, uint32) = (uint32)(&flags - 2); @@ -515,7 +515,7 @@ void game_command_place_footpath_from_track(int *eax, int *ebx, int *ecx, int *e (*edx >> 8) & 0xFF, *eax & 0xFFFF, *ecx & 0xFFFF, - *edx & 0xFF, + *edx & 0xFF, ((*ebx >> 13) & 0x3) | ((*ebx >> 10) & 0x4), (*ebx >> 8) & 0xF, *ebx & 0xFF @@ -542,7 +542,7 @@ void footpath_remove(int x, int y, int z, int flags) } /** - * + * * rct2: 0x006A76FF */ money32 footpath_provisional_set(int type, int x, int y, int z, int slope) @@ -565,7 +565,7 @@ money32 footpath_provisional_set(int type, int x, int y, int z, int slope) } /** - * + * * rct2: 0x006A77FF */ void footpath_provisional_remove() @@ -583,7 +583,7 @@ void footpath_provisional_remove() } /** - * + * * rct2: 0x006A7831 */ void footpath_provisional_update() @@ -686,7 +686,7 @@ void footpath_get_coordinates_from_pos(int screenX, int screenY, int *x, int *y, } /** - * + * * rct2: 0x0068A0C9 * screenX: eax * screenY: ebx @@ -719,7 +719,7 @@ void footpath_bridge_get_info_from_pos(int screenX, int screenY, int *x, int *y, return; } } - + get_map_coordinates_from_pos(screenX, screenY, VIEWPORT_INTERACTION_MASK_RIDE & VIEWPORT_INTERACTION_MASK_FOOTPATH & VIEWPORT_INTERACTION_MASK_TERRAIN, &map_pos.x, &map_pos.y, &interactionType, mapElement, &viewport); *x = map_pos.x; *y = map_pos.y; @@ -739,7 +739,7 @@ void footpath_bridge_get_info_from_pos(int screenX, int screenY, int *x, int *y, } /** - * + * * rct2: 0x00673883 */ void footpath_remove_litter(int x, int y, int z) @@ -765,7 +765,7 @@ void footpath_remove_litter(int x, int y, int z) } /** - * + * * rct2: 0x0069A48B */ void footpath_interrupt_peeps(int x, int y, int z) @@ -858,15 +858,15 @@ static rct_map_element *footpath_connect_corners_get_neighbour(int x, int y, int static void footpath_connect_corners(int initialX, int initialY, rct_map_element *initialMapElement) { rct_map_element *mapElement[4]; - + if (footpath_element_is_queue(initialMapElement)) return; if (footpath_element_is_sloped(initialMapElement)) return; - + mapElement[0] = initialMapElement; int z = initialMapElement->base_height; - for (int initialDirection = 0; initialDirection < 4; initialDirection++) { + for (int initialDirection = 0; initialDirection < 4; initialDirection++) { int x = initialX; int y = initialY; int direction = initialDirection; @@ -1070,7 +1070,7 @@ static bool footpath_is_queue_connected_to_path(int x, int y, rct_map_element *m } /** - * + * * rct2: 0x006A6D7E */ static void loc_6A6D7E( @@ -1225,7 +1225,7 @@ static void loc_6A6C85( } /** - * + * * rct2: 0x006A6C66 */ void footpath_connect_edges(int x, int y, rct_map_element *mapElement, int flags) @@ -1269,7 +1269,7 @@ void footpath_connect_edges(int x, int y, rct_map_element *mapElement, int flags } /** - * + * * rct2: 0x006A742F */ void footpath_chain_ride_queue(int rideIndex, int entranceIndex, int x, int y, rct_map_element *mapElement, int direction) @@ -1292,7 +1292,7 @@ void footpath_chain_ride_queue(int rideIndex, int entranceIndex, int x, int y, r } } } - + x += TileDirectionDelta[direction].x; y += TileDirectionDelta[direction].y; mapElement = map_get_first_element_at(x >> 5, y >> 5); @@ -1364,7 +1364,7 @@ void footpath_chain_ride_queue(int rideIndex, int entranceIndex, int x, int y, r } /** - * + * * rct2: 0x006A759F */ void sub_6A759F() diff --git a/src/world/footpath.h b/src/world/footpath.h index eb54b96584..23ecaac8f8 100644 --- a/src/world/footpath.h +++ b/src/world/footpath.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/world/fountain.c b/src/world/fountain.c index 7f4d1b738e..3c720c9474 100644 --- a/src/world/fountain.c +++ b/src/world/fountain.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -279,7 +279,7 @@ static void jumping_fountain_continue(rct_jumping_fountain *jumpingFountain) jumping_fountain_split(jumpingFountain, x, y, z, availableDirections); return; } - + jumping_fountain_random(jumpingFountain, x, y, z, availableDirections); } @@ -310,7 +310,7 @@ static bool is_jumping_fountain(int type, int x, int y, int z) return true; } while (!map_element_is_last_for_tile(mapElement++)); - + return false; } @@ -340,7 +340,7 @@ static void jumping_fountain_goto_edge(rct_jumping_fountain *jumpingFountain, in jumping_fountain_split(jumpingFountain, x, y, z, availableDirections); return; } - + direction = randomIndex & 7; while (!(availableDirections & (1 << direction))) direction = (direction + 1) & 7; diff --git a/src/world/fountain.h b/src/world/fountain.h index d7b63fe148..68f04449a6 100644 --- a/src/world/fountain.h +++ b/src/world/fountain.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/world/map.c b/src/world/map.c index 5b2b5bbcba..fe97d9e22c 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -163,7 +163,7 @@ void map_element_iterator_restart_for_tile(map_element_iterator *it) rct_map_element *map_get_first_element_at(int x, int y) { - if (x < 0 || y < 0 || x > 255 || y > 255) { + if (x < 0 || y < 0 || x > 255 || y > 255) { log_error("Trying to access element outside of range"); return NULL; } @@ -172,7 +172,7 @@ rct_map_element *map_get_first_element_at(int x, int y) void map_set_tile_elements(int x, int y, rct_map_element *elements) { - if (x < 0 || y < 0 || x > 255 || y > 255) { + if (x < 0 || y < 0 || x > 255 || y > 255) { log_error("Trying to access element outside of range"); return; } @@ -274,7 +274,7 @@ rct_map_element* map_get_path_element_at(int x, int y, int z){ return NULL; } /** - * + * * rct2: 0x0068AB4C */ void map_init(int size) @@ -315,7 +315,7 @@ void map_init(int size) } /** - * + * * rct2: 0x0068AFFD */ void map_update_tile_pointers() @@ -512,7 +512,7 @@ void sub_68B089() if (mapElement == mapElementFirst) return; - // + // TILE_MAP_ELEMENT_POINTER(i) = mapElement; do { *mapElement = *mapElementFirst; @@ -876,7 +876,7 @@ void game_command_remove_scenery(int* eax, int* ebx, int* ecx, int* edx, int* es uint8 scenery_type = *edx >> 8; uint8 map_element_type = *ebx >> 8; money32 cost; - + rct_scenery_entry *entry = g_smallSceneryEntries[scenery_type]; cost = entry->small_scenery.removal_price * 10; @@ -944,7 +944,7 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Y, uint16) = y + 16; RCT2_GLOBAL(RCT2_ADDRESS_COMMAND_MAP_Z, uint16) = z; RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4; - + if (!(*ebx & 0x40) && RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0 && !gConfigCheat.build_in_pause_mode) { RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED; *ebx = MONEY32_UNDEFINED; @@ -969,7 +969,7 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i // If we are removing ghost elements if((*ebx & 0x40) && !(map_element->flags & MAP_ELEMENT_FLAG_GHOST)) continue; - + element_found = 1; break; } while (!map_element_is_last_for_tile(map_element++)); @@ -980,11 +980,11 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i } map_element_remove_banner_entry(map_element); - + int ecx2 = map_element->properties.scenerymultiple.type >> 10; rct_scenery_entry* scenery_entry = g_largeSceneryEntries[map_element->properties.scenerymultiple.type & 0x3FF]; - rct_xyz16 firstTile = { - .x = scenery_entry->large_scenery.tiles[ecx2].x_offset, + rct_xyz16 firstTile = { + .x = scenery_entry->large_scenery.tiles[ecx2].x_offset, .y = scenery_entry->large_scenery.tiles[ecx2].y_offset, .z = (base_height * 8) - scenery_entry->large_scenery.tiles[ecx2].z_offset }; @@ -1018,7 +1018,7 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i // If not applying then no need to delete the actual element if (!(*ebx & GAME_COMMAND_FLAG_APPLY)) continue; - + rct_map_element* sceneryElement = map_get_first_element_at(currentTile.x / 32, currentTile.y / 32); uint8 tile_not_found = 1; do @@ -1151,7 +1151,7 @@ void game_command_set_scenery_colour(int* eax, int* ebx, int* ecx, int* edx, int map_element->properties.scenery.colour_2 |= color2; map_invalidate_tile_full(x, y); } - + *ebx = 0; } @@ -1319,7 +1319,7 @@ void game_command_set_large_scenery_colour(int* eax, int* ebx, int* ecx, int* ed map_element->properties.scenerymultiple.colour[1] |= color2; map_invalidate_tile_full(x3, y3); } - + i++; } *ebx = 0; @@ -1366,7 +1366,7 @@ void game_command_set_banner_colour(int* eax, int* ebx, int* ecx, int* edx, int* gBanners[map_element->properties.banner.index].colour = color; map_invalidate_tile_zoom1(x, y, z, z + 32); } - + *ebx = 0; } @@ -1562,7 +1562,7 @@ money32 map_change_surface_style(int x0, int y0, int x1, int y1, uint8 surfaceSt if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) { if (!map_is_location_in_park(x, y)) continue; } - + rct_map_element* mapElement = map_get_surface_element_at(x / 32, y / 32); if (surfaceStyle != 0xFF){ @@ -1609,7 +1609,7 @@ money32 map_change_surface_style(int x0, int y0, int x1, int y1, uint8 surfaceSt } } } - + if (flags & 1) { if (!(mapElement->properties.surface.terrain & MAP_ELEMENT_SURFACE_TERRAIN_MASK)) { if (!(mapElement->type & MAP_ELEMENT_DIRECTION_MASK)) { @@ -1807,7 +1807,7 @@ money32 raise_land(int flags, int x, int y, int z, int ax, int ay, int bx, int b money32 tileCost = map_set_land_height(flags, xi, yi, height, newStyle, selectionType); if (tileCost == MONEY32_UNDEFINED) return MONEY32_UNDEFINED; - + cost += tileCost; } } @@ -1871,7 +1871,7 @@ money32 lower_land(int flags, int x, int y, int z, int ax, int ay, int bx, int b money32 tileCost = map_set_land_height(flags, xi, yi, height, newStyle, selectionType); if (tileCost == MONEY32_UNDEFINED) return MONEY32_UNDEFINED; - + cost += tileCost; } } @@ -1923,11 +1923,11 @@ money32 raise_water(sint16 x0, sint16 y0, sint16 x1, sint16 y1, uint8 flags) } else { height = map_element->base_height + 2; } - + money32 tileCost = game_do_command(xi, flags, yi, (max_height << 8) + height, GAME_COMMAND_SET_WATER_HEIGHT, 0, 0); if (tileCost == MONEY32_UNDEFINED) return MONEY32_UNDEFINED; - + cost += tileCost; } } @@ -2396,10 +2396,10 @@ void game_command_raise_water(int* eax, int* ebx, int* ecx, int* edx, int* esi, void game_command_lower_water(int* eax, int* ebx, int* ecx, int* edx, int* esi, int* edi, int* ebp) { *ebx = lower_water( - (sint16)(*eax & 0xFFFF), - (sint16)(*ecx & 0xFFFF), - (sint16)(*edi & 0xFFFF), - (sint16)(*ebp & 0xFFFF), + (sint16)(*eax & 0xFFFF), + (sint16)(*ecx & 0xFFFF), + (sint16)(*edi & 0xFFFF), + (sint16)(*ebp & 0xFFFF), (uint8)*ebx ); } @@ -2427,7 +2427,7 @@ void game_command_set_water_height(int* eax, int* ebx, int* ecx, int* edx, int* *ebx = MONEY32_UNDEFINED; return; } - + if(base_height < 2){ RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TOO_LOW; *ebx = MONEY32_UNDEFINED; @@ -2843,7 +2843,7 @@ static bool map_place_fence_check_obstruction_with_track(rct_scenery_entry *wall } } } - + if (!(wall->wall.flags & WALL_SCENERY_FLAG5)) { return false; } @@ -3025,7 +3025,7 @@ void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi, if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !(flags & (1 << 7)) && !gCheatsSandboxMode){ - + if (position.z == 0){ if (!map_is_location_in_park(position.x, position.y)){ *ebx = MONEY32_UNDEFINED; @@ -3252,7 +3252,7 @@ void game_command_place_large_scenery(int* eax, int* ebx, int* ecx, int* edx, in RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_LANDSCAPING * 4; int x = (sint16)*eax; int y = (sint16)*ecx; - int z = (sint16)*ebp; + int z = (sint16)*ebp; uint8 color1 = *edx; uint8 color2 = *edx >> 8; uint8 flags = *ebx; @@ -3289,7 +3289,7 @@ void game_command_place_large_scenery(int* eax, int* ebx, int* ecx, int* edx, in } } rct_large_scenery_tile* tile = scenery_entry->large_scenery.tiles; - sint16 F43884 = 0xFFFF; + sint16 F43884 = 0xFFFF; do{ if(tile->x_offset == (sint16)0xFFFF){ break; @@ -3783,7 +3783,7 @@ int map_can_construct_with_clear_at(int x, int y, int zLow, int zHigh, void *cle RCT2_GLOBAL(RCT2_ADDRESS_ELEMENT_LOCATION_COMPARED_TO_GROUND_AND_WATER, uint8) = 1; if (x >= RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16) || y >= RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16) || x < 32 || y < 32) { RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, rct_string_id) = STR_OFF_EDGE_OF_MAP; - return false; + return false; } rct_map_element* map_element = map_get_first_element_at(x / 32, y / 32); do { @@ -3844,9 +3844,9 @@ int map_can_construct_with_clear_at(int x, int y, int zLow, int zHigh, void *cle ch += 2; } int bh = zLow + 4; - if ((!(bl & 1) || (bl & 0x10 || zLow >= al) && bh >= al) && + if ((!(bl & 1) || (bl & 0x10 || zLow >= al) && bh >= al) && (!(bl & 2) || (bl & 0x20 || zLow >= ah) && bh >= ah) && - (!(bl & 4) || (bl & 0x40 || zLow >= cl) && bh >= cl) && + (!(bl & 4) || (bl & 0x40 || zLow >= cl) && bh >= cl) && (!(bl & 8) || (bl & 0x80 || zLow >= ch) && bh >= ch)) { continue; } @@ -3888,7 +3888,7 @@ int map_can_construct_at(int x, int y, int zLow, int zHigh, uint8 bl) } /** - * + * * rct2: 0x006E5935 */ void map_remove_intersecting_walls(int x, int y, int z0, int z1, int direction) @@ -4099,7 +4099,7 @@ void map_extend_boundary_surface() for (x = 0; x < 256; x++) { existingMapElement = map_get_surface_element_at(x, y - 1); newMapElement = map_get_surface_element_at(x, y); - + newMapElement->type = (newMapElement->type & 0x7C) | (existingMapElement->type & 0x83); newMapElement->properties.surface.slope = existingMapElement->properties.surface.slope & 0xE0; newMapElement->properties.surface.terrain = existingMapElement->properties.surface.terrain; @@ -4133,7 +4133,7 @@ void map_extend_boundary_surface() for (y = 0; y < 256; y++) { existingMapElement = map_get_surface_element_at(x - 1, y); newMapElement = map_get_surface_element_at(x, y); - + newMapElement->type = (newMapElement->type & 0x7C) | (existingMapElement->type & 0x83); newMapElement->properties.surface.slope = existingMapElement->properties.surface.slope & 0xE0; newMapElement->properties.surface.terrain = existingMapElement->properties.surface.terrain; @@ -4232,7 +4232,7 @@ static void sub_68AE2A(int x, int y) map_element_remove(mapElement); break; } - } + } } int map_get_highest_z(int tileX, int tileY) @@ -4311,7 +4311,7 @@ bool map_large_scenery_get_origin( } /** - * + * * rct2: 0x006B9B05 */ void sign_set_colour(int x, int y, int z, int direction, int sequence, uint8 mainColour, uint8 textColour) @@ -4361,7 +4361,7 @@ void sign_set_colour(int x, int y, int z, int direction, int sequence, uint8 mai } /** - * + * * rct2: 0x006E588E */ void map_remove_walls_at(int x, int y, int z0, int z1) @@ -4388,7 +4388,7 @@ repeat: } /** - * + * * rct2: 0x006E57E6 */ void map_remove_walls_at_z(int x, int y, int z) diff --git a/src/world/map.h b/src/world/map.h index 60d41f67bb..dad1e48030 100644 --- a/src/world/map.h +++ b/src/world/map.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/world/map_animation.c b/src/world/map_animation.c index 2d3241d20f..b68a6a9e52 100644 --- a/src/world/map_animation.c +++ b/src/world/map_animation.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -36,7 +36,7 @@ static const map_animation_invalidate_event_handler _animatedObjectEventHandlers rct_map_animation *gAnimatedObjects = (rct_map_animation*)0x013886A0; /** - * + * * rct2: 0x0068AF67 * * @param type (dh) @@ -404,7 +404,7 @@ static bool map_animation_invalidate_banner(int x, int y, int baseZ) continue; if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_BANNER) continue; - + baseZ = mapElement->base_height * 8; map_invalidate_tile_zoom1(x, y, baseZ, baseZ + 16); return false; diff --git a/src/world/map_animation.h b/src/world/map_animation.h index ce749b6110..2bf35cd1c5 100644 --- a/src/world/map_animation.h +++ b/src/world/map_animation.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/world/map_helpers.c b/src/world/map_helpers.c index be2644ecaf..773def8cb9 100644 --- a/src/world/map_helpers.c +++ b/src/world/map_helpers.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -61,8 +61,8 @@ int map_smooth(int l, int t, int r, int b) if (cornerHeights[i] == highest){ count++; - // Check if surrounding corners aren't too high. The current tile - // can't compensate for all the height differences anymore if it has + // Check if surrounding corners aren't too high. The current tile + // can't compensate for all the height differences anymore if it has // the extra height slope. int highestOnLowestSide; switch (i){ @@ -297,14 +297,14 @@ int map_smooth_wavy(int l, int t, int r, int b) map_get_corner_height(x + 0, y + 1, 3) > mapElement->base_height ) mapElement->properties.surface.slope |= 8; - + if ( map_get_corner_height(x + 1, y - 1, 1) > mapElement->base_height || map_get_corner_height(x + 1, y + 0, 3) > mapElement->base_height || map_get_corner_height(x + 0, y - 1, 0) > mapElement->base_height ) mapElement->properties.surface.slope |= 2; - + if ( map_get_corner_height(x - 1, y - 1, 0) > mapElement->base_height || map_get_corner_height(x - 1, y + 0, 2) > mapElement->base_height || diff --git a/src/world/map_helpers.h b/src/world/map_helpers.h index 423bb4c25e..3a2dffa630 100644 --- a/src/world/map_helpers.h +++ b/src/world/map_helpers.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/world/mapgen.c b/src/world/mapgen.c index 5bdfb4eeb3..6d89306220 100644 --- a/src/world/mapgen.c +++ b/src/world/mapgen.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -352,7 +352,7 @@ static void mapgen_place_trees() case TERRAIN_ICE: if (numSnowTreeIds == 0) break; - + type = snowTreeIds[rand() % numSnowTreeIds]; break; } @@ -620,7 +620,7 @@ static void mapgen_set_height() uint8 q11 = get_height(heightX + 1, heightY + 1); uint8 baseHeight = (q00 + q01 + q10 + q11) / 4; - + mapElement = map_get_surface_element_at(x, y); mapElement->base_height = max(2, baseHeight * 2); mapElement->clearance_height = mapElement->base_height; diff --git a/src/world/mapgen.h b/src/world/mapgen.h index ed6fd47450..fd83f9e3e8 100644 --- a/src/world/mapgen.h +++ b/src/world/mapgen.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/world/park.c b/src/world/park.c index 267061dac9..fa1310ac74 100644 --- a/src/world/park.c +++ b/src/world/park.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -60,7 +60,7 @@ int park_is_open() } /** - * + * * rct2: 0x00667132 */ void park_init() @@ -120,7 +120,7 @@ void park_init() } /** - * + * * rct2: 0x0066729F */ void park_reset_history() @@ -132,7 +132,7 @@ void park_reset_history() } /** - * + * * rct2: 0x0066A348 */ int park_calculate_size() @@ -154,12 +154,12 @@ int park_calculate_size() RCT2_GLOBAL(RCT2_ADDRESS_PARK_SIZE, uint16) = tiles; window_invalidate_by_class(WC_PARK_INFORMATION); } - + return tiles; } /** - * + * * rct2: 0x00669EAA */ int calculate_park_rating() @@ -172,14 +172,14 @@ int calculate_park_rating() result = 1150; if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_DIFFICULT_PARK_RATING) result = 1050; - + // Guests { rct_peep* peep; uint16 spriteIndex; int num_happy_peeps; int num_lost_guests; - + // -150 to +3 based on a range of guests from 0 to 2000 result -= 150 - (min(2000, RCT2_GLOBAL(RCT2_ADDRESS_GUESTS_IN_PARK, uint16)) / 13); @@ -194,7 +194,7 @@ int calculate_park_rating() if ((peep->flags & PEEP_FLAGS_LEAVING_PARK) && (peep->peep_is_lost_countdown < 90)) num_lost_guests++; } - + // Peep happiness -500 to +0 result -= 500; @@ -270,7 +270,7 @@ int calculate_park_rating() } result -= 600 - (4 * (150 - min(150, num_litter))); } - + result -= RCT2_GLOBAL(0x0135882E, sint16); result = clamp(0, result, 999); return result; @@ -293,7 +293,7 @@ money32 calculate_ride_value(rct_ride *ride) } /** - * + * * rct2: 0x0066A3F6 */ money32 calculate_park_value() @@ -476,7 +476,7 @@ static rct_peep *park_generate_new_guest() peep = peep_generate(spawn.x, spawn.y, spawn.z * 16); if (peep != NULL) { peep->sprite_direction = spawn.direction << 3; - + // Get the centre point of the tile the peep is on peep->destination_x = (peep->x & 0xFFE0) + 16; peep->destination_y = (peep->y & 0xFFE0) + 16; @@ -722,7 +722,7 @@ void update_park_fences(int x, int y) return; if (y > 0x1FFF) return; - + rct_map_element* sufaceElement = map_get_surface_element_at(x / 32, y / 32); if (sufaceElement == NULL)return; @@ -735,7 +735,7 @@ void update_park_fences(int x, int y) do { if (map_element_get_type(mapElement) != MAP_ELEMENT_TYPE_ENTRANCE) continue; - + if (mapElement->properties.entrance.type != ENTRANCE_TYPE_PARK_ENTRANCE) continue; @@ -772,7 +772,7 @@ void update_park_fences(int x, int y) if (sufaceElement->properties.surface.ownership != newOwnership) { int z0 = sufaceElement->base_height * 8; int z1 = z0 + 16; - map_invalidate_tile(x, y, z0, z1); + map_invalidate_tile(x, y, z0, z1); sufaceElement->properties.surface.ownership = newOwnership; } } @@ -926,7 +926,7 @@ money32 map_buy_land_rights_for_tile(int x, int y, int setting, int flags) { if ((surfaceElement->properties.surface.ownership & OWNERSHIP_OWNED) != 0) { // If the land is already owned return 0; } - + if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) != 0 || (surfaceElement->properties.surface.ownership & OWNERSHIP_AVAILABLE) == 0) { RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = 1726; // Land not for sale! return MONEY32_UNDEFINED; @@ -954,12 +954,12 @@ money32 map_buy_land_rights_for_tile(int x, int y, int setting, int flags) { if ((surfaceElement->properties.surface.ownership & (OWNERSHIP_OWNED | OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED)) != 0) { // If the land or construction rights are already owned return 0; } - + if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) != 0 || (surfaceElement->properties.surface.ownership & OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE) == 0) { RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = 1727; // Construction rights not for sale! return MONEY32_UNDEFINED; } - + if (flags & GAME_COMMAND_FLAG_APPLY) { surfaceElement->properties.surface.ownership |= OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED; uint16 baseHeight = surfaceElement->base_height * 8; @@ -1122,7 +1122,7 @@ void park_remove_ghost_entrance() } /** - * + * * rct2: 0x00666F4E */ money32 park_place_ghost_entrance(int x, int y, int z, int direction) diff --git a/src/world/park.h b/src/world/park.h index 349bf96c6c..5f24a295e4 100644 --- a/src/world/park.h +++ b/src/world/park.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/src/world/scenery.c b/src/world/scenery.c index 5075173d7f..9974593d96 100644 --- a/src/world/scenery.c +++ b/src/world/scenery.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -94,7 +94,7 @@ void scenery_update_age(int x, int y, rct_map_element *mapElement) break; } } - + // Reset age / water plant mapElement->properties.scenery.age = 0; map_invalidate_tile_zoom1(x, y, mapElement->base_height * 8, mapElement->clearance_height * 8); @@ -125,12 +125,12 @@ void scenery_remove_ghost_tool_placement(){ if (RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) & (1 << 0)){ RCT2_GLOBAL(RCT2_ADDRESS_GHOST_SCENERY_TYPE, uint8) &= ~(1 << 0); game_do_command( - x, + x, 105 | (RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_MAP_ELEMENT_TYPE, uint8) << 8), - y, + y, z | (RCT2_GLOBAL(RCT2_ADDRESS_SCENERY_SELECTED_OBJECT, uint8) << 8), GAME_COMMAND_REMOVE_SCENERY, - 0, + 0, 0); } diff --git a/src/world/scenery.h b/src/world/scenery.h index 5a724d67d8..2dc30ba3e9 100644 --- a/src/world/scenery.h +++ b/src/world/scenery.h @@ -92,7 +92,7 @@ typedef struct { uint8 flags2; // 0x09 sint16 price; // 0x0A uint8 scenery_tab_id; // 0x0C - uint8 var_0D; + uint8 var_0D; } rct_wall_scenery_entry; typedef enum { @@ -164,7 +164,7 @@ enum { #define g_wallSceneryEntries ((rct_scenery_entry**)object_entry_groups[OBJECT_TYPE_WALLS].chunks) #define g_bannerSceneryEntries ((rct_scenery_entry**)object_entry_groups[OBJECT_TYPE_BANNERS].chunks) -// Often 0x009ADA50 is used for pathBits this is 1 entry before g_pathBitSceneryEntries and is used +// Often 0x009ADA50 is used for pathBits this is 1 entry before g_pathBitSceneryEntries and is used // because 0 represents no path bits on a path. So remember to remove 1 when using it for 0x009ADA50 #define g_pathBitSceneryEntries ((rct_scenery_entry**)object_entry_groups[OBJECT_TYPE_PATH_BITS].chunks) #define g_scenerySetEntries ((rct_scenery_set_entry**)object_entry_groups[OBJECT_TYPE_SCENERY_SETS].chunks) diff --git a/src/world/sprite.c b/src/world/sprite.c index 507452b870..65d7c8c5c1 100644 --- a/src/world/sprite.c +++ b/src/world/sprite.c @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ @@ -156,7 +156,7 @@ void sprite_clear_all_unused() { rct_unk_sprite *sprite; uint16 spriteIndex, nextSpriteIndex, previousSpriteIndex; - + spriteIndex = RCT2_GLOBAL(RCT2_ADDRESS_SPRITES_NEXT_INDEX, uint16); while (spriteIndex != SPRITE_INDEX_NULL) { sprite = &g_sprite_list[spriteIndex].unknown; @@ -219,7 +219,7 @@ rct_sprite *create_sprite(uint8 bl) /* * rct2: 0x0069ED0B * This function moves a sprite to the specified sprite linked list. -* There are 5/6 of those, and cl specifies a pointer offset +* There are 5/6 of those, and cl specifies a pointer offset * of the desired linked list in a uint16 array. Known valid values are * 2, 4, 6, 8 or 10 (SPRITE_LINKEDLIST_OFFSET_...) */ @@ -231,7 +231,7 @@ void move_sprite_to_list(rct_sprite *sprite, uint8 cl) if (unkSprite->linked_list_type_offset == cl) return; - // If the sprite is currently the head of the list, the + // If the sprite is currently the head of the list, the // sprite following this one becomes the new head of the list. if (unkSprite->previous == SPRITE_INDEX_NULL) { diff --git a/src/world/sprite.h b/src/world/sprite.h index aac3084c94..89fdb512d2 100644 --- a/src/world/sprite.h +++ b/src/world/sprite.h @@ -8,12 +8,12 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * You should have received a copy of the GNU General Public License * along with this program. If not, see . *****************************************************************************/ diff --git a/test/tests.c b/test/tests.c index 487306343d..6963f14517 100644 --- a/test/tests.c +++ b/test/tests.c @@ -41,7 +41,7 @@ int cmdline_for_test(const char **argv, int argc) CuSuite* new_suite(void) { CuSuite* suite = CuSuiteNew(); - + // Test Finance SUITE_ADD_TEST(suite, test_finance_setup); SUITE_ADD_TEST(suite, test_finance_loan_increase);