Commit Graph

8352 Commits

Author SHA1 Message Date
Ted John 55ec765811 Include cmdline_sprite.h in vcxproj 2016-07-23 22:25:24 +01:00
Michał Janiszewski 418eb06e66 Fix #3987: division by zero in vehicle update
Prevent division by zero by checking the value first.
2016-07-23 21:52:28 +01:00
Michał Janiszewski 306cf2383c Zero the memory when creating new sprite
Some fields were left uninitialised explicitly (like rct_peep::var_73) but
used when doing logic. If they contained garbage from before the new
sprites were created, it could eventually lead to a desync later on.

This commit adds a new function: `sprite_reset`, which zeroes memory for
a new sprite and is called whenever a sprite is created. Some fields
have to be retained for the sprite to link properly in linked lists,
this function takes care of it.
2016-07-23 12:32:58 +01:00
OpenRCT2 git bot c3f3667619 Merge Localisation/master into OpenRCT2/develop. 2016-07-23 04:00:22 +00:00
Duncan 576132df74 Merge pull request #3169 from duncanspumpkin/track_paint
Junior Rollercoaster Track Paint
2016-07-22 19:31:27 +01:00
duncanspumpkin 9652f68024 Implemented junior rollercoaster paint 2016-07-22 19:16:03 +01:00
Ted John 2d1cbc916f Check for valid colour presets on vehicle game command
Fixes an issue some people were getting on servers where clients were somehow sending invalid preset IDs for a given ride entry.
2016-07-21 19:51:06 +01:00
OpenRCT2 git bot bc3ec7a463 Merge Localisation/master into OpenRCT2/develop. 2016-07-21 04:00:40 +00:00
Ted John 1a4bdbcb77 Fix #4141: Newcomers can't join my server
S6 exporter was not being set to export objects for network game transfer.
2016-07-20 18:04:57 +01:00
Maarten Peters 389ae72781 Add extra default RCT2 vanilla install locations
* 32 bit path for Steam.
* 32 and 64 bit path for standard GOG Galaxy.
* Update readme with latest install locations
2016-07-19 21:57:48 +01:00
Ted John e5722e1d9a Fix #4139: Windows first time firewall launch
std::string can not handle nullptr as argument. Create and use helper method instead.
2016-07-19 21:53:18 +01:00
Michał Janiszewski 583372e082 Fix #4136: Can't exit game
Caused by badly placed check prevent exiting the game.
2016-07-19 20:53:03 +01:00
Ted John 0c180b8171 Merge pull request #4133 from janisozaur/fixes 2016-07-19 18:38:41 +01:00
Ted John 487fcc3c5b Fix #4134: Can't enable park-wide photo price for log flume and river ra
Caused by not shifting the shop item flags (those above 32) to the correct mask bit.
2016-07-19 18:35:44 +01:00
Michał Janiszewski 8446ae9026 Check for NULL scenery 2016-07-18 23:46:59 +02:00
Michał Janiszewski 2900999944 Validate gSavePromptMode 2016-07-18 21:18:41 +02:00
Michał Janiszewski c2929181c2 Ensure validity of gActiveTrackDesign 2016-07-18 21:18:36 +02:00
Michał Janiszewski bb2ae29699 Limit valid sprite indices when renaming peeps 2016-07-18 21:18:23 +02:00
Matte A f6c8993da6 Fix #4080: Track list doesn't update when a track design gets deleted
Show an error if it can't select a track design rather than silently failing. Updating the list would require a file watcher on the tracks directory, and this edge case isn't particularly important at the moment.
2016-07-18 18:10:16 +01:00
Ted John 664c460aa0 Fix #4047: Game crashes when switching to OpenGL 2016-07-18 18:04:37 +01:00
duncanspumpkin 551afeef86 Fix #4096. Max map elements incorrectly sized
Due to a mistake from 2014 the number of map elements that could be used in a park was mistakenly assumed to be the same size as the s6 data for map elements. It turns out there are 256*256 spare elements for whatever reason. When the map element reorginisation code was refactored to remove magic numbers this incorrect value was used instead. This would cause the map element inserter to allocate a map element that shared the same mememory as a sprite. This would cause issues when the sprite tried to update or the map element tried to draw.
2016-07-18 17:49:51 +01:00
OpenRCT2 git bot ca06bbe6e5 Merge Localisation/master into OpenRCT2/develop. 2016-07-18 04:00:19 +00:00
Ted John fd32eef2f7 Merge pull request #4129 from janisozaur/g_sprite_list
Refactor access to g_sprite_list
2016-07-17 23:27:58 +01:00
Michał Janiszewski 010422c7da Load and save sprites to S6 explicitly 2016-07-18 00:23:33 +02:00
Ted John e6d1a71dad Use assertion code for Guard::Fail 2016-07-17 23:20:40 +01:00
Michał Janiszewski bc769ea248 Use openrct2_assert in get_sprite 2016-07-17 23:54:31 +02:00
Michał Janiszewski ce03b2fa5e Add openrct2_assert function for C 2016-07-17 23:54:12 +02:00
Michał Janiszewski 313230a9a4 Refactor more code to correctly handle sprite count 2016-07-17 23:24:16 +02:00
Michał Janiszewski 381545aa2b Refactor loop in vehicle update not to access invalid memory 2016-07-17 23:14:27 +02:00
Michał Janiszewski 9f57c82653 Refactor access to g_sprite_list
Hide g_sprite_list behind accessor function with a check. `assert` is
temporarily disabled, as it breaks nearly every park.
2016-07-17 22:19:34 +02:00
Michał Janiszewski dd25cdc4f4 Change gfx_clear argument type
`colour` gets passed on to IDrawingContext::Clear, which expects
uint32
2016-07-17 20:41:19 +01:00
Michał Janiszewski 4db876c184 Add missing data to SpriteTypeToSlowWalkMap
* Add missing data to SpriteTypeToSlowWalkMap
2016-07-17 17:47:22 +01:00
Ted John a7229b567d Fix #4123: Different water colour at the main menu title sequence
Caused by title screen not refreshing the palette after loading a park
2016-07-17 17:46:16 +01:00
Ted John 964cf66f6b Zero g1 elements when freeing images
This is to help diagnose issues where we are drawing invalid sprites as well as general cleanliness
2016-07-16 18:08:58 +01:00
duncanspumpkin 83fa818190 Use the correct count to work out if regions will overlap. Fix #4114 2016-07-16 18:07:13 +01:00
Ted John e9df7310db Add missing object type check for scenery ORIs 2016-07-16 17:57:58 +01:00
Michał Janiszewski c3cd35fdbd Integrate g_paint_structs (0xF1A50C) 2016-07-16 16:43:25 +01:00
Michał Janiszewski 81ab78a335 Add missing `static` to `ride_is_ride` 2016-07-16 17:42:10 +02:00
Ted John 304d6d9304 Fix #4110: guests still get charged for rides 2016-07-16 16:27:49 +01:00
Michał Janiszewski de980c5c7a Integrate paint structs 2016-07-16 16:02:30 +01:00
Ted John be4668ee3a Fix #4108: Assertion an crash at startup 2016-07-16 15:33:26 +01:00
wolfreak99 57e790eba4 Correct int_valid to int_val 2016-07-16 15:13:16 +01:00
Michał Janiszewski 1673163bc2 Integrate path map elements in get_ride_queue_end 2016-07-16 15:12:51 +01:00
Ted John c123673d6f Merge pull request #4106 from IntelOrca/improve-assertions
Improve guard assertions so that they display the location of where the guard was and also allow a dump file to be created on abort.
2016-07-16 15:12:30 +01:00
Ted John c413c43123 only include windows.h on windows 2016-07-16 14:49:41 +01:00
Michał Janiszewski a2ce5d5696 Integrate gCurrentVehicle 2016-07-16 14:47:53 +01:00
Ted John bd3331df4f call assert() if not using breakpad 2016-07-16 14:34:10 +01:00
Ted John 5f41e3a0eb add function and line info to guards 2016-07-16 14:17:36 +01:00
Duncan aaaba7bb6b Merge pull request #4105 from duncanspumpkin/fix_image
Fix Image List
2016-07-16 14:17:22 +01:00
Ted John d25baf7bd3 improve assertion messages 2016-07-16 14:12:16 +01:00