Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
OIS
Commits
01314637
Commit
01314637
authored
Oct 06, 2013
by
Ben Hymers
Browse files
Removed all trailing whitespace
parent
b408932f
Changes
94
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
133 additions
and
133 deletions
+133
-133
ReadMe.txt
ReadMe.txt
+13
-13
Win32/CommandLine/CommandLine.rc
Win32/CommandLine/CommandLine.rc
+4
-4
Win32/CommandLine/resource.h
Win32/CommandLine/resource.h
+1
-1
Win32/DemoFFTest/FF.rc
Win32/DemoFFTest/FF.rc
+5
-5
Win32/DemoFFTest/resource.h
Win32/DemoFFTest/resource.h
+1
-1
Win32/OIS.rc
Win32/OIS.rc
+3
-3
Win32/SDL/SdlDemo/SdlDemo.cpp
Win32/SDL/SdlDemo/SdlDemo.cpp
+3
-3
Win32/SDL/SdlDemo/SdlDemo.rc
Win32/SDL/SdlDemo/SdlDemo.rc
+4
-4
Win32/SDL/SdlDemo/resource.h
Win32/SDL/SdlDemo/resource.h
+1
-1
Win32/resource.h
Win32/resource.h
+1
-1
acinclude.m4
acinclude.m4
+1
-1
bootstrap
bootstrap
+1
-1
demos/FFConsoleDemo.cpp
demos/FFConsoleDemo.cpp
+46
-46
demos/OISConsole.cpp
demos/OISConsole.cpp
+12
-12
includes/OIS.h
includes/OIS.h
+5
-5
includes/OISConfig.h
includes/OISConfig.h
+7
-7
includes/OISEvents.h
includes/OISEvents.h
+5
-5
includes/OISFactoryCreator.h
includes/OISFactoryCreator.h
+5
-5
includes/OISForceFeedback.h
includes/OISForceFeedback.h
+7
-7
includes/OISInputManager.h
includes/OISInputManager.h
+8
-8
No files found.
ReadMe.txt
View file @
01314637
...
@@ -6,20 +6,20 @@ The zlib/libpng License
...
@@ -6,20 +6,20 @@ The zlib/libpng License
Copyright (c) 2005-2010 Phillip Castaneda (pjcast -- www.wreckedgames.com)
Copyright (c) 2005-2010 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no
This software is provided 'as-is', without any express or implied warranty. In no
event will the authors be held liable for any damages arising from the use of this
event will the authors be held liable for any damages arising from the use of this
software.
software.
Permission is granted to anyone to use this software for any purpose, including
Permission is granted to anyone to use this software for any purpose, including
commercial applications, and to alter it and redistribute it freely, subject to the
commercial applications, and to alter it and redistribute it freely, subject to the
following restrictions:
following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that
1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product,
you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated
an acknowledgment in the product documentation would be appreciated
but is not required.
but is not required.
2. Altered source versions must be plainly marked as such, and must not be
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
3. This notice may not be removed or altered from any source distribution.
...
@@ -28,9 +28,9 @@ following restrictions:
...
@@ -28,9 +28,9 @@ following restrictions:
======================================================================================
======================================================================================
================ LICENSE EXPLAINED ===================================================
================ LICENSE EXPLAINED ===================================================
======================================================================================
======================================================================================
In case the license was not clear enough... Basically, you can link with this lib
In case the license was not clear enough... Basically, you can link with this lib
which puts no restrictions on what you have to license your code as. You can modify
which puts no restrictions on what you have to license your code as. You can modify
this lib, and not have release your changes. Though, as explained above, <bold>
this lib, and not have release your changes. Though, as explained above, <bold>
Altered source versions must be plainly marked as such, and must not be misrepresented
Altered source versions must be plainly marked as such, and must not be misrepresented
as being the original software </bold>
as being the original software </bold>
...
@@ -40,13 +40,13 @@ This is to allow users the greatest flexibility in what you can use this lib for
...
@@ -40,13 +40,13 @@ This is to allow users the greatest flexibility in what you can use this lib for
================ INFO ================================================================
================ INFO ================================================================
======================================================================================
======================================================================================
Cross Platform Object Oriented Input Lib System. Meant to be very robust and
Cross Platform Object Oriented Input Lib System. Meant to be very robust and
compatiable with many systems and operating systems
compatiable with many systems and operating systems
Win32/
Win32/
Contains Visual Studio .Net Solution Files
Contains Visual Studio .Net Solution Files
Contains CodeBlocks project files for OIS
Contains CodeBlocks project files for OIS
---- Dependencies ------------------------------------------------------
---- Dependencies ------------------------------------------------------
DirectInput 8
DirectInput 8
...
...
Win32/CommandLine/CommandLine.rc
View file @
01314637
...
@@ -31,18 +31,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
...
@@ -31,18 +31,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
// TEXTINCLUDE
//
//
1 TEXTINCLUDE
1 TEXTINCLUDE
BEGIN
BEGIN
"resource.h\0"
"resource.h\0"
END
END
2 TEXTINCLUDE
2 TEXTINCLUDE
BEGIN
BEGIN
"#include ""afxres.h""\r\n"
"#include ""afxres.h""\r\n"
"\0"
"\0"
END
END
3 TEXTINCLUDE
3 TEXTINCLUDE
BEGIN
BEGIN
"\r\n"
"\r\n"
"\0"
"\0"
...
@@ -72,7 +72,7 @@ END
...
@@ -72,7 +72,7 @@ END
//
//
#ifdef APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
GUIDELINES DESIGNINFO
BEGIN
BEGIN
IDD_DIALOG1, DIALOG
IDD_DIALOG1, DIALOG
BEGIN
BEGIN
...
...
Win32/CommandLine/resource.h
View file @
01314637
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#define IDC_BUTTON1 1001
#define IDC_BUTTON1 1001
// Next default values for new objects
// Next default values for new objects
//
//
#ifdef APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_RESOURCE_VALUE 102
...
...
Win32/DemoFFTest/FF.rc
View file @
01314637
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#ifndef IDC_STATIC
#ifndef IDC_STATIC
#define IDC_STATIC (-1)
#define IDC_STATIC (-1)
#endif
#endif
#include "winresrc.h"
#include "winresrc.h"
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
#undef APSTUDIO_READONLY_SYMBOLS
...
@@ -31,18 +31,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
...
@@ -31,18 +31,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
// TEXTINCLUDE
//
//
1 TEXTINCLUDE
1 TEXTINCLUDE
BEGIN
BEGIN
"resource.h\0"
"resource.h\0"
END
END
2 TEXTINCLUDE
2 TEXTINCLUDE
BEGIN
BEGIN
"#include ""afxres.h""\r\n"
"#include ""afxres.h""\r\n"
"\0"
"\0"
END
END
3 TEXTINCLUDE
3 TEXTINCLUDE
BEGIN
BEGIN
"\r\n"
"\r\n"
"\0"
"\0"
...
@@ -72,7 +72,7 @@ END
...
@@ -72,7 +72,7 @@ END
//
//
#ifdef APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
GUIDELINES DESIGNINFO
BEGIN
BEGIN
IDD_DIALOG1, DIALOG
IDD_DIALOG1, DIALOG
BEGIN
BEGIN
...
...
Win32/DemoFFTest/resource.h
View file @
01314637
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#define IDC_BUTTON1 1001
#define IDC_BUTTON1 1001
// Next default values for new objects
// Next default values for new objects
//
//
#ifdef APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_RESOURCE_VALUE 102
...
...
Win32/OIS.rc
View file @
01314637
...
@@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
...
@@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
// TEXTINCLUDE
//
//
1 TEXTINCLUDE
1 TEXTINCLUDE
BEGIN
BEGIN
"resource.h\0"
"resource.h\0"
END
END
2 TEXTINCLUDE
2 TEXTINCLUDE
BEGIN
BEGIN
"#include ""afxres.h""\r\n"
"#include ""afxres.h""\r\n"
"\0"
"\0"
END
END
3 TEXTINCLUDE
3 TEXTINCLUDE
BEGIN
BEGIN
"\r\n"
"\r\n"
"\0"
"\0"
...
...
Win32/SDL/SdlDemo/SdlDemo.cpp
View file @
01314637
...
@@ -80,7 +80,7 @@ INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
...
@@ -80,7 +80,7 @@ INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
hWnd
=
CreateDialog
(
0
,
MAKEINTRESOURCE
(
IDD_MAIN_WINDOW
),
0
,(
DLGPROC
)
DlgProc
);
hWnd
=
CreateDialog
(
0
,
MAKEINTRESOURCE
(
IDD_MAIN_WINDOW
),
0
,(
DLGPROC
)
DlgProc
);
if
(
hWnd
==
0
)
exit
(
-
1
);
if
(
hWnd
==
0
)
exit
(
-
1
);
ShowWindow
(
hWnd
,
SW_SHOW
);
ShowWindow
(
hWnd
,
SW_SHOW
);
hOut
=
GetDlgItem
(
hWnd
,
IDC_OUTPUT
);
hOut
=
GetDlgItem
(
hWnd
,
IDC_OUTPUT
);
if
(
hOut
==
0
)
exit
(
-
1
);
if
(
hOut
==
0
)
exit
(
-
1
);
...
@@ -146,7 +146,7 @@ void initSDL()
...
@@ -146,7 +146,7 @@ void initSDL()
if
(
SDL_Init
(
SDL_INIT_VIDEO
)
<
0
)
if
(
SDL_Init
(
SDL_INIT_VIDEO
)
<
0
)
throw
(
"Error!"
);
throw
(
"Error!"
);
SDL_Surface
*
screen
=
SDL_SetVideoMode
(
r
.
right
-
r
.
left
,
r
.
bottom
-
r
.
top
,
32
,
SDL_HWSURFACE
);
SDL_Surface
*
screen
=
SDL_SetVideoMode
(
r
.
right
-
r
.
left
,
r
.
bottom
-
r
.
top
,
32
,
SDL_HWSURFACE
);
//SDL_Surface *screen = SDL_SetVideoMode( r.right-r.left, r.bottom-r.top, 0, 0 );
//SDL_Surface *screen = SDL_SetVideoMode( r.right-r.left, r.bottom-r.top, 0, 0 );
//SetWindowPos(hDisp, 0, r.left, r.top, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
//SetWindowPos(hDisp, 0, r.left, r.top, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
OutputMessage
(
"Success!"
);
OutputMessage
(
"Success!"
);
...
@@ -169,7 +169,7 @@ void initOIS()
...
@@ -169,7 +169,7 @@ void initOIS()
gMouse
=
static_cast
<
Mouse
*>
(
im
->
createInputObject
(
OISMouse
,
false
));
gMouse
=
static_cast
<
Mouse
*>
(
im
->
createInputObject
(
OISMouse
,
false
));
gMouse
->
setEventCallback
(
&
gHandler
);
gMouse
->
setEventCallback
(
&
gHandler
);
std
::
ostringstream
temp
;
std
::
ostringstream
temp
;
unsigned
int
v
=
im
->
getVersionNumber
();
unsigned
int
v
=
im
->
getVersionNumber
();
temp
<<
"Success! >> "
<<
"Version: "
<<
(
v
>>
16
)
<<
"."
<<
((
v
>>
8
)
&
0x000000FF
)
temp
<<
"Success! >> "
<<
"Version: "
<<
(
v
>>
16
)
<<
"."
<<
((
v
>>
8
)
&
0x000000FF
)
...
...
Win32/SDL/SdlDemo/SdlDemo.rc
View file @
01314637
...
@@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
...
@@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
// TEXTINCLUDE
//
//
1 TEXTINCLUDE
1 TEXTINCLUDE
BEGIN
BEGIN
"resource.h\0"
"resource.h\0"
END
END
2 TEXTINCLUDE
2 TEXTINCLUDE
BEGIN
BEGIN
"#include ""afxres.h""\r\n"
"#include ""afxres.h""\r\n"
"\0"
"\0"
END
END
3 TEXTINCLUDE
3 TEXTINCLUDE
BEGIN
BEGIN
"\r\n"
"\r\n"
"\0"
"\0"
...
@@ -71,7 +71,7 @@ END
...
@@ -71,7 +71,7 @@ END
//
//
#ifdef APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
GUIDELINES DESIGNINFO
BEGIN
BEGIN
IDD_MAIN_WINDOW, DIALOG
IDD_MAIN_WINDOW, DIALOG
BEGIN
BEGIN
...
...
Win32/SDL/SdlDemo/resource.h
View file @
01314637
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#define IDC_BUTTON1 1006
#define IDC_BUTTON1 1006
// Next default values for new objects
// Next default values for new objects
//
//
#ifdef APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_RESOURCE_VALUE 102
...
...
Win32/resource.h
View file @
01314637
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
// Used by OIS.rc
// Used by OIS.rc
// Next default values for new objects
// Next default values for new objects
//
//
#ifdef APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_RESOURCE_VALUE 101
...
...
acinclude.m4
View file @
01314637
AC_DEFUN([OIS_USE_STLPORT],
AC_DEFUN([OIS_USE_STLPORT],
[AC_ARG_WITH(stlport,
[AC_ARG_WITH(stlport,
AC_HELP_STRING([--with-stlport=PATH],
AC_HELP_STRING([--with-stlport=PATH],
[the path to STLPort.]),
[the path to STLPort.]),
ac_cv_use_stlport=$withval,
ac_cv_use_stlport=$withval,
...
...
bootstrap
View file @
01314637
...
@@ -12,4 +12,4 @@ libtoolize --force --copy
...
@@ -12,4 +12,4 @@ libtoolize --force --copy
aclocal
$ACLOCAL_FLAGS
aclocal
$ACLOCAL_FLAGS
autoheader
autoheader
automake
--include-deps
--add-missing
--foreign
--copy
automake
--include-deps
--add-missing
--foreign
--copy
autoconf
autoconf
demos/FFConsoleDemo.cpp
View file @
01314637
...
@@ -113,12 +113,12 @@ class LimitedVariable : public Variable
...
@@ -113,12 +113,12 @@ class LimitedVariable : public Variable
public:
public:
LimitedVariable
(
double
dInitValue
,
double
dMinValue
,
double
dMaxValue
)
LimitedVariable
(
double
dInitValue
,
double
dMinValue
,
double
dMaxValue
)
:
_dMinValue
(
dMinValue
),
_dMaxValue
(
dMaxValue
),
Variable
(
dInitValue
)
:
_dMinValue
(
dMinValue
),
_dMaxValue
(
dMaxValue
),
Variable
(
dInitValue
)
{}
{}
virtual
void
setValue
(
double
dValue
)
virtual
void
setValue
(
double
dValue
)
{
{
_dValue
=
dValue
;
_dValue
=
dValue
;
if
(
_dValue
>
_dMaxValue
)
if
(
_dValue
>
_dMaxValue
)
_dValue
=
_dMaxValue
;
_dValue
=
_dMaxValue
;
...
@@ -129,7 +129,7 @@ class LimitedVariable : public Variable
...
@@ -129,7 +129,7 @@ class LimitedVariable : public Variable
/* virtual string toString() const
/* virtual string toString() const
{
{
ostringstream oss;
ostringstream oss;
oss << setiosflags(ios_base::right) << setw(4)
oss << setiosflags(ios_base::right) << setw(4)
<< (int)(200.0 * getValue()/(_dMaxValue - _dMinValue)); // [-100%, +100%]
<< (int)(200.0 * getValue()/(_dMaxValue - _dMinValue)); // [-100%, +100%]
return oss.str();
return oss.str();
}*/
}*/
...
@@ -143,7 +143,7 @@ class TriangleVariable : public LimitedVariable
...
@@ -143,7 +143,7 @@ class TriangleVariable : public LimitedVariable
public:
public:
TriangleVariable
(
double
dInitValue
,
double
dDeltaValue
,
double
dMinValue
,
double
dMaxValue
)
TriangleVariable
(
double
dInitValue
,
double
dDeltaValue
,
double
dMinValue
,
double
dMaxValue
)
:
LimitedVariable
(
dInitValue
,
dMinValue
,
dMaxValue
),
_dDeltaValue
(
dDeltaValue
)
{};
:
LimitedVariable
(
dInitValue
,
dMinValue
,
dMaxValue
),
_dDeltaValue
(
dDeltaValue
)
{};
virtual
void
update
()
virtual
void
update
()
...
@@ -192,9 +192,9 @@ class VariableEffect
...
@@ -192,9 +192,9 @@ class VariableEffect
public:
public:
VariableEffect
(
const
char
*
pszDesc
,
Effect
*
pEffect
,
VariableEffect
(
const
char
*
pszDesc
,
Effect
*
pEffect
,
const
MapVariables
&
mapVars
,
const
EffectVariablesApplier
pfApplyVars
)
const
MapVariables
&
mapVars
,
const
EffectVariablesApplier
pfApplyVars
)
:
_pszDesc
(
pszDesc
),
_pEffect
(
pEffect
),
:
_pszDesc
(
pszDesc
),
_pEffect
(
pEffect
),
_mapVariables
(
mapVars
),
_pfApplyVariables
(
pfApplyVars
),
_bActive
(
false
)
_mapVariables
(
mapVars
),
_pfApplyVariables
(
pfApplyVars
),
_bActive
(
false
)
{}
{}
...
@@ -206,7 +206,7 @@ class VariableEffect
...
@@ -206,7 +206,7 @@ class VariableEffect
for
(
iterVars
=
_mapVariables
.
begin
();
iterVars
!=
_mapVariables
.
end
();
iterVars
++
)
for
(
iterVars
=
_mapVariables
.
begin
();
iterVars
!=
_mapVariables
.
end
();
iterVars
++
)
if
(
iterVars
->
second
)
if
(
iterVars
->
second
)
delete
iterVars
->
second
;
delete
iterVars
->
second
;
}
}
void
setActive
(
bool
bActive
=
true
)
void
setActive
(
bool
bActive
=
true
)
...
@@ -294,13 +294,13 @@ class JoystickManager
...
@@ -294,13 +294,13 @@ class JoystickManager
{
{
_bFFFound
=
false
;
_bFFFound
=
false
;
for
(
int
nJoyInd
=
0
;
nJoyInd
<
pInputMgr
->
getNumberOfDevices
(
OISJoyStick
);
++
nJoyInd
)
for
(
int
nJoyInd
=
0
;
nJoyInd
<
pInputMgr
->
getNumberOfDevices
(
OISJoyStick
);
++
nJoyInd
)
{
{
//Create the stick
//Create the stick
JoyStick
*
pJoy
=
(
JoyStick
*
)
pInputMgr
->
createInputObject
(
OISJoyStick
,
true
);
JoyStick
*
pJoy
=
(
JoyStick
*
)
pInputMgr
->
createInputObject
(
OISJoyStick
,
true
);
cout
<<
endl
<<
"Created buffered joystick #"
<<
nJoyInd
<<
" '"
<<
pJoy
->
vendor
()
cout
<<
endl
<<
"Created buffered joystick #"
<<
nJoyInd
<<
" '"
<<
pJoy
->
vendor
()
<<
"' (Id="
<<
pJoy
->
getID
()
<<
")"
;
<<
"' (Id="
<<
pJoy
->
getID
()
<<
")"
;
// Check for FF, and if so, keep the joy and dump FF info
// Check for FF, and if so, keep the joy and dump FF info
ForceFeedback
*
pFFDev
=
(
ForceFeedback
*
)
pJoy
->
queryInterface
(
Interface
::
ForceFeedback
);
ForceFeedback
*
pFFDev
=
(
ForceFeedback
*
)
pJoy
->
queryInterface
(
Interface
::
ForceFeedback
);
if
(
pFFDev
)
if
(
pFFDev
)
...
@@ -313,11 +313,11 @@ class JoystickManager
...
@@ -313,11 +313,11 @@ class JoystickManager
// Keep also the associated FF device
// Keep also the associated FF device
_vecFFDev
.
push_back
(
pFFDev
);
_vecFFDev
.
push_back
(
pFFDev
);
// Dump FF supported effects and other info.
// Dump FF supported effects and other info.
cout
<<
endl
<<
" * Number of force feedback axes : "
cout
<<
endl
<<
" * Number of force feedback axes : "
<<
pFFDev
->
getFFAxesNumber
()
<<
endl
;
<<
pFFDev
->
getFFAxesNumber
()
<<
endl
;
const
ForceFeedback
::
SupportedEffectList
&
lstFFEffects
=
const
ForceFeedback
::
SupportedEffectList
&
lstFFEffects
=
pFFDev
->
getSupportedEffects
();
pFFDev
->
getSupportedEffects
();
if
(
lstFFEffects
.
size
()
>
0
)
if
(
lstFFEffects
.
size
()
>
0
)
{
{
...
@@ -393,7 +393,7 @@ class JoystickManager
...
@@ -393,7 +393,7 @@ class JoystickManager
_dMasterGain
=
1.0
;
_dMasterGain
=
1.0
;
else
if
(
_dMasterGain
<
0.0
)
else
if
(
_dMasterGain
<
0.0
)
_dMasterGain
=
0.0
;
_dMasterGain
=
0.0
;
_vecFFDev
[
_nCurrJoyInd
]
->
setMasterGain
(
_dMasterGain
);
_vecFFDev
[
_nCurrJoyInd
]
->
setMasterGain
(
_dMasterGain
);
}
}
}
}
...
@@ -416,7 +416,7 @@ class JoystickManager
...
@@ -416,7 +416,7 @@ class JoystickManager
{
{
// This fires off buffered events for each joystick we have
// This fires off buffered events for each joystick we have
for
(
size_t
nJoyInd
=
0
;
nJoyInd
<
_vecJoys
.
size
();
++
nJoyInd
)
for
(
size_t
nJoyInd
=
0
;
nJoyInd
<
_vecJoys
.
size
();
++
nJoyInd
)
if
(
_vecJoys
[
nJoyInd
]
)
if
(
_vecJoys
[
nJoyInd
]
)
_vecJoys
[
nJoyInd
]
->
capture
();
_vecJoys
[
nJoyInd
]
->
capture
();
}
}
...
@@ -482,7 +482,7 @@ class EffectManager
...
@@ -482,7 +482,7 @@ class EffectManager
public:
public:
EffectManager
(
JoystickManager
*
pJoystickMgr
,
unsigned
int
nUpdateFreq
)
EffectManager
(
JoystickManager
*
pJoystickMgr
,
unsigned
int
nUpdateFreq
)
:
_pJoystickMgr
(
pJoystickMgr
),
_nUpdateFreq
(
nUpdateFreq
),
_nCurrEffectInd
(
-
1
)
:
_pJoystickMgr
(
pJoystickMgr
),
_nUpdateFreq
(
nUpdateFreq
),
_nCurrEffectInd
(
-
1
)
{
{
Effect
*
pEffect
;
Effect
*
pEffect
;
...
@@ -490,16 +490,16 @@ class EffectManager
...
@@ -490,16 +490,16 @@ class EffectManager
ConstantEffect
*
pConstForce
;
ConstantEffect
*
pConstForce
;
PeriodicEffect
*
pPeriodForce
;
PeriodicEffect
*
pPeriodForce
;
// Please don't modify or remove effects (unless there is some bug ...) :
// Please don't modify or remove effects (unless there is some bug ...) :
// add new ones to enhance the test repository.
// add new ones to enhance the test repository.
// And feel free to add any tested device, even when the test failed !
// And feel free to add any tested device, even when the test failed !
// Tested devices capabilities :
// Tested devices capabilities :
// - Logitech G25 Racing wheel :
// - Logitech G25 Racing wheel :
// * Only 1 axis => no directional 2D effect (only left and right)
// * Only 1 axis => no directional 2D effect (only left and right)
// * Full support for constant force under WinXPSP2DX9 and Linux 2.6.22.9
// * Full support for constant force under WinXPSP2DX9 and Linux 2.6.22.9
// * Full support for periodic forces under WinXPSP2DX9
// * Full support for periodic forces under WinXPSP2DX9
// (but poor rendering under 20ms period), and no support under Linux 2.6.22.9
// (but poor rendering under 20ms period), and no support under Linux 2.6.22.9
// * Full support reported (not tested) for all other forces under WinXPSP2DX9,
// * Full support reported (not tested) for all other forces under WinXPSP2DX9,
// and no support under Linux 2.6.22.9
// and no support under Linux 2.6.22.9
// - Logitech Rumble pad 2 :
// - Logitech Rumble pad 2 :
// * Only 1 axis => no directional 2D effect (only left and right)
// * Only 1 axis => no directional 2D effect (only left and right)
...
@@ -521,7 +521,7 @@ class EffectManager
...
@@ -521,7 +521,7 @@ class EffectManager
// Notes: Linux: replay_length: no way to get it to work if not 0 or Effect::OIS_INFINITE
// Notes: Linux: replay_length: no way to get it to work if not 0 or Effect::OIS_INFINITE
// Tested devices :
// Tested devices :
// - Logitech G25 Racing wheel : WinXPSP2DX9=OK, Linux2.6.22.9=OK.
// - Logitech G25 Racing wheel : WinXPSP2DX9=OK, Linux2.6.22.9=OK.
// - Logitech Rumble pad 2 : WinXPSP2DX9=OK (but only light motor involved),
// - Logitech Rumble pad 2 : WinXPSP2DX9=OK (but only light motor involved),
// Linux2.6.22.9=Not supported
// Linux2.6.22.9=Not supported
pEffect
=
new
Effect
(
Effect
::
ConstantForce
,
Effect
::
Constant
);
pEffect
=
new
Effect
(
Effect
::
ConstantForce
,
Effect
::
Constant
);
pEffect
->
direction
=
Effect
::
North
;
pEffect
->
direction
=
Effect
::
North
;
...
@@ -538,10 +538,10 @@ class EffectManager
...
@@ -538,10 +538,10 @@ class EffectManager
pConstForce
->
envelope
.
fadeLevel
=
(
unsigned
short
)
pConstForce
->
level
;
pConstForce
->
envelope
.
fadeLevel
=
(
unsigned
short
)
pConstForce
->
level
;
mapVars
.
clear
();
mapVars
.
clear
();
mapVars
[
"Force"
]
=
mapVars
[
"Force"
]
=
new
TriangleVariable
(
0.0
,
// F0
new
TriangleVariable
(
0.0
,
// F0
4
*
10000
/
_nUpdateFreq
/
20.0
,
// dF for a 20s-period triangle
4
*
10000
/
_nUpdateFreq
/
20.0
,
// dF for a 20s-period triangle
-
10000.0
,
// Fmin
-
10000.0
,
// Fmin
10000.0
);
// Fmax
10000.0
);
// Fmax
mapVars
[
"AttackFactor"
]
=
new
Constant
(
1.0
);
mapVars
[
"AttackFactor"
]
=
new
Constant
(
1.0
);
...
@@ -551,11 +551,11 @@ class EffectManager
...
@@ -551,11 +551,11 @@ class EffectManager
"of its signed amplitude in [-10K, +10K]"
,
"of its signed amplitude in [-10K, +10K]"
,
pEffect
,
mapVars
,
forceVariableApplier
));
pEffect
,
mapVars
,
forceVariableApplier
));
// 2) Constant force on 1 axis with noticeable attack
// 2) Constant force on 1 axis with noticeable attack
// with 20s-period triangle oscillations in [-10K, +10K].
// with 20s-period triangle oscillations in [-10K, +10K].
// Tested devices :
// Tested devices :
// - Logitech G25 Racing wheel : WinXPSP2DX9=OK, Linux=OK.
// - Logitech G25 Racing wheel : WinXPSP2DX9=OK, Linux=OK.
// - Logitech Rumble pad 2 : WinXPSP2DX9=OK (including attack, but only light motor involved),
// - Logitech Rumble pad 2 : WinXPSP2DX9=OK (including attack, but only light motor involved),
// Linux2.6.22.9=Not supported.
// Linux2.6.22.9=Not supported.
pEffect
=
new
Effect
(
Effect
::
ConstantForce
,
Effect
::
Constant
);
pEffect
=
new
Effect
(
Effect
::
ConstantForce
,
Effect
::
Constant
);
pEffect
->
direction
=
Effect
::
North
;
pEffect
->
direction
=
Effect
::
North
;
...
@@ -572,10 +572,10 @@ class EffectManager
...
@@ -572,10 +572,10 @@ class EffectManager
pConstForce
->
envelope
.
fadeLevel
=
(
unsigned
short
)
pConstForce
->
level
;
// Idem
pConstForce
->
envelope
.
fadeLevel
=
(
unsigned
short
)
pConstForce
->
level
;
// Idem
mapVars
.
clear
();
mapVars
.
clear
();
mapVars
[
"Force"
]
=
mapVars
[
"Force"
]
=
new
TriangleVariable
(
0.0
,
// F0
new
TriangleVariable
(
0.0
,
// F0
4
*
10000
/
_nUpdateFreq
/
20.0
,
// dF for a 20s-period triangle
4
*
10000
/
_nUpdateFreq
/
20.0
,
// dF for a 20s-period triangle
-
10000.0
,
// Fmin
-
10000.0
,
// Fmin
10000.0
);
// Fmax
10000.0
);
// Fmax
mapVars
[
"AttackFactor"
]
=
new
Constant
(
0.1
);
mapVars
[
"AttackFactor"
]
=
new
Constant
(
0.1
);
...
@@ -609,10 +609,10 @@ class EffectManager
...
@@ -609,10 +609,10 @@ class EffectManager
pPeriodForce
->
envelope
.
fadeLevel
=
(
unsigned
short
)
pPeriodForce
->
magnitude
;
pPeriodForce
->
envelope
.
fadeLevel
=
(
unsigned
short
)
pPeriodForce
->
magnitude
;
mapVars
.
clear
();
mapVars
.
clear
();
mapVars
[
"Period"
]
=
mapVars
[
"Period"
]
=
new
TriangleVariable
(
1
*
1000.0
,
// P0
new
TriangleVariable
(
1
*
1000.0
,
// P0
4
*
(
400
-
10
)
*
1000.0
/
_nUpdateFreq
/
40.0
,
// dP for a 40s-period triangle
4
*
(
400
-
10
)
*
1000.0
/
_nUpdateFreq
/
40.0
,
// dP for a 40s-period triangle
10
*
1000.0
,
// Pmin
10
*
1000.0
,
// Pmin
400
*
1000.0
);
// Pmax
400
*
1000.0
);
// Pmax
_vecEffects
.
push_back
_vecEffects
.
push_back
(
new
VariableEffect
(
new
VariableEffect
...
@@ -680,14 +680,14 @@ class EffectManager
...
@@ -680,14 +680,14 @@ class EffectManager
// Nothing to do if no joystick currently selected
// Nothing to do if no joystick currently selected
if
(
!
_pJoystickMgr
->
getCurrentFFDevice
())
if
(
!
_pJoystickMgr
->
getCurrentFFDevice
())
{
{
cout
<<
"
\n
No Joystick selected.
\n
"
;
cout
<<
"
\n
No Joystick selected.
\n
"
;
return
;
return
;
}
}
// Nothing to do if joystick cannot play any effect
// Nothing to do if joystick cannot play any effect
if
(
_vecPlayableEffectInd
.
empty
())
if
(
_vecPlayableEffectInd
.
empty
())
{
{
cout
<<
"
\n
No playable effects.
\n
"
;
cout
<<
"
\n
No playable effects.
\n
"
;
return
;
return
;
}
}
...
@@ -695,7 +695,7 @@ class EffectManager
...
@@ -695,7 +695,7 @@ class EffectManager
if
(
eWhich
!=
eNone
&&
_nCurrEffectInd
<
0
)
if
(
eWhich
!=
eNone
&&
_nCurrEffectInd
<
0
)
_nCurrEffectInd
=
0
;
_nCurrEffectInd
=
0
;
// Otherwise, remove the current one from the device,
// Otherwise, remove the current one from the device,
// and then select the requested one if any.
// and then select the requested one if any.
else
if
(
_nCurrEffectInd
>=
0
)
else
if
(
_nCurrEffectInd
>=
0
)
{
{
...
@@ -743,10 +743,10 @@ class EffectManager
...
@@ -743,10 +743,10 @@ class EffectManager
// oss << _pJoystickMgr->getCurrentFFDevice()->getFFMemoryLoad() << "%";
// oss << _pJoystickMgr->getCurrentFFDevice()->getFFMemoryLoad() << "%";
//else
//else
// oss << "----";
// oss << "----";
oss
<<
" Effect:"
<<
setw
(
2
);
oss
<<
" Effect:"
<<
setw
(
2
);
if
(
_nCurrEffectInd
>=
0
)
if
(
_nCurrEffectInd
>=
0
)
oss
<<
_vecPlayableEffectInd
[
_nCurrEffectInd
]
oss
<<
_vecPlayableEffectInd
[
_nCurrEffectInd
]
<<
" "
<<
_vecEffects
[
_vecPlayableEffectInd
[
_nCurrEffectInd
]]
->
toString
();
<<
" "
<<
_vecEffects
[
_vecPlayableEffectInd
[
_nCurrEffectInd
]]
->
toString
();
else
else
oss
<<
"--"
;
oss
<<
"--"
;
...
@@ -820,7 +820,7 @@ class Application
...
@@ -820,7 +820,7 @@ class Application
ShowWindow
(
_hWnd
,
SW_SHOW
);
ShowWindow
(
_hWnd
,
SW_SHOW
);
wnd
<<
(
size_t
)
_hWnd
;
wnd
<<
(
size_t
)
_hWnd
;
#elif defined OIS_LINUX_PLATFORM
#elif defined OIS_LINUX_PLATFORM
...
@@ -880,12 +880,12 @@ class Application
...
@@ -880,12 +880,12 @@ class Application
#if defined OIS_LINUX_PLATFORM
#if defined OIS_LINUX_PLATFORM
// This is just here to show that you still receive x11 events,
// This is just here to show that you still receive x11 events,
// as the lib only needs mouse/key events
// as the lib only needs mouse/key events
void
checkX11Events
()
void
checkX11Events
()
{
{
XEvent
event
;
XEvent
event
;
//Poll x11 for events
//Poll x11 for events
while
(
XPending
(
_pXDisp
)
>
0
)
while
(
XPending
(
_pXDisp
)
>
0
)
{
{
...
@@ -950,7 +950,7 @@ class Application
...
@@ -950,7 +950,7 @@ class Application
#if defined OIS_WIN32_PLATFORM
#if defined OIS_WIN32_PLATFORM
MessageBox
(
0
,
ex
.
eText
,
"Exception Raised!"
,
MB_OK
);
MessageBox
(
0
,
ex
.
eText
,
"Exception Raised!"
,
MB_OK
);
#else
#else
cout
<<
endl
<<
"OIS Exception Caught!"
<<
endl
cout
<<
endl
<<
"OIS Exception Caught!"
<<
endl
<<
"
\t
"
<<
ex
.
eText
<<
"[Line "
<<
ex
.
eLine
<<
" in "
<<
ex
.
eFile
<<
"]"
<<
endl
;
<<
"
\t
"
<<
ex
.
eText
<<
"[Line "
<<
ex
.
eLine
<<
" in "
<<
ex
.
eFile
<<
"]"
<<
endl
;
#endif
#endif
}
}
...
@@ -1047,12 +1047,12 @@ bool EventHandler::keyPressed( const KeyEvent &arg )
...
@@ -1047,12 +1047,12 @@ bool EventHandler::keyPressed( const KeyEvent &arg )
case
KC_ESCAPE
:
case
KC_ESCAPE
:
_pApplication
->
stop
();
_pApplication
->
stop
();
break
;
break
;
// Help.
// Help.
case
KC_H
:
case
KC_H
:
_pApplication
->
printHelp
();
_pApplication
->
printHelp
();
break
;
break
;
// Change current joystick.
// Change current joystick.
case
KC_RIGHT
:
case
KC_RIGHT
:
_pEffectMgr
->
selectEffect
(
EffectManager
::
eNone
);
_pEffectMgr
->
selectEffect
(
EffectManager
::
eNone
);
...
@@ -1080,12 +1080,12 @@ bool EventHandler::keyPressed( const KeyEvent &arg )
...
@@ -1080,12 +1080,12 @@ bool EventHandler::keyPressed( const KeyEvent &arg )
case
KC_PGDOWN
:
case
KC_PGDOWN
:
_pJoystickMgr
->
changeMasterGain
(
-
5.0
);
// Percent
_pJoystickMgr
->
changeMasterGain
(
-
5.0
);
// Percent
break
;
break
;
// Toggle auto-center mode.
// Toggle auto-center mode.
case
KC_SPACE
:
case
KC_SPACE
:
_pJoystickMgr
->
changeAutoCenter
();
_pJoystickMgr
->
changeAutoCenter
();
break
;
break
;
default:
default:
cout
<<
"Non mapped key: "
<<
arg
.
key
<<
endl
;
cout
<<
"Non mapped key: "
<<
arg
.
key
<<
endl
;
}
}
...
@@ -1118,14 +1118,14 @@ bool EventHandler::povMoved( const JoyStickEvent &arg, int pov )
...
@@ -1118,14 +1118,14 @@ bool EventHandler::povMoved( const JoyStickEvent &arg, int pov )
int
main
(
int
argc
,
const
char
*
argv
[])
int
main
(
int
argc
,
const
char
*
argv
[])
{
{
cout
<<
endl
cout
<<
endl
<<
"This is a simple command line Force Feedback testing demo ..."
<<
endl
<<
"This is a simple command line Force Feedback testing demo ..."
<<
endl
<<
"All connected joystick devices will be created and if FF Support is found,"
<<
endl
<<
"All connected joystick devices will be created and if FF Support is found,"
<<
endl
<<
"you'll be able to play some predefined variable effects on them."
<<
endl
<<
endl
<<
"you'll be able to play some predefined variable effects on them."
<<
endl
<<
endl
<<
"Note: 1 effect can be played on 1 joystick at a time for the moment."
<<
endl
<<
endl
;
<<
"Note: 1 effect can be played on 1 joystick at a time for the moment."
<<
endl
<<
endl
;
Application
app
(
argc
,
argv
);
Application
app
(
argc
,
argv
);
int
status
=
app
.
initialize
();
int
status
=
app
.
initialize
();
if
(
!
status
)
if
(
!
status
)
...
@@ -1134,7 +1134,7 @@ int main(int argc, const char* argv[])
...
@@ -1134,7 +1134,7 @@ int main(int argc, const char* argv[])
status
=
app
.
run
();
status
=
app
.
run
();
}
}
cout
<<
endl
<<
endl
<<
"Exiting ..."
<<
endl
<<
endl
;
cout
<<
endl
<<
endl
<<
"Exiting ..."
<<
endl
<<
endl
;
#if defined OIS_WIN32_PLATFORM && _DEBUG
#if defined OIS_WIN32_PLATFORM && _DEBUG
...
...
demos/OISConsole.cpp
View file @
01314637
...
@@ -141,7 +141,7 @@ public:
...
@@ -141,7 +141,7 @@ public:
{
{
std
::
cout
.
precision
(
2
);
std
::
cout
.
precision
(
2
);
std
::
cout
.
flags
(
std
::
ios
::
fixed
|
std
::
ios
::
right
);
std
::
cout
.
flags
(
std
::
ios
::
fixed
|
std
::
ios
::
right
);
std
::
cout
<<
std
::
endl
<<
arg
.
device
->
vendor
()
<<
". Orientation # "
<<
index
std
::
cout
<<
std
::
endl
<<
arg
.
device
->
vendor
()
<<
". Orientation # "
<<
index
<<
" X Value: "
<<
arg
.
state
.
mVectors
[
index
].
x
<<
" X Value: "
<<
arg
.
state
.
mVectors
[
index
].
x
<<
" Y Value: "
<<
arg
.
state
.
mVectors
[
index
].
y
<<
" Y Value: "
<<
arg
.
state
.
mVectors
[
index
].
y
<<
" Z Value: "
<<
arg
.
state
.
mVectors
[
index
].
z
;
<<
" Z Value: "
<<
arg
.
state
.
mVectors
[
index
].
z
;
...
@@ -291,34 +291,34 @@ void doStartup()
...
@@ -291,34 +291,34 @@ void doStartup()
windowRect
.
top
=
0
;
windowRect
.
top
=
0
;
windowRect
.
right
=
300
;
windowRect
.
right
=
300
;
windowRect
.
bottom
=
300
;
windowRect
.
bottom
=
300
;
// set the default attributes for the window
// set the default attributes for the window
WindowAttributes
windowAttrs
=
kWindowStandardDocumentAttributes
WindowAttributes
windowAttrs
=
kWindowStandardDocumentAttributes
|
kWindowStandardHandlerAttribute
|
kWindowStandardHandlerAttribute
|
kWindowInWindowMenuAttribute
|
kWindowInWindowMenuAttribute
|
kWindowHideOnFullScreenAttribute
;
|
kWindowHideOnFullScreenAttribute
;
// Create the window
// Create the window
CreateNewWindow
(
kDocumentWindowClass
,
windowAttrs
,
&
windowRect
,
&
mWin
);
CreateNewWindow
(
kDocumentWindowClass
,
windowAttrs
,
&
windowRect
,
&
mWin
);
// Color the window background black
// Color the window background black
SetThemeWindowBackground
(
mWin
,
kThemeBrushBlack
,
true
);
SetThemeWindowBackground
(
mWin
,
kThemeBrushBlack
,
true
);
// Set the title of our window
// Set the title of our window
CFStringRef
titleRef
=
CFStringCreateWithCString
(
kCFAllocatorDefault
,
"OIS Input"
,
kCFStringEncodingASCII
);
CFStringRef
titleRef
=
CFStringCreateWithCString
(
kCFAllocatorDefault
,
"OIS Input"
,
kCFStringEncodingASCII
);
SetWindowTitleWithCFString
(
mWin
,
titleRef
);
SetWindowTitleWithCFString
(
mWin
,
titleRef
);
// Center our window on the screen
// Center our window on the screen
RepositionWindow
(
mWin
,
NULL
,
kWindowCenterOnMainScreen
);
RepositionWindow
(
mWin
,
NULL
,
kWindowCenterOnMainScreen
);
// Install the event handler for the window
// Install the event handler for the window
InstallStandardEventHandler
(
GetWindowEventTarget
(
mWin
));
InstallStandardEventHandler
(
GetWindowEventTarget
(
mWin
));
// This will give our window focus, and not lock it to the terminal
// This will give our window focus, and not lock it to the terminal
ProcessSerialNumber
psn
=
{
0
,
kCurrentProcess
};
ProcessSerialNumber
psn
=
{
0
,
kCurrentProcess
};
TransformProcessType
(
&
psn
,
kProcessTransformToForegroundApplication
);
TransformProcessType
(
&
psn
,
kProcessTransformToForegroundApplication
);
SetFrontProcess
(
&
psn
);
SetFrontProcess
(
&
psn
);
// Display and select our window
// Display and select our window
ShowWindow
(
mWin
);
ShowWindow
(
mWin
);
SelectWindow
(
mWin
);
SelectWindow
(
mWin
);
...
@@ -454,11 +454,11 @@ void checkX11Events()
...
@@ -454,11 +454,11 @@ void checkX11Events()
#if defined OIS_APPLE_PLATFORM
#if defined OIS_APPLE_PLATFORM
void
checkMacEvents
()
void
checkMacEvents
()
{
{
//TODO - Check for window resize events, and then adjust the members of mousestate
//TODO - Check for window resize events, and then adjust the members of mousestate
EventRef
event
=
NULL
;
EventRef
event
=
NULL
;
EventTargetRef
targetWindow
=
GetEventDispatcherTarget
();
EventTargetRef
targetWindow
=
GetEventDispatcherTarget
();
if
(
ReceiveNextEvent
(
0
,
NULL
,
kEventDurationNoWait
,
true
,
&
event
)
==
noErr
)
if
(
ReceiveNextEvent
(
0
,
NULL
,
kEventDurationNoWait
,
true
,
&
event
)
==
noErr
)
{
{
SendEventToEventTarget
(
event
,
targetWindow
);
SendEventToEventTarget
(
event
,
targetWindow
);
...
...
includes/OIS.h
View file @
01314637
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will
This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software.
the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial
Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following
applications, and to alter it and redistribute it freely, subject to the following
restrictions:
restrictions:
1. The origin of this software must not be misrepresented; you must not claim that
1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product,
you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
an acknowledgment in the product documentation would be appreciated but is
not required.
not required.
2. Altered source versions must be plainly marked as such, and must not be
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
3. This notice may not be removed or altered from any source distribution.
...
...
includes/OISConfig.h
View file @
01314637
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will
This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software.
the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial
Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following
applications, and to alter it and redistribute it freely, subject to the following
restrictions:
restrictions:
1. The origin of this software must not be misrepresented; you must not claim that
1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product,
you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
an acknowledgment in the product documentation would be appreciated but is
not required.
not required.
2. Altered source versions must be plainly marked as such, and must not be
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
3. This notice may not be removed or altered from any source distribution.
...
@@ -25,11 +25,11 @@ restrictions:
...
@@ -25,11 +25,11 @@ restrictions:
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
//* This file contains defines for building certain parts of this Lib
//* This file contains defines for building certain parts of this Lib
//* This file is not meant for External inclusion. However, you can edit this
//* This file is not meant for External inclusion. However, you can edit this
//* file before a build to effect what features are used internally
//* file before a build to effect what features are used internally
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
/**
/**
@remarks
@remarks
These lines have no bearing on internal build of OIS. This is here for
These lines have no bearing on internal build of OIS. This is here for
external build settings. Meaning, changing this does not require a
external build settings. Meaning, changing this does not require a
...
...
includes/OISEvents.h
View file @
01314637
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will
This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software.
the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial
Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following
applications, and to alter it and redistribute it freely, subject to the following
restrictions:
restrictions:
1. The origin of this software must not be misrepresented; you must not claim that
1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product,
you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
an acknowledgment in the product documentation would be appreciated but is
not required.
not required.
2. Altered source versions must be plainly marked as such, and must not be
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
3. This notice may not be removed or altered from any source distribution.
...
...
includes/OISFactoryCreator.h
View file @
01314637
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will
This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software.
the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial
Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following
applications, and to alter it and redistribute it freely, subject to the following
restrictions:
restrictions:
1. The origin of this software must not be misrepresented; you must not claim that
1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product,
you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
an acknowledgment in the product documentation would be appreciated but is
not required.
not required.
2. Altered source versions must be plainly marked as such, and must not be
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
3. This notice may not be removed or altered from any source distribution.
...
...
includes/OISForceFeedback.h
View file @
01314637
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will
This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software.
the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial
Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following
applications, and to alter it and redistribute it freely, subject to the following
restrictions:
restrictions:
1. The origin of this software must not be misrepresented; you must not claim that
1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product,
you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
an acknowledgment in the product documentation would be appreciated but is
not required.
not required.
2. Altered source versions must be plainly marked as such, and must not be
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
3. This notice may not be removed or altered from any source distribution.
...
@@ -49,7 +49,7 @@ namespace OIS
...
@@ -49,7 +49,7 @@ namespace OIS
being the highest possible force level (means no scaling).
being the highest possible force level (means no scaling).
*/
*/
virtual
void
setMasterGain
(
float
level
)
=
0
;
virtual
void
setMasterGain
(
float
level
)
=
0
;
/**
/**
@remarks
@remarks
If using Force Feedback effects, this should be turned off
If using Force Feedback effects, this should be turned off
...
@@ -90,7 +90,7 @@ namespace OIS
...
@@ -90,7 +90,7 @@ namespace OIS
/**
/**
@remarks
@remarks
Get the current load (%, in [0, 100] of the FF device memory
Get the current load (%, in [0, 100] of the FF device memory
*/
*/
virtual
unsigned
short
getFFMemoryLoad
()
=
0
;
virtual
unsigned
short
getFFMemoryLoad
()
=
0
;
...
...
includes/OISInputManager.h
View file @
01314637
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
...
@@ -6,16 +6,16 @@ Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
This software is provided 'as-is', without any express or implied warranty. In no event will
This software is provided 'as-is', without any express or implied warranty. In no event will
the authors be held liable for any damages arising from the use of this software.
the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial
Permission is granted to anyone to use this software for any purpose, including commercial
applications, and to alter it and redistribute it freely, subject to the following
applications, and to alter it and redistribute it freely, subject to the following
restrictions:
restrictions:
1. The origin of this software must not be misrepresented; you must not claim that
1. The origin of this software must not be misrepresented; you must not claim that
you wrote the original software. If you use this software in a product,
you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
an acknowledgment in the product documentation would be appreciated but is
not required.
not required.
2. Altered source versions must be plainly marked as such, and must not be
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
3. This notice may not be removed or altered from any source distribution.
...
@@ -56,7 +56,7 @@ namespace OIS
...
@@ -56,7 +56,7 @@ namespace OIS
/**
/**
@remarks
@remarks
Creates appropriate input system dependent on platform.
Creates appropriate input system dependent on platform.
@param winHandle
@param winHandle
Contains OS specific window handle (such as HWND or X11 Window)
Contains OS specific window handle (such as HWND or X11 Window)
@returns
@returns
...
@@ -66,7 +66,7 @@ namespace OIS
...
@@ -66,7 +66,7 @@ namespace OIS
/**
/**
@remarks
@remarks
Creates appropriate input system dependent on platform.
Creates appropriate input system dependent on platform.
@param paramList
@param paramList
ParamList contains OS specific info (such as HWND and HINSTANCE for window apps),
ParamList contains OS specific info (such as HWND and HINSTANCE for window apps),
and access mode.
and access mode.
...
@@ -188,7 +188,7 @@ namespace OIS
...
@@ -188,7 +188,7 @@ namespace OIS
//! OIS Version name
//! OIS Version name
const
std
::
string
m_VersionName
;
const
std
::
string
m_VersionName
;
//! FactoryCreator list
//! FactoryCreator list
FactoryList
mFactories
;
FactoryList
mFactories
;
//! Factory created objects - useful so we can find creator to send destruction request to
//! Factory created objects - useful so we can find creator to send destruction request to
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment