00001 /* ScreenMapControllers - Maps device input to instrument buttons. */ 00002 00003 #ifndef SCREEN_MAP_CONTROLLERS_H 00004 #define SCREEN_MAP_CONTROLLERS_H 00005 00006 #include "ScreenWithMenuElements.h" 00007 #include "Sprite.h" 00008 #include "BitmapText.h" 00009 #include "InputMapper.h" 00010 00011 00012 class ScreenMapControllers : public ScreenWithMenuElements 00013 { 00014 public: 00015 ScreenMapControllers( CString sName ); 00016 virtual ~ScreenMapControllers(); 00017 00018 virtual void Update( float fDeltaTime ); 00019 virtual void DrawPrimitives(); 00020 virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); 00021 virtual void HandleScreenMessage( const ScreenMessage SM ); 00022 00023 private: 00024 void KeyLeft(); 00025 void KeyRight(); 00026 void KeyUp(); 00027 void KeyDown(); 00028 void KeyBack(); 00029 void KeyStart(); 00030 00031 void Refresh(); 00032 00033 00034 int m_iCurController; 00035 int m_iCurButton; 00036 int m_iCurSlot; 00037 00038 int m_iWaitingForPress; 00039 DeviceInput m_DeviceIToMap; 00040 00041 BitmapText m_textError; 00042 BitmapText m_textName[MAX_GAME_BUTTONS]; 00043 BitmapText m_textName2[MAX_GAME_BUTTONS]; 00044 BitmapText m_textMappedTo[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS][NUM_GAME_TO_DEVICE_SLOTS]; 00045 00046 ActorFrame m_Line[MAX_GAME_BUTTONS]; 00047 }; 00048 00049 #endif 00050 00051 /* 00052 * (c) 2001-2004 Chris Danford 00053 * All rights reserved. 00054 * 00055 * Permission is hereby granted, free of charge, to any person obtaining a 00056 * copy of this software and associated documentation files (the 00057 * "Software"), to deal in the Software without restriction, including 00058 * without limitation the rights to use, copy, modify, merge, publish, 00059 * distribute, and/or sell copies of the Software, and to permit persons to 00060 * whom the Software is furnished to do so, provided that the above 00061 * copyright notice(s) and this permission notice appear in all copies of 00062 * the Software and that both the above copyright notice(s) and this 00063 * permission notice appear in supporting documentation. 00064 * 00065 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00066 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00067 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00068 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00069 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00070 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00071 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00072 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00073 * PERFORMANCE OF THIS SOFTWARE. 00074 */