OSDN Git Service

軽量化、ファイル構造の変更
authorangeart <angeart@git.sourceforge.jp>
Thu, 13 Sep 2012 12:55:22 +0000 (21:55 +0900)
committerangeart <angeart@git.sourceforge.jp>
Thu, 13 Sep 2012 12:55:22 +0000 (21:55 +0900)
Pキーでスクリーンショット

client/3d/Stage.cpp
client/InputManager.cpp
client/InputManager.hpp
client/ResourceManager.cpp
client/scene/MainLoop.cpp
client/scene/MainLoop.hpp
client/version.hpp

index 253cee5..730afce 100644 (file)
@@ -13,7 +13,7 @@ Stage::Stage(const tstring& model_name) :
        min_height_(map_handle_.property().get<float>("min_height", -200.0))
 {
     MV1SetScale(map_handle_.handle(), VGet(map_scale_, map_scale_, map_scale_));
-    MV1SetupCollInfo(map_handle_.handle(), -1, 256, 256, 256);
+    MV1SetupCollInfo(map_handle_.handle(), -1, 128, 64, 128);// 元の数値は256,256,256
 
     auto start_points_array = map_handle_.property().get_child("stage.start_points", ptree());
     for (auto it = start_points_array.begin(); it != start_points_array.end(); ++it) {
index 98cd6c4..a0054b0 100644 (file)
Binary files a/client/InputManager.cpp and b/client/InputManager.cpp differ
index 612aab9..b121faf 100644 (file)
Binary files a/client/InputManager.hpp and b/client/InputManager.hpp differ
index 42d87e5..d30064a 100644 (file)
Binary files a/client/ResourceManager.cpp and b/client/ResourceManager.cpp differ
index dffcabf..29c6eb8 100644 (file)
@@ -17,7 +17,8 @@ MainLoop::MainLoop(const ManagerAccessorPtr& manager_accessor) :
       account_manager_(manager_accessor->account_manager().lock()),
       config_manager_(manager_accessor->config_manager().lock()),
       inputbox_(manager_accessor_),
-         minimap_(manager_accessor_)
+         minimap_(manager_accessor_),
+         snapshot_number_(0)
 {
     manager_accessor_->set_player_manager(player_manager_);
     manager_accessor_->set_command_manager(command_manager_);
@@ -86,10 +87,26 @@ void MainLoop::Draw()
     card_manager_->Draw();
     inputbox_.Draw();
        minimap_.Draw();
+
+    InputManager input;
+
+       ProcessInput(&input);
 }
 
 void MainLoop::End()
 {
 }
 
+void MainLoop::ProcessInput(InputManager *input)
+{
+       if(input->GetKeyCount(InputManager::KEYBIND_SCREEN_SHOT) > 0)
+       {
+               TCHAR tmp_str[MAX_PATH];
+               _stprintf( tmp_str , _T(".\\screenshot\\ss%03d.png") , snapshot_number_ );
+               SaveDrawScreenToPNG( 0, 0, config_manager_->screen_width(), config_manager_->screen_height(),tmp_str);
+               snapshot_number_++;
+       }
 }
+
+}
+
index c81f1e7..b1c0a6a 100644 (file)
@@ -31,6 +31,7 @@ class MainLoop : public Base {
 
     private:
         std::function<void(const tstring&)> push_message_;
+               void ProcessInput(InputManager *input);
 
     private:
         // アクセサ
@@ -43,6 +44,7 @@ class MainLoop : public Base {
         ConfigManagerPtr config_manager_;
                MiniMap minimap_;
         InputBox inputbox_;
+               int snapshot_number_;
 };
 
 }
index 481a507..a528436 100644 (file)
@@ -9,7 +9,7 @@
 
 #define MMO_VERSION_MAJOR 0
 #define MMO_VERSION_MINOR 3
-#define MMO_VERSION_REVISION 2
+#define MMO_VERSION_REVISION 3
 
 #ifdef MMO_VERSION_BUILD
 #define MMO_VERSION_BUILD_TEXT " Build " MMO_VERSION_TOSTRING(MMO_VERSION_BUILD)