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

7601 Commits

Author SHA1 Message Date
Broxzier
ecc9637bbd Clearing tile inspector clipboard when loading a park 2016-11-09 20:03:19 +01:00
Broxzier
8c54b1208b Add copy/paste functionality to tile inspector 2016-11-09 20:03:18 +01:00
duncanspumpkin
2f6f728200 Fix #4714. Prevent invalid peep access on closed golf rides.
When a golf ride is closed it will remove the peep from the vehicle (the ball). Due to the way vehicles leave stations the vehicle would still travel to the next hole but when it tried to update the peeps action it would crash. This skips updating the peeps action but lets the ball still continue. This will cause a phantom ball to go around the golf course until all the vehicles are back in their closed state.
2016-11-09 19:00:09 +00:00
Ted John
4662b648d2 Merge pull request #4700 from IntelOrca/refactor/language-cpp
Refactor language.cpp
2016-11-09 18:38:24 +00:00
Ted John
953f479cd9 Fix #4762: Assertion in localisation (format_string_part)
The buffer overflow protection in format_string was not working correctly for several reasons. For windows builds this just so happened to write over gMapTooltipFormatArgs causing the assertion. Extra asserts have been added to check overflows in format_string.
2016-11-09 18:29:49 +00:00
wolfreak99
1f0b2aefb7 Fix #4771: Main Menu music not playing
When audio_init_ride_sounds is called, it calls audio_stop_title_music, but never calls audio_start_title_music. if you do an assert for gTitleMusicChannel it shows it is null. this fixes that. i will say though this is most definitely a band-aid fix, because if run audio_start_title_music in the audio_init_ride_sounds, it still doesn't play out loud. at least on my setup it doesn't.
2016-11-09 17:37:41 +00:00
Michał Janiszewski
867de18c96 Use json_is_true instead of json_boolean_value
This should lower required version of jansson, which would
let us use 2.5 in Trusty (current version in Travis-CI)

See https://github.com/akheron/jansson/issues/146
2016-11-09 13:19:12 +01:00
Michał Janiszewski
44e9129af5 Remove unused semicolons after end of function
[ci skip]
2016-11-09 13:15:46 +01:00
Ted John
7b5858cb92 Fix UTF-8 string literals, add BOM to language.cpp
MSVC requires source files to be in UTF-8 with BOM in order to compile them correctly as UTF-8.
2016-11-08 17:29:46 +00:00
Ted John
941d92dc2a Fix convert_multibyte_charset 2016-11-08 17:02:37 +00:00
Ted John
c506f2730d Reformat language table 2016-11-08 17:02:37 +00:00
Ted John
894899630b Use UTF-8 literal strings 2016-11-08 17:02:37 +00:00
Ted John
3d1e4c10c1 Fix size argument in GetLanguagePath 2016-11-08 17:02:37 +00:00
Ted John
3af07f6e00 Remove unused constant 2016-11-08 17:02:37 +00:00
Ted John
91ef540c25 Fix gcc errors 2016-11-08 17:02:37 +00:00
Ted John
b4e65ace52 Refactor font loading 2016-11-08 17:02:37 +00:00
Ted John
6461b21e09 Use more C++ functions 2016-11-08 17:02:37 +00:00
Ted John
6523081b84 Conform to C++ style 2016-11-08 16:59:46 +00:00
Ted John
216dc64342 Convert tabs to spaces in language.cpp 2016-11-08 16:59:46 +00:00
Michael Steenbeek
26c695bdd1 Use ColourMapA for looking up the mini preview background colour, fixes #1238 (#4766) 2016-11-07 12:35:14 +01:00
Michał Janiszewski
9c818ea2dc Reorder fields to reduce padding (#4758)
Reduces padding:
* In `rct_viewport` from 5 to 1
* In `rct_ride_entrance_definition` from 4 to 0
2016-11-06 21:06:02 +01:00
Michał Janiszewski
b164c2be61 Extract openrct2_assert to guard.h (#4753)
* Extract openrct2_assert to Guard.hpp

`openrct2_assert` is not defined in util.c and including all of
openrct2.h is unnecessary.
2016-11-06 21:02:25 +01:00
Michał Janiszewski
43a7e6b854 Add missing static keyword to template-ised functions (#4750)
This fixes building with ICC
2016-11-06 21:01:07 +01:00
Michał Janiszewski
06b659db40 Replace malloc(0) with explicit NULL
From documentation on `void* malloc( size_t size );`:
> If size is zero, the behavior is implementation defined (null pointer
may be returned, or some non-null pointer may be returned that may not
be used to access storage).

Both `free()` and `realloc()` understand `NULL`, so use that to avoid
implementation-defined behaviour
2016-11-06 21:00:47 +01:00
Michał Janiszewski
fe3b15c2f1 Mask translucent bit out from colour
Fixes #4765
2016-11-06 20:51:38 +01:00
Matte A
c029515d76 Changing some default configs to true (#4540) 2016-11-06 19:12:42 +01:00
Michael Steenbeek
fc9884092a Merge pull request #4764 from janisozaur/check-ride-type
Prevent checking of flags of invalid ride type
2016-11-06 18:40:56 +01:00
Michał Janiszewski
512c7bcf51 Prevent crash when opening a window on invalid ride 2016-11-06 18:26:45 +01:00
Michał Janiszewski
7e326972a9 Prevent checking of flags of invalid ride type
Such case can happen with following function call chain in stack trace:
* `game_command_create_ride` ride.c:6234
* `ride_create` ride.c:6070
* `rideTypeShouldLoseSeparateFlag` rct1.c:88
2016-11-06 18:03:26 +01:00
Ted John
c268b51521 Merge pull request #4757 from janisozaur/memory
Ensure all memory allocated with Memory is valid
2016-11-06 11:28:30 +00:00
Michał Janiszewski
2c6c99dfe0 Add user-friendly information about failed allocation 2016-11-06 11:59:30 +01:00
Michał Janiszewski
c9a1ce593c Fix wrong return value in Stopwatch::GetElapsedTicks 2016-11-05 22:40:28 +00:00
Michał Janiszewski
e4e6f2f68a Ensure all memory allocated with Memory is valid 2016-11-05 23:12:35 +01:00
Duncan
a4f9d41f57 Merge pull request #4746 from marijnvdwerf/fix/supports
Fix scenery segments
2016-11-05 10:38:45 +00:00
Michael Steenbeek
ea66b4ca84 Merge pull request #4749 from Overv/develop
Fix #4747: Fix available land rights not being recounted when using sandbox tools
2016-11-04 22:56:12 +01:00
Alexander Overvoorde
9be47d11ed Fix #4747: Fix available land rights not being recounted when using sandbox tools
This commit fixes the game command set_land_ownership missing a land
rights recount call. This would cause problems when the user changes
land ownership with the sandbox mode tools.
2016-11-04 22:51:35 +01:00
Michał Janiszewski
b6525c298e Verify access to terrainEdgeTypeStringIds 2016-11-04 22:21:37 +01:00
Michał Janiszewski
3653baf720 Remove needless const for returned values 2016-11-04 09:44:13 +01:00
Marijn van der Werf
0a431cf918 Fix #4698: Scenery blocks wrong segments 2016-11-03 21:58:50 +01:00
Michael Steenbeek
b5630a5a5e Merge pull request #4701 from Overv/implement-disabled-land-rights
Resolves #4559: Changes land rights buttons to be disabled if no tiles for sale remain
2016-11-03 19:42:08 +01:00
duncanspumpkin
cc0803d466 Prevent crash #4694. Crash in ride_get_entrance with no station
Issue is being caused by deleting the station track without removing the station track entry in the ride struct. This will prevent the crash but this should not happen in practice.
2016-11-03 18:23:42 +00:00
Marijn van der Werf
5d2b5f4d5c Make NO_RCT2 builds possible again 2016-11-02 22:39:58 +01:00
duncanspumpkin
8466de7cbf Fix #4689. Object selction tabs sometimes flicker.
Issue caused by switching between tabs when half way through tab animation. The frame number would not be reset until the next frame and this would cause a split second glitch when moving from a long animation tab to a short animation tab. Issue fixed by reseting the frame number when switching tabs.
2016-11-02 19:08:12 +00:00
Duncan
cc0c552fa1 Merge pull request #4743 from duncanspumpkin/fix_bins
Fix #4725: Filled bins incorrectly displayed
2016-11-02 18:30:38 +00:00
Michał Janiszewski
1f0adb95da Check value of DEBUG_LEVEL_X macro, not just definition
DEBUG_LEVEL_X macros are always defined to 0 or 1, this could prevent
some optimisations from compilers, especially inlining
`get_current_rotation()`.
2016-11-02 08:19:25 +00:00
Michał Janiszewski
a7cd10a7f7 Cache rotation value in scenery_paint 2016-11-01 22:23:40 +01:00
duncanspumpkin
6caa6d9a3f Fix #4725: Filled bins incorrectly displayed
The bins were incorrectly displaying their filled status on some
rotations. This was caused by two mistakes. The first mistake was only
rotating the status by 1 place when it was 2 bit the second was due to
rotating it the wrong direction. This was likely caused by the implementor
not realising that there were two 'rol' commands but due to the inverted
nature of this it would end up being two 'ror's.
2016-11-01 19:23:00 +00:00
Ted John
b568f002d4 Merge pull request #4729 from xavery/bitcount-use-cpu
Use POPCNT, if available, to count the number of set bits
2016-11-01 13:26:39 +00:00
Daniel Kamil Kozar
55f1d3aac6 Fixes to the new bitcount implementation
Use Intel-standardized _mm_popcnt_u32 instead of Microsoft-specific
__popcnt, replace assert with openrct2_assert, replace bitcount's argument
with uint32.
2016-11-01 11:45:17 +01:00
Hielke Morsink
ab1708a970 Fix quarter-scenery cluster selection 2016-11-01 09:46:30 +00:00