Page principale | Liste des namespaces | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Membres des namespaces | Composants | Déclarations

ExManagerLoad.h

Aller à la documentation de ce fichier.
00001 /************************************************************************/
00002 /* Ex Nihlo Engine by Hermanns Christophe                                                               */
00003 /************************************************************************/
00004 /* This program is free software; you can redistribute it and/or                */
00005 /* modify it under the terms of the GNU General Public License                  */
00006 /* as published by the Free Software Foundation; either version 2               */
00007 /* of the License, or (at your option) any later version.                               */
00008 /*                                                                                                                                              */
00009 /* This program is distributed in the hope that it will be useful,              */
00010 /* but WITHOUT ANY WARRANTY; without even the implied warranty of               */
00011 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                                 */
00012 /*                                                                                                                                              */
00013 /* See the GNU General Public License for more details.                                 */
00014 /*                                                                                                                                              */
00015 /* You should have received a copy of the GNU General Public License    */
00016 /* along with this program; if not, write to the Free Software                  */
00017 /* Foundation, Inc., 59 Temple Place - Suite 330,                                               */
00018 /* Boston, MA  02111-1307, USA.                                                                                 */
00019 /*                                                                                                                                              */
00020 /* If you use a important part of this code please send me a mail               */
00021 /* I just want to see where my code go thks :)                                                  */
00022 /************************************************************************/
00023 
00024 /************************************************************************/
00025 /* Contact                                                              */  
00026 /************************************************************************/
00027 /* ExNihilo Website :www.ploksoftware.org                               */
00028 /*                                                                      */
00029 /* Hermanns Christophe ExNihilo creator and main programmer             */
00030 /*                                                                      */
00031 /* Mail             : Data@ploksoftware.org                                                             */
00032 /* ICQ              : 8030901                                                                                   */
00033 /* MSN Messenger    : Data_7@hotmail.com                                                                */
00034 /*                                                                      */
00035 /*                                                                      */
00036 /************************************************************************/
00037 
00038 /************************************************************************/
00039 /* File Description                                                                                             */
00040 /************************************************************************/
00041 /* File Name   :ExManagerLoad.h                                                                                 */
00042 /*                                                                                                                                              */
00043 /* Start Date   :03/15/2002                                                                                             */
00044 /*                                                                                                                                              */
00045 /* Last Update :06/20/2003                                              */
00046 /*                                                                                                                                              */
00047 /* File Description :                                                                                                   */
00048 /*                                                                      */
00049 /* For update of this file check : www.ploksoftware.org                 */
00050 /************************************************************************/
00051 
00052 #ifndef __EXMANAGERLoad_H__
00053 #define __EXMANAGERLoad_H__
00054 //------------------------------------------------------------------------
00055 //Includes
00056 //------------------------------------------------------------------------
00057 #include "ExDefine.h"
00058 #include "ExNihiloNameSpace.h"
00059 //------------------------------------------------------------------------
00060 #include "Math/ExMath.h"
00061 //------------------------------------------------------------------------
00062 #include "Manager/ExManager.h"
00063 #include "Manager/ExManagerConsole.h"
00064 #include "Manager/ExManagerSpecialEffect.h"
00065 #include "Manager/ExManagerMap.h"
00066 //------------------------------------------------------------------------
00067 #include "Manager/ManagerObject/ExManagerInterface.h"
00068 #include "Manager/ManagerObject/ExManagerSpirit.h"
00069 #include "Manager/ManagerObject/ExManagerAnimation.h"
00070 #include "Manager/ManagerObject/ExManagerCamera.h"
00071 #include "Manager/ManagerObject/ExManagerModele.h"
00072 #include "Manager/ManagerObject/ExManagerGizmo.h"
00073 #include "Manager/ManagerObject/ExManagerParticuleSystem.h"
00074 #include "Manager/ManagerObject/ExManagerLight.h"
00075 #include "Manager/ManagerObject/ExManagerVertexProgram.h"
00076 #include "Manager/ManagerObject/ExManagerObjectWindow.h"
00077 #include "Manager/ManagerObject/ExManagerMesh.h"
00078 #include "Manager/ManagerObject/ExManagerSound.h"
00079 #include "Manager/ManagerObject/ExManagerTexture.h"
00080 #include "Manager/ManagerObject/ExManagerEntity.h"
00081 //------------------------------------------------------------------------
00082 #include "Object/Object2D/ExCLoadingAnimation.h"
00083 //------------------------------------------------------------------------
00084 enum FileType
00085 {
00086         FILE_CONSOL,//.csl
00087         FILE_COMMAND,//.comd .exec 
00088         FILE_SET,//.set
00089         FILE_SOUND,//.wav .mid . mp3
00090         FILE_MODEL,//.asc .ase .3ds .md2 .md3 .exm .obj
00091         FILE_MAP,//.map .bsp .hgmp .skyb
00092         FILE_PARTICUL,//.part
00093         FILE_WINDOW,//.exw
00094         FILE_INTERFACE,//.int
00095         FILE_TEXTURE,//.bmp .tga .pcx .jpg .rgb .raw .ppm .dds
00096         FILE_LOADING_ANIMATION,//.lanim
00097         FILE_MESH,//.Mesh
00098         FILE_ANIMATION,//.anim
00099         FILE_ENTITY,//.ent
00100         FILE_UNKNOWN_TYPE
00101 };
00102 //------------------------------------------------------------------------
00103 class ExManagerLoad  : public ExManagerObject<ExCLoadingAnimation> 
00104 {
00105 private:
00106 //------------------------------------------------------------------------
00107 // Variable
00108 //------------------------------------------------------------------------
00109         ExManagerAnimation                      *ManagerAnimation;
00110         ExManagerWindow                         *ManagerWindow;
00111         ExManagerConsole                        *ManagerConsole;
00112         ExManagerInterface                      *ManagerInterface;
00113         ExManagerSpirit                         *ManagerSpirit;
00114         ExManagerMap                            *ManagerMap;
00115         ExManagerCamera                         *ManagerCamera;
00116         ExManagerModel                          *ManagerModel;
00117         ExManagerGizmo                          *ManagerGizmo;
00118         ExManagerParticuleSystem        *ManagerParticuleSystem;
00119         ExManagerLight                          *ManagerLight;
00120         ExManagerVertexProgram          *ManagerVertexProgram;
00121         ExManagerObjectWindow           *ManagerObjectWindow;
00122         ExManagerSpecialEffect          *ManagerSpecialEffect;
00123         ExManagerMesh                           *ManagerMesh;
00124         ExManagerSound                          *ManagerSound;
00125         ExManagerTexture                        *ManagerTexture;
00126         ExManagerEntity                         *ManagerEntity;
00127 
00128 
00129         std::string                                     m_EntityFilePath;
00130 //------------------------------------------------------------------------
00131         FileType GetFileType(std::string FileName);
00132         bool                                                    m_Loading;
00133         bool                                                    m_Draw;
00134 
00135         std::vector<std::string>                m_VecFileToLoad;
00136         int                                                             m_CurrentFileLoading;
00137 
00138         ExCLoadingAnimation                             *m_CurrentLoadingAniamtion;
00139 //------------------------------------------------------------------------
00140 // Singleton creation
00141 //------------------------------------------------------------------------
00142         static bool m_flag; 
00143         static ExManagerLoad *m_instance;
00144         ExManagerLoad(void);
00145         ~ExManagerLoad(void);
00146 public:
00147 //------------------------------------------------------------------------
00148 // Methode
00149 //------------------------------------------------------------------------
00150         static ExManagerLoad*  CreateSingleton(void);
00151 
00152         inline void SetManagerAnim(ExManagerAnimation *Anim){ManagerAnimation = Anim;}
00153         inline void SetManagerConsole(ExManagerConsole * Console){ManagerConsole=Console;}
00154         inline void SetManagerInterface(ExManagerInterface * Interface){ManagerInterface=Interface;}
00155         inline void SetManagerSpirit(ExManagerSpirit * Spirit){ManagerSpirit=Spirit;}
00156         inline void SetManagerMap(ExManagerMap *Map){ManagerMap = Map;}
00157         inline void SetManagerCamera(ExManagerCamera *Cam){ManagerCamera = Cam;}
00158         inline void SetManagerModel(ExManagerModel *Model){ManagerModel = Model;}
00159         inline void SetManagerGizmo(ExManagerGizmo *Gizmo){ManagerGizmo = Gizmo;}
00160         inline void SetManagerParticuleSystem(ExManagerParticuleSystem *ParticuleSystem){ManagerParticuleSystem = ParticuleSystem;}
00161         inline void SetManagerLight(ExManagerLight *Light){ManagerLight = Light;}
00162         inline void SetManagerVertexProgram(ExManagerVertexProgram *VertexProgram){ManagerVertexProgram = VertexProgram;}
00163         inline void SetManagerObjectWindow(ExManagerObjectWindow *ObjectWindow){ManagerObjectWindow = ObjectWindow;}
00164         inline void SetManagerSpecialEffect(ExManagerSpecialEffect *SpecialEffect){ManagerSpecialEffect = SpecialEffect;}
00165         inline void SetManagerMesh(ExManagerMesh *Mesh){ManagerMesh = Mesh;}
00166         inline void SetManagerSound(ExManagerSound * Sound){ManagerSound=Sound;}
00167         inline void SetManagerTexture(ExManagerTexture * Texture){ManagerTexture=Texture;}
00168         inline void SetManagerEntity(ExManagerEntity * Entity){ManagerEntity=Entity;}
00169 
00170         void Reset(void);
00171         void Init(void);
00172         void Load(std::string FileName);
00173         void LoadAnimationFile(std::string FileName);
00174         void LoadSetOfFile(std::string FileName);
00175         ExCAction InputCommand(ExCCommand Command);
00176         ExCAction InputAction(ExCAction Action);
00177 
00178         void DisplayFileType(void);
00179         void Draw(void);
00180         void DrawInAnimation(void);
00181 };
00182 //------------------------------------------------------------------------
00183 #endif //__EXMANAGERLoad_H__

Généré le Tue Oct 28 12:43:36 2003 pour ExNihilo par doxygen 1.3.4