示例#1
0
//-------------------------
bool CApplicationBase::init( const char *app_title, unsigned x_res, unsigned y_res ) {

  srand( static_cast<unsigned int>( time( nullptr ) ) );

  bool is_ok = CRenderer::get( ).init( app_title, x_res, y_res );
  if( !is_ok ) {
    printf( "CApplicationBase::CRenderer initialization FAILURE!\n" );
    return false;
  }

  is_ok = CAudioManager::get( ).init( );
  if( !is_ok ) {
    printf( "CApplicationBase::CAudioManager initialization FAILURE!\n" );
    return false;
  } 

  is_ok = CFontManager::get( ).init( );
  if( !is_ok ) {
    printf( "CApplicationBase::CFontManager initialization FAILURE!\n" );
    return false;
  }

  printf( "CApplicationBase::Loading specific project content\n" );
  return initProject( );

}
bool initProject() {
    auto files = getRecursiveCodeFiles();
    Language language = getLanguageFromFiles(files);
    if(language == None) {
        std::cout << "More than one programming language in this directory" << std::endl;
        return false;
    }
    else {
        return initProject(language);
    }
}