00001 #ifndef _SCREEN_FPS_H
00002 #define _SCREEN_FPS_H
00003
00004 #include "ScreenOutdoors.h"
00005 #include "MercuryLight.h"
00006 #include "MercuryODE.h"
00007 #include "MercuryCamera.h"
00008 #include "ODEProjectile.h"
00009 #include "MercuryLoadableModel.h"
00010
00011 class ScreenFPS : public ScreenOutdoors
00012 {
00013 public:
00014 ScreenFPS( ) { }
00015 ScreenFPS( const MString & name ):ScreenOutdoors( name ) { m_name = name; }
00016 virtual ~ScreenFPS();
00017
00018 virtual void Init();
00019 virtual void Update( const float dTime );
00020 virtual void Message( int Message, PStack & data, const MString &name );
00021 virtual bool Command( PStack & ret, const char * command, PStack & args );
00022 CLASS_RTTI( ScreenFPS, ScreenOutdoors );
00023 private:
00024 void CalculateLook(int x, int y, MercuryODEObject* control);
00025 void TweenCamera(int x, int y, MercuryODEObject* control);
00026 void CalculateMovement(MercuryODEObject* control);
00027 void PlayRobotAnimations(int dx);
00028 void ObjectHit(const MercuryPoint& position, dBodyID id, const MercuryPoint& ray);
00029
00030 MercuryINI m_pINI;
00031 MercuryLoadableModel m_pPlayer;
00032 MercuryODEWorld m_pWorld;
00033 MercuryCamera m_fCamera;
00034 MercuryPoint pTarget;
00035 MercuryPoint m_pGun;
00036 Projectile pBullet;
00037
00038 MercurySprite m_sprCrosshairsCenter;
00039 MercurySprite m_sprCrosshairs;
00040 VirtualProjectile m_Aimer;
00041 bool m_interactable;
00042 bool m_oldInter;
00043 float fClosestAimerObject;
00044 MercuryPoint m_aimPos;
00045
00046 float m_closestHitObjectDistance;
00047 dBodyID m_closestHitObject;
00048 MercuryPoint m_closestHitPosition;
00049 MercuryPoint m_closestHitRay;
00050 bool m_runObjectHitCode;
00051
00052
00053
00054 Projectile pPhysics;
00055 int iPhysicsObject;
00056 float fClosestPhysicsObject;
00057
00058 MercuryPoint pLookAt;
00059 bool m_bFirstUpdate;
00060 int m_iSlidingF;
00061 float m_fTimeSinceLastShot;
00062
00063 float m_fForwardMovement;
00064 MVector< MercuryLoadableModel::LoadableModelAnimationInfo > pTweenCommands;
00065
00066 bool m_bFPS;
00067
00068 bool m_fistExplosion;
00069 bool m_donefirst;
00070
00071 float m_slowDown;
00072 };
00073
00074 #endif
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102