1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 09:14:58 +01:00
Commit Graph

78 Commits

Author SHA1 Message Date
Michael Steenbeek
6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Ethan Smith
64f2778c10 Refactor MAX_PATH to be in common.h 2017-12-07 22:04:33 +00: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
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
Christian F. Coors
06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +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
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
Robert Jordan
ec22d04089 Fix #6470: Title sequence naming issues
Predefined title sequence filenames are now treated as "reserved".
Custom title sequences cannot use reserved names and an error will
appear if the user tries.

Duplicating predefined title sequence now uses default text of
predefined sequence's proper name instead of filename.

Renamed `WIDX_TITLE_EDITOR_RENAME_SAVE_BUTTON` to
`WIDX_TITLE_EDITOR_RENAME_BUTTON` to follow formatting of other preset
button ids.

Added string id 6154, `STR_ERROR_RESERVED_NAME`, "Name is reserved".
2017-10-18 11:18:14 +02:00
Robert Jordan
74f1eb39a8 Fix: TitleSequence spelling errors
```c++
bool TileSequenceSave(TitleSequence * seq);
bool TileSequenceAddPark(TitleSequence * seq, const utf8 * path, const
utf8 * name);
bool TileSequenceRenamePark(TitleSequence * seq, size_t index, const
utf8 * name);
```

Renamed to:

```c++
bool TitleSequenceSave(TitleSequence * seq);
bool TitleSequenceAddPark(TitleSequence * seq, const utf8 * path, const
utf8 * name);
bool TitleSequenceRenamePark(TitleSequence * seq, size_t index, const
utf8 * name);
```
2017-10-15 10:33:10 +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
Michał Janiszewski
c4538496c5 Make sure variables are either static or declared externally 2017-10-09 22:59:40 +02:00
Marijn van der Werf
d02976695d Move new ride and research windows 2017-10-07 22:24:14 +02:00
Tyler Ruckinger
d33803b5d0 Ensure title sequence user data path exists 2017-10-03 09:32:11 +02: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
Marijn van der Werf
dc7f4bcf89 Convert most dialogs to C++ 2017-08-10 13:42:27 +02:00
Ted John
6699d0885b Merge pull request #6065 from IntelOrca/refactor/remove-rct2.c
Move remaining functions out rct2.c
2017-07-30 18:09:26 +01: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
8b2eb8a13e Move screen variables to OpenRCT2.h 2017-07-29 20:29:29 +01:00
Christian F. Coors
32da66aa79 Fix build errors 2017-07-25 22:50:19 +02:00
Ted John
bc88cb9c2b Make TitleScreen a class (#5971) 2017-07-22 23:42:14 +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
Ted John
cb884dad11 Refactor rct2_draw to a new Painter class
Right now this is created for each drawing engine, but should eventually be a dependency into them.
2017-07-16 23:25:11 +01:00
Tomas Dittmann
c1b8230eef Wrap the FileStream creation in try-catch. (#5840) 2017-07-13 18:56:33 +01: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
Ted John
2fffeb9470 Set the map to blank if no title sequences can load 2017-06-29 19:24:28 +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
Ted John
f275e5ba9b Remove all platform.h includes from header files
System headers, particularly windows.h polute the namespace too much with macros and unwanted definitions. Do not use them in header files.
2017-06-25 18:59:56 +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
Marijn van der Werf
8766ec37a1 Add Android project 2017-06-15 14:22:15 +02:00
Ted John
97d68957f0 Fix segfault in screenshot command 2017-06-10 15:48:05 +01:00
Michał Janiszewski
14bbe2c2c2 Verify scenario is not null before accessing it 2017-06-09 22:18:15 +02:00