From b2805409566af00bc15639494f5a186fbd2f16e6 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Fri, 9 Dec 2011 20:15:42 +0000 Subject: More indenting changes --- nGenEx/MotionController.h | 170 +++++++++++++++++++++++----------------------- 1 file changed, 85 insertions(+), 85 deletions(-) (limited to 'nGenEx/MotionController.h') diff --git a/nGenEx/MotionController.h b/nGenEx/MotionController.h index b6eab6f..0c5a78a 100644 --- a/nGenEx/MotionController.h +++ b/nGenEx/MotionController.h @@ -1,15 +1,15 @@ /* Project nGenEx - Destroyer Studios LLC - Copyright © 1997-2004. All Rights Reserved. + Destroyer Studios LLC + Copyright © 1997-2004. All Rights Reserved. - SUBSYSTEM: nGenEx.lib - FILE: MotionController.h - AUTHOR: John DiCamillo + SUBSYSTEM: nGenEx.lib + FILE: MotionController.h + AUTHOR: John DiCamillo - OVERVIEW - ======== - Abstract MotionController class (hides details of Joystick, Keyboard, etc.) + OVERVIEW + ======== + Abstract MotionController class (hides details of Joystick, Keyboard, etc.) */ #ifndef MoCon_h @@ -19,18 +19,18 @@ struct KeyMapEntry { - static const char* TYPENAME() { return "KeyMapEntry"; } + static const char* TYPENAME() { return "KeyMapEntry"; } - KeyMapEntry() : act(0), key(0), alt(0), joy(0) { } - KeyMapEntry(int a, int k, int s=0, int j=0) : act(a), key(k), alt(s), joy(j) { } + KeyMapEntry() : act(0), key(0), alt(0), joy(0) { } + KeyMapEntry(int a, int k, int s=0, int j=0) : act(a), key(k), alt(s), joy(j) { } - int operator==(const KeyMapEntry& k) const { return act==k.act && key==k.key && alt==k.alt && joy==k.joy; } - int operator!=(const KeyMapEntry& k) const { return !(*this==k); } + int operator==(const KeyMapEntry& k) const { return act==k.act && key==k.key && alt==k.alt && joy==k.joy; } + int operator!=(const KeyMapEntry& k) const { return !(*this==k); } - int act; - int key; - int alt; - int joy; + int act; + int key; + int alt; + int joy; }; // +--------------------------------------------------------------------+ @@ -155,76 +155,76 @@ const int KEY_POV_3_RIGHT = 0x1FF; class MotionController { public: - static const char* TYPENAME() { return "MotionController"; } - - MotionController() - : status(StatusOK), sensitivity(1), dead_zone(0), - swapped(0), inverted(0), rudder(0), throttle(0), select(0) { } - - virtual ~MotionController() { } - - enum StatusValue { StatusOK, StatusErr, StatusBadParm }; - enum ActionValue { MaxActions = 32 }; - - StatusValue Status() const { return status; } - int Sensitivity() const { return sensitivity; } - int DeadZone() const { return dead_zone; } - int Swapped() const { return swapped; } - int Inverted() const { return inverted; } - int RudderEnabled() const { return rudder; } - int ThrottleEnabled() const { return throttle; } - int Selector() const { return select; } - - - // setup: - virtual void SetSensitivity(int sense, int dead) - { - if (sense > 0) sensitivity = sense; - if (dead > 0) dead_zone = dead; - } - - virtual void SetSelector(int sel) { select = sel; } - virtual void SetRudderEnabled(int rud) { rudder = rud; } - virtual void SetThrottleEnabled(int t) { throttle = t; } - - virtual void SwapYawRoll(int swap) { swapped = swap; } - virtual int GetSwapYawRoll() { return swapped; } - virtual void InvertPitch(int inv) { inverted = inv; } - virtual int GetInverted() { return inverted; } - - virtual void MapKeys(KeyMapEntry* mapping, int nkeys) { } - - // sample the physical device - virtual void Acquire() { } - - // translations - virtual double X() { return 0; } - virtual double Y() { return 0; } - virtual double Z() { return 0; } - - // rotations - virtual double Pitch() { return 0; } - virtual double Roll() { return 0; } - virtual double Yaw() { return 0; } - virtual int Center() { return 0; } - - // throttle - virtual double Throttle() { return 0; } - virtual void SetThrottle(double t) { } - - // actions - virtual int Action(int n) { return 0; } - virtual int ActionMap(int n) { return 0; } + static const char* TYPENAME() { return "MotionController"; } + + MotionController() + : status(StatusOK), sensitivity(1), dead_zone(0), + swapped(0), inverted(0), rudder(0), throttle(0), select(0) { } + + virtual ~MotionController() { } + + enum StatusValue { StatusOK, StatusErr, StatusBadParm }; + enum ActionValue { MaxActions = 32 }; + + StatusValue Status() const { return status; } + int Sensitivity() const { return sensitivity; } + int DeadZone() const { return dead_zone; } + int Swapped() const { return swapped; } + int Inverted() const { return inverted; } + int RudderEnabled() const { return rudder; } + int ThrottleEnabled() const { return throttle; } + int Selector() const { return select; } + + + // setup: + virtual void SetSensitivity(int sense, int dead) + { + if (sense > 0) sensitivity = sense; + if (dead > 0) dead_zone = dead; + } + + virtual void SetSelector(int sel) { select = sel; } + virtual void SetRudderEnabled(int rud) { rudder = rud; } + virtual void SetThrottleEnabled(int t) { throttle = t; } + + virtual void SwapYawRoll(int swap) { swapped = swap; } + virtual int GetSwapYawRoll() { return swapped; } + virtual void InvertPitch(int inv) { inverted = inv; } + virtual int GetInverted() { return inverted; } + + virtual void MapKeys(KeyMapEntry* mapping, int nkeys) { } + + // sample the physical device + virtual void Acquire() { } + + // translations + virtual double X() { return 0; } + virtual double Y() { return 0; } + virtual double Z() { return 0; } + + // rotations + virtual double Pitch() { return 0; } + virtual double Roll() { return 0; } + virtual double Yaw() { return 0; } + virtual int Center() { return 0; } + + // throttle + virtual double Throttle() { return 0; } + virtual void SetThrottle(double t) { } + + // actions + virtual int Action(int n) { return 0; } + virtual int ActionMap(int n) { return 0; } protected: - StatusValue status; - int sensitivity; - int dead_zone; - int swapped; - int inverted; - int rudder; - int throttle; - int select; + StatusValue status; + int sensitivity; + int dead_zone; + int swapped; + int inverted; + int rudder; + int throttle; + int select; }; #endif MoCon_h -- cgit v1.1