00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __EXMANAGERWINDOW_H__
00025 #define __EXMANAGERWINDOW_H__
00026
00027
00028
00029 #include "ExDefine.h"
00030 #include "ExMath.h"
00031 #include "ExManagerId.h"
00032 #include "ExPredefinedObject.h"
00033 #include "ExCOptions.h"
00034
00035
00036 #define NON_EFFECT 0
00037 #define FADE_TO_WHITE 1
00038 #define WITHE_TO_FADE 2
00039 #define FADE_TO_BLACK 3
00040 #define BLACK_TO_FADE 4
00041
00042 class ExManagerWindow
00043 {
00044 private:
00045
00046
00047
00048 ExManagerId *ManagerId;
00049 ExCOptions *options;
00050
00051 int m_WindowHandler;
00052 int m_WindowSizeX;
00053 int m_WindowSizeY;
00054 int m_WindowSizeXOld;
00055 int m_WindowSizeYOld;
00056 int m_WindowPosX;
00057 int m_WindowPosY;
00058 int m_Bits;
00059 int m_Rate;
00060 bool m_FullScreen;
00061 bool m_OldMode;
00062 char *m_Title;
00063 char *m_IconTitle;
00064 int m_Cursor;
00065
00066 bool m_ShowFps;
00067 bool m_ShowGrille;
00068 bool m_ShowNetStat;
00069 bool m_Antialliasing;
00070 bool m_Menu;
00071 bool m_Console;
00072 bool m_Interface;
00073 bool m_MotionBlur;
00074 bool m_MotionBlurTexture;
00075 uint TextureMotionBlur;
00076
00077 int frame,timeframe,timebase;
00078 char s[30];
00079
00080 int m_effect;
00081 float m_CouterEffect;
00082
00083 public:
00084 void (*GlutCallBack)();
00085
00086
00087
00088 ExManagerWindow(void);
00089 ~ExManagerWindow(void);
00090
00091
00092
00093 std::ostrstream *Consol;
00094 void (*WriteToConsol)(const char *Label);
00095
00096 inline void SetManagerId(ExManagerId *Id){ManagerId = Id;}
00097
00098 void Create(int SizeX,int SizeY,int PosX,int PosY,char *argv);
00099 void Create(int SizeX,int SizeY,char *argv);
00100 void Move(int Posx,int Posy);
00101 void SetResolution(int SizeX,int SizeY);
00102 inline void SetRate(int Rate){m_Rate=Rate;}
00103 inline void SetBits(int Bits){m_Bits=Bits;}
00104 inline void SetFullScreen(bool State){m_FullScreen=State;}
00105 void SetWindowTitle(char *Title);
00106 void SetIconTitle(char *Title);
00107 void SetCursor(int Cursor);
00108 void Apply(void);
00109
00110 inline int GetResolutionX(void){return m_WindowSizeX;}
00111 inline int GetResolutionY(void){return m_WindowSizeY;}
00112 inline int GetRate(void){return m_Rate;}
00113 inline int GetBits(void){return m_Bits;}
00114 inline bool GetFullScreen(void){return m_FullScreen;}
00115
00116 inline void SetFpsState(bool state){m_ShowFps=state;}
00117 inline void SetGrilleState(bool state){m_ShowGrille=state;}
00118 inline void SetNetstatState(bool state){m_ShowNetStat=state;}
00119 void SetAntialliasingState(bool state);
00120 inline void SetMenuState(bool state){m_Menu=state;}
00121 inline void SetConsoleState(bool state){m_Console=state;}
00122 inline void SetInterfaceState(bool state){m_Interface=state;}
00123 inline void SetMotionBlurState(bool state){m_MotionBlur=state;}
00124
00125
00126 inline bool GetFpsState(void){return m_ShowFps;}
00127 inline bool GetGrilleState(void){return m_ShowGrille;}
00128 inline bool GetNetstatState(void){return m_ShowNetStat;}
00129 inline bool GetAntialliasingState(void){return m_Antialliasing;}
00130 inline bool GetMenuState(void){return m_Menu;}
00131 inline bool GetConsoleState(void){return m_Console;}
00132 inline bool GetInterfaceState(void){return m_Interface;}
00133 inline bool GetMotionBlurState(void){return m_MotionBlur;}
00134
00135 void EnterOrthoMode(int left, int top, int right, int bottom);
00136 void LeaveOrthoMode(void);
00137
00138 void ShowFps(void);
00139 void ShowNetStat(void);
00140 void MotionBlur(void);
00141 void CapturForMotionBlur(void);
00142 void Specialeffect(void);
00143 void Reset(void);
00144 void SetSpecialEffect(int effect);
00145
00146
00147
00148
00149
00150
00151 };
00152 #endif //__EXMANAGERWINDOW_H__