1 /*****************************************************************************
2  * $LastChangedDate: 2009-11-22 22:39:11 -0500 (Sun, 22 Nov 2009) $
3  * @file
4  * @author  Jim E. Brooks  http://www.palomino3d.org
5  * @brief   Initialize/start module.
6  *//*
7  * LEGAL:   COPYRIGHT (C) 2007 JIM E. BROOKS
8  *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
9  *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
10  *****************************************************************************/
11 
12 #define CONTROL_MODULE_CC 1
13 #include "base/module.hh"
14 #include "base/module_macros.hh"
15 using namespace base;
16 #include "glue/module.hh"
17 using namespace glue;
18 #include "control/module.hh"
19 #include "control/conf.hh"
20 #include "control/joystick.hh"
21 #include "control/events.hh"
22 
23 namespace control {
24 
25 /*****************************************************************************
26  * Initialize module.
27  *****************************************************************************/
28 void
Init(const base::InitArgs & initArgs)29 Init( const base::InitArgs& initArgs )
30 {
31     MODULE_INIT_LOAD_CONF_TXT( control )
32 }
33 
34 /*****************************************************************************
35  * Start module.
36  *****************************************************************************/
37 void
Start(void)38 Start( void )
39 {
40     // Enable the higher-level "control joystick".
41     if ( CONTROL_CONF.mJoystickEnabled )
42         GET_CONTROL_JOYSTICK().Enable();
43 }
44 
45 } // namespace control
46