Commit Graph

21413 Commits

Author SHA1 Message Date
Silent e280eb2083
FileStream::Read: Throw the exception basing on fread return value
This change removes ftell/GetPosition() from hot spots during the startup,
"optimizing" the function for success cases - reading past EOF should
never/rarely happen so it seems fine to let it try to read before checking
2021-05-21 19:55:43 +02:00
Silent 724a3c0579
Obtain file sizes without seeking where possible 2021-05-21 19:55:43 +02:00
Silent 95388cfbb1
Add File::GetSize to get object size in a simpler way
Drastically reduces startup speed because of the
optimization applied to ObjectAsset::GetSize - now the file
size is obtained without reading the entire file into memory.
2021-05-21 19:55:42 +02:00
Duncan dc11021192
Merge pull request #14706 from CookiePLMonster/fix-13445
Fix #13445: Make FileScanner::ScanDirectory return a unique_ptr instead of a raw one
2021-05-20 19:12:19 +01: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
Tulio Leao efd5d7dfe7
Fix formatting on d309a7c 2021-05-16 21:11:42 -03:00
Ryan d309a7c871
Add climate information to Park API (#14636) 2021-05-16 21:06:36 -03:00
ζeh Matt 1fef332f6a
Fix #14668: Ensure to flush network data when paused (#14673) 2021-05-16 13:14:29 +02:00
Dan Silk 05977e6d14
Fix #14468: Cannot close Options window on Android
Issue was caused by the WIDX_ALWAYS_NATIVE_LOADSAVE flag not being enabled/disabled correctly.
2021-05-15 23:43:50 +02:00
ZeeMajora 0123a3d141
Close #14655: make Changelog window brown in RCT1 theme 2021-05-15 16:53:44 +02:00
Gymnasiast 9fe9e67138
Add #14587 to changelog 2021-05-13 20:06:36 +02:00
Michael Steenbeek 513398b1f6
Fix #14488: Crash when building too many rides 2021-05-13 19:23:53 +02:00
Duncan d22afe2372
Merge pull request #14625 from ZehMatt/refactor/peep
Rename PeepActionType None1/None2
2021-05-13 18:15:54 +01:00
Michael Steenbeek f06bf3681d
Fix #14638: Make 'About OpenRCT2' themeable; more RCT1 window colours 2021-05-13 18:28:09 +02:00
Matt f73abc900d
Add IsActionIdle/IsActionInterruptable getter and refactor uses 2021-05-13 18:05:55 +03:00
Matt 088b476dc5
Add IsActionWalking getter and refactor uses 2021-05-13 18:05:55 +03:00
Matt 8d9e47ee1c
Remove unnecessary condition 2021-05-13 18:05:55 +03:00
Matt 4c11e11fe2
Rename PeepActionType None1 and None2 2021-05-13 18:05:55 +03:00
Michael Steenbeek d35b28325a
Merge pull request #14641 from duncanspumpkin/split2
Refactor of misc entity functions
2021-05-13 16:50:02 +02:00
zrowny f6f5b41b76
Correct palette indexes of remap colors in image importer
The codes that finds the closest entry that isn't used for remapping has the indices of remappable colors slightly off, and would make some colors in the imported image remappable even though they shouldn't have been.

Comment in header file describing the standard palette corrected as well.
2021-05-13 16:30:35 +02:00
Gymnasiast 8c374b07e6
Make litterNames static 2021-05-13 16:26:23 +02:00
Gymnasiast 52918736d0
Rename Sick to Vomit 2021-05-13 16:26:23 +02:00
duncanspumpkin 8282fde827
move Litter functions into class and refactor 2021-05-13 16:11:13 +02:00
duncanspumpkin 24a5446e8c
Move particle functions into class 2021-05-13 16:09:26 +02:00
duncanspumpkin 243142664e
Move balloon methods into class 2021-05-13 16:09:26 +02:00
duncanspumpkin c345396765
Move duck method into class 2021-05-13 16:09:26 +02:00
Michael Steenbeek d17443b7b0
Clean up shop item prices 2021-05-13 13:43:31 +02:00
Basssiiie 5480c99e0b
Rename previously unknown vehicle flags, and json strings to camelCase 2021-05-13 13:34:32 +02:00
Duncan 816bf827ab
Split off a number of entity files into separate headers (#14629)
* Split off a number of entity files into seperate headers

* Get compiling

* Update copyright date
2021-05-13 07:56:24 +01:00
ZxBiohazardZx 36b2742c19
Change Vehicle Rotation namings in accordance with OpenRCT2 Codestyle (#14616)
* Code Refactor: Rename vehicle_sprite_type to Pitch 

In some of the issues the vehicle_sprite_type is used to check for properties in regards to the pitch of the vehicle.Similarly bank_rotation is used to provide information on the Roll property. This is not in alignment with the https://github.com/OpenRCT2/OpenRCT2/wiki/Coding-Style and makes it harder to refactor other elements of the codebase and makes for undesired nested logics.

This PR also includes the change from rename bank_rotation to Roll in alignment with the OpenRCT2 Coding Style


Related to PullRequest #11956

* Apply formatting

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-05-12 12:38:46 +01:00
Adam 5212117924
Fix #14523: suppress downloads if a directory exists 2021-05-12 09:38:47 +02:00
OpenRCT2 git bot 217b5a5c48 Merge Localisation/master into OpenRCT2/develop 2021-05-12 04:13:26 +00:00
Duncan 00c9c07c11
Fix #14589: Crash in sign window after tileelement reorg (#14626)
TileElement pointers must always be revalidated every tick otherwise a tileelement reorg will cause them to point at the wrong element
2021-05-11 14:52:38 +01:00
Ryan 8a282fa31c
Add more properties to Park API (#14620)
* Add more properties to Park API

* Add new feature to changelog
2021-05-11 12:46:15 +01:00
Duncan b1bed8e3aa
Peep Guest/Staff Split: Actually move fields from split (#14495)
* Actually move fields from split
2021-05-11 12:41:13 +01:00
Margen67 66f3f5d52e
Partially solve #5165 (#14617) 2021-05-11 12:27:39 +01:00
frutiemax 0ac77f8744
Part of #12100 : Use ScreenCoordsXY for gfx_draw_line_on_buffer (#14305) 2021-05-11 08:16:59 -03:00
Duncan ae66592c2b
Remove old serialiser of steam particle (#14624)
* Remove old serialiser of steam particle

accidentally missed this in the network serialiser branch

* Update replays
2021-05-11 09:36:00 +01:00
Duncan 975ed665f8
Fix opengl extra zoom bugs (#14601)
* Fix #14449: Surface smoothing not working at extra zooms

Caused by two issues. One was spotted by @AaronVanGeffen in that surface smoothing was turned off. The other was caused by a bug in the opengl renderer that went unnoticed due to never being hit during normal play.

* Fix merrygoround and enterprise extra zoom peep drawing

* Add changelog entry
2021-05-10 12:43:46 -03:00
Duncan 3fd8bee32b
Re-enable 32bit replay tests (#14614)
After the changes made to the serialise functions the 32bit replay tests can now be re-enabled
2021-05-10 09:42:18 +01:00
Ryan eb9ed63b0e
Fix some actions for plugins (#14607)
* Fix some actions for plugins

If an action doesn't have an AcceptParameters method, the paramaters passed in executeAction will be ignored and the action will fail.

* Change plugin parameter names

* Increment plugin API version
2021-05-09 22:04:03 +01:00
Duncan d46e4a9bb1
Network serialiser for entities (#14541)
* Start a network serialiser for entities

will be used only for checksums and replay diffs

* Continue work

* Use the new serailser for checksums

* Use new serialiser for replays

* keep compilers happy

* Try create checksum stream

* Fix compiling

* Split off class into seperate file

* Update Xcode project

* Increment network version

* Fix pragma mistake

* Fix none network builds

* Update replays

* Improve ChecksumStream and use FNV internally

* Small cleanups

* satisfy compilers

* Revert change of checksum size to simplfy rerecording

* Zero initialise data

* Fix serialiser

* Update replays again

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
Co-authored-by: Matt <m.moninger.h@gmail.com>
2021-05-09 19:12:44 +01:00
Ted John c63e072974
Fix logging of replay info to stdout (#14430)
Use Console::WriteLine and replace \n with \r\n.
2021-05-09 19:11:04 +01:00
Michael Steenbeek 984a660ad7
Fix RCT1 American-style Steam Trains import 2021-05-09 18:53:35 +02:00
ζeh Matt 08ebc1ab41
Fix #14587: Send queued packets before disconnecting the client (#14596)
* Fix #14587: Send queued packets before disconnecting the client

* Log better information during network authentication
2021-05-09 07:56:20 +01:00
Ted John 14845b61e5
Merge pull request #14561 from IntelOrca/increase-paint-structs
Dynamically allocate paint structs and remove 4000 per column limit
2021-05-08 23:36:40 +01:00
Ririan 417e5ae7d5
Fix Duplicate Entries in Free Food Ad Campaign
When opening and closing the dropdown box multiple times while attempting to create an ad campaign for free food vouchers, the game would duplicate the available food items in the list each time.

I discovered that it was because the vector wasn't being cleared each time the list was populated it, so an easy fix is to clear it before continuing.
2021-05-07 14:53:53 +02:00
ZxBiohazardZx ad1bfe0f49
Fix #14582: Vehicle::GetCar function causing server crash (#14583)
Co-authored-by: @RoyGherbel
2021-05-07 13:23:37 +01:00
Dmitry Starostin bbc2f7c4e8
Update package link for Arch in readme.md
Package openrct2 was moved from AUR to Community.
2021-05-05 22:49:48 +02:00
Ted John 7854d94599 Fix benchmarking 2021-05-03 02:38:42 +01:00