SHARE
TWEET

Untitled

a guest Sep 15th, 2019 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void CMyD3DApplication::Read_ChooseMode(char *filename)
  2. {
  3.     FILE *fp = NULL;
  4.     char *sentence = NULL;
  5.     char buf[256] = {0, }, first_arg[256] = {0, }, second_arg[256] = {0, };
  6.     char line[256] = {0, };
  7.     int res;
  8.     char config_file[100] = {0, };
  9.     strcpy(config_file, "config.ini");
  10.  
  11.     // â¸ðµåÀΰ¡ ¾Æ´Ñ°¡¸¦ È®ÀÎÇÏ´Ù.
  12.     fp = fopen(config_file, "rt");
  13.     m_bWindowed = FALSE;
  14.     g_bFFullMode = FALSE;
  15.  
  16.     if (fp != NULL)
  17.     {
  18.         sentence = GetSentence(buf, sizeof(buf), fp);
  19.  
  20.         while (sentence != NULL)
  21.         {
  22.             AnyTwoArg(buf, first_arg, second_arg);
  23.             res = atoi(second_arg);
  24.  
  25.             if (!stricmp("Windowed", first_arg))
  26.             {
  27.                 if (res == 1)
  28.                     m_bWindowed = TRUE;
  29.             }
  30.             sentence = GetSentence(buf, sizeof(buf), fp);
  31.         }
  32.         fclose(fp);
  33.     }
  34.     else
  35.     {
  36.         m_bWindowed = FALSE;
  37.         g_bFFullMode = TRUE;
  38.     }
  39.     char config_file2[100] = {0, };
  40.     strcpy(config_file, "YOUR GM NAME FILE HERE");
  41.     fp = fopen(config_file, "rt");
  42.  
  43.     if (fp == NULL)
  44.         g_bAdmin = FALSE;
  45.     else
  46.     {
  47.         int val = 0;
  48.         res = 0;
  49.         while (fgets(line, 10, fp) != NULL)
  50.         {
  51.             val = atoi(line);
  52.             res += val;
  53.         }
  54.  
  55.         if (res == 15)
  56.         {
  57.             g_dev_client = true;
  58.             g_bAdmin = TRUE;
  59.         }
  60.         else
  61.             g_bAdmin = FALSE;
  62.  
  63.         fclose(fp);
  64.     }
  65.     strcat(config_file, "2");
  66.     fp = fopen(config_file, "rt");
  67.     strcpy(config_file, "broad");
  68.     strcat(config_file, "cast");
  69.     fp = fopen(config_file, "rt");
  70.     if (fp)
  71.     {
  72.         int val;
  73.         res = 0;
  74.         while (fgets(line, 10, fp) != NULL)
  75.         {
  76.             val = atoi(line);
  77.             res += val;
  78.         }
  79.  
  80.         if (res == 10)
  81.         {
  82.             g_bAdmin = TRUE;
  83.             //g_bBroad = TRUE;
  84.         }
  85.  
  86.         fclose(fp);
  87.     }
  88.  
  89.     if (g_dwClientCountry == CTRY_IDN)
  90.         return;
  91.     if (g_dwClientCountry == CTRY_ENG)  // ¿µ¹®¹öÀüÀÇ °æ¿ì
  92.  
  93.         return;
  94.     if (g_dwClientCountry == CTRY_JPN)
  95.         return;
  96.     if (g_dwClientCountry == CTRY_DEU)
  97.         return;
  98.     if (g_dwClientCountry == CTRY_TH)   // ű¹¹öÀüÀÎ °æ¿ì
  99.  
  100.         return;
  101.     if (g_dwClientCountry == CTRY_DENG)
  102.         return;
  103.     if (g_dwClientCountry == CTRY_MENG)
  104.         return;
  105.     if ( g_dwClientCountry == CTRY_BRA )
  106.         return;
  107.  
  108.     // Çѱ¹ ¹öÀü ¿Ü¿¡´Â â¸ðµå Áö¿øÀ» ÇÏÁö ¾Ê´Â´Ù.
  109.     if (g_dwClientCountry != 0 && g_dwLangType != 0 && g_bAdmin != TRUE)
  110.         m_bWindowed = FALSE;
  111.  
  112.     return;
  113. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top