Commit Graph
496 Commits
Author SHA1 Message Date
Florian Will eb6ea8e81d Fix #5893: Invalidate widget only if it's visible
Remove the widget_invalidate() call after changing a guest's
guest_heading_to_ride_id, because that call fails a debug assertion if
the guest window is open and the currently active tab is not the
"overview" tab. In Release builds (if assertion is disabled),
widget_invalidate() might access the widgets array out of bounds.

Instead, introduce a new flag PEEP_INVALIDATE_PEEP_ACTION for
window_invalidate_flags in the peep struct and set that flag. The guest
window update function then makes sure to invalidate the label if the
flag is set.

The flag could be used in other places to reduce libopenrct2 dependency
on window_*() calls (see #6808), but this commit only cares about cases
where the assertion would fail.
2019-04-15 14:26:33 +02:00
Matt 37c3809744 Implement partial multicore rendering 2019-03-31 15:50:55 +02:00
Ben Hopkins c537f87fd5 Add scenery picker shortcut 2019-03-24 22:45:42 +01:00
Michael Steenbeek df687ac59c Merge pull request #8928 from AaronVanGeffen/scenario-editor-cheats
Make cheats menu partially accessible in scenario editor
2019-03-21 17:42:20 +01:00
Aaron van Geffen f4602d0a34 Use SCREEN_FLAGS_EDITOR when appropriate. 2019-03-20 20:58:08 +01:00
duncanspumpkin 320c88df99 Make requested changes 2019-03-20 18:48:01 +00:00
duncanspumpkin d5fa7185ca Prevent a crash when bad data passed 2019-03-18 21:50:29 +00:00
duncanspumpkin 576976627e Use displayable character instead of pipe 2019-03-18 21:45:32 +00:00
duncanspumpkin fb36d2b1f9 Set price of all rides from the console 2019-03-18 21:38:48 +00:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John ca023f7c5e Fix #8829: invalid read in window_guest_open 2019-03-09 13:05:12 +00:00
Ted John cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
duncanspumpkin 93873c5e74 Make review changes. Fix formating
Reorder includes
2019-02-27 08:15:11 +00:00
duncanspumpkin d01dfe44d5 Add RideSetSettingAction
Use game action for calling

Use correct error titles for operation mode changes
2019-02-27 08:15:07 +00:00
duncanspumpkin d5ad6b7b0f Move game command calls to a single call site 2019-02-26 12:47:44 +00:00
duncanspumpkin 2d1ed8ce05 Fix interactive console staff set costume command.
After the refactor to GameActions, forgot to actually issue the command after generating it.
2019-02-24 18:10:07 +00:00
Michael SteenbeekandIntelOrca dfa0c528c2 Rename command to forbid_marketing_campaigns
Co-Authored-By: IntelOrca <ted@brambles.org>
2019-02-20 16:49:03 +00:00
Ted John 4013479094 Refactor marketing to be a single vector 2019-02-20 16:49:02 +00:00
Matt ecd4f61115 Add Network window 2019-02-07 18:50:58 +01:00
Aaron van Geffen 3be6137fde Rename event_07 to periodic_update. (#8684) 2019-02-07 17:46:52 +01:00
duncanspumpkin 8a69b89df6 Move Staff Set Orders into game action framework.
Split up costume and order game commands
2019-02-05 20:38:18 +00:00
Michał Janiszewski 8a395e3706 Fix misaligned access (#8665)
Platforms like ARM are very sensitive to unaligned access. This change
makes sure the addresses obey the C++ standard and are properly aligned.
2019-02-04 23:15:14 +01:00
Tom Lankhorst 521948139c Chat toggle button (#8648)
* Add chat_available()

* Add appropriate strings

* Add new Chat icon

* Implement Chat button

* CS

* Fix chat icon

* Make chat icon a bit smaller and less bright

* Update chat icon

* Update changelog
2019-02-03 23:30:34 +01:00
Michał Janiszewski 7655ba7746 Make screenshot return path to file 2019-01-31 23:36:41 +01:00
Tom Lankhorst 01a52d236c Use vector<string> in InteractiveConsole
Issue #8597 shows Valgrind result indicating a memory leak in
InteractiveConsole. This is fixed in #8619 by ensuring that free() is
called appropriately.
This commit takes that a step further by removing all manual memory
management in favour of using vector<string>.

- argc is now gone in favour of argv.empty()/argv.size()
- argv_t is a vector of strings of utf8's
- console_command_func's signature is changed accordingly
2019-01-24 16:12:49 +01:00
Michał Janiszewski 304840069d Add sprite sorting benchmark 2019-01-22 19:45:56 +01:00
Tom Lankhorst 55af6ad0e1 Free allocated memory when 'argc' == 0 (#8619)
Fixes leak in #8597, InteractiveConsole allocates memory for arguments,
but frees it only if the argument count is greater than zero.
2019-01-21 23:03:12 +00:00
Ted John 92412d4bab Store ride index inside ride struct 2019-01-18 11:46:18 +01:00
Ted John 8701286772 Use new ride_id_t typedef (#8561) 2019-01-12 10:11:55 +00:00
Matt 6aee1cba28 Remove deprecated function std::asctime. 2019-01-02 05:35:57 +01:00
Matt 1f20fdf65b Log more replay information to console. 2019-01-02 05:20:10 +01:00
Matt c7ab757a86 Cleanup. 2018-12-29 23:06:15 +01:00
Matt df0cc72887 Add normalisation support to remove gaps. 2018-12-29 19:23:27 +01:00
Matt a6efef1e81 Add support to record and replay game commands/actions. 2018-12-29 19:23:27 +01:00
Tobias 73345b414b Fix #7985: Giant Screenshot ignores 'Map rendering' settings 2018-12-21 21:27:06 +01:00
Matt 4dce91e027 Move defines into Colour.h 2018-12-20 22:29:16 +01:00
ζeh Matt 7d19a5bc77 Refactor memcpy to std::memcpy and memset to std::memset (#8408) 2018-12-15 22:23:31 +01:00
Michael Steenbeek 6d0f0334d7 Merge pull request #8339 from ZehMatt/realtime-ticks
Use real time ticks for UI effects.
2018-12-15 21:00:44 +01:00
Matt 468d94a6ca Remove gCurrentViewportFlags 2018-12-05 23:09:17 +01:00
Matt 4bc69a0111 Introduce gCurrentRealTimeTicks and refactor some variable names. 2018-12-01 16:36:00 +01:00
Michał Janiszewski a78e812a64 Add dereference command to aid testing breakpad 2018-11-29 21:40:59 +01:00
Hielke Morsink 354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
TELK 4cc2057b94 Add 'say' command in console (#8259)
* Add 'say' command in console

* Unifying space just before }
2018-11-18 20:38:55 +01:00
Michał Janiszewski af91a0ef61 Add abort and terminate to console
Often when testing things out there's a need to have a way of inducing a
crash. Rather than trying to figure out what might be the bug that would
cause such conditions on given version, compiler and OS, provide a
simple way to call std::abort() and std::terminate() via the in-game
console.

Additionally, sort the commands.
2018-11-17 00:26:27 +01:00
Hielke Morsink 107faaf821 Add and use game action for setting the climate
Also reordered the registered game actions the same as headers, so they are easier to find.
2018-11-08 22:39:13 +01:00
Michael Steenbeek f8add7f62e Rename rct_tile_element to TileElement 2018-11-01 13:53:50 +01:00
Michał Janiszewski a0c9e1b6c7 Update format string for size_t MAX_BANNERS 2018-10-31 12:51:06 +01:00
Michał Janiszewski 74ee2cf741 Fix types of windows scenery tab selections (#8179) 2018-10-29 14:52:07 -07:00
ζeh Matt 3e457436b1 Refactor some painting code. (#8144) 2018-10-26 10:49:27 -07:00
tombomp 18307e3841 Add a "current_rotation" variable to the console (#8080)
This is a value from 0-3 showing current rotation of main window, 3
being the default and lower going counter clockwise. Possible to set as
well.
2018-10-14 23:44:45 +02:00