mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-26 05:41:39 +00:00
This commit is contained in:
commit
71f400e238
4 changed files with 59 additions and 20 deletions
|
@ -1,5 +1,11 @@
|
|||
version: "{build}"
|
||||
|
||||
branches:
|
||||
except:
|
||||
- /^travis.*$/
|
||||
|
||||
clone_depth: 1
|
||||
|
||||
os: Visual Studio 2015
|
||||
|
||||
platform:
|
||||
|
@ -10,12 +16,37 @@ configuration:
|
|||
- Debug
|
||||
- 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:
|
||||
- cmd: md build
|
||||
- cmd: cd build
|
||||
- cmd: if "%platform%"=="Win32" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015
|
||||
- cmd: if "%platform%"=="x64" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 Win64
|
||||
- cmd: cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%configuration% ..
|
||||
- md build
|
||||
- cd build
|
||||
- if "%PLATFORM%"=="Win32" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015
|
||||
- if "%PLATFORM%"=="x64" set CMAKE_GENERATOR_NAME=Visual Studio 14 2015 Win64
|
||||
- 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:
|
||||
project: build\GZDoom.sln
|
||||
|
|
|
@ -288,7 +288,7 @@ void D_ProcessEvents (void)
|
|||
if (M_Responder (ev))
|
||||
continue; // menu ate the event
|
||||
// check events
|
||||
if (E_Responder(ev)) // [ZZ] ZScript ate the event
|
||||
if (ev->type != EV_Mouse && E_Responder(ev)) // [ZZ] ZScript ate the event // update 07.03.17: mouse events are handled directly
|
||||
continue;
|
||||
G_Responder (ev);
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ void D_PostEvent (const event_t *ev)
|
|||
return;
|
||||
}
|
||||
events[eventhead] = *ev;
|
||||
if (ev->type == EV_Mouse && !paused && menuactive == MENU_Off && ConsoleState != c_down && ConsoleState != c_falling && !E_CheckUiProcessors())
|
||||
if (ev->type == EV_Mouse && menuactive == MENU_Off && ConsoleState != c_down && ConsoleState != c_falling && !E_Responder(ev) && !paused)
|
||||
{
|
||||
if (Button_Mlook.bDown || freelook)
|
||||
{
|
||||
|
|
|
@ -410,15 +410,21 @@ void E_PlayerDisconnected(int num)
|
|||
handler->PlayerDisconnected(num);
|
||||
}
|
||||
|
||||
bool E_Responder(event_t* ev)
|
||||
bool E_Responder(const event_t* ev)
|
||||
{
|
||||
bool uiProcessorsFound = false;
|
||||
|
||||
if (ev->type == EV_GUI_Event)
|
||||
{
|
||||
// iterate handlers back to front by order, and give them this event.
|
||||
for (DStaticEventHandler* handler = E_LastEventHandler; handler; handler = handler->prev)
|
||||
{
|
||||
if (handler->IsUiProcessor && handler->UiProcess(ev))
|
||||
return true; // event was processed
|
||||
if (handler->IsUiProcessor)
|
||||
{
|
||||
uiProcessorsFound = true;
|
||||
if (handler->UiProcess(ev))
|
||||
return true; // event was processed
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -426,12 +432,14 @@ bool E_Responder(event_t* ev)
|
|||
// not sure if we want to handle device changes, but whatevs.
|
||||
for (DStaticEventHandler* handler = E_LastEventHandler; handler; handler = handler->prev)
|
||||
{
|
||||
if (handler->IsUiProcessor)
|
||||
uiProcessorsFound = true;
|
||||
if (handler->InputProcess(ev))
|
||||
return true; // event was processed
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return (uiProcessorsFound && (ev->type == EV_Mouse)); // mouse events are eaten by the event system if there are any uiprocessors.
|
||||
}
|
||||
|
||||
void E_Console(int player, FString name, int arg1, int arg2, int arg3, bool manual)
|
||||
|
@ -939,7 +947,7 @@ void DStaticEventHandler::PlayerDisconnected(int num)
|
|||
}
|
||||
}
|
||||
|
||||
FUiEvent::FUiEvent(event_t *ev)
|
||||
FUiEvent::FUiEvent(const event_t *ev)
|
||||
{
|
||||
Type = (EGUIEvent)ev->subtype;
|
||||
KeyChar = 0;
|
||||
|
@ -979,7 +987,7 @@ FUiEvent::FUiEvent(event_t *ev)
|
|||
}
|
||||
}
|
||||
|
||||
bool DStaticEventHandler::UiProcess(event_t* ev)
|
||||
bool DStaticEventHandler::UiProcess(const event_t* ev)
|
||||
{
|
||||
IFVIRTUAL(DStaticEventHandler, UiProcess)
|
||||
{
|
||||
|
@ -998,7 +1006,7 @@ bool DStaticEventHandler::UiProcess(event_t* ev)
|
|||
return false;
|
||||
}
|
||||
|
||||
FInputEvent::FInputEvent(event_t *ev)
|
||||
FInputEvent::FInputEvent(const event_t *ev)
|
||||
{
|
||||
Type = (EGenericEvent)ev->type;
|
||||
// we don't want the modders to remember what weird fields mean what for what events.
|
||||
|
@ -1025,7 +1033,7 @@ FInputEvent::FInputEvent(event_t *ev)
|
|||
}
|
||||
}
|
||||
|
||||
bool DStaticEventHandler::InputProcess(event_t* ev)
|
||||
bool DStaticEventHandler::InputProcess(const event_t* ev)
|
||||
{
|
||||
IFVIRTUAL(DStaticEventHandler, InputProcess)
|
||||
{
|
||||
|
|
10
src/events.h
10
src/events.h
|
@ -56,7 +56,7 @@ void E_PlayerDied(int num);
|
|||
// this executes when a player leaves the game
|
||||
void E_PlayerDisconnected(int num);
|
||||
// this executes on events.
|
||||
bool E_Responder(event_t* ev); // splits events into InputProcess and UiProcess
|
||||
bool E_Responder(const event_t* ev); // splits events into InputProcess and UiProcess
|
||||
// this executes on console/net events.
|
||||
void E_Console(int player, FString name, int arg1, int arg2, int arg3, bool manual);
|
||||
|
||||
|
@ -148,8 +148,8 @@ public:
|
|||
void PlayerDisconnected(int num);
|
||||
|
||||
// return true if handled.
|
||||
bool InputProcess(event_t* ev);
|
||||
bool UiProcess(event_t* ev);
|
||||
bool InputProcess(const event_t* ev);
|
||||
bool UiProcess(const event_t* ev);
|
||||
|
||||
//
|
||||
void ConsoleProcess(int player, FString name, int arg1, int arg2, int arg3, bool manual);
|
||||
|
@ -215,7 +215,7 @@ struct FUiEvent
|
|||
bool IsCtrl;
|
||||
bool IsAlt;
|
||||
|
||||
FUiEvent(event_t *ev);
|
||||
FUiEvent(const event_t *ev);
|
||||
};
|
||||
|
||||
struct FInputEvent
|
||||
|
@ -230,7 +230,7 @@ struct FInputEvent
|
|||
int MouseX;
|
||||
int MouseY;
|
||||
|
||||
FInputEvent(event_t *ev);
|
||||
FInputEvent(const event_t *ev);
|
||||
};
|
||||
|
||||
struct FConsoleEvent
|
||||
|
|
Loading…
Reference in a new issue