Commit Graph

355 Commits

Author SHA1 Message Date
duncanspumpkin a79a6969eb Fixed miss centered vehicles. Fixed incorrect starting track progress. Fix newlines. 2016-01-23 18:50:36 +00:00
duncanspumpkin 8316e7e1a4 Fix merge mistakes 2016-01-23 07:23:06 +00:00
IntelOrca 554567d012 implement ride_create_vehicles 2016-01-23 07:23:05 +00:00
Michał Janiszewski 6d6f9f3c23 Refactor rides to be only accessible with getters
This changes how rides are accessed from macros to getter functions.
2016-01-23 01:13:36 +01:00
Duncan 64e17cc830 Fix cable lift test reset.
Code now matches the non cable lift code. Refactor in the future.
2016-01-19 12:41:20 +00:00
duncanspumpkin 3d6be6cb2a Fix track breaks when traveling backwards 2016-01-18 19:41:40 +00:00
duncanspumpkin 599d806113 Fix #2740. Swinging animations should now work correctly 2016-01-16 10:11:56 +00:00
Ted John e69e384d43 Merge pull request #2692 from marijnvdwerf/use-named-addresses
Replace known addresses with constants, globals and wrapper functions
2016-01-15 22:59:13 +00:00
Marijn van der Werf 94e47be3e3 Use `ride_type_has_flag` for checking ride type flags 2016-01-15 21:02:39 +01:00
Marijn van der Werf 98b5ad1bf4 Replace known addresses with constants 2016-01-15 21:01:34 +01:00
duncanspumpkin 10f85322ae Fix incorrect rct2 address comments 2016-01-15 19:17:00 +00:00
duncanspumpkin e68ae821db Fix #2717. Total air time now reset before testing.
This would cause total air time to become a very large number if you made changes to a ride and retested it
2016-01-14 18:56:29 +00:00
duncanspumpkin 937de36e49 Fix #2719. Vehicles getting stuck in unloading passengers mode 2016-01-14 18:41:15 +00:00
duncanspumpkin 23dbde38e2 Refactor. Split golf vehicle update code into seperate function 2016-01-14 18:25:41 +00:00
duncanspumpkin d3cb8c4ef6 Fix #2720. Golf peeps no longer walk incorrectly to the hole. 2016-01-14 18:04:07 +00:00
duncanspumpkin d8d706cc58 Fix #2700. Friction sound no longer goes very quite at high speeds.
Also labelled friction_sound_id and small refactor
2016-01-12 17:55:19 +00:00
duncanspumpkin 75ed781a5c Fix part of #2700. Reverse freefall now correctly slows down on reverse. 2016-01-12 17:43:47 +00:00
duncanspumpkin b5b6e93a03 Fix #2701. Rotated trains no longer disobey physics when crashing. 2016-01-12 17:32:16 +00:00
duncanspumpkin 27ec97d3c5 Fix #2694. Multi tile block breaks (i.e. cable lifts) now correctly unstop.
Issue was caused by looking at the wrong tile to unstop
2016-01-11 18:35:36 +00:00
Marijn van der Werf e961cc885a Use RCT2_ADDRESS_COMMON_FORMAT_ARGS instead of raw address 2016-01-11 12:55:33 +01:00
duncanspumpkin b16337a035 Refactor to remove all remaining warnings and remove redundant comments 2016-01-10 09:24:56 +00:00
duncanspumpkin 326c1f276a Fix fixed broken restraints causing the train to get stuck in a loop 2016-01-09 16:17:04 +00:00
duncanspumpkin 8e0413bd2f Fix mechanics not being called to broken down rides 2016-01-09 15:57:55 +00:00
duncanspumpkin d5bce19af1 Fix race car mode collisions 2016-01-04 10:06:26 +00:00
duncanspumpkin ccc7b1f228 Refactor var_4C into seperate variables 2016-01-04 09:36:29 +00:00
duncanspumpkin 5e6befe20b Fix 3D films only lasting 1 ticks time 2016-01-04 09:11:36 +00:00
duncanspumpkin 3d2a456481 Rework logic to make flow clearer. Fix issue with invalid direction. Fix small logic mistake. 2016-01-03 11:10:02 +00:00
Michał Janiszewski 2b1b0f76f3 Whitespace fixes.
This is just whitespace fixup for all files affected in vehcile-update
branch.
2016-01-03 00:59:10 +01:00
duncanspumpkin 797a2cc75d Fix bug with block breaks when there are track overlaps.
Labeled map_flag (1<<5) as block break closed as well.
2016-01-02 17:04:39 +00:00
duncanspumpkin afca9d27d6 Fix sound bugs with opening/closing track doors. Fix average speed bug. 2016-01-02 16:19:06 +00:00
duncanspumpkin bcd02e833c Fix vehicles bunching up when waiting for passengers in certain directions.
Most notable in bumper boats on blackpool pleasure
2016-01-02 10:45:59 +00:00
duncanspumpkin 1f4b4b2c3f Fix flying boats when entering the station.
Issue was caused by not clearing the word var_34 but instead only the byte var_34. This caused track_progress (word var_34) to become a very large negative number that would be interpreted as a valid track_progress. This would eventually end up reading invalid memory.
2015-12-31 10:27:33 +00:00
duncanspumpkin 3e03ab71fa Fix small bugs in boat hire code. 2015-12-31 09:53:23 +00:00
duncanspumpkin ac0d729baf implement sub_6DA280 2015-12-29 12:06:11 +00:00
duncanspumpkin f7520fd2ba implement vehicle_update_motion_collision_detection 2015-12-27 11:46:15 +00:00
duncanspumpkin 4c88609e7e Fix stretch backwards coasters 2015-12-23 11:57:50 +00:00
Michał Janiszewski 0903dda369 fixes for issues in vehcile-update 2015-12-22 17:00:21 +01:00
duncanspumpkin 7f68149516 Minor Refactor 2015-12-22 10:27:38 +00:00
duncanspumpkin 27d38c6f39 Fix incorrect comparison for backwards loop. 2015-12-21 22:18:56 +00:00
IntelOrca bc24393239 implement vehicle_update_motion_boat_hire 2015-12-21 21:33:17 +00:00
IntelOrca 3b7839c026 implement try_add_synchronised_station 2015-12-21 18:26:41 +00:00
duncanspumpkin 9d937b3475 Refactor of backwards get next track 2015-12-21 09:19:35 +00:00
duncanspumpkin e14fa03be1 Labelled remaining_distance. Relabelled acceleration/powered acceleration 2015-12-20 21:36:11 +00:00
duncanspumpkin c4d8b8c665 Fix sign issues with global constants. Fix fast backwards rides breaking speed calculations 2015-12-20 20:58:30 +00:00
IntelOrca 742fe96cda implement vehicle_can_depart_synchronised 2015-12-20 18:33:43 +00:00
IntelOrca 6825c8645f implement vehicle_update_swinging_car 2015-12-20 15:22:51 +00:00
IntelOrca 98178c2560 refactor callprocs in vehicle.c 2015-12-20 14:21:06 +00:00
IntelOrca c2c41ec118 implement steam_particle_create 2015-12-20 12:50:33 +00:00
IntelOrca 09ac928fd6 implement sub_6D63D4 2015-12-20 12:30:10 +00:00
duncanspumpkin 306855fd3e Fix doors corrupting elements 2015-12-18 21:05:49 +00:00
duncanspumpkin 0f3fe73e63 Fix more vehicle bugs. Changed sub_6DD078 to change the collide vehicle 2015-12-18 20:33:45 +00:00
duncanspumpkin 0364d0deb7 Fix vertical launch 2015-12-17 23:45:58 +00:00
duncanspumpkin 7f0f983f25 Fix block breaks 2015-12-17 23:12:08 +00:00
duncanspumpkin 2007c6c4dc Fix backwards bugs. Fix lift hill bug 2015-12-16 23:39:38 +00:00
duncanspumpkin 3c3dd963fa Rearrange of code to match cable lift layout 2015-12-16 23:01:22 +00:00
duncanspumpkin 46dbc17d72 Move remaining cable lift functions out of vehicle.c 2015-12-16 21:37:58 +00:00
IntelOrca 12fdf1f5e7 name vehicle entry flags 2015-12-16 19:12:58 +00:00
IntelOrca 462d13fed2 move cable lift code into separate source file 2015-12-16 18:37:45 +00:00
duncanspumpkin 53a1d93ec3 Fix infinite loop. Backwards still not working 2015-12-15 22:59:15 +00:00
duncanspumpkin 606014dfe6 Fix small bug introduced 2015-12-15 22:36:07 +00:00
duncanspumpkin 94f94d038c Refactoring of forward loop and fixing of small bugs 2015-12-15 22:32:11 +00:00
duncanspumpkin 37efbfd0a5 Refactor chunk_1 label functions 2015-12-15 18:56:19 +00:00
duncanspumpkin a406a4b344 Fix merge related bugs 2015-12-15 18:26:44 +00:00
duncanspumpkin 75b5946299 Refactor get_g_force and fix known signed/unsigned issues 2015-12-15 17:47:30 +00:00
IntelOrca a941e67df6 fix vehicle-update after merge with sub_6DAB4C 2015-12-14 23:31:00 +00:00
duncanspumpkin c00669c942 Merge sub_6DAB4C into vehicle-update 2015-12-14 21:56:00 +00:00
duncanspumpkin 3fccb00040 Fix spelling mistake. Finished gForce calculations.
There are bugs in any loops due to unsigned/signed behaviour
2015-12-14 21:42:06 +00:00
IntelOrca 19679de125 implement sub_6D661F 2015-12-14 20:08:15 +00:00
IntelOrca e0af62ee8a implement vehicle_update_scenery_door 2015-12-14 15:28:46 +00:00
IntelOrca 490bdc85a6 implement sub_6DEDE8 2015-12-14 15:18:40 +00:00
IntelOrca 656bc61a6a implement more sub_6DAB4C 2015-12-14 15:18:39 +00:00
IntelOrca 89bcf50c76 implement more sub_6DAB4C 2015-12-14 15:18:39 +00:00
IntelOrca 83b15044c4 implement more sub_6DAB4C 2015-12-14 15:18:38 +00:00
IntelOrca 66a8a3f0cb implement more sub_6DAB4C 2015-12-14 15:18:37 +00:00
IntelOrca e3c1872d67 implement more sub_6DAB4C 2015-12-14 15:18:37 +00:00
IntelOrca 255e756e28 implement more sub_6DAB4C 2015-12-14 15:18:36 +00:00
IntelOrca 1e4f7c8875 implement more sub_6DAB4C 2015-12-14 15:18:35 +00:00
IntelOrca 8408351e07 implement more sub_6DAB4C 2015-12-14 15:18:34 +00:00
IntelOrca 2aeeb08af3 implement more sub_6DAB4C 2015-12-14 15:18:34 +00:00
IntelOrca 6a629adc24 implement more sub_6DAB4C 2015-12-14 15:18:33 +00:00
IntelOrca adcbfec413 name return flags for sub_6DAB4C 2015-12-14 15:18:32 +00:00
IntelOrca 22857ae370 implement more sub_6DAB4C 2015-12-14 15:18:31 +00:00
IntelOrca 3a538892ad implement more sub_6DAB4C 2015-12-14 15:18:30 +00:00
IntelOrca d718a51aed implement more sub_6DAB4C 2015-12-14 15:18:29 +00:00
IntelOrca 86ef1b0d49 implement more sub_6DAB4C 2015-12-14 15:18:29 +00:00
IntelOrca 3ecbfe6c68 implement more sub_6DAB4C 2015-12-14 15:18:28 +00:00
IntelOrca 12f0abd35e implement more sub_6DAB4C 2015-12-14 15:18:27 +00:00
IntelOrca 125a9a2b31 implement more sub_6DAB4C 2015-12-14 15:18:27 +00:00
IntelOrca c0a79b7604 implement more sub_6DAB4C 2015-12-14 15:18:26 +00:00
IntelOrca 9c25fd0105 implement more sub_6DAB4C 2015-12-14 15:18:25 +00:00
IntelOrca e5c83561e5 implement more sub_6DAB4C 2015-12-14 15:18:25 +00:00
IntelOrca d5d7956d42 implement more sub_6DAB4C 2015-12-14 15:18:24 +00:00
IntelOrca e8a78f0e2a implement more sub_6DAB4C 2015-12-14 15:18:23 +00:00
IntelOrca 1252ac6f7f implement more sub_6DAB4C 2015-12-14 15:18:22 +00:00
IntelOrca eaef1bf08e implement more sub_6DAB4C 2015-12-14 15:18:22 +00:00
IntelOrca 1527a443b8 implement more sub_6DAB4C 2015-12-14 15:18:21 +00:00
IntelOrca 65c129568d fix play sound calls for sub_6DAB4C 2015-12-14 15:18:20 +00:00
IntelOrca 5d2bd6b682 implement more sub_6DAB4C 2015-12-14 15:18:20 +00:00
IntelOrca 4f56709455 implement more sub_6DAB4C 2015-12-14 15:18:19 +00:00
IntelOrca 2df54c60d0 implement more sub_6DAB4C 2015-12-14 15:17:44 +00:00
IntelOrca 3280c24100 label update flags for vehicle 2015-12-14 15:17:43 +00:00
IntelOrca 9ffb9ec353 implement loc_6DAE27 2015-12-14 15:17:43 +00:00
IntelOrca adda80f4ba implement sub_6DAB4C_chunk_3 2015-12-14 15:17:42 +00:00
IntelOrca 05eac05fa9 implement sub_6DAB4C_chunk_2 2015-12-14 15:17:41 +00:00
IntelOrca 96575ba4d8 implement sub_6DAB4C_chunk_1 2015-12-14 15:17:41 +00:00
IntelOrca 9ad290463a prepare hook for sub_6DAB4C 2015-12-14 15:17:40 +00:00
duncanspumpkin bed328503b Add remaining track types to acceleration function 2015-12-13 15:33:01 +00:00
duncanspumpkin 1e72e9fb14 Started implementing get g forces 2015-12-12 20:25:20 +00:00
duncanspumpkin 846d69a772 Implement vehicle_update_bumper_car_collision 2015-12-12 17:59:03 +00:00
duncanspumpkin 5964b3768a Implement bumper car motion update 2015-12-12 14:55:05 +00:00
duncanspumpkin 45d1375b83 Implement vehicle_update_collision setup. Removed ride crash hook. 2015-12-12 12:21:13 +00:00
duncanspumpkin 90d006232b Change sign of var_24. Add missing cable lift data 2015-12-12 11:48:28 +00:00
Michał Janiszewski 93e2fa14e8 vehicle-fixes 2015-12-12 12:27:58 +01:00
duncanspumpkin 4b326f4569 Implement vehicle_update_crash_setup 2015-12-11 20:55:34 +00:00
duncanspumpkin c94d362077 Fix sound bugs 2015-12-11 20:26:26 +00:00
duncanspumpkin a372637bd8 Implemented vehicle_update_unloading_passengers 2015-12-11 17:35:24 +00:00
duncanspumpkin 0a8ef64a83 Fix some small bugs. Actually use arrive code 2015-12-11 15:49:21 +00:00
duncanspumpkin cd5a18b2c5 Implement vehicle_update_arriving 2015-12-11 15:28:07 +00:00
duncanspumpkin cbf859bffb Added vehicle_update_travelling_boat and vehicle_update_travelling_cable_lif 2015-12-11 13:07:22 +00:00
duncanspumpkin e09e00c931 Label track_progress offset. Name cable lift motion update 2015-12-08 23:19:40 +00:00
duncanspumpkin 80f034251e Fix remaining bugs in cable lift and warnings 2015-12-06 17:14:46 +00:00
duncanspumpkin 2e40ad2a35 Link up cable lift update code. Fix some bugs 2015-12-06 17:04:57 +00:00
duncanspumpkin 33a1560419 Implement more of cable lift update. Still requires proper linking up 2015-12-06 10:45:32 +00:00
duncanspumpkin a059f87805 Implement more of cableLift update 2015-12-05 12:05:15 +00:00
duncanspumpkin 2cbbf52a1b Implemented start of cableLift update 2015-12-05 10:49:23 +00:00
duncanspumpkin 2d2c419d60 Implemented cable lift move to end of station 2015-12-05 10:49:22 +00:00
duncanspumpkin 9561f87903 Implement cable lift waiting to depart 2015-12-05 10:49:22 +00:00
duncanspumpkin 5a69dd50ef Implemented some of the cable lift code 2015-12-05 10:49:21 +00:00
duncanspumpkin 9e182df025 Labeled lost_time_out 2015-12-05 10:49:21 +00:00
duncanspumpkin 95ac8d67ee Implement vehicle missing. Fixed bugs with reverese incline 2015-12-05 10:49:20 +00:00
duncanspumpkin 6e675b08c3 Implement vehicle_update_traveling 2015-12-05 10:49:20 +00:00
duncanspumpkin 3204b52d1e Implemented vehicle_update_test_finish and vehicle_test_reset 2015-12-05 10:49:19 +00:00
duncanspumpkin a0e1c16f48 Minor refactor 2015-12-05 10:49:18 +00:00
duncanspumpkin 371dec1c17 Fix bugs and finish departing station implementation 2015-12-05 10:49:18 +00:00
duncanspumpkin eb1e97d73c Implemented more. Fixed mistake with edx 2015-12-05 10:49:17 +00:00
duncanspumpkin d42a784d6b Started vehicle_update_departing 2015-12-05 10:49:17 +00:00
duncanspumpkin 3dd5847fca Fix small audio crash 2015-12-05 10:49:16 +00:00
duncanspumpkin 713b63d9f5 Implement vehicle update rotation 2015-12-05 10:49:15 +00:00
duncanspumpkin 688bd521b9 Implement vehicle update crooked house 2015-12-05 10:49:15 +00:00
duncanspumpkin 093d49253f Implemented vehicle update space rings and haunted house 2015-12-05 10:49:14 +00:00
duncanspumpkin e06ad99a93 Implement vehicle ferris wheel rotating update 2015-12-05 10:49:14 +00:00
duncanspumpkin ae50ce54c6 Implement vehicle update top spin 2015-12-05 10:49:13 +00:00
duncanspumpkin 53fa41f2b1 Implement ride lift data 2015-12-05 10:49:12 +00:00
duncanspumpkin 2661622dce Fix some of the sound bugs. Note this has diverged needs attention 2015-12-05 10:49:12 +00:00
duncanspumpkin d4827d389f Implemented update simulator operating 2015-12-05 10:49:11 +00:00
duncanspumpkin 70ef91c61e Implement vehicle_update_swinging. 2015-12-05 10:49:11 +00:00
duncanspumpkin e254d9f14a Implement bumpercars update. Named known vehicle states 2015-12-05 10:49:10 +00:00
duncanspumpkin e59305d1d1 Implement waiting to depart.
Not finished will not work at present
2015-12-05 10:49:09 +00:00
duncanspumpkin ec5121b3f6 Implement vehicle crash on water. Fix small particle issues
Requires a change in rand() implementation.
2015-12-05 10:49:09 +00:00
duncanspumpkin 1df0359859 Implement vehicle_kill_all_passengers. Fix some small bugs in the crash code 2015-12-05 10:49:08 +00:00
duncanspumpkin 98ef642463 Implemented vehicle_update_crash.
Note crash on water not implemented yet
2015-12-05 10:49:08 +00:00
duncanspumpkin 2dcc4748ac Implemented update_waiting_for_cable_lift 2015-12-05 10:49:07 +00:00
duncanspumpkin a2312616ab Added update showing film 2015-12-05 10:49:06 +00:00
duncanspumpkin b749106177 Fix restraint issue. 2015-12-05 10:49:06 +00:00
duncanspumpkin a71316c7a3 Small fix. 2015-12-05 10:49:05 +00:00
duncanspumpkin 24efa0f1fd Fix small bug in cover code 2015-12-05 10:49:05 +00:00
duncanspumpkin 4541e43cf0 Marginal improvements in accuracy by using right shifts and one logic mistake 2015-12-05 10:49:04 +00:00
IntelOrca a66966a4d9 fix rating bugs and merge mistakes 2015-12-05 10:49:03 +00:00
Duncan Frost 2bd851e26a Fix small flag mistake 2015-12-05 10:49:02 +00:00
Duncan Frost 50dbff6dd5 Added vehicle_close_restraints 2015-12-05 10:49:02 +00:00
Duncan Frost 8ac940de47 Refactor 2015-12-05 10:49:01 +00:00
Duncan Frost 7afc7453fd Fix loading bugs 2015-12-05 10:49:00 +00:00
Duncan Frost b60ca54e47 Fix some of the vehicle bugs 2015-12-05 10:49:00 +00:00
Duncan Frost fe6e0a11fa Finished waiting for passengers. Bugs encountered 2015-12-05 10:48:59 +00:00
Duncan Frost 392815cd0c Added more of waiting_for_passengers 2015-12-05 10:48:59 +00:00
Duncan Frost 339f872bec Added sub_6d6a2c 2015-12-05 10:48:58 +00:00
Duncan Frost d52a5a1850 Added vehicle update move to end of station 2015-12-05 10:48:57 +00:00
Duncan Frost 691914e4e4 Small rename 2015-12-05 10:48:57 +00:00
Duncan Frost c8c55002c8 Refactor with sheltered knowledge 2015-12-05 10:48:56 +00:00
Duncan Frost d602fc75be Fix bugs. 2015-12-05 10:48:56 +00:00
Duncan Frost 2b7f7c9232 Refactor turn count variables 2015-12-05 10:48:55 +00:00
Duncan Frost 59736c7b4a Refactor and name flags 2015-12-05 10:48:54 +00:00
Duncan Frost d9511910de Finish vehicle_update_measurements 2015-12-05 10:48:54 +00:00
Duncan Frost 79fb099c21 Added more of update measurements 2015-12-05 10:48:53 +00:00
Duncan Frost 2ab0c7684b Started work on 6d6d1f 2015-12-05 10:48:53 +00:00
IntelOrca 3f5bd26913 implement vehicle_update_doing_circus_show 2015-12-05 10:48:51 +00:00
IntelOrca 6f5a54e536 try to make sense of vehicle_update_sound 2015-12-05 10:48:51 +00:00
IntelOrca eec2edad21 start implementing vehicle update 2015-12-05 10:48:50 +00:00
Dom Light 3a8b25a0ee Sanitize audio.h 2015-11-17 01:05:14 +00:00
IntelOrca 8d84b540ad add vehicle struct and enum labels from vehicle-update branch. 2015-10-25 21:26:03 +00:00
Gymnasiast 2b0d5b2470 Remove obsolete sound and config code 2015-10-25 20:54:19 +01:00
IntelOrca 4ac42ff1b2 add vehicle struct, enum labels and helper functions from implement-ride-create-vehicles branch. 2015-10-25 16:00:21 +00:00
Michał Janiszewski 7d0ce00bab Strip all whitespace 2015-10-20 20:48:51 +02:00
zsilencer ae6c88d1ce remove unused/redundant RCT2_GLOBALS fix #2065 and cleanup 2015-10-16 02:31:31 -06:00
zsilencer 9ac89c2b5e remove directsound and get sound working for linux native 2015-09-23 09:42:55 -06:00
IntelOrca 72398151a7 implement ride_create_cable_lift 2015-09-12 18:17:35 +01:00
Runelaenen fb5921db6d First headless version 2015-08-19 18:07:04 +02:00
zsilencer ca6c3d68aa fix #1155 2015-07-14 16:45:25 -06:00
Duncan Frost fb1c8c4e42 Check against invalid tiles correctly 2015-06-03 18:02:41 +01:00
Timmy Weerwag 930a9d61dd Fixes for a couple of warnings 2015-04-12 23:26:15 +02:00
Duncan Frost 3e6a16ef4c Label known values 2015-03-26 20:48:42 +00:00
Duncan Frost 3ce979504a Small tidy up of vehicles related to using in pairs 2015-03-25 18:36:16 +00:00
Duncan Frost bfe92e07f4 Fix small potential subtype issue. Finished sub_state_2 2015-03-25 18:36:15 +00:00
Duncan Frost 37c429842f Started peep_update_ride_sub_state_1. Labelled known functions/offsets 2015-03-25 18:36:09 +00:00
Duncan Frost 4257d0bcc4 Labelled offset to redundant max vehicle sounds. 2014-12-31 15:04:20 +00:00
IntelOrca 88b425f6a7 implement ride open station and ride open vehicle, partial fix for #601 2014-11-29 15:55:44 +00:00
zsilencer 0e414ebae7 #558 2014-11-12 18:32:33 -07:00
Duncan Frost 502b4c4cbd Fix peeps walking on water after entering. Added some known offsets. 2014-11-10 17:23:13 +00:00
IntelOrca d111c715d6 implement viewport_interaction_get_item_left 2014-11-10 00:40:59 +00:00
zsilencer 98d27b44fd fix things 2014-10-15 20:03:15 -06:00