OpenBarnyard
 
Loading...
Searching...
No Matches
TInputDeviceMouse.cpp
Go to the documentation of this file.
1#include "ToshiPCH.h"
2#include "TInputDeviceMouse.h"
3
4//-----------------------------------------------------------------------------
5// Enables memory debugging.
6// Note: Should be the last include!
7//-----------------------------------------------------------------------------
9
11
13
14// $Barnyard: FUNCTION 006c40d0
18
19// $Barnyard: FUNCTION 006c40f0
23
24// $Barnyard: FUNCTION 006c4100
26{
27 if ( a_iDoodad < 0x30000 || AXIS_WHEEL < a_iDoodad )
28 {
29 return TFALSE;
30 }
31
32 switch ( a_iDoodad )
33 {
34 case AXIS_CURSOR:
35 props.m_iUnk = 2;
36 props.m_bFlag = TFALSE;
37 break;
38 case AXIS_WHEEL:
39 props.m_iUnk = 1;
40 props.m_bFlag = TFALSE;
41 break;
42 default:
43 props.m_iUnk = 0;
44 props.m_bFlag = TFALSE;
45 }
46
47 return TTRUE;
48}
49
50// $Barnyard: FUNCTION 006c4160
52{
53 switch ( a_iDoodad )
54 {
55 case 0x30001:
56 return "BUTTON_1";
57 case 0x30002:
58 return "BUTTON_2";
59 case 0x30003:
60 return "BUTTON_3";
61 case 0x30004:
62 return "BUTTON_4";
63 case 0x30005:
64 return "BUTTON_5";
65 case 0x30006:
66 return "BUTTON_6";
67 case 0x30007:
68 return "BUTTON_7";
69 case 0x30008:
70 return "BUTTON_8";
71 case 0x30009:
72 return "BUTTON_WHEEL_FORWARD";
73 case 0x3000A:
74 return "BUTTON_WHEEL_BACKWARD";
75 case 0x3000B:
76 return "AXIS_CURSOR";
77 case 0x3000C:
78 return "AXIS_WHEEL";
79 default:
80 return "UNKNOWN";
81 }
82}
83
Mouse input device for the Toshi engine.
#define TOSHI_NAMESPACE_START
Definition Defines.h:47
#define TOSHI_NAMESPACE_END
Definition Defines.h:50
#define TDEFINE_CLASS_NORUNTIME(...)
Definition TObject.h:138
char TCHAR
Definition Typedefs.h:20
#define TFALSE
Definition Typedefs.h:24
#define TTRUE
Definition Typedefs.h:25
bool TBOOL
Definition Typedefs.h:6
virtual const TCHAR * GetButtonFromDoodad(Doodad a_iDoodad) const override
virtual TBOOL GetDoodadProperties(Doodad a_iDoodad, TInputDevice::DoodadProperties &props) const override