1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 08:14:38 +01:00
Commit Graph

457 Commits

Author SHA1 Message Date
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
Basssiiie
5480c99e0b Rename previously unknown vehicle flags, and json strings to camelCase 2021-05-13 13:34:32 +02:00
Gymnasiast
b627dbd3a4 Apply review requests 2021-03-31 19:15:33 +02:00
Gymnasiast
b3bbdcbfd5 Remove hardcoded terrain style constants from RCT1 and MapGen 2021-03-27 17:34:10 +01:00
Michael Steenbeek
f0dc28e9fc Update objects to v1.0.21 2021-03-12 11:04:04 +01:00
Michael Steenbeek
9d1643d3ce Fix #14217: Crash in large_scenery_paint() 2021-03-07 00:08:51 +01:00
Michael Steenbeek
64807147e6 Fix #14126: assertion in research_fix()
The assertion was hit because of a non-existant ride type being passed into ride_type_set_invented(). Try to avoid this by fixing DAT files when loading them.
2021-03-06 20:57:48 +01:00
Gymnasiast
d5f79b7972 Replace gfx_draw_string_centred() with DrawTextBasic() 2021-02-28 00:23:00 +01:00
Michael Steenbeek
28c680f97f Merge pull request #14163 from Gymnasiast/refactor/get-rtd
Use GetRideTypeDescriptor() in more places
2021-02-26 10:46:38 +01:00
Gymnasiast
44d0e77afb Make all access to RTD table use the bounds checking function 2021-02-26 10:01:00 +01:00
Michał Janiszewski
6baff43f52 Reduce inclusion of Sprite.h 2021-02-25 10:56:27 +01:00
Michał Janiszewski
9aef29361f Default-initialise more fields (#14130)
Doesn't really fix any particular issue, but adds more defaults to
fields in classes where other defaults are already present
2021-02-20 19:40:32 +01:00
Matt
c30bd1266f Refactor IStream::ReadArray to return unique_ptr 2021-02-12 19:30:53 +02:00
Ted John
383cbe5368 Load music into the correct slots 2021-01-27 19:26: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
Michał Janiszewski
b1e43f828b Add nullptr check in get_loaded_object_entry 2021-01-23 22:26:02 +01:00
skdltmxn
7ef4d7762f Refactor to avoid unnecessary copies (#13736)
* Refactor to avoid unnecessary copies

* Fix dangling references
2021-01-11 18:14:15 -03:00
Michael Steenbeek
1da6ae6b51 Merge pull request #13710 from skdltmxn/refactor/string_view
Refactor/string view
2021-01-10 13:37:01 +01:00
skdltmxn
b0a8ebc808 Refactor to use push_back more efficient (#13726) 2021-01-08 20:59:55 +00:00
Michael Steenbeek
8a4e44be5e Add missing ride types to JSON object loader 2021-01-06 22:30:55 +01:00
ζeh Matt
acf71315b5 Cleanup variables usage and initialize them 2021-01-06 22:29:40 +01:00
X123M3-256
deca5a3881 Add "Single Rail Roller Coaster" ride type 2021-01-06 21:10:15 +01:00
skdltmxn
e1cfa8693f Use c_str() instead of data() 2021-01-07 04:28:19 +09:00
skdltmxn
c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09:00
Michael Steenbeek
406967c71f Refactor object_entry_get_entry() to return Object 2021-01-03 23:01:52 +01:00
Tulio Leao
af0ec60bed Close #13626: Refactor RCT2LanguageId to strong enum 2020-12-23 20:07:54 -03:00
Michael Steenbeek
90964b38bb Fix #13574: Object selection crashes if 'originalId' missing 2020-12-23 20:12:25 +01:00
Gymnasiast
179b50358c Add RCT1 surface styles 2020-12-20 21:45:21 +01:00
Richard Qian
904af2cc4f Enhance the track designer with ability to add scenery and footpaths
This brings feature parity with Rollercoaster Tycoon Classic (RCTC)

Includes:
* Re-enabled buttons: Ride List, Map, Scenery, Path, Clear Scenery
* Add all standard footpaths and core scenery objects to the object selection

The max limit of 4 rides has not changed; other object types can have more than 4
Only a minimum set of scenery is enabled, as the full set cannot be included
2020-12-20 13:08:36 -06:00
Duncan
c12e1634fc Merge LitterType into the shop item descriptor (#13513)
* Merge LitterType into the shop item descriptor

* Merge ConsumptionTime into ShopItem descriptor

* Merge in DiscardContainer into ShopItemDiscriptor

* Simplify itemOrderPreference

* Simplify guest code by using 64bit flags

* Remove operators for ShopItem

* Move PeepThoughtType TooMuch GoodValue into ShopItemDescriptor

* Reorg Get Flags and Has functions to make intention clear

* Constexpr shop item descriptors

* Constexpr shop item descriptors to compile time gen constants

* Fix formatting and spelling

* Revert operator++ removal
2020-12-09 06:55:06 +00:00
duncanspumpkin
60729113d9 Simplify Serialise for FileIndex 2020-12-07 07:52:12 +00:00
duncanspumpkin
ee9ede6c33 Use dataserialiser to simplify object repo code 2020-12-06 16:54:29 +00:00
Duncan
a9ed5d6536 Fix ObjectEntryDescriptor (#13506) 2020-12-06 09:28:06 +00:00
Łukasz Pękalski
4adf745237 Close #12403: Refactor FILTER_PALETTE_ID to use strong enum (#13273) 2020-12-05 15:13:59 -03:00
Łukasz Pękalski
3de233c796 Close #12395: Refactor PeepItem to use strong enum (#13311)
* refactor: integrated PEEP_ITEM into SHOP_ITEM

* refactor: converted merged enum to flag

Only former occurrences of PEEP_ITEM

* cleanUp: code cleaned after merging

* refactor: converted ShopItem to strong enum

code reformatting

* refactor: ShopItem enum items renamed

code formatted

* refactor: new getter and setter functions for Item...Flags

* refactor: replaced all occurrences of ItemStandardFlags

with appropriate getter and setter functions.
COMPARE_FIELD macro needs to be commented out or the flag has to stay public.

* refactor: all occurrences of ItemExtraFlags replaced

with proper function calls. COMPARE_FIELD macro issue not resolved.

* refactor: introduced new variable for unified item flags

* refactor: adapted accessor functions

accessor functions were modified to accommodate both standard and extra ShopItem flags

* refactor: ItemExtraFlags accessor functions are replaced

with general functions

* refactor: reverted to original uint32_t flag variables

* refactor: implemented suggested changes

* refactor: integrate additional comments

* refactor: incorporated requested changes

* refactor: incorporated requested changes

added static_cast<PeepThoughtType> in lines 1572 and 1590
2020-12-03 21:15:59 -03:00
Ted John
8ce924bd64 Fix Docker CI, explicit copy constructor 2020-12-03 22:05:24 +00:00
Gymnasiast
596aa71093 Create ObjectEntryDescriptor to properly handle mixed DAT and JSON 2020-12-02 17:17:25 +01:00
Ted John
3d1c1b7e65 Fix writing of objects.idx (#13438)
Use WriteString instead of WriteValue for std::string.
2020-11-22 16:35:02 +00:00
Michael Steenbeek
1f55720bb5 Remove obsolete object fixes
These fixes have since been incorporated into JSON objects.
2020-11-13 10:44:28 +01:00
Łukasz Pękalski
fc4ad82ac1 resolve: integrated changes from comments 2020-11-11 16:08:39 +01:00
Łukasz Pękalski
7648feeba2 Close #12427: Refactor OBJECT_TYPE to use strong enum 2020-11-11 16:07:01 +01:00
Łukasz Pękalski
dc93cacbee bugHunt: correcting code to compile
code does not compile yet
2020-11-11 16:07:01 +01:00
Łukasz Pękalski
832fd69822 refactor: changed ObjectType enum to strong enum
code does not compile yet
2020-11-11 16:07:01 +01:00
Łukasz Pękalski
6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Michael Steenbeek
d8a7219c86 Use new identifier for default objects 2020-11-07 20:28:01 +01: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
Gymnasiast
880a267252 Implement @ZehMatt's suggestions 2020-11-06 14:33:16 +01:00
Gymnasiast
ce15e20c94 Use plain std::string_view instead of const & 2020-11-06 11:40:52 +01:00