Commit Graph

6582 Commits

Author SHA1 Message Date
Michael Steenbeek e0f2aa9b99
Fix: Brakes keep working during "Brakes failure"
This was an error in the original implementation back in 2015.
Thanks to @duncanspumpkin for checking the assembly.
2020-07-30 22:21:19 +02:00
Michael Steenbeek cd86d3d757
Fix #7969: Loading landscape resets money, inventions and objective (#12520) 2020-07-30 21:43:46 +02:00
ζeh Matt b0c67762b7
Merge pull request #12485 from ZehMatt/network/cleanup-1
Refactor the Network a bit, setting the stones for further refactor work
2020-07-30 20:54:18 +02:00
Michael Steenbeek e03753c139
Fix #12498: Circus construction ghost does not rotate (#12519) 2020-07-30 20:29:26 +02:00
Matt f258c8034d Wrap code with macro test DISABLE_NETWORK 2020-07-30 20:29:16 +02:00
Matt af757fa58e Categorize members of NetworkBase 2020-07-30 20:29:15 +02:00
Matt 4cede91424 Introduce NetworkClient and NetworkServer 2020-07-30 20:29:15 +02:00
Matt cf1fb9ecff Move some types into NetworkTypes.h 2020-07-30 20:29:15 +02:00
Matt 37f6a11a1f Move Network declaration into header and rename to NetworkBase 2020-07-30 20:29:15 +02:00
Michael Steenbeek bb1d81471d
Fix #12506: Cannot advertise food if there are no rides in the park 2020-07-29 10:44:38 +02:00
Tulio Leao 63f683853e
Merge pull request #12479 from pizza2004/news-enum
Refactor NewsItem to use strong enums
2020-07-28 18:21:45 -03:00
Michael Steenbeek f8ab48176a
Tile Inspector: remove hardcoded surface/edge style names 2020-07-28 22:37:52 +02:00
Sidney fbdd1042b8
Fix #12486: `set-rct2` has a broken g1.dat check 2020-07-28 22:32:28 +02:00
pizza2004 a3edeabb5c Refactor NEWS_FLAG_* to use strong enum 2020-07-28 12:54:31 -06:00
pizza2004 c2b11a9582 Close #12398: Refactor NEWS_TYPE_* to use strong enum 2020-07-28 12:54:31 -06:00
pizza2004 cee7f8d34c Close #12397: Refactor NEWS_ITEM_* to use strong enum 2020-07-28 12:54:18 -06:00
ζeh Matt 8490e87eeb
Close #12422: Refactor NETWORK_COMMAND to use strong enum (#12481)
* Refactor NETWORK_COMMAND to strong enum

* Refactor all uses of NETWORK_COMMAND

Closes #12422
2020-07-28 17:24:40 +01:00
frutiemax 67554a2aae
Close #12458 : Refactor STARTUP_ACTION to use strong enum (#12480) 2020-07-28 17:23:09 +01:00
wdarvin 95b4bca3d0
Close #12448: Refactor RAIN_LEVEL to use strong enum (#12488)
* Close #12448: Refactor RAIN_LEVEL to use strong enum

* Refactor to remove enum suffix
2020-07-28 17:19:45 +01:00
frutiemax af0fc89cf4
Close #12456: Refactor INPUT_STATE to use strong enum (#12484) 2020-07-27 19:51:10 -03:00
Michael Steenbeek 41162cc22f
Fix: bad kerning on lowercase 'j' character (original bug) 2020-07-26 23:19:16 +02:00
Michał Janiszewski 352870b503 Add OpenURL method, with implementation for Linux and Windows 2020-07-26 22:09:29 +02:00
Duncan 8a378ad236
Remove uses of GET_PEEP macro and replace with GetEntity (#12467)
* Use TryGetEntity and GetEntity instead of macro

* Use GetEntity for ui guest window

* Remove final GET_PEEP macro uses

* Fix remaining issues
2020-07-26 17:42:02 +01:00
Michael Steenbeek ba10b84789
Fix #12478: Crash in track_block_get_next() 2020-07-26 17:16:27 +02:00
Michael Steenbeek 9db2aac3bf
Merge pull request #12482 from frutiemax/Fix12457
Close #12457: Refactor INTRO_STATE to use strong enum
2020-07-26 15:40:22 +02:00
frutiemax 6598ae14aa Close #12457: Rename INTRO_STATE to use PascalCase 2020-07-26 09:32:53 -04:00
frutiemax 0f1788d273 Part of #12457: Refactor INTRO_STATE to use strong enum 2020-07-26 09:25:29 -04:00
frutiemax 96a75f8c2c
Amend #12470: Make zooming at pointer take tile height into account 2020-07-26 01:28:29 +02:00
ζeh Matt b7e469cf33
Fix #11623: Erratic zoom behavior when pointing outside of the map 2020-07-26 00:27:40 +02:00
Michael Steenbeek 649757b77d
Merge pull request #12373 from ZehMatt/network/connect-update
Improve connecting to servers
2020-07-25 20:45:25 +02:00
Duncan 3de2de9814
Reduce use of get_sprite (#12382)
* Reduce use of get_sprite

* Update src/openrct2/world/Sprite.cpp

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-07-25 18:03:14 +01:00
Michael Steenbeek b70716d5f6
Fix #11804: Some RCT1 fences are imported at the wrong height 2020-07-25 16:58:22 +02:00
Matt 4b587e3989 Minor cleanup 2020-07-25 16:02:26 +02:00
Matt ab48c00a89 Fix client being stuck on empty object list 2020-07-25 15:23:26 +02:00
Matt 241ff111dd Address reviews 2020-07-25 14:10:01 +02:00
Matt fa2bd4cad6 Refactor PeepType to use strong enum 2020-07-25 11:54:37 +02:00
Michał Janiszewski 3b60740128
Add int64_t support to INI parser (#12374) 2020-07-25 09:37:35 +02:00
Michael Steenbeek 6ba6184602
Merge pull request #12362 from Gymnasiast/refactor/object-entry-index-null-to-0xFFFF
Change ObjectEntryIndex null value to 0xFFFF
2020-07-25 09:25:04 +02:00
chaitanyathengdi 33a88fbdbd
Fix #10946: On-ride photo profit assumes every guest buys one (#12285)
* Use stored values of customers to adjust income from on-ride photos

Use stored values of photos sold and total customers to calculate ratio
and use that to predict income per hour for rides that include
on-ride-photo sections.

* Get rid of float

* Fix formatting

* Fix formatting - again

* Review changes

* Fix formatting

* Use new method of checking on-ride photo

* Use constants

* Add a changelog and contributors entry
2020-07-25 07:19:51 +01:00
frutiemax f549698e96
Close #12338: Remove goto from Tick128UpdateGuest (#12367) 2020-07-25 07:16:40 +01:00
Matt 6c40d9f3d5 Fix formatting 2020-07-24 23:11:28 +02:00
Matt e31317e025 Rename function to be consistent 2020-07-24 23:11:28 +02:00
Matt d230bc8914 Bump up network version 2020-07-24 23:11:28 +02:00
Matt 908090104a Send client heartbeats to keep connection alive 2020-07-24 23:11:28 +02:00
Matt 1eedaf32dd Refactor sending the object list including status reporting 2020-07-24 23:11:28 +02:00
Matt 0f31b82af0 Add missing network command 2020-07-24 23:11:28 +02:00
Matt 8ef5d0e838 Rename some things to clarify purpose, add constant for map requests 2020-07-24 23:11:12 +02:00
ζeh Matt 76b7c4e676
Merge pull request #12372 from ZehMatt/path-underflow-warnings
Fix GetAdditionEntry trying obtain the object when no additions exist
2020-07-24 19:20:30 +02:00
Aaron van Geffen 4d0d41dfbe
Restore spinner decrease button width (#12370) 2020-07-24 19:12:11 +02:00
Matt 4b17b2ea76 Fix GetAdditionEntry trying obtain the object when no additions exist 2020-07-24 15:58:17 +02:00
Gymnasiast 682add27dd
Change ObjectEntryIndex null value to 0xFFFF 2020-07-23 12:45:42 +02:00
Gymnasiast 3060c2d8cb
Add const to conversion functions 2020-07-23 12:05:00 +02:00
Aaron van Geffen 37a1a1c0a2
Fix #12356: Opening SC4 or SV4 centres viewport on void (#12361) 2020-07-23 11:41:34 +02:00
Michael Steenbeek f567da04eb
Fix #12353: Research window shows wrong ride type 2020-07-22 23:21:08 +02:00
Duncan 4a235e3bb6
Refactor ResearchItem Type to an enum class (#12346)
* Change type of ResearchItem.type to enum class

This is to prevent any future issues caused by confusion as to what the type is and further improves the codebase.

* Specifiy a size for the type

Also remove the static cast where not required

* Apply review comments
2020-07-22 14:25:05 +01:00
0ro8lu 4416565e47
Close #12269: remove goto from x8_drawing_engine (#12274)
Refactored the function into a separate get dirty rows function.
2020-07-22 11:51:41 +01:00
Duncan 2d1a6bd13b
Fix research import/export (#12345)
Old version incorrectly tried to convert the research type not the base ride type causing crashes when new saves were used on older versions of OpenRCT2 or vanilla.
2020-07-22 09:42:16 +01:00
Aaron van Geffen 7b5087f057
Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Gymnasiast bc3ad044f8
Consistently use 'Circus' 2020-07-21 13:55:48 +02:00
Gymnasiast c2153ae797
Consistenly use 'Swinging Ship' 2020-07-21 13:55:48 +02:00
Tulio Leao d10b615eb3
Remove assert on ScreenLine (#12333)
Code is not always constructing a valid line
2020-07-20 18:49:15 -03:00
0ro8lu 6e077c42ea
Close #12270: Remove goto track_remove_station_element (#12323)
Refactored the goto statement
2020-07-20 20:55:50 +01:00
Umdlye 84c0ee42bd
Fix #12314: Swinging Ship colour tab shows Suspended Sw.c. track preview 2020-07-19 14:38:30 +02:00
ζeh Matt 2d81e9c51c
Fix #12229, fix #12312: No error message when loading a save fails 2020-07-19 14:33:32 +02:00
Michael Steenbeek 5c411390bd
Fix #12226: Crash in FindVehicleToEnter (#12310) 2020-07-18 23:54:55 +02:00
Michael Steenbeek 90129f669c
Fix #12305: Can no longer build boosters on Hyper-Twister 2020-07-18 21:43:36 +02:00
Michael Steenbeek 33898936b0
Merge pull request #12007 from Gymnasiast/refactor/remove-ride-groups
Close #11971: Replace ride groups with new ride types
2020-07-17 12:35:30 +02:00
frutiemax 77d02c5e2b
Close #12290: Refactor of object_manager_unload_objects (#12291) 2020-07-17 05:25:35 +01:00
rdbaris 8aa8d77ca1
Fix for smart pointer bug (#12293)
Don't allocate a ton of memory on load.
2020-07-17 05:23:05 +01:00
Gymnasiast 742ae947c7
Add null checks throughout 2020-07-17 00:32:47 +02:00
Gymnasiast d703768d5d
Use old ride types in RideTypesBeenOn 2020-07-17 00:19:49 +02:00
Gymnasiast 470497d868
Limit S6 Importer object lookup to ride types that need conversion 2020-07-17 00:19:49 +02:00
Gymnasiast f596d8de58
Limit track design object lookup to ride types where it's needed 2020-07-17 00:19:49 +02:00
Gymnasiast c6f0bb92a8
Add mutex during track design cache creation 2020-07-17 00:19:49 +02:00
Gymnasiast cf664c8340
Close #11971: Replace ride groups with new ride types 2020-07-17 00:19:49 +02:00
rdbaris a2493af9ce
Part of #11159 (purge malloc() & free()) (#11893)
* Used smart pointers

* Changed functions to take vector as input
2020-07-16 22:35:30 +01:00
frutiemax f49149222e
Close #12245: Use coords objects for SetLocation (Window_internal.h) 2020-07-16 23:01:42 +02:00
Helio Nunes Santos 2812be8c9a
Close #12252: remove of goto in function wall_remove_at (#12279)
* Removed use of goto in function wall_remove_at
* Implemented overload of function map_get_wall_element_at
2020-07-16 17:52:45 -03:00
Aaron van Geffen 79ae0786c0
Refactor more widgets definitions into new format
* About
* Editor Bottom Toolbar
* Editor Inventions List
* Editor Object Selection
* Error
* Finances
* Footpath
* Game Bottom Toolbar
* Guest List
* Network Status
* News
* News Options
* Player
* Research
* Staff List
* Title Options
* About window.

And fix MakeSpinnerWidgets declaration order.
2020-07-16 20:48:25 +02:00
frutiemax 31efe32ade
Related to #12160: Refactor viewport_coord_to_map_coord using Rotate (#12247) 2020-07-16 06:55:48 +01:00
frutiemax a961d9784f
Part of #12243: Use coords for MazeRemoveTrack (#12251) 2020-07-15 23:34:26 -03:00
frutiemax 0fa0ca451e
Part of #12245: Use coords for window_scroll_to_location (#12282) 2020-07-15 23:26:27 -03:00
frutiemax c474f2ddc0
Close #12096: Use only ScreenRect on gfx_fill_rect (#12280) 2020-07-15 22:34:57 -03:00
Michael Steenbeek d80f9b511f
Merge pull request #12255 from Gymnasiast/refactor/more-constants-in-track-curve
Refactor/more constants in track curve
2020-07-15 15:36:42 +02:00
frutiemax 31bea18ad6
Part of #12166: remove switch-case in bolliger_mabillard_track_flat 2020-07-15 13:34:36 +02:00
michael coates 01d0287ee2
Close #12253: Refactor Vehicle sound to remove goto (#12267)
* Refactor Vehicle Scream Sound goto

* updated contributors
2020-07-15 07:48:47 +01:00
Tulio Leao eaa53a3b8a Mark origin and size parameters as const 2020-07-14 23:36:24 +02:00
Aaron van Geffen f2df096053 Introduce new way of defining widgets
Inspired by OpenLoco's widget routines.
2020-07-14 23:36:20 +02:00
Michael Steenbeek 5c42765d2b
Merge pull request #12156 from tupaschoal/coords-train-creation
Change train creation to use CoordsXYZ
2020-07-14 15:54:36 +02:00
frutiemax c8b66dd289
Fix #12257: Fix refactoring of is_sprite_interacted_with_palette_set (#12258)
* Fix #12257: Change type of paint x/y to int32_t

This corrects an issue with integer conversions due to signness.

* Change types to 16bit and correct functions parameters

* Fix test paint.

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-07-14 12:20:53 +01:00
Gymnasiast b948302dc6
Use constants in gTrackCurveChain 2020-07-14 01:37:33 +02:00
Michael Steenbeek 1034aadb72
Merge pull request #12238 from frutiemax/Fix12223
Close #12223: Assert that Formatter::Add() only receives desired types
2020-07-14 00:05:37 +02:00
frutiemax 5f4e1ba344 Forbid usage of uint8_t* in formatter::Add 2020-07-13 17:40:04 -04:00
frutiemax 0272777d13 Close #12223: Assert that Formatter::Add() only receives desired types 2020-07-13 17:37:08 -04:00
Gymnasiast 88a5e4cd2a
Remove some unused constants 2020-07-13 22:09:28 +02:00
Gymnasiast 3c4721d014
Move some constants to RCT12.h 2020-07-13 22:04:50 +02:00
frutiemax b39a0037f0
Close #12164: Use Coords for place_virtual_track (#12240) 2020-07-13 16:37:10 -03:00
frutiemax 78e40f5358
Close #12160: Coords for is_sprite_interacted_with_palette_set (#12241) 2020-07-13 16:31:06 -03:00
frutiemax bcc27f4c73
Close #12161: Use CoordsXYE on peep_interact_with_shop (#12236) 2020-07-13 14:39:59 -03:00
frutiemax 09ad720dfc
Part of #12164: Use Coords for track_design_place_ride (#12233) 2020-07-13 14:38:39 -03:00
Michael Steenbeek e99f4a23c5
Add missing header (#12235)
std::memcpy is defined in <cstring>. The Docker CI would fail because this header was not included.
2020-07-13 18:26:20 +02:00
frutiemax b34381f030
Part of #12160: Use Coords for viewport_redraw_after_shift (#12231) 2020-07-13 13:22:40 -03:00
Duncan 7f28d65bf9
Fix #12213: Incorrect viewport invalidation on load (#12232)
Mistake made during implementation but issue only surfaces recently when the types were increased to 32bit. Removed #12210 as this was hiding the source issue and is no longer required.
2020-07-13 18:20:16 +02:00
frutiemax 6cc52bfb72
Part of #12161: Use CoordsXYE on peep_footpath_move_forward (#12217) 2020-07-13 17:51:57 +02:00
Michael Steenbeek 1cf89362f0
Merge pull request #12184 from IntelOrca/sea
Add support for reading .sea (RCT classic) files
2020-07-13 17:23:16 +02:00
Michael Steenbeek 132b2e5966
Fix #12071: Crash in Guest List when a guest dies (#12126)
Send refresh guest list intent on peep removal

Also added protection to guest list to prevent accessing invalid peeps
2020-07-13 09:31:04 -03:00
Aaron van Geffen b0a3fd82d9
Fix #12221: Map generation tool doesn't place any trees (#12222) 2020-07-13 12:35:49 +02:00
frutiemax e2ef82ca0a
Part of #12164: Use Coords for track_design_place_maze (#12218) 2020-07-12 19:02:28 -03:00
Thamara Andrade 0fb2a6216c
Close #12099: Use ScreenLine on gfx_draw_line (#12143) 2020-07-12 18:50:52 -03:00
frutiemax 27734e2971
Part of #12160: Use Coords for viewport_coord_to_map_coord (#12216) 2020-07-12 18:42:54 -03:00
Duncan b1f80efbe3
Use u8path on file path (#12205) 2020-07-12 21:56:02 +01:00
Ted John 3a93525a11 Add rename error message if sea file fails to open 2020-07-12 00:15:21 +01:00
frutiemax bc7f7248bb
Part of #12164: Use Coords for track_design_add_selection_tile 2020-07-11 19:13:57 +02:00
frutiemax 75afcb85c5
Part of #12161: Use CoordsXYE on peep_interact_with_entrance 2020-07-11 18:58:56 +02:00
frutiemax 508344a088
Close #12174: Remove Formatter additions with uintptr_t 2020-07-11 18:56:12 +02:00
Tulio Leao 76e7bfbf78
Fix load game showing edge of map 2020-07-11 18:19:28 +02:00
Tulio Leao 0758d0fe5c Prefer reference on ride_create_vehicles parameter 2020-07-11 12:21:46 -03:00
Tulio Leao de8bb169de Use CoordsXYZ on vehicle_create_trains 2020-07-11 12:21:44 -03:00
Tulio Leao 47db30f1d7 Use CoordsXYZ on vehicle_create_train 2020-07-11 12:21:09 -03:00
Tulio Leao 7921740938 Use CoordsXYZ on vehicle_create_car 2020-07-11 12:21:07 -03:00
frutiemax 76d899c8da
Part of #12160: Use Coords for is_sprite_interacted_with (#12207) 2020-07-11 16:55:27 +02:00
Ted John cca43eb9e1 Fix mingw build 2020-07-11 11:45:50 +01:00
Ted John 2b962577b9 Change mask to a vector 2020-07-11 11:40:34 +01:00
Ted John 8c81cacc6f Add sea decryption 2020-07-11 11:40:34 +01:00
frutiemax 805eec4153
Part of #12160: Use Coords for viewport_move (#12195) 2020-07-10 22:39:24 -03:00
frutiemax 98dbaae461
Part of #12161: Use CoordsXYE on peep_interact_with_path (#12193) 2020-07-10 22:35:29 -03:00
frutiemax 123d0cceb6
Close #12173: Remove Formatter additions with void* (#12196) 2020-07-11 03:06:23 +02:00
frutiemax 3948600cd0
Part of #12164: track_design_update_max_min_coordinates Coords (#12194) 2020-07-10 15:34:13 -03:00
Helio Santos 925d21eeda Part of #12159: update check_for_adjacent_station to use CoordsXYZ&
Update check_for_adjacent_station to use CoordsXYZ&. Updated caller(s) accordingly.
2020-07-10 11:00:00 -07:00
Helio Santos b0a4f2a97e Part of #12159: updated get_station_platform to use CoordsXYRangedZ
Updated get_station_platform function to use CoordsXYRangedZ. Updated caller(s) accordingly. Implemented constructor for CoordsXYRangedZ that takes a CoordsXYZ as argument.
2020-07-10 10:59:52 -07:00
Helio Santos fb9fab69a9 Part of #12159: Uses CoordXY on find_closest_mechanic
Updated find_closest_mechanic prototype to use CoordXY. Updated caller(s) accordingly.
2020-07-10 09:41:51 -07:00
Duncan 4dc4bbea92
Improve Sprite Misc Update (#12191)
* Use better types for SpriteMiscUpdate

* Change all sprite misc update functions to member functions
2020-07-10 14:16:03 +01:00
Tulio Leao e5e70688c5
Use big Z coords on some Ride station functions (#12192) 2020-07-10 08:40:42 -03:00
frutiemax 29e6db982b
Part of #12096: Prefer ScreenRect on gfx_fill_rect (#12187) 2020-07-09 23:32:38 -03:00
Jim b1600e14ae
Close #12177: Extract patrol offset and index calculation into method 2020-07-09 23:47:21 +02:00
Helio Santos f85319ec8e Part of #12165: Use CoordsXYZ on try_add_synchronised_station
Updated try_add_synchronised_station function prototype to use CoordsXYZ. Updated caller(s) accordingly.
2020-07-09 10:41:00 -07:00
Helio Santos a524b2d5ba Part of #12165: Use CoordsXYZ on vehicle_check_collision
Updated vehicle_check_collision function prototype to use CoordsXYZ. Updated caller(s) accordingly.
2020-07-09 10:41:00 -07:00
Helio Santos 69221606ef Part of #12165: Use CoordsXYZ on steam_particle_create
Updated steam_particle_create function prototype to use CoordsXYZ. Updated caller(s) accordingly.
2020-07-09 10:41:00 -07:00
Tulio Leao f29abf6953
Part of #11389: Use Formatter on Ride::FormatStatusTo (#12172) 2020-07-09 18:54:30 +02:00
Jimver bda0126539
Part of #12162: Use CoordsXY on staff_is_patrol_area_set 2020-07-09 14:20:37 +02:00
Jimver e4c4c611eb
Part of #12162: Use CoordsXY on staff_set_patrol_area 2020-07-09 14:17:41 +02:00
Jimver eb753261a1
Part of #12162: Use CoordsXY on staff_toggle_patrol_area 2020-07-09 14:12:32 +02:00
Tulio Leao 2d169bc5a2
Merge pull request #12158 from tupaschoal/ratings-coords
Generic RideRatingCalculationData improvements
2020-07-08 15:51:38 -03:00
Jim 0248621502
Increase handyman randomness in queue (#12145)
* Increase randomness when handyman is on queue path

* Add myself to contributors

* Refactor hex variable probabilities

* Add check if queue is connected to a ride

* Update changelog

* Bump network version

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-07-08 19:48:08 +01:00
Tulio Leao bd9cf4ceaa Rename RideRatingCalculationData::NumOf.. to AmounfOf 2020-07-08 14:15:33 -03:00
Tulio Leao d2d48cf0ac Use TitleCase on RideRatingCalculationData 2020-07-08 14:10:43 -03:00
frutiemax bf2b8073cb
Part of #12096: ScreenRect for gfx_fill_rect in libopenrct2 (#12109) 2020-07-08 14:07:26 -03:00
Tulio Leao 2f32a094ee Use CoordsXYZ for RideRatingCalculationData::proximity_start 2020-07-08 13:41:40 -03:00
Tulio Leao d662de202f Use CoordsXYZ for RideRatingCalculationData::proximity 2020-07-08 13:36:54 -03:00
Tulio Leao 2b91d432f3 Use CoordsXYE for ride_ratings_score_close_proximity_loops_helper 2020-07-08 13:18:04 -03:00
frutiemax 280a21fa30
Fix #12095: Use ScreenRect on gfx_set_dirty_blocks (#12106) 2020-07-08 13:16:24 -03:00
Tulio Leao b69d48c3ed
Merge pull request #12154 from tupaschoal/coords-text
Use only ScreenCoordsXY for Text.cpp
2020-07-08 12:30:21 -03:00
Tulio Leao d95a0268ef
Merge pull request #11909 from Gymnasiast/fix/more-constants
Use more constants/specific types
2020-07-08 10:18:11 -03:00
Tulio Leao 59236443ba Make StaticLayout::Draw use ScreenCoordsXY 2020-07-08 10:15:02 -03:00
Tulio Leao dabde880cd Make DrawTextEllipsisedCompat use ScreenCoordsXY 2020-07-08 10:13:03 -03:00
Tulio Leao 16147dec64 Make DrawTextCompat use ScreenCoordsXY 2020-07-08 10:13:03 -03:00
Tulio Leao 69b3c97537 Make DrawText use ScreenCoordsXY 2020-07-08 10:13:03 -03:00
Tulio Leao 2ee1a9d9db
Use TitleCase on StaticLayout (#12155) 2020-07-08 09:43:23 -03:00
Gymnasiast 7cc510f6b7
Increment network version 2020-07-07 21:14:16 +02:00
Gymnasiast bf5ffdf497
Clean up favourite ride 2020-07-07 21:13:42 +02:00
Gymnasiast e8d6383f57
Clean up voucher arguments 2020-07-07 21:13:40 +02:00
Gymnasiast db764445ed
Clean up photo refs 2020-07-07 21:13:10 +02:00
Gymnasiast 65fa08ef35
Clean up GuestHeadingToRideId 2020-07-07 21:13:10 +02:00
Gymnasiast 0dd5b3bbda
Clean up current_ride 2020-07-07 21:13:09 +02:00
Duncan 8c1aa43ef4
Add TryGetEntity to fetch entity objects easily (#11979)
Implement TryGetEntity and use it
2020-07-07 13:13:22 -03:00
Duncan 94b3598102
Tiny GetEntity Refactor (#12124)
* Use default template parameter instead of specialising

* Fix null deref issues
2020-07-06 22:02:25 +01:00
Hudson Oliveira 8b5f3b58c5
Part of #9473: Create Vehicle::UpdateMotionCollisionDetection (#11949)
Converted from vehicle_update_motion_collision_detection
2020-07-06 13:57:09 -03:00
Michael Steenbeek f7b42a0254
Merge pull request #11980 from duncanspumpkin/CreateSprite8
SpriteList enum class
2020-07-06 15:21:16 +02:00
Thamara Andrade 8ce799a72e
Close #12118: Prefer foward declaration of *Coords* in headers (#12142)
* Removing unnecessary world/Location includes in headers
* Prefer foward declaration of *Coords* in header files
Closes #12118
2020-07-06 10:10:39 -03:00
Tulio Leao f725fff2da
Clarify CoordsRange-derived interface methods (#12127) 2020-07-06 14:42:11 +02:00
duncanspumpkin 57d2877e67 Provide accesor function for get entity list count 2020-07-05 07:28:38 +01:00
annoyingdroid ad86f7b023
Part of #12098: Use ScreenRect on gfx_filter_rect (#12120)
* Added a gfx_filter_rect function using ScreenRect
2020-07-04 15:16:09 -03:00
frutiemax bee0b4b82d
Part of #11159: Optimize util_zlib_deflate return (#12111) 2020-07-04 09:21:50 -03:00
duncanspumpkin 64ab101b4e Fix formatting and comment 2020-07-04 07:38:11 +01:00
duncanspumpkin e51bbeed23 Convert SPRITE_LIST to an enum class 2020-07-04 07:38:11 +01:00
duncanspumpkin 2d28ca3b28 Remove broken check_for_spatial_index_cycles
There were a number of issues with this function. It was calling index_is_in_list with invalid SPRITE_LISTs. The spatial index is no longer needed to be correct on save/load as it is rebuilt so that it is kept in order.
2020-07-04 07:38:11 +01:00
DrunkBlood 55f0f34fe0
Close #12101: gfx_draw_dashed_line to use ScreenLine (#12116) 2020-07-03 18:05:18 -03:00
frutiemax d969e93ea1
Fix #12112: Move TrackColourPreviews to RideTypeDescriptors (#12114) 2020-07-03 22:15:11 +02:00
Tulio Leao 3ba505e5bd
Merge pull request #11956 from hdpoliveira/loc_6DB38B
Simplify code related to V-angle and bank
2020-07-03 15:16:08 -03:00
Tulio Leao 99b39f04e7
Do not try to force dimensions of a rectangle (#12115) 2020-07-03 09:28:30 +02:00
frutiemax 4661262572
Fix #12085: Use ScreenCoordsXY on clip_drawpixelinfo (#12105) 2020-07-02 14:06:28 -03:00
frutiemax 67a8d833ea
Part of #11159: ImageImporter::ImportResult uses std::vector (#12076) 2020-07-02 14:04:49 -03:00
annoyingdroid 53e8816881
Close #12086: Use ScreenCoordsXY on gfx_draw_pixel (#12104) 2020-07-02 12:10:37 -03:00
frutiemax 26ae2dbf04
Part of #11437: Move PlatformFileExists to Platform2.h (#12077) 2020-07-02 12:03:31 -03:00
annoyingdroid 5056872676
Close #12087: Use ScreenCoordsXY on gfx_filter_pixel (#12102) 2020-07-02 11:08:46 -03:00
Duncan cd716ca4aa
Fix #12093. Incorrect position and animation of staff tab. (#12094)
Mistake made when refactoring transposed two digits. Additional mistake made when removing a variable that was unused that changed the memory layout of the window. This meant that a part of the code that accessed a different variable in a union fetched the wrong memory. This was a mistake ultimately made during implementation.
2020-07-02 09:19:19 -03:00
Michael Steenbeek 920115448e
Merge pull request #12088 from tupaschoal/coords-extract-reuse
Generic coords structs for reusability
2020-07-02 12:07:10 +02:00
Casey Johnson 2e0f0d3821
Fix #12062: Add chain lift to Flying Coaster pieces when inverted (#12091) 2020-07-02 10:40:59 +02:00
Casey Johnson fc43494d74
Feature: Add Boosters to Wooden Roller Coaster (#12090) 2020-07-02 01:52:33 +02:00
Tulio Leao b5195f77c4 Reuse Rectangle definitions for ScreenRect and MapRange 2020-06-30 09:44:28 -03:00
Tulio Leao a86a60cbf5 Extract ScreenRect from Graph for reusability 2020-06-30 09:32:22 -03:00
Tulio Leao 5ce65eb7dc Create ScreenLine struct 2020-06-30 09:26:42 -03:00
Tulio Leao 70e245a1c3 Add Coords constructor to Map and CoordsRange 2020-06-30 09:12:14 -03:00
Tulio Leao 701f7f6d67 Extract base CoordsRange class from MapRange
Enforce MapRange to be rectangle shaped
2020-06-30 09:00:20 -03:00
Gymnasiast 8b6cb7e943
Add config enum name for Forint 2020-06-30 11:27:01 +02:00
Gymnasiast fe402f8bc4
Fix name of 'Deutsche mark' 2020-06-30 11:24:42 +02:00
Michael Steenbeek 33e86ce0d8
Merge pull request #12016 from tupaschoal/screen-coords-string
Make interfaces use ScreenCoordsXY instead of x-y
2020-06-30 08:37:14 +02:00
Duncan c723a1a314
Fix #12079: incorrect drawing of attached paint structs (#12082)
* Fix #12079: incorrect drawing of attached paint structs

The issue is caused by the paint_struct x and y coordinates being incorrectly marked as unsigned. Unfortunately they cannot easily be converted without careful rework. Therefore this is a stop gap until the type is changed to preferably a ScreenCoords.
2020-06-29 19:13:23 -03:00
finicu212 ec33551b24
Fix #12021: Tie coords on gfx_draw_sprite_raw_masked_software (#12080)
Make gfx_draw_sprite_raw_masked_software use ScreenCoordsXY object
2020-06-29 18:38:03 -03:00
Tulio Leao b6f252f68e Make gfx_draw_sprite_raw_masked use ScreenCoordsXY 2020-06-29 10:29:05 -03:00