Commit Graph

108 Commits

Author SHA1 Message Date
Michael Steenbeek a018787c91
Fix #14295: Assertion hit in Audio.cpp 2021-03-19 11:58:50 +01:00
Ted John a9755609c2 Move ride audio into own namespace 2021-01-27 18:45:28 +00:00
Ted John 28f4ec2b43 Implement code review suggestions 2021-01-27 18:45:28 +00:00
Ted John d9b8413ec4 Use IStream for zip streaming 2021-01-27 18:45:27 +00:00
Ted John 2f39442d25 Implement ride music objects and refactor 2021-01-27 18:45:27 +00:00
Hielke Morsink f0c1ea1d37
Split declarations and definitions to improve compile times when editing (#13332)
* Split FileStream declarations and definitions

* Split JobPool declarations and definitions

* Split StringBuilder declarations and definitions

* Split StringReader declarations and definitions

* Split ZoomLevel declarations and definitions

* Fix missing include in FileClassifier.cpp

* Remove pragma once from source files

* Fix missing include in StringBuilder.h

* Update Xcode project

* Fix compilation of tests

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-07 12:42:04 +00:00
Duncan 250586cb45
Port some OpenLoco helper functions (#13113)
* Port some OpenLoco helper functions

Added a few helper functions from OpenLoco to make viewport code a bit simpler
2020-10-12 22:25:11 -03:00
Matt 7045fd9e9f
Minor cleanup 2020-10-07 01:10:53 +03:00
Matt 091145037e
Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Matt 86b1c0dbe1
Minor cleanup around audio code 2020-10-06 23:31:51 +03:00
Gymnasiast 31d20cefb2
Rename rain to weather where appropriate
Co-authored-by: Brett Penzer <brettpenzer123@live.co.uk>
2020-09-14 21:57:54 +02:00
Matt 0dc43d66e4 Remove the use of INTERFACE macro and macro its self 2020-08-05 16:30:44 +02:00
Matt 83355e35cc Move IStream, MemoryStream, FileStream into OpenRCT2 namespace 2020-08-05 16:29:36 +02:00
Matt 30376085cf Include missing headers 2020-08-05 16:29:29 +02:00
pizza2004 156be224f9
Close #12399: Refactor MIXER_GROUP to strong enum (#12531) 2020-08-03 20:51:12 -03:00
frutiemax 6598ae14aa Close #12457: Rename INTRO_STATE to use PascalCase 2020-07-26 09:32:53 -04:00
frutiemax 0f1788d273 Part of #12457: Refactor INTRO_STATE to use strong enum 2020-07-26 09:25:29 -04:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Hudson Oliveira 0d20b52949
Part of #9473: Vehicle sounds update functions (#12001)
* Extract functions for sound frequency

* Pass only SoundId and volume to sounds update

* Create class Sound

* Pass only the corresponding Sound object

* Unify update sound functions

* Fix compilation errors

* Rename Sound1|2 to TrackSound and OtherSound
2020-06-21 17:16:32 +01:00
Michał Janiszewski 2323cc1596
Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Ted John d34dec9c27 Create ZoomLevel struct to add two new zoom levels 2020-03-23 15:54:03 +00:00
Aaron van Geffen dbeef78778
Fix #10914: Missing sounds, including guest purchase sound (#10948)
Regression from 09fad0ef7f (part of #10854).
2020-03-16 22:51:32 +01:00
Michael Steenbeek 8351a0477d
Merge pull request #10854 from tupaschoal/coords-3
Increase usage of ScreenCoordsXY on viewport functions and structs
2020-03-05 12:21:04 +01:00
Tulio Leao 09fad0ef7f Change rct_viewport to use ScreenCoordsXY 2020-03-02 20:50:58 -03:00
UltimaBGD 2d35c50a9a Refactor gVehicleSoundParamsList to use std::array 2020-03-01 14:29:17 -03:00
Gymnasiast 62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ 2019-12-23 20:08:37 +01:00
Gymnasiast 7d11858dbe
Create getter for GetBaseHeight()/GetClearanceHeight() 2019-12-23 20:05:24 +01:00
Matt 1e1dd2fc2f
Increase the number of ride music played simultaneously to 32 2019-08-25 18:14:25 +02:00
duncanspumpkin 6da5eb9d30 Use coordsXYZ for audio_get_params_from_location 2019-08-19 20:04:58 +01:00
duncanspumpkin 5fe5f8e964 Refactor audio_play_sound_at_location to use CoordsXYZ 2019-08-19 20:04:58 +01:00
duncanspumpkin 5333dc4295 Return a SurfaceElement from get_surface_element 2019-08-19 20:04:56 +01:00
Duncan ab5f5b20cd
Use enum class for RCT2_SOUND (#9618)
* Use enum class for RCT2_SOUND

* Fix formatting. Fix mistaken declaration.

* Change name of enum to SoundId

* Fix clang format
2019-07-22 19:02:45 +01:00
Cody Brittain 5342a6d9a9 Renamed sound enums for accuracy and organization 2019-07-20 12:41:36 +02:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John eaa671632f Fix formatting 2019-02-13 20:31:55 +00:00
Ted John fd090f5ef3 Refactor PickRideToGoOn 2019-02-12 23:29:38 +00:00
Ted John 8701286772
Use new ride_id_t typedef (#8561) 2019-01-12 10:11:55 +00:00
Michael Steenbeek f8add7f62e
Rename rct_tile_element to TileElement 2018-11-01 13:53:50 +01:00
Hielke Morsink c99d28116f Fix muting game sounds instead of master sound
Clicking mute from the top toolbar or from with the hotkey will toggle the master volume instead of the game volume now, and invalidates the options window to immediately make the checkbox visible.
2018-08-17 22:14:11 +02:00
Linus Unnebäck fd07be587a
Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
clang-format d787872cbe Indent preprocessor directives 2018-07-23 16:00:23 +02:00
clang-format 95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
clang-format 77f3513cba clang-format audio 2018-07-23 15:58:02 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Michael Steenbeek ec3a1e575e
Replace Math::Min and Max with std variants 2018-06-20 17:11:35 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Hielke Morsink aad1e69d7e
Add parentheses to macro arguments (#7686)
This adds parentheses around macro arguments that are either negative or used for calculations inside the macro itself. Doing this avoids getting errors in code that may look right.
2018-06-15 10:54:05 +02:00
Hielke Morsink 204dd4439b Mark unused arguments in the libopenrct2 project
For dummy classes and functions with empty bodies I've only commented out the arguments, for all others I used C++17's [[maybe_unused]].
2018-06-06 21:03:11 +02:00
Ted John 46300f216f Fix #7544: Freeze when starting headless server with no arguments
Fixes #7313: Loading an invalid path with openrct2 produces results different than expected

Do not load title sequences in headless mode and prevent use of null audio mixer when ride music is stopped.
2018-05-20 02:21:44 +01:00
Ted John 7b610fd3c0 Use shared_ptr more for UiContext in relation to DrawingEngine 2018-05-11 20:37:48 +01:00