1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00
Commit Graph

145 Commits

Author SHA1 Message Date
Aaron van Geffen
dcff6895b5 Refactor game_init_all into GameState::InitAll. 2018-05-30 11:53:32 +02:00
Ted John
f1ee5cad83 Call Park from GameState. 2018-05-30 11:53:32 +02:00
Ted John
4d4e7ba4b1 Create new GameState class for updating the game 2018-05-30 11:53:30 +02:00
Ted John
6af0cb2b88 Fix import of S4 and S6 2018-05-29 18:39:12 +01:00
Ted John
96a0a22cd1 Make start on loading objects only once 2018-05-29 18:39:12 +01:00
Michael Steenbeek
d44d727fac Merge pull request #7543 from AaronVanGeffen/refactor/park
Create new Park class
2018-05-21 10:17:38 +02:00
Ted John
46300f216f Fix #7544: Freeze when starting headless server with no arguments
Fixes #7313: Loading an invalid path with openrct2 produces results different than expected

Do not load title sequences in headless mode and prevent use of null audio mixer when ride music is stopped.
2018-05-20 02:21:44 +01:00
Ted John
721dc00778 Move park_update into Park class.
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
2018-05-19 19:44:01 +02:00
Ted John
0d6cde2cdb Create a Park class 2018-05-19 19:43:39 +02:00
Ted John
20fdd46b96 Fix #7513: OpenRCT2 freezes on shutdown (#7514)
Store drawing engine and painter inside Context so that it is disposed before Context.
2018-05-13 15:52:59 +01:00
Ted John
7eb1703f36 Remove old bitmap code via UiContext 2018-05-13 01:11:56 +01:00
Ted John
529c744276 Use unique_ptr and shared_ptr for services in Context 2018-05-13 00:43:50 +01:00
Ted John
9e72e51bab Use std::unique_ptr for discord service 2018-05-11 20:39:00 +01:00
Ted John
8eacc3582c Remove PlainContext 2018-05-11 20:39:00 +01:00
Ted John
302fe00805 Always pass shared_ptr by reference 2018-05-11 20:39:00 +01:00
Ted John
d1cbf998a0 Do not return shared_ptr for LocalisationService
GetLocalisationService is currently used a lot, so remove overhead of shared_ptr copy.
2018-05-11 20:39:00 +01:00
Ted John
35df72e61f Remove use of gCurrentLanguage 2018-05-11 20:39:00 +01:00
Ted John
8681b4fac9 [wip] Create new localisation service 2018-05-11 20:37:48 +01:00
Ted John
7b610fd3c0 Use shared_ptr more for UiContext in relation to DrawingEngine 2018-05-11 20:37:48 +01:00
Ted John
7dc170ef85 Use shared_ptr for long-life objects
Use unique_ptr and shared_ptr for IContext, IPlatformEnvironment, IUiContext, and IAudioContext.
2018-05-11 20:37:48 +01:00
woj1993
4b372120f1 Fix #6141: CSS50.dat is never loaded (#7357) 2018-04-13 11:29:31 +01:00
Hielke Morsink
dc673a64d8 Give context the ownership of repositories and the object manager (#7340)
This makes them no longer a singleton, which fixes annoying behaviour when launching multiple contexts in one game session.
2018-04-10 13:19:23 +01:00
Duncan
0ab3d0955c Merge pull request #7310 from OpenRCT2/json-objects
Add support for new JSON object format
2018-04-08 10:45:55 +01:00
Michał Janiszewski
3b7864957a Cleanly shutdown in case of invalid g1.dat (#7361) 2018-03-30 15:38:22 +01:00
Ted John
f91449190a Allow game to run without RCT2 install path 2018-03-26 21:38:09 +02:00
Hielke Morsink
c5aececcb1 Set scenario save path upon successfully loading a park
Instead of setting the path when clicking on a file in the loadsave dialog, it's now set when the park gets actually loaded.

This fixes the System Dialog not showing when saving a park loaded from command.
2018-03-24 13:24:39 +01:00
Ted John
a6d03b3b0f Fix segfault when exiting a network game
Separate out closing of connection into a new method so only that is called when closing the game which then means gfx_invalidate_screen is not called.
2018-03-23 21:54:45 +00:00
Ted John
f7dafa9bbb Only enable interactive console for headless 2018-03-22 20:16:58 +00:00
Ted John
dd0573b235 Move in game console to UI library 2018-03-22 20:16:58 +00:00
Ted John
d18f416370 Add basic interactive console using linenoise 2018-03-22 20:16:58 +00:00
Michał Janiszewski
fc97c8c5db Reduce inclusion of <string> header 2018-03-21 22:39:19 +01:00
Michał Janiszewski
cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Michał Janiszewski
4dd0995efb Move cmath out of common.h 2018-03-18 23:29:13 +01:00
Hielke Morsink
69867bcecd Fix typo 'instad' -> 'instead' [ci skip] 2018-03-13 23:44:34 +01:00
Michał Janiszewski
764520076f Reduce header inclusion
* Update includes in PlatformEnvironment.cpp

* Update includes in ParkImporter.h

* Update includes of OpenRCT2.h

* Update includes in Intro.h

* Remove unused include from Input.cpp

* Update includes of Imaging.h

* Update includes in Game.h

* Update includes in Editor.h

* Update includes of Context.cpp

* Update includes in Cheats.cpp, CmdlineSprite.cpp

* Update includes of some source files

* Update includes in some cpp files

* Update includes in some cpp files

* Update includes in TextureCache.h

* Fix tests

* Update includes in Font.cpp

* Update includes in LightFX files

* Update some includes

* Fix GCC builds

* Update some includes

* Update some includes

* Update includes in FontsFamilies.*

* Update includes of Console.h

* Improve includes in Window.h

* Improve headers in Viewport.h/Window.h

* Fix MSVC build

* Fix network-less builds

* Reduce inclusion of Map.h
2018-03-13 13:14:02 +01:00
Michał Janiszewski
282553f0c5 Upgrade some char arrays to strings 2018-02-07 23:14:29 +01:00
Ted John
b0755123fd Fix loading of bad g1.dat 2018-02-05 18:47:40 +00:00
Ted John
76344498bb Fix outPath not set in platform_get_user_directory 2018-02-05 17:19:39 +00:00
Gymnasiast
778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Ted John
0c71855769 Replace Memory::Copy with std::copy 2018-02-04 12:40:24 +00:00
Ted John
87cd9f88b3 Rewrite Platform::GetInstallPath 2018-02-02 12:41:26 +00:00
ZehMatt
abd74dbb1e Add exception handling in LoadParkFromFile. 2018-01-21 21:46:11 +00:00
Ted John
d9d2b2373d Rename crash.h to Crash.h 2018-01-18 21:12:41 +00:00
ZehMatt
84f2917f59 Use const and constexpr whenever possible. 2018-01-11 22:29:08 +01:00
Michael Steenbeek
6a88d6e04d Move and rename RCT{1,2,12}.h 2018-01-09 13:36:41 +01:00
Ted John
c974daf467 Refactor console.c to C++ 2018-01-07 12:39:58 +01:00
Ted John
b781291b58 Refactor chat.c to C++ 2018-01-07 12:39:58 +01:00
Michael Steenbeek
755add6c9a Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Ted John
0c3c998177 Refactor lightfx.c to C++ 2018-01-05 22:57:55 +01:00
Ted John
02c58a6c5a Remove custom base Exception class 2018-01-05 18:11:47 +00:00