From d1b806c20cd7377ee391b1de3fdfd5fef4c3c9c9 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Wed, 17 Jun 2015 11:52:46 +0100 Subject: [PATCH 01/18] fix #1370 --- src/ride/ride_ratings.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ride/ride_ratings.c b/src/ride/ride_ratings.c index dfe0f87721..ed26aac9d2 100644 --- a/src/ride/ride_ratings.c +++ b/src/ride/ride_ratings.c @@ -924,8 +924,8 @@ static int ride_ratings_get_scenery_score(rct_ride *ride) // Count surrounding scenery items numSceneryItems = 0; - for (yy = max(y - 5, 0); yy <= y + 5; yy++) { - for (xx = max(x - 5, 0); xx <= x + 5; xx++) { + for (yy = max(y - 5, 0); yy <= min(y + 5, 255); yy++) { + for (xx = max(x - 5, 0); xx <= min(x + 5, 255); xx++) { // Count scenery items on this tile mapElement = map_get_first_element_at(xx, yy); do { From b39fa10f4f54a3fb6d5751ff9e736c28fdd06f3c Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Wed, 17 Jun 2015 13:08:24 +0200 Subject: [PATCH 02/18] Update changelog, eliminate duplicates, reorder --- distribution/changelog.txt | 66 +++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 04e303f884..57f5dd0baa 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,43 +1,43 @@ 0.0.2-beta (2015-05-22) ------------------------------------------------------------------------ -- Feature: Show month before day (e.g. March 14th, year 15) -- Feature: Change available object in-game (only available from console) -- Feature: Exit OpenRCT2 to desktop -- Feature: Allow testing of incomplete tracks -- Feature: Twitch integration -- Feature: Hardware display (useful for streaming) +- Feature: Ability to change game speed (+ and - keys) +- Feature: Ability to change language while in game. - Feature: Allow both types of powered launch (with and without passing the station) for every roller coaster that supported one type in RCT2. -- Feature: Localisation of decimal and thousands separators. -- Feature: Increase limits for maximum of circuits per roller coaster (20) and people on mazes (64) (up from the old limits of 7 and 16, respectively). -- Feature: Game speed button on toolbar. -- Feature: In-game console. -- Feature: New title screen logo. +- Feature: Allow testing of incomplete tracks +- Feature: Autosaving +- Feature: Buy land and construction rights land tool window. (Currently only in-game). +- Feature: Changeable colour schemes. (Presets for RCT1 and RCT2 are included by default) +- Feature: Change available objects in-game (only available from console) +- Feature: Change research settings in-game (only available from console) +- Feature: Cheats for almost every guest aspect (happiness, hunger, nausea tolerance, etc.) +- Feature: Cheats window (Ctrl-Alt-C) or by toolbar button (configurable). +- Feature: Cheat to allow maximum operating settings and lift hill speeds (410 km/h). - Feature: Cheat to disable all breakdowns. - Feature: Cheat to disable brakes failure. -- Feature: Cheat to allow maximum operating settings and lift hill speeds (410 km/h). -- Feature: Buy land and construction rights land tool window. (Currently only in-game). - Feature: Cheat to fix all rides. -- Feature: Toggle RCT1 / RCT2 colour scheme. -- Feature: Toggle between software and hardware video mode. -- Feature: Toggle between window and fullscreen. -- Feature: Resizable window mode. -- Feature: Mountain tool available in play mode. -- Feature: Land tool size can now be increased to 64x64. -- Feature: Place scenery as a random cluster available in play mode. -- Feature: Park window viewport is resizable. +- Feature: Exit OpenRCT2 to desktop - Feature: Extra viewport windows. -- Feature: Windows now snap to the borders of other windows when dragging (snap radius configurable). -- Feature: Text input is now an in game window. -- Feature: Cheats window (CTRL-ALT-C) or by toolbar button (configurable). -- Feature: Improved settings window with tab interface. -- Feature: Ability to change language while in game. -- Feature: Game configuration, cache, scores and screenshots now saved in user documents directory under OpenRCT2. - Feature: Finance window accessible from toolbar (enabled in settings). -- Feature: Research and development / research funding now accessible as a stand alone window without the requirement of the finances window. -- Feature: Ability to change game speed (+ and - keys) -- Feature: The "have fun" objective can now be selected in the scenario editor. -- Feature: RollerCoaster Tycoon 1 scenarios can now be opened in the scenario editor or by using the 'edit' command line action. -- Feature: Title sequence music can now be disabled or changed to the RollerCoaster Tycoon 1 theme music. +- Feature: Game configuration, cache, scores and screenshots now saved in user documents directory under OpenRCT2. +- Feature: Game speed button on toolbar. +- Feature: Improved settings window with tab interface. +- Feature: Increased limits for maximum of circuits per roller coaster to 20 and people on mazes to 64 +- Feature: In-game console. +- Feature: Land, water and ownership tool sizes can now be increased to 64x64. +- Feature: Mountain tool available in play mode. +- Feature: New title screen logo. +- Feature: New title sequence (RCT2 version also still available) +- Feature: Park window viewport is resizable. +- Feature: Place scenery as a random cluster available in play mode. - Feature: (Random) map generator available in scenario editor, accessible via the view menu. -- Feature: Looping RollerCoaster now supports both "Powered launch (passing station)" and "Powered launch (without passing station)" +- Feature: Research and development / research funding now accessible as a stand alone window without the requirement of the finances window. +- Feature: RollerCoaster Tycoon 1 scenarios can now be opened in the scenario editor or by using the 'edit' command line action. +- Feature: Show month before day (e.g. March 14th, year 15) +- Feature: The "have fun" objective can now be selected in the scenario editor. +- Feature: Title sequence music can now be disabled or changed to the RollerCoaster Tycoon 1 theme music. +- Feature: Text input is now an in-game window. +- Feature: Toggle between software and hardware video mode. +- Feature: Toggle between resizeable window and fullscreen. +- Feature: Twitch integration +- Feature: Windows now snap to the borders of other windows when dragging (snap radius configurable). - Fix: Litter bins now get full and require emptying by handymen. From 542eb057d927ed365cf7d9100fa1e93fb9cf86b8 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Wed, 17 Jun 2015 16:21:50 +0100 Subject: [PATCH 03/18] set font when drawing checkboxes, extracted draw string left centred to new method --- src/drawing/drawing.h | 1 + src/drawing/string.c | 16 +++++++++++++++- src/interface/widget.c | 6 +----- src/windows/options.c | 2 ++ 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/drawing/drawing.h b/src/drawing/drawing.h index 77691ec193..dc231df1e7 100644 --- a/src/drawing/drawing.h +++ b/src/drawing/drawing.h @@ -110,6 +110,7 @@ void gfx_draw_string_left(rct_drawpixelinfo *dpi, int format, void *args, int co void gfx_draw_string_left_clipped(rct_drawpixelinfo *dpi, int format, void *args, int colour, int x, int y, int width); int gfx_draw_string_left_wrapped(rct_drawpixelinfo *dpi, void *args, int x, int y, int width, int format, int colour); void draw_string_left_underline(rct_drawpixelinfo *dpi, int format, void *args, int colour, int x, int y); +void gfx_draw_string_left_centred(rct_drawpixelinfo *dpi, rct_string_id format, void *args, int colour, int x, int y); void gfx_draw_string_centred(rct_drawpixelinfo *dpi, int format, int x, int y, int colour, void *args); void gfx_draw_string_centred_clipped(rct_drawpixelinfo *dpi, int format, void *args, int colour, int x, int y, int width); void draw_string_centred_underline(rct_drawpixelinfo *dpi, int format, void *args, int colour, int x, int y); diff --git a/src/drawing/string.c b/src/drawing/string.c index e11aac06a6..2de4468b78 100644 --- a/src/drawing/string.c +++ b/src/drawing/string.c @@ -707,10 +707,24 @@ void gfx_draw_string_left(rct_drawpixelinfo *dpi, int format, void *args, int co buffer = RCT2_ADDRESS(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, char); format_string(buffer, format, args); - RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_FONT_SPRITE_BASE, uint16) = 0xE0; + RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_FONT_SPRITE_BASE, uint16) = 224; gfx_draw_string(dpi, buffer, colour, x, y); } +/** + * Draws text that is left aligned and vertically centred. + */ +void gfx_draw_string_left_centred(rct_drawpixelinfo *dpi, rct_string_id format, void *args, int colour, int x, int y) +{ + char* buffer; + + RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_FONT_SPRITE_BASE, uint16) = 224; + buffer = (char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER; + format_string(buffer, format, args); + int height = string_get_height_raw(buffer); + gfx_draw_string(dpi, buffer, colour, x, y - (height / 2)); +} + /** * Changes the palette so that the next character changes colour */ diff --git a/src/interface/widget.c b/src/interface/widget.c index 04bc1d3ed2..02ddf9ad14 100644 --- a/src/interface/widget.c +++ b/src/interface/widget.c @@ -766,11 +766,7 @@ static void widget_checkbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg colour |= 0x40; } - // TODO extract this to a string method and maybe a draw vertically centred - char *buffer = (char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER; - format_string(buffer, (rct_string_id)widget->image, (void*)0x013CE952); - int height = string_get_height_raw(buffer); - gfx_draw_string(dpi, buffer, colour, l + 14, yMid - (height / 2)); + gfx_draw_string_left_centred(dpi, (rct_string_id)widget->image, (void*)0x013CE952, colour, l + 14, yMid); } /** diff --git a/src/windows/options.c b/src/windows/options.c index fb46b70615..a618b7442b 100644 --- a/src/windows/options.c +++ b/src/windows/options.c @@ -1222,6 +1222,8 @@ static void window_options_paint() break; case WINDOW_OPTIONS_PAGE_CULTURE: gfx_draw_string_left(dpi, 2776, w, w->colours[1], w->x + 10, w->y + window_options_culture_widgets[WIDX_LANGUAGE].top + 1); + + RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_FONT_SPRITE_BASE, uint16) = 224; gfx_draw_string( dpi, (char*)language_names[gCurrentLanguage], From 4ebf6dd913f35c2b9fbe08924c805df97e7e21da Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Wed, 17 Jun 2015 16:32:50 +0100 Subject: [PATCH 04/18] fix #1374 --- src/world/map.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/world/map.c b/src/world/map.c index 900ae61b43..d3ee3724ed 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -2531,10 +2531,7 @@ int sub_6BA278(int ebx) */ void map_remove_intersecting_walls(int x, int y, int z0, int z1, int direction) { - int bannerIndex; - rct_banner *banner; rct_map_element *mapElement; - rct_scenery_entry *sceneryEntry; mapElement = map_get_first_element_at(x >> 5, y >> 5); do { @@ -2547,20 +2544,10 @@ void map_remove_intersecting_walls(int x, int y, int z0, int z1, int direction) if (direction != (mapElement->type & 3)) continue; - sceneryEntry = g_wallSceneryEntries[mapElement->properties.fence.type]; - if (sceneryEntry->wall.var_0D != 255) { - bannerIndex = mapElement->properties.fence.item[0]; - banner = &gBanners[bannerIndex]; - if (banner->type != BANNER_NULL) { - window_close_by_number(WC_BANNER, bannerIndex); - banner->type = BANNER_NULL; - user_string_free(banner->string_idx); - } - } - + map_element_remove_banner_entry(mapElement); map_invalidate_tile(x, y, mapElement->base_height * 8, mapElement->base_height * 8 + 72); map_element_remove(mapElement); - mapElement -= 1; + mapElement--; } while (!map_element_is_last_for_tile(mapElement++)); } @@ -2687,7 +2674,7 @@ int map_element_get_banner_index(rct_map_element *mapElement) return (mapElement->type & MAP_ELEMENT_QUADRANT_MASK) | - ((mapElement->properties.scenerymultiple.colour[0] & 0xE0) >> 2); + ((mapElement->properties.scenerymultiple.colour[0] & 0xE0) >> 2) | ((mapElement->properties.scenerymultiple.colour[1] & 0xE0) >> 5); case MAP_ELEMENT_TYPE_FENCE: sceneryEntry = g_wallSceneryEntries[mapElement->properties.fence.type]; From dff788d1d8438a3a188b9b09ffdff30bc0b7b0cb Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Wed, 17 Jun 2015 16:39:09 +0100 Subject: [PATCH 05/18] fix peep.c sign issues --- src/peep/peep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/peep/peep.c b/src/peep/peep.c index 0f6a976b9a..eac001cd5d 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -4381,7 +4381,7 @@ void peep_problem_warnings_update() break; case PEEP_THOUGHT_TYPE_HUNGRY: // 0x14 - if (peep->guest_heading_to_ride_id == -1){ + if (peep->guest_heading_to_ride_id == 0xFF){ hunger_counter++; break; } @@ -4391,7 +4391,7 @@ void peep_problem_warnings_update() break; case PEEP_THOUGHT_TYPE_THIRSTY: - if (peep->guest_heading_to_ride_id == -1){ + if (peep->guest_heading_to_ride_id == 0xFF){ thirst_counter++; break; } @@ -4401,7 +4401,7 @@ void peep_problem_warnings_update() break; case PEEP_THOUGHT_TYPE_BATHROOM: - if (peep->guest_heading_to_ride_id == -1){ + if (peep->guest_heading_to_ride_id == 0xFF){ bathroom_counter++; break; } From 87c7a31fa42f5c86a367d6c7d1f6f7e749d5a832 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Wed, 17 Jun 2015 22:13:23 +0100 Subject: [PATCH 06/18] fix #1367 --- src/windows/ride_construction.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/windows/ride_construction.c b/src/windows/ride_construction.c index 2c64fe1881..7cb6c54658 100644 --- a/src/windows/ride_construction.c +++ b/src/windows/ride_construction.c @@ -409,8 +409,8 @@ void window_construction_paint() z += 1024; ebx = RCT2_GLOBAL(0xF44135, uint8_t); short bx; - if (RCT2_GLOBAL(0xF44064, uint32_t) & 0x80000) bx = RCT2_GLOBAL(0x9984A2 + ebx * 8, uint8_t); - else bx = RCT2_GLOBAL(0x997CA2 + ebx * 8, uint8_t); + if (RCT2_GLOBAL(0xF44064, uint32_t) & 0x80000) bx = RCT2_GLOBAL(0x9984A2 + ebx * 8, sint8); + else bx = RCT2_GLOBAL(0x997CA2 + ebx * 8, sint8); z -= bx; int start_x = x; switch (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32_t)) @@ -438,7 +438,7 @@ void window_construction_paint() uint32_t d = RCT2_GLOBAL(0xF44136, int16_t) << 16; d |= RCT2_GLOBAL(0xF44133, uint8_t);// Ride id d |= RCT2_GLOBAL(0xF44135, uint8_t) << 8; - RCT2_CALLPROC_X(0x6CBCE2, 0x1000, (((uint16_t)bx) & 0xFF) | (RCT2_GLOBAL(0xF44134, uint8_t) << 8), 0x1000, d, width, 0x400, height); + RCT2_CALLPROC_X(0x6CBCE2, 0x1000, (((uint16_t)bx) & 0xFF) | (RCT2_GLOBAL(0xF44134, uint8_t) << 8), 0x1000, d, width / 2, 0x400, height / 2); rct2_free(clip_dpi); } short string_x = (RCT2_GLOBAL(0x9D7C02, int16_t) + RCT2_GLOBAL(0x9D7C04, int16_t)) / 2 + w->x; From 1556a168e43cbe9bdcfb8335d8071768c7ed1bf2 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Wed, 17 Jun 2015 23:01:14 +0100 Subject: [PATCH 07/18] fix #1380 --- src/localisation/user.c | 2 +- src/scenario.c | 31 +++++++++++-------------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/src/localisation/user.c b/src/localisation/user.c index 6f8444ddac..57358e4c65 100644 --- a/src/localisation/user.c +++ b/src/localisation/user.c @@ -80,7 +80,7 @@ static bool user_string_exists(const char *text) if (userString[0] == 0) continue; - if (_stricmp(userString, text) == 0) + if (strcmp(userString, text) == 0) return true; } return false; diff --git a/src/scenario.c b/src/scenario.c index cb9a8d0267..01fa21a94c 100644 --- a/src/scenario.c +++ b/src/scenario.c @@ -279,29 +279,20 @@ int scenario_load_and_play_from_path(const char *path) rct_stex_entry* stex = g_stexEntries[0]; if ((int)stex != -1) { - // - format_string((char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, stex->park_name, 0); - - // Set park name - RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_CANT_RENAME_PARK; - game_do_command(1, 1, 0, *((int*)(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER + 0)), GAME_COMMAND_SET_PARK_NAME, - *((int*)(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER + 8)), - *((int*)(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER + 4))); - game_do_command(2, 1, 0, *((int*)(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER + 12)), GAME_COMMAND_SET_PARK_NAME, - *((int*)(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER + 20)), - *((int*)(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER + 16))); - game_do_command(0, 1, 0, *((int*)(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER + 24)), GAME_COMMAND_SET_PARK_NAME, - *((int*)(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER + 32)), - *((int*)(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER + 28))); + char *buffer = (char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER; - // - format_string((char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, stex->scenario_name, 0); - strncpy((char*)RCT2_ADDRESS_SCENARIO_NAME, (char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, 31); + // Set localised park name + format_string(buffer, stex->park_name, 0); + park_set_name(buffer); + + // Set localised scenario name + format_string(buffer, stex->scenario_name, 0); + strncpy((char*)RCT2_ADDRESS_SCENARIO_NAME, buffer, 31); ((char*)RCT2_ADDRESS_SCENARIO_NAME)[31] = '\0'; - // Set scenario details - format_string((char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, stex->details, 0); - strncpy((char*)RCT2_ADDRESS_SCENARIO_DETAILS, (char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, 255); + // Set localised scenario details + format_string(buffer, stex->details, 0); + strncpy((char*)RCT2_ADDRESS_SCENARIO_DETAILS, buffer, 255); ((char*)RCT2_ADDRESS_SCENARIO_DETAILS)[255] = '\0'; } From 6285a69e3c42a9dbb0ac9dff04977542dc9de542 Mon Sep 17 00:00:00 2001 From: Krutonium Date: Wed, 17 Jun 2015 18:33:53 -0400 Subject: [PATCH 08/18] Added Subverse to readme http://www.voat.co/v/openrct2 --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index 7e494aafb0..a00641b470 100644 --- a/readme.md +++ b/readme.md @@ -143,3 +143,4 @@ Translations are in progress for German, Dutch, French, Hungarian, Polish, Spani - [Launcher that keeps your copy up-to-date](https://openrct.net/download) - [rct2 subreddit](http://www.reddit.com/r/rct/) - [openrct2 subreddit](http://www.reddit.com/r/openrct2) +- [openrct2 subverse](http://www.voat.co/v/openrct2) From 46ac3b1c7bf5b4fdb6bec7ad11f01bd5c3d1ed02 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Wed, 17 Jun 2015 23:55:11 +0100 Subject: [PATCH 09/18] add known issues --- distribution/known_issues.txt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 distribution/known_issues.txt diff --git a/distribution/known_issues.txt b/distribution/known_issues.txt new file mode 100644 index 0000000000..aa21fbb7c9 --- /dev/null +++ b/distribution/known_issues.txt @@ -0,0 +1,9 @@ +Release version: 0.0.2-beta +------------------------------------------------------------------------ +* Some sounds play at their maximum volume irrespective of the sound volume control. +* Sandbox mode does not support all map modifications. +* Zero clearance cheat results in drawing glitches. +* Build while paused mode does not support all game commands. +* Some text shown in the map is not translated to selected language. +* Scenario editor object selection window will show object names in the selected language at the time of building the object cache. (Deleting plugin.dat in Documents/OpenRCT2 will fix this) +* The game will run slower at high resolutions, particularly if there are many moving objects visible. \ No newline at end of file From 032a5c03cae22bd62425990a618b392be8059620 Mon Sep 17 00:00:00 2001 From: Ted John Date: Thu, 18 Jun 2015 04:00:15 +0100 Subject: [PATCH 10/18] Merge Localisation/master into OpenRCT2/develop. --- data/language/dutch.txt | 15 ++++++++++----- data/language/english_us.txt | 7 ++++++- data/language/german.txt | 19 +++++++++++++++++-- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/data/language/dutch.txt b/data/language/dutch.txt index db170d4a2b..ed35caf694 100644 --- a/data/language/dutch.txt +++ b/data/language/dutch.txt @@ -3449,7 +3449,7 @@ STR_3446 :Werkgebied wissen #Start van OpenRCT2-indices STR_5120 :'Financiën'-knop in de werkbalk tonen STR_5121 :'Onderzoek'-knop in de werkbalk tonen -STR_5122 :Alle voertuigen met hetzelfde baan- of attractietype tonen +STR_5122 :Alle voertuigen met hetzelfde baan-/attractietype tonen STR_5123 :Attr. vernieuwen STR_5124 :Six Flags weg STR_5125 :Afbreekbaar maken @@ -3496,11 +3496,11 @@ STR_5163 :Maand/dag/jaar STR_5164 :Twitch-kanaalnaam STR_5165 :Bezoekers namen van volgers geven STR_5166 :Geeft bezoekers namen van gebruikers die het Twitch-kanaal volgen. -STR_5167 :Bezoekers met Twitch-volgersnamen volgen in berichtengebied +STR_5167 :Bez. met Twitch-volgersnamen volgen in berichtengebied STR_5168 :Zet het bezoekersvolgsysteem aan voor bezoekers die naar Twitch-volgers zijn genoemd. -STR_5169 :Bezoekers namen van gebruikers in de Twitch-chat geven +STR_5169 :Bez. namen van gebruikers in de Twitch-chat geven STR_5170 :Geeft bezoekers namen van gebruikers in de Twitch-chat. -STR_5171 :Bezoekers met Twitch-chatnamen volgen in berichtengebied +STR_5171 :Bez. met Twitch-chatnamen volgen in berichtengebied STR_5172 :Zet het bezoekersvolgsysteem aan voor bezoekers die naar Twitch-chatters zijn genoemd. STR_5173 :Twitch-chat als nieuws weergeven STR_5174 :Zal chatberichten op Twitch die beginnen met !news in het berichtengebied tonen. @@ -3615,7 +3615,7 @@ STR_5282 :Attracties openen/sluiten via RCT1-stoplichten STR_5283 :Park openen/sluiten via RCT1-stoplichten STR_5284 :Scenarioselectie-lettertype in RCT1-stijl STR_5285 :KABOEM! -STR_5286 :{MEDIUMFONT}{BLACK}Laat alle gasten exploderen +STR_5286 :{MEDIUMFONT}{BLACK}Laat sommige gasten exploderen STR_5287 :Attractie is al defect STR_5288 :Attractie is gesloten STR_5289 :Deze attractie kan niet defect raken @@ -3674,3 +3674,8 @@ STR_5341 :Eigenschappen STR_5342 :Kies een vakje op de kaart STR_5343 :Werknemers automatisch plaatsen STR_5344 :Wijzigingsoverzicht +STR_5345 :Cheats voor geld +STR_5346 :Cheats voor bezoekers +STR_5347 :Cheats voor attracties +STR_5348 :Cheats voor het park +STR_5349 :{SMALLFONT}{BLACK}Alle attracties diff --git a/data/language/english_us.txt b/data/language/english_us.txt index f5ecc67ee3..8585336194 100644 --- a/data/language/english_us.txt +++ b/data/language/english_us.txt @@ -3624,7 +3624,7 @@ STR_5282 :RCT1 Ride Open/Close Lights STR_5283 :RCT1 Park Open/Close Lights STR_5284 :RCT1 Scenario Selection Font STR_5285 :EXPLODE!!! -STR_5286 :{MEDIUMFONT}{BLACK}Makes guests explode +STR_5286 :{MEDIUMFONT}{BLACK}Makes some guests explode STR_5287 :Ride is already broken down STR_5288 :Ride is closed STR_5289 :No breakdowns available for this ride @@ -3683,3 +3683,8 @@ STR_5341 :Flags STR_5342 :Choose a map tile STR_5343 :Automatically place staff STR_5344 :Changelog +STR_5345 :Financial cheats +STR_5346 :Guest cheats +STR_5347 :Ride cheats +STR_5348 :Park cheats +STR_5349 :{SMALLFONT}{BLACK}All Rides diff --git a/data/language/german.txt b/data/language/german.txt index e4a4927716..28e928c0b1 100644 --- a/data/language/german.txt +++ b/data/language/german.txt @@ -2687,7 +2687,7 @@ STR_2680 :Alle Forschungen beendet STR_2681 :{MEDIUMFONT}{BLACK}Erhöht Ihr Geld um 5.000 STR_2682 :{MEDIUMFONT}{BLACK}Zw. freiem und kostenpfl. Eintritt umsch. STR_2683 :{MEDIUMFONT}{BLACK}Erhöht das Vergnügen der Besucher maximal -STR_2684 :{MEDIUMFONT}{BLACK}Eine große Gruppe von Besuchern tritt ein +STR_2684 :{SMALLFONT}{BLACK}Eine große Gruppe von Besuchern tritt ein STR_2685 :`Simplex Noise' Param. STR_2686 :{WINDOW_COLOUR_2}Niedrig: STR_2687 :{WINDOW_COLOUR_2}Hoch: @@ -3619,7 +3619,7 @@ STR_5282 :RCT1-Ampel Bahn öffnen/schließen STR_5283 :RCT1-Ampel Park öffnen/schließen STR_5284 :RCT1-Schriftart Szenarioauswahl STR_5285 :SPRENGEN!!! -STR_5286 :{MEDIUMFONT}{BLACK}Lässt einige Besucher explodieren +STR_5286 :{SMALLFONT}{BLACK}Lässt einige Besucher explodieren STR_5287 :Bahn ist schon defekt STR_5288 :Bahn ist geschlossen STR_5289 :Für diese Bahn sind keine Defekte verfügbar @@ -3683,3 +3683,18 @@ STR_5346 :Cheats für Parkbesucher STR_5347 :Cheats für Attraktionen STR_5348 :Cheats für Park STR_5349 :{SMALLFONT}{BLACK}Alle Attraktionen +STR_5350 :Max +STR_5351 :Min +STR_5352 :{BLACK}Vergnügen: +STR_5353 :{BLACK}Energie: +STR_5354 :{BLACK}Hunger: +STR_5355 :{BLACK}Durst: +STR_5356 :{BLACK}Übelkeit: +STR_5357 :{BLACK}Übelkeitstoleranz: +STR_5358 :{BLACK}Toilette: +STR_5359 :Besucher entfernen +STR_5360 :{SMALLFONT}{BLACK}Alle Besucher von der Karte entfernen +STR_5361 :{BLACK}Für alle Besucher: +STR_5362 :{BLACK}Bevorz. Intensität: +STR_5363 :> 1 +STR_5364 :< 15 From c3417e12f5682d65e6fb5632d7a52b41f8b6c0ad Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 18 Jun 2015 15:10:53 +0200 Subject: [PATCH 11/18] Add cheat for staff speed --- data/language/english_uk.txt | 3 +++ src/localisation/string_ids.h | 3 +++ src/peep/staff.c | 3 ++- src/windows/cheats.c | 35 +++++++++++++++++++++++++++++------ 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/data/language/english_uk.txt b/data/language/english_uk.txt index 59b30e526e..12cff5e254 100644 --- a/data/language/english_uk.txt +++ b/data/language/english_uk.txt @@ -3698,3 +3698,6 @@ STR_5361 :{BLACK}Give all guests: STR_5362 :{BLACK}Preferred intensity: STR_5363 :> 1 STR_5364 :< 15 +STR_5365 :{BLACK}Staff speed: +STR_5366 :Normal +STR_5367 :Fast diff --git a/src/localisation/string_ids.h b/src/localisation/string_ids.h index fdec4392a6..61b076f793 100644 --- a/src/localisation/string_ids.h +++ b/src/localisation/string_ids.h @@ -1509,6 +1509,7 @@ enum { STR_CHEAT_SANDBOX_MODE = 5278, STR_CHEAT_SANDBOX_MODE_DISABLE = 5279, STR_CHEAT_SANDBOX_MODE_TIP = 5280, + STR_CHEAT_STAFF_SPEED = 5365, STR_DEBUG_TIP = 5311, STR_DEBUG_DROPDOWN_CONSOLE = 5312, @@ -1535,6 +1536,8 @@ enum { STR_MAX = 5350, STR_MIN = 5351, + STR_NORMAL = 5366, + STR_FAST = 5367, // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working STR_COUNT = 32768 diff --git a/src/peep/staff.c b/src/peep/staff.c index c1f5979f58..b6cc3233f8 100644 --- a/src/peep/staff.c +++ b/src/peep/staff.c @@ -236,6 +236,7 @@ void game_command_hire_new_staff_member(int* eax, int* ebx, int* ecx, int* edx, newPeep->tshirt_colour = colour; newPeep->trousers_colour = colour; + // Staff energy determines their walking speed newPeep->energy = 0x60; newPeep->energy_growth_rate = 0x60; newPeep->var_E2 = 0; @@ -450,4 +451,4 @@ void staff_reset_stats() peep->staff_litter_swept = 0; peep->staff_bins_emptied = 0; } -} \ No newline at end of file +} diff --git a/src/windows/cheats.c b/src/windows/cheats.c index 8d6aa780b4..d13a56aa90 100644 --- a/src/windows/cheats.c +++ b/src/windows/cheats.c @@ -94,6 +94,8 @@ enum WINDOW_CHEATS_WIDGET_IDX { WIDX_WIN_SCENARIO, WIDX_UNLOCK_ALL_PRICES, WIDX_SANDBOX_MODE, + WIDX_FAST_STAFF, + WIDX_NORMAL_STAFF, WIDX_RENEW_RIDES = 8, WIDX_REMOVE_SIX_FLAGS, WIDX_MAKE_DESTRUCTIBLE, @@ -207,8 +209,10 @@ static rct_widget window_cheats_misc_widgets[] = { { WWT_CLOSEBOX, 1, XPL(1), WPL(1), YPL(4), HPL(4), STR_CHEAT_FIX_VANDALISM, STR_NONE}, // Fix vandalism { WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(5), HPL(5), STR_CHEAT_REMOVE_LITTER, STR_NONE}, // Remove litter { WWT_CLOSEBOX, 1, XPL(1), WPL(1), YPL(0), HPL(0), STR_CHEAT_WIN_SCENARIO, STR_NONE}, // Win scenario - { WWT_CHECKBOX, 1, XPL(0), OWPL, YPL(8),OHPL(8), STR_CHEAT_UNLOCK_PRICES, STR_NONE}, // Unlock all prices + { WWT_CHECKBOX, 1, XPL(0), OWPL, YPL(11),OHPL(11), STR_CHEAT_UNLOCK_PRICES, STR_NONE}, // Unlock all prices { WWT_CLOSEBOX, 1, XPL(1), WPL(1), YPL(5), HPL(5), STR_CHEAT_SANDBOX_MODE, STR_CHEAT_SANDBOX_MODE_TIP}, // Sandbox mode (edit land ownership in-game) + { WWT_CLOSEBOX, 1, MAX_BTN_LEFT, MAX_BTN_RIGHT, YPL(6), HPL(6), STR_FAST, STR_NONE }, // fast staff + { WWT_CLOSEBOX, 1, MIN_BTN_LEFT, MIN_BTN_RIGHT, YPL(6), HPL(6), STR_NORMAL, STR_NONE }, // normal staff { WIDGETS_END }, }; static rct_widget window_cheats_rides_widgets[] = { @@ -217,10 +221,10 @@ static rct_widget window_cheats_rides_widgets[] = { { WWT_CLOSEBOX, 1, XPL(1), WPL(1), YPL(0), HPL(0), STR_CHEAT_REMOVE_FLAGS, STR_NONE}, // Remove flags { WWT_CLOSEBOX, 1, XPL(1), WPL(1), YPL(1), HPL(1), STR_CHEAT_MAKE_DESTRUCTABLE, STR_NONE}, // Make destructable { WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(1), HPL(1), STR_CHEAT_FIX_ALL_RIDES, STR_NONE }, // Fix all rides - { WWT_CHECKBOX, 2, XPL(0), OWPL, YPL(8),OHPL(8) + 8, STR_CHEAT_410_HILL_LIFT, STR_NONE }, // 410 km/h lift hill - { WWT_CHECKBOX, 2, XPL(0), OWPL, YPL(6),OHPL(6), STR_CHEAT_DISABLE_BRAKES_FAILURE,STR_NONE }, // Disable brakes failure - { WWT_CHECKBOX, 2, XPL(0), OWPL, YPL(7),OHPL(7), STR_CHEAT_DISABLE_BREAKDOWNS, STR_NONE }, // Disable all breakdowns - { WWT_CHECKBOX, 2, XPL(0), OWPL, YPL(5),OHPL(5), STR_CHEAT_BUILD_IN_PAUSE_MODE, STR_NONE }, // Build in pause mode + { WWT_CHECKBOX, 2, XPL(0), OWPL, YPL(11),OHPL(11) + 8,STR_CHEAT_410_HILL_LIFT, STR_NONE }, // 410 km/h lift hill + { WWT_CHECKBOX, 2, XPL(0), OWPL, YPL(9),OHPL(9), STR_CHEAT_DISABLE_BRAKES_FAILURE,STR_NONE }, // Disable brakes failure + { WWT_CHECKBOX, 2, XPL(0), OWPL, YPL(10),OHPL(10), STR_CHEAT_DISABLE_BREAKDOWNS, STR_NONE }, // Disable all breakdowns + { WWT_CHECKBOX, 2, XPL(0), OWPL, YPL(8),OHPL(8), STR_CHEAT_BUILD_IN_PAUSE_MODE, STR_NONE }, // Build in pause mode { WIDGETS_END }, }; @@ -378,7 +382,7 @@ static void* window_cheats_page_events[] = { static uint32 window_cheats_page_enabled_widgets[] = { (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_HIGH_MONEY) | (1 << WIDX_PARK_ENTRANCE_FEE) | (1 << WIDX_CLEAR_LOAN), (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_GUEST_HAPPINESS_MAX) | (1 << WIDX_GUEST_HAPPINESS_MIN) | (1 << WIDX_GUEST_ENERGY_MAX) | (1 << WIDX_GUEST_ENERGY_MIN) | (1 << WIDX_GUEST_HUNGER_MAX) | (1 << WIDX_GUEST_HUNGER_MIN) | (1 << WIDX_GUEST_THIRST_MAX) | (1 << WIDX_GUEST_THIRST_MIN) | (1 << WIDX_GUEST_NAUSEA_MAX) | (1 << WIDX_GUEST_NAUSEA_MIN) | (1 << WIDX_GUEST_NAUSEA_TOLERANCE_MAX) | (1 << WIDX_GUEST_NAUSEA_TOLERANCE_MIN) | (1 << WIDX_GUEST_BATHROOM_MAX) | (1 << WIDX_GUEST_BATHROOM_MIN) | (1 << WIDX_GUEST_RIDE_INTENSITY_MORE_THAN_1) | (1 << WIDX_GUEST_RIDE_INTENSITY_LESS_THAN_15) | (1 << WIDX_TRAM_GUESTS) | (1 << WIDX_REMOVE_ALL_GUESTS) | (1 << WIDX_EXPLODE_GUESTS) | (1 << WIDX_GIVE_GUESTS_PARK_MAPS) | (1 << WIDX_GIVE_GUESTS_BALLOONS) | (1 << WIDX_GIVE_GUESTS_UMBRELLAS), - (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_FREEZE_CLIMATE) | (1 << WIDX_OPEN_CLOSE_PARK) | (1 << WIDX_ZERO_CLEARANCE) | (1 << WIDX_WEATHER_SUN) | (1 << WIDX_WEATHER_THUNDER) | (1 << WIDX_CLEAR_GRASS) | (1 << WIDX_MOWED_GRASS) | (1 << WIDX_WATER_PLANTS) | (1 << WIDX_FIX_VANDALISM) | (1 << WIDX_REMOVE_LITTER) | (1 << WIDX_WIN_SCENARIO) | (1 << WIDX_UNLOCK_ALL_PRICES) | (1 << WIDX_SANDBOX_MODE), + (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_FREEZE_CLIMATE) | (1 << WIDX_OPEN_CLOSE_PARK) | (1 << WIDX_ZERO_CLEARANCE) | (1 << WIDX_WEATHER_SUN) | (1 << WIDX_WEATHER_THUNDER) | (1 << WIDX_CLEAR_GRASS) | (1 << WIDX_MOWED_GRASS) | (1 << WIDX_WATER_PLANTS) | (1 << WIDX_FIX_VANDALISM) | (1 << WIDX_REMOVE_LITTER) | (1 << WIDX_WIN_SCENARIO) | (1 << WIDX_UNLOCK_ALL_PRICES) | (1 << WIDX_SANDBOX_MODE) | (1 << WIDX_FAST_STAFF) | (1 << WIDX_NORMAL_STAFF), (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_RENEW_RIDES) | (1 << WIDX_REMOVE_SIX_FLAGS) | (1 << WIDX_MAKE_DESTRUCTIBLE) | (1 << WIDX_FIX_ALL) | (1 << WIDX_FAST_LIFT_HILL) | (1 << WIDX_DISABLE_BRAKES_FAILURE) | (1 << WIDX_DISABLE_ALL_BREAKDOWNS) | (1 << WIDX_BUILD_IN_PAUSE_MODE) }; @@ -675,7 +679,17 @@ static void cheat_explode_guests() peep->flags |= PEEP_FLAGS_EXPLODE; } } +} +static void cheat_set_staff_speed(uint8 value) +{ + uint16 spriteIndex; + rct_peep *peep; + + FOR_ALL_STAFF(spriteIndex, peep) { + peep->energy = value; + peep->energy_growth_rate = value; + } } #pragma endregion @@ -881,6 +895,12 @@ static void window_cheats_misc_mouseup() window_invalidate_by_class(WC_MAP); window_invalidate_by_class(WC_FOOTPATH); break; + case WIDX_FAST_STAFF: + cheat_set_staff_speed(0xFF); + break; + case WIDX_NORMAL_STAFF: + cheat_set_staff_speed(0x60); + break; } } @@ -1000,6 +1020,9 @@ static void window_cheats_paint() gfx_draw_string_left(dpi, STR_CHEAT_TIP_PAY_ENTRY, NULL, 0, w->x + XPL(0) + TXTO, w->y + YPL(2) + TXTO); gfx_draw_string_left(dpi, STR_CHEAT_TIP_CLEAR_LOAN, NULL, 0, w->x + XPL(0) + TXTO, w->y + YPL(4) + TXTO); } + else if(w->page == WINDOW_CHEATS_PAGE_MISC){ + gfx_draw_string_left(dpi, STR_CHEAT_STAFF_SPEED, NULL, 0, w->x + XPL(0) + TXTO, w->y + YPL(6) + TXTO); + } else if (w->page == WINDOW_CHEATS_PAGE_GUESTS){ gfx_draw_string_left(dpi, STR_CHEAT_GUEST_HAPPINESS, NULL, 0, w->x + XPL(0) + TXTO, w->y + YPL(0) + TXTO); gfx_draw_string_left(dpi, STR_CHEAT_GUEST_ENERGY, NULL, 0, w->x + XPL(0) + TXTO, w->y + YPL(1) + TXTO); From 37e80b68f0eaac5e9d4bfb0490fa49b678d52228 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 18 Jun 2015 15:42:09 +0200 Subject: [PATCH 12/18] Add cheat to reset crash status --- data/language/english_uk.txt | 1 + src/localisation/string_ids.h | 1 + src/windows/cheats.c | 27 +++++++++++++++++++++++++-- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/data/language/english_uk.txt b/data/language/english_uk.txt index 12cff5e254..08ffabf12c 100644 --- a/data/language/english_uk.txt +++ b/data/language/english_uk.txt @@ -3701,3 +3701,4 @@ STR_5364 :< 15 STR_5365 :{BLACK}Staff speed: STR_5366 :Normal STR_5367 :Fast +STR_5368 :Reset crash status diff --git a/src/localisation/string_ids.h b/src/localisation/string_ids.h index 61b076f793..9ae4d8864a 100644 --- a/src/localisation/string_ids.h +++ b/src/localisation/string_ids.h @@ -1510,6 +1510,7 @@ enum { STR_CHEAT_SANDBOX_MODE_DISABLE = 5279, STR_CHEAT_SANDBOX_MODE_TIP = 5280, STR_CHEAT_STAFF_SPEED = 5365, + STR_CHEAT_RESET_CRASH_STATUS = 5368, STR_DEBUG_TIP = 5311, STR_DEBUG_DROPDOWN_CONSOLE = 5312, diff --git a/src/windows/cheats.c b/src/windows/cheats.c index d13a56aa90..c9ebd07c28 100644 --- a/src/windows/cheats.c +++ b/src/windows/cheats.c @@ -103,7 +103,8 @@ enum WINDOW_CHEATS_WIDGET_IDX { WIDX_FAST_LIFT_HILL, WIDX_DISABLE_BRAKES_FAILURE, WIDX_DISABLE_ALL_BREAKDOWNS, - WIDX_BUILD_IN_PAUSE_MODE + WIDX_BUILD_IN_PAUSE_MODE, + WIDX_RESET_CRASH_STATUS }; enum { @@ -225,6 +226,7 @@ static rct_widget window_cheats_rides_widgets[] = { { WWT_CHECKBOX, 2, XPL(0), OWPL, YPL(9),OHPL(9), STR_CHEAT_DISABLE_BRAKES_FAILURE,STR_NONE }, // Disable brakes failure { WWT_CHECKBOX, 2, XPL(0), OWPL, YPL(10),OHPL(10), STR_CHEAT_DISABLE_BREAKDOWNS, STR_NONE }, // Disable all breakdowns { WWT_CHECKBOX, 2, XPL(0), OWPL, YPL(8),OHPL(8), STR_CHEAT_BUILD_IN_PAUSE_MODE, STR_NONE }, // Build in pause mode + { WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(2), HPL(2), STR_CHEAT_RESET_CRASH_STATUS, STR_NONE }, // Reset crash status { WIDGETS_END }, }; @@ -383,7 +385,7 @@ static uint32 window_cheats_page_enabled_widgets[] = { (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_HIGH_MONEY) | (1 << WIDX_PARK_ENTRANCE_FEE) | (1 << WIDX_CLEAR_LOAN), (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_GUEST_HAPPINESS_MAX) | (1 << WIDX_GUEST_HAPPINESS_MIN) | (1 << WIDX_GUEST_ENERGY_MAX) | (1 << WIDX_GUEST_ENERGY_MIN) | (1 << WIDX_GUEST_HUNGER_MAX) | (1 << WIDX_GUEST_HUNGER_MIN) | (1 << WIDX_GUEST_THIRST_MAX) | (1 << WIDX_GUEST_THIRST_MIN) | (1 << WIDX_GUEST_NAUSEA_MAX) | (1 << WIDX_GUEST_NAUSEA_MIN) | (1 << WIDX_GUEST_NAUSEA_TOLERANCE_MAX) | (1 << WIDX_GUEST_NAUSEA_TOLERANCE_MIN) | (1 << WIDX_GUEST_BATHROOM_MAX) | (1 << WIDX_GUEST_BATHROOM_MIN) | (1 << WIDX_GUEST_RIDE_INTENSITY_MORE_THAN_1) | (1 << WIDX_GUEST_RIDE_INTENSITY_LESS_THAN_15) | (1 << WIDX_TRAM_GUESTS) | (1 << WIDX_REMOVE_ALL_GUESTS) | (1 << WIDX_EXPLODE_GUESTS) | (1 << WIDX_GIVE_GUESTS_PARK_MAPS) | (1 << WIDX_GIVE_GUESTS_BALLOONS) | (1 << WIDX_GIVE_GUESTS_UMBRELLAS), (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_FREEZE_CLIMATE) | (1 << WIDX_OPEN_CLOSE_PARK) | (1 << WIDX_ZERO_CLEARANCE) | (1 << WIDX_WEATHER_SUN) | (1 << WIDX_WEATHER_THUNDER) | (1 << WIDX_CLEAR_GRASS) | (1 << WIDX_MOWED_GRASS) | (1 << WIDX_WATER_PLANTS) | (1 << WIDX_FIX_VANDALISM) | (1 << WIDX_REMOVE_LITTER) | (1 << WIDX_WIN_SCENARIO) | (1 << WIDX_UNLOCK_ALL_PRICES) | (1 << WIDX_SANDBOX_MODE) | (1 << WIDX_FAST_STAFF) | (1 << WIDX_NORMAL_STAFF), - (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_RENEW_RIDES) | (1 << WIDX_REMOVE_SIX_FLAGS) | (1 << WIDX_MAKE_DESTRUCTIBLE) | (1 << WIDX_FIX_ALL) | (1 << WIDX_FAST_LIFT_HILL) | (1 << WIDX_DISABLE_BRAKES_FAILURE) | (1 << WIDX_DISABLE_ALL_BREAKDOWNS) | (1 << WIDX_BUILD_IN_PAUSE_MODE) + (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_RENEW_RIDES) | (1 << WIDX_REMOVE_SIX_FLAGS) | (1 << WIDX_MAKE_DESTRUCTIBLE) | (1 << WIDX_FIX_ALL) | (1 << WIDX_FAST_LIFT_HILL) | (1 << WIDX_DISABLE_BRAKES_FAILURE) | (1 << WIDX_DISABLE_ALL_BREAKDOWNS) | (1 << WIDX_BUILD_IN_PAUSE_MODE) | (1 << WIDX_RESET_CRASH_STATUS) }; static rct_string_id window_cheats_page_titles[] = { @@ -541,6 +543,23 @@ static void cheat_make_destructible() { if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE) ride->lifecycle_flags&=~RIDE_LIFECYCLE_INDESTRUCTIBLE; + if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) + ride->lifecycle_flags&=~RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK; + } + window_invalidate_by_class(WC_RIDE); +} + +static void cheat_reset_crash_status() +{ + int i; + rct_ride *ride; + + FOR_ALL_RIDES(i, ride){ + //reset crash status + if (ride->lifecycle_flags & RIDE_LIFECYCLE_CRASHED) + ride->lifecycle_flags&=~RIDE_LIFECYCLE_CRASHED; + //reset crash history + ride->last_crash_type=RIDE_CRASH_TYPE_NONE; } window_invalidate_by_class(WC_RIDE); } @@ -952,6 +971,10 @@ static void window_cheats_rides_mouseup() gConfigCheat.build_in_pause_mode ^= 1; config_save_default(); window_invalidate(w); + break; + case WIDX_RESET_CRASH_STATUS: + cheat_reset_crash_status(); + break; } } From 2dc03cd45a2290b1c590bc00212613e80ee00504 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Thu, 18 Jun 2015 22:20:49 +0100 Subject: [PATCH 13/18] refactor research window / extract common code --- src/interface/window.h | 4 ++ src/windows/finances.c | 4 +- src/windows/new_ride.c | 85 +++--------------------------------------- src/windows/research.c | 50 +++++++++++++++---------- 4 files changed, 41 insertions(+), 102 deletions(-) diff --git a/src/interface/window.h b/src/interface/window.h index 6196f8fb67..30527bda51 100644 --- a/src/interface/window.h +++ b/src/interface/window.h @@ -569,7 +569,11 @@ void window_banner_open(rct_windownumber number); void window_sign_open(rct_windownumber number); void window_sign_small_open(rct_windownumber number); void window_cheats_open(); + void window_research_open(); +void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dpi, int baseWidgetIndex); +void window_research_funding_page_paint(rct_window *w, rct_drawpixelinfo *dpi, int baseWidgetIndex); + void window_scenery_open(); void window_music_credits_open(); void window_publisher_credits_open(); diff --git a/src/windows/finances.c b/src/windows/finances.c index 17fc47d1e9..92eaee00ab 100644 --- a/src/windows/finances.c +++ b/src/windows/finances.c @@ -1484,9 +1484,7 @@ static void window_finances_research_paint() window_draw_widgets(w, dpi); window_finances_draw_tab_images(dpi, w); - int currentResearchLevel = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RESEARCH_LEVEL, uint8); - money32 currentResearchCostPerWeek = research_cost_table[currentResearchLevel]; - gfx_draw_string_left(dpi, STR_RESEARCH_COST_PER_MONTH, ¤tResearchCostPerWeek, 0, w->x + 10, w->y + 77); + window_research_funding_page_paint(w, dpi, WIDX_RESEARCH_FUNDING); } #pragma endregion diff --git a/src/windows/new_ride.c b/src/windows/new_ride.c index 99518a8d95..d824194c14 100644 --- a/src/windows/new_ride.c +++ b/src/windows/new_ride.c @@ -164,6 +164,7 @@ enum { WIDX_TAB_6, WIDX_TAB_7, WIDX_RIDE_LIST, + WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP, WIDX_LAST_DEVELOPMENT_GROUP, WIDX_LAST_DEVELOPMENT_BUTTON, @@ -748,86 +749,10 @@ static void window_new_ride_paint() if (_window_new_ride_current_tab != WINDOW_NEW_RIDE_PAGE_RESEARCH) { ride_list_item item = *((ride_list_item*)&w->new_ride.highlighted_ride_id); - if (item.type == 255 && item.entry_index == 255) - return; - - window_new_ride_paint_ride_information(w, dpi, item, w->x + 3, w->y + w->height - 52, w->width - 6); - return; - } - - int x = w->x + 10; - int y = w->y + window_new_ride_widgets[WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP].top + 12; - rct_string_id stringId; - - if (RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) == RESEARCH_STAGE_FINISHED_ALL){ - stringId = STR_RESEARCH_UNKNOWN; - gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 296, STR_RESEARCH_TYPE_LABEL, 0); - y += 25; - // Progress - stringId = 2680; - gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 296, STR_RESEARCH_PROGRESS_LABEL, 0); - y += 15; - - RCT2_GLOBAL(0x013CE952, uint16) = STR_UNKNOWN; - gfx_draw_string_left(dpi, STR_RESEARCH_EXPECTED_LABEL, (void*)0x013CE952, 0, x, y); - } - else{ - // Research type - stringId = STR_RESEARCH_UNKNOWN; - if (RCT2_GLOBAL(0x01357CF3, uint8) != 0) { - stringId = STR_TRANSPORT_RIDE + RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_CATEGORY, uint8); - if (RCT2_GLOBAL(0x01357CF3, uint8) != 1) { - uint32 typeId = RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_ITEM, uint32); - if (typeId >= 0x10000) { - rct_ride_type *rideEntry = RCT2_GLOBAL(0x009ACFA4 + (typeId & 0xFF) * 4, rct_ride_type*); - stringId = rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME ? - rideEntry->name : - (typeId & 0xFF00) + 2; - } - else { - stringId = g_scenerySetEntries[typeId]->name; - } - } - } - gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 296, STR_RESEARCH_TYPE_LABEL, 0); - y += 25; - - // Progress - stringId = 2285 + RCT2_GLOBAL(0x01357CF3, uint8); - gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 296, STR_RESEARCH_PROGRESS_LABEL, 0); - y += 15; - - // Expected - RCT2_GLOBAL(0x013CE952, uint16) = STR_UNKNOWN; - if (RCT2_GLOBAL(0x01357CF3, uint8) != 0) { - uint16 expectedDay = RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_EXPECTED_DAY, uint8); - if (expectedDay != 255) { - RCT2_GLOBAL(0x013CE952 + 2, uint16) = STR_DATE_DAY_1 + expectedDay; - RCT2_GLOBAL(0x013CE952 + 4, uint16) = STR_MONTH_MARCH + RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_EXPECTED_MONTH, uint8); - RCT2_GLOBAL(0x013CE952, uint16) = 2289; - } - } - gfx_draw_string_left(dpi, STR_RESEARCH_EXPECTED_LABEL, (void*)0x013CE952, 0, x, y); - } - // Last development - x = w->x + 10; - y = w->y + window_new_ride_widgets[WIDX_LAST_DEVELOPMENT_GROUP].top + 12; - - uint32 typeId = RCT2_GLOBAL(RCT2_ADDRESS_LAST_RESEARCHED_ITEM_SUBJECT, uint32); - int lastDevelopmentFormat; - if (typeId != 0xFFFFFFFF) { - if (typeId >= 0x10000) { - rct_ride_type *rideEntry = RCT2_GLOBAL(0x009ACFA4 + (typeId & 0xFF) * 4, rct_ride_type*); - stringId = rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME ? - rideEntry->name : - ((typeId >> 8) & 0xFF) + 2; - - lastDevelopmentFormat = STR_RESEARCH_RIDE_LABEL; - } else { - stringId = g_scenerySetEntries[typeId]->name; - lastDevelopmentFormat = STR_RESEARCH_SCENERY_LABEL; - } - gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 266, lastDevelopmentFormat, 0); + if (item.type != 255 || item.entry_index != 255) + window_new_ride_paint_ride_information(w, dpi, item, w->x + 3, w->y + w->height - 52, w->width - 6); + } else { + window_research_development_page_paint(w, dpi, WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP); } } diff --git a/src/windows/research.c b/src/windows/research.c index 32c5792a6f..2d6cdfdb81 100644 --- a/src/windows/research.c +++ b/src/windows/research.c @@ -327,21 +327,28 @@ static void window_research_development_paint() { rct_window *w; rct_drawpixelinfo *dpi; - int x, y; - rct_string_id stringId; window_paint_get_registers(w, dpi); window_draw_widgets(w, dpi); window_research_draw_tab_images(dpi, w); - x = w->x + 10; - y = w->y + window_research_development_widgets[WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP].top + 12; + window_research_development_page_paint(w, dpi, WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP); +} - if (RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) == RESEARCH_STAGE_FINISHED_ALL){ +void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dpi, int baseWidgetIndex) +{ + baseWidgetIndex = baseWidgetIndex - WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP; + + int x = w->x + 10; + int y = w->y + w->widgets[WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP + baseWidgetIndex].top + 12; + rct_string_id stringId; + + if (RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) == RESEARCH_STAGE_FINISHED_ALL) { stringId = STR_RESEARCH_UNKNOWN; gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 296, STR_RESEARCH_TYPE_LABEL, 0); y += 25; + // Progress stringId = 2680; gfx_draw_string_left_wrapped(dpi, &stringId, x, y, 296, STR_RESEARCH_PROGRESS_LABEL, 0); @@ -349,21 +356,19 @@ static void window_research_development_paint() RCT2_GLOBAL(0x013CE952, uint16) = STR_UNKNOWN; gfx_draw_string_left(dpi, STR_RESEARCH_EXPECTED_LABEL, (void*)0x013CE952, 0, x, y); - } - else{ + } else { // Research type stringId = STR_RESEARCH_UNKNOWN; - if (RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) != 0) { + if (RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) != RESEARCH_STAGE_INITIAL_RESEARCH) { stringId = STR_TRANSPORT_RIDE + RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_CATEGORY, uint8); - if (RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) != 1) { + if (RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) != RESEARCH_STAGE_DESIGNING) { uint32 typeId = RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_ITEM, uint32); if (typeId >= 0x10000) { rct_ride_type *rideEntry = RCT2_GLOBAL(0x009ACFA4 + (typeId & 0xFF) * 4, rct_ride_type*); stringId = rideEntry->flags & RIDE_ENTRY_FLAG_SEPERATE_RIDE_NAME ? rideEntry->name : - ((typeId >> 8) & 0xFF) + 2; - } - else { + (typeId & 0xFF00) + 2; + } else { stringId = g_scenerySetEntries[typeId]->name; } } @@ -381,16 +386,17 @@ static void window_research_development_paint() if (RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) != 0) { uint16 expectedDay = RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_EXPECTED_DAY, uint8); if (expectedDay != 255) { + RCT2_GLOBAL(0x013CE952, uint16) = 2289; RCT2_GLOBAL(0x013CE952 + 2, uint16) = STR_DATE_DAY_1 + expectedDay; RCT2_GLOBAL(0x013CE952 + 4, uint16) = STR_MONTH_MARCH + RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_EXPECTED_MONTH, uint8); - RCT2_GLOBAL(0x013CE952, uint16) = 2289; } } gfx_draw_string_left(dpi, STR_RESEARCH_EXPECTED_LABEL, (void*)0x013CE952, 0, x, y); } + // Last development x = w->x + 10; - y = w->y + window_research_development_widgets[WIDX_LAST_DEVELOPMENT_GROUP].top + 12; + y = w->y + w->widgets[WIDX_LAST_DEVELOPMENT_GROUP + baseWidgetIndex].top + 12; uint32 typeId = RCT2_GLOBAL(RCT2_ADDRESS_LAST_RESEARCHED_ITEM_SUBJECT, uint32); int lastDevelopmentFormat; @@ -581,11 +587,17 @@ static void window_research_funding_paint() window_draw_widgets(w, dpi); window_research_draw_tab_images(dpi, w); - if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) { - int currentResearchLevel = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RESEARCH_LEVEL, uint8); - money32 currentResearchCostPerWeek = research_cost_table[currentResearchLevel]; - gfx_draw_string_left(dpi, STR_RESEARCH_COST_PER_MONTH, ¤tResearchCostPerWeek, 0, w->x + 10, w->y + 77); - } + window_research_funding_page_paint(w, dpi, WIDX_RESEARCH_FUNDING); +} + +void window_research_funding_page_paint(rct_window *w, rct_drawpixelinfo *dpi, int baseWidgetIndex) +{ + if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) + return; + + int currentResearchLevel = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RESEARCH_LEVEL, uint8); + money32 currentResearchCostPerWeek = research_cost_table[currentResearchLevel]; + gfx_draw_string_left(dpi, STR_RESEARCH_COST_PER_MONTH, ¤tResearchCostPerWeek, 0, w->x + 10, w->y + 77); } #pragma endregion From 3140042b1d70a396349b92a4c873166aa65b6505 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Thu, 18 Jun 2015 22:35:08 +0100 Subject: [PATCH 14/18] fix #1391 --- src/interface/viewport_interaction.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interface/viewport_interaction.c b/src/interface/viewport_interaction.c index f7a252a433..3e0e049945 100644 --- a/src/interface/viewport_interaction.c +++ b/src/interface/viewport_interaction.c @@ -436,14 +436,14 @@ static void viewport_interaction_remove_footpath_item(rct_map_element *mapElemen { int type; - type = mapElement->properties.scenery.type >> 4; - if (mapElement->type & 0x80) + type = mapElement->properties.path.type >> 4; + if (mapElement->type & 1) type |= 0x80; RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16) = STR_CANT_REMOVE_THIS; game_do_command( x, - ((mapElement->properties.scenery.type & 7) << 8) | 1, + ((mapElement->properties.path.type & 7) << 8) | 1, y, (type << 8) | mapElement->base_height, GAME_COMMAND_PLACE_PATH, From ef3d7c2080fced15b601c545a5090cdba1d6d9ce Mon Sep 17 00:00:00 2001 From: Ted John Date: Fri, 19 Jun 2015 04:00:15 +0100 Subject: [PATCH 15/18] Merge Localisation/master into OpenRCT2/develop. --- data/language/dutch.txt | 25 ++++++++++++++++++++++--- data/language/english_us.txt | 23 +++++++++++++++++++++-- data/language/german.txt | 4 ++++ 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/data/language/dutch.txt b/data/language/dutch.txt index ed35caf694..12496041f2 100644 --- a/data/language/dutch.txt +++ b/data/language/dutch.txt @@ -2682,7 +2682,7 @@ STR_2680 :Alle onderzoeken zijn voltooid STR_2681 :{MEDIUMFONT}{BLACK}Krijg 5.000 extra geld STR_2682 :{MEDIUMFONT}{BLACK}Wissel tussen betaalde en gratis entree STR_2683 :{MEDIUMFONT}{BLACK}Alle bezoekers hebben een maximale tevredenheid -STR_2684 :{MEDIUMFONT}{BLACK}Er arriveert een grote groep bezoekers +STR_2684 :{SMALLFONT}{BLACK}Er arriveert een grote groep bezoekers STR_2685 :Parameters voor Simplex noise STR_2686 :Minimum: STR_2687 :Maximum: @@ -2754,7 +2754,7 @@ STR_2752 :Onkruid weg STR_2753 :Gras maaien STR_2754 :Bloemen water geven STR_2755 :Vandalisme repareren -STR_2756 :Afval op paden weghalen +STR_2756 :Afval verwijderen STR_2757 :Mooi weer STR_2758 :Regen STR_2759 :Hoogtes op nul @@ -3615,7 +3615,7 @@ STR_5282 :Attracties openen/sluiten via RCT1-stoplichten STR_5283 :Park openen/sluiten via RCT1-stoplichten STR_5284 :Scenarioselectie-lettertype in RCT1-stijl STR_5285 :KABOEM! -STR_5286 :{MEDIUMFONT}{BLACK}Laat sommige gasten exploderen +STR_5286 :{SMALLFONT}{BLACK}Laat sommige gasten exploderen STR_5287 :Attractie is al defect STR_5288 :Attractie is gesloten STR_5289 :Deze attractie kan niet defect raken @@ -3679,3 +3679,22 @@ STR_5346 :Cheats voor bezoekers STR_5347 :Cheats voor attracties STR_5348 :Cheats voor het park STR_5349 :{SMALLFONT}{BLACK}Alle attracties +STR_5350 :Max +STR_5351 :Min +STR_5352 :{BLACK}Stemming: +STR_5353 :{BLACK}Energie: +STR_5354 :{BLACK}Honger: +STR_5355 :{BLACK}Dorst: +STR_5356 :{BLACK}Misselijkh.: +STR_5357 :{BLACK}Misselijkheidstol.: +STR_5358 :{BLACK}WC: +STR_5359 :Bez. verwijderen +STR_5360 :{SMALLFONT}{BLACK}Verwijdert alle bezoekers van de kaart +STR_5361 :{BLACK}Geef alle bez.: +STR_5362 :{BLACK}Voorkeursintensiteit: +STR_5363 :> 1 +STR_5364 :< 15 +STR_5365 :{BLACK}Snelheid werknemers: +STR_5366 :Normaal +STR_5367 :Snel +STR_5368 :Crashstatus weg diff --git a/data/language/english_us.txt b/data/language/english_us.txt index 8585336194..3569127842 100644 --- a/data/language/english_us.txt +++ b/data/language/english_us.txt @@ -2686,7 +2686,7 @@ STR_2680 :All research complete STR_2681 :{MEDIUMFONT}{BLACK}Increases your money by 5,000 STR_2682 :{MEDIUMFONT}{BLACK}Toggle between Free and Paid Entry STR_2683 :{MEDIUMFONT}{BLACK}Increases every peeps happiness to max -STR_2684 :{MEDIUMFONT}{BLACK}Large group of peeps arrive +STR_2684 :{SMALLFONT}{BLACK}Large group of peeps arrive STR_2685 :Simplex Noise Parameters STR_2686 :{WINDOW_COLOUR_2}Low: STR_2687 :{WINDOW_COLOUR_2}High: @@ -3624,7 +3624,7 @@ STR_5282 :RCT1 Ride Open/Close Lights STR_5283 :RCT1 Park Open/Close Lights STR_5284 :RCT1 Scenario Selection Font STR_5285 :EXPLODE!!! -STR_5286 :{MEDIUMFONT}{BLACK}Makes some guests explode +STR_5286 :{SMALLFONT}{BLACK}Makes some guests explode STR_5287 :Ride is already broken down STR_5288 :Ride is closed STR_5289 :No breakdowns available for this ride @@ -3688,3 +3688,22 @@ STR_5346 :Guest cheats STR_5347 :Ride cheats STR_5348 :Park cheats STR_5349 :{SMALLFONT}{BLACK}All Rides +STR_5350 :Max +STR_5351 :Min +STR_5352 :{BLACK}Happiness: +STR_5353 :{BLACK}Energy: +STR_5354 :{BLACK}Hunger: +STR_5355 :{BLACK}Thirst: +STR_5356 :{BLACK}Nausea: +STR_5357 :{BLACK}Nausea tolerance: +STR_5358 :{BLACK}Bathroom: +STR_5359 :Remove guests +STR_5360 :{SMALLFONT}{BLACK}Removes all guests from the map +STR_5361 :{BLACK}Give all guests: +STR_5362 :{BLACK}Preferred intensity: +STR_5363 :> 1 +STR_5364 :< 15 +STR_5365 :{BLACK}Staff speed: +STR_5366 :Normal +STR_5367 :Fast +STR_5368 :Reset crash status diff --git a/data/language/german.txt b/data/language/german.txt index 28e928c0b1..f6561277c7 100644 --- a/data/language/german.txt +++ b/data/language/german.txt @@ -3698,3 +3698,7 @@ STR_5361 :{BLACK}Für alle Besucher: STR_5362 :{BLACK}Bevorz. Intensität: STR_5363 :> 1 STR_5364 :< 15 +STR_5365 :{BLACK}Personalgeschw.: +STR_5366 :Normal +STR_5367 :Schnell +STR_5368 :Unfallstatus entf. From 78a6e60083062e31b2473de804a819137554d4c7 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Fri, 19 Jun 2015 11:40:18 +0100 Subject: [PATCH 16/18] fix path_get_extension, fixes #1368 --- src/util/util.c | 26 +++++++++++++++++++------- src/util/util.h | 2 +- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index d6e12c0723..bf856238fa 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -58,24 +58,36 @@ const char *path_get_filename(const char *path) const char *path_get_extension(const char *path) { + const char *extension = NULL; const char *ch = path; - while (*ch != '.' && *ch != 0) { + while (*ch != 0) { + if (*ch == '.') + extension = ch; + ch++; } - return ch; + if (extension == NULL) + extension = ch; + return extension; } -void path_set_extension(char *path, const char *extension) +void path_set_extension(char *path, const char *newExtension) { + char *extension = NULL; char *ch = path; - while (*ch != '.' && *ch != 0) { + while (*ch != 0) { + if (*ch == '.') + extension = ch; + ch++; } + if (extension == NULL) + extension = ch; - if (extension[0] != '.') - *ch++ = '.'; + if (newExtension[0] != '.') + *extension++ = '.'; - strcpy(ch, extension); + strcpy(extension, newExtension); } void path_remove_extension(char *path) diff --git a/src/util/util.h b/src/util/util.h index 0b3a36c6c2..e8d8cca36d 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -29,7 +29,7 @@ int mph_to_kmph(int mph); const char *path_get_filename(const char *path); const char *path_get_extension(const char *path); -void path_set_extension(char *path, const char *extension); +void path_set_extension(char *path, const char *newExtension); void path_remove_extension(char *path); long fsize(FILE *fp); bool readentirefile(const char *path, void **outBuffer, long *outLength); From 0491d971f3ad79e6327b3fc14d8180241ca5a107 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Fri, 19 Jun 2015 14:59:48 +0200 Subject: [PATCH 17/18] Add cheat to edit park parameters/scenario options in-game --- data/language/english_uk.txt | 16 +++++++++------- src/interface/console.c | 4 +++- src/localisation/string_ids.h | 9 ++------- src/windows/cheats.c | 21 +++++++-------------- src/windows/editor_scenario_options.c | 24 ++++++++++++++++++++---- 5 files changed, 41 insertions(+), 33 deletions(-) diff --git a/data/language/english_uk.txt b/data/language/english_uk.txt index 08ffabf12c..0faa5a9dad 100644 --- a/data/language/english_uk.txt +++ b/data/language/english_uk.txt @@ -2684,8 +2684,8 @@ STR_2678 :??? STR_2679 :??? STR_2680 :All research complete STR_2681 :{MEDIUMFONT}{BLACK}Increases your money by 5,000 -STR_2682 :{MEDIUMFONT}{BLACK}Toggle between Free and Paid Entry -STR_2683 :{MEDIUMFONT}{BLACK}Increases every peeps happiness to max +STR_2682 : +STR_2683 : STR_2684 :{SMALLFONT}{BLACK}Large group of peeps arrive STR_2685 :Simplex Noise Parameters STR_2686 :{WINDOW_COLOUR_2}Low: @@ -2764,10 +2764,10 @@ STR_2757 :Force Sun STR_2758 :Force Thunder STR_2759 :Zero Clearance STR_2760 :+5K Money -STR_2761 :Pay For Entrance -STR_2762 :Pay For Rides +STR_2761 : +STR_2762 : STR_2763 :??? -STR_2764 :Happy Guests +STR_2764 : STR_2765 :Large Tram STR_2766 :Win scenario STR_2767 :Freeze Climate @@ -3587,8 +3587,8 @@ STR_5250 :Title Exit Button STR_5251 :Title Options Button STR_5252 :Title Scenario Selection STR_5253 :Park Information -STR_5254 :Add nausea -STR_5255 :{MEDIUMFONT}{BLACK}All peeps become nauseous +STR_5254 : +STR_5255 : STR_5256 :Create a new theme to make changes to STR_5257 :{SMALLFONT}{BLACK}Create a new theme based on the current one STR_5258 :{SMALLFONT}{BLACK}Delete the current theme @@ -3702,3 +3702,5 @@ STR_5365 :{BLACK}Staff speed: STR_5366 :Normal STR_5367 :Fast STR_5368 :Reset crash status +STR_5369 :Park parameters... +STR_5370 :{SMALLFONT}{BLACK}Click this button to modify park{NEWLINE}parameters like restrictions,{NEWLINE}guest generation and money. diff --git a/src/interface/console.c b/src/interface/console.c index c307f91643..24483e26fa 100644 --- a/src/interface/console.c +++ b/src/interface/console.c @@ -817,6 +817,8 @@ static int cc_open(const char **argv, int argc) { window_editor_object_selection_open(); } else if (strcmp(argv[0], "inventions_list") == 0) { window_editor_inventions_list_open(); + } else if (strcmp(argv[0], "scenario_options") == 0) { + window_editor_scenario_options_open(); } else if (strcmp(argv[0], "options") == 0) { window_options_open(); } else if (strcmp(argv[0], "themes") == 0) { @@ -999,4 +1001,4 @@ void console_execute_silent(const char *src) char output[] = { FORMAT_RED, "Unknown command. Type help to list available commands." }; console_writeline(output); } -} \ No newline at end of file +} diff --git a/src/localisation/string_ids.h b/src/localisation/string_ids.h index 9ae4d8864a..199cea90fd 100644 --- a/src/localisation/string_ids.h +++ b/src/localisation/string_ids.h @@ -999,14 +999,10 @@ enum { // Money STR_CHEAT_5K_MONEY = 2760, - STR_CHEAT_PAY_ENTRANCE = 2761, STR_CHEAT_CLEAR_LOAN = 5302, - STR_CHEAT_PAY_RIDES = 2762, // Guests - //STR_CHEAT_HAPPY_GUESTS = 2764, STR_CHEAT_LARGE_TRAM_GUESTS = 2765, - //STR_CHEAT_NAUSEA = 5254, STR_CHEAT_EXPLODE = 5285, STR_CHEAT_REMOVE_ALL_GUESTS = 5359, STR_CHEAT_GUEST_HAPPINESS = 5352, @@ -1037,6 +1033,7 @@ enum { STR_CHEAT_WIN_SCENARIO = 2766, STR_CHEAT_UNLOCK_PRICES = 5157, STR_CHEAT_BUILD_IN_PAUSE_MODE = 5303, + STR_CHEAT_PARK_PARAMETERS = 5369, // Rides STR_CHEAT_RENEW_RIDES = 5123, @@ -1049,13 +1046,11 @@ enum { // Cheat tips STR_CHEAT_TIP_5K_MONEY = 2681, - STR_CHEAT_TIP_PAY_ENTRY = 2682, STR_CHEAT_TIP_CLEAR_LOAN = 5301, - //STR_CHEAT_TIP_HAPPY_GUESTS = 2683, STR_CHEAT_TIP_LARGE_TRAM_GUESTS = 2684, - //STR_CHEAT_TIP_NAUSEA = 5255, STR_CHEAT_TIP_EXPLODE = 5286, STR_CHEAT_TIP_REMOVE_ALL_GUESTS = 5360, + STR_CHEAT_TIP_PARK_PARAMETERS = 5370, // Cheat tab tips STR_FINANCIAL_CHEATS_TIP = 5178, diff --git a/src/windows/cheats.c b/src/windows/cheats.c index c9ebd07c28..205d4a6a7c 100644 --- a/src/windows/cheats.c +++ b/src/windows/cheats.c @@ -57,7 +57,6 @@ enum WINDOW_CHEATS_WIDGET_IDX { WIDX_TAB_3, WIDX_TAB_4, WIDX_HIGH_MONEY, - WIDX_PARK_ENTRANCE_FEE, WIDX_CLEAR_LOAN, WIDX_GUEST_HAPPINESS_MAX = 8, //Same as HIGH_MONEY as it is also the 8th widget but on a different page WIDX_GUEST_HAPPINESS_MIN, @@ -96,6 +95,7 @@ enum WINDOW_CHEATS_WIDGET_IDX { WIDX_SANDBOX_MODE, WIDX_FAST_STAFF, WIDX_NORMAL_STAFF, + WIDX_PARK_PARAMETERS, WIDX_RENEW_RIDES = 8, WIDX_REMOVE_SIX_FLAGS, WIDX_MAKE_DESTRUCTIBLE, @@ -164,7 +164,6 @@ enum { static rct_widget window_cheats_money_widgets[] = { MAIN_CHEATS_WIDGETS, { WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(1), HPL(1), STR_CHEAT_5K_MONEY, STR_NONE}, // high money - { WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(3), HPL(3), STR_CHEAT_PAY_ENTRANCE, STR_NONE}, // Park Entrance Fee Toggle { WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(5), HPL(5), STR_CHEAT_CLEAR_LOAN, STR_NONE }, // Clear loan { WIDGETS_END }, }; @@ -214,6 +213,7 @@ static rct_widget window_cheats_misc_widgets[] = { { WWT_CLOSEBOX, 1, XPL(1), WPL(1), YPL(5), HPL(5), STR_CHEAT_SANDBOX_MODE, STR_CHEAT_SANDBOX_MODE_TIP}, // Sandbox mode (edit land ownership in-game) { WWT_CLOSEBOX, 1, MAX_BTN_LEFT, MAX_BTN_RIGHT, YPL(6), HPL(6), STR_FAST, STR_NONE }, // fast staff { WWT_CLOSEBOX, 1, MIN_BTN_LEFT, MIN_BTN_RIGHT, YPL(6), HPL(6), STR_NORMAL, STR_NONE }, // normal staff + { WWT_CLOSEBOX, 1, XPL(0), WPL(0), YPL(7), HPL(7), STR_CHEAT_PARK_PARAMETERS, STR_CHEAT_TIP_PARK_PARAMETERS}, // Park parameters { WIDGETS_END }, }; static rct_widget window_cheats_rides_widgets[] = { @@ -382,9 +382,9 @@ static void* window_cheats_page_events[] = { }; static uint32 window_cheats_page_enabled_widgets[] = { - (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_HIGH_MONEY) | (1 << WIDX_PARK_ENTRANCE_FEE) | (1 << WIDX_CLEAR_LOAN), + (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_HIGH_MONEY) | (1 << WIDX_CLEAR_LOAN), (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_GUEST_HAPPINESS_MAX) | (1 << WIDX_GUEST_HAPPINESS_MIN) | (1 << WIDX_GUEST_ENERGY_MAX) | (1 << WIDX_GUEST_ENERGY_MIN) | (1 << WIDX_GUEST_HUNGER_MAX) | (1 << WIDX_GUEST_HUNGER_MIN) | (1 << WIDX_GUEST_THIRST_MAX) | (1 << WIDX_GUEST_THIRST_MIN) | (1 << WIDX_GUEST_NAUSEA_MAX) | (1 << WIDX_GUEST_NAUSEA_MIN) | (1 << WIDX_GUEST_NAUSEA_TOLERANCE_MAX) | (1 << WIDX_GUEST_NAUSEA_TOLERANCE_MIN) | (1 << WIDX_GUEST_BATHROOM_MAX) | (1 << WIDX_GUEST_BATHROOM_MIN) | (1 << WIDX_GUEST_RIDE_INTENSITY_MORE_THAN_1) | (1 << WIDX_GUEST_RIDE_INTENSITY_LESS_THAN_15) | (1 << WIDX_TRAM_GUESTS) | (1 << WIDX_REMOVE_ALL_GUESTS) | (1 << WIDX_EXPLODE_GUESTS) | (1 << WIDX_GIVE_GUESTS_PARK_MAPS) | (1 << WIDX_GIVE_GUESTS_BALLOONS) | (1 << WIDX_GIVE_GUESTS_UMBRELLAS), - (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_FREEZE_CLIMATE) | (1 << WIDX_OPEN_CLOSE_PARK) | (1 << WIDX_ZERO_CLEARANCE) | (1 << WIDX_WEATHER_SUN) | (1 << WIDX_WEATHER_THUNDER) | (1 << WIDX_CLEAR_GRASS) | (1 << WIDX_MOWED_GRASS) | (1 << WIDX_WATER_PLANTS) | (1 << WIDX_FIX_VANDALISM) | (1 << WIDX_REMOVE_LITTER) | (1 << WIDX_WIN_SCENARIO) | (1 << WIDX_UNLOCK_ALL_PRICES) | (1 << WIDX_SANDBOX_MODE) | (1 << WIDX_FAST_STAFF) | (1 << WIDX_NORMAL_STAFF), + (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_FREEZE_CLIMATE) | (1 << WIDX_OPEN_CLOSE_PARK) | (1 << WIDX_ZERO_CLEARANCE) | (1 << WIDX_WEATHER_SUN) | (1 << WIDX_WEATHER_THUNDER) | (1 << WIDX_CLEAR_GRASS) | (1 << WIDX_MOWED_GRASS) | (1 << WIDX_WATER_PLANTS) | (1 << WIDX_FIX_VANDALISM) | (1 << WIDX_REMOVE_LITTER) | (1 << WIDX_WIN_SCENARIO) | (1 << WIDX_UNLOCK_ALL_PRICES) | (1 << WIDX_SANDBOX_MODE) | (1 << WIDX_FAST_STAFF) | (1 << WIDX_NORMAL_STAFF) | (1 << WIDX_PARK_PARAMETERS), (1 << WIDX_CLOSE) | (1 << WIDX_TAB_1) | (1 << WIDX_TAB_2) | (1 << WIDX_TAB_3) | (1 << WIDX_TAB_4) | (1 << WIDX_RENEW_RIDES) | (1 << WIDX_REMOVE_SIX_FLAGS) | (1 << WIDX_MAKE_DESTRUCTIBLE) | (1 << WIDX_FIX_ALL) | (1 << WIDX_FAST_LIFT_HILL) | (1 << WIDX_DISABLE_BRAKES_FAILURE) | (1 << WIDX_DISABLE_ALL_BREAKDOWNS) | (1 << WIDX_BUILD_IN_PAUSE_MODE) | (1 << WIDX_RESET_CRASH_STATUS) }; @@ -752,11 +752,6 @@ static void window_cheats_money_mouseup() case WIDX_CLEAR_LOAN: cheat_clear_loan(); break; - case WIDX_PARK_ENTRANCE_FEE: - RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_PARK_FREE_ENTRY; - window_invalidate_by_class(WC_PARK_INFORMATION); - window_invalidate_by_class(WC_RIDE); - break; } } @@ -920,6 +915,9 @@ static void window_cheats_misc_mouseup() case WIDX_NORMAL_STAFF: cheat_set_staff_speed(0x60); break; + case WIDX_PARK_PARAMETERS: + window_editor_scenario_options_open(); + break; } } @@ -1001,10 +999,6 @@ static void window_cheats_invalidate() w->pressed_widgets = 0; switch (w->page) { - case WINDOW_CHEATS_PAGE_MONEY: - w->widgets[WIDX_PARK_ENTRANCE_FEE].image = RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY ? - STR_CHEAT_PAY_ENTRANCE : STR_CHEAT_PAY_RIDES; - break; case WINDOW_CHEATS_PAGE_MISC: w->widgets[WIDX_OPEN_CLOSE_PARK].image = RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_OPEN ? STR_CHEAT_CLOSE_PARK : STR_CHEAT_OPEN_PARK; @@ -1040,7 +1034,6 @@ static void window_cheats_paint() if (w->page == WINDOW_CHEATS_PAGE_MONEY){ gfx_draw_string_left(dpi, STR_CHEAT_TIP_5K_MONEY, NULL, 0, w->x + XPL(0) + TXTO, w->y + YPL(0) + TXTO); - gfx_draw_string_left(dpi, STR_CHEAT_TIP_PAY_ENTRY, NULL, 0, w->x + XPL(0) + TXTO, w->y + YPL(2) + TXTO); gfx_draw_string_left(dpi, STR_CHEAT_TIP_CLEAR_LOAN, NULL, 0, w->x + XPL(0) + TXTO, w->y + YPL(4) + TXTO); } else if(w->page == WINDOW_CHEATS_PAGE_MISC){ diff --git a/src/windows/editor_scenario_options.c b/src/windows/editor_scenario_options.c index 1dea670bd6..89bcb1d704 100644 --- a/src/windows/editor_scenario_options.c +++ b/src/windows/editor_scenario_options.c @@ -451,7 +451,18 @@ static void window_editor_scenario_options_financial_mouseup() window_editor_scenario_options_set_page(w, widgetIndex - WIDX_TAB_1); break; case WIDX_NO_MONEY: - RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_NO_MONEY_SCENARIO; + if(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) { + RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_NO_MONEY_SCENARIO; + } + else { + RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_NO_MONEY; + // Invalidate all windows that have anything to do with finance + window_invalidate_by_class(WC_RIDE); + window_invalidate_by_class(WC_PEEP); + window_invalidate_by_class(WC_PARK_INFORMATION); + window_invalidate_by_class(WC_FINANCES); + window_invalidate_by_class(WC_BOTTOM_TOOLBAR); + } window_invalidate(w); break; case WIDX_FORBID_MARKETING: @@ -482,7 +493,7 @@ static void window_editor_scenario_options_financial_mousedown(int widgetIndex, { switch (widgetIndex) { case WIDX_INITIAL_CASH_INCREASE: - if (RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32) < MONEY(10000,00)) { + if (RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32) < MONEY(1000000,00)) { RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32) += MONEY(500,00); RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, money32) = ENCRYPT_MONEY(RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32)); sub_69E869(); @@ -546,7 +557,7 @@ static void window_editor_scenario_options_financial_mousedown(int widgetIndex, window_invalidate(w); break; case WIDX_INTEREST_RATE_DECREASE: - if (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_INTEREST_RATE, money32) > 5) { + if (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_INTEREST_RATE, money32) >= 0) { RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_INTEREST_RATE, money32)--; } else { window_error_open(3255, STR_NONE); @@ -554,6 +565,11 @@ static void window_editor_scenario_options_financial_mousedown(int widgetIndex, window_invalidate(w); break; } + + if(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_PLAYING) { + window_invalidate_by_class(WC_FINANCES); + window_invalidate_by_class(WC_BOTTOM_TOOLBAR); + } } /** @@ -732,7 +748,7 @@ static void window_editor_scenario_options_guests_mousedown(int widgetIndex, rct { switch (widgetIndex) { case WIDX_CASH_PER_GUEST_INCREASE: - if (RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_CASH, money16) < MONEY(100, 00)) { + if (RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_CASH, money16) < MONEY(1000, 00)) { RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_CASH, money16) += MONEY(1, 00); } else { window_error_open(3264, STR_NONE); From e546e5038e6eff94efbedb34c62491e2e2abb35e Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Fri, 19 Jun 2015 16:02:54 +0200 Subject: [PATCH 18/18] Make the park parameters dialog behave and invalidate better in-game. --- src/windows/editor_scenario_options.c | 36 +++++++++++++++++++-------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/src/windows/editor_scenario_options.c b/src/windows/editor_scenario_options.c index 89bcb1d704..f505aca17a 100644 --- a/src/windows/editor_scenario_options.c +++ b/src/windows/editor_scenario_options.c @@ -1087,19 +1087,33 @@ static void window_editor_scenario_options_park_dropdown() window_dropdown_get_registers(w, widgetIndex, dropdownIndex); if (widgetIndex == WIDX_PAY_FOR_PARK_OR_RIDES_DROPDOWN && dropdownIndex != -1) { - if (dropdownIndex == 0) { - if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY)) { - RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_PARK_FREE_ENTRY; - RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, money16) = MONEY(0, 00); - window_invalidate(w); - } - } else { - if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY) { - RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_PARK_FREE_ENTRY; - RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, money16) = MONEY(10, 00); - window_invalidate(w); + if(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) { + if (dropdownIndex == 0) { + if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY)) { + RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_PARK_FREE_ENTRY; + RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, money16) = MONEY(0, 00); + } + } else { + if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY) { + RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_PARK_FREE_ENTRY; + RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, money16) = MONEY(10, 00); + } } } + else { + if (dropdownIndex == 0) { + if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY)) { + RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_PARK_FREE_ENTRY; + } + } else { + if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY) { + RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_PARK_FREE_ENTRY; + } + } + window_invalidate_by_class(WC_PARK_INFORMATION); + window_invalidate_by_class(WC_RIDE); + } + window_invalidate(w); } }