네버윈터나이츠EE는 콘솔을 비롯 안드로이드에 iOS까지 멀티플랫폼으로 출시된 게임입니다만 한글 모드를 고려하는 입장에서는 윈도우 한정되는 이야기가 됩니다. 그러니까 과감하게 system 명령문까지 사용해볼만 하지 않을까라는 이야기.
만들어진 프로그램을 mdo 혹은 nwm 파일내의 dialog 카테고리에 모여있는 DLG 파일을 추출한 폴더에서 작업하면 위와 같은 결과가 나옵니다.
#include "iostream"
#include "stdio.h"
#include "stdlib.h"
int main(int argc, char* argv[])
{
FILE *IN1, *OUT;
char str[1024];
//list dlg files
if (fopen_s(&IN1, "_LIST.TXT", "r") != 0)
{
system("dir /b *.dlg > _LIST.TXT");
fopen_s(&IN1, "_LIST.TXT", "r");
}
//make a batchfopen_s(&OUT, "_AUTO.BAT", "w");
//reset counting file
fputs("DEL _NWNTLK_INDEX.TXT\n", OUT);
//use NWNDLG5.EXEdo {
fgets(str, 1024, IN1);
if (!feof(IN1))
{
if (strstr(str, ".dlg") != NULL)
{
fputs("NWNDLG5.EXE ",OUT);
fputs(str, OUT);
}
}
} while (!feof(IN1));
//merge multiple textfputs("COPY /b .\\new_text\\*.new.txt _total_tlk.txt\n", OUT);
fclose(IN1); fclose(OUT);
return 0;
}
#include "iostream"
#include "stdio.h"
#include "stdlib.h"
int main(int argc, char* argv[])
{
FILE* IN1, * OUT;
char str[1024];
int ck1 = 0;
if (fopen_s(&IN1, "_LIST_KR.TXT", "r") != 0)
{
system("dir /b *.new.txt > _LIST_KR.TXT");
fopen_s(&IN1, "_LIST_KR.TXT", "r");
}
fopen_s(&OUT, "_AUTO_KR.BAT", "w");
//make a batch
do {
fgets(str, 1024, IN1);
if (!feof(IN1))
{
if (strstr(str, ".new.txt") != NULL)
{
//use NWNPAPAGO.EXE
fputs("NWNPAPAGO.EXE ", OUT);
fputs(str, OUT);
}
}
} while (!feof(IN1));
fputs("COPY /b .\\NEW_TEXT_KR\\*.new.txt _total_tlk_kr.txt\n", OUT);
fclose(IN1); fclose(OUT);
return 0;
}





덧글