#include <borqueror.h>
Inheritance diagram for Borqueror:


Public Member Functions | |
| Borqueror (const int argc, char **argv) | |
| virtual | ~Borqueror (void) |
| virtual void | GenDefaultCfg (void) |
| virtual void | Init (void) |
| Creates the main frame window. | |
|
||||||||||||
|
Definition at line 40 of file borqueror.cpp.
00041 : ArsApplication( argc , argv ) 00042 { 00043 } |
|
|
Definition at line 45 of file borqueror.cpp.
00046 {
00047 }
|
|
|
Create a ars.cfg file if not already exists and fills it with some predefined information under the section named "Ars":the ksy names "text_color" for default text color under the section named "Ars":the ksy names "back_color" for default background color under the section named "Paths":the ksy names "Fonts" for default font path under the section named "Paths":the ksy names "Dialogs" for default dialog configuration file under the section named "Paths":the ksy names "Menu" for default menu configuration file under the section named "Paths":the ksy names "Images" for default images path Reimplemented from Ars::ArsApplication. Definition at line 49 of file borqueror.cpp. References Cfg::Handler::Flush(), Cfg::GetCfg(), Ars::ArsApplication::scrH, Ars::ArsApplication::scrW, Cfg::Handler::SetCfgColorHex(), Cfg::Handler::SetCfgFile(), Cfg::Handler::SetCfgInt(), and Cfg::Handler::SetCfgString().
00050 {
00051 Cfg::Handler &h = Cfg::GetCfg();
00052
00053 h.SetCfgColorHex( "Ars" , "text_color" , RGBColor( 0x50 , 0x90 , 0x60 ) );
00054 h.SetCfgColorHex( "Ars" , "back_color" , RGBColor( 0x20 , 0x50 , 0x20 ) );
00055
00056 const SDL_VideoInfo *vidInfo = SDL_GetVideoInfo();
00057 SDL_Rect **scr = SDL_ListModes( vidInfo->vfmt , SDL_FULLSCREEN | SDL_HWSURFACE | SDL_ANYFORMAT );
00058
00059 if( !SDL_VideoModeOK( scrW , scrH , 32 , SDL_FULLSCREEN | SDL_HWSURFACE | SDL_ANYFORMAT ) )
00060 {
00061 Ars::ArsApplication::scrW = scr[0]->h;
00062 Ars::ArsApplication::scrH = scr[0]->w;
00063 }
00064
00065 h.SetCfgInt( "SetupScreen" , "PlayIntro" , 1 );
00066 h.SetCfgInt( "SetupScreen" , "ScreenW" , scrW );
00067 h.SetCfgInt( "SetupScreen" , "ScreenH" , scrH );
00068 h.SetCfgString( "SetupScreen" , "ScreenTitle" , "BorQueror" );
00069
00070 h.SetCfgFile( "Paths" , "Fonts" , "./data/fonts/Fonts.cfg" );
00071 h.SetCfgFile( "Paths" , "Dlg-1024x768" , "./data/dlg-1024x768.cfg" );
00072 h.SetCfgFile( "Paths" , "Dlg-1280x1024" , "./data/dlg-1280x1024.cfg" );
00073 h.SetCfgFile( "Paths" , "Images" , "./data/Images/Images.cfg" );
00074 h.SetCfgFile( "Paths" , "Animate" , "./data/Animate/Animate.cfg" );
00075 h.SetCfgFile( "Paths" , "Sounds" , "./data/Sounds/Sounds.cfg" );
00076 h.SetCfgFile( "Paths" , "Saves" , "./data/saves/" );
00077 h.SetCfgFile( "Paths" , "AI" , "./data/AI/AI.cfg" );
00078 h.SetCfgFile( "Paths" , "Generator" , "./data/AI/generator.cfg" );
00079 h.SetCfgFile( "Paths" , "PlanetInfo" , "./data/AI/PlanetInfo.cfg" );
00080 h.SetCfgFile( "Paths" , "GenStars" , "./data/AI/genstars.cfg" );
00081 h.SetCfgFile( "Paths" , "GenPlanets" , "./data/AI/genplanets.cfg" );
00082 h.SetCfgFile( "Paths" , "Colony" , "./data/AI/colony.cfg" );
00083 h.SetCfgFile( "Paths" , "General" , "./data/AI/General.cfg" );
00084 h.SetCfgFile( "Paths" , "lcars" , "./data/lcars/lcars.cfg" );
00085
00086 h.Flush();
00087 }
|
|
|
Creates the main frame window.
Reimplemented from Ars::ArsApplication. Definition at line 89 of file borqueror.cpp. References Ars::ArsApplication::frame, Cfg::GetCfg(), Cfg::Handler::GetCfgInt(), and Cfg::Handler::GetCfgString().
00090 {
00091 ArsApplication::Init();
00092
00093 Cfg::Handler &h = Cfg::GetCfg();
00094 frame = new MainGame( XRect( 0 , 0 , h.GetCfgInt( "SetupScreen" , "ScreenW" ) , h.GetCfgInt( "SetupScreen" , "ScreenH" ) ) ,
00095 h.GetCfgString( "SetupScreen" , "ScreenTitle" ) );
00096 }
|
1.3.3