Commit Graph

1142 Commits

Author SHA1 Message Date
Ted John cf1a4c9d66 Fix #8754: Crash when downloading objects due to race condition
Use stack allocated buffer for string format arguments instead of the
global argument buffer as this is performed on a background thread.
2019-02-26 09:06:02 +01:00
duncanspumpkin 737c308e4e Use IsGhost() to access ghost state
Added set and clear ghost to further prevent direct access to flags
2019-02-25 15:12:35 +00:00
duncanspumpkin dffa56aca2 Create a class for the quarter tile
Finish implementing TrackQuarterTile

Rename class
2019-02-25 13:51:00 +00:00
Duncan 94b5133388
Merge pull request #8737 from duncanspumpkin/load_or_quit_ga
Add LoadOrQuitAction
2019-02-25 11:28:57 +00:00
Michael Steenbeek 336e2cafce
Fix #4094: Long flat-to-steep pieces are offered in diagonal building mode 2019-02-25 12:02:27 +01:00
Michael Steenbeek ec2d609200
Merge pull request #8734 from Broxzier/feature/multiplayer-tweaks
Disable kick button when unable to use it + slight refactor
2019-02-25 10:34:56 +01:00
Ted John 8def463360 Fix #8513: invalid read access in window_footpath_set_provisional_path_at_point 2019-02-24 17:39:22 +01:00
ζeh Matt 92b6ed5a94
Merge pull request #8751 from ZehMatt/fix-8741
utf8* string refactor.
2019-02-24 17:33:37 +01:00
Nathaniel Ngo 300fd3a589 Fix for Issue#8725: refactoring _currentTrackBegin and _previousTrackPiece to use CoordsXYZ struct (#8759)
* Refactored _currentTrackBeginX, _currentTrackBeginY, _currentTrackBeginZ to use a CoordsXYZ struct

* Refactored _previousTracPieceX, _previousTrackPieceY, _previousTrackPieceZ to use a CoordsXYZ struct

* Refactored _currentTrackBegin and _previousTrackPiece in source files

* Fixed clang formatting
2019-02-24 09:15:31 +00:00
Matt a7f8c8aa36 Refactor utf8* use over std::string 2019-02-24 00:08:05 +01:00
duncanspumpkin b60d97ef55 Use enum values for the savePromptMode 2019-02-22 09:08:04 +00:00
duncanspumpkin eadef45ffd Add LoadOrQuiteAction 2019-02-22 09:00:38 +00:00
Hielke Morsink d460443305 Introduce network permission enum
This enum needs to match the vector. To make sure their sizes are equal,
the vector has been changed to an std::array.
2019-02-21 19:50:07 +01:00
Hielke Morsink 0adbd1f43a Enable kick button only when able to use it
Now it's disabled:
 - When lacking the kick permission
 - The player is the host
 - You are the player
2019-02-21 19:50:05 +01:00
duncanspumpkin 3a615c2126 Use new game action for callees 2019-02-21 16:00:31 +00:00
Ted John 4013479094 Refactor marketing to be a single vector 2019-02-20 16:49:02 +00:00
duncanspumpkin 1418975d84 Fix shop construction on client 2019-02-19 15:20:55 +00:00
duncanspumpkin 6375d2537a Move and refactor shop interact with path code to prevent possible desync 2019-02-19 15:20:49 +00:00
duncanspumpkin 09bb99d9e8 Fix clang format and travis errors
Minor refactor

Move key callback code into callbacks. Fixes shop placement

Use rotate_map_coordinates
2019-02-19 12:31:22 +00:00
duncanspumpkin 8bf3689d42 Introduce flag to prevent ghosts in multiplayer
Fix error message arguments

Remove dead code. Fix clang format
2019-02-19 12:31:11 +00:00
duncanspumpkin 77b25714ff Move callbacks into GameActionCallbacks
Remove remaining references to game command
2019-02-19 12:30:42 +00:00
duncanspumpkin 650e8291d0 Start moving track place into GameAction framework 2019-02-19 12:30:33 +00:00
Ted John cce979f96b
Remove logic for required objects (#8718)
This allows TARMAC to be removed when `remove_unused_objects` is called.
2019-02-19 11:55:43 +00:00
Michael Steenbeek 2a4215a30f
Create constant for SCROLLING_MODE_NONE 2019-02-14 22:41:48 +01:00
Ted John ba445cb6ef Pass Ride* instead of ride_id_t 2019-02-13 20:16:42 +00:00
Ted John fdf9f36fab Pass Ride* instead of ride_id_t 2019-02-12 23:58:45 +00:00
Ted John 9e461b2e34 Pass Ride* instead of ride_id_t 2019-02-12 23:29:38 +00:00
Ted John 9706dd8675 Pass Ride* instead of ride_id_t 2019-02-12 23:29:37 +00:00
Ted John aaacece0ea Pass Ride* instead of ride_id_t 2019-02-12 23:29:37 +00:00
duncanspumpkin 866d143930 Move Pause Toggle into the GameAction framework 2019-02-11 10:46:12 +00:00
Matt 34260cb6ca Replace old game command reference. 2019-02-08 18:03:06 +01:00
Matt d87ca57e72 Replace game command references with new game action. 2019-02-08 18:03:06 +01:00
Ted John 907e43acd8
Merge pull request #8670 from IntelOrca/feature/download-objects
Auto-download missing objects
2019-02-08 12:55:05 +00:00
Michał Janiszewski 2f16ad164d
Merge pull request #8671 from tomlankhorst/cmake-link-with-platform
Link targets with platform specific libs
2019-02-07 23:40:46 +01:00
Ted John 535b075310 Reduce button text further and add tooltips 2019-02-07 22:00:30 +00:00
Ted John b74a21bf54 Fix no network builds 2019-02-07 21:59:15 +00:00
Ted John 0d138c96cf Fix signed / unsigned comparison 2019-02-07 21:59:15 +00:00
Ted John 3aa55ff875 Refactor and improve download of objects 2019-02-07 21:59:15 +00:00
Ted John 5fb3c10c3a Make download objects async with progress 2019-02-07 21:59:15 +00:00
Ted John 27f70e3656 Get basic object downloading working 2019-02-07 21:58:34 +00:00
Matt 598ea08529 Update copyright. 2019-02-07 18:50:58 +01:00
Matt 57eccef347 Move format_readable_size and format_readable_speed into Localisation 2019-02-07 18:50:58 +01:00
Matt f310fd2e07 Start graph with emptied window. 2019-02-07 18:50:58 +01:00
Matt 16bf190f7a Use localisation for speed and size information. 2019-02-07 18:50:58 +01:00
Matt ecd4f61115 Add Network window 2019-02-07 18:50:58 +01:00
Aaron van Geffen 3be6137fde
Rename event_07 to periodic_update. (#8684) 2019-02-07 17:46:52 +01:00
duncanspumpkin 892d6dc5f7 Be explicit about nullptr checks.
Keep travis happy
2019-02-07 10:16:01 +00:00
duncanspumpkin 11c16955c5 Small refactor to use enum class 2019-02-07 08:14:45 +00:00
duncanspumpkin 201db19d0a Move Ride Set Appearance into action framework 2019-02-07 08:14:45 +00:00
Hielke Morsink 27a64f71c8 Fix #8682: Autosave settings don't react to user input
Regression from #8648.
2019-02-06 23:18:45 +01:00
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