Commit Graph

169 Commits

Author SHA1 Message Date
Hielke Morsink 4b4b3333d6
Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
ζeh Matt 0be585024f
Merge pull request #15232 from ZehMatt/refactor/gNetwork
Move network instance to Context
2021-08-30 14:17:15 -07:00
Hielke Morsink 956e77f4c3
Use [[nodiscard]] for allocator and RAII functions (#15244) 2021-08-23 20:09:43 +02:00
Hielke Morsink 6011478590 Directly use std::unique_ptr prvalues
This removes the unnecessary constructor calls and improves flexibility in case of typename changes.
All cases, except for the one in Context.cpp, are temporaries.
2021-08-20 23:38:15 +02:00
ZehMatt 72a6373520
Guard code with DISABLE_NETWORK 2021-08-17 11:30:13 +03:00
ZehMatt 4ece997ff3
Remove unused function network_close 2021-08-17 06:33:50 +03:00
Silent 94da3cf422
Fix #13445: Make FileScanner::ScanDirectory return a unique_ptr
Also fixes a resource leak in TitleSequence::GetSaves.
2021-05-20 19:22:36 +02:00
Geoff B 6c8493cb69
Close #14253: Replace font size tokens with adjusted DrawText calls 2021-03-27 14:40:17 +01:00
Gymnasiast c40701d997
Make gfx_draw_string() take a TextPaint argument 2021-02-28 00:26:20 +01:00
Gymnasiast 503273793a
Remove gCurrentFontSpriteBase from some functions 2021-02-28 00:26:20 +01:00
Ted John 477677775f Fix crash if save does not exist 2021-02-08 22:27:28 +00:00
Ted John 129d85fa57 Implement title sequence playing 2021-02-08 22:27:28 +00:00
skdltmxn b0a8ebc808
Refactor to use push_back more efficient (#13726) 2021-01-08 20:59:55 +00:00
Kevin Singh 3feefb09b1
Close #12443: Refactor TITLE_SCRIPT to use strong enum (#13540)
Close #12443: Refactor TITLE_SCRIPT to use strong enum
2020-12-10 08:01:54 -03:00
Ted John 517e964975 Fix title screen and object manager text issues 2020-11-27 18:54:58 +00:00
Ted John b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +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
Matt 091145037e
Move the audio code into OpenRCT2 namespace 2020-10-07 00:34:42 +03:00
Duncan 2063aea5ef
Remove common format formatter where possible (#13034)
* Remove common format formatter where possible

Eventually should have it limited to tooltips, window titles and widget args

* Remove remaining paint functions using common

* Remove misuse of gCommonFormatArgs
2020-09-30 22:42:04 +01:00
Matt 005e1e0e1f
Final cleanup
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:23:51 +03:00
Matt 850b10f1fd
Fix memory leak
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:23:41 +03:00
Matt f765ed2f94
Use unique_ptr for TitleSequenceParkHandle Stream
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:23:28 +03:00
Matt e3a4d6a245
Use std::string for TitleSequenceParkHandle HintPath
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:23:01 +03:00
Matt 17bff41e82
Use std::unique_ptr for TitleSequenceParkHandle
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:22:44 +03:00
Matt 464545b907
Cleanup remnants
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:22:35 +03:00
Matt 668bd8dc9b
Use std::string for TitleSequence paths
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:22:25 +03:00
Matt f586981cd3
Use std::string for TitleSequence names
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:22:12 +03:00
Matt 612249bd74
Use vector for TitleSequence commands
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:21:58 +03:00
Matt 7245f23422
Use vector for TitleSequence saves
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:21:42 +03:00
Matt ccb6eb06f8
Use unique_ptr for TitleSequence instances
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:21:27 +03:00
Matt c23e2621a5
Cleanup string usage
Co-authored-by: Gabriel Guedes <gabriel.guedesaz@gmail.com>
2020-09-29 23:21:03 +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
Michael Steenbeek 55722a7ad4
Remove commented-out code (#12834) 2020-09-01 15:33:52 -03:00
Sidney 933570fd62
Close #12442: Refactor SCENARIO_SOURCE to use strong enum (#12608) 2020-08-08 09:38:43 -03: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
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
frutiemax 280a21fa30
Fix #12095: Use ScreenRect on gfx_set_dirty_blocks (#12106) 2020-07-08 13:16:24 -03:00
Tulio Leao 1a7943a5ab Make DrawOpenRCT2 use ScreenCoordsXY 2020-06-21 16:30:58 -03:00
TomasZilinek 9fde6a74c3
Close #11561: Use ScreenCoordsXY in gfx_draw_string()
* Fix #11572 create gfx_draw_string() overload

created the overload and changed all calls of the old function to the new (using const ScreenCoordsXY&)

...
2020-05-10 09:49:15 -03:00
Ted John 6db16ffcad
Implement showTextInput plugin API (#11678) 2020-05-09 14:18:50 +01:00
Michael Steenbeek 948c393bc1
Fix #8110: Use a single name for the title sequences directory (#11545) 2020-04-30 18:50:26 +02:00
Tulio Leao 116bcb5ccb
Use named casts on openrct2/(util|windows|scenario|title) (#11146) 2020-04-17 19:45:19 +02:00
Aaron van Geffen acc6cffad3 Apply clang-format. 2020-01-22 11:41:34 +01:00
Michael Berk 914c07a711 Added Random Title Sequence 2020-01-22 11:41:34 +01:00
Michael Steenbeek d7f23bc5bf
Close #6898: Remove LOADMM and LOADRCT1 commands (#10546) 2020-01-12 14:26:33 +01:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John 08b02943d3 Use std::string for scenario name, details etc. 2018-12-16 19:01:14 +00:00
Hielke Morsink 354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00