• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revisão3837fca19f2ff272d35ded6bf33430b4173302d4 (tree)
Hora2012-10-29 00:18:43
Autorh2so5 <h2so5@git....>
Commiterh2so5

Mensagem de Log

FieldPlayer.hpp, PlayerManager.cpp の文字コードを変更
一部の警告箇所を修正

Mudança Sumário

Diff

Binary files a/client/3d/FieldPlayer.hpp and b/client/3d/FieldPlayer.hpp differ
--- a/client/3d/gameloop.cpp
+++ b/client/3d/gameloop.cpp
@@ -266,7 +266,7 @@ void GameLoop::MoveCamera(InputManager* input)
266266 }
267267 }
268268
269- float pad_rz = input->GetGamepadManagedAnalogRy();
269+ float pad_rz = static_cast<float>(input->GetGamepadManagedAnalogRy());
270270 if (pad_rz > 0) {
271271 if (camera.radius > CAMERA_MIN_RADIUS) {
272272 camera.radius -= 0.5f * pad_rz;
@@ -503,9 +503,9 @@ float LightStatus::SolarPosition4(float julius_year)
503503
504504 float LightStatus::SolarAltitude(float latitude,float sidereal_hour,float solar_declination,float right_ascension)
505505 {
506- long float a = (sidereal_hour - solar_declination) * (DX_PI_F / 180.0L);
507- long float h = sin(TORADIAN(right_ascension)) * sin(TORADIAN(latitude)) + cos(TORADIAN(right_ascension)) * cos(TORADIAN(latitude)) * cos(a);
508- h = asin(h) * 180.0 / DX_PI_F;
506+ float a =(sidereal_hour - solar_declination) * (DX_PI_F / 180.0L);
507+ float h = sin(TORADIAN(right_ascension)) * sin(TORADIAN(latitude)) + cos(TORADIAN(right_ascension)) * cos(TORADIAN(latitude)) * cos(a);
508+ h = static_cast<float>(asin(h) * 180.0 / DX_PI_F);
509509 return h;
510510 }
511511
@@ -533,7 +533,7 @@ float LightStatus::SolarApparentAltitude1(float altitude,float distance)
533533 {
534534 auto e = 0.035333333 * sqrt(altitude);
535535 auto p = 0.002442818 / distance;
536- return p - e;
536+ return static_cast<float>(p - e);
537537 }
538538
539539 float LightStatus::SolarApparentAltitude2(float altitude,float distance)
@@ -541,7 +541,7 @@ float LightStatus::SolarApparentAltitude2(float altitude,float distance)
541541 auto s = 0.266994444 / distance;
542542 auto r = 0.585555555;
543543 auto k = SolarApparentAltitude1(altitude, distance) - s - r;
544- return k;
544+ return static_cast<float>(k);
545545 }
546546
547547 void LightStatus::SetGrobalAmbientColorMatchToTime()
--- a/client/GenerateJSON.cpp
+++ b/client/GenerateJSON.cpp
@@ -266,7 +266,7 @@ JsonGen::JsonGen()
266266 } while (FindNextFile(hPmdFind, &win32fd_pmd));
267267 FindClose(hPmdFind);
268268
269- for(int i = 0;i < pmd_paths.size();++i){
269+ for(unsigned int i = 0;i < pmd_paths.size();++i){
270270 char pmd_info[PMDINFO_SIZE+1];
271271 int fd = _topen(pmd_paths[i].c_str(),O_RDONLY);
272272 read(fd,pmd_info,PMDINFO_SIZE);
@@ -275,7 +275,7 @@ JsonGen::JsonGen()
275275 // モデル名取得
276276 strcpy_s(pmd_model_name_,pmd_info+7);
277277 Trim(pmd_model_name_);
278- int cnt = 0x1b;
278+ unsigned int cnt = 0x1b;
279279 size_t info_size = ADFUNC_DXconvAnsiToWide(0,0,pmd_info+cnt);
280280 TCHAR *pmd_info_t = new TCHAR[info_size + 1];
281281 ADFUNC_DXconvAnsiToWide(info_size,pmd_info_t,pmd_info+cnt);
Binary files a/client/PlayerManager.cpp and b/client/PlayerManager.cpp differ
--- a/client/scene/MainLoop.cpp
+++ b/client/scene/MainLoop.cpp
@@ -171,8 +171,8 @@ void MainLoop::Draw()
171171
172172 if (world_manager_->stage()->IsVisiblePoint(point)) {
173173 auto screen_pos = ConvWorldPosToScreenPos(point);
174- int x = (screen_pos.x / 2) * 2;
175- int y = (screen_pos.y / 2) * 2 - 16;
174+ int x = static_cast<int>(screen_pos.x / 2) * 2;
175+ int y = static_cast<int>(screen_pos.y / 2) * 2 - 16;
176176
177177 UILabel label_;
178178 label_.set_width(160);
@@ -200,7 +200,10 @@ void MainLoop::Draw()
200200 SetDrawBlendMode(DX_BLENDMODE_NOBLEND, 0);
201201 auto str = unicode::ToTString(_T("サーバーとの接続が切断されました"));
202202 auto width = GetDrawStringWidthToHandle(str.c_str(),str.length(),ResourceManager::default_font_handle());
203- DrawStringToHandle(config_manager_->screen_width()/2.0f - width,config_manager_->screen_height()/2.0f - ResourceManager::default_font_size(),str.c_str(),GetColor(255,255,255),ResourceManager::default_font_handle());
203+ DrawStringToHandle(
204+ config_manager_->screen_width() / 2 - width,
205+ config_manager_->screen_height() / 2 - ResourceManager::default_font_size(),
206+ str.c_str(),GetColor(255,255,255),ResourceManager::default_font_handle());
204207 SetDrawBlendMode(DX_BLENDMODE_NOBLEND, 0);
205208 }
206209
--- a/client/ui/Input.cpp
+++ b/client/ui/Input.cpp
@@ -286,7 +286,7 @@ void Input::Draw()
286286 c, text_color, font_handle_);
287287 width += GetDrawStringWidthToHandle(c,1,font_handle_);
288288 }
289- for(int i = select_start;i < ((select_end > it.size()) ? it.size() : select_end); ++i){
289+ for(int i = select_start;i < ((select_end > static_cast<int>(it.size())) ? it.size() : select_end); ++i){
290290 c[0] = it[i];
291291 SetDrawBlendMode(DX_BLENDMODE_ALPHA, 180);
292292 DrawBox(internal_x + width,internal_y + current_line * font_height_,
@@ -296,7 +296,7 @@ void Input::Draw()
296296 width += GetDrawStringWidthToHandle(c,1,font_handle_);
297297 SetDrawBlendMode(DX_BLENDMODE_NOBLEND, 0);
298298 }
299- for(int i = ((select_end > it.size()) ? it.size() : select_end);i < it.size(); ++i){
299+ for(int i = ((select_end > static_cast<int>(it.size())) ? it.size() : select_end);i < it.size(); ++i){
300300 c[0] = it[i];
301301 DrawStringToHandle(internal_x + width, internal_y + current_line * font_height_,
302302 c, text_color, font_handle_);
@@ -335,7 +335,7 @@ void Input::Draw()
335335 width += GetDrawStringWidthToHandle(c,1,font_handle_);
336336 SetDrawBlendMode(DX_BLENDMODE_NOBLEND, 0);
337337 }
338- for(int i = select_end;i < it.size(); ++i){
338+ for(unsigned int i = select_end;i < it.size(); ++i){
339339 c[0] = it[i];
340340 DrawStringToHandle(internal_x + width, internal_y + current_line * font_height_,
341341 c, text_color, font_handle_);
@@ -626,7 +626,7 @@ void Input::ProcessInput(InputManager* input)
626626 for(int i = 0;i < line_num; ++i){
627627 cnt += lines_[i].size();
628628 }
629- for(int i = 0;i < lines_[line_num].size(); ++i){
629+ for(unsigned int i = 0;i < lines_[line_num].size(); ++i){
630630 auto tmp_x = GetDrawStringWidthToHandle(&lines_[line_num][i],1,font_handle_);
631631 if( tmp + tmp_x < offset_x ){
632632 tmp += tmp_x;
@@ -637,7 +637,7 @@ void Input::ProcessInput(InputManager* input)
637637 }
638638 }else{
639639 int tmp = 0,cnt = 0;
640- for(int i = 0;i < lines_[0].size(); ++i){
640+ for(unsigned int i = 0;i < lines_[0].size(); ++i){
641641 auto tmp_x = GetDrawStringWidthToHandle(&lines_[0][i],1,font_handle_);
642642 if( tmp + tmp_x < offset_x ){
643643 tmp += tmp_x;
@@ -671,7 +671,7 @@ void Input::ProcessInput(InputManager* input)
671671 for(int i = 0;i < line_num; ++i,++cnt){
672672 cnt += lines_[i].size();
673673 }
674- for(int i = 0;i < lines_[line_num].size(); ++i){
674+ for(unsigned int i = 0;i < lines_[line_num].size(); ++i){
675675 auto tmp_x = GetDrawStringWidthToHandle(&lines_[line_num][i],1,font_handle_);
676676 if( tmp + tmp_x < offset_x ){
677677 tmp += tmp_x;
@@ -682,7 +682,7 @@ void Input::ProcessInput(InputManager* input)
682682 selecting_coursorpoint_ = std::make_pair<int,int>(prev_cursor_pos,cnt);
683683 }else{
684684 int tmp = 0,cnt = 0;
685- for(int i = 0;i < lines_[0].size(); ++i){
685+ for(unsigned int i = 0;i < lines_[0].size(); ++i){
686686 auto tmp_x = GetDrawStringWidthToHandle(&lines_[0][i],1,font_handle_);
687687 if( tmp + tmp_x < offset_x ){
688688 tmp += tmp_x;
@@ -719,7 +719,7 @@ void Input::ProcessInput(InputManager* input)
719719 for(int i = 0;i < line_num; ++i){
720720 cnt += lines_[i].size();
721721 }
722- for(int i = 0;i < lines_[line_num].size(); ++i){
722+ for(unsigned int i = 0;i < lines_[line_num].size(); ++i){
723723 auto tmp_x = GetDrawStringWidthToHandle(&lines_[line_num][i],1,font_handle_);
724724 if( tmp + tmp_x < offset_x ){
725725 tmp += tmp_x;
@@ -730,7 +730,7 @@ void Input::ProcessInput(InputManager* input)
730730 }
731731 }else{
732732 int tmp = 0,cnt = 0;
733- for(int i = 0;i < lines_[0].size(); ++i){
733+ for(unsigned int i = 0;i < lines_[0].size(); ++i){
734734 auto tmp_x = GetDrawStringWidthToHandle(&lines_[0][i],1,font_handle_);
735735 if( tmp + tmp_x < offset_x ){
736736 tmp += tmp_x;
--- a/common/network/Encrypter.cpp
+++ b/common/network/Encrypter.cpp
@@ -66,7 +66,7 @@ std::string Encrypter::GetPublicKey()
6666 ByteQueue queue;
6767 public_key_.Save(queue);
6868
69- size_t length = queue.CurrentSize();
69+ size_t length = static_cast<size_t>(queue.CurrentSize());
7070 std::unique_ptr<char[]> outbuf(new char [length]);
7171 queue.Get((byte*)outbuf.get(), length);
7272
@@ -86,7 +86,7 @@ std::string Encrypter::GetPrivateKey()
8686 ByteQueue queue;
8787 private_key_.Save(queue);
8888
89- size_t length = queue.CurrentSize();
89+ size_t length = static_cast<size_t>(queue.CurrentSize());
9090 std::unique_ptr<char[]> outbuf(new char [length]);
9191 queue.Get((byte*)outbuf.get(), length);
9292
--- a/common/network/Signature.cpp
+++ b/common/network/Signature.cpp
@@ -56,7 +56,7 @@ std::string Signature::GetPublicKey()
5656 ByteQueue queue;
5757 public_key_.Save(queue);
5858
59- size_t length = queue.CurrentSize();
59+ size_t length = static_cast<size_t>(queue.CurrentSize());
6060 std::unique_ptr<char[]> outbuf(new char [length]);
6161 queue.Get((byte*)outbuf.get(), length);
6262
@@ -76,7 +76,7 @@ std::string Signature::GetPrivateKey()
7676 ByteQueue queue;
7777 private_key_.Save(queue);
7878
79- size_t length = queue.CurrentSize();
79+ size_t length = static_cast<size_t>(queue.CurrentSize());
8080 std::unique_ptr<char[]> outbuf(new char [length]);
8181 queue.Get((byte*)outbuf.get(), length);
8282