Commit Graph

44 Commits

Author SHA1 Message Date
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Ted John ae6af47341 Move TitleSequencePlayer to libopenrct2ui 2018-06-10 23:39:56 +01:00
Ted John 056b596124 Use reference types in TitleSequencePlayer 2018-05-31 12:49:09 +01:00
Aaron van Geffen dcff6895b5 Refactor game_init_all into GameState::InitAll. 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 3d98e1ad1d Do not reset title sequence when loading the title screen 2018-05-29 18:39:12 +01:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Gymnasiast 778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Ted John c3eab7ead6 Refactor window.c to C++ 2018-01-07 12:39:58 +01:00
Ted John f18595a1c1 Refactor viewport.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 3dcbebcf68 Refactor drawing.c to C++ 2018-01-05 22:57:57 +01:00
Robert Jordan 907f18fd69 Fix: Following canceling
Stop previewing sequence now unfollows the current sprite.
Using the arrow keys in-game cancels following.
Resizing the window no longer cancels following.
2017-12-31 20:03:09 +01:00
Robert Jordan 298420fd1e Finalize follow sprite command
Added new smart follow variable to window to more intuitively follow
sprites that may not be directly followable at all times.
Follow sprite is now canceled when dragging the screen but not
scrolling. This is only relevant when testing title sequences in game.
Select sprite button is now disabled in the title menu.
Sprites are now identified based on their name. Excess identification
information is not given as it'd clutter up the screen and is not
necissary with the viewbox in the command editor.
2017-12-31 20:03:09 +01:00
Hielke Morsink db7efda880 Fix #6845: Logo artifacts when changing scale.
This correctly invalidates the areas with logo and version text.
2017-12-31 13:14:03 +01:00
Marijn van der Werf e9ef843619 Move majority of input.c to UI 2017-12-16 15:47:38 +02:00
Michael Steenbeek 6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Michael Steenbeek 60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
Marijn van der Werf 1e335308cc Move map tooltip to ui module 2017-11-03 01:54:37 +01:00
Robert Jordan d79d2a7503 Fix numerous title sequence editor bugs
* Change how current title sequence is handled. It can either be
previewing a title sequence, or playing the preset.
* LoadMM and LoadRCT1 now save when script is saved.
* No more infinite failing to load loops.
* No more crashing when attempting to display "no save selected" in
title editor.
* Title editor now gracefully fails to preview a title sequence and lets
the user know with a context error.
* When preset title sequence fails to load, the preset will forcibly be
changed to the first sequence to successfully load.

Added changelog entries for last two items.
2017-11-02 18:36:37 +01:00
Robert Jordan 9917a24a58 Remove < 0 check for size_t 2017-11-01 22:42:58 +00:00
Robert Jordan 0698154ba1 Refactor: Title sequences and switch to size_t 2017-11-01 22:42:58 +00: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 00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
wolfreak99 e1f40352b6 Fix various currently loaded map marker issues
* create gCurrentLoadedPath for Load/Save dialog

* Clear gCurrentLoadedPath upon quitting game/loading titlescreen

* Mark loaded landscapes in load dialog
2017-09-12 08:09:54 +02:00
Marijn van der Werf 294cef3c9b Move additional windows to UI project 2017-08-14 23:53:28 +02:00
Marijn van der Werf 4d90940d21 Move windows to UI project 2017-08-10 13:42:27 +02:00
Michał Janiszewski a90dce018d Properly dispose of TitleSequencePlayer to plug memleak 2017-07-30 16:46:56 +02:00
Michał Janiszewski 1ea5a902df Initialise various fields and variables 2017-07-30 15:28:16 +02:00
Ted John bc88cb9c2b Make TitleScreen a class (#5971) 2017-07-22 23:42:14 +01:00
Ted John 2fffeb9470 Set the map to blank if no title sequences can load 2017-06-29 19:24:28 +01:00
ZehM4tt 10740106f2 Fix causing asserts with DEBUG_DESYNC and loading new maps. (#5650)
Moved input handling out of game_logic_update back to game_update,
should be executed per frame not tick.
Placed gInUpdateCode at the proper locations.
2017-06-19 17:41:28 +02:00
Ted John 97d68957f0 Fix segfault in screenshot command 2017-06-10 15:48:05 +01:00
Michał Janiszewski 79d76759bb Fix #5516: Update copyrights for 2017
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
Ted John bd9839ff50 Get the game working
Mostly just needed to resolve screen size which is now retrieved via ui context.
2017-05-29 22:38:43 +02:00
Ted John bcc0bfa485 Rename climate.h to Climate.h 2017-03-11 22:59:33 +00:00
Michał Janiszewski 7f48df20ec Refactor input 2017-02-27 20:20:41 +01:00
Ted John fb2c835d52 Include new config header 2017-02-18 15:45:10 +00:00
Ted John abac2ca614 Consolidate game initialisation into single method 2017-01-23 12:44:27 +00:00
Ted John e36dc622ad Pass scenario repository dependency to TitleSequencePlayer 2017-01-22 22:04:07 +00:00
Ted John 71f83cd7a7 Dissociate rct_news_item from RCT2 2017-01-17 12:51:02 +00:00
Broxzier 60603ae10a Use types from common.h 2017-01-14 12:37:31 +01:00
Ted John 25bc798ff8 Move contents of src into project sub directory 2017-01-04 17:44:12 +00:00
Renamed from src/title/TitleScreen.cpp (Browse further)