1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 23:04:36 +01:00
Commit Graph

52 Commits

Author SHA1 Message Date
Marijn van der Werf
aa0933d08a Convert rct_window to opaque pointer 2018-01-18 22:57:55 +01:00
Michael Steenbeek
cd5a1ba888 Compile files in world folder as C++ 2018-01-11 13:25:09 +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
Ted John
02c58a6c5a Remove custom base Exception class 2018-01-05 18:11:47 +00: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
500b0d09aa Add follow sprite command to title sequence 2017-12-31 20:03:09 +01:00
Robert Jordan
92fc010b9a Feature: "Load Scenario" title sequence command
New command goes by LOADSC in script files and in the enumeration.
Scenarios are stored using the internal also used for localisation.
Scenarios selected can only be scenarios to originally come with one of
the games or expansions.
Modified Scenario Select window to have a mode just for title editor
scenario selection.
2017-12-31 12:42:40 +01:00
Michael Steenbeek
60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
Michał Janiszewski
2775f5f3e5 Guard title sequence in headless mode 2017-11-08 23:27:51 +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
Christian F. Coors
06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Robert Jordan
0698154ba1 Refactor: Title sequences and switch to size_t 2017-11-01 22:42:58 +00:00
Michael Steenbeek
ce8d9cc71b Rename map_element to tile_element 2017-10-31 19:59:06 +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
Michael Steenbeek
7f9c25a7a9 Use constant for LOCATION_NULL, split off location stuff to Location.h 2017-10-13 22:23:07 +02:00
Michael Steenbeek
42d6a10952 Compile management as C++ 2017-10-11 21:38:26 +02:00
Marijn van der Werf
d02976695d Move new ride and research windows 2017-10-07 22:24:14 +02:00
Michał Janiszewski
00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
Ted John
8b2eb8a13e Move screen variables to OpenRCT2.h 2017-07-29 20:29:29 +01:00
ZehM4tt
ad4eaff323 Fix game not allowing to catch up if rendering is slow.
Refactored game_update to use the given parameters from context.
2017-07-18 15:14:21 +02:00
Tomas Dittmann
bec1538f48 Improve the error console output. (#5839) 2017-07-09 00:09:46 +01:00
spacek531
bd4e8cbd08 change Min to Max 2017-07-07 17:35:32 +01:00
spacek531
c815a427c0 Change Seconds (internal) to Milliseconds, en-GB too 2017-07-07 17:35:31 +01:00
spacek531
f5bc1b598c removed extra newline, changed tabs to spaces 2017-07-07 17:35:31 +01:00
spacek531
b460401ab6 Removed redundant Ceil 2017-07-07 17:35:31 +01:00
spacek531
ec0f35fe7b added comment 2017-07-07 17:35:31 +01:00
spacek531
cbe154f63b I hope this isn't a joke of a commit
I have no idea.
2017-07-07 17:35:31 +01:00
Ted John
fd2eda921f Merge pull request #5705 from Broxzier/hardcoded-values
Replace -1 with SPR_NONE for viewport sprite, sort some includes
2017-07-02 00:08:33 +01:00
Ted John
14443b30f1 Fix #5751: Title sequence seconds are about 0.8 seconds 2017-07-02 00:04:32 +01:00
Broxzier
9e204c11a9 Replace newly added SPR_NONE's with SPRITE_INDEX_NULL, remove new includes
needed to change its type to match .
2017-06-25 22:44:58 +02:00
Broxzier
36fb2c42d9 Replace -1 with SPR_NONE for viewport sprite, sort some includes 2017-06-25 21:13:04 +02: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
Michał Janiszewski
14bbe2c2c2 Verify scenario is not null before accessing it 2017-06-09 22:18:15 +02:00
Ted John
c1ccf2b7a6 Refactor load_palette to call gfx_invalidate_screen
Nearly all calls to load_palette were succeeded with a call to gfx_invalidate_screen. So remove these and stick just one call inside load_palette.
2017-06-07 23:24:18 +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
44120b2e7e Fix build issues 2017-02-02 22:00:01 +00:00
Ted John
fed4c248e3 Remove use of SDL RWOps from title sequence player 2017-02-02 22:00:01 +00:00
Ted John
5d7a712672 Use new S6 importer for title screen and fix issues 2017-02-02 22:00:01 +00:00
Ted John
5c1f2f4c43 Replace IS4Importer with IParkImporter 2017-02-02 22:00:01 +00:00
Ted John
f30a3b315c Add common load method for S4 importer 2017-02-02 22:00:01 +00:00
Ted John
612e268e5f Allow SC4s to be loaded by title seq player 2017-01-31 17:54:39 +00:00
Ted John
288f4782b6 Make dedicated method for window set location 2017-01-23 12:48:10 +00:00
Ted John
e36dc622ad Pass scenario repository dependency to TitleSequencePlayer 2017-01-22 22:04:07 +00:00
Ted John
d5f2ea814a Use scenario repository to load SFMM in title sequence 2017-01-22 21:57:14 +00:00
Ted John
71f83cd7a7 Dissociate rct_news_item from RCT2 2017-01-17 12:51:02 +00:00
Michał Janiszewski
0a36af19e4 Mark classes as final to help devirtualisation 2017-01-13 12:12:50 +01:00