本文整理汇总了C++中CGUI::Go方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUI::Go方法的具体用法?C++ CGUI::Go怎么用?C++ CGUI::Go使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUI
的用法示例。
在下文中一共展示了CGUI::Go方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
SDL_Init(SDL_INIT_EVERYTHING);
bool AllowGUI;
CProcessPool *PPool;
// printf("%s\n", getenv("HOME"));
// exit(1);
BasicConfigurationStore * Store = GetHost()->OpenConfigurationStore("%HOMEPATH%/%DOT%electrem.cfg" );
AllowGUI = Store ->ReadBool("AllowGUI", true);
GetHost() -> ReadConfiguration( Store );
GetHost() -> RegisterArgs(argc, argv);
/* load settings */
ElectronConfiguration Base;
Base.Read( Store );
/* parse all program arguments to modify configuration */
if(argc > 1)
{
int iptr = 1;
while(iptr < argc)
{
/* an argument or a filename? */
if(argv[iptr][0] == '-')
{
if(!strcmp(argv[iptr], "-fasttape"))
Base.FastTape = true;
if(!strcmp(argv[iptr], "-slowtape"))
Base.FastTape = false;
if(!strcmp(argv[iptr], "-autoload"))
Base.Autoload = true;
if(!strcmp(argv[iptr], "-autoconfigure"))
Base.Autoconfigure = true;
}
iptr++;
}
}
PPool = new CProcessPool( Base );
SetupBASICTables();
GetHost() ->SetupUI( PPool, Store );
#if !defined(USE_NATIVE_GUI) && !defined(NO_GUI)
CGUI *GUI;
#endif
PPool->SetDebugFlags(PPDEBUG_SCREENFAILED | PPDEBUG_GUI | PPDEBUG_FSTOGGLE | PPDEBUG_OSFAILED | PPDEBUG_BASICFAILED | PPDEBUG_KILLINSTR | PPDEBUG_UNKNOWNOP);
PPool->IOCtl(IOCTL_SUPERRESET, NULL, 0);
/* parse all non-arguments (consider loading stuff) */
if(argc > 1)
{
int iptr = 1;
while(iptr < argc)
{
/* an argument or a filename? */
if(argv[iptr][0] != '-')
{
SDL_Event evt;
evt.type = SDL_USEREVENT;
evt.user.code = GUIEVT_LOADFILE;
evt.user.data1 = strdup(argv[iptr]);
SDL_PushEvent(&evt);
}
iptr++;
}
}
char * defFile = Store->ReadString( "Load", NULL );
if ( NULL != defFile )
{
PPool -> Open(defFile );
free( defFile );
}
/* check for persistent state, attempt to load state if so... */
if(Base.PersistentState)
PPool->Open("%HOMEPATH%/%DOT%electremstate.uef");
/* run emulation */
PPool->Go(false);
#if !defined(USE_NATIVE_GUI) && !defined(NO_GUI)
/* create GUI */
GUI = new CGUI(PPool, Store);
#endif
// handle important and/or debugging events
bool Quit = false;
char *BASICName = NULL;
char *BASICExtensions[] = { "txt", "bas", "bbc", NULL };
while(!Quit)
{
SDL_Event ev;
SDL_WaitEvent(&ev);
//.........这里部分代码省略.........