Skip to content

Commit

Permalink
일부 사소한 업데이트.
Browse files Browse the repository at this point in the history
  • Loading branch information
LocketGoma committed May 5, 2019
1 parent 76a7cfa commit e844648
Show file tree
Hide file tree
Showing 10 changed files with 107 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="FileEditor.cpp" />
<ClCompile Include="filereader.cpp" />
<ClCompile Include="FilerReader.cpp" />
<ClCompile Include="Interface.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="FileEditor.h" />
<ClInclude Include="filereader.h" />
<ClInclude Include="FileReader.h" />
<ClInclude Include="Interface.h" />
<ClInclude Include="resource.h" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@
<ClCompile Include="Interface.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="filereader.cpp">
<ClCompile Include="FileEditor.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
<ClCompile Include="FileEditor.cpp">
<ClCompile Include="FilerReader.cpp">
<Filter>소스 파일</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Interface.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="filereader.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="FileEditor.h">
<Filter>헤더 파일</Filter>
</ClInclude>
<ClInclude Include="FileReader.h">
<Filter>헤더 파일</Filter>
</ClInclude>
</ItemGroup>
</Project>
2 changes: 0 additions & 2 deletions Addon_BBCC_DCconEditor_AUTO/FileEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ unique_ptr<fstream> dcconlist;
midpoint = input.substr(input.find("name") + 6, input.find(""",") - (input.find("name") + 7));




output = convert_to_cp949(midpoint.c_str());

#ifdef DEBUG
Expand Down
70 changes: 70 additions & 0 deletions Addon_BBCC_DCconEditor_AUTO/FilerReader.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#include "filereader.h"
//'디시콘 폴더'에서 디시콘이름 목록만 갖고오는 부분.


map <string, bool> name_list; //디시콘 이름 리스트. 이름 / 리스트 존재유무. 일단 wstring 말고 string으로 하고, 노멀 string이 문제생길시 wstring으로 교체할것.
map <string, bool>::iterator list_iter;

void list_reader() { //'일단' 구현됨
string path = "images/dccon";
try {
for (const auto & entry : fs::directory_iterator(path)) {
string temp = entry.path().string().substr(path.size() + 1);
for (int i = 0; i < 3; i++) {
if (valid_ext_list[i].compare(temp.substr(temp.size() - ext_length)) == 0) //확장자 확인 비교
name_list.insert(pair<string, bool>(temp, false));
}
}
}
catch (fs::filesystem_error e) {
cout << "경로가 잘못되었습니다. 실행파일의 위치를 점검해주세요." << endl;
return;
}
if (name_list.empty())
cout << "예약된 경로에 조건에 맞는 파일이 존재하지 않습니다." << endl;

list_iter = name_list.begin();
}
bool list_reader(string path) {
try {
for (const auto & entry : fs::directory_iterator(path)) {
string temp = entry.path().string().substr(path.size() + 1);
for (int i = 0; i < 3; i++) {
if (valid_ext_list[i].compare(temp.substr(temp.size() - ext_length)) == 0) //확장자 확인 비교
name_list.insert(pair<string, bool>(temp, false));
}
}
}
catch (fs::filesystem_error e) {
cout << "경로가 잘못되었습니다. 경로를 재 지정해주세요." << endl;
return false;
}
if (name_list.empty()) {
cout << "조건에 맞는 파일이 존재하지 않습니다. 경로를 재 지정해주세요." << endl;
return false;
}


list_iter = name_list.begin();
return true;
}

bool list_loaded() {
return name_list.empty() ? false : true;
}
int dccon_list_print() {
for (list_iter = name_list.begin(); list_iter != name_list.end(); list_iter++) {
cout << list_iter->first << endl;
}
return name_list.size();
}
//디버그용 코드
#ifdef DEBUG
void list_tester() {
list_reader();

//dccon_list_print();

}

#endif // DEBUG
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
30 changes: 30 additions & 0 deletions patch.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 3d5260110feb5c17ee9ebe0726f68675d9aecda7 Mon Sep 17 00:00:00 2001
From: LocketGoma <nothappa@naver.com>
Date: Thu, 17 Jan 2019 23:28:18 +0900
Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EC=A0=84=20=ED=83=9C=EA=B7=B8=20'?=
=?UTF-8?q?=EB=A7=8C'=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8.=200.55?=
=?UTF-8?q?=EB=A1=9C=20=EC=98=AC=EB=A6=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
Addon_BBCC_DCconEditor_AUTO/Interface.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Addon_BBCC_DCconEditor_AUTO/Interface.cpp b/Addon_BBCC_DCconEditor_AUTO/Interface.cpp
index 5288fc1..d8786be 100644
--- a/Addon_BBCC_DCconEditor_AUTO/Interface.cpp
+++ b/Addon_BBCC_DCconEditor_AUTO/Interface.cpp
@@ -51,7 +51,7 @@ void DCCon_Editor::display() {
while (true) {
system("cls");
cout << "\n\t\tBBCC 디시콘 리스트 에디터\n\n" << endl;
- cout << "v0.5\t\t\t\t\tmake by @locketgoma\n\n" << endl;
+ cout << "v0.55\t\t\t\t\tmake by @locketgoma\n\n" << endl;
cout << "현재 시스템 로드 상태 : 리스트 로드 - " << (status_list_load==1 ? "true" : "false");
cout << " // 엔트리 로드 - " << (status_entry_load==1 ? "true" : "false");
cout << " // 파일 수정 준비 - " << (status_ready ==1 ? "완료" : "");
--
2.18.0.windows.1

0 comments on commit e844648

Please sign in to comment.