mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge branch 'master' into track-list-window
This commit is contained in:
commit
67512d7cd7
4
build.sh
4
build.sh
|
@ -11,6 +11,10 @@ pushd build
|
|||
make
|
||||
popd
|
||||
|
||||
if [[ ! -h openrct2.dll ]]; then
|
||||
ln -s build/openrct2.dll openrct2.dll
|
||||
fi
|
||||
|
||||
if [[ -t 1 ]]; then
|
||||
echo -e "\nDone! Run OpenRCT2 by typing:\n\n\033[95mwine openrct2.exe\n\033[0m"
|
||||
else
|
||||
|
|
|
@ -53,6 +53,8 @@ The aim is to completely decompile RollerCoaster Tycoon 2 into C so that cross-p
|
|||
|
||||
# 2 Building the source code
|
||||
|
||||
Alternatively, a third-party offers [downloadable precompiled builds](https://openrct2.com/download). However, building the project is always recommended.
|
||||
|
||||
## 2.1 Prerequisites
|
||||
### Windows:
|
||||
- Windows XP / Vista / 7 / 8
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
void game_handle_input();
|
||||
void game_handle_keyboard_input();
|
||||
void handle_shortcut_command(int shortcutIndex);
|
||||
|
||||
void store_mouse_input(int state);
|
||||
|
||||
|
|
|
@ -57,6 +57,9 @@ static SDL_Cursor* _cursors[NO_CURSORS];
|
|||
|
||||
static const int _fullscreen_modes[] = { 0, SDL_WINDOW_FULLSCREEN, SDL_WINDOW_FULLSCREEN_DESKTOP };
|
||||
|
||||
static unsigned int _lastGestureTimestamp;
|
||||
static float _gestureRadius;
|
||||
|
||||
void osinterface_init()
|
||||
{
|
||||
osinterface_create_window();
|
||||
|
@ -395,6 +398,25 @@ void osinterface_process_messages()
|
|||
screenshot_check();
|
||||
}
|
||||
break;
|
||||
case SDL_MULTIGESTURE:
|
||||
if (e.mgesture.numFingers == 2) {
|
||||
if (e.mgesture.timestamp > _lastGestureTimestamp + 1000)
|
||||
_gestureRadius = 0;
|
||||
_lastGestureTimestamp = e.mgesture.timestamp;
|
||||
_gestureRadius += e.mgesture.dDist;
|
||||
|
||||
// Zoom gesture
|
||||
const int tolerance = 128;
|
||||
int gesturePixels = (int)(_gestureRadius * RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16));
|
||||
if (gesturePixels > tolerance) {
|
||||
_gestureRadius = 0;
|
||||
handle_shortcut_command(SHORTCUT_ZOOM_VIEW_IN);
|
||||
} else if (gesturePixels < -tolerance) {
|
||||
_gestureRadius = 0;
|
||||
handle_shortcut_command(SHORTCUT_ZOOM_VIEW_OUT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue