Commit Graph

18171 Commits

Author SHA1 Message Date
Tulio Leao b9186f4b0b Receive TileCoordsXYZ by const ref instead of copy 2020-02-29 01:16:16 -03:00
Tulio Leao 181eaf768d Receive CoordsXYZ by const ref instead of copy 2020-02-29 01:14:05 -03:00
Tulio Leao 473bb4683b Receive (Tile)CoordsXYZD by const ref instead of copy 2020-02-29 01:09:24 -03:00
ζeh Matt b86854a259
Fix #10587: Update last action coordinates on correct player (#10845) 2020-02-28 16:23:41 +01:00
OpenRCT2 git bot 52d5995240 Merge Localisation/master into OpenRCT2/develop. 2020-02-25 04:02:29 +00:00
Ted John e2bbd55304
Fix no contributors.md and licence.txt in windows portable builds (#10837) 2020-02-24 23:09:16 +01:00
Michael Steenbeek e36d8f03e6
Implement #10666: ShowMessageBox on Android (#10817) 2020-02-24 13:48:32 +01:00
Michael Steenbeek 938f2a891f
Implement #682: Staff patrol area now drawn on the water (#10830) 2020-02-24 13:47:28 +01:00
Michael Steenbeek 270417f788
Merge pull request #10819 from Gymnasiast/refactor/even-more-rtd
Move track paint function lookup to RTDs
2020-02-24 10:56:43 +01:00
OpenRCT2 git bot c6df40bf69 Merge Localisation/master into OpenRCT2/develop. 2020-02-24 04:02:23 +00:00
pizza2004 57605f36e3
Fix #2485: Hide Vertical Faces not applied to water 2020-02-23 21:32:57 +01:00
Michael Steenbeek 18f60fa987
Merge pull request #10821 from Gymnasiast/refactor/special-pieces-for-track
Refactor custom track piece handling
2020-02-23 21:29:12 +01:00
Michael Steenbeek 6d7a2bea69
Merge pull request #10818 from tupaschoal/coords-xy-2
Use ScreenCoordsXY for some window interactions
2020-02-23 13:23:50 +01:00
Tulio Leao 98781e7596 Revert change to commented line 2020-02-23 09:19:45 -03:00
Aaron van Geffen 423ed90112
Fix #10815: Vertical alignment of scatter tool area size label. (#10823) 2020-02-23 10:57:38 +01:00
OpenRCT2 git bot 630ff6ce2b Merge Localisation/master into OpenRCT2/develop. 2020-02-23 04:02:14 +00:00
Gymnasiast 93926d5e5d
Move all the ride type-specific track categories to regular ones 2020-02-22 23:20:12 +01:00
Gymnasiast dc04c5ec95
Refactor custom track piece handling 2020-02-22 23:01:34 +01:00
Michael Steenbeek e2e7079f17
Fix YaHei detection (#10820) 2020-02-22 22:35:51 +01:00
Gymnasiast 63430412be
Move TrackDataOld.cpp to Testpaint project 2020-02-22 20:29:35 +01:00
Gymnasiast 08ad1816d3
Move track paint function to RTDs 2020-02-22 20:15:00 +01:00
Michael Steenbeek 86a79e742f
Use RideTypeDescriptor for available track pieces 2020-02-22 20:13:44 +01:00
Tulio Leao 1b3f0e9a44 Create ScreenCoordsXY gSavedView from separate x,y variables 2020-02-22 16:01:21 -03:00
Tulio Leao 47025c45b4 Make setMainView() use ScreenCoordsXY 2020-02-22 16:01:21 -03:00
Tulio Leao 826478a8ef Use ScreenCoordsXY on UiContext.cpp 2020-02-22 16:01:20 -03:00
Michael Steenbeek 4c2a0f279b
Fix #10752: Mute button state not correctly set at startup (#10816) 2020-02-22 19:20:14 +01:00
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