Beispiel #1
0
int PASCAL WinMain( HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show )
{
    char buffer[PATH_MAX];

#if !defined( __WATCOMC__ ) && defined( __NT__ )
    _argc = __argc;
    _argv = __argv;
#endif
    EXEName = _cmdname( buffer );
    InstanceHandle = inst;
    showHow = show;
    prev = prev;
    cmdline = cmdline;

    InitMem();

#ifndef __NT__
    if( prev != NULL && !HasShare() ) {
        MessageBox( NULLHANDLE, "SHARE.EXE must be loaded before starting Windows in order to run multiple instances of the editor",
                    EditorName, MB_OK );
        MyGetInstanceData( (unsigned short) prev, (void near *) &Root, sizeof( Root ) );
        SetFocus( Root );
        return( 0 );
    }
#endif

    Comspec = getenv( "COMSPEC" );
#ifdef __NT__
    VarAddGlobalStr( "OS", "winnt" );
#else
    VarAddGlobalStr( "OS", "win" );
#endif
    SetConfigFileName( CFG_NAME );
    ReadProfile();

    ShowStartupDialog();

    initApplication();
    if( !initInstance() ) {
        return( 0 );
    }
    InitializeEditor();
    SetSaveConfig();
    if( !BAD_ID( CurrentWindow ) ) {
        SetFocus( Root );
    }

    SetWindowCursorForReal();
    ResizeRoot();
    EditMain();

    FiniMem();

    return( 0 );

} /* WinMain */
Beispiel #2
0
void main( int argc, char *argv[] )
{
    InitMem();

    argc = argc;
    EXEName = argv[0];
    InitialStack();
    VarAddGlobalStr( "OS", "dos" );
    Comspec = getenv( "COMSPEC" );
    InitializeEditor();
    FinalStack();
    EditMain();

    FiniMem();

} /* main */
Beispiel #3
0
void main( int argc, char *argv[] )
{
    char buffer[PATH_MAX];
#if !defined( __WATCOMC__ )
    _argv = argv;
    _argc = argc;
#endif
    InitMem();
    argc = argc;
    EXEName = _cmdname( buffer );
    EditFlags.HasSystemMouse = TRUE;
    VarAddGlobalStr( "OS", "nt" );
    Comspec = getenv( "ComSpec" );
    InitializeEditor();
    EditMain();
    FiniMem();

} /* main */
bool LevelManager::GetTypeInitialize()
{
	bool result;

	//Release the Current menu
	if(m_pCurrent)
	{
		m_pCurrent.reset();
		m_pCurrent = 0;
	}

	//Initialize the New Level using the Level State
	switch(e_levelType)
	{
	case MENU: result = InitializeMainMenu(); break;
	case EDITOR: result = InitializeEditor(); break;
	case LEVEL: result = InitializeLevel<Level>(m_pBundle->GetLevel(), m_pBundle->GetContinue()); break;
	case CUSTOM: result = InitializeLevel<Level>(m_levelPath); break;
	}
	if(!result)
		return false;

	return true;
}