Commit Graph

4426 Commits

Author SHA1 Message Date
Hielke Morsink 2b7a88297f Moved some UI elements and changed default size. Updated changelog. 2016-01-01 21:29:05 +01:00
Hielke Morsink 05e807a9ca Displayng ride type for tracks 2016-01-01 21:29:04 +01:00
Hielke Morsink 389249abfd Better UI spacing. 2016-01-01 21:29:03 +01:00
Hielke Morsink 6f824c9c2e Resolved warnings. 2016-01-01 21:29:02 +01:00
Hielke Morsink 38867b7462 Fixed old typo in string ID name. 2016-01-01 21:29:00 +01:00
Hielke Morsink 64312957a0 Added column headers instead of labels, and added columns for the flags. 2016-01-01 21:28:59 +01:00
Hielke Morsink db270d85c2 automatically en/disabling buttons when needed. Selecting corrupt element when added. 2016-01-01 21:28:58 +01:00
Hielke Morsink 2a3aefdb4e fixed list issue after removing element. 2016-01-01 21:28:57 +01:00
Hielke Morsink d226012d94 Function to remove elements using the tile inspector. 2016-01-01 21:28:56 +01:00
Hielke Morsink d68ed36147 Recreated UI for tile inspector. Added swap functionality. 2016-01-01 21:28:55 +01:00
Hielke Morsink 35bf18bcb6 Added empty button that swaps the top two map elements 2016-01-01 21:28:54 +01:00
Hielke Morsink f04c97fbc1 Getting path scenery type and index using helper functions throughout the entire project. 2016-01-01 21:28:53 +01:00
Hielke Morsink 6f0d14b65f Using ghost helper funcitons for getting and setting the bit now. 2016-01-01 21:28:52 +01:00
Hielke Morsink b82504c5e4 Better consistensy with already existing helper functions 2016-01-01 21:28:51 +01:00
Hielke Morsink 370c08f796 Added comments to path info 2016-01-01 21:28:50 +01:00
Hielke Morsink 955bf7b26f Displaying more path info for queue. Added some helper functions. 2016-01-01 21:28:49 +01:00
Hielke Morsink 855e122b55 Printing path and addition names in tile inspector. 2016-01-01 21:28:48 +01:00
Jonathan Haas 4d26e4c4a1 Refactor peep code
Name various fields and constants related to peeps. This includes:
  - Flags for flashing peeps in map window
  - Animation frames for picked up peeps
  - Function checking if peep should start to fall
  - Special sprite handling for slide boards and lawn mowers
  - Created array for peep sprite entries, renamed some variables and constants
2015-12-31 13:57:06 +01:00
Michał Janiszewski 8a5d066efe Fix strict aliasing violations
Compiler only guarantees proper accesses to variables when using
variable's native type or `char` (i.e. single byte type) [1].

This commit fixes violations of this rule. In most cases changing code
to a simple cast was enough, some required a bit deeper modifications.

This fixes #2596.

[1] http://blog.qt.io/blog/2011/06/10/type-punning-and-strict-aliasing/
2015-12-31 13:27:26 +01:00
Michał Janiszewski 5f66cd48f8 Merge branch 'develop' into vehicle-update
Conflicts:
	openrct2.vcxproj.filters
2015-12-31 11:41:23 +01: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
Duncan 9884ad416e Merge pull request #2593 from xiane/develop
Applied enum value to ride type flags.
2015-12-30 18:54:23 +00:00
Ian Spence ae7da3e830 Fix #2550 Program crashes when executing "exit" command from the console
- exit and quit commands are aliased to "hide"
 - value of the command was being set to a constant value and could not be freed
 - updated command value to use a freeable value
2015-12-30 08:57:43 -08:00
IntelOrca 68a600f679 finish converting last lodepng calls to libpng 2015-12-30 13:36:14 +00:00
IntelOrca cabd0fdc3a use image_io_png_write in cmdline_sprite 2015-12-30 13:36:14 +00:00
IntelOrca 00e5c4418d refactor image IO to new source file 2015-12-30 13:36:09 +00:00
Michał Janiszewski 9321c53b87 Enable libpng on Linux builds
Lodepng is still available.
2015-12-30 13:34:51 +00:00
IntelOrca 8ae43fd0ff use libpng for screenshots 2015-12-30 13:34:51 +00:00
sangch.go fce5eab9d8 Refactored code. bugfix and more define. 2015-12-30 17:13:00 +09:00
sangch.go 94d5eb86c8 Applied enum value to ride type flags. 2015-12-30 13:56:56 +09:00
Alex Bahm 2c7f0d6ae2 Improved mechanic selection for broken rides
Switch to using manhattan distance to calculate distance. Also changed
starting closestDistance to UINT_MAX and removed ternary check because it is not needed.
2015-12-29 13:51:30 -08:00
Michał Janiszewski 36de7a9027 Fix warnings
Some off-by-one errors, truncation warning fix, main() in posix.c no
longer a stub.
2015-12-29 16:09:36 +01:00
duncanspumpkin ac0d729baf implement sub_6DA280 2015-12-29 12:06:11 +00:00
IntelOrca 64b589770a remove obsolete callprocs 2015-12-29 11:57:47 +00:00
IntelOrca c6b023df86 fix warnings 2015-12-29 11:39:06 +00:00
Ted John 69f0e9d55d Merge pull request #2398 from Broxzier/comments_and_optimizations
Refactored some util functions and some minor tweaks for saving tracks
2015-12-29 11:31:58 +00:00
Michał Janiszewski bcfdbbd25b Minor fixes for mapgen 2015-12-29 12:03:38 +01:00
IntelOrca 292ce3b103 don't show IP address when hovering over servers for basic security 2015-12-29 01:01:26 +00:00
IntelOrca 43b31c25a1 use sprite constants for tab animations 2015-12-28 19:44:43 +00:00
IntelOrca 08d47e26a7 improve player list
- animate tab
- show number of players
2015-12-28 19:44:43 +00:00
Ted John f83d60e30d Merge pull request #2573 from janisozaur/cmake-mingw
Fix CMakeLists for MinGW cross-compilation
2015-12-28 19:01:30 +00:00
IntelOrca 1a5c5a5017 fix #2577: interest rate can be set to -1 and no protection from erroneous values 2015-12-28 18:43:11 +00:00
Michał Janiszewski 6a5fc90cd4 Fix CMakeLists for MinGW cross-compilation
This makes sure that shared library built with MinGW toolchain is linked
statically to *all* its dependencies, including libc, libstdc++, libsdl2
and all the others. This allows producing of working `openrct2.dll` by
cross-compiling.

I hit a bug with libcrypto, a dependency of libssl, which in turn is a
dependency of curl, which creates a `DllMain` entrypoint for static lib
too, but since we don't do anything in ours, this should be safe.

I have only had chance to try it out when cross-compiling, ideally it
should be tested under Cygwin/MSYS too, but it is too bothersome to
setup for me.
2015-12-28 01:17:28 +01:00
LRFLEW 50a1f588ec Disable chain button on steep slopes that cannot have one 2015-12-27 17:31:43 -06:00
Ted John c4dcd7d3fe Merge pull request #2570 from HaasJona/fixrefactor
Fix memset
2015-12-27 20:22:12 +00:00
Michał Janiszewski 184b375dcb Fix XP compatibility after #2546
8bdec9f68 (#2546) introduced call to SHGetKnownFolderPath which is only
available on Vista and later operating systems, but eda733165 restored
previous hard-coded functionality for MinGW. Use the same for XP
support.

According to
https://tedwvc.wordpress.com/2014/01/01/how-to-target-xp-with-vc2012-or-vc2013-and-continue-to-use-the-windows-8-x-sdk/
it should work.
2015-12-27 20:34:04 +01:00
Jonathan Haas dfd6cfef87 Fix incorrect memset 2015-12-27 20:33:04 +01:00
Duncan 1c41b513b4 Merge pull request #2561 from HaasJona/refactor
Refactor Ride Customer History
2015-12-27 17:52:52 +00:00
Jonathan Haas cf67177a08 Extract ride data array, use memset for zeroing array 2015-12-27 18:42:32 +01:00
Michał Janiszewski 4c6ee9570c Merge branch 'develop' into vehicle-update
Conflicts:
	openrct2.vcxproj.filters
2015-12-27 18:11:13 +01:00
Ted John ce0442f4a2 Merge pull request #2559 from janisozaur/map-assert
Add mapElementType entry for corrupt element
2015-12-27 15:47:21 +00:00
Jonathan Haas bb01732f74 Fix indentation 2015-12-27 13:06:18 +01:00
duncanspumpkin f7520fd2ba implement vehicle_update_motion_collision_detection 2015-12-27 11:46:15 +00:00
Jonathan Haas cf78b28adf Use memmove for shifting
Use memmove for shifting the customer history, rename ride fields, and add back the offset comments.
2015-12-27 10:45:11 +01:00
Michał Janiszewski e3f5ea25ae Map unknown elem type to corrupt, update tile inspector
In map view, all unknown types are mapped to MAP_ELEMENT_TYPE_CORRUPT,
the type that prevents rendering of all following elements on given
tile.

Tile inspector now displays element type (numeric value) for unknown
types.
2015-12-27 10:34:02 +01:00
Gymnasiast f87bdb0eda Sort load/save window on open, fixes #2477 2015-12-27 10:28:10 +01:00
Tomáš Pazdiora 6ac38a6382 fixed bug in "Fix #2158"
which caused (if fullscreen was set) starting game in desktop resolution instead of selected fullscreen resolution.
2015-12-26 23:48:05 +01:00
Jonathan Haas b71c649d45 Refactor ride customer count
Renamed some confusing ride fields, extracted function to get recent ride customer count.
2015-12-26 22:03:33 +01:00
IntelOrca 2dfc43b8e8 close #2382: Don't suppress drown messages in Six Flags scenarios 2015-12-26 17:34:14 +00:00
IntelOrca 574774b2af add notification conditions 2015-12-26 17:33:33 +00:00
IntelOrca cd99b87de6 add UI for notification settings 2015-12-26 17:30:13 +00:00
IntelOrca 3b5768f5bc print '(debug)' to version string when build in debug configuration 2015-12-26 17:23:27 +00:00
IntelOrca 6240f063f1 fix a couple of sprite ID definitions 2015-12-26 17:19:25 +00:00
IntelOrca 4eb8192549 replace tutorial button with new multiplayer button
tutorial button and multiplayer button can be enabled / disabled easily, window auto resizes etc.
2015-12-26 17:09:37 +00:00
Jonathan Haas 2ed4802032 Fix and replace some StringIDs
Create some additional named StringIDs.
Fix a broken condition for tracked peep notifications, as the in/on ride messages were reversed.
2015-12-26 14:50:03 +01:00
Michał Janiszewski 53970c2d77 Add tile type for corrupt element
Fixes #2558
2015-12-26 13:36:32 +01:00
Michał Janiszewski 79e5bb758d Add an assert for getting proper mapElementType 2015-12-26 13:16:03 +01:00
Ted John de52321026 Merge pull request #2557 from janisozaur/max-path
Use MAX_PATH define for path length, remove redefinition
2015-12-26 10:54:19 +00:00
Ted John 34ab8c0d62 Merge pull request #2546 from AaronVanGeffen/fontdirs
Proper font support for Linux and OS X
2015-12-26 10:48:47 +00:00
Michał Janiszewski 6d5c96d083 Use MAX_PATH define for path length, remove redefinition 2015-12-26 11:18:44 +01:00
Aaron van Geffen 3d99b73ae1 Name enabled widgets on scenario select screen. 2015-12-26 18:46:19 +09:00
Aaron van Geffen 020334fa18 Name rct_window's var_494: highlighted_item. 2015-12-26 18:46:19 +09:00
Aaron van Geffen 9232a9906f Inventarised instances of RCT2_ADDRESS_COMMON_FORMAT_ARGS 2015-12-26 18:24:36 +09:00
Michał Janiszewski c0830ae02e Fix memory leaks in font selection for Linux
Add some logging too, in particular warning when no font was found.
2015-12-25 20:32:54 +01:00
Aaron van Geffen eda733165e Added a hack for MINGW compatibility. 2015-12-26 01:00:34 +09:00
Aaron van Geffen 995799b843 Try Arial as a fallback font if a language's preferred font cannot be loaded. 2015-12-25 03:22:46 +09:00
Aaron van Geffen 474af5c204 Use Cocoa APIs for font detection on OS X. Moving FontConfig to Linux platform only. 2015-12-25 02:52:33 +09:00
Aaron van Geffen 8bdec9f68e Experimental: use SHGetKnownFolderPath to get font path on Windows. 2015-12-25 02:17:45 +09:00
Aaron van Geffen dd604afc89 Use FontConfig to find suitable TrueType fonts on Linux and OS X. Fixes #2537. 2015-12-25 01:53:52 +09:00
Aaron van Geffen a0de23758e Specify font name on all TTF descriptors. 2015-12-25 01:53:52 +09:00
Ian Spence 434b62436c Addresses code review comments 2015-12-24 08:44:12 -08:00
Ian Spence ba038c10ab Automatically open shops & stalls
- Added a new option under misc to automatically open shops and stalls
 - Option is disabled by default
 - When enabled, shops & stalls are automatically opened right after being placed on the map
2015-12-24 00:00:41 -08:00
IntelOrca f93a134aa6 fix map size error when sending network game information 2015-12-24 01:40:03 +00:00
IntelOrca ce0f7ab426 fix #2536: Client crashes when building new Rides 2015-12-24 01:35:14 +00:00
Michał Janiszewski cd2ec16290 Merge branch 'develop' into vehicle-update
Conflicts:
	openrct2.vcxproj.filters
	projects/openrct2.vcxproj
2015-12-23 19:47:16 +01:00
duncanspumpkin 4c88609e7e Fix stretch backwards coasters 2015-12-23 11:57:50 +00:00
Michał Janiszewski 3ba9ec8c81 CMake updates for packaging on Linux
This enables install and package targets for make.

You can specify installation prefix with -DCMAKE_INSTALL_PREFIX=path,
when doing `make install`, OpenRCT shall be found there.

You can also use `make package` for creating packaged release files.
2015-12-22 22:47:44 +01:00
IntelOrca 0298ca38a0 improve project version defines and publish script 2015-12-22 17:46:20 +00:00
Ted John 48320419ea Merge pull request #2538 from janisozaur/vehicle-update-merge
vehicle-update merge
2015-12-22 16:24:38 +00:00
Michał Janiszewski 0903dda369 fixes for issues in vehcile-update 2015-12-22 17:00:21 +01:00
Aaron van Geffen 2c5651614c Corrected misspellings of "substitute". 2015-12-23 00:40:36 +09:00
Michał Janiszewski e666a24c82 Merge branch 'develop' into vehicle-update
Conflicts:
	projects/openrct2.vcxproj.filters
	src/audio/mixer.cpp
	src/windows/ride.c
2015-12-22 14:57:40 +01:00
duncanspumpkin 7f68149516 Minor Refactor 2015-12-22 10:27:38 +00:00
IntelOrca db18fa8f14 finally fix #1619: Can't place any path
RCT2_ADDRESS_TOOL_WIDGETINDEX was being read as an int32 sometimes
2015-12-21 22:28:34 +00:00
duncanspumpkin 27d38c6f39 Fix incorrect comparison for backwards loop. 2015-12-21 22:18:56 +00:00
Ted John 13ce4b6a23 Merge pull request #2531 from LRFLEW/warning-cleanup
Fixed warnings in Xcode
2015-12-21 21:36:24 +00:00
Ted John 569fd7771c Merge pull request #2532 from LRFLEW/newline
Added newlines at end of files
2015-12-21 21:36:05 +00:00
Ted John 39360e40a8 Merge pull request #2120 from janisozaur/linux
Remove old Linux workarounds
2015-12-21 21:35:52 +00:00
IntelOrca bc24393239 implement vehicle_update_motion_boat_hire 2015-12-21 21:33:17 +00:00
Michał Janiszewski d610fb5970 Remove call to 0x0040701D 2015-12-21 22:17:13 +01:00
Michał Janiszewski 5d227d8fc8 Safe handling of malformed server entries
Refuse to add a nameless server or one without version specified, but
allow description missing.
2015-12-21 22:14:24 +01:00
Michał Janiszewski 54424ea275 Remove old Linux workarounds
Verified working on my machine.
2015-12-21 21:52:42 +01: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
LRFLEW 85800997c2 Fixed warnings in Xcode 2015-12-21 03:11:38 -06:00
LRFLEW e6f771ec90 Added newlines at end of files 2015-12-20 22:03:37 -06:00
LRFLEW 46e773736c Fixed trackpad-as-touchscreen on OS X 2015-12-20 21:12:14 -06:00
IntelOrca eab3e15182 improve touch positioning 2015-12-21 00:39:38 +00:00
IntelOrca 8bb8beee50 fix warnings in cmdline.c 2015-12-21 00:23:59 +00:00
Ted John 5d8cd60c8c Merge pull request #2520 from samdroid-apps/touch-as-cursor-try-2
Handle touch events
2015-12-20 22:50:05 +00:00
LRFLEW ff62a28ccd Fixed curl error in OS X bundles 2015-12-20 16:22:10 -06:00
Ted John e0ac85891b Merge pull request #2518 from LRFLEW/xcode
Added Xcode Project
2015-12-20 21:52:57 +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
LRFLEW 034bf5c6a5 Added Xcode Project 2015-12-20 14:53:40 -06:00
Gymnasiast dd460300ca Extend fast lift hill cheat and update description 2015-12-20 21:12:24 +01: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
Jonathan Haas 7149e1a4f5 Fix utf8_is_format_code 2015-12-20 12:28:44 +01:00
Jonathan Haas bf536ce7b7 Add one decimal place to SI velocities 2015-12-20 11:27:03 +01:00
Sam Parkinson 2852c02e0a Handle touch events
Natively on Linux, using OpenRCT2 with touch is impossible because
touch events are not handled by the game. They just don't do anything.

This commit handles touch events. A single touch represents a
press of the left mouse button. If it followed by another touch
within 300ms, a right mouse button event is emitted.  This timeout
is like that of mobile web browsers [1].

[1]  https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away?hl=en
2015-12-20 19:33:12 +11:00
IntelOrca 785d54aa04 fix #2502: Update current pressed footpath direction when camera rotates 2015-12-19 22:54:15 +00:00
IntelOrca 1ffc9a6355 fix problems with wooden_a_supports_paint_setup and refactor 2015-12-19 21:30:32 +00:00
IntelOrca 96b9a4ed18 implement wooden_a_supports_paint_setup 2015-12-19 20:11:04 +00:00
IntelOrca 0ec91d62b5 fix #2515 2015-12-19 20:09:37 +00:00
IntelOrca 57207bac34 refactor new track painter, reduce empty jump tables 2015-12-19 12:39:07 +00:00
IntelOrca 4f5f0820d5 fix track manage delete prompt window position 2015-12-19 12:17:42 +00:00
Ted John f93bc91510 Merge pull request #2462 from duncanspumpkin/fix_trackSave
Fix Track Saving
2015-12-19 12:13:03 +00:00
Ted John 3570319cce Merge pull request #2509 from janisozaur/openrct-data-path
Let user specify the data dir as cmdline option.
2015-12-19 00:06:45 +00:00
IntelOrca 3019b55415 implement facility_paint_setup 2015-12-19 00:06:31 +00:00
LRFLEW d91a82f6ea Added searching for OpenRCT2 data in OS X app bundle resources folder 2015-12-19 00:07:01 +01:00
Michał Janiszewski ea6fa2c82a Let user specify the data dir as cmdline option.
This adds --openrct-data-dir=<str> option to command line letting user
select where he wants OpenRCT2-specific data to be. By default the
search locations are:
* <exePath>/data (on all platforms)
* /var/lib/openrct2 (on Linux)
* /usr/share/openrct2 (on Linux)
2015-12-19 00:06:41 +01:00
IntelOrca 22b4df1a99 implement SI units for distance / speed measurement, closes #2496 2015-12-18 21:12:30 +00:00
Ted John 859c35574a Merge pull request #2510 from LinusU/trap-mouse
Trap mouse
2015-12-18 21:06:57 +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
Linus Unnebäck e1938bb17a trap-mouse: cleanup 2015-12-18 09:13:26 +01:00
Rune Laenen 1a4ebcc0f7 Add option to trap mouse cursor 2015-12-18 09:13:26 +01:00
LRFLEW 8b63080aeb Some Objective-C Code Cleanup 2015-12-17 22:06:07 -06: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
LRFLEW d769a13206 Fixed extern and enum name usage 2015-12-16 14:48:27 -06: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
Michał Janiszewski 7d132d8fe1 Extract and embed sections into binary itself
Fixed some CMakeLists.txt problems, made another target for converting
section images into something palatable by ld, modified the linker
script to place these ssection at predefined VMAs and updated openrct2.c
with new checks.
2015-12-16 19:16:27 +01: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
Gymnasiast e2ccfc1cb8 Only check if ride mode exists when placing new track design, fixes #2445 2015-12-15 15:09:39 +01:00
Linus Unnebäck 4319e57024 use builtin min and max 2015-12-15 09:11:54 +01:00
Ted John aed5117384 Merge pull request #2489 from LinusU/locale-clang-fix
osx: fix locale issues
2015-12-15 08:04:47 +00:00
Linus Unnebäck 7ea7625db5 osx: correct modifier key 2015-12-15 08:34:33 +01:00
Linus Unnebäck 5d03fc3fb6 osx: fix locale issues 2015-12-15 08:22:08 +01:00
IntelOrca a941e67df6 fix vehicle-update after merge with sub_6DAB4C 2015-12-14 23:31:00 +00:00
Michał Janiszewski 98e204552a countof with type safety
For reference see http://www.g-truc.net/post-0708.html and
http://lxr.free-electrons.com/source/include/linux/kernel.h#L54

This will provide a type-safe mechanism for counting elements of array.
If you try passing something which cannot be counted, compiler will
frown at you right away.
2015-12-15 00:28:58 +01:00
duncanspumpkin c00669c942 Merge sub_6DAB4C into vehicle-update 2015-12-14 21:56:00 +00:00
Michał Janiszewski a5b465fad1 Fix some compiler warnings 2015-12-14 22:52:27 +01: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
Ted John bc104a82a9 Merge pull request #1931 from Gymnasiast/change-num-trains-without-retesting
Allow changing number of trains without retesting
2015-12-14 20:09:25 +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 4eee290947 use original hook code which works better for this branch 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
Ted John 67f612c18c Merge pull request #2460 from janisozaur/scale-limit
Raise the lower limit for scale to 0.5f
2015-12-14 14:49:38 +00:00
Ted John df3bf363ca Merge pull request #2338 from Smeat/linux_get_locale
[Linux] Implement platform_get_locale_language.
2015-12-14 14:48:21 +00:00
Ted John 4fb73e4acb Merge pull request #2435 from samdroid-apps/ctrl-backspace-clear-inputs-try2
Implement CTRL-Backspace shortcut for clearing inputs, fixes #2355
2015-12-14 14:46:56 +00:00
IntelOrca de48ad3af6 fix warnings in cmdline.c 2015-12-14 14:45:54 +00:00
Ted John 8bfde1f948 Merge pull request #2472 from kkirby/bugfix/osx1010
Fix a bug where argv will be replaced by the argparse library.
2015-12-14 14:36:51 +00:00
Kyle Kirbatski c3185de49d Fix a bug where argv will be replaced by the argparse library.
The argparse library takes the input, assigns it to `this->output`, and then writes a null pointer to it. This causes issues on OS X 10.10 because AppKit tries to read the arguments passed to the application, which the first argument is null.
2015-12-14 07:19:06 -06:00
Michał Janiszewski 3bf659a9ea Include safe_strncpy declaration in linux.c
Fixes at least one of #2483
2015-12-13 23:09:59 +01:00
Duncan 0604068aac Merge pull request #2440 from LinusU/world-map-fixes
small fixes to world/map.c
2015-12-13 21:27:40 +00:00
Linus Unnebäck 017899c0d9 small fixes to world/map.c 2015-12-13 21:45:58 +01:00
Ted John 7007aef9cb Merge pull request #2480 from LinusU/proper-types
use stdint types
2015-12-13 18:24:12 +00:00
Linus Unnebäck a613de410a use stdint types 2015-12-13 19:01:54 +01:00
duncanspumpkin bed328503b Add remaining track types to acceleration function 2015-12-13 15:33:01 +00:00
Gymnasiast 1873e387ca Log an error if an unknown vehicle edit command is sent 2015-12-13 15:49:23 +01:00
Gymnasiast e9840b7488 Allow changing number of trains without retesting 2015-12-13 15:49:23 +01:00
IntelOrca 5c3bcda744 fix wrong output steam in cmdline_sprite 2015-12-13 00:28:25 +00:00
Kyle Kirbatski 2a8ed04eda Add platform dialog functions for OS X 2015-12-12 17:22:14 -06:00
Kyle Kirbatski 17766c4772 Rename osx.c to osx.m 2015-12-12 17:21:21 -06:00
Kyle Kirbatski 39ae4e2154 Extract dialog functions out of posix.c and into linux.c 2015-12-12 17:20:02 -06:00
duncanspumpkin be757f6379 Add missing track elem enum elements. 2015-12-12 21:07:46 +00:00
duncanspumpkin 1e72e9fb14 Started implementing get g forces 2015-12-12 20:25:20 +00:00
Duncan e953eed95b Merge pull request #2467 from kkirby/code-cleanup
Code cleanup
2015-12-12 20:13:29 +00:00
Kyle Kirbatski 4f03530e48 Clean up instances of 0x.. & 0x.. to 0x.., 0x.. 2015-12-12 14:08:09 -06: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
Duncan 0a86b8c946 Merge pull request #2450 from janisozaur/mmap
POSIX: MAP_ANONYMOUS should have fd = -1
2015-12-12 08:23:50 +00:00
LRFLEW c2202f6260 Moved the configuration on OS X to ~/Library/Application Support/OpenRCT2 2015-12-11 18:02:58 -06:00
Kyle Kirby caf07c2064 Clean up the comments a litte
• Make comment heads be /**
• Make rct2 addresses be double spaced indented
• Make there be a space afte rct2: and the address
• Make single-line rct2 addresses be full block comments
• Move description of method to top of comment
2015-12-11 16:19:46 -06: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
Kyle Kirby 8e5355640f Convert spaces to tabs 2015-12-11 06:28:35 -06:00
duncanspumpkin 9f1b38f337 Track saving was broken due to using wrong coordinates 2015-12-11 09:57:08 +00:00
LRFLEW c9be2e1bc9 Resolved struct packing error and crash on OS X 2015-12-10 17:29:58 -06:00
Michał Janiszewski d2117e966f Raise the lower limit for scale to 0.5f
Setting the scale to anything lower than 0.3f crashes the game on my
machine, although I don't know the exact reason of that.

The game at window_scale=0.1 is unusable anyway, as the interface is far
too small.
2015-12-11 00:15:17 +01:00
Kyle Kirbatski af382b1884 Switched to -sectcreate instead of mmap on OS X 2015-12-10 16:32:46 -06:00