ScreenFPS2.h

Go to the documentation of this file.
00001 #ifndef _SCREEN_FPS2_H
00002 #define _SCREEN_FPS2_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 #include "MercuryDynTex.h"
00011 
00012 class ScreenFPS2 : public ScreenOutdoors
00013 {
00014 public:
00015     ScreenFPS2( ) { }
00016     ScreenFPS2( const MString & name ):ScreenOutdoors( name ) { m_name = name; }
00017     virtual ~ScreenFPS2();
00018 
00019     virtual void Init();
00020     virtual void Update( const float dTime );
00021     virtual void Message( int Message, PStack & data, const MString &name );
00022     virtual bool Command( PStack & ret, const char * command, PStack & args );
00023     CLASS_RTTI( ScreenFPS2, ScreenOutdoors );
00024 private:
00025     void CalculateLook(int x, int y, MercuryODEObject* control);
00026     void TweenCamera(int x, int y, MercuryODEObject* control);
00027     void CalculateMovement(MercuryODEObject* control);
00028     void PlayRobotAnimations(int dx);
00029 
00030     MercuryINI          m_pINI;
00031     MercuryLoadableModel m_pPlayer;
00032     MercuryODEWorld     m_pWorld;
00033     MercuryCamera       m_fCamera;
00034     MercuryPoint        pTarget;    //Where the robot is pointing relative to itself
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     Projectile          pPhysics;
00047     int                 iPhysicsObject;
00048     float               fClosestPhysicsObject;
00049 
00050     MercuryPoint        pLookAt;
00051     bool                m_bFirstUpdate;
00052     int                 m_iSlidingF;
00053     float               m_fTimeSinceLastShot;
00054     
00055     float               m_fForwardMovement;
00056     MVector< MercuryLoadableModel::LoadableModelAnimationInfo > pTweenCommands;
00057 
00058     bool                m_bFPS;
00059 
00060     bool m_fistExplosion;
00061     bool m_donefirst;
00062 
00063     float m_slowDown;
00064 
00065     MercuryDynTex       m_DynTex;
00066 };
00067 
00068 #endif
00069 
00070 /* 
00071  * Copyright (c) 2006-2007, Charles Lohr
00072  * All rights reserved.
00073  *
00074  * Redistribution and use in source and binary forms, with or
00075  * without modification, are permitted provided that the following
00076  * conditions are met:
00077  *  -   Redistributions of source code must retain the above
00078  *      copyright notice, this list of conditions and the following disclaimer.
00079  *  -   Redistributions in binary form must reproduce the above copyright
00080  *      notice, this list of conditions and the following disclaimer in
00081  *      the documentation and/or other materials provided with the distribution.
00082  *  -   Neither the name of the Mercury Engine nor the names of its
00083  *      contributors may be used to endorse or promote products derived from
00084  *      this software without specific prior written permission.
00085  *
00086  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00087  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00088  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00089  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
00090  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00091  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00092  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00093  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00094  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
00095  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00096  */

Hosted by SourceForge.net Logo