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  

ExCAction.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 /* Benjamin Michotte Linux port, webmaster                              */
00036 /*                                                                      */
00037 /* Mail             :binny@ploksoftware.org                             */
00038 /*                                                                      */
00039 /************************************************************************/
00040 
00041 /************************************************************************/
00042 /* File Description                                                                                             */
00043 /************************************************************************/
00044 /* File Name   :ExCAction.h                                                                             */
00045 /*                                                                                                                                              */
00046 /* Star Date   :03/15/2002                                                                                              */
00047 /*                                                                                                                                              */
00048 /* Last Update :                                                        */
00049 
00050 
00051 #ifndef __EXCACTION_H__
00052 #define __EXCACTION_H__
00053 //--------------------------------
00054 // File to include
00055 //--------------------------------
00056 #include "ExDefine.h"
00057 //--------------------------------
00058 class ExCAction 
00059 {
00060 protected:
00061 //--------------------------------
00062 // Variable
00063 //--------------------------------
00064 public:
00065         int                                                     m_Action;                       //action id
00066         int                                                     m_ActionNumber;         //action number if there is more than one action chained
00067 
00068         std::vector<std::string>        m_VecParam;                     //vecteur of param
00069 
00070         std::string                                     m_Param;                        //action parameter
00071         std::string                                     m_Param1;                       //action parameter
00072         std::string                                     m_Param2;                       //action parameter
00073                 
00074         double                                          m_StartingLife;         //time when action is create
00075         double                                          m_ExecutingLife;        //time when action will be executed
00076         bool                                            m_executed;                     //flag if action is executed 
00077         
00078         int                                                     m_NumberOfExecution;//-1 if inf 
00079         ExCAction                                       *m_NextAction;  // to next action to chain action
00080 
00081 //--------------------------------
00082 // Constructor // Destructor
00083 //--------------------------------
00084    ExCAction();
00085    ExCAction(const ExCAction& Action);
00086    ExCAction(int Action);
00087    ExCAction(int Action, std::string Param);
00088    ExCAction(int Action, std::string Param, std::string Param1);
00089    ExCAction(int Action, std::string Param, std::string Param1, std::string Param2);
00090    ~ExCAction();
00091 //--------------------------------
00092 // Methode
00093 //--------------------------------
00094    inline void SetParam(std::string Param){m_Param=Param;}
00095    inline void SetParam1(std::string Param){m_Param1=Param;}
00096    inline void SetParam2(std::string Param){m_Param2=Param;}
00097    inline std::string GetParam(void){return m_Param;}
00098    inline std::string GetParam1(void){return m_Param1;}
00099    inline std::string GetParam2(void){return m_Param2;}
00100 
00101    void SetParam(int ParamNumber,std::string Param);
00102 
00103    int  GetParamAsInt(int ParamNumber);
00104    float GetParamAsFloat(int ParamNumber);
00105    std::string GetParam(int ParamNumber);
00106    double  GetParamAsDouble(int ParamNumber);
00107    bool GetParamAsBool(int ParamNumber);
00108    inline int GetNumberParam(void){return (int) m_VecParam.size();}
00109    
00110    bool AllActionDone();
00111    //--------------------------------
00112 // friends
00113 //--------------------------------      
00114         friend std::ostream& operator<<(std::ostream& s,const ExCAction &action);
00115         friend std::ostrstream& operator<<(std::ostrstream& s,const ExCAction &action);
00116 };
00117 //--------------------------------------------------------------
00118 //Action list for manager
00119 //--------------------------------------------------------------
00120 #define START_BASIC_ACTION_MAP                                          30000
00121         #define NOTHING                                                                 0
00122         #define QUIT                                                                    30001
00123         #define RESET                                                                   30002
00124 #define END_BASIC_ACTION_MAP                                            30098
00125 //-----------------------------
00126 //Cammera Action start at 30100
00127 //-----------------------------
00128 #define START_CAMERA_ACTION_MAP                                         30099
00129         #define CAMERA_CURRENT_START_ROTATEX_UP                 30100
00130         #define CAMERA_CURRENT_STOP_ROTATEX_UP                  30101
00131         #define CAMERA_CURRENT_ROTATEX_UP                               30102
00132 
00133         #define CAMERA_CURRENT_START_ROTATEX_DOWN               30103
00134         #define CAMERA_CURRENT_STOP_ROTATEX_DOWN                30104
00135         #define CAMERA_CURRENT_ROTATEX_DOWN                             30105
00136 
00137         #define CAMERA_CURRENT_START_ROTATEY_UP                 30106
00138         #define CAMERA_CURRENT_STOP_ROTATEY_UP                  30107
00139         #define CAMERA_CURRENT_ROTATEY_UP                               30108
00140 
00141         #define CAMERA_CURRENT_START_ROTATEY_DOWN               30109
00142         #define CAMERA_CURRENT_STOP_ROTATEY_DOWN                30110
00143         #define CAMERA_CURRENT_ROTATEY_DOWN                             30111
00144 
00145         #define CAMERA_CURRENT_START_ROTATEZ_UP                 30112
00146         #define CAMERA_CURRENT_STOP_ROTATEZ_UP                  30113
00147         #define CAMERA_CURRENT_ROTATEZ_UP                               30114
00148 
00149         #define CAMERA_CURRENT_START_ROTATEZ_DOWN               30115
00150         #define CAMERA_CURRENT_STOP_ROTATEZ_DOWN                30116
00151         #define CAMERA_CURRENT_ROTATEZ_DOWN                             30117
00152 
00153         #define CAMERA_CURRENT_START_INCREASE_SPEED             30121
00154         #define CAMERA_CURRENT_STOP_INCREASE_SPEED              30122
00155         #define CAMERA_CURRENT_INCREASE_SPEED                   30123
00156 
00157         #define CAMERA_CURRENT_START_DECREASE_SPEED             30124
00158         #define CAMERA_CURRENT_STOP_DECREASE_SPEED              30125
00159         #define CAMERA_CURRENT_DECREASE_SPEED                   30126
00160 
00161         #define CAMERA_CURRENT_FULL_STOP                                30127
00162 
00163         #define CAMERA_NEXT_CAM                                                 30128
00164         #define CAMERA_PREV_CAM                                                 30129
00165         
00166         #define CAMERA_CURRENT_START_INCREASE_ZOOM              30130   
00167         #define CAMERA_CURRENT_STOP_INCREASE_ZOOM               30131
00168         #define CAMERA_CURRENT_INCREASE_ZOOM                    30132
00169         
00170         #define CAMERA_CURRENT_START_DECREASE_ZOOM              30133
00171         #define CAMERA_CURRENT_STOP_DECREASE_ZOOM               30134
00172         #define CAMERA_CURRENT_DECREASE_ZOOM                    30135
00173 
00174         #define CAMERA_SET_POS_X                                                30136
00175         #define CAMERA_SET_POS_Y                                                30137
00176         #define CAMERA_SET_POS_Z                                                30138
00177         #define CAMERA_SET_TARGET_POS_X                                 30139
00178         #define CAMERA_SET_TARGET_POS_Y                                 30140
00179         #define CAMERA_SET_TARGET_POS_Z                                 30141
00180         #define CAMERA_SET_ANGLE_X                                              30142
00181         #define CAMERA_SET_ANGLE_Y                                              30143
00182         #define CAMERA_SET_ANGLE_Z                                              30144
00183 
00184 #define END_CAMERA_ACTION_MAP                                           30198
00185 //-----------------------------
00186 //Sound Action start at 30300   
00187 //-----------------------------
00188 #define START_SOUND_ACTION_MAP                                          30299
00189         #define LIST_SOUND                                                              30300
00190         #define REMOVE_SOUND                                                    30301
00191         #define PLAY_SOUND                                                              30302
00192         #define STOP_SOUND                                                              30303
00193         #define SET_REPEATS_SOUND                                               30304
00194         #define GET_REPEATS_SOUND                                               30305
00195         #define ADD_SOUND                                                               30306
00196 #define END_SOUND_ACTION_MAP                                            30398
00197 //-------------------------------
00198 //Interface Action start at 30400       
00199 //-------------------------------
00200 #define START_INTERFACE_ACTION_MAP                                      30399
00201         #define SHOW_INTERFACE_REGION                                   30400
00202         #define HIDE_INTERFACE_REGION                                   30401
00203         #define LIST_INTERFACE                                                  30402
00204         #define ENABLE_INTERFACE                                                30403
00205         #define DISABLE_INTERFACE                                               30404
00206         #define ADD_INTERFACE                                                   30405
00207         #define ENABLE_ALL_INTERFACE                                    30406
00208         #define DISABLE_ALL_INTERFACE                                   30407
00209 #define END_INTERFACE_ACTION_MAP                                        30498
00210 //-------------------------------
00211 //Map Action start at 30500     
00212 //-------------------------------
00213 #define START_MAP_ACTION_MAP                                            30499
00214         #define SHOW_MAP_SKY_BOX                                                30500
00215         #define HIDE_MAP_SKY_BOX                                                30501
00216         #define SHOW_MAP_MESH                                                   30502
00217         #define HIDE_MAP_MESH                                                   30503
00218         #define ENABLE_MAP_OCTREE                                               30504
00219         #define DISABLE_MAP_OCTREE                                              30505
00220         #define SHOW_MAP_OCTREE_SUBDIVISON                              30506
00221         #define HIDE_MAP_OCTREE_SUBDIVISON                              30507
00222 #define END_MAP_ACTION_MAP                                                      30598
00223 
00224 //-------------------------------
00225 //fog Action start at 30600     
00226 //-------------------------------
00227 #define START_FOG_ACTION_MAP                                            30599
00228         #define ENABLE_FOG                                                              30600
00229         #define DISABEL_FOG                                                             30601
00230         #define SET_FOG_COLOR_R                                                 30602
00231         #define SET_FOG_COLOR_G                                                 30603
00232         #define SET_FOG_COLOR_B                                                 30604
00233         #define SET_FOG_START_POINT                                             30605
00234         #define SET_FOG_END_POINT                                               30606
00235         #define SET_FOG_DENSITY                                                 30607
00236         #define SET_FOG_ALGO_LINEAR                                             30608
00237         #define SET_FOG_ALGO_EXP2                                               30609
00238         #define SET_FOG_ALGO_EXP                                                30610
00239 #define END_FOG_ACTION_MAP                                                      30698
00240 //---------------------------------------
00241 //Particule systeme Action start at 30700       
00242 //---------------------------------------
00243 #define START_PARTICULESYSTEME_ACTION_MAP                       30699
00244         #define LOAD_PARTICULESYSTEME                                   30700
00245         #define STAR_PARTICULESYSTEME                                   30701
00246         #define STOP_PARTICULESYSTEME                                   30702
00247         #define PAUSE_PARTICULESYSTEME                                  30703
00248         #define STAR_ALL_PARTICULESYSTEME                               30704
00249         #define STOP_ALL_PARTICULESYSTEME                               30705
00250         #define PAUSE_ALL_PARTICULESYSTEME                              30706
00251         #define LIST_PARTICULESYSTEME                                   30707
00252 #define END_PARTICULESYSTEME_ACTION_MAP                         30799
00253 
00254 //-----------------------------
00255 //Consol Action start at 30800
00256 //-----------------------------
00257 #define START_CONSOL_ACTION_MAP                                         30800
00258         #define ENABLE_CONSOL_BACKGROUND_TEXTURE                30801
00259         #define DISABLE_CONSOL_BACKGROUND_TEXTURE               30802
00260         #define SET_CONSOL_BACKGROUND_TEXURE                    30803
00261         #define SET_CONSOL_BACKGROUND_COLOR                             30804
00262         #define SET_CONSOL_BACKGROUND_COLOR_BLUE                30805
00263         #define SET_CONSOL_BACKGROUND_COLOR_GREEN               30806
00264         #define SET_CONSOL_BACKGROUND_COLOR_RED                 30807
00265         #define ENABLE_CONSOL_BACKGROUND_BLENDING               30809
00266         #define DISABLE_CONSOL_BACKGROUND_BLENDING              30810
00267         #define SET_CONSOL_BACKGROUND_BLENDING                  30811
00268         #define SHOW_FULL_CONSOL                                                30812
00269         #define SHOW_HALF_CONSOL                                                30813
00270         #define HIDE_CONSOL                                                             30814
00271         #define CONSOL_NEXT_AVIABLE_STATE                               30815
00272         #define CONSOL_LINE_UP                                                  30816
00273         #define CONSOL_LINE_DOWN                                                30817
00274 #define END_CONSOL_ACTION_MAP                                           30899
00275 //-----------------------------
00276 //Model Action start at 30900
00277 //-----------------------------
00278 #define START_MODEL_ACTION_MAP                                          30900
00279         #define LIST                                                                    30901
00280         #define SET_CURRENT_OBJECT_BY_ID                                30902
00281         #define SET_CURRENT_OBJECT_BY_NAME                              30903
00282         #define NEXT_FRAME                                                              30904
00283         #define PREVIOUS_FRAME                                                  30905
00284         #define SET_CURENT_FRAME                                                30906
00285         //---------------------------------------------------
00286         #define TURN_LEFT                                                               30940
00287         #define TURN_RIGHT                                                              30941
00288         #define LOOK_UP                                                                 30942
00289         #define LOOK_DOWN                                                               30943
00290         #define START_RUN                                                               30950
00291         #define STOP_RUN                                                                30951
00292         #define START_ACTION                                                    30952
00293         #define STOP_ACTION                                                             30953
00294         //---------------------------------------------------
00295         #define MODEL_SET_POS_X                                                 30954
00296         #define MODEL_SET_POS_Y                                                 30955
00297         #define MODEL_SET_POS_Z                                                 30956
00298         #define MODEL_SET_ANGLE_X                                               30957
00299         #define MODEL_SET_ANGLE_Y                                               30958
00300         #define MODEL_SET_ANGLE_Z                                               30959
00301         #define MODEL_SET_ACTION                                                30960
00302         #define MODEL_LOAD_WITH_NAME                                    30961
00303         #define MODEL_LOAD                                                              30962
00304 #define END_MODEL_ACTION_MAP                                            30999
00305 
00306 //-----------------------------
00307 //Menu Action start at 31000
00308 //-----------------------------
00309 #define START_MENU_ACTION_MAP                                           31000
00310         #define ENABLE_MENU                                                             31001
00311         #define DISABLE_MENU                                                    31002
00312         #define ENABLE_DISABLE_MENU                                             31003
00313         #define SET_CURRENT_MENU                                                31004
00314 #define END_MENU_ACTION_MAP                                                     31099
00315 
00316 //-----------------------------
00317 //Windo Action start at 31100
00318 //-----------------------------
00319 #define START_WINDOW_ACTION_MAP                                         31100
00320         #define SHOW_FPS_STAT                                                   31101
00321         #define HIDE_FPS_STAT                                                   31102
00322         #define ENABLE_GRIDE                                                    31103
00323         #define DISABLE_GRIDE                                                   31104
00324         #define SWITCH_GRIDE                                                    31105
00325         #define SET_RESOLUTION_800_600_16                               31106
00326         #define SET_RESOLUTION_800_600_24                               31107
00327         #define SET_RESOLUTION_800_600_32                               31108
00328         #define SET_RESOLUTION_1024_768_16                              31109
00329         #define SET_RESOLUTION_1024_768_24                              31110
00330         #define SET_RESOLUTION_1024_768_32                              31111
00331         #define SET_RESOLUTION_1600_1200_16                             31112
00332         #define SET_RESOLUTION_1600_1200_24                             31113
00333         #define SET_RESOLUTION_1600_1200_32                             31114
00334         #define SET_POLYGONMODE_POINTS                                  31115
00335         #define SET_POLYGONMODE_LINES                                   31116
00336         #define SET_POLYGONMODE_FILL                                    31117
00337 #define END_WINDOW_ACTION_MAP                                           31199
00338 
00339 //-----------------------------
00340 //Command Action start at 31200
00341 //-----------------------------
00342 #define START_COMMAND_ACTION_MAP                                        31200
00343         #define LOAD_COMMAND_CONFIG_FILE                                31201
00344         #define LOAD_FILE                                                               31202
00345         #define LOAD_SET_OF_FILE                                                31203
00346         #define LOAD_EXEC_CONFIG_FILE                                   31204
00347         #define LOAD_MODELE_FILE                                                31205
00348         #define LOAD_MAP_FILE                                                   31206
00349         #define LOAD_INTERFACE_FILE                                             31207
00350         #define LOAD_SOUND_FILE                                                 31208
00351         #define LOAD_CONSOLE_CONFIG_FILE                                31209
00352         #define LOAD_PART_CONFIG_FILE                                   31210
00353         #define CHECK_DEVICE                                                    31211   
00354 #define END_COMMAND_ACTION_MAP                                          31299
00355 
00356 //-----------------------------
00357 //NetWork Action start at 31200
00358 //-----------------------------
00359 #define START_NETWORK_ACTION_MAP                                        31300
00360         #define SHOW_NET_STAT                                                   31301
00361         #define HIDE_NET_STAT                                                   31302
00362         #define CONNECT                                                                 31303
00363 #define END_NETWORK_ACTION_MAP                                          31399
00364 
00365 //-----------------------------
00366 //Texture Action start at 31200
00367 //-----------------------------
00368 #define START_TEXTURE_ACTION_MAP                                        31400
00369         #define LIST_TEXTURE                                                    31401
00370         #define LOAD_TEXTURE                                                    31402
00371         #define UNLOAD_TEXTURE                                                  31403
00372 #define END_TEXTURE_ACTION_MAP                                          31499
00373 
00374 //-----------------------------
00375 //ID Action start at 31200
00376 //-----------------------------
00377 #define START_ID_ACTION_MAP                                                     31500
00378         #define ID_LIST                                                                 31501
00379 #define END_ID_ACTION_MAP                                                       31599
00380 
00381 //-----------------------------
00382 //CUSTOM Action start at 40000
00383 //-----------------------------
00384 #define START_CUSTOM_ACTION_ACTION_MAP                          39999
00385         #define CUSTOM_ACTION_1                                                 40001
00386         #define CUSTOM_ACTION_2                                                 40002
00387         #define CUSTOM_ACTION_3                                                 40003
00388         #define CUSTOM_ACTION_4                                                 40004
00389 #define END_CUSTOM_ACTION_ACTION_MAP                            50000
00390 
00391 //--------------------------------------------------------------
00392 //Action list for object
00393 //--------------------------------------------------------------
00394 #define ROTATE_Z_UP                                                                     60000
00395 #define ROTATE_Y_UP                                                                     60001
00396 #define ROTATE_X_UP                                                                     60002
00397 #define ROTATE_Z_DOWN                                                           60003
00398 #define ROTATE_Y_DOWN                                                           60004
00399 #define ROTATE_X_DOWN                                                           60005
00400 #define ZOOM_UP                                                                         60006
00401 #define ZOOM_DOWN                                                                       60007
00402 #define SPEED_UP                                                                        60008
00403 #define SPEED_DOWN                                                                      60009
00404 #endif //__EXCACTION_H__

Généré le Tue Dec 10 18:18:08 2002 pour ExNihilo par doxygen1.3-rc1