Commit Graph

207 Commits

Author SHA1 Message Date
John Kastner 6ea091841f
Fix memory leak loading malformed `SawyerChunk` (#21508)
* Fix memory leak loading malformed `SawyerChunk`

A temporary buffer was not free'd after failing to parse in
`SawyerChunkReader::ReadChunkTrack`. Fix this following the pattern used
in `SawyerChunkReader::ReadChunk` by wrapping the relevant code in a
`try` block with `FreeLargeTempBuffer` called when an exception is
caught.

* Use unique_ptr

* Remove `AllocateLargeTempBuffer`

---------

Co-authored-by: Michał Janiszewski <janisozaur@gmail.com>
2024-04-01 22:40:14 +00:00
Claudio Tiecher a94e6c54d8
Part of #21421: replace define with constexpr (#21679) 2024-04-01 07:00:32 -03:00
Claudio Tiecher 24688ad5a3 Part of #21421: Refactor TILE_ELEMENT_DIRECTION_MASK 2024-03-25 16:17:32 +01:00
Claudio Tiecher c6def2d0a9 Part of #21421: Refactor TILE_ELEMENT_TYPE_MASK 2024-03-25 16:17:32 +01:00
Claudio Tiecher e5ff6b271a Part of #21421: Refactor TILE_ELEMENT_QUADRANT_MASK 2024-03-25 16:17:32 +01:00
Aaron van Geffen a79b062136
Refactor FormatCodes stringification 2024-03-01 19:47:23 +01:00
Michael Steenbeek 396af1f34c
Fix #19494: RCT1 sloped gates not imported correctly 2024-01-28 14:56:38 +01:00
Gymnasiast 5593eca03d
Import maze entrances in the same way as regular ones 2024-01-11 22:49:40 +01:00
Gymnasiast a6c0c7dd79
Move TD6 track flags to RCT12.h 2024-01-11 22:26:06 +01:00
Gymnasiast 7df3b22e14
Move conversion of station object to TD4/6 import/export 2024-01-03 21:14:04 +01:00
Gymnasiast 3df551ffbf
Move RCT2::GetRCTStringBufferLen to RCT12
It’s used in both
2024-01-03 21:12:53 +01:00
James103 1d8dc111f1
Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
Michael Steenbeek baf88ef490
Refactor in-memory track design element (#21010) 2023-12-02 14:43:03 -03:00
AuraSpecs 83598ba898
OpenMusic release v1.5 (#21004)
Adds Rock style 4 ride music by Blackend Blue.
2023-11-28 06:09:58 -03:00
mrmbernardi e914ffedaf
Fix #20944: Add cstdint to EnumMap and EntryList (#20945) 2023-11-04 19:55:35 +00:00
AuraSpecs 1223b739e0
Create OpenMusic 1.4 release (#20795)
nl-NL: Fix/amend some descriptions by @Gymnasiast in #42
    Update French translation by @rmnvgr in #43
    Normalize the ragtime tunes by @karst in #44
    Complete list of Fairground organ style 2 tunes by @karst in #45
    Update Hungarian translation by @anon569 in #47
    Add Mystic style by @SkyshardMelody in #46
    pt-BR: Translate Mystic Style by @tupaschoal in #48
    hu-HU: Translate Mystic Style by @anon569 in #49
2023-09-21 19:36:37 +01:00
Karst c23362d67a Add new OpenMusic tunes 2023-08-25 16:39:38 +02:00
Karst 5adbea9ac8 Select OpenMusic by default when opening a new scenario 2023-08-25 16:39:38 +02:00
Aaron van Geffen d425e0a8bb Remove const qualifier from constexpr statements 2023-06-24 11:45:26 +02:00
Michael Steenbeek fe2d1e2372
Small symbol cleanup (#20229)
* Remove unused generate_string_file() declaration

* Move IsUserStringID() to RCT12.h

The function is only used by RCT1/2 code, and the implementation is in RCT12.cpp

* Move ScenarioTranslate() to ScenarioRepository.cpp

Seems to have ended up in ObjectRepository.cpp by accident.
2023-05-17 19:27:04 +01:00
Duncan c0bd64f778
Split of Needs supports changes from OpenRCT2/OpenRCT2#19446 (#19759) 2023-04-04 07:52:07 +00:00
Duncan b56748bc82
ObjectEntry Cleanup. FootpathItem, SceneryGroup, Water, LargeScenery (#19385)
* Move footpathitem entry into new getter

* Move scenery group entry into new getter

* Move water entry into new getter

* Move large scenery entry into new getter

* Remove unused header includes

* Fix compile issue

* Include missing header from vcxproj
2023-02-15 21:35:16 +00:00
Michael Steenbeek d8417fee30
Desnake the rct2/rct12 fields (#19254) 2023-01-22 19:16:41 +00:00
Duncan b76bffe1ec
Desnake RCT12 class names 2023-01-21 22:32:44 +00:00
Gymnasiast 3dd895abf7
Rename pad_ to Pad 2023-01-21 16:39:35 +01:00
Gymnasiast fa7dd95321
Rename remaining snake in (RCT12)TileElement fields 2023-01-21 16:37:11 +01:00
Duncan 7d08372c80
Remove snake_case from Class names OpenRCT2/Ride*-S* (#19232)
* Remove snake_case from Class names OpenRCT2/Ride*-S*

* Clang format
2023-01-20 20:58:55 +00:00
Michael Steenbeek 31b510a30b
Rename entity-related stuff in RCT12.h
Replaces ‘sprite’ with ‘entity’ where appropriate.
2023-01-19 22:29:48 +00:00
Michael Steenbeek 448c8fafd0
Rename base_height, clearance_height and owner 2023-01-19 20:36:30 +01:00
Hielke Morsink 0762fcb601
Rename snake_case functions in OpenRCT2/util folder 2023-01-18 22:44:13 +01:00
Stephan Spengler 31ea968480
Change openrct2/ride methods to UpperCamelCase, part 2 2023-01-17 17:42:29 +01:00
Michael Steenbeek bf5f7e8e71
Rename format_string(2) and is_user_string_id() (#19178)
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 08:59:07 +00:00
Stephan Spengler 76b918e7ed
Change openrct2/ride methods to UpperCamelCase, part 1 2023-01-17 01:32:54 +01:00
Michael Steenbeek b4480b344e
Rename snake_case functions from localisation folder 2023-01-16 23:12:35 +00:00
Gymnasiast 8d659a5e2f
Pass rct_ride_entry as reference 2023-01-11 17:35:01 +01:00
James103 73738bbdc8
Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
spacek531 09c8e4755f
Rename GetBrakeClosed() to IsBrakeClosed() 2022-12-31 14:06:22 +01:00
Michał Janiszewski ca91c67eeb
Fix #18576: Cannot open parks with certain types of corrupt tile elements 2022-12-09 06:57:40 +00:00
Michał Janiszewski 2d101a5212
Provide additional information when rejecting unknown tile element 2022-12-08 22:38:17 +01:00
Gymnasiast 079253e168
Remove now-unused SawyerEncoding.{cpp,h} 2022-10-08 23:09:07 +02:00
73 b9e677945d
Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Duncan adc51ad9aa
Rework rct_vehicle_colour (#16051)
* Remove rct_vehicle_colour and replace with VehicleColour

* Update network version

* Update replay version
2022-08-13 19:30:30 +00:00
Gymnasiast d3fd31c611
Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Michael Steenbeek 6852b184b6
Fix #17541: Station style not correctly saved to TD6 2022-07-28 14:23:53 +02:00
Rik Smeets 1eb3a86770
Ride operating settings can be set via text input
Both minimum and maximum wait time and operating settings for flat rides can now be set via text input.
2022-07-27 22:50:04 +02:00
Hielke Morsink 9c595ccaa7
Replace 16 with new constant WATER_HEIGHT_STEP 2022-07-01 00:09:27 +02:00
ζeh Matt c0474d2d27
Merge pull request #16466 from ZehMatt/refactor/identifier-rideid
Use TIdentifier for RideId
2022-02-12 11:23:54 -08:00
ζeh Matt 06e430157f
Use RideId::GetNull and RideId::IsNull over constant 2022-02-12 18:11:18 +02:00
ζeh Matt 4554d6d883
Fix all uses of RideId 2022-02-12 18:11:18 +02:00
ζeh Matt a2470c0573
Rename ride_id_t to RideId 2022-02-12 18:11:18 +02:00