Commit Graph

17945 Commits

Author SHA1 Message Date
Michael Steenbeek 86c7dbf1d5
Fix #7854: Cannot build custom Spiral RC; dummy entries in track designs list (#10814) 2020-02-22 19:06:57 +01:00
Michael Steenbeek e16a53df1d
Fix #10694: Lift hill speed of the Flying RC cannot be changed 2020-02-22 18:47:33 +01:00
Aaron van Geffen 8c6bfdd199
Merge pull request #10357 from scrapes/scenery-scatter
Scenery-Scatter Tool Window
2020-02-22 17:50:39 +01:00
Aaron van Geffen 71bd161143 Add changelog entry for scenery scatter tool. 2020-02-22 17:25:30 +01:00
Aaron van Geffen 9278ef7c61 Move ownership of scatter globals; delegate cleanup to close event. 2020-02-22 17:25:29 +01:00
Aaron van Geffen 5d9bcc083c Remove unused update event. 2020-02-22 17:25:29 +01:00
Aaron van Geffen aa6d6efe99 Refactor common parts of branched code.
Change shifts to COORDS_XY_STEP multiplication.
2020-02-22 17:25:29 +01:00
Aaron van Geffen 2528e94b48 Introduce low, medium, and high density buttons to the scatter tool.
Change window lay-out to more closely resemble others by introducing
density buttons, along with new sprites.

The amount of elements varies by density as follows:
* Low: number of elements equal to tool size
* Medium: twice as many elements as the tool size
* High: three times as many elements as the tool size.

Remove extraneous 'retry' clause.
2020-02-22 17:25:19 +01:00
Aaron van Geffen 642de8d11a Change gWindowSceneryScatterEnabled to bool, remove hack. 2020-02-22 17:20:46 +01:00
Aaron van Geffen cc9498e9a6 Revert changes to default scatter/cluster size. 2020-02-22 16:18:35 +01:00
Aaron van Geffen 6f029055a3 Make scatter window themeable; default to scenario window style. 2020-02-22 16:18:35 +01:00
Anton Scharnowski 205ff401ab Added SceneryScatter.cpp to xcode project. 2020-02-22 16:18:20 +01:00
Anton Scharnowski e6e48363de Introduce Scenery-Scatter Tool Window. 2020-02-22 16:18:19 +01:00
Tulio Leao 1ea9015315
Use CoordsXY(Z) in more places 2020-02-22 14:20:28 +01:00
ζeh Matt 12ab1e9633
Fix #10713: Correctly encode network ride id over network (#10802)
It byte swapped uint16_t and then during decode byte swapped it as uint32_t, now it always uses uint32_t for ride/player id. I could use the underlying type but that would require to re-create all replays again.

Closes #10713
2020-02-21 18:11:26 +01:00
Michael Steenbeek 08ca829ac2
Create RideTypeDescriptors (#10707) 2020-02-20 11:00:03 +01:00
ζeh Matt 1272c0c043
Crash using benchspritesort with dimensions not divisible by 32 (#10743)
Fixes #10740
2020-02-19 21:50:13 +01:00
Aaron van Geffen ae814571df Add changelog entry for #10739. 2020-02-19 11:25:15 +01:00
Aaron van Geffen 947903fefb
Mountain tool overlay in land tool window (#10739) 2020-02-19 11:17:11 +01:00
Aaron van Geffen dd869c8c0a
Fix #10176: Mistake in sprite for the land tool's 6x6 grid. (#10735) 2020-02-19 09:45:00 +01:00
Michael Steenbeek f41f878581
Replace some usages of LocationXY(Z)16 (#10699) 2020-02-18 22:42:38 +01:00
Ted John a8b5304786
Remove exe / com wrapper around openrct2.dll for Windows (#10727)
We get repeated reports of people saying the game is incorrectly reported as a virus. It is becoming more inconvenient for players and even myself, because when we attempt to download a build, it is immediately deleted by scanners (including the default for Windows: Windows Defender).

One scanner is not too much of an issue, but the game is flagged by almost half of available scanners as reported by VirusTotal.

So why is it being flagged?

Windows has a very annoying concept, the subsystem for a binary. The console subsystem allows stdin / stdout as you would expect, just like posix. Unfortunately if a user runs a console subsystem binary from the desktop or explorer, the game will be opened under conhost and thus you get a console showing alongside the game window. This is not a good user experience for most players. To resolve this, you can use the windows subsystem, but this will detach stdin and stdout immediately on launch. There are hacks that can be done in code to allocate a new console but I found this to not work very well with stdin or other terminal emulators.

My solution to the problem was to have two binaries: openrct2.exe and openrct2.com. Both are executable but openrct2.exe is windows subsystem, openrct2.com is console subsystem. The desktop shortcut opens openrct2.exe with no console window showing. Typing openrct2 on the command line will execute openrct2.com (as .com has higher PATH precedence than .exe by default) with working stdin and stdout. In order to reduce the size, I have the entire game inside openrct2.dll and then supply two tiny wrapper EXEs that simply route main(...) into the DLL.

These wrapper EXEs are the problem, they are very small and do nothing but call into a DLL, this must match virus signatures too closely and their size probably reduces the data available for the scanner to analyse.

So as I can not find any other way of achieving my goal of a cli and gui version of OpenRCT2, this changes the build to publish openrct2 as a single executable (rather than a DLL + wrapper EXE), and then duplicate the entire ~10MB exe again and flip the subsystem flag. The installer and zip size won't be affected as this extra size will be completely compressed out, but when unpacked will lead to an extra ~10MB on disc. But I think it is a fair compromise.

VirusTotal now reports all artefacts as safe, for now anyway.
2020-02-18 11:35:27 +00:00
Michał Janiszewski d3db4f5cf8
Fix GCC10 warnings (#10703)
The warnings reported were:
```
../src/openrct2/peep/GuestPathfinding.cpp: In function ‘Direction peep_pathfind_choose_direction(TileCoordsXYZ, Peep*)’:
../src/openrct2/peep/GuestPathfinding.cpp:1371:81: error: ‘void* memset(void*, int, size_t)’ writing to an object of non-trivial type ‘struct<unnamed>’; use assignment instead [-Werror=class-memaccess]
 1371 |             std::memset(_peepPathFindHistory, 0xFF, sizeof(_peepPathFindHistory));
      |                                                                                 ^
../src/openrct2/peep/GuestPathfinding.cpp:35:1: note: ‘struct<unnamed>’ declared here
   35 | {
      | ^

../src/openrct2/world/Sprite.cpp: In function ‘void reset_sprite_list()’:
../src/openrct2/world/Sprite.cpp:152:52: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘union rct_sprite’; use assignment or value-initialization instead [-Werror=class-memaccess]
  152 |     std::memset(_spriteList, 0, sizeof(_spriteList));
      |                                                    ^
In file included from ../src/openrct2/world/Sprite.cpp:10:
../src/openrct2/world/Sprite.h:117:7: note: ‘union rct_sprite’ declared here
  117 | union rct_sprite
      |       ^~~~~~~~~~
```
2020-02-18 00:00:19 +01:00
Tulio Leao 0c4623a39f
Replace typedef aliasing by using (#10712) 2020-02-17 11:43:47 +01:00
ζeh Matt 6039191d16
Merge pull request #10715 from ZehMatt/fix-10705
Fix #10705: Apply multithreaded rendering to all viewports
2020-02-16 22:23:50 +01:00
Michael Steenbeek 1690361b36
Increase size of ride_id_t to 16 bits 2020-02-16 22:21:17 +01:00
Matt 0f50697ceb
Fix unused variable warning 2020-02-16 15:50:35 +01:00
Matt 3d16b6c538
Update changelog.txt 2020-02-16 14:06:16 +01:00
Matt c440b8f918
Fix #10705: Apply multithreaded rendering to all viewports 2020-02-16 14:06:08 +01:00
Michał Janiszewski 38907fd0c7
Fix memory leaks around PNG/sprite handling (#10711) 2020-02-16 07:25:30 +01:00
ζeh Matt 50567d31ce
Merge pull request #10708 from ZehMatt/refactor/drawing-unused-param
Remove unused parameter and minor cleanup
2020-02-16 01:22:41 +01:00
Matt d6c3373b5e
Remove unused parameter and minor cleanup 2020-02-15 21:28:28 +01:00
Michael Steenbeek 3e205f0f48
Merge pull request #10674 from Gymnasiast/refactor/more-tile-elements
Refactor/more tile elements
2020-02-15 19:13:08 +01:00
Michael Steenbeek 231dd7460a
Use `using` instead of `typedef`
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
2020-02-15 18:17:03 +01:00
Gymnasiast 8c776dd61e
Use C++ way for max uint8 value 2020-02-15 14:18:58 +01:00
Michael Steenbeek 9e79432804 Fix compilation on macOS 2020-02-15 11:58:59 +01:00
Gymnasiast b59e37284d
Fix private field warning 2020-02-15 11:18:27 +01:00
Gymnasiast 35a2534adf
Bump replays version 2020-02-15 10:37:35 +01:00
Gymnasiast 1e6efa6eb4
Extend BannerIndex to 16 bits 2020-02-15 10:37:34 +01:00
Gymnasiast 1077bf0702
Make room for 255 station indexes in Entrance Element 2020-02-15 09:47:37 +01:00
Gymnasiast e88ee6ee7b
Expand WallElement 2020-02-15 09:47:37 +01:00
Michael Steenbeek a0fb955102
Merge pull request #10590 from tupaschoal/pr-9432
Fix #8064 Ride construction errors shown as (undefined string)
2020-02-14 11:31:43 +01:00
Tulio Leao 60e2546b2d Improve legibility of ride placement # attempt calculation 2020-02-13 23:10:33 -03:00
Michael Steenbeek dbb89b96fb
Clean up scenery window variables (#10697) 2020-02-13 21:24:37 +01:00
Michael Steenbeek 6d97601d6f
Replace hardcoded occurrences of maximum map size (#10696) 2020-02-13 20:27:13 +01:00
Michael Steenbeek 4191d2b7f9
Merge pull request #10695 from ZehMatt/coords-constref
Cleanup some code around CoordsXY
2020-02-13 17:43:10 +01:00
Matt c381d9ff3f
Remove obsolete construction of CoordsXY object 2020-02-13 12:11:20 +01:00
Matt 758a7e432f
Use const reference instead of copy for location structures 2020-02-13 11:53:14 +01:00
Michael Steenbeek e53d76ae2e
Fix errors in #10680 (#10692) 2020-02-12 23:11:04 +01:00
Michał Janiszewski 1b7639238a
Fix #9559: benchspritesort is broken after #8481 (#9590)
* Fix #9559: benchspritesort is broken after #8481

This takes multithreading into account as well

* Apply review fixes

* Fix detection of newer Google Benchmark (>= 1.5.0)

* Review fix
2020-02-12 22:18:00 +01:00