creation.h

00001 /*--License:
00002         Lilith 3D Engine
00003         Copyright Lee Thomason (Grinning Lizard Software) 2002-2003
00004         www.grinninglizard.com/lilith
00005 
00006         This program is free software; you can redistribute it and/or
00007         modify it under the terms of the GNU General Public License
00008         as published by the Free Software Foundation; either version 2
00009         of the License, or (at your option) any later version.
00010 
00011         This program is distributed in the hope that it will be useful,
00012         but WITHOUT ANY WARRANTY; without even the implied warranty of
00013         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014         GNU General Public License for more details.
00015 
00016         You should have received a copy of the GNU General Public License
00017         along with this program; if not, write to the Free Software
00018         Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 
00020         The full text of the license can be found in license.txt
00021 */
00022 
00052 /*  @page Demo control keys
00053         F1      Shader rendering. Lilith's highest quality and highest performing rendering
00054             mode. Requires reasonable shader support. (RENDER_SHADER)
00055 
00056         F3      Pather rendering shows pathfinding. (RENDER_PATH)
00057 
00058         F4      Level of Detail Rendering (RENDER_LOD)
00059 
00060         F5      Toggle Sun beween "normal", "high noon", and "morning".
00061 
00062         F7      Toggle Butt-Cam, the view from behind the main player.
00063 
00064         F8      Toggle profiling display
00065 
00066         F9, 'l' Render shadow volumes - a debugging mode.
00067 
00068         F10, 'h' Toggle shadow rendering.
00069 
00070         Keypad 7,8,9    (Decrease, 0, Increase) Rain
00071 
00072         Keypad 4,5,6    (Decrease, 0, Increase) Fog
00073 
00074         1-4 Select model for player.
00075 
00076         's' Player salutes.
00077 
00078         'd' Player is stunned.
00079 
00080         'a' Player shoots or swings a weapon. Note that the next attack
00081                 will not start until the animation plays through.
00082 
00083         Home            Home the camera.
00084 
00085         SpaceBar        Change the action mode.
00086 
00087         Tab                     Screen Capture
00088 */
00089 
00090 #ifndef LILITH_CREATION_INCLUDED
00091 #define LILITH_CREATION_INCLUDED
00092 
00093 #include "terrainmorph.h"
00094 #include "mob.h"
00095 
00096 
00097 class Game : public lilith3d::FlattenMorphListener, 
00098                          public lilith3d::BuildingMorphListener,
00099                          public lilith3d::BlasterListener
00100 {
00101   public:
00102 
00103         enum {
00104                 MOVE_MOB_MODE,
00105                 TERRAIN_MODE,
00106                 BRIDGE_MODE,
00107                 BUILD_MODE,
00108                 MODE_COUNT
00109         };
00110 
00111         Game( lilith3d::Lilith3D* );
00112         ~Game();
00113 
00114         virtual bool BlasterHit( lilith3d::BlasterSequence* blaster, const lilith3d::LilithObject& hit );
00115         virtual void BuildingMorphDone( lilith3d::BuildingMorph* flatten, lilith3d::BuildingMesh* placed );
00116         virtual void FlattenDone( lilith3d::FlattenMorph* flatten );
00117         
00118         // Change the 'player' walker to something else.
00119         void SwitchWalker( const lilith3d::MD2Resource* res );
00120 
00121         int Mode() { return mode; }
00122         int SetMode( int m );
00123 
00124         void EventLoop();
00125 
00126   private:
00127 
00128         void ProcessWalkers();
00129         void Click( const lilith3d::LilithObjectList& objList, bool left, bool shift );
00130         void Create9Test( float x, float y, float z );
00131 
00132         int mode;
00133         bool buttCam;
00134         lilith3d::Lilith3D* lilith;
00135         grinliz::Vector3F startBridge;
00136 
00137         std::vector< lilith3d::BuildingMesh* > building;
00138         std::vector< lilith3d::WalkingMob* > walker;
00139         lilith3d::WalkingMob* walkingMob;
00140         std::vector< lilith3d::Mesh* > testMesh;
00141 };
00142 
00143 
00144 #endif

Generated on Fri Mar 23 19:36:21 2007 for Lilith3D by  doxygen 1.5.1-p1