This commit is contained in:
nashmuhandes 2017-03-07 19:25:01 +08:00
commit 746094259f
2 changed files with 57 additions and 37 deletions

View file

@ -1,5 +1,11 @@
version: "{build}" version: "{build}"
branches:
except:
- /^travis.*$/
clone_depth: 1
os: Visual Studio 2015 os: Visual Studio 2015
platform: platform:
@ -10,12 +16,37 @@ configuration:
- Debug - Debug
- Release - Release
cache:
- ci_deps_win_v01.zip
environment:
# Update dependencies here: https://github.com/coelckers/gzdoom/releases/tag/ci_deps
DEPS_URL: https://github.com/coelckers/gzdoom/releases/download/ci_deps/
DEPS_FILENAME: ci_deps_win_v01.zip
install:
- if not exist "%DEPS_FILENAME%"
appveyor DownloadFile "%DEPS_URL%%DEPS_FILENAME%"
- 7z x -y "%DEPS_FILENAME%"
before_build: before_build:
- cmd: md build - md build
- cmd: cd build - cd build
- cmd: if "%platform%"=="Win32" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 - if "%PLATFORM%"=="Win32" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015
- cmd: if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 Win64 - if "%PLATFORM%"=="x64" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 Win64
- cmd: cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%configuration% .. - set DEPS_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%\ci_deps_win\include
- set DEPS_LIB_DIR=%APPVEYOR_BUILD_FOLDER%\ci_deps_win\lib\%PLATFORM%
- cmake -G "%CMAKE_GENERATOR_NAME%" -T "v140_xp"
-DCMAKE_BUILD_TYPE="%CONFIGURATION%"
-DFMOD_INCLUDE_DIR="%DEPS_INCLUDE_DIR%"
-DFMOD_LIBRARY="%DEPS_LIB_DIR%\fmodex.lib"
-DOPENAL_INCLUDE_DIR="%DEPS_INCLUDE_DIR%"
-DOPENAL_LIBRARY="%DEPS_LIB_DIR%\OpenAL32.lib"
-DMPG123_INCLUDE_DIR="%DEPS_INCLUDE_DIR%"
-DMPG123_LIBRARIES="%DEPS_LIB_DIR%\libmpg123-0.lib"
-DSNDFILE_INCLUDE_DIR="%DEPS_INCLUDE_DIR%"
-DSNDFILE_LIBRARY="%DEPS_LIB_DIR%\libsndfile-1.lib"
..
build: build:
project: build\GZDoom.sln project: build\GZDoom.sln

View file

@ -259,35 +259,6 @@ static int pagetic;
// //
//========================================================================== //==========================================================================
// [ZZ] this handles the mouse changes in the playsim.
// I have no idea why it had to be done before events are dispatched... also no idea why is this not in G_Responder or something.
static bool D_ProcessMouseForPlaysim(event_t *ev)
{
//if (ev->type == EV_Mouse && !paused && menuactive == MENU_Off && ConsoleState != c_down && ConsoleState != c_falling && !E_CheckUiProcessors())
if (ev->type == EV_Mouse && !paused) // [ZZ] the other checks are replaced with responders eating the event.
{
if (Button_Mlook.bDown || freelook)
{
int look = int(ev->y * m_pitch * mouse_sensitivity * 16.0);
if (invertmouse)
look = -look;
G_AddViewPitch(look);
events[eventhead].y = 0;
}
if (!Button_Strafe.bDown && !lookstrafe)
{
G_AddViewAngle(int(ev->x * m_yaw * mouse_sensitivity * 8.0));
events[eventhead].x = 0;
}
if ((events[eventhead].x | events[eventhead].y) == 0)
{
return false;
}
}
return true;
}
void D_ProcessEvents (void) void D_ProcessEvents (void)
{ {
event_t *ev; event_t *ev;
@ -320,9 +291,7 @@ void D_ProcessEvents (void)
// check events // check events
if (E_Responder(ev)) // [ZZ] ZScript ate the event if (E_Responder(ev)) // [ZZ] ZScript ate the event
continue; continue;
// before passing this further, do some magic G_Responder (ev);
if (D_ProcessMouseForPlaysim(ev))
G_Responder (ev);
} }
} }
@ -342,6 +311,26 @@ void D_PostEvent (const event_t *ev)
return; return;
} }
events[eventhead] = *ev; events[eventhead] = *ev;
if (ev->type == EV_Mouse && !paused && menuactive == MENU_Off && ConsoleState != c_down && ConsoleState != c_falling && !E_CheckUiProcessors())
{
if (Button_Mlook.bDown || freelook)
{
int look = int(ev->y * m_pitch * mouse_sensitivity * 16.0);
if (invertmouse)
look = -look;
G_AddViewPitch (look);
events[eventhead].y = 0;
}
if (!Button_Strafe.bDown && !lookstrafe)
{
G_AddViewAngle (int(ev->x * m_yaw * mouse_sensitivity * 8.0));
events[eventhead].x = 0;
}
if ((events[eventhead].x | events[eventhead].y) == 0)
{
return;
}
}
eventhead = (eventhead+1)&(MAXEVENTS-1); eventhead = (eventhead+1)&(MAXEVENTS-1);
} }