diff -Naurw include/ICameraSceneNode.h include/ICameraSceneNode.h --- include/ICameraSceneNode.h 2005-08-20 22:17:44.000000000 +0200 +++ include/ICameraSceneNode.h 2005-09-30 09:03:56.000000000 +0200 @@ -8,12 +8,33 @@ #include "SViewFrustrum.h" #include "ISceneNode.h" #include "IEventReceiver.h" +#include "SKeyMap.h" namespace irr { namespace scene { + struct SCamEventMap + { + SCamEventMap() {}; + SCamEventMap( EKEY_ACTION action, EKEY_CODE key ) : Action(action) + { + Event.EventType = EET_KEY_INPUT_EVENT; + Event.KeyInput.Key = key; + } + + SCamEventMap( EKEY_ACTION action, EMOUSE_INPUT_EVENT mouse ) : Action(action) + { + Event.EventType = EET_KEY_INPUT_EVENT; + Event.MouseInput.Event = mouse; + } + + EKEY_ACTION Action; + SEvent Event; + + }; + //! Scene Node which is a (controlable) camera. /** The whole scene will be rendered from the cameras point of view. Because the ICameraScenNode diff -Naurw include/SEventMap.h include/SEventMap.h --- include/SEventMap.h 1970-01-01 01:00:00.000000000 +0100 +++ include/SEventMap.h 2005-09-30 08:13:46.000000000 +0200 @@ -0,0 +1,43 @@ +// Copyright (C) 2002-2005 Nikolaus Gebhardt +// This file is part of the "Irrlicht Engine". +// For conditions of distribution and use, see copyright notice in irrlicht.h + +#ifndef __S_EVENT_MAP_H_INCLUDED__ +#define __S_EVENT_MAP_H_INCLUDED__ + +#include "Keycodes.h" +#include "IEventReceiver.h" + +namespace irr +{ + + //! enumeration for key actions. Used for example in the FPS Camera. + enum EEVENTMAP_ACTION + { + EEMP_MOVE_FORWARD = 0, + EEMP_MOVE_BACKWARD, + EEMP_STRAFE_LEFT, + EEMP_STRAFE_RIGHT, + EEMP_ROTATE_LEFT, + EEMP_ROTATE_RIGHT, + EEMP_ROTATE_UP, + EEMP_ROTATE_DOWN, + EEMP_ROLL_RIGHT, + EEMP_ROLL_LEFT, + EEMP_COUNT, + + //! This value is not used. It only forces this enumeration to compile in 32 bit. + EEMP_FORCE_32BIT = 0x7fffffff + }; + + //! Struct storing which key belongs to which action. + struct SEventMap + { + EKEY_ACTION Action; + EKEY_CODE KeyCode; + }; + +} // end namespace + +#endif // __S_EVENT_MAP_H_INCLUDED__ + diff -Naurw include/SKeyMap.h include/SKeyMap.h --- include/SKeyMap.h 2005-08-20 22:17:44.000000000 +0200 +++ include/SKeyMap.h 2005-09-30 08:00:02.000000000 +0200 @@ -17,6 +17,12 @@ EKA_MOVE_BACKWARD, EKA_STRAFE_LEFT, EKA_STRAFE_RIGHT, + EKA_ROTATE_LEFT, + EKA_ROTATE_RIGHT, + EKA_ROTATE_UP, + EKA_ROTATE_DOWN, + EKA_ROLL_RIGHT, + EKA_ROLL_LEFT, EKA_COUNT, //! This value is not used. It only forces this enumeration to compile in 32 bit.