Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CMyD3DApplication::Read_ChooseMode(char *filename)
- {
- FILE *fp = NULL;
- char *sentence = NULL;
- char buf[256] = {0, }, first_arg[256] = {0, }, second_arg[256] = {0, };
- char line[256] = {0, };
- int res;
- char config_file[100] = {0, };
- strcpy(config_file, "config.ini");
- // â¸ðµåÀΰ¡ ¾Æ´Ñ°¡¸¦ È®ÀÎÇÏ´Ù.
- fp = fopen(config_file, "rt");
- m_bWindowed = FALSE;
- g_bFFullMode = FALSE;
- if (fp != NULL)
- {
- sentence = GetSentence(buf, sizeof(buf), fp);
- while (sentence != NULL)
- {
- AnyTwoArg(buf, first_arg, second_arg);
- res = atoi(second_arg);
- if (!stricmp("Windowed", first_arg))
- {
- if (res == 1)
- m_bWindowed = TRUE;
- }
- sentence = GetSentence(buf, sizeof(buf), fp);
- }
- fclose(fp);
- }
- else
- {
- m_bWindowed = FALSE;
- g_bFFullMode = TRUE;
- }
- char config_file2[100] = {0, };
- strcpy(config_file, "YOUR GM NAME FILE HERE");
- fp = fopen(config_file, "rt");
- if (fp == NULL)
- g_bAdmin = FALSE;
- else
- {
- int val = 0;
- res = 0;
- while (fgets(line, 10, fp) != NULL)
- {
- val = atoi(line);
- res += val;
- }
- if (res == 15)
- {
- g_dev_client = true;
- g_bAdmin = TRUE;
- }
- else
- g_bAdmin = FALSE;
- fclose(fp);
- }
- strcat(config_file, "2");
- fp = fopen(config_file, "rt");
- strcpy(config_file, "broad");
- strcat(config_file, "cast");
- fp = fopen(config_file, "rt");
- if (fp)
- {
- int val;
- res = 0;
- while (fgets(line, 10, fp) != NULL)
- {
- val = atoi(line);
- res += val;
- }
- if (res == 10)
- {
- g_bAdmin = TRUE;
- //g_bBroad = TRUE;
- }
- fclose(fp);
- }
- if (g_dwClientCountry == CTRY_IDN)
- return;
- if (g_dwClientCountry == CTRY_ENG) // ¿µ¹®¹öÀüÀÇ °æ¿ì
- return;
- if (g_dwClientCountry == CTRY_JPN)
- return;
- if (g_dwClientCountry == CTRY_DEU)
- return;
- if (g_dwClientCountry == CTRY_TH) // ű¹¹öÀüÀÎ °æ¿ì
- return;
- if (g_dwClientCountry == CTRY_DENG)
- return;
- if (g_dwClientCountry == CTRY_MENG)
- return;
- if ( g_dwClientCountry == CTRY_BRA )
- return;
- // Çѱ¹ ¹öÀü ¿Ü¿¡´Â â¸ðµå Áö¿øÀ» ÇÏÁö ¾Ê´Â´Ù.
- if (g_dwClientCountry != 0 && g_dwLangType != 0 && g_bAdmin != TRUE)
- m_bWindowed = FALSE;
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement