Commit Graph

240 Commits

Author SHA1 Message Date
Michael Steenbeek bb483b0c5f Replace direct access to large scenery colour with helper functions 2017-11-17 22:54:54 +01:00
Enrico Paganin 95e75c4575 Refactor colour.h flags 2017-11-17 17:03:57 +01:00
Michael Steenbeek 3bd68947b9 Create functions for getting large scenery type and sequence 2017-11-17 12:56:08 +01:00
Michael Steenbeek 3cf8da184d Create tile_element_get_ride_index() 2017-11-17 12:54:47 +01:00
Michael Steenbeek f448d16707 Add methods for getting and setting track element type 2017-11-17 12:54:47 +01:00
Michael Steenbeek ab3f42f1f9 Add getters and setters for ride index and maze entry 2017-11-17 12:54:47 +01:00
Aaron van Geffen 13f99e495e Reduce console verbosity for TTF loading. 2017-11-17 10:31:26 +01:00
Ted John f36cffc98a Fix running headless instances
colours_init_maps was not blocked when running in headless mode.
2017-11-16 21:53:34 +00:00
Ted John b5137b0e37
Merge pull request #6574 from IntelOrca/protect-g1-access
Refactor g1 access
2017-11-16 18:51:32 +00:00
Marijn van der Werf bd0bd9e038 Move top toolbar to UI module 2017-11-11 23:57:19 +01:00
Marijn van der Werf c247bbcb82 Move ride construction window to UI module 2017-11-11 23:57:19 +01:00
Robert Jordan 4c3065619e Fix #996, #2254, #2589, #2875: Viewport scrolling getting stuck or shaking
Shaking while at the edge of the map has been completely eliminated. In
order to do this, comparison with tile height was also removed which
fixed a few outlier cases.

The main cause was viewport axis were only being set if it's respective
isometric axis was at the boundary, instead of either isometric axis.
Viewport no longer gets stuck which was related to the shaking in the
end. (#2875)

Refactored viewport_update_position. I moved
viewport_set_underground_flag above the bounds checking function since
it had no relation to it. (#996, #2589)

Scrolling on the map edge with arrow keys or mouse edge will now go the
same speed in both directions. (#2254)

Added changelog entry.
2017-11-08 17:43:50 +01:00
Ted John 444a8c1602 Const protect get_g1_element 2017-11-03 22:18:10 +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 666809fb8b Move object load error window to UI module 2017-11-03 01:54:37 +01:00
Marijn van der Werf 59df233669 Move text input window to UI module 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 b85f9c3f68 Move maze construction 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
Marijn van der Werf ee6c3cfc56 Move track design list window to UI module 2017-11-03 01:54:37 +01:00
Marijn van der Werf 61255e25a7 Move Ride window 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
Michael Steenbeek af845beb61 Replace mapElement with tileElement 2017-10-31 19:59:06 +01:00
Michael Steenbeek ce8d9cc71b Rename map_element to tile_element 2017-10-31 19:59:06 +01:00
Aaron van Geffen 765e3d9a4f Remove unnecessary ceil call 2017-10-30 16:31:03 +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
Aaron van Geffen dd4f5ff93b Use 'STHeiti' for Chinese (Simplified) on macOS. 2017-10-30 12:06:05 +01:00
Aaron van Geffen 9cb25e6106 Use 'LiHei Pro' for Chinese (Traditional) on macOS. 2017-10-30 12:06:05 +01:00
Aaron van Geffen b393ce3f11 Introduce 'Nanum' as a macOS alternative for Gulim when using Korean. 2017-10-30 12:06:05 +01:00
Aaron van Geffen 744341af07 Introduce 'Arial Unicode MS' as a more compatible alternative to regular Arial. 2017-10-30 12:06:05 +01:00
Aaron van Geffen 58add28604 Introduce 'Hiragino Maru Gothic' for Japanese on macOS. 2017-10-30 12:06:05 +01:00
Aaron van Geffen 8c8a2317f6 Initial prototype for font families. 2017-10-30 12:06:05 +01:00
Michał Janiszewski 90a14205c8 Compile track_data.c as C++ 2017-10-25 23:53:47 +02:00
Cody Jung c25a4490e4 Windows: Fix bad screenshots if park name has ":"
Fixes issue #6481 where taking a screenshot of a park with a colon in
its name on Windows was causing the screenshot data to get written as an
alternate data stream.

This patch replaces any colons with hyphens in screenshot filenames on
Windows.
2017-10-24 14:52:40 +02:00
Aaron van Geffen 9984fcac88 Set default TTF font heights to more sensible values. 2017-10-22 21:47:17 +02:00
Aaron van Geffen 9f67fafc43 Add theme support for console background colour. 2017-10-19 21:26:53 +02:00
Aaron van Geffen a0fb2a6d7c Fix game console overflowing when using TTF for rendering. 2017-10-19 21:26:53 +02: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
Marijn van der Werf bcb6b83a7d Fix #6514: Groupbox titles break format arguments 2017-10-18 21:55:20 +02:00
Aaron van Geffen d6ee66acb4 Split/rename ROW_HEIGHT constant into widget-specific ones. 2017-10-18 11:17:22 +02:00
Aaron van Geffen 7e9a5bbb6b Increase padding for finances summary and marketing tab. 2017-10-18 11:17:22 +02:00
Michael Steenbeek 79365b7a91 Merge pull request #6075 from marijnvdwerf/ui/text-paint
Refactor text painting
2017-10-18 07:49:13 +02:00
Michael Steenbeek bb01699b7d Compile track.c as C++ 2017-10-17 13:51:47 +02:00
Michael Steenbeek 6a66ef8668 Merge pull request #6442 from janisozaur/vehicle-cpp
Compile vehicle.c as C++
2017-10-16 17:15:43 +02:00
Robert Jordan 9d5c6a4127 Use proper names for predefined themes
Predefined themes *RCT1* and *RCT2* will now be called their respective
game name*RollerCoaster Tycoon 1* or *RollerCoaster Tycoon 2* in the
current language.

Predefined themes in the config file now are prefixed with an asterisk
like they are supposed to be. AKA `*RCT1` instead of `RCT1`.

This will invalidate the user's currently selected theme in the config
file, but only if they were using RCT1's theme.
2017-10-16 10:04:09 +02:00
Aaron van Geffen 08f7aba817 Rename 'blend' function to 'blendColours'. 2017-10-15 22:31:11 +02:00
Aaron van Geffen 551fdabc7f Make the hinting threshold configurable per font.
This addresses the issue that tofu would not show up in Arial on macOS if the
threshold was set to 60. It being the fallback font, it is important that they
do, which requires lowering to at most 43.

However, it is even more important that the threshold is left at 60 for kanji
in e.g. Japanese to render properly.

Hence, for the moment, Arial is the only font now using a hinting threshold
of 40, for now.
2017-10-15 22:31:11 +02:00
Aaron van Geffen 899c859948 Use light hinting mode iff hinting is enabled.
This makes use of TTF_SetFontHinting, which was ported from SDL_ttf for the occasion.
2017-10-15 22:31:11 +02:00
Marijn van der Werf 4213a66069 Improve colour blending 2017-10-15 22:31:11 +02:00
Aaron van Geffen 579c578777 Address regression: do not blend to remappable colour areas. 2017-10-15 22:31:11 +02:00