Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

joypad.cpp

Go to the documentation of this file.
00001 /*
00002  *  JoyPad.cpp - Pen base Joystick driver
00003  *
00004  *  (c) 1999-2000 Alfred E. Heggestad & Jal Panvel
00005  */
00006 
00007 #include "joypad.h"
00008 
00009 CJoyPadObserver::CJoyPadObserver()
00010 //
00011 // Constructor
00012 //
00013 {
00014 
00015         iJoyPadState = EJoyPadDefault;
00016 }
00017 
00018 TInt CJoyPadObserver::GetJoyPadState()
00019 //
00020 // Get the joypad state
00021 //
00022 {
00023 
00024         return iJoyPadState;
00025 }
00026 
00027 void CJoyPadObserver::SetJoyPadButtonState(TJoyPadButtonState aJoyPadButtonState)
00028 //
00029 // Set the joypad button state
00030 //
00031 {
00032 
00033         if (aJoyPadButtonState == EJoyPadButtonDown)
00034                 iJoyPadState &= aJoyPadButtonState;
00035         else
00036                 iJoyPadState |= aJoyPadButtonState;
00037 }
00038 
00039 void CJoyPadObserver::SetJoyPadState(TJoyPadState aJoyPadState)
00040 //
00041 // Set the joypad state
00042 //
00043 {
00044 
00045         if (iJoyPadState & EJoyPadButtonDown)
00046                 iJoyPadState = aJoyPadState & EJoyPadButtonDown;
00047         else
00048                 iJoyPadState = aJoyPadState;
00049 }
00050 
00051 // EOF - JoyPad.cpp

Generated on Tue Feb 8 04:07:56 2005 for E32frodo by doxygen 1.3.3