1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00
Commit Graph

124 Commits

Author SHA1 Message Date
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
Michael Steenbeek
347ff702d0 Refactor objects 2018-01-03 10:16:51 +01:00
Tomas Dittmann
c22dac0a29 add missing exception handling.
LoadParkFromStream() now handles exceptions from parkImporter->LoadFromStream().
2017-12-27 14:32:19 +00:00
Marijn van der Werf
e9ef843619 Move majority of input.c to UI 2017-12-16 15:47:38 +02:00
Ted John
6e34aaa321 Fix debug assert when closing game from object selection 2017-12-16 12:22:14 +00:00
Michael Steenbeek
1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Michael Steenbeek
6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Christian F. Coors
0aa515355a Add cursor scaling 2017-12-12 22:11:40 +01:00
Michael Steenbeek
60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
Ted John
99d7aaa2d6 Remove RCT2 interop 2017-12-04 19:04:06 +00:00
Ted John
66a6aa95f6 Redirect platform_get_user_directory to IPlatformEnvironment
- Remove old code for getting user directory, redirect to IPlatformEnvironment.
- Fix config loading so that it uses path straight from IPlatformEnvironment.
- Add more special folder implementation in Platform2.
2017-12-01 21:09:52 +00:00
Ted John
323b8dd352 Partially fix #6129: Guest List not updating after a ride rename
- Force refresh of ride list and guest list for both rename ride and demolish ride actions.
2017-11-23 09:40:39 +01:00
Ted John
b5137b0e37 Merge pull request #6574 from IntelOrca/protect-g1-access
Refactor g1 access
2017-11-16 18:51:32 +00:00
Ted John
83e80d9658 Implement basic discord status report 2017-11-11 23:48:04 +00:00
Robert Jordan
9ae4f7d1bc Fix #6500: Fail to load resources when no config
A simple fix of setting the environment paths before the repositories
are loaded.

Added a changelog entry
2017-11-07 21:03:58 +00:00
Ted John
5a05bd51e5 Use get_g1_element and add null checks 2017-11-03 22:18:10 +00:00
Marijn van der Werf
45b75692d9 Fix code style 2017-11-03 01:54:37 +01:00
Marijn van der Werf
4a4f9648a7 Move network status window to UI module 2017-11-03 01:54:37 +01:00
Marijn van der Werf
1e335308cc Move map tooltip to ui module 2017-11-03 01:54:37 +01:00
Christian F. Coors
06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Robert Jordan
a3c64bb146 Feature: Preview title sequences in-game
Title sequences can now be played back in-game, allowing for much easier
editing.

Improved title sequence playback in general. Clicking play while on a
different title sequence will play the new one. Clicking stop will make
the title screen go back to the config title sequence. And the closing
the title sequence window will also make the game go back to the config
title sequence, and reload the sequence if it was modified.

Changes made to title sequences in-game are now correctly loaded in the
title screen.

Starting a title sequence within the editor will now always reset it
even if it's the current playing sequence. (Not for playing in the
editor though).

Get Location in title sequence command editor now has 100% accuracy
compared to before
where it would usually get some offset value.

Added `get_map_coordinates_from_pos_window` which will allow getting the
viewport coordinates of a specific window even if the input coordinates
are under another window. This has use with getting 2D positions from
the main window without the other windows getting in the way.

Options window will now always specify the config title sequence in the
dropdown and not the current title sequence.

Made a global variable `gLoadKeepWindowsOpen`, in game.h to keep windows
open when loading a park. When loading a title sequence park in-game.
The sequence player will force-close all park-specific windows ahead of
time.

Skipping while testing title sequences no longer needs to reload the
park if the current playback position is already before the target
position and ahead of the load position.

Added changelog entry.
2017-10-30 12:07:01 +01:00
Michał Janiszewski
8fd2266bda Refactor includes (#6512)
* Refactor Intent.h inclusion

* Use forward declaration of ITcpSocket

* Remove unused include

* Forward declare rct_ride_entry

* Remove unused headers

* Forward-declare rct_drawpixelinfo

* Remove unused headers

* Lower header include from header to source file

* Reduce included headers

* Reduce includes
2017-10-19 10:01:05 +02:00