Commit Graph

18027 Commits

Author SHA1 Message Date
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
Michał Janiszewski 962787a854
Hide paint_arrange_structs_helper from global symbols (#10690) 2020-02-12 11:10:06 +01:00
Duncan b8b539c16e
Modify next_x/y/z to become a CoordsXYZ (#10680)
* Modify next_x/y/z to become a CoordsXYZ

Should be further scope for refactoring from this.

* Make suggested changes

* Fix default construct issues
2020-02-11 22:01:14 +00:00
TusharSariya 3df79cb4d5
Part of #9473: Convert vehicle_update to Vehicle struct method (#10677)
* Issue #9473, moved static void vehicle_update in Vehicle.cpp to a member of the Vehicle struct

* Fix formatting

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-02-11 11:44:05 +00:00
OpenRCT2 git bot 3b18f66c9e Merge Localisation/master into OpenRCT2/develop. 2020-02-11 04:02:19 +00:00
Tulio Leao d0b255d98b Start zAttemps from 0 2020-02-10 21:55:21 -03:00
Tulio Leao e79584fe24 Remove superflous if 2020-02-10 21:55:21 -03:00
Tulio Leao 6522b10dfa Make Z attempts crescent 2020-02-10 21:55:21 -03:00
Tulio Leao fabef9b050 Modify height search to also affect maze construction 2020-02-10 21:55:19 -03:00
aw20368 d2e5c29ce0 review changes (squash) 2020-02-10 21:54:41 -03:00
aw20368 c76378bc8b Fix #8064 Ride construction errors shown as (undefined string)
The search for height to build track ended at a half-height, leading to (undefined string) error. Changed to always end at whole height and search as high as possible.
2020-02-10 21:54:26 -03:00
Michael Steenbeek 723f658dbd
Change ride_idnew_t to 16 bit; use it in more places (#10667) 2020-02-10 22:41:49 +01:00
Tulio Leao df28bca19e Move tupaschoal to development team (#10682) 2020-02-10 06:50:13 +00:00
Michael Steenbeek 3ec2252972 Merge pull request #10654 from IntelOrca/windows/winhttp
Replace cURL with WinHttp implementation on Windows
2020-02-09 22:19:20 +01:00
Ted John 4e032aeff0 Improve WinHttp code 2020-02-08 18:11:08 +00:00
Michael Steenbeek 1e64bbedf5 Update Xcode project 2020-02-08 17:47:03 +00:00
Ted John 4af69555d1 Improve WinHttp logic / code 2020-02-08 17:47:03 +00:00
Ted John be9cb19df5 Replace cURL with WinHttp implementation on Windows
This reduces the number of third party dependencies for Windows builds. WinHttp is quite a nice straight forward API so doesn't involve too much extra code.
2020-02-08 17:47:03 +00:00
Michael Steenbeek d16fbb0cd2
Change ride->overall_view to CoordsXY (#10673) 2020-02-08 17:19:59 +01:00