Skip to content

Commit

Permalink
Refactor|InputSystem|Client: Renamed input related source files follo…
Browse files Browse the repository at this point in the history
…wing organization changes
  • Loading branch information
danij-deng committed Nov 7, 2014
1 parent c05210a commit d6b2c28
Show file tree
Hide file tree
Showing 24 changed files with 100 additions and 81 deletions.
8 changes: 4 additions & 4 deletions doomsday/client/client.pro
Expand Up @@ -357,7 +357,7 @@ DENG_HEADERS += \
include/ui/clientwindowsystem.h \
include/ui/commandaction.h \
include/ui/commandbinding.h \
include/ui/dd_input.h \
include/ui/ddevent.h \
include/ui/dialogs/aboutdialog.h \
include/ui/dialogs/alertdialog.h \
include/ui/dialogs/audiosettingsdialog.h \
Expand Down Expand Up @@ -412,7 +412,7 @@ DENG_HEADERS += \
include/ui/joystick.h \
include/ui/mouse_qt.h \
include/ui/nativeui.h \
include/ui/p_control.h \
include/ui/playerimpulse.h \
include/ui/styledlogsinkformatter.h \
include/ui/sys_input.h \
include/ui/ui_main.h \
Expand Down Expand Up @@ -683,7 +683,6 @@ SOURCES += \
src/ui/clientwindow.cpp \
src/ui/clientwindowsystem.cpp \
src/ui/commandaction.cpp \
src/ui/dd_input.cpp \
src/ui/dialogs/aboutdialog.cpp \
src/ui/dialogs/alertdialog.cpp \
src/ui/dialogs/audiosettingsdialog.cpp \
Expand All @@ -704,14 +703,15 @@ SOURCES += \
src/ui/infine/finaletextwidget.cpp \
src/ui/infine/finalewidget.cpp \
src/ui/infine/infinesystem.cpp \
src/ui/inputdebug.cpp \
src/ui/inputdevice.cpp \
src/ui/inputdeviceaxiscontrol.cpp \
src/ui/inputdevicebuttoncontrol.cpp \
src/ui/inputdevicehatcontrol.cpp \
src/ui/inputsystem.cpp \
src/ui/mouse_qt.cpp \
src/ui/nativeui.cpp \
src/ui/p_control.cpp \
src/ui/playerimpulse.cpp \
src/ui/progress.cpp \
src/ui/styledlogsinkformatter.cpp \
src/ui/sys_input.cpp \
Expand Down
12 changes: 4 additions & 8 deletions doomsday/client/include/de_base.h
@@ -1,7 +1,7 @@
/** @file
/** @file de_base.h Engine Core.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2007-2013 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2007-2014 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
Expand All @@ -17,10 +17,6 @@
* http://www.gnu.org/licenses</small>
*/

/**
* Engine Core.
*/

#ifndef LIBDENG_BASE_H
#define LIBDENG_BASE_H

Expand All @@ -45,7 +41,7 @@
#include "dd_loop.h"
#include "library.h"
#include "busymode.h"
#include "ui/dd_input.h"
#include "ui/ddevent.h"
#include "ui/nativeui.h"
#include "ui/zonedebug.h"
#include <doomsday/uri.h>
Expand All @@ -57,4 +53,4 @@
# include "server_dummies.h"
#endif

#endif /* LIBDENG_BASE_H */
#endif // LIBDENG_BASE_H
2 changes: 1 addition & 1 deletion doomsday/client/include/de_play.h
Expand Up @@ -43,7 +43,7 @@
#include "world/p_players.h"
#include "world/thinkers.h"
#include "Material"
#include "ui/p_control.h"
#include "ui/playerimpulse.h"
#include "r_util.h"

#include "api_map.h"
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/ui/b_main.h
Expand Up @@ -21,7 +21,7 @@
#define CLIENT_INPUTSYSTEM_BINDINGS_H

#include <de/types.h>
#include "dd_input.h"
#include "ddevent.h"

void B_Init();

Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/ui/b_util.h
Expand Up @@ -22,7 +22,7 @@

#include <QList>
#include "dd_types.h"
#include "dd_input.h"
#include "ddevent.h"

class BindContext;
class InputDevice;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/ui/commandbinding.h
Expand Up @@ -23,7 +23,7 @@
#include <QVector>
#include <de/String>
#include "b_util.h"
#include "dd_input.h"
#include "ddevent.h"

struct CommandBinding
{
Expand Down
@@ -1,4 +1,4 @@
/** @file dd_input.h Input Subsystem.
/** @file ddevent.h Input system event.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2005-2014 Daniel Swanson <danij@dengine.net>
Expand All @@ -17,8 +17,8 @@
* http://www.gnu.org/licenses</small>
*/

#ifndef CLIENT_CORE_INPUT_H
#define CLIENT_CORE_INPUT_H
#ifndef CLIENT_INPUTSYSTEM_DDEVENT_H
#define CLIENT_INPUTSYSTEM_DDEVENT_H

#include <de/Event>
#include <de/String>
Expand Down Expand Up @@ -109,15 +109,4 @@ struct ddevent_t
#define IS_MOUSE_UP(evp) ((evp)->device == IDEV_MOUSE && IS_TOGGLE_UP(evp))
#define IS_MOUSE_MOTION(evp) ((evp)->device == IDEV_MOUSE && (evp)->type == E_AXIS)

void I_ConsoleRegister();

#ifdef DENG2_DEBUG
/**
* Render a visual representation of the current state of all input devices.
*/
void Rend_DrawInputDeviceVisuals();
#else
# define Rend_DrawInputDeviceVisuals()
#endif

#endif // CLIENT_CORE_INPUT_H
#endif // CLIENT_INPUTSYSTEM_DDEVENT_H
2 changes: 1 addition & 1 deletion doomsday/client/include/ui/infine/finale.h
Expand Up @@ -22,7 +22,7 @@

#include <de/Observers>
#include <de/String>
#include "../dd_input.h" // ddevent_t
#include "../ddevent.h"
#include "api_infine.h" // finaleid_t

class FinaleInterpreter;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/ui/infine/finaleinterpreter.h
Expand Up @@ -22,7 +22,7 @@

#include <de/Error>
#include <de/String>
#include "../dd_input.h" // ddevent_t
#include "../ddevent.h"
#include "api_infine.h" // finaleid_t

class FinaleWidget;
Expand Down
39 changes: 39 additions & 0 deletions doomsday/client/include/ui/inputdebug.h
@@ -0,0 +1,39 @@
/** @file inputedebug.h Input debug visualization.
*
* @authors Copyright © 2007-2014 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
*
* <small>This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version. This program is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details. You should have received a copy of the GNU
* General Public License along with this program; if not, see:
* http://www.gnu.org/licenses</small>
*/

#ifndef CLIENT_INPUTDEBUG_H
#define CLIENT_INPUTDEBUG_H

#include <de/libcore.h>

#ifdef DENG2_DEBUG

void I_DebugDrawerConsoleRegister();

/**
* Render a visual representation of the current state of all input devices.
*/
void I_DebugDrawer();

#else
# define I_ConsoleRegister()

# define I_DebugDrawer()
#endif

#endif // CLIENT_INPUTDEBUG_H
6 changes: 3 additions & 3 deletions doomsday/client/include/ui/inputsystem.h
@@ -1,7 +1,7 @@
/** @file inputsystem.h Input subsystem.
*
* @authors Copyright © 2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2014 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2005-2014 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
Expand All @@ -25,7 +25,7 @@
#include <de/Action>
#include <de/Error>
#include <de/System>
#include "dd_input.h" // ddevent_t
#include "ddevent.h"
#include "ui/commandaction.h"
#include "SettingsRegister"

Expand Down
@@ -1,4 +1,4 @@
/** @file p_control.h Player interaction impulse.
/** @file playerimpulse.h Player interaction impulse.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2014 Daniel Swanson <danij@dengine.net>
Expand Down
6 changes: 3 additions & 3 deletions doomsday/client/include/ui/ui_main.h
@@ -1,9 +1,9 @@
/** @file ui_main.h Graphical User Interface (obsolete).
/** @file ui_main.h Graphical User Interface (obsolete).
*
* Has ties to the console routines.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2005-2013 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2005-2014 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
Expand All @@ -23,7 +23,7 @@
#define LIBDENG_UI_MAIN_H

#include <de/rect.h>
#include "dd_input.h" // ddevent_t
#include "ddevent.h"
#ifdef __CLIENT__
# include "MaterialVariantSpec"
#endif
Expand Down
5 changes: 3 additions & 2 deletions doomsday/client/include/ui/widgetactions.h
@@ -1,6 +1,7 @@
/** @file widgetactions.h User actions bound to widgets.
*
* @authors Copyright (c) 2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2014 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
Expand All @@ -24,7 +25,7 @@
#include <de/Event>
#include <de/GuiWidget>

#include "dd_input.h"
#include "ddevent.h"

/**
* User actions bound to widgets. Traditionally called the bindings and binding
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/dd_main.cpp
Expand Up @@ -56,7 +56,7 @@
#include "world/worldsystem.h"
#include "world/map.h"
#include "ui/infine/infinesystem.h"
#include "ui/p_control.h"
#include "ui/playerimpulse.h"
#include "ui/progress.h"
#include "ui/nativeui.h"

Expand Down
21 changes: 8 additions & 13 deletions doomsday/client/src/network/net_main.cpp
@@ -1,7 +1,10 @@
/** @file net_main.cpp
/** @file net_main.cpp Client/server networking.
*
* Player number zero is always the server. In single-player games there is only
* the server present.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2005-2013 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2005-2014 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
Expand All @@ -17,15 +20,6 @@
* http://www.gnu.org/licenses</small>
*/

/**
* Client/server networking.
*
* Player number zero is always the server.
* In single-player games there is only the server present.
*/

// HEADER FILES ------------------------------------------------------------

#include <stdlib.h> // for atoi()

#include "de_platform.h"
Expand All @@ -47,6 +41,7 @@
# include "render/lightgrid.h"
# include "render/blockmapvisual.h"
# include "edit_bias.h"
# include "ui/inputdebug.h"
# include "ui/widgets/taskbarwidget.h"
#endif

Expand Down Expand Up @@ -739,8 +734,8 @@ void Net_Drawer()
// Draw the light range debug display.
Rend_DrawLightModMatrix();

// Draw the input device debug display.
Rend_DrawInputDeviceVisuals();
// Draw the input debug display.
I_DebugDrawer();

// Draw the demo recording overlay.
Net_DrawDemoOverlay();
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/ui/b_main.cpp
Expand Up @@ -32,7 +32,7 @@
#include "clientapp.h"
#include "ui/commandbinding.h"
#include "ui/bindcontext.h"
#include "ui/p_control.h"
#include "ui/playerimpulse.h"
#include "ui/inputdevice.h"
#include "ui/inputdeviceaxiscontrol.h"
#include "ui/ui_main.h"
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/ui/bindcontext.cpp
Expand Up @@ -26,7 +26,7 @@
#include "clientapp.h"

#include "ui/inputdevice.h"
#include "ui/p_control.h"
#include "ui/playerimpulse.h"

/// @todo: remove
#include "ui/inputdeviceaxiscontrol.h"
Expand Down
@@ -1,7 +1,6 @@
/** @file dd_input.cpp Platform-independent input subsystem.
/** @file inputdebug.cpp Input debug visualizer.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2005-2014 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2007-2014 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
Expand All @@ -18,11 +17,10 @@
* 02110-1301 USA</small>
*/

#include "de_platform.h" // strdup macro

#ifdef DENG2_DEBUG

#include "ui/dd_input.h"
#include "de_platform.h" // strdup macro
#include "ui/inputdebug.h"

#include <de/concurrency.h>
#include <de/ddstring.h>
Expand Down Expand Up @@ -471,7 +469,7 @@ void Rend_RenderInputDeviceStateVisual(InputDevice &device, inputdev_layout_t co
#undef SPACING
}

void Rend_DrawInputDeviceVisuals()
void I_DebugDrawer()
{
#define SPACING 2
#define NUMITEMS(x) (sizeof(x) / sizeof((x)[0]))
Expand Down Expand Up @@ -801,13 +799,12 @@ void Rend_DrawInputDeviceVisuals()
#undef NUMITEMS
#undef SPACING
}
#endif // DENG2_DEBUG

void I_ConsoleRegister()
void I_DebugDrawerConsoleRegister()
{
#ifdef DENG2_DEBUG
C_VAR_BYTE("rend-dev-input-joy-state", &devRendJoyState, CVF_NO_ARCHIVE, 0, 1);
C_VAR_BYTE("rend-dev-input-key-state", &devRendKeyState, CVF_NO_ARCHIVE, 0, 1);
C_VAR_BYTE("rend-dev-input-mouse-state", &devRendMouseState, CVF_NO_ARCHIVE, 0, 1);
#endif
}

#endif // DENG2_DEBUG

0 comments on commit d6b2c28

Please sign in to comment.