Commit Graph

119 Commits

Author SHA1 Message Date
Michał Janiszewski 7d0ce00bab Strip all whitespace 2015-10-20 20:48:51 +02:00
Michał Janiszewski d570163958 Fix types
Bunch of type fixes
2015-10-19 20:30:46 +02:00
zsilencer cf78d76bdf make disable volume on focus lost not reset title music 2015-10-17 11:48:39 -06:00
Alexander Overvoorde 609dad157a Optimise Steam overlay check 2015-10-04 22:31:28 +02:00
Alexander Overvoorde af6a6bb8be Rewrite platform_is_steam_overlay_attached for Unix to detect all possible situations 2015-10-04 16:43:22 +02:00
Alexander Overvoorde 84bf968b23 Fix flags in dlopen call for steam overlay check 2015-10-04 15:46:15 +02:00
Alexander Overvoorde f6b7121c23 Implement platform_is_steam_overlay_attached for unix 2015-10-03 23:10:56 +02:00
Alexander Overvoorde 51377fc960 Add setting for Steam overlay pausing and add extra check 2015-10-03 23:10:56 +02:00
Alexander Overvoorde c03cec721e Add Steam overlay detection that pauses the game (#1903)
The Steam overlay is detected by checking if the center pixel of
the framebuffer is changed between rendering and presenting to the
screen. This happens when the Steam overlay draws the gray fade on
the screen.

This does not affect other overlays like FRAPS, MSI Afterburner and
OBS overlays that don't obstruct the center of the screen.
2015-10-03 23:10:56 +02:00
Jonathan Haas d6a5d78742 Handle SDL_CreateRenderer error 2015-10-03 18:22:05 +02:00
zsilencer ffee5229b5 fix directories in linux 2015-10-02 14:48:10 -06:00
zsilencer 5793ded423 mouse drag in linux 2015-10-02 09:51:34 -06:00
Michał Janiszewski 89846a088a platform time functions 2015-09-29 23:35:15 +02:00
Michał Janiszewski 1bd8e11c0f Make it work on Linux
Right now the project is decompiled to the point where it is feasible to
try porting it to another platform. It doesn't work 100% correctly, but
it's nearing this state.

To port it to Linux I mmapped the openrct2.exe into expected places,
disabled two offending calls (RCT2_CALLPROC_EBPSAFE(0x0040701D) and
RCT2_CALLPROC_X(0x006E7FF3…)), replaced memory management routines
with generic ones and removed all the function-pointer calls.

A basic, non-exhaustive check is included to verify that memory is
loaded correctly in place.

That last bit is probably the most intrusive one, but had to be done, as
the calling convention on Linux differs from the one on Windows. It
could possibly be emulated (just like RCT2_CALLFUNC_X) until dependency
on exe is dropped.

It is possible to completely remove calls out to original code by
commenting out contents of RCT2_CALLFUNC_X, right now this will yield
working UI, but no rendering of peeps, rides or rest of world. This can
be used as a benchmark or test platform for correctness of
implementation. The data sections will still be required for now.

Assets are expected to be in specific places, so to launch it, following
needs to satisified:
* $build/data/ has to have contents of $RCT2/Data/
* $build/data/ (same as above) has to have contents of $repo/data/
* $build/ObjData/ has to have contents of $RCT2/ObjData/
* $build/../openrct2.exe has to be $repo/openrct2.exe (as of 976ea0d)
Keep in mind you can symlink stuff and that filesystems are case
sensitive!
You can copy more of required data to possibly improve your experience.

Pretty much all of this commit will possibly have to be reverted by the
time OpenRCT2 gains independence.

Remember to build with -DDISABLE_NETWORK=ON -DDISABLE_HTTP_TWITCH=ON
2015-09-23 00:04:40 +02:00
Michał Janiszewski 33d5e0b79f fix loop counter 2015-09-22 22:58:34 +02:00
Michał Janiszewski 16eb4666ee Safely handle 'file not found' or wrong parameters
`platform_enumerate_files_begin` (and it directory counterpart) can
return `-1`, make sure we handle that value properly when passed on
to `platform_enumerate_files_next` and `platform_enumerate_files_end`
2015-09-22 08:33:40 +02:00
Michał Janiszewski 4ce0e3a8b2 Linux platform file
Add bulk of the platform file for linux, change the compilation target
from shared library to executable for linux, provide necessary changes
to make it compile & load the stub of a process.

Make sure functions are marked as stubs where needed, and implementation
is expected.
2015-09-20 23:19:08 +02:00
Michał Janiszewski 4df8761831 remove windows-only code
Step 1 on road towards Linux.

Remove windows-specific code, stub it out where needed and make sure we
can still compile it the way it is.

Take care of Travis' build matrix to include new build configuration.

Install new packages.
2015-09-18 16:01:38 +02:00
Michał Janiszewski 42691726fc workaround for mingw bug
For some reason mingw or sdl has trouble providing proper HWND, which
in turn prevents opening up a window for selecting file to save when
trying to convert save game to scenario.

Fixes #1486.
2015-09-12 23:46:40 +02:00
Gymnasiast 6bd003c67f Fix more warnings 2015-09-11 15:13:54 +02:00
IntelOrca bea74ee261 make all file IO utf8 compatible, fixes #1847 2015-08-29 13:13:23 +01:00
IntelOrca f0100a71a7 use windows lean and mean to reduce definition conflicts 2015-08-29 13:13:22 +01:00
Runelaenen fb5921db6d First headless version 2015-08-19 18:07:04 +02:00
medsouz db9ea4cdf3 Added toggle for audio disable on focus lost
This closes #1758
2015-08-11 07:06:00 -04:00
medsouz 3ce6d7020b Pause audio when tabbing out
TODO: Figure out why title music and toilet sounds are still playing

Add an option to disable this feature so that people can jam out to the
carousel music while tabbed out.
2015-08-11 00:42:18 -04:00
Gymnasiast 959b492330 Add Simplified Chinese and Finnish as selectable languages 2015-08-09 21:29:42 +02:00
IntelOrca 36aacdf455 fix freeing of stack memory 2015-08-05 02:22:17 +01:00
IntelOrca be4ee45d66 convert more platform functions over to utf8 and close #1713 2015-08-04 21:41:45 +01:00
Michał Janiszewski 7afb7e2dfd Portability fixes 2015-08-04 19:31:21 +02:00
IntelOrca cac0f2ab52 upgrade to VS2015 compiler 2015-08-03 23:16:30 +01:00
IntelOrca d228d13918 implement utf8, part 23 (bug fixes) 2015-08-01 16:40:15 +01:00
IntelOrca 4f91a9f2d0 implement utf8, part 17 2015-08-01 10:20:59 +01:00
IntelOrca 357111a560 implement utf8, part 11 2015-08-01 10:20:55 +01:00
IntelOrca 99c7c93764 implement utf8, part 9 2015-08-01 10:20:53 +01:00
IntelOrca 5f69e6f37a add cycle day / night 2015-07-24 22:58:41 +01:00
zsilencer b876591543 use SDL_RWops for save games 2015-07-11 12:27:46 +01:00
zsilencer 9eb4958dde fix #1002 2015-07-05 08:57:01 -06:00
zsilencer 76b231c150 add option to uncap fps, and fix #1470 2015-07-04 13:14:14 -06:00
Duncan Frost 33c4698e06 Implemented map_reorganise_elements.
Fixed a potential issue that would cause cursors to become stuck.
2015-06-28 16:50:21 +01:00
Thomas 4b0c84ed20 Change stat usage to GetFileAttributesEx 2015-06-25 19:46:48 +02:00
Ted John c03950ea6a Merge pull request #1466 from trigger-death/minimize-fullscreen-focus
Option to not Minimize fullscreen on focus loss
2015-06-24 23:16:12 +01:00
Robert Jordan 0a4ac08caa Minimize fullscreen on focus loss 2015-06-24 18:12:53 -04:00
Miso Zmiric (Mike Squinter) 80d524f78e platform_file_exists now also checks for path not found errors
use GetLastError after the GetFileAttributes
2015-06-24 22:30:39 +01:00
Robert Jordan a3a993dabd Title Sequence editor 2015-06-24 12:25:54 -04:00
Miso Zmiric (Mike Squinter) 21a15d0247 use platform_file_exists 2015-06-24 17:16:22 +01:00
Miso Zmiric (Mike Squinter) f9d85b6959 fixes #1445, now checks for existance of g1.dat files in the game path rather than just for the folder 2015-06-24 15:28:06 +01:00
Gymnasiast a6225ebf06 Add option to select by track type (RCT1 style); correct misspellings of 'separate' 2015-06-24 12:41:19 +02:00
Thomas 2fc23b0084 Add browsing drives on windows 2015-06-22 15:55:57 +02:00
Thomas ce26812caa Add sorting based on date 2015-06-22 13:49:35 +02:00
Gymnasiast 0dfdb33028 Complete support, read .DAT entries from correct table 2015-06-21 15:13:40 +02:00