duncanspumpkin
8a69b89df6
Move Staff Set Orders into game action framework.
...
Split up costume and order game commands
2019-02-05 20:38:18 +00:00
Duncan
c436a656ad
Merge pull request #8666 from cgdolan/develop
...
Implement game action for sign set style
2019-02-05 20:35:11 +00:00
Tom Lankhorst
94758bccf6
Link with platform libraries
2019-02-05 20:17:14 +01:00
Michał Janiszewski
4192ffe57e
Improve cmake for MSVC ( #8581 )
...
* Improve cmake for MSVC
* Fix mingw builds
2019-02-05 16:12:58 +01:00
Michał Janiszewski
8a395e3706
Fix misaligned access ( #8665 )
...
Platforms like ARM are very sensitive to unaligned access. This change
makes sure the addresses obey the C++ standard and are properly aligned.
2019-02-04 23:15:14 +01:00
Christopher G. Dolan
075983da0f
Implement game action for sign set style
2019-02-03 22:20:01 -08:00
Michał Janiszewski
6bdbe248fd
Merge pull request #8641 from tomlankhorst/use-lto
...
Detect availability of LTO, apply when available
2019-02-04 00:06:37 +01:00
Tom Lankhorst
ce6e08c633
Introduce SET_CHECK_CXX_FLAGS
2019-02-03 23:32:51 +01:00
Tom Lankhorst
521948139c
Chat toggle button ( #8648 )
...
* Add chat_available()
* Add appropriate strings
* Add new Chat icon
* Implement Chat button
* CS
* Fix chat icon
* Make chat icon a bit smaller and less bright
* Update chat icon
* Update changelog
2019-02-03 23:30:34 +01:00
Michał Janiszewski
7655ba7746
Make screenshot return path to file
2019-01-31 23:36:41 +01:00
Tom Lankhorst
87d9932792
Conditionally enable IPO
...
Put corresponding functionality in `cmake/ipo.cmake`. This directory
allows for future further separation of build concerns.
2019-01-27 12:58:19 +01:00
Tom Lankhorst
06600440fe
Enable LTO/IPO on Clang and GCC
2019-01-27 12:58:19 +01:00
Michael Steenbeek
4e9d2ce764
Split footpath object into two internally
2019-01-20 21:38:38 +01:00
Tom Lankhorst
ddf4c32644
Fix #8588 : Guest list scrolling breaks above ~2000 guests
2019-01-20 11:55:29 +01:00
Tom Lankhorst
2695142fbf
Fix console opening when only opening and closing debugging tools dropdown
2019-01-20 11:22:25 +01:00
Lars Toenning
7de115263e
Fix #8377 : Change number of autosaves that are stored ( #8440 )
2019-01-19 14:31:12 +01:00
Michael Steenbeek
b4bef2fe7d
Merge pull request #8560 from richard-fine/directions
...
Begin cleanup of direction handling
2019-01-18 19:09:39 +01:00
Ted John
92412d4bab
Store ride index inside ride struct
2019-01-18 11:46:18 +01:00
Gymnasiast
87f894079b
Replace hardcoded occurrences of RIDE_ENTRY_INDEX_NULL
2019-01-12 12:48:35 +01:00
Gymnasiast
74a3674e86
Replace more hardcoded instances of RIDE_ID_NULL
2019-01-12 12:38:23 +01:00
Ted John
8701286772
Use new ride_id_t typedef ( #8561 )
2019-01-12 10:11:55 +00:00
Michael Steenbeek
fdba61002f
Add station index to Tile Inspector
2019-01-08 11:25:12 +01:00
Michał Janiszewski
39b59b1185
Merge pull request #8549 from janisozaur/sdl2-prefix
...
Drop SDL2/ prefix on includes
2019-01-07 22:32:26 +01:00
ζeh Matt
eb4ddebe3e
Merge pull request #8525 from ZehMatt/ga-scenery-remove
...
Implement scenery remove game actions.
2019-01-07 19:50:40 +01:00
Aaron van Geffen
2427b67374
Fix #8555 : Multiplayer window text limits are not computed properly.
2019-01-07 12:17:37 +01:00
Matt
9f613833ce
Rename actions.
2019-01-07 09:04:51 +01:00
IntelOrca
b9fd90ffd3
Implement ClearAction.
2019-01-07 09:04:51 +01:00
Matt
d7096f71cb
Implement SceneryRemoveLargeAction.
2019-01-07 09:04:51 +01:00
Matt
b34b09c6bb
Implement SceneryRemoveSmallAction.
2019-01-07 09:04:51 +01:00
Michał Janiszewski
ecfbf60cc4
Drop SDL2/ prefix on includes
...
pkg-config, cmake, all demos and tests define the path with SDL2/
already included.
2019-01-06 17:29:29 +01:00
Richard Fine
e90e9dd73f
Introduce many uses of direction_reverse
...
Change many of the places doing the ^2 trick to use direction_reverse instead, for improved readability.
2019-01-05 15:41:46 +00:00
Hielke Morsink
53ae48ffca
Merge pull request #8550 from janisozaur/fallthroughs
...
Fix implicit fallthroughs
2019-01-04 23:27:02 +01:00
Hielke Morsink
5ef5e4153d
Fix some more implicit and conditional fallthroughs
2019-01-04 22:26:56 +01:00
Michał Janiszewski
8a70b29f64
Fix GCC's warning regarding enum vs non-enum values being compared ( #8551 )
2019-01-04 21:29:44 +01:00
Michał Janiszewski
7e769ed662
Fix #7536 : Android build fails to start ( #8554 )
...
This was a regression from #7435 which introduced threads and caused JNI
to misbehave and fail to load our expected classes. Provide a workaround
based on the description in https://stackoverflow.com/a/16302771 which
stores a main thread's class loader and uses that in neighbouring
threads.
2019-01-04 19:48:26 +01:00
Michael Steenbeek
31298bd772
Merge pull request #8543 from IntelOrca/refactor-ride
...
Refactor ride structure
2019-01-02 22:38:20 +01:00
Michał Janiszewski
c5e1abcfb1
Fix implicit fallthroughs
2019-01-02 22:30:57 +01:00
Michael Steenbeek
b5317ee9e9
Split drawing of path and railing
2019-01-02 19:52:53 +01:00
Ted John
38f632074b
Merge ride track colour arrays into one
2019-01-01 21:25:34 +00:00
Ted John
37f76d1687
Move station fields into new station struct
2019-01-01 02:26:14 +00:00
Matt
d3a20df682
Fix track designs ignoring ghost/preview flags.
2018-12-29 19:23:28 +01:00
Ted John
fa3374c827
Fix #8484 : Object selection doesn't work
...
Revert change to _filter_object_counts from d145ae6922
2018-12-22 11:18:17 +00:00
Matt
4dce91e027
Move defines into Colour.h
2018-12-20 22:29:16 +01:00
Matt
c4c4f46b78
Use different colours for entrance/exit on track design previews.
2018-12-20 22:27:01 +01:00
ζeh Matt
c457de1ece
Fix #8402 : prevent dereferencing invalid iterator ( #8504 )
2018-12-20 22:25:10 +01:00
Ted John
abbdab9b6d
Merge pull request #8452 from IntelOrca/change-structures
...
Change a few structures from fixed to C++
2018-12-16 19:01:36 +00:00
Ted John
08b02943d3
Use std::string for scenario name, details etc.
2018-12-16 19:01:14 +00:00
Ted John
19a687f2fa
Change gParkEntrance to a vector so we can now have more than 4
2018-12-16 19:00:16 +00:00
Michael Steenbeek
59f9476ecd
Change 'entrance style' to 'station style'
2018-12-16 19:38:30 +01:00
Michael Steenbeek
e2a91e55e5
Fix compile error in EditorObjectSelection.cpp
2018-12-16 17:10:45 +01:00
Michael Steenbeek
d145ae6922
Fix #8450 : Track designer window has drawing problems and crashes
2018-12-16 10:02:40 +01:00
ζeh Matt
7d19a5bc77
Refactor memcpy to std::memcpy and memset to std::memset ( #8408 )
2018-12-15 22:23:31 +01:00
Michael Steenbeek
7d7e8e2638
Merge pull request #8453 from Gymnasiast/fix/8033
...
Fix #8033 : Crash when placing 64th sign
2018-12-15 21:24:09 +01:00
Michael Steenbeek
6d0f0334d7
Merge pull request #8339 from ZehMatt/realtime-ticks
...
Use real time ticks for UI effects.
2018-12-15 21:00:44 +01:00
Gymnasiast
806073ec59
Fix 'Object index exceeds maximum' spam
2018-12-15 20:34:28 +01:00
Gymnasiast
0d775f48ec
Clean up scenery ghost flags
2018-12-15 20:31:41 +01:00
Michael Steenbeek
705fb94f58
Fix #8406 : Add 'Entrance style:' label to Ride window
2018-12-15 19:00:37 +01:00
Hielke Morsink
04c3d9a97a
Fix #8443 : Crash when clicking default vehicle for hacked ride
2018-12-15 11:35:36 +01:00
Ted John
e2e2d4b7bf
Fix #8433 : Crash if master server response is not valid JSON
...
Protect fetch_servers_callback from bad JSON responses
2018-12-14 17:10:50 +00:00
Michael Steenbeek
cf44ea7e24
Fix #3832 : Track piece colour scheme paint not network-safe
2018-12-11 22:17:52 +01:00
Ted John
76d761c299
Fix #8414 : Rides tab in object selection window is broken
...
Widgets were still being created for disabled object types which were placed at same position as ride tab.
2018-12-10 19:50:12 +00:00
Ted John
9dc860b526
Fix compile errors
2018-12-10 00:26:12 +00:00
Ted John
4b77d76303
Hide new object tabs until we have new save format
2018-12-09 23:30:40 +00:00
Ted John
06f203a7e7
Implement surfaces, edges and stations as objects
2018-12-09 23:30:40 +00:00
roosen5
d9806305b0
Fix #8358 : infinite loop when changing vehicle count on stopped ride. ( #8375 )
...
The sprite_remove in Sprite.cpp tries to find itself inside the quadrant.
It does not find itself, and because the rest of the code assumes that it will always find it
The normal code tries to set the value of the next_in_quadrant so that whoever points at it, will now point at its next sprite.
But because it didn't find whoever was pointing to it, it would set the pointer to SPRITE_INDEX_NULL to its next sprite.
This would lead to cycles in the linked list
The reason that the sprite was not found is that during the entry of a ride, the position of a peep is set to LOCATION_NULL
Exiting a ride sets it back to whatever the location is of an exit.
However stopping a ride that still has people in it would go wrong, as the people are removed from the ride through ride_remove_peeps
This function was called during the PaintWindows.
The fact that this function is called during the painting is the problem, because of the tweening:
Before painting all the positions are stored (Which would at that point be the LOCATION_NULL), during the painting
the peep would be removed from the ride, setting their location to the enrance/exit
After painting is done all the positions are restored again, so the patched position is forgotten and then it would be
removing a sprite with location LOCATION_NULL and that goes wrong
The fix is to have the window update outside of paint
2018-12-09 20:46:04 +01:00
Matt
468d94a6ca
Remove gCurrentViewportFlags
2018-12-05 23:09:17 +01:00
ζeh Matt
dc7d14163f
Fix OpenGL renderer causing infinite loop on hacked surfaces. ( #8346 )
2018-12-05 23:00:08 +01:00
ζeh Matt
940fff4bbf
Fix dereferencing nullptr when game objects are missing. ( #8360 )
2018-12-05 22:59:15 +01:00
Matt
862ef3018c
Use gCurrentRealTimeTicks whenever appropriate.
2018-12-01 17:00:11 +01:00
Matt
4bc69a0111
Introduce gCurrentRealTimeTicks and refactor some variable names.
2018-12-01 16:36:00 +01:00
Michał Janiszewski
ebd4e8f5d6
Provide more checks when handling possibly-gone windows ( #8331 )
2018-11-30 23:32:55 +01:00
Hielke Morsink
354d973a48
Use std::size instead of Util::CountOf
2018-11-23 21:59:08 +01:00
Michał Janiszewski
0d2751a54e
Hide the network class declaration to Network.cpp ( #8276 )
...
The Network class is not used by anyone other than free functions in
Network.cpp, nor should it be used by anyone with the current design.
This change leaves only the publicly-exposed functions left in the
header, drastically reducing amount of required headers in network.h,
one of the heaviest headers we had so far.
2018-11-19 23:10:54 +01:00
ζeh Matt
3a1c14146a
Fix #8253 : Prevent null dereference.
2018-11-12 21:34:05 +01:00
Michael Steenbeek
82aba96728
Cheats: use 'weather' instead of 'climate' ( #8246 )
2018-11-10 14:30:41 +01:00
Hielke Morsink
107faaf821
Add and use game action for setting the climate
...
Also reordered the registered game actions the same as headers, so they are easier to find.
2018-11-08 22:39:13 +01:00
Hielke Morsink
2170c26e93
Include what gets used
...
To reduce including "big" files, like game.h", and just include the headers that are needed. Partly used IWYU to find the headers, but removed the ones that are hard requirements of included headers, like common.h and gameactions.h.
2018-11-07 22:19:33 +01:00
Hielke Morsink
7a57bf1d5c
Move climate dropdown from objective options to scenario options
2018-11-06 22:53:31 +01:00
ζeh Matt
223ae74c6b
Refactor code to obtain resolutions. ( #8215 )
2018-11-06 07:20:57 +01:00
Michael Steenbeek
df768a3fad
Fix #8201 : Only quarter scenery objects in one corner can be painted
2018-11-05 20:12:22 +01:00
Michael Steenbeek
f8add7f62e
Rename rct_tile_element to TileElement
2018-11-01 13:53:50 +01:00
Michael Steenbeek
f55f323723
Allow building footpaths on 'corner down' terrain
2018-11-01 11:04:32 +01:00
Michael Steenbeek
a8f526ae48
Allow on-ride photos and water S-bends on the Water Coaster
2018-11-01 10:12:45 +01:00
Michael Steenbeek
5f4cca3c7e
Remove rest of access to footpath edges
2018-10-31 15:08:06 +01:00
Michael Steenbeek
d89c3d9e67
Replace calls to get path edges
...
This replaces most calls/direct access to the footpath edges (i.e. the orthogonal directions, not the corners). This includes places where the whole byte was retrieved, but only compared against orthogonal directions.
2018-10-31 15:08:06 +01:00
Michael Steenbeek
84145a258d
Fix very misleading use of tileElement->type in a union
...
It was a sprite, accessed as if it was a tileElement. Neither the method nor the resulting code made any sense.
2018-10-31 13:12:18 +01:00
Michael Steenbeek
687fbc2a0a
Modify game_command_set_scenery_colour() to only take the scenery quadrant
2018-10-31 13:10:26 +01:00
Michael Steenbeek
0f4560598e
Replace residual access to path element entry index field
2018-10-31 13:09:29 +01:00
Michael Steenbeek
66cde65f87
Replace C style function for getting slope direction
2018-10-31 13:09:19 +01:00
Michał Janiszewski
74ee2cf741
Fix types of windows scenery tab selections ( #8179 )
2018-10-29 14:52:07 -07:00
ζeh Matt
3e457436b1
Refactor some painting code. ( #8144 )
2018-10-26 10:49:27 -07:00
Michał Janiszewski
95175b44e9
Prevent recently closed window from having actions performed on it ( #8143 )
...
Fixes #8121
2018-10-24 20:57:39 +02:00
ζeh Matt
f186860afd
Fix #8120 : Crash trying to place peep spawn outside of map
2018-10-20 12:53:23 +02:00
Michael Steenbeek
19471e54f4
Fix formatting
2018-10-17 21:55:12 +02:00
tombomp
c914c7d1e8
Fix #8101 : Title Sequences window flashes on opening
...
Previously a max value lower than min value was being passed to clamp.
WH2 seems the correct height for both min and max (tab doesn't change).
2018-10-17 14:15:27 +02:00
Michael Steenbeek
0ec3d90495
Fix #8102 : 'Create new title sequence' dialog is named 'Duplicate'
...
Not sure why it was done like this is the first place, considering the necessary string already existed.
2018-10-17 10:31:06 +02:00
tombomp
38cc4692f6
Fix #7473 : Disable audio on focus loss not correct
...
Previously only muted the volume if sound effects was enabled, but ride music is also a possible source of sound.
2018-10-16 23:07:41 +02:00
Michał Janiszewski
63c6486a7f
Add missing header guards ( #8081 )
2018-10-10 23:27:25 +02:00
Gymnasiast
59a0c6e487
Fix #8047 : Crash when using the paint tool and you click an entrance/exit
2018-10-09 22:15:12 +02:00
youngspe
c1cd8619e0
Fix #1496 : scrolling on touch devices ( #8060 )
...
* Fix #1496 : scrolling on touch devices
* correct formatting errors
2018-10-09 20:50:17 +02:00
Hielke Morsink
a15268be56
Fix #8062 : Unstable cheat warning only shown when disabled ( #8063 )
2018-10-08 00:01:40 +02:00
youngspe
c543c1078d
Fix 7760: Touchscreen presses are handled twice ( #8056 )
2018-10-06 17:43:39 +02:00
Hielke Morsink
f468bef6cc
Fix crash when map window tries to plot a ride entrances ( #8059 )
2018-10-06 14:14:09 +02:00
Gymnasiast
774d26306f
Fix formatting
2018-10-04 14:54:13 +02:00
Gymnasiast
015ece94c6
Replace C-style functions for getting path entries
2018-10-04 12:13:17 +02:00
Gymnasiast
ecd6247462
Replace C-style functions for checking getting path additions
2018-10-04 12:13:17 +02:00
Gymnasiast
37f59e17dc
Replace C-style isSloped() function
2018-10-04 12:13:17 +02:00
LRFLEW
c41f862920
Fix some memory leaks
2018-10-04 09:42:22 +02:00
Michael Steenbeek
0af198aa45
Use constants for flags
2018-10-03 12:31:02 +02:00
Michael Steenbeek
28e8b4e12b
Modify game_command_remove_scenery to take unshifted scenery quadrant
2018-10-03 12:31:02 +02:00
Michael Steenbeek
90d7e146f7
Clean up small scenery GC calls a bit
2018-10-03 12:31:02 +02:00
Michael Steenbeek
882a65e4c0
Port queue functions
2018-10-03 12:18:21 +02:00
Michael Steenbeek
f8483b4726
Fix formatting
2018-09-27 22:15:04 +02:00
Michael Steenbeek
3b7fc4cf8c
Port rest of banner functions
2018-09-27 22:15:04 +02:00
Michael Steenbeek
d01b21a1ac
Port banner index
2018-09-27 22:15:04 +02:00
Michael Steenbeek
3c93aca727
Port entrance station index and sequence lookup
2018-09-27 22:15:04 +02:00
Michael Steenbeek
c7eaa1ba80
Port entrance ride index lookup
2018-09-27 22:15:04 +02:00
Michael Steenbeek
cc7f8e612d
Port entrance type lookup
2018-09-27 22:15:04 +02:00
Gymnasiast
149ad183b8
Fix #8028 : Ride entrance sign click causes game crash
2018-09-27 19:39:36 +02:00
Gymnasiast
ed616b0fb5
Add assert; fix crash
2018-09-25 21:57:21 +02:00
Gymnasiast
eecf465e3b
Fix formatting
2018-09-25 21:57:21 +02:00
Michael Steenbeek
7643eea514
Fix window_ride_open_track()
2018-09-25 21:57:21 +02:00
Michael Steenbeek
897a2982a0
Move brake/booster speed functions to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
e6d5638815
Move inverted() functions to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
0cea008c18
Move cable lift functions to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
69f02400f9
Move GetColourScheme to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
a3e9c63fc3
Move GetRideIndex to struct methods
2018-09-25 21:57:21 +02:00
Michael Steenbeek
650971bc68
Move HasChain to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
67d7d5c022
Move getting station index to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
6bd732ce5a
Move getting seat rotation to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
ae4c464ce7
Move getting track sequence to struct methods
2018-09-25 21:57:21 +02:00
Gymnasiast
8908f3f47e
Move getting track type to struct methods
2018-09-25 21:57:21 +02:00
jensj12
eac9b720ee
Add #7726 : Shortcut to advance one tick ( #7851 )
2018-09-23 23:40:47 +02:00
Gymnasiast
7d7d0aeab5
Adopt OpenLoco's UTF-8 handling
2018-09-23 11:31:04 +02:00
Michał Janiszewski
fbb71c7c47
Fix Android builds after #7971 ( #8009 )
2018-09-20 21:53:34 +02:00
Michael Steenbeek
6062960390
Port remaining wall stuff to struct methods
2018-09-17 15:42:34 +02:00
Michael Steenbeek
508276b081
Remove lots of direct access to ->type fields
2018-09-17 15:18:07 +02:00
Michael Steenbeek
dcabdeb805
Move wall colour functions over to the struct methods
2018-09-17 14:22:17 +02:00
Gymnasiast
0f08128657
Fix formatting
2018-09-16 21:34:51 +02:00
Michael Steenbeek
74ccf010e6
Port surface elements to new structure
2018-09-16 21:34:51 +02:00
Michael Steenbeek
d186a04e4f
Remove case of direct access to direction
2018-09-16 21:34:51 +02:00
Michael Steenbeek
35b4724626
Port large scenery to new structure
2018-09-16 21:34:50 +02:00
Michael Steenbeek
1d3baef9b7
Remove some C-style tile element functions
2018-09-16 21:34:04 +02:00
Aaron van Geffen
47eea292b5
Allow assigning a keyboard shortcut for opening the tile inspector ( #7994 )
...
* Allow assigning a keyboard shortcut for opening the tile inspector.
* Only open when debug tools are enabled.
* Add changelog entry
2018-09-15 08:57:50 +02:00
Michael Steenbeek
0e998c2d78
Merge pull request #7988 from Gymnasiast/tile-element-makeover
...
Change tile elements to use the OpenLoco structure
2018-09-14 10:56:19 +02:00
Michael Steenbeek
1a825a4045
Small fixes
2018-09-14 10:18:46 +02:00
Aaron van Geffen
a5ad9a3729
Merge pull request #7971 from Osmodium/7930-part2-Add-open-folder-button
...
#7930 part2 add open folder button
2018-09-14 00:03:58 +02:00
Aaron van Geffen
d6769fafe2
Move title menu buttons up to compensate for new item.
2018-09-13 23:20:17 +02:00
Aaron van Geffen
e1d6585423
Simplify EscapePathForShell by using std functions.
2018-09-13 23:20:17 +02:00
Aaron van Geffen
cf6f8a356f
Merge pull request #7920 from ZehMatt/sprite-structs
...
Simplify sprite structs
2018-09-13 23:04:02 +02:00