• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂c1746101e961e2c68282b3ed8d7b9d7fd31d4382 (tree)
時間2012-09-13 01:13:13
作者angeart <angeart@git....>
Commiterangeart

Log Message

ver0.3.1

Change Summary

差異

--- a/client/GenerateJSON.cpp
+++ b/client/GenerateJSON.cpp
@@ -176,7 +176,7 @@ JsonGen::JsonGen()
176176 DxLib::MATRIX chglcl = {0};
177177
178178 char pmd_model_name_[256] = {0};
179- char pmd_author_name_[256] = {0};
179+ TCHAR pmd_author_name_[256] = {0};
180180
181181 int exist_num_pmd_ = 0;
182182
@@ -211,7 +211,7 @@ JsonGen::JsonGen()
211211 _tcscpy_s(tcsTmpPath_Pmd,tcsTmpDir);
212212 _tcscat_s(tcsTmpPath_Pmd,_T("*.pmd"));
213213 hPmdFind = FindFirstFile(tcsTmpPath_Pmd, &win32fd_pmd);
214- if(hPmdFind < 0)
214+ if(hPmdFind == (HANDLE)0xffffffff)
215215 {
216216 FindClose(hPmdFind);
217217 continue;
@@ -247,22 +247,26 @@ JsonGen::JsonGen()
247247
248248 // モデル名取得
249249 strcpy_s(pmd_model_name_,pmd_info+7);
250-
251- int cnt = 7 + strlen(pmd_info+7);
252- while(cnt < PMDINFO_SIZE){
253- if(!strncmp("モデリング",pmd_info+cnt,10))break;
250+ int cnt = 0x1b;
251+ size_t info_size = ADFUNC_DXconvAnsiToWide(0,0,pmd_info+cnt);
252+ TCHAR *pmd_info_t = new TCHAR[info_size + 1];
253+ ADFUNC_DXconvAnsiToWide(info_size,pmd_info_t,pmd_info+cnt);
254+ cnt = 0;
255+ while(cnt < info_size){
256+ if(!_tcsncmp(_T("モデリング"),pmd_info_t+cnt,5))break;
254257 else ++cnt;
255258 }
256- if(cnt == PMDINFO_SIZE)
259+ if(cnt == info_size)
257260 {
258- strcpy_s(pmd_author_name_,"Unknown");
261+ _tcscpy_s(pmd_author_name_,_T("Unknown"));
259262 }else{
260- for(cnt;cnt<PMDINFO_SIZE && (*(pmd_info+cnt) != 0x46 && *(pmd_info+cnt-1) != 0x81);++cnt);
263+ for(cnt;cnt<info_size && *(pmd_info_t+cnt) != _T(':'); ++cnt);
261264 int tmp_str_cnt = 1;
262- for(tmp_str_cnt;cnt+tmp_str_cnt<PMDINFO_SIZE && (*(pmd_info+cnt+tmp_str_cnt) != 0x0a && *(pmd_info+cnt+tmp_str_cnt) != 0x20);++tmp_str_cnt);
265+ for(tmp_str_cnt;cnt+tmp_str_cnt<info_size && (*(pmd_info_t+cnt+tmp_str_cnt) != _T('\n') && *(pmd_info_t+cnt+tmp_str_cnt) != _T(' ') && *(pmd_info_t+cnt+tmp_str_cnt) != _T('.'));++tmp_str_cnt);
263266 // 作者取得
264- strncpy_s(pmd_author_name_,pmd_info+cnt+1,tmp_str_cnt-1);
267+ _tcsncpy_s(pmd_author_name_,pmd_info_t+cnt+1,tmp_str_cnt-1);
265268 }
269+ delete []pmd_info_t;
266270
267271 TCHAR tmp_mv1_path[MAX_PATH] = {0};
268272 _tcscpy_s(tmp_mv1_path,pmd_paths[i].c_str());
@@ -294,10 +298,10 @@ JsonGen::JsonGen()
294298 ADFUNC_DXconvAnsiToWide(tmp_w_s_m,tmp_w_m,pmd_model_name_);
295299 prejson += tmp_w_m;
296300 prejson += _T(":");
297- size_t tmp_w_s_a = ADFUNC_DXconvAnsiToWide(0,0,pmd_author_name_);
298- TCHAR *tmp_w_a = new TCHAR[tmp_w_s_a + 1];
299- ADFUNC_DXconvAnsiToWide(tmp_w_s_a,tmp_w_a,pmd_author_name_);
300- prejson += tmp_w_a;
301+ //size_t tmp_w_s_a = ADFUNC_DXconvAnsiToWide(0,0,pmd_author_name_);
302+ //TCHAR *tmp_w_a = new TCHAR[tmp_w_s_a + 1];
303+ //ADFUNC_DXconvAnsiToWide(tmp_w_s_a,tmp_w_a,pmd_author_name_);
304+ prejson += pmd_author_name_;
301305 prejson += _T("式\",\n\t\"character\":\n\t\t{\n\t\t\t\"height\":");
302306 TCHAR tmp_f[32];
303307 _ftot_s(tmp_f,32,floor(prePos.y*2)/10.0f,2);
@@ -305,13 +309,13 @@ JsonGen::JsonGen()
305309 prejson += _T(",\n\t\t\t\"motions\":\n\t\t\t\t{\n\t\t\t\t\t\"stand\":\"basic_stand.vmd\",\n\t\t\t\t\t\"walk\": \t\"basic_walk.vmd\",\n\t\t\t\t\t\"run\":\t\"basic_run.vmd\"\n\t\t\t\t}\n\t\t}\n}");
306310 TCHAR tmp_dir[MAX_PATH];
307311 _tcscpy_s(tmp_dir,_T(".\\resources\\models\\"));
308- _tcscat_s(tmp_dir,tmp_w_a);
312+ _tcscat_s(tmp_dir,pmd_author_name_);
309313 _tcscat_s(tmp_dir,_T("式"));
310314 _tcscat_s(tmp_dir,tmp_w_m);
311315 _tcscat_s(tmp_dir,_T("\\"));
312316 _wmkdir(tmp_dir);
313317 delete [] tmp_w_m;
314- delete [] tmp_w_a;
318+ //delete [] tmp_w_a;
315319 TCHAR json_path[MAX_PATH];
316320 _tcscpy_s(json_path,tmp_dir);
317321 _tcscat_s(json_path,_T("info.json"));
@@ -350,7 +354,7 @@ JsonGen::JsonGen()
350354 _tcscat_s(tmp_type,tmp_cpy);
351355 CopyFile(pmd_paths[i].c_str(),tmp_type,TRUE);
352356 }
353-
357+ pmd_paths.clear();
354358 DeleteDirectory(tcsTmpDir);
355359 }
356360 }
Binary files a/client/ResourceManager.cpp and b/client/ResourceManager.cpp differ
--- a/client/version.hpp
+++ b/client/version.hpp
@@ -8,8 +8,8 @@
88 #define MMO_VERSION_TOSTRING(val) MMO_VERSION_TOSTRING_(val)
99
1010 #define MMO_VERSION_MAJOR 0
11-#define MMO_VERSION_MINOR 2
12-#define MMO_VERSION_REVISION 9
11+#define MMO_VERSION_MINOR 3
12+#define MMO_VERSION_REVISION 1
1313
1414 #ifdef MMO_VERSION_BUILD
1515 #define MMO_VERSION_BUILD_TEXT " Build " MMO_VERSION_TOSTRING(MMO_VERSION_BUILD)