Commit Graph

144 Commits

Author SHA1 Message Date
Michał Janiszewski 1fe5fc56c0 Checksum sprites occasionally in multiplayer
This creates a checksum (SHA1) every so often on server and sends this
value together with PRNG seed for client to check it has still not
desynced.

It's useful to detect a desync early on, as PRNG seeds may remain
unchanged for some more time, while damage may have already been caused.
2016-07-27 15:54:02 +02:00
Michał Janiszewski 0421c59eff Refactor `sprite_set_coordinates` 2016-07-26 22:29:54 +02:00
Yaroslav Tretyakov dd4e4caeaa Reset sprite quadrant placements as part of sprite reset command
This addresses some sources of desyncs in multiplayer.
2016-07-26 22:29:54 +02:00
Michał Janiszewski 9f57c82653 Refactor access to g_sprite_list
Hide g_sprite_list behind accessor function with a check. `assert` is
temporarily disabled, as it breaks nearly every park.
2016-07-17 22:19:34 +02:00
Ted John dca816cfd3 Merge pull request #4024 from IntelOrca/refactor/object-list
Refactor and improve the object system:
- Objects are now exported to user directory under 'object'.
- Object directories are scanned recursively.
- Improves reliability of object loading and handling of bad objects.
- Improve performance of object scanning.
- Only load new objects when loading a new game.
- Improve changing language experience.
2016-07-11 23:45:45 +01:00
Ted John 4de1f2912a remove unnecessary functions 2016-07-09 15:36:48 +01:00
Michał Janiszewski 639f19adbf Fix define checks in project 2016-07-09 10:05:12 +02:00
Michał Janiszewski 35676d31f7 Integrate path variables used by game 2016-06-24 23:25:40 +02:00
Ted John d9bcf2d946 remove RCT2 memory checksum for Win32 NO_RCT2 2016-06-24 23:25:40 +02:00
Michał Janiszewski dfa482b1b5 Revert "Merge pull request #3897 from janisozaur/rebase-no-rct2"
This reverts commit 22c0cc92e6, reversing
changes made to 7b421c8052.
2016-06-24 22:40:37 +02:00
Michał Janiszewski 644a36a310 Fixes to -Wall compilation
By default, not all warnings are enabled. This change makes sure that
the project compiles correctly with following options turned on:

    -Wall -Wno-unused-but-set-variable -Wno-missing-braces \
    -Wno-unknown-pragmas -Wno-unused-function
2016-06-20 13:46:27 +01:00
Michał Janiszewski 5a7bbf71fe Fix condition guarding memory checksum verification 2016-06-20 00:05:30 +02:00
Michał Janiszewski 402e5a32a0 Integrate path variables used by game 2016-06-19 23:52:20 +02:00
Ted John 858a781347 remove RCT2 memory checksum for Win32 NO_RCT2 2016-06-19 18:12:14 +02:00
Michał Janiszewski 580789bcf4 Fixes to object loading for x86-64 2016-06-19 18:12:14 +02:00
Michał Janiszewski ded905a259 Fixes to object loading 2016-06-19 18:12:14 +02:00
Michał Janiszewski 4be4ed19a3 Don't tween objects when minimised (#3891) 2016-06-17 08:13:15 +01:00
Ted John d07b9535c2 integrate variables: object entry lists 2016-06-16 11:36:15 +02:00
duncanspumpkin 31812a08a5 Remove hooks. All string code now implemented 2016-06-15 19:11:51 +01:00
Marijn van der Werf 42ee299f65 Replace references to OS X 2016-06-13 19:49:06 +02:00
Ted John 83fc6ec4af remove usages of gScreenDPI and gWindowDPI 2016-06-07 22:45:36 +01:00
Ted John 85557d169d reinstate all drawing and fix resize 2016-06-07 22:45:36 +01:00
Ted John b58766aa3f clean up the logo and make it scalable
- fixes #1776: graphical glitches on intro
- fixes #708: screen turns white when resizing intro
2016-05-13 21:36:07 +01:00
janisozaur deeafc5a60 Add `--silent-breakpad` switch, fixes #3535 (#3544) 2016-05-11 12:25:21 +01:00
Ted John d2c5501eea refactor sprite heads and counts 2016-05-09 00:08:03 +01:00
janisozaur 68bad6505c Add and correct licence headers to all sources (#3108) 2016-05-04 18:24:41 +01:00
Ted John 4cdb2df9dc integrate screen variables 2016-04-23 11:16:46 +01:00
Yaroslav Tretyakov c3ba519a6e Integrate audio related variables (#3322) 2016-04-17 14:20:26 +01:00
IntelOrca 51a7e3f278 clean up and refactor the crash handler 2016-04-10 01:00:31 +02:00
Michał Janiszewski 17bc485fb5 Breakpad for windows
This enables breakpad Windows support **only**.

The scope of this was limited to allow for inclusion into 0.0.4 release.
Breakpad for now is a Windows-only functionality, as this platform has
largest audience and is the only one that has no system-provided stack
tracing utility.

Upon crash, breakpad will try to create a dump and save current game,
present user with some vital information, then open explorer on the
created files for user convenience, asking him/her to create a new
issue with OpenRCT2 on Github.
2016-04-09 18:57:14 +02:00
Michał Janiszewski e28de49a34 Breakpad integration
Provide your own breakpad and point cmake at it.

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
mkdir breakpad && cd breakpad
../depot_tools/fetch breakpad # edit the script to use python2
cd src
LDFLAGS="-m32" CXXFLAGS="-m32" CFLAGS="-m32" CPPFLAGS="-m32" ./configure
LDFLAGS="-m32" CXXFLAGS="-m32" CFLAGS="-m32" CPPFLAGS="-m32" make -j 8

Run cmake on openrct2:
cd openrct2
vim CMakeLists.txt # provide your path to breakpad
mkdir build && cd build
cmake ../ -DWITH_BREAKPAD=ON
make -j 8
./openrct2 # open a game, select "about openrct2", crash
2016-04-09 18:57:14 +02:00
IntelOrca a99a2f0cf4 fix command line hosting of scenario files 2016-03-05 12:20:02 +00:00
IntelOrca 38fda5debf remove old redundant RCT2 platform code 2016-02-16 20:23:32 +00:00
Michał Janiszewski 4aac5c035f Don't do uncapped FPS when running headlessly 2016-02-15 10:41:09 +01:00
IntelOrca caf9bd9939 get game working with new theme manager
Theme editor currently unavailable.
2016-02-03 18:23:44 +00:00
robin clemens 6db4536da9 1. Added --password=<str> to headless server mode to configure a password.
2. added default_password under [network] to configure a default password for headless server mode
2016-01-23 21:53:02 +00:00
LRFLEW 58d258038f Improve security on OSX and Linux 2016-01-22 16:44:08 -07:00
Michał Janiszewski 3bf1e0e06d Rename `safe_strncpy` to `safe_strcpy` 2016-01-18 20:49:52 +01:00
Michał Janiszewski 7dae861dab Unload all objects on dispose to stop memory leaks 2016-01-15 16:37:27 +01:00
Michał Janiszewski ab3d2a1ad9 Release config on closing to limit leaked memory 2016-01-15 14:55:36 +01:00
IntelOrca cdee534eb1 use SDL2's platform defines to normalise platform guards 2016-01-14 20:12:43 +00:00
Michał Janiszewski 1e5f59df29 Drop number from build ID. 2016-01-13 14:33:19 +01:00
IntelOrca 8cf53c12af add ability to set RCT2 path by command line 2016-01-12 23:10:18 +00:00
Michał Janiszewski 54f7f93ab9 Make sure config.ini gets created
This commit makes sure config.ini gets created even when RCT2 path is
not selected.

This makes for a better out-of-box experience on Linux, where no
directory selector is provided yet, as we provide default config file
and state in the error message how to fix it.
2016-01-11 22:46:29 +01:00
IntelOrca e9d222fdd3 new-argparse: finish new argparse integration and clean up 2016-01-10 22:50:31 +00:00
IntelOrca 3f0073f29c new-argparse: implement most of the root commands, fix issues 2016-01-10 22:50:30 +00:00
Michał Janiszewski 17e5a0d356 Use strndup when setting last_run_version
gConfigGeneral.last_run_version should have the string value copied to,
otherwise the SafeFree in config_set_property could try freeing value
from stack if used.
2016-01-02 00:11:34 +01:00
IntelOrca 3b5768f5bc print '(debug)' to version string when build in debug configuration 2015-12-26 17:23:27 +00:00
Michał Janiszewski ea6fa2c82a Let user specify the data dir as cmdline option.
This adds --openrct-data-dir=<str> option to command line letting user
select where he wants OpenRCT2-specific data to be. By default the
search locations are:
* <exePath>/data (on all platforms)
* /var/lib/openrct2 (on Linux)
* /usr/share/openrct2 (on Linux)
2015-12-19 00:06:41 +01:00
Michał Janiszewski 7d132d8fe1 Extract and embed sections into binary itself
Fixed some CMakeLists.txt problems, made another target for converting
section images into something palatable by ld, modified the linker
script to place these ssection at predefined VMAs and updated openrct2.c
with new checks.
2015-12-16 19:16:27 +01:00