Commit Graph

839 Commits

Author SHA1 Message Date
Ted John 16a7e21ffa Implement game action for park set loan 2018-03-20 09:31:39 +01:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Aaron van Geffen 7bc63dc30a Themes window: use header widgets; minor code clean up. 2018-03-19 10:36:39 +01:00
Aaron van Geffen 8ab568a6a9 Multiplayer: use table header widgets for column headers. 2018-03-19 10:36:39 +01:00
Aaron van Geffen f6933aea4e Multiplayer information: take font line height into account. 2018-03-19 08:34:16 +01:00
Aaron van Geffen a61c84d3b0 Increase button height in server list window. 2018-03-19 08:34:16 +01:00
Aaron van Geffen ca4e1a36fb Fix widget dimensions for 'Start server' window. 2018-03-19 08:34:16 +01:00
Aaron van Geffen 686fedc671 Player window: use LIST_ROW_HEIGHT. 2018-03-19 08:34:16 +01:00
Aaron van Geffen 32e0f12f5b Multiplayer window: use SCROLLABLE_ROW_HEIGHT in scrollpaint. 2018-03-19 08:34:16 +01:00
Aaron van Geffen c0bc2da529 Increase button height in save prompt window. 2018-03-19 08:34:16 +01:00
xp4xbox 463cb7ab26 Fix #5339: Change scenery eyedropper to use a relevant icon. 2018-03-19 08:33:59 +01:00
Michał Janiszewski 4dd0995efb Move cmath out of common.h 2018-03-18 23:29:13 +01:00
Michał Janiszewski 5c6e28284b Move cstddef out of common.h 2018-03-18 23:29:13 +01:00
Aaron van Geffen bab1ef465a Automatically scroll once a new month appears in Finances. 2018-03-18 22:41:34 +01:00
Aaron van Geffen df6a86d9bf Leverage more historical data in Finances window.
This adds a horizontal scrollbar to the summary page.
2018-03-18 22:41:34 +01:00
Hielke Morsink 1cd3e5e49c use GAME_COMMAND_FLAG_APPLY instead of hardcoded value 2018-03-18 12:21:24 +01:00
Michał Janiszewski f045370fcf Improve track preview window with OpenGL renderer
This adds a warning to track preview window explaining it's not
supported with OpenGL renderer. Also fixes the issue whereby no stats
were printed because of early exit.
2018-03-16 22:41:08 +01:00
Michał Janiszewski 10dabfa15c Fix strncpy usage in GuestList.cpp 2018-03-14 22:11:01 +01:00
Aaron van Geffen c21143505f Fix #7203: Undefined string in custom currency window. 2018-03-14 13:35:51 +01:00
Michał Janiszewski 764520076f
Reduce header inclusion
* Update includes in PlatformEnvironment.cpp

* Update includes in ParkImporter.h

* Update includes of OpenRCT2.h

* Update includes in Intro.h

* Remove unused include from Input.cpp

* Update includes of Imaging.h

* Update includes in Game.h

* Update includes in Editor.h

* Update includes of Context.cpp

* Update includes in Cheats.cpp, CmdlineSprite.cpp

* Update includes of some source files

* Update includes in some cpp files

* Update includes in some cpp files

* Update includes in TextureCache.h

* Fix tests

* Update includes in Font.cpp

* Update includes in LightFX files

* Update some includes

* Fix GCC builds

* Update some includes

* Update some includes

* Update includes in FontsFamilies.*

* Update includes of Console.h

* Improve includes in Window.h

* Improve headers in Viewport.h/Window.h

* Fix MSVC build

* Fix network-less builds

* Reduce inclusion of Map.h
2018-03-13 13:14:02 +01:00
Ted John 74228ed35f Use iterators again for removing empty headings
Improving on f00aa15096, continue to use iterator and just set it to the result of erase.
2018-03-10 13:58:49 +00:00
Ted John f00aa15096 Fix assert in debug mode in initialise_list_items
Erasing vector iterators causes the iterator to become invalid, so use an index instead for the loop.
2018-03-10 10:52:32 +00:00
Michael Steenbeek 5411c77358 Clean up more direct access to tile elements 2018-03-09 19:40:16 +01:00
Michael Steenbeek 44524d1e6f Name unknown variable 2018-03-09 19:40:16 +01:00
Ted John 39a38dc193 Include SDL2 using sub directory 2018-03-09 16:28:47 +01:00
Ted John e318e0948a Fix a few assertions that were found when using debug CRT 2018-03-09 16:28:47 +01:00
Hielke Morsink a8f167c45d Fix a few typos
'vehichle' -> 'vehicle'
'none zero' and 'non zero' -> 'nonzero'
2018-03-09 15:58:12 +01:00
Michael Steenbeek 88af2d3954 Rename sub_6CA2DF() to window_ride_construction_update_state() 2018-03-09 09:17:24 +01:00
Joshua Moerman d6c28b2fa4 Using some more CoordsXY instead of separate xy in Map.cpp 2018-03-08 23:41:33 +01:00
Joshua Moerman 426c21eb56 Uses some more informative types in Map.cpp 2018-03-08 23:41:33 +01:00
Joshua Moerman c2eb735871 Replaces magic numbers with appropriate constants 2018-03-08 23:41:33 +01:00
Joshua Moerman e5d143b748 Simplifies map_window_get_pixel_colour_ride
- Splits uint32 into two uint16
- Reuse code for unowned land colour
2018-03-08 23:41:33 +01:00
Michael Steenbeek 1fa2fa8f80
Refactor ride->entrances and ride->exits 2018-03-07 19:10:50 +01:00
ZehMatt e3708c0593 Split special direction to new parameter. 2018-03-05 00:17:34 +01:00
ZehMatt bdc1cf8adc Refactor GAME_COMMAND_MAZE_SET_TRACK to game action. 2018-03-05 00:17:34 +01:00
Aaron van Geffen ba1d269227 Move all Virtual Floor code from Map to its own file. 2018-03-04 19:28:56 +01:00
Ted John 0ee3c45d37 Fix #7196: Crowd Noises Absent
Sounds loaded into memory that matched the target audio format were returning a failed result.
2018-02-25 02:40:36 +00:00
Aaron van Geffen e53741812f Fix deleting of multibyte characters. 2018-02-24 10:47:52 +01:00
Aaron van Geffen 88cfd14ce5 Fix #7020: end key not working in text input. 2018-02-24 10:47:52 +01:00
Gymnasiast 7a2a73b418 Fix #7205: Park entrance fee cannot be set higher than £100 2018-02-21 22:37:54 +01:00
Michał Janiszewski 08bcbe3912 Make network version a variable to reduce recompilations 2018-02-21 22:21:09 +01:00
Michael Steenbeek 2de6529cf5 Use big coordinates for PeepSpawn's Z coordinate 2018-02-21 09:50:07 +01:00
wolfreak99 2d8c473f75 Sync Peep Spawn over network 2018-02-19 21:11:14 +01:00
Michał Janiszewski 6eeda1ec77 Perform more cleanup of CMakeLists.txt files
This moves setting of compilation flags to common file to be used by all
subprojects and explicitly enables only C++ support, skipping whole C
support in CMake.
2018-02-15 23:51:49 +01:00
Michael Steenbeek bde913ee16 Rename SmallCoords and BigCoords 2018-02-15 22:26:50 +01:00
Michael Steenbeek a2260929dd Replace rct_xy_element with BigCoordsXYE 2018-02-15 22:26:50 +01:00
Michael Steenbeek d481cca2ed
Remove some redundant casts and fix rct_sprite::AsDuck() 2018-02-15 13:04:25 +01:00
Hielke Morsink 55979a3fff Remove and replace C typedefs
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
2018-02-14 09:42:26 +01:00
Aaron van Geffen c8b5cbb3e4 Fix cmake build for openrct2-cli on macOS.
This also removes the globbing for *.m files. As the platform files for macOS
now all use Objective C++ (.mm) instead of Objective C (.m), this is no longer needed.
2018-02-12 23:15:41 +01:00
Ted John d22572d0b9 Remove rct_object_entry_extended 2018-02-12 12:48:41 +00:00
Ted John 4d8fe051e8 Remove most usages of object_entry_groups 2018-02-12 12:48:41 +00:00
Ted John d905dde070 Simplify selected object flags 2018-02-12 12:48:41 +00:00
ZehMatt 4f011163d0 Fix #6667: Match sample rate to games audio content. 2018-02-11 12:51:33 +01:00
Hielke Morsink 8e55c811f6 Check for server version instead of address (#7155) 2018-02-09 19:16:54 +00:00
Gymnasiast f003366d22 Remove STEX selection from Object Selection window 2018-02-09 13:47:15 +01:00
Gymnasiast b1ab852fb7 Add object_entry_get_type() 2018-02-09 13:47:15 +01:00
Ted John 504e635933
Merge pull request #7150 from Broxzier/absolute-path
Make custom paths absolute and show full path in load/save window
2018-02-08 17:25:52 +00:00
Ted John 9f533d7265
Merge pull request #7143 from IntelOrca/refactor/server-list
Refactor server list
2018-02-08 17:25:37 +00:00
Hielke Morsink ced75956d1 Populate loadsave window with absolute path
When pressing "up", the code would look for the parent in the given path, which doesn't work well with relative paths. This commit fixes this behaviour.
2018-02-08 14:23:21 +01:00
Michał Janiszewski 20f95d073a Fix remaining uses of WC_LOADSAVE intent 2018-02-07 23:14:29 +01:00
Michał Janiszewski d08924a9c2 Add missing breaks in WindowManager 2018-02-07 23:14:29 +01:00
Ted John 9d50a36f2c More improvements to server list 2018-02-07 19:23:44 +00:00
Ted John c7128ec988 Refactor ServerList more 2018-02-07 13:01:36 +00:00
Ted John c42a63c52c Refactor memory handling in ServerList more 2018-02-07 12:51:52 +00:00
Ted John 5d51676523 Refactor memory handling in ServerList 2018-02-07 12:51:52 +00:00
Michał Janiszewski 8b72c4f1ad Fix mismatched deleter in TextureCache (#7138) 2018-02-06 20:51:40 +00:00
Hielke Morsink 915dbdf869 Add button to tile inspector to make entrances usable
With this, entrances and exits that have been moved away from its original XY
location can be made usable. Only one entrance or exit will be usable per
station.
2018-02-06 19:09:51 +01:00
Gymnasiast cc4f7e144a Remove most usages of 'new Intent' 2018-02-05 23:23:26 +01:00
Gymnasiast e3c0f6606d Clean up Intent.{cpp,h}
This gets rid of the C transfer functions, add licence and does some alignment fixes
2018-02-05 23:23:26 +01:00
Gymnasiast 34a6b5ef92 Remove __cplusplus ifdefs 2018-02-05 16:20:15 +01:00
Gymnasiast 778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Richard Jenkins 95dfcea6bd Implement #4984: Add option to highlight vomit, litter and handymen 2018-02-05 00:20:12 +00:00
Ted John 522e113929 Fix wrong highlighted tab in object selection window 2018-02-04 12:34:41 +00:00
Michael Steenbeek 9bd812c855 Move most of _legacy.c to C++ (#7117) 2018-02-02 23:11:41 +01:00
Marijn van der Werf 7efaf3dd80 Decrease dependency of world on windows 2018-02-01 13:59:46 +01:00
Michael Steenbeek b4018d398c
Add more object source filters 2018-01-31 13:07:20 +01:00
duncanspumpkin 96f664abb9 Fix Water Ride spinning on slope bug. Name flags. Refactor
There was a bug in the spinning water ride code that would mean that it would never trigger the stopping of spinning when going up a lift. This mistake was made during implementation of the function.
2018-01-30 12:53:50 +00:00
Gymnasiast 5cc21fd21b Replace NULL with nullptr in C++ files 2018-01-29 21:33:21 +00:00
Gymnasiast 6bd0b2baea Show ride group name in Object Selection 2018-01-29 20:09:05 +01:00
Gymnasiast e8b2a3df0d Slight research refactor 2018-01-29 12:52:12 +01:00
Gymnasiast 981b67a90f Reorder edge textures 2018-01-27 23:22:24 +01:00
Ted John 8f1100c986
Merge pull request #7066 from IntelOrca/refactor/memory-operations
Refactor memory operations 1
2018-01-26 11:41:19 +00:00
Ted John df26354376 Fix drawing glyphs in OpenGL 2018-01-24 18:49:30 +00:00
pss9205 6b716dc157 Fix #7021: Extra rating factors overflow the vehicle tab in Korean (#7073) 2018-01-23 16:06:37 +01:00
Gymnasiast 6bf09e7abb Add preview images for RCT1 edge styles 2018-01-22 11:44:38 +01:00
Michael Steenbeek fdeaaa5631
Allow selecting RCT1 map edges in land tool 2018-01-21 17:18:00 +01:00
Ted John 02d783a993 Fix build 2018-01-21 12:41:42 +00:00
Ted John cebe13984f Remove most of remaining memory functions from libopenrct2ui 2018-01-21 11:17:41 +00:00
Ted John 131286f758 Refactor memory handling in OpenGLShaderProgram.cpp 2018-01-21 11:17:41 +00:00
Ted John 7f8b795842 Refactor memory handling in EditorObjectSelection.cpp 2018-01-21 11:17:41 +00:00
Ted John 589e0f40d0 Refactor memory handling in Map.cpp 2018-01-21 11:17:41 +00:00
Ted John cb44dc5c21 Fix changelog 2018-01-21 11:17:41 +00:00
Ted John b52333f532 Refactor memory handling in TitleScenarioSelect.cpp 2018-01-21 11:17:40 +00:00
Ted John 4d57a4b03a Refactor memory handling in TrackDesignPlace.cpp 2018-01-21 11:17:40 +00:00
Ted John cbbb35bf79 Refactor memory handling in ObjectLoadError.cpp 2018-01-21 11:17:40 +00:00
Ted John badb90ba20 Refactor memory handling in Changelog.cpp 2018-01-21 11:17:40 +00:00
Ted John ba5bc415c7 Refactor memory handling in window sources 2018-01-21 11:17:40 +00:00
Ted John 0b8575270c Refactor memory handling in audio sources 2018-01-21 11:17:40 +00:00
Richard Jenkins 104419f6b2 Fix #7060: Ride window settings can underflow 2018-01-20 20:34:39 +00:00
Ted John 6d63729a40 Fix MSVC 2018-01-18 22:59:30 +00:00
Marijn van der Werf d09134e64a Decrease Window dependencies in Vehicle.cpp 2018-01-18 22:57:55 +01:00
Marijn van der Werf 7aa2cd7ac5 Move peep list refreshing to UI module 2018-01-18 22:57:55 +01:00
Marijn van der Werf aa0933d08a Convert rct_window to opaque pointer 2018-01-18 22:57:55 +01:00
Marijn van der Werf 4c956def67 Update UI imports 2018-01-18 22:57:55 +01:00
Ted John cb720025fa Replace platform_enumerate_directories_begin with FileScanner code
This is isn't a particularly pretty implementation but it is only temporary until we can use std::filesystem.
2018-01-18 11:38:52 +01:00
Ted John 6fd56d140d Remove remaining uses of platform_enumerate_files_begin 2018-01-18 11:38:52 +01:00
Aaron van Geffen a1e7a18a67 Cheats window: format braces et cetera. 2018-01-16 23:22:52 +01:00
Aaron van Geffen c951c7b539 Ride cheats: reorder and group cheats in boxes by function.
* Change button order.
* Move checkboxes into a more logical order.
* Add group boxes around checkboxes.
2018-01-16 23:22:52 +01:00
Ted John 68202db51c Make ClimateWeatherData and ClimateWeatherGloomColours internal to Climate.cpp 2018-01-14 01:06:47 +00:00
Ted John 83cdd56825 Unify current and next climate state into common struct 2018-01-14 01:06:47 +00:00
Adakite Systems 0681ba4e04 Read and set edge scrolling speed via config
- For future reference, the default edge scrolling speed
value of 12 is retained.
2018-01-14 00:51:51 +00:00
Michael Steenbeek 037b236d8f Add the RCT1 edge styles 2018-01-13 15:39:22 +01:00
Aaron van Geffen c581656693 Add extra padding to label text in track install window.
Also fixes the window height, not just to accommodate the extra padding,
but also to accommodate the 'space required' field.
2018-01-12 22:29:32 +01:00
ZehMatt 84f2917f59 Use const and constexpr whenever possible. 2018-01-11 22:29:08 +01:00
Aaron van Geffen 81398d9225 Reset resize widget's top position properly when invalidating. 2018-01-11 20:27:40 +01:00
Aaron van Geffen 4d219c3abe Refactor name and path into std::string, too. 2018-01-11 20:27:40 +01:00
Aaron van Geffen eb0ad92e6d Use std::vector as LoadSaveListItem container. 2018-01-11 20:27:40 +01:00
Aaron van Geffen fce2996a73 Format braces in LoadSave.cpp. 2018-01-11 20:27:40 +01:00
Aaron van Geffen aa82df2647 Experimental: use system date/time settings on Windows. 2018-01-11 20:27:40 +01:00
Aaron van Geffen ada31ede29 Change header/sort button appearance. 2018-01-11 20:27:40 +01:00
Aaron van Geffen 9d96377e9b Infer optimal date width when opening load/save window.
In order to accomodate MSVC, we're not using strptime.
2018-01-11 20:27:40 +01:00
Aaron van Geffen 004e60ccc6 Use virtual columns to align date and time.
This also makes the date column use a fixed width. Useful when resizing.
2018-01-11 20:27:40 +01:00
Aaron van Geffen ca172b46c1 Make load/save window resizeable. 2018-01-11 20:27:40 +01:00
Aaron van Geffen c77b00898d Show formatted dates in load/save window. 2018-01-11 20:27:40 +01:00
Michael Steenbeek cd5a1ba888 Compile files in world folder as C++ 2018-01-11 13:25:09 +01:00
Aaron van Geffen 1d7bec8a11 Make the virtual floor optional, on by default. 2018-01-11 10:37:40 +01:00
Aaron van Geffen 84026529b4 Introduce new variable gMapVirtualFloorVisible to determine visibility.
This addresses compilation issues for projects that contain no UI code.
Also working towards better invalidation for the software renderer.
2018-01-11 10:37:40 +01:00
Aaron van Geffen 4246b84130 Invalidate virtual floor once selection has changed.
Cache the position of the last invalidate call to prevent a big dip in performance.
2018-01-11 10:37:40 +01:00
Jeroen D Stout c8785bac55 Add virtual floor removal check to input 2018-01-11 10:37:40 +01:00
Jeroen D Stout 0268be92cb Prevent ride construction from setting tiles when scenery tool is active 2018-01-11 10:37:40 +01:00
Jeroen D Stout d67aba09ad Make placing scenery set virtual floor height 2018-01-11 10:37:40 +01:00
Michał Janiszewski 469e142c7b Change casing of header files 2018-01-11 09:30:09 +01:00
Michał Janiszewski 6a65f791b6 Add const to arguments 2018-01-10 23:58:57 +01:00
Michael Steenbeek ddd8479827 Move some research logic out of the Inventions window 2018-01-10 16:31:13 +01:00
Michael Steenbeek 0995ab9910 Fold gResearchNextCategory into gResearchNextItem 2018-01-10 15:31:47 +01:00
Michael Steenbeek d2de1a4a95 Abstract access to gResearchedRide{Types,Entries} 2018-01-10 15:31:47 +01:00
Michael Steenbeek 3d9466a2f6 Fix refactor mistake 2018-01-10 12:05:06 +01:00
Michael Steenbeek 55b473d866 Rename gResearchLastItemSubject to gResearchLastItem 2018-01-09 21:35:10 +01:00
Michael Steenbeek 0ae5d7d476 Remove research_remove_non_separate_vehicle_types()
This removes more usages of the SEPARATE_RIDE flag.
2018-01-09 21:35:10 +01:00
Michael Steenbeek 6a88d6e04d Move and rename RCT{1,2,12}.h 2018-01-09 13:36:41 +01:00
Michał Janiszewski 9c84ae30fb Hide colliding "struct VDStruct" definitions to anon namespaces 2018-01-09 11:01:03 +00:00
Michael Steenbeek 6088a084a2 Replace 0x40 with COLOUR_FLAG_INSET 2018-01-09 10:37:09 +01:00
Michael Steenbeek 857e64590d Name some rct(1)_peep fields 2018-01-09 10:35:07 +01:00
Aaron van Geffen c9b48beea0 Replace WWT_CLOSEBOX with WWT_BUTTON where not used as a close button. 2018-01-08 00:02:25 +01:00
Aaron van Geffen e61194961f Rename WWT_25 to WWT_PLACEHOLDER.
This is only used in the bottom toolbar as a placeholder,
while still capturing events.
2018-01-08 00:01:45 +01:00
Aaron van Geffen 12e3e171f1 Refactor WWT_24 into WWT_LABEL. 2018-01-08 00:01:45 +01:00
Aaron van Geffen ecc1cfed2a Rename WWT_DROPDOWN_BUTTON to WWT_BUTTON.
The previous name implied an exclusive association with dropdowns.
While used to display the dropdown triangle button, this is not an
exclusive use.
2018-01-08 00:01:32 +01:00
Aaron van Geffen 8ad1bc9b86 Rename WWT_14 to WWT_LABEL.
This is used for left-aligned label text.
2018-01-07 23:54:51 +01:00
Aaron van Geffen fad8494ccc Rename WWT_12 to WWT_LABEL_CENTRED.
This is used for centred textual labels.
2018-01-07 23:54:51 +01:00
Aaron van Geffen 9a2d3b226c Rename WWT_13 to WWT_TABLE_HEADER.
This is used for left-aligned header buttons for data tables.
2018-01-07 23:54:51 +01:00
Aaron van Geffen c023f6a3f7 Moved console command, window invalidation, fix help. 2018-01-07 23:53:47 +01:00
Aaron van Geffen bf1bb33b86 Properly invalidate widgets after using date spinners. 2018-01-07 23:53:47 +01:00
Harrison Gentry 752d9bc89d Add cheat and console command to set game date.
Run "date" command on cmdline to set date.

Ex:
$ date 0004 06 13
sets date to June 13th, year 4
2018-01-07 23:53:47 +01:00
Gymnasiast 2ecbac1550 Fix #6972: Last development field is identical to progress field 2018-01-07 22:28:08 +01:00
Michael Steenbeek 7d5de63484 Refactor rct_research_item, refactor access to rct_research_item
This takes away a lot of the bitshift and bit mask trickery previously used.
2018-01-07 15:33:44 +01:00
Ted John c3eab7ead6 Refactor window.c to C++ 2018-01-07 12:39:58 +01:00
Ted John 83d1b6eb8f Refactor widget.c to C++ 2018-01-07 12:39:58 +01:00
Ted John f18595a1c1 Refactor viewport.c to C++ 2018-01-07 12:39:58 +01:00
Ted John c974daf467 Refactor console.c to C++ 2018-01-07 12:39:58 +01:00
Ted John b781291b58 Refactor chat.c to C++ 2018-01-07 12:39:58 +01:00
ZehMatt d25c46ef93 Refactor image cache to fixed size. 2018-01-07 02:18:12 +00:00
Michael Steenbeek 755add6c9a
Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Aaron van Geffen 15a4f67f14 Restore tab-specific widget dimensions for Finances window. 2018-01-06 16:42:48 +00:00
Richard Jenkins 9bb7b66157 Fix #6948 & #6949: Removing or trying to build a ride freezes game 2018-01-06 13:49:29 +00:00
Ted John 3dcbebcf68 Refactor drawing.c to C++ 2018-01-05 22:57:57 +01:00
Ted John 0c3c998177 Refactor lightfx.c to C++ 2018-01-05 22:57:55 +01:00
Ted John 559ec8a404 Refactor font.c to C++ 2018-01-05 22:57:54 +01:00
Ted John 02c58a6c5a Remove custom base Exception class 2018-01-05 18:11:47 +00:00
Harrison Gentry 5862cd9d40 Fix guest counter to say '1 guest' instead of '1 guests' 2018-01-05 08:58:17 +01:00
Aaron van Geffen 81905fc161 Vertically align widgets in lower-left bottom toolbar. 2018-01-05 00:44:59 +01:00
Hielke Morsink 512dc2c721 Fix #6923: hovering over queues turns them into regular paths 2018-01-04 21:23:56 +01:00
Michael Steenbeek 31bf792538 Refactor research - spike 1
This involves refactoring gResearchedRideTypes and gResearchedRideEntries
and the functions involved.

Also renames some functions in order to better express what they do.
2018-01-04 17:44:51 +01:00
Hielke Morsink 3dd98c7aa2 Apply coding style 2018-01-04 07:58:31 +01:00
Hielke Morsink a6e4c1d677 Remove undefined function declaration 2018-01-04 07:58:31 +01:00
Hielke Morsink 7d37798f19 Reduce duplicated code in finances window
All of the pages share some common widgets (title, close button, background, tabs). To
reduce code duplication here, I've moved those values to a define that then gets used
for each of the pages.
The same thing applies to enabled widgets. One additional change is that left bitshifts
from `1` have been changed to `1ULL`.
2018-01-04 07:58:31 +01:00
Aaron van Geffen 0138df5dd8 Centre overall viewports on geometric centre. 2018-01-04 07:57:27 +01:00
Aaron van Geffen 92bcc5f579 For overall views, show small rides zoomed in all the way. 2018-01-04 07:57:27 +01:00
Michał Janiszewski 33a94fe1bb Use C++ headers in C++ code 2018-01-04 07:36:54 +01:00
Michał Janiszewski b2bc974fe7
Use nullptr where possible 2018-01-04 06:58:44 +01:00
Michał Janiszewski 4d0c88fb94 Mark constructors explicit (#6928) 2018-01-04 01:12:34 +00:00
Michael Steenbeek 91589f57c6 Compile map.c as C++ 2018-01-03 20:40:51 +01:00
Ted John 49f5611bd1 Rename scenario.c|h to cpp 2018-01-03 15:07:17 +01:00
Hielke Morsink eb4a8924d1 Refactor and clean up footpath-related code
This commit corrects some misused defines, and gave them clearer names.
For example, the slope mask was only useful for surface elements, so now
"SURFACE" is in its name. I also replaced any hard coded values that I
could find and knew their purpose off.
2018-01-03 10:57:37 +01:00
Michael Steenbeek d25856d59c Make tile element type strings in the Tile Inspector translatable 2018-01-03 10:21:53 +01:00
Michael Steenbeek 347ff702d0 Refactor objects 2018-01-03 10:16:51 +01:00
Aaron van Geffen da519c9b32 Add extra padding to label text in guest window. 2018-01-03 10:09:21 +01:00
Michael Steenbeek 3b06f92c0a
Merge pull request #5964 from janisozaur/sse4.1 2018-01-02 22:27:17 +01:00
Michael Steenbeek 1bc711e266
Fix #5761: Mini coaster doesn't appear despite being selected (#6909) 2018-01-02 19:40:08 +01:00
Tobias Kohlbau a726f6decd Multiplayer: save manually added servers
Adding a server via "Add Server" should handle them
as favorites as otherwise the list is not saved locally and
each server is lost after game restart.

Signed-off-by: Tobias Kohlbau <tobias@kohlbau.de>
2018-01-02 13:04:08 +01:00
Michał Janiszewski 7f7054049d Read commandline before initialising other features
This allows setting options that may affect future feature detection,
but also allows for configuring verbosity levels early.
2018-01-01 23:51:43 +01:00
Gymnasiast 1626f86acc Compile park.c as C++ 2018-01-01 01:18:12 +01:00
Gymnasiast 23d70a4ac9 Compile ride.c as C++ 2017-12-31 20:43:17 +01:00
Aaron van Geffen e405867dae Add tooltip to explain why sprite selection is disabled. 2017-12-31 20:03:09 +01:00
Robert Jordan 907f18fd69 Fix: Following canceling
Stop previewing sequence now unfollows the current sprite.
Using the arrow keys in-game cancels following.
Resizing the window no longer cancels following.
2017-12-31 20:03:09 +01:00
Robert Jordan 298420fd1e Finalize follow sprite command
Added new smart follow variable to window to more intuitively follow
sprites that may not be directly followable at all times.
Follow sprite is now canceled when dragging the screen but not
scrolling. This is only relevant when testing title sequences in game.
Select sprite button is now disabled in the title menu.
Sprites are now identified based on their name. Excess identification
information is not given as it'd clutter up the screen and is not
necissary with the viewbox in the command editor.
2017-12-31 20:03:09 +01:00
Hielke Morsink 1443216ba0 Replace number with small viewport 2017-12-31 20:03:09 +01:00
Hielke Morsink 943747056e Add window settings and save support for follow sprite command 2017-12-31 20:03:09 +01:00
Hielke Morsink db7efda880 Fix #6845: Logo artifacts when changing scale.
This correctly invalidates the areas with logo and version text.
2017-12-31 13:14:03 +01:00
Robert Jordan 92fc010b9a Feature: "Load Scenario" title sequence command
New command goes by LOADSC in script files and in the enumeration.
Scenarios are stored using the internal also used for localisation.
Scenarios selected can only be scenarios to originally come with one of
the games or expansions.
Modified Scenario Select window to have a mode just for title editor
scenario selection.
2017-12-31 12:42:40 +01:00
rwjuk 1736a08b04 Fix potential access violation when setting park name 2017-12-29 21:56:07 +01:00
Hielke Morsink d2f732bbb6 Fix garbage in buffer 2017-12-29 12:33:34 +00:00
rwjuk 29c604d850 Fix #6846: Ride overview window zoom level set too high 2017-12-28 08:55:13 +01:00
Hielke Morsink 32cc3082b2 Remove check that would never pass
`safe_strcpy` already takes the null terminator into
account, making the check useless. If the string was too
long, `safe_strcpy` already prints a warning anyway.

Two small fixups included:
 - Sorting includes
 - Comparing char with `\0` instead of 0
2017-12-27 23:11:04 +01:00
Hielke Morsink acc33aa47e Remove duplicated code in text window
The two functions for opening were almost identical. The only
difference was that one was passed a string ID and the other a
raw string. The one taking the string ID now converts it to a
raw string, and then calls the other functions.

This also makes the utf8 string const and replaces some C-string
code with String::Set.
2017-12-27 16:19:46 +00:00
Aaron van Geffen a5ae503f0a Take font line height into account for bottom toolbar 2017-12-27 14:54:09 +01:00
Aaron van Geffen 759c51bbad Fix #6869: incorrect Map button appearance in Guest List.
* Fixes the map button overlapping with the new search icon.

* Fixes the map button not being repositioned when the window is resized.
2017-12-27 14:51:17 +01:00
Aaron van Geffen 4455925fcb Move braces to follow code style. 2017-12-27 13:18:24 +01:00
Aaron van Geffen 10ed48611c Refactor bottom toolbar: hex to dec, apply macro.
This was one of the few windows that had its widget positions defined in
hexadecimals rather than decimals.

The logic was further obscured by using a macro to offset an experimental
change to accomodate longer dates. This change has been widely embraced,
so this patch applied said macro to improve legibility.
2017-12-27 13:18:07 +01:00
Park Joon-Kyu bbf5571c17 Allow filtering guests by name (#6633) 2017-12-25 12:17:37 +01:00
Aaron van Geffen 54e6ffdbdd Fix #6860: Intensity and nausea ratings are too high in build menu. 2017-12-23 00:13:33 +00:00
Michael Steenbeek 2e79aaf54c Fold vehicle name into regular name 2017-12-22 15:28:41 +01:00
Aaron van Geffen 1e7fe352fb Adjust Twitch options to make room for CJK glyphs. 2017-12-22 08:03:03 +01:00
Aaron van Geffen 9e686197aa Audio tab: widen label for 'focus loss' option.
The string used in e.g. the German translation is much longer than its
English counterpart, which led to flickering of the label.
2017-12-22 08:03:03 +01:00
Aaron van Geffen ec37e14f98 More consistent indentation for nested checkboxes.
Also fixes the height of the lightning effect checkbox.
2017-12-22 08:03:03 +01:00
Aaron van Geffen 4e57ad55b3 Refactor widgets for 'controls and interface' tab. 2017-12-22 08:03:03 +01:00
Aaron van Geffen dfffabc08f Change option window tab icons. 2017-12-22 08:03:03 +01:00
Aaron van Geffen 8fd4f323fd Reposition widgets in Miscellaneous tab; add strings. 2017-12-22 08:03:03 +01:00
Aaron van Geffen b76c8b863a Move 'scenario grouping' to Misc tab. 2017-12-22 08:03:03 +01:00
Aaron van Geffen f7b92e4d37 Reposition widgets for 'Advanced' tab. 2017-12-22 08:03:03 +01:00
Aaron van Geffen 511a158fdd Options: introduce new 'Advanced' tab split off from 'Misc'. 2017-12-22 08:03:03 +01:00
Aaron van Geffen 4678829e03 Use LIST_ROW_HEIGHT in Map window. 2017-12-21 16:50:23 +01:00
Aaron van Geffen 9582561a7b Use LIST_ROW_HEIGHT in Park window. 2017-12-21 16:50:23 +01:00
Aaron van Geffen dbb22dd883 Use {SCROLLABLE/LIST}_ROW_HEIGHT in track list window. 2017-12-21 16:50:23 +01:00
Aaron van Geffen ad5246976c Use SCROLLABLE_ROW_HEIGHT in ride list window. 2017-12-21 16:50:23 +01:00
Aaron van Geffen a0cadab70b Use LIST_ROW_HEIGHT in Staff window's stats page. 2017-12-21 16:50:23 +01:00
Aaron van Geffen 3d7d7bee71 Right-align buttons in Options window. 2017-12-17 17:29:51 +01:00
Aaron van Geffen 39b2a00fd8 Disable resolution dropdown on "Windowed" and "Fullscreen (desktop)". 2017-12-17 17:29:34 +01:00
Michael Steenbeek c4f44e5e7a Compile files in paint folder as C++ 2017-12-17 17:24:36 +01:00
Marijn van der Werf 00667c81b6 Reformat MouseInput 2017-12-16 15:47:38 +02:00
Marijn van der Werf 1e946fc0fe Move Dropdown to UI project 2017-12-16 15:47:38 +02:00
Marijn van der Werf 0193ea4fdc Move tooltip to UI project 2017-12-16 15:47:38 +02:00
Marijn van der Werf e9ef843619 Move majority of input.c to UI 2017-12-16 15:47:38 +02:00
Marijn van der Werf 22966c1ad7 Fix graph land move 2017-12-16 15:47:38 +02:00
Marijn van der Werf b660b42554 Move land tool 2017-12-16 15:47:38 +02:00
Marijn van der Werf 6b17a185d6 Move graph 2017-12-16 15:47:38 +02:00
Ted John 31e112cf3b Use std::string for objects 2017-12-14 14:38:14 +01:00
LRFLEW eed00ea363 Add Vsync Toggle to Options 2017-12-14 11:18:28 +01:00
Michael Steenbeek 1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Michael Steenbeek cc27beef73 Remove unnecessary strdup 2017-12-13 19:46:29 +01:00
Michael Steenbeek 8095c970aa Fix memory leak in New Ride window
The way the window handles strings might need to be updated at some point
to be a little bit cleaner, but this at least plugs the leak.
2017-12-13 11:59:03 +01:00
Michael Steenbeek 6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Christian F. Coors 0aa515355a Add cursor scaling 2017-12-12 22:11:40 +01:00
Michael Steenbeek e3c52360db Remove most usages of separate flag
This removes most usages of the separate flag, instead relying on ride groups to do its job.
Research is more complicated and will follow in another commit.
2017-12-08 10:28:29 +01:00
Michael Steenbeek 171271215e Change some ride type names for clarity, fix Americanism 2017-12-08 07:59:44 +01:00
Michael Steenbeek 3868b100df Stop encrypting money
It serves no purpose any more. Of course, we still need the ENCRYPT_MONEY() and DECRYPT_MONEY() functions for importing and exporting S6 files.
2017-12-07 23:22:24 +01:00
Marijn van der Werf 2d776de772 Extract functions from EditorObjectSelection 2017-12-07 17:52:03 +01:00
Marijn van der Werf 862ab26cc1 Move object selection window to UI module 2017-12-07 17:52:03 +01:00
Michael Steenbeek 0ffa2b541a Use more consistent terminology and remove some Americanisms 2017-12-05 10:23:36 +01:00
Michael Steenbeek 10a4dd06b0
Merge pull request #6754 from Gymnasiast/game-as-cpp
Compile game.c and game.h as C++
2017-12-05 09:23:01 +01:00
Hielke Morsink 884bc0c9a4 Trim object names when copying the missing objects list
Before adding a name to the clipboard buffer, it checks for spaces at
the end of the name, to prevent copying those.

It also moves some logic from the "mouseup" function, and moved memory
deallocation within the same function where it got allocated.
2017-12-05 09:22:07 +01:00
Michael Steenbeek 60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
Ted John 3de8e0d37e
Merge pull request #6772 from IntelOrca/remove-rct2-interop-2
Remove RCT2 interop
2017-12-04 20:10:35 +00:00
Michael Steenbeek 078c2d22c1 Make use of ride preview images clearer and more future-proof 2017-12-04 20:11:38 +01:00
Aaron van Geffen db5b72c360 Fix #6782: Steam overlay checkbox widget not displayed correctly. 2017-12-04 20:10:29 +01:00
Michael Steenbeek 407f1ad148
Create scenery_small_entry_has_flag() 2017-12-04 20:09:38 +01:00
Ted John 99d7aaa2d6 Remove RCT2 interop 2017-12-04 19:04:06 +00:00
Michael Steenbeek b9a6382557 Remove unused tutorial and guest number strings 2017-12-04 11:27:37 +01:00
Aaron van Geffen 1ef73997b5 Removed interface to window limit setting. 2017-12-04 11:26:53 +01:00
Aaron van Geffen c000263bbb Remove construction marker colour option. 2017-12-04 11:26:53 +01:00
Aaron van Geffen 38d45a102b Remove interface to option for handymen mowing by default. 2017-12-04 11:26:53 +01:00
Michael Steenbeek c83b2e31cc Replace magic number check for food and drink items with a function call 2017-12-04 10:40:41 +01:00
Michael Steenbeek b0c784ed71 Fix # 6775: New Campaign window only shows 40 rides 2017-12-04 08:35:33 +01:00
Aaron van Geffen 837b177d9d Simplify UI scaling display quality options (#6764)
Simplify UI scaling display quality options.

This removes three options:
* 'Use NN scaling at integer scales', as NN is decidedly preferable at integer scales.
* Anisotropic scaling, as it produces results very similar (if not equal) to linear scaling.
* NN as a selectable option in the dropdown - NN is forced on integer scales and unavailable for non-integer scales.
2017-12-03 22:35:16 +01:00
Michael Steenbeek 63f7820b25 Fix #1185: Close button colour of prompt windows does not match 2017-12-01 17:36:30 +01:00
Ted John 47a68e9e90 Add constant for maximum zoom level 2017-11-30 21:21:38 +00:00
Michael Steenbeek 3f8556c85a Fix #6294: Refactor Editor::SelectedObjects 2017-11-28 13:38:54 +01:00
Michał Janiszewski 14f39e189d Fix building 2017-11-26 21:24:57 +01:00
Michał Janiszewski b7ecaf6ae0 Fix StaffList.cpp compilation 2017-11-26 20:36:03 +01:00
Hielke Morsink 59cfc3459d Add clear button 2017-11-26 13:44:45 +00:00
Hielke Morsink c648a60502 Add search box to track list window
This adds a vector of indices used for the track designs array, which is
used instead of the window list index.

Some other things I've edited that are not directly related to this
commit:

- Orders widgets in logical order like how they appear on screen
- Adds some comments to existing code
2017-11-26 13:44:45 +00:00
rwjuk d920083503 Fix #6663: Object load error window filename corruption 2017-11-24 07:53:49 +01:00
Marijn van der Werf f19344aea6 Move tile inspector to UI module 2017-11-23 23:12:25 +01:00
Ted John 323b8dd352 Partially fix #6129: Guest List not updating after a ride rename
- Force refresh of ride list and guest list for both rename ride and demolish ride actions.
2017-11-23 09:40:39 +01:00
Ted John 53493d0977 Name only flag for banner objects 2017-11-22 22:06:56 +00:00
Ted John ef65a5208b Rename fields in rct_scenery_group_entry 2017-11-22 21:42:41 +00:00
zyliwax 7bffc4ae33 Adding gridlines display toggle shortcut. (#6313)
This feature existed in the original RCT1/2 games but was not present in
the latest development commit.

The original shortcut for this key was '7', placing it between the
"Invisible people toggle" (6) shortcut and the "Height marks on land
toggle" (8). This commit preserves as much as possible, using
placeholder comments that signify the relevant values which this
feature actually uses where this is not possible.
2017-11-22 12:02:23 +00:00
Ted John a98c936316 Fix #5636: Pausing the game shows mute button as active 2017-11-21 23:23:43 +00:00
Michael Steenbeek c1400a12eb Allow separate ride and vehicle names per ride entry 2017-11-21 18:55:42 +01:00
Michael Steenbeek 76dc490fca Clip available vehicles string in New Ride window 2017-11-21 18:28:21 +01:00
Michael Steenbeek 2a01c22e8c Raise vehicle tab window height to avoid text clipping 2017-11-21 15:10:35 +01:00
Michael Steenbeek adae6041f3 Show list of available vehicles in New Ride window 2017-11-20 19:42:29 +01:00
Hielke Morsink b3f9fb5299 Invalidate ride window when opening/closing all
The ride window was not invalidated, resulting in old text being still
visible inside the list. This was especially noticable when the game was
paused.
2017-11-20 18:28:22 +01:00
Ted John 8c53b6a70b Fix #6681: Tons of visual glitches when zooming out
Regression from #6574. Restoring the backup of SPR_TEMP was removed which was necessary as it is the sprite for grass tile zoomed out. Instead make SPR_TEMP a special sprite ID which is not used for anything else apart from temporary sprite drawing.
2017-11-20 13:48:00 +00:00
Michael Steenbeek dd8464f907 Refactor small, large and wall scenery 2017-11-20 14:40:56 +01:00
Michael Steenbeek bf69b2e682 Make terminology use more consistent 2017-11-20 11:20:04 +01:00
Ted John 38024bbd0d
Merge pull request #6699 from IntelOrca/refactor/available-entertainers
Refactor entertainer invented logic
2017-11-19 23:46:54 +00:00
Michael Steenbeek e3ab7e723d Fix #6701: assertion on string ID -2 and name it 2017-11-19 22:22:04 +01:00
Ted John 3251af4f30 Refactor entertainer invented logic
Remove hard dependency on scenery window by calling a new is scenery set invented function. I don't think this the performance is any worse as it called init_scenery anyway for every call to get_available_entertainers.
2017-11-19 16:06:10 +00:00
Marijn van der Werf 67ebf40f83 Move main editor window to UI project 2017-11-18 21:07:21 +01:00
Marijn van der Werf dceb403ca9 Move editor bottom toolbar to UI module 2017-11-18 21:07:21 +01:00
Marijn van der Werf 8b7322ad6e Move bottom toolbar to UI module 2017-11-18 21:07:21 +01:00
Marijn van der Werf 3d7867791d Move scenery window to UI module 2017-11-18 21:07:21 +01:00
platipo 789b47b7bb Refactor slope flags and path type flag 2017-11-18 12:58:27 +01:00
Michael Steenbeek bb483b0c5f Replace direct access to large scenery colour with helper functions 2017-11-17 22:54:54 +01:00
Enrico Paganin c2bf44ab1b Refactor scenery flags
Every SCENERY_GHOST_FLAG_X is connected with its respective
SCENERY_TYPE_xxx flag
2017-11-17 17:03:57 +01:00
Michael Steenbeek 3bd68947b9 Create functions for getting large scenery type and sequence 2017-11-17 12:56:08 +01:00
Michael Steenbeek e12de39407 Fix include 2017-11-17 12:54:47 +01:00
Michael Steenbeek dd6257af1e Tackle the two residual usages of the colour property 2017-11-17 12:54:47 +01:00
Michael Steenbeek 60d5d5ca1e Cleanup 2017-11-17 12:54:47 +01:00
Michael Steenbeek f448d16707 Add methods for getting and setting track element type 2017-11-17 12:54:47 +01:00