1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 09:14:58 +01:00
Commit Graph

78 Commits

Author SHA1 Message Date
Michał Janiszewski
3bf1e0e06d Rename safe_strncpy to safe_strcpy 2016-01-18 20:49:52 +01:00
IntelOrca
cdee534eb1 use SDL2's platform defines to normalise platform guards 2016-01-14 20:12:43 +00:00
Marijn van der Werf
0825b9bf62 Share currency detection across platforms 2016-01-13 21:38:10 +01:00
Marijn van der Werf
452acd7627 Set minimal window size 2016-01-13 19:55:35 +01:00
IntelOrca
3073bc64fd remove rct2_endupdate 2016-01-09 00:25:30 +00: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
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
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
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
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
Linus Unnebäck
7ea7625db5 osx: correct modifier key 2015-12-15 08:34:33 +01: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
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
Sam Parkinson
b9ba20a399 Implement CTRL-Backspace shortcut for clearing inputs, fixes #2355 2015-12-05 06:56:39 +11:00
IntelOrca
737baf8b78 fix #2158: Video Freeze when window is maximised, minimised and then restored 2015-12-04 18:59:59 +00:00
Michał Janiszewski
80510c91bd Add ui option to change scale in run-time
Doesn't let user go lower than 0.5f
2015-11-12 01:18:42 +01:00
Michał Janiszewski
516cddcf97 Explicitly cast scaled values to avoid warnings 2015-11-12 01:17:32 +01:00
Michał Janiszewski
681723869f Enable display scaling, useful on highdpi screens
This allows for NN-scaling of display, a much needed feature on highdpi
screens.

Scale can be set to positive integer value which will become a zoom
factor for whole rendered output.
2015-11-12 01:16:21 +01:00
duncanspumpkin
6684804e28 Fix small regression that caused a black screen when switching between hardware rendering 2015-11-05 21:22:08 +00:00
duncanspumpkin
599c259603 Fix #1749. Rainbow road graphical glitch.
Issue was caused by the image using an invalid colour entry. This initilises the memory that is expected to return white. Platform update palette also had to be modified to allow this fix to work.
2015-11-05 19:42:23 +00:00
IntelOrca
025f36ec28 fix #2187
Title sequence now maintains central position from script if window size changes.
2015-11-03 19:20:32 +00:00
Michał Janiszewski
9284930d7e Add safe_strncpy function
safe_strncpy is similar to strncpy, but makes sure buffer is
null-terminated. Update most of project to use this updated function to
prevent illegal memory accesses.
2015-10-30 16:01:00 +01:00
Ted John
5e9912e880 Merge pull request #2038 from HaasJona/restart_required
Require a restart after changing hardware rendering
2015-10-24 14:44:01 +01:00
Jonathan Haas
475466dcd9 Require a restart after changing hardware rendering setting, decouple setting from active status 2015-10-24 12:50:28 +02:00
Michał Janiszewski
8e45cccb7a Minor fixes
Includes (mostly) type fixes, dead code removal, signed vs unsigned
comparison fixes, memory leaks removal.
2015-10-21 08:47:09 +02:00
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
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
33d5e0b79f fix loop counter 2015-09-22 22:58:34 +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
IntelOrca
bea74ee261 make all file IO utf8 compatible, fixes #1847 2015-08-29 13:13:23 +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
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
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