• R/O
  • SSH
  • HTTPS

project200805us: 提交


Commit MetaInfo

修订版3232 (tree)
时间2017-08-05 07:49:53
作者hogepiyo

Log Message

map editor

更改概述

差异

--- DXProject/Evigen2MapEditor/Evigen2MapEditor/About.cpp (nonexistent)
+++ DXProject/Evigen2MapEditor/Evigen2MapEditor/About.cpp (revision 3232)
@@ -0,0 +1,3 @@
1+#include "stdafx.h"
2+#include "About.h"
3+
--- DXProject/Evigen2MapEditor/Evigen2MapEditor/About.h (nonexistent)
+++ DXProject/Evigen2MapEditor/Evigen2MapEditor/About.h (revision 3232)
@@ -0,0 +1,124 @@
1+#pragma once
2+
3+namespace Evigen2MapEditor {
4+
5+ using namespace System;
6+ using namespace System::ComponentModel;
7+ using namespace System::Collections;
8+ using namespace System::Windows::Forms;
9+ using namespace System::Data;
10+ using namespace System::Drawing;
11+
12+ /// <summary>
13+ /// About の概要
14+ /// </summary>
15+ public ref class About : public System::Windows::Forms::Form
16+ {
17+ public:
18+ About(void)
19+ {
20+ InitializeComponent();
21+ //
22+ //TODO: ここにコンストラクター コードを追加します
23+ //
24+ }
25+
26+ protected:
27+ /// <summary>
28+ /// 使用中のリソースをすべてクリーンアップします。
29+ /// </summary>
30+ ~About()
31+ {
32+ if (components)
33+ {
34+ delete components;
35+ }
36+ }
37+ private: System::Windows::Forms::Label^ label1;
38+ protected:
39+ private: System::Windows::Forms::TextBox^ textBox1;
40+ private: System::Windows::Forms::Button^ button1;
41+
42+ private:
43+ /// <summary>
44+ /// 必要なデザイナー変数です。
45+ /// </summary>
46+ System::ComponentModel::Container ^components;
47+
48+#pragma region Windows Form Designer generated code
49+ /// <summary>
50+ /// デザイナー サポートに必要なメソッドです。このメソッドの内容を
51+ /// コード エディターで変更しないでください。
52+ /// </summary>
53+ void InitializeComponent(void)
54+ {
55+ this->label1 = (gcnew System::Windows::Forms::Label());
56+ this->textBox1 = (gcnew System::Windows::Forms::TextBox());
57+ this->button1 = (gcnew System::Windows::Forms::Button());
58+ this->SuspendLayout();
59+ //
60+ // label1
61+ //
62+ this->label1->AutoSize = true;
63+ this->label1->Location = System::Drawing::Point(12, 57);
64+ this->label1->Name = L"label1";
65+ this->label1->Size = System::Drawing::Size(46, 12);
66+ this->label1->TabIndex = 0;
67+ this->label1->Text = L"Version.";
68+ //
69+ // textBox1
70+ //
71+ this->textBox1->Location = System::Drawing::Point(64, 54);
72+ this->textBox1->Name = L"textBox1";
73+ this->textBox1->ReadOnly = true;
74+ this->textBox1->Size = System::Drawing::Size(100, 19);
75+ this->textBox1->TabIndex = 1;
76+ //
77+ // button1
78+ //
79+ this->button1->DialogResult = System::Windows::Forms::DialogResult::OK;
80+ this->button1->Location = System::Drawing::Point(197, 226);
81+ this->button1->Name = L"button1";
82+ this->button1->Size = System::Drawing::Size(75, 23);
83+ this->button1->TabIndex = 2;
84+ this->button1->Text = L"OK";
85+ this->button1->UseVisualStyleBackColor = true;
86+ //
87+ // About
88+ //
89+ this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
90+ this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
91+ this->ClientSize = System::Drawing::Size(284, 261);
92+ this->Controls->Add(this->button1);
93+ this->Controls->Add(this->textBox1);
94+ this->Controls->Add(this->label1);
95+ this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedDialog;
96+ this->MaximizeBox = false;
97+ this->MinimizeBox = false;
98+ this->Name = L"About";
99+ this->ShowIcon = false;
100+ this->ShowInTaskbar = false;
101+ this->Text = L"About";
102+ this->Load += gcnew System::EventHandler(this, &About::About_Load);
103+ this->ResumeLayout(false);
104+ this->PerformLayout();
105+
106+ }
107+#pragma endregion
108+ private: System::Void About_Load(System::Object^ sender, System::EventArgs^ e) {
109+ System::Reflection::AssemblyVersionAttribute^ asmdc =
110+ (System::Reflection::AssemblyVersionAttribute^)
111+ Attribute::GetCustomAttribute(
112+ System::Reflection::Assembly::GetExecutingAssembly(),
113+ System::Reflection::AssemblyVersionAttribute::typeid);
114+ if (!asmdc) {
115+ return;
116+ }
117+ //System::Diagnostics::FileVersionInfo^ ver =
118+ // System::Diagnostics::FileVersionInfo::GetVersionInfo(
119+ // System::Reflection::Assembly::GetExecutingAssembly()->Location);
120+ // load VERSION
121+ this->textBox1->Text = asmdc->ToString();
122+ }
123+ };
124+}
--- DXProject/Evigen2MapEditor/Evigen2MapEditor/Evigen2MapEditor.cpp (revision 3231)
+++ DXProject/Evigen2MapEditor/Evigen2MapEditor/Evigen2MapEditor.cpp (revision 3232)
@@ -6,7 +6,7 @@
66 using namespace Evigen2MapEditor;
77
88 [STAThreadAttribute]
9-int main(array<System::String ^> ^args)
9+int main()//array<System::String ^,10> ^args)
1010 {
1111 // コントロールが作成される前に、Windows XP ビジュアル効果を有効にします
1212 Application::EnableVisualStyles();
--- DXProject/Evigen2MapEditor/Evigen2MapEditor/Form1.h (revision 3231)
+++ DXProject/Evigen2MapEditor/Evigen2MapEditor/Form1.h (revision 3232)
@@ -10,6 +10,7 @@
1010 #include "GroupEditor.h"
1111 #include "EditorOption.h"
1212 #include "ThumbViewer.h"
13+#include "About.h"
1314
1415
1516 namespace Evigen2MapEditor {
@@ -34,18 +35,18 @@
3435 public ref class Form1 : public System::Windows::Forms::Form
3536 {
3637 public:
37- System::String^ CFG_BASE_DIR;
38- String^ CFG_COMMON_SPRITE_ID;
39- String^ CFG_TILE_SEQ_ID;
40- String^ CFG_PLAYER_SPRITE_ID;
41- String^ CFG_NEUTRAL_SPRITE_ID;
42- String^ CFG_ITEM_SPRITE_ID;
43- String^ CFG_CHESTS;
44- String^ CFG_DOORS;
45- String^ CFG_ZOOM_PERCENTAGE;
46- String^ CFG_PAL_ZOOM_PERCENTAGE;
47- String^ CFG_SETTING_BASE_DIR;
48- String^ CFG_DEFAULT_GROUP;
38+ static System::String^ CFG_BASE_DIR;
39+ static String^ CFG_COMMON_SPRITE_ID;
40+ static String^ CFG_TILE_SEQ_ID;
41+ static String^ CFG_PLAYER_SPRITE_ID;
42+ static String^ CFG_NEUTRAL_SPRITE_ID;
43+ static String^ CFG_ITEM_SPRITE_ID;
44+ static String^ CFG_CHESTS;
45+ static String^ CFG_DOORS;
46+ static String^ CFG_ZOOM_PERCENTAGE;
47+ static String^ CFG_PAL_ZOOM_PERCENTAGE;
48+ static String^ CFG_SETTING_BASE_DIR;
49+ //static String^ CFG_DEFAULT_GROUP;
4950 ThumbViewer^ m_ThumbViewer;
5051 private: System::Windows::Forms::ToolStripMenuItem^ leftSelectToolStripMenuItem;
5152 private: System::Windows::Forms::ToolStripMenuItem^ rightSelectToolStripMenuItem;
@@ -58,7 +59,9 @@
5859 private: System::Windows::Forms::ToolStripMenuItem^ loadBGImageToolStripMenuItem;
5960 private: System::Windows::Forms::ToolStripMenuItem^ groupEditorToolStripMenuItem;
6061 private: System::Windows::Forms::ToolStripMenuItem^ thumbViewerToolStripMenuItem;
61- public:
62+ private: System::Windows::Forms::ToolStripMenuItem^ helpToolStripMenuItem;
63+ private: System::Windows::Forms::ToolStripMenuItem^ aboutToolStripMenuItem;
64+ public:
6265 String^ CFG_ENEMY_DIR;
6366 Form1(void)
6467 {
@@ -74,7 +77,7 @@
7477 CFG_ZOOM_PERCENTAGE = gcnew String( "Zoom");
7578 CFG_PAL_ZOOM_PERCENTAGE = gcnew String( "PalZoom");
7679 CFG_SETTING_BASE_DIR = gcnew String("SettingBaseDir");
77- CFG_DEFAULT_GROUP = gcnew String("DefaultGroup");
80+ //CFG_DEFAULT_GROUP = gcnew String("DefaultGroup");
7881 //
7982 //TODO: ここにコンストラクタ コードを追加します
8083 //
@@ -163,7 +166,8 @@
163166 //this->m_GroupEditor->Show();
164167 AddOwnedForm(this->m_GroupEditor);
165168 // 存在するファイルならロードする
166- strSettingString = System::Configuration::ConfigurationManager::AppSettings[CFG_DEFAULT_GROUP];
169+ strSettingString = System::Configuration::ConfigurationManager::AppSettings[
170+ GStaticData::CFG_DEFAULT_GROUP];
167171 if( strSettingString != nullptr && strSettingString != _T("")) {
168172 if(System::IO::File::Exists(strSettingString)){
169173 GStaticData::staticData->m_GroupManager->load(strSettingString);
@@ -332,6 +336,7 @@
332336 this->upSelectToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
333337 this->downSelectToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
334338 this->groupEditorToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
339+ this->thumbViewerToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
335340 this->statusStrip1 = (gcnew System::Windows::Forms::StatusStrip());
336341 this->toolStripStatusLabel1 = (gcnew System::Windows::Forms::ToolStripStatusLabel());
337342 this->toolStripProgressBar1 = (gcnew System::Windows::Forms::ToolStripProgressBar());
@@ -352,7 +357,8 @@
352357 this->openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog());
353358 this->folderBrowserDialog1 = (gcnew System::Windows::Forms::FolderBrowserDialog());
354359 this->panelCenter = (gcnew System::Windows::Forms::Panel());
355- this->thumbViewerToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
360+ this->helpToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
361+ this->aboutToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
356362 this->menuStrip1->SuspendLayout();
357363 this->statusStrip1->SuspendLayout();
358364 this->toolStrip1->SuspendLayout();
@@ -360,8 +366,10 @@
360366 //
361367 // menuStrip1
362368 //
363- this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(3) {this->fileToolStripMenuItem,
364- this->editToolStripMenuItem, this->viewToolStripMenuItem});
369+ this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(4) {
370+ this->fileToolStripMenuItem,
371+ this->editToolStripMenuItem, this->viewToolStripMenuItem, this->helpToolStripMenuItem
372+ });
365373 this->menuStrip1->Location = System::Drawing::Point(0, 0);
366374 this->menuStrip1->Name = L"menuStrip1";
367375 this->menuStrip1->Size = System::Drawing::Size(564, 24);
@@ -370,9 +378,11 @@
370378 //
371379 // fileToolStripMenuItem
372380 //
373- this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(10) {this->toolStripMenuItem1,
374- this->openToolStripMenuItem, this->loadBGImageToolStripMenuItem, this->saveToolStripMenuItem, this->saveAsToolStripMenuItem,
375- this->toolStripMenuItem4, this->toolStripMenuItem2, this->toolStripMenuItem3, this->toolStripSeparator1, this->quitToolStripMenuItem});
381+ this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(10) {
382+ this->toolStripMenuItem1,
383+ this->openToolStripMenuItem, this->loadBGImageToolStripMenuItem, this->saveToolStripMenuItem, this->saveAsToolStripMenuItem,
384+ this->toolStripMenuItem4, this->toolStripMenuItem2, this->toolStripMenuItem3, this->toolStripSeparator1, this->quitToolStripMenuItem
385+ });
376386 this->fileToolStripMenuItem->Name = L"fileToolStripMenuItem";
377387 this->fileToolStripMenuItem->Size = System::Drawing::Size(37, 20);
378388 this->fileToolStripMenuItem->Text = L"File";
@@ -411,7 +421,7 @@
411421 // saveAsToolStripMenuItem
412422 //
413423 this->saveAsToolStripMenuItem->Name = L"saveAsToolStripMenuItem";
414- this->saveAsToolStripMenuItem->ShortcutKeys = static_cast<System::Windows::Forms::Keys>(((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::Shift)
424+ this->saveAsToolStripMenuItem->ShortcutKeys = static_cast<System::Windows::Forms::Keys>(((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::Shift)
415425 | System::Windows::Forms::Keys::S));
416426 this->saveAsToolStripMenuItem->Size = System::Drawing::Size(194, 22);
417427 this->saveAsToolStripMenuItem->Text = L"Save As...";
@@ -426,8 +436,10 @@
426436 //
427437 // toolStripMenuItem2
428438 //
429- this->toolStripMenuItem2->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->terrainCSVToolStripMenuItem,
430- this->objectsCSVToolStripMenuItem});
439+ this->toolStripMenuItem2->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {
440+ this->terrainCSVToolStripMenuItem,
441+ this->objectsCSVToolStripMenuItem
442+ });
431443 this->toolStripMenuItem2->Name = L"toolStripMenuItem2";
432444 this->toolStripMenuItem2->Size = System::Drawing::Size(194, 22);
433445 this->toolStripMenuItem2->Text = L"Import";
@@ -448,8 +460,10 @@
448460 //
449461 // toolStripMenuItem3
450462 //
451- this->toolStripMenuItem3->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->terrainToolStripMenuItem,
452- this->objectsToolStripMenuItem});
463+ this->toolStripMenuItem3->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {
464+ this->terrainToolStripMenuItem,
465+ this->objectsToolStripMenuItem
466+ });
453467 this->toolStripMenuItem3->Name = L"toolStripMenuItem3";
454468 this->toolStripMenuItem3->Size = System::Drawing::Size(194, 22);
455469 this->toolStripMenuItem3->Text = L"Export";
@@ -482,9 +496,11 @@
482496 //
483497 // editToolStripMenuItem
484498 //
485- this->editToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(7) {this->copyToolStripMenuItem,
486- this->cutToolStripMenuItem, this->pasteToolStripMenuItem, this->undoToolStripMenuItem, this->toolStripSeparator2, this->projectPropertyToolStripMenuItem,
487- this->preferenceToolStripMenuItem});
499+ this->editToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(7) {
500+ this->copyToolStripMenuItem,
501+ this->cutToolStripMenuItem, this->pasteToolStripMenuItem, this->undoToolStripMenuItem, this->toolStripSeparator2, this->projectPropertyToolStripMenuItem,
502+ this->preferenceToolStripMenuItem
503+ });
488504 this->editToolStripMenuItem->Name = L"editToolStripMenuItem";
489505 this->editToolStripMenuItem->Size = System::Drawing::Size(39, 20);
490506 this->editToolStripMenuItem->Text = L"Edit";
@@ -538,10 +554,12 @@
538554 //
539555 // viewToolStripMenuItem
540556 //
541- this->viewToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(10) {this->paletteToolStripMenuItem,
542- this->toolToolStripMenuItem, this->projectPropertyToolStripMenuItem1, this->scenarioEditorToolStripMenuItem, this->leftSelectToolStripMenuItem,
543- this->rightSelectToolStripMenuItem, this->upSelectToolStripMenuItem, this->downSelectToolStripMenuItem, this->groupEditorToolStripMenuItem,
544- this->thumbViewerToolStripMenuItem});
557+ this->viewToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(10) {
558+ this->paletteToolStripMenuItem,
559+ this->toolToolStripMenuItem, this->projectPropertyToolStripMenuItem1, this->scenarioEditorToolStripMenuItem, this->leftSelectToolStripMenuItem,
560+ this->rightSelectToolStripMenuItem, this->upSelectToolStripMenuItem, this->downSelectToolStripMenuItem, this->groupEditorToolStripMenuItem,
561+ this->thumbViewerToolStripMenuItem
562+ });
545563 this->viewToolStripMenuItem->Name = L"viewToolStripMenuItem";
546564 this->viewToolStripMenuItem->Size = System::Drawing::Size(44, 20);
547565 this->viewToolStripMenuItem->Text = L"View";
@@ -609,10 +627,19 @@
609627 this->groupEditorToolStripMenuItem->Text = L"GroupEditor";
610628 this->groupEditorToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::groupEditorToolStripMenuItem_Click);
611629 //
630+ // thumbViewerToolStripMenuItem
631+ //
632+ this->thumbViewerToolStripMenuItem->Name = L"thumbViewerToolStripMenuItem";
633+ this->thumbViewerToolStripMenuItem->Size = System::Drawing::Size(192, 22);
634+ this->thumbViewerToolStripMenuItem->Text = L"ThumbViewer";
635+ this->thumbViewerToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::thumbViewerToolStripMenuItem_Click);
636+ //
612637 // statusStrip1
613638 //
614- this->statusStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->toolStripStatusLabel1,
615- this->toolStripProgressBar1});
639+ this->statusStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {
640+ this->toolStripStatusLabel1,
641+ this->toolStripProgressBar1
642+ });
616643 this->statusStrip1->Location = System::Drawing::Point(0, 413);
617644 this->statusStrip1->Name = L"statusStrip1";
618645 this->statusStrip1->Size = System::Drawing::Size(564, 23);
@@ -634,9 +661,11 @@
634661 //
635662 // toolStrip1
636663 //
637- this->toolStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(11) {this->toolStripLabel4,
638- this->toolStripLabel1, this->toolStripLabel2, this->toolStripLabel3, this->toolStripButton1, this->toolStripButton2, this->toolStripButton3,
639- this->toolStripButton4, this->toolStripButton5, this->toolStripButton6, this->toolStripButton7});
664+ this->toolStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(11) {
665+ this->toolStripLabel4,
666+ this->toolStripLabel1, this->toolStripLabel2, this->toolStripLabel3, this->toolStripButton1, this->toolStripButton2, this->toolStripButton3,
667+ this->toolStripButton4, this->toolStripButton5, this->toolStripButton6, this->toolStripButton7
668+ });
640669 this->toolStrip1->Location = System::Drawing::Point(0, 24);
641670 this->toolStrip1->Name = L"toolStrip1";
642671 this->toolStrip1->Size = System::Drawing::Size(564, 25);
@@ -678,7 +707,7 @@
678707 // toolStripButton1
679708 //
680709 this->toolStripButton1->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Text;
681- this->toolStripButton1->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton1.Image")));
710+ this->toolStripButton1->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"toolStripButton1.Image")));
682711 this->toolStripButton1->ImageTransparentColor = System::Drawing::Color::Magenta;
683712 this->toolStripButton1->Name = L"toolStripButton1";
684713 this->toolStripButton1->Size = System::Drawing::Size(23, 22);
@@ -688,7 +717,7 @@
688717 // toolStripButton2
689718 //
690719 this->toolStripButton2->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Text;
691- this->toolStripButton2->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton2.Image")));
720+ this->toolStripButton2->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"toolStripButton2.Image")));
692721 this->toolStripButton2->ImageTransparentColor = System::Drawing::Color::Magenta;
693722 this->toolStripButton2->Name = L"toolStripButton2";
694723 this->toolStripButton2->Size = System::Drawing::Size(49, 22);
@@ -698,7 +727,7 @@
698727 // toolStripButton3
699728 //
700729 this->toolStripButton3->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Text;
701- this->toolStripButton3->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton3.Image")));
730+ this->toolStripButton3->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"toolStripButton3.Image")));
702731 this->toolStripButton3->ImageTransparentColor = System::Drawing::Color::Magenta;
703732 this->toolStripButton3->Name = L"toolStripButton3";
704733 this->toolStripButton3->Size = System::Drawing::Size(23, 22);
@@ -708,7 +737,7 @@
708737 // toolStripButton4
709738 //
710739 this->toolStripButton4->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Text;
711- this->toolStripButton4->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton4.Image")));
740+ this->toolStripButton4->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"toolStripButton4.Image")));
712741 this->toolStripButton4->ImageTransparentColor = System::Drawing::Color::Magenta;
713742 this->toolStripButton4->Name = L"toolStripButton4";
714743 this->toolStripButton4->Size = System::Drawing::Size(23, 22);
@@ -718,7 +747,7 @@
718747 // toolStripButton5
719748 //
720749 this->toolStripButton5->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Text;
721- this->toolStripButton5->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton5.Image")));
750+ this->toolStripButton5->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"toolStripButton5.Image")));
722751 this->toolStripButton5->ImageTransparentColor = System::Drawing::Color::Magenta;
723752 this->toolStripButton5->Name = L"toolStripButton5";
724753 this->toolStripButton5->Size = System::Drawing::Size(23, 22);
@@ -728,7 +757,7 @@
728757 // toolStripButton6
729758 //
730759 this->toolStripButton6->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Text;
731- this->toolStripButton6->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton6.Image")));
760+ this->toolStripButton6->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"toolStripButton6.Image")));
732761 this->toolStripButton6->ImageTransparentColor = System::Drawing::Color::Magenta;
733762 this->toolStripButton6->Name = L"toolStripButton6";
734763 this->toolStripButton6->Size = System::Drawing::Size(23, 22);
@@ -738,7 +767,7 @@
738767 // toolStripButton7
739768 //
740769 this->toolStripButton7->DisplayStyle = System::Windows::Forms::ToolStripItemDisplayStyle::Text;
741- this->toolStripButton7->Image = (cli::safe_cast<System::Drawing::Image^ >(resources->GetObject(L"toolStripButton7.Image")));
770+ this->toolStripButton7->Image = (cli::safe_cast<System::Drawing::Image^>(resources->GetObject(L"toolStripButton7.Image")));
742771 this->toolStripButton7->ImageTransparentColor = System::Drawing::Color::Magenta;
743772 this->toolStripButton7->Name = L"toolStripButton7";
744773 this->toolStripButton7->Size = System::Drawing::Size(23, 22);
@@ -768,13 +797,20 @@
768797 this->panelCenter->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &Form1::panelCenter_Paint);
769798 this->panelCenter->MouseMove += gcnew System::Windows::Forms::MouseEventHandler(this, &Form1::panelCenter_MouseMove);
770799 //
771- // thumbViewerToolStripMenuItem
800+ // helpToolStripMenuItem
772801 //
773- this->thumbViewerToolStripMenuItem->Name = L"thumbViewerToolStripMenuItem";
774- this->thumbViewerToolStripMenuItem->Size = System::Drawing::Size(192, 22);
775- this->thumbViewerToolStripMenuItem->Text = L"ThumbViewer";
776- this->thumbViewerToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::thumbViewerToolStripMenuItem_Click);
802+ this->helpToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) { this->aboutToolStripMenuItem });
803+ this->helpToolStripMenuItem->Name = L"helpToolStripMenuItem";
804+ this->helpToolStripMenuItem->Size = System::Drawing::Size(44, 20);
805+ this->helpToolStripMenuItem->Text = L"Help";
777806 //
807+ // aboutToolStripMenuItem
808+ //
809+ this->aboutToolStripMenuItem->Name = L"aboutToolStripMenuItem";
810+ this->aboutToolStripMenuItem->Size = System::Drawing::Size(152, 22);
811+ this->aboutToolStripMenuItem->Text = L"About...";
812+ this->aboutToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::aboutToolStripMenuItem_Click);
813+ //
778814 // Form1
779815 //
780816 this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
@@ -787,12 +823,12 @@
787823 this->MainMenuStrip = this->menuStrip1;
788824 this->Name = L"Form1";
789825 this->Text = L"Map Editor";
826+ this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &Form1::Form1_FormClosing);
790827 this->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &Form1::Form1_Paint);
828+ this->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &Form1::Form1_KeyDown);
791829 this->KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::Form1_KeyPress);
792- this->FormClosing += gcnew System::Windows::Forms::FormClosingEventHandler(this, &Form1::Form1_FormClosing);
793830 this->MouseMove += gcnew System::Windows::Forms::MouseEventHandler(this, &Form1::Form1_MouseMove);
794831 this->PreviewKeyDown += gcnew System::Windows::Forms::PreviewKeyDownEventHandler(this, &Form1::Form1_PreviewKeyDown);
795- this->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &Form1::Form1_KeyDown);
796832 this->menuStrip1->ResumeLayout(false);
797833 this->menuStrip1->PerformLayout();
798834 this->statusStrip1->ResumeLayout(false);
@@ -959,17 +995,20 @@
959995 // IO::Path::GetDirectoryName( this->openFileDialog1->FileName );
960996
961997 //// change "current directory" in config
962- System::Configuration::Configuration^ lpConfig = System::Configuration::ConfigurationManager::OpenExeConfiguration(
963- System::Configuration::ConfigurationUserLevel::None );
998+ HPLNetLibTool::changeConfiguration(
999+ CFG_BASE_DIR, this->openFileDialog1->InitialDirectory);
1000+
1001+ //System::Configuration::Configuration^ lpConfig = System::Configuration::ConfigurationManager::OpenExeConfiguration(
1002+ // System::Configuration::ConfigurationUserLevel::None);
9641003 // remove
965- lpConfig->AppSettings->Settings->Remove( CFG_BASE_DIR);
1004+ //lpConfig->AppSettings->Settings->Remove( CFG_BASE_DIR);
1005+
1006+ //// add
1007+ //lpConfig->AppSettings->Settings->Add( CFG_BASE_DIR, this->openFileDialog1->InitialDirectory);
1008+ //lpConfig->Save();
9661009 this->openFileDialog1->InitialDirectory = IO::Path::GetDirectoryName( this->openFileDialog1->FileName );
9671010 this->openFileDialog1->FileName = IO::Path::GetFileName( this->openFileDialog1->FileName );
9681011
969- // add
970- lpConfig->AppSettings->Settings->Add( CFG_BASE_DIR, this->openFileDialog1->InitialDirectory);
971- lpConfig->Save();
972-
9731012 // set changed flag as off
9741013 GStaticData::staticData->setChanged( false );
9751014
@@ -1349,10 +1388,21 @@
13491388 // un
13501389
13511390 }
1391+ option->Close();
13521392 }
13531393 private: System::Void thumbViewerToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
13541394 this->m_ThumbViewer->Show(this);
13551395 }
1396+private: System::Void aboutToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
1397+ About^ ab = gcnew About();
1398+ ab->ShowDialog();
1399+ ab->Close();
1400+}
1401+ //public: void setGroupDefault(String^ strPath) {
1402+ // // change pre-load
1403+ // HPLNetLibTool::changeConfiguration(
1404+ // Evigen2MapEditor::Form1::CFG_DEFAULT_GROUP, this->openFileDialog1->FileName);
1405+ //}
13561406 };
13571407 }
13581408
--- DXProject/Evigen2MapEditor/Evigen2MapEditor/GGroupManager.cpp (revision 3231)
+++ DXProject/Evigen2MapEditor/Evigen2MapEditor/GGroupManager.cpp (revision 3232)
@@ -86,6 +86,8 @@
8686 }
8787 }
8888 }
89+
90+
8991 }
9092
9193
@@ -130,7 +132,7 @@
130132 if(nCurMapItemID < 0 ) {
131133 return-1;
132134 }
133- int nBlockType = blockTypeManager->getBlockType(nX,nY);
135+ int nCurBlockType = blockTypeManager->getBlockType(nCurMapItemID);
134136 // get group
135137 GGroupPanel^ gp = this->getGroupPanelByMapItemID(nCurMapItemID);
136138 if(!gp){
@@ -154,13 +156,38 @@
154156 // block type
155157 int nBlockType = blockTypeManager->getBlockType(nMapItemID);
156158 int nTest = 0;
159+ GGroupPanel^ gpTarget = this->getGroupPanelByMapItemID(nMapItemID);
157160 switch(nBlockType){
158161 case TileType::EMPTY:
159162 case TileType::EMPTY_DRAW_FRONT:
160163 case TileType::THROUGH_UP:
164+ // 同族ならEmptyでも1とみなす
165+ if (!gpTarget || !gp) {
166+ }
167+ else if (gpTarget->m_nGroupID == gp->m_nGroupID) {
168+ nTest = 1;
169+ }
161170 break;
162171 default:
163172 nTest = 1;
173+ if (gp && gpTarget && gpTarget->m_nGroupID == gp->m_nGroupID) {
174+ }
175+ else {
176+
177+ // 違うグループ
178+ switch (nCurBlockType) {
179+ case TileType::EMPTY:
180+ case TileType::EMPTY_DRAW_FRONT:
181+ case TileType::THROUGH_UP:
182+ // 自分がEmpty
183+ // ... 違うグループのブロックがBLOCKでも、
184+ // 自分がEmptyGroupなら、他のグループを「ないものとして考える」
185+ nTest = 0;
186+
187+ // Empty(背後タイル)
188+ break;
189+ }
190+ }
164191 }
165192 mat->set(dx+1,dy+1,nTest);
166193 }
@@ -176,6 +203,7 @@
176203 continue;
177204 }
178205 if(pair->Value->m_nGroupPanelType == nPanelType){
206+ // 同じグループである
179207
180208 return pair->Value->m_nMapItemID;
181209 }
--- DXProject/Evigen2MapEditor/Evigen2MapEditor/GStaticData.cpp (revision 3231)
+++ DXProject/Evigen2MapEditor/Evigen2MapEditor/GStaticData.cpp (revision 3232)
@@ -533,6 +533,13 @@
533533 Form1^ form = (Form1^)this->m_Form;
534534 form->resizeMainFrameFitToSize();
535535 }
536+void GStaticData::zoomPaletteCommon() {
537+ Palette^ pal = (Palette^)this->m_PaletteFormHandle;
538+ if (!pal) {
539+ return;
540+ }
541+ pal->resizePaletteFitToSize();
542+}
536543
537544 void GStaticData::zoomIn( ) {
538545 this->m_nZoom += ZOOM_STEP;
@@ -566,6 +573,7 @@
566573 if( this->m_nZoomPalette > ZOOM_MAX ) {
567574 this->m_nZoomPalette = ZOOM_MAX;
568575 }
576+ this->zoomPaletteCommon();
569577 }
570578 void GStaticData::zoomOutPalette( ) {
571579 this->m_nZoomPalette -= ZOOM_STEP;
@@ -572,11 +580,12 @@
572580 if( this->m_nZoomPalette < ZOOM_MIN ) {
573581 this->m_nZoomPalette = ZOOM_MIN;
574582 }
575-
583+ this->zoomPaletteCommon();
576584 }
577585
578586 void GStaticData::zoomResetPalette() {
579587 this->m_nZoomPalette = ZOOM_RESET;
588+ this->zoomPaletteCommon();
580589 }
581590
582591 HPLNetMatrix^ GStaticData::loadCSV( String^ strFilePath ) {
--- DXProject/Evigen2MapEditor/Evigen2MapEditor/GStaticData.h (revision 3231)
+++ DXProject/Evigen2MapEditor/Evigen2MapEditor/GStaticData.h (revision 3232)
@@ -54,7 +54,7 @@
5454
5555 // zoom
5656 static const int ZOOM_RESET = 100;
57- static const int ZOOM_MAX = ZOOM_RESET * 2;
57+ static const int ZOOM_MAX = ZOOM_RESET * 8;
5858 static const int ZOOM_STEP = ZOOM_RESET / 4;
5959 static const int ZOOM_MIN = ZOOM_RESET / 4;
6060 static const float ZOOM_RATE = 1.f / ZOOM_RESET;
@@ -118,6 +118,7 @@
118118 String^ m_strCurrentFileName;
119119 String^ m_strSettingDir;
120120 public:
121+ static String^ CFG_DEFAULT_GROUP= gcnew String("DefaultGroup");
121122 Form^ m_GroupEditorFormHandle;
122123 GGroupManager^ m_GroupManager;
123124 HPLNetBlockTypeManager^ m_BlockTypeManager;
@@ -179,6 +180,9 @@
179180 this->m_Form->Refresh();
180181 }
181182 }
183+ //void setGroupDefault(String^ strPath) {
184+ // ((Form1^)this->m_Form)->setGroupDefault(strPath);
185+ //}
182186 // palette form
183187 void setPaletteForm( Form^ form ) { this->m_PaletteFormHandle = form; }
184188 void refreshPaletteForm() {
@@ -242,6 +246,7 @@
242246 void zoomIn( );
243247 void zoomOut( );
244248 void zoomCommon();
249+ void zoomPaletteCommon();
245250 void setZoomByInt( int nZoom ) {
246251 this->m_nZoom = nZoom;
247252 }
--- DXProject/Evigen2MapEditor/Evigen2MapEditor/GroupEditor.h (revision 3231)
+++ DXProject/Evigen2MapEditor/Evigen2MapEditor/GroupEditor.h (revision 3232)
@@ -9,6 +9,7 @@
99 using namespace System::Data;
1010 using namespace System::Drawing;
1111 #include "GStaticData.h"
12+//#include "Form1.h"
1213
1314 namespace Evigen2MapEditor {
1415
@@ -30,12 +31,12 @@
3031 //
3132 //TODO: ここにコンストラクタ コードを追加します
3233 //
33- this->m_imgSelectFrame = Image::FromFile( _T("MapEditor/SelectFrame1.png") );
34+ this->m_imgSelectFrame = Image::FromFile(_T("MapEditor/SelectFrame1.png"));
3435
35- Image^ img = GStaticData::staticData->m_SpriteContainer->getImage(
36- GStaticData::staticData->getCommonSpriteID(),
37- GStaticData::staticData->getTileSeqID(), 0 );
38- Drawing::Size s = Drawing::Size(img->Width, img->Height);
36+ Image^ img = GStaticData::staticData->m_SpriteContainer->getImage(
37+ GStaticData::staticData->getCommonSpriteID(),
38+ GStaticData::staticData->getTileSeqID(), 0);
39+ Drawing::Size s = Drawing::Size(img->Width, img->Height);
3940 this->pictureBox1->Size = s;
4041 this->panel1->AutoScrollMinSize = s;
4142 this->m_nMouseCoordX = 0;
@@ -49,7 +50,7 @@
4950 int m_nMouseCoordX;
5051 int m_nMouseCoordY;
5152 private: System::Windows::Forms::OpenFileDialog^ openFileDialog1;
52-
53+
5354 // 選択中のグループID
5455 public: int m_nSelGroupID;
5556 private: System::Windows::Forms::SaveFileDialog^ saveFileDialog1;
@@ -65,7 +66,7 @@
6566 }
6667 }
6768 private: System::Windows::Forms::PictureBox^ pictureBox1;
68- protected:
69+ protected:
6970 private: System::Windows::Forms::Panel^ panel1;
7071 private: System::Windows::Forms::SplitContainer^ splitContainer1;
7172 private: System::Windows::Forms::Label^ label1;
@@ -196,9 +197,11 @@
196197 //
197198 this->listBoxPanelType->FormattingEnabled = true;
198199 this->listBoxPanelType->ItemHeight = 12;
199- this->listBoxPanelType->Items->AddRange(gcnew cli::array< System::Object^ >(19) {L"None", L"凸-LeftTop", L"凸-Top", L"凸-RightTop",
200- L"凸-Left", L"凸-Center", L"凸-Right", L"凸-LeftBottom", L"凸-Bottom", L"凸-RightBottom", L"凹-LeftTop", L"凹-Top", L"凹-RightTop", L"凹-Left",
201- L"凹-Center", L"凹-Right", L"凹-LeftBottom", L"凹-Bottom", L"凹-RightBottom"});
200+ this->listBoxPanelType->Items->AddRange(gcnew cli::array< System::Object^ >(19) {
201+ L"None", L"凸-LeftTop", L"凸-Top", L"凸-RightTop",
202+ L"凸-Left", L"凸-Center", L"凸-Right", L"凸-LeftBottom", L"凸-Bottom", L"凸-RightBottom", L"凹-LeftTop", L"凹-Top", L"凹-RightTop", L"凹-Left",
203+ L"凹-Center", L"凹-Right", L"凹-LeftBottom", L"凹-Bottom", L"凹-RightBottom"
204+ });
202205 this->listBoxPanelType->Location = System::Drawing::Point(12, 27);
203206 this->listBoxPanelType->Name = L"listBoxPanelType";
204207 this->listBoxPanelType->ScrollAlwaysVisible = true;
@@ -228,7 +231,7 @@
228231 //
229232 // menuStrip1
230233 //
231- this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) {this->fileToolStripMenuItem});
234+ this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) { this->fileToolStripMenuItem });
232235 this->menuStrip1->Location = System::Drawing::Point(0, 0);
233236 this->menuStrip1->Name = L"menuStrip1";
234237 this->menuStrip1->Size = System::Drawing::Size(659, 24);
@@ -237,8 +240,10 @@
237240 //
238241 // fileToolStripMenuItem
239242 //
240- this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(4) {this->newToolStripMenuItem,
241- this->openToolStripMenuItem, this->saveToolStripMenuItem, this->saveAsToolStripMenuItem});
243+ this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(4) {
244+ this->newToolStripMenuItem,
245+ this->openToolStripMenuItem, this->saveToolStripMenuItem, this->saveAsToolStripMenuItem
246+ });
242247 this->fileToolStripMenuItem->Name = L"fileToolStripMenuItem";
243248 this->fileToolStripMenuItem->Size = System::Drawing::Size(37, 20);
244249 this->fileToolStripMenuItem->Text = L"File";
@@ -298,69 +303,70 @@
298303 }
299304 #pragma endregion
300305 private: System::Void pictureBox1_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) {
301- const int TILE_SIZE = GStaticData::staticData->m_nTileSize;
302- // src rect
303- RectangleF rect = Rectangle(0,0,TILE_SIZE,TILE_SIZE );
306+ const int TILE_SIZE = GStaticData::staticData->m_nTileSize;
307+ // src rect
308+ RectangleF rect = Rectangle(0, 0, TILE_SIZE, TILE_SIZE);
304309
305- Image^ imgSelect = m_imgSelectFrame;
306-// GStaticData::staticData->m_SpriteContainer->getImage(
307-// SpriteType::COMMON, Sequence::Common::MENU_SELECT_FRAME, 0 );
310+ Image^ imgSelect = m_imgSelectFrame;
311+ // GStaticData::staticData->m_SpriteContainer->getImage(
312+ // SpriteType::COMMON, Sequence::Common::MENU_SELECT_FRAME, 0 );
308313
309-
310- // ズーム
311- float fZoom = GStaticData::staticData->getZoomPalette();
312314
313- // パレット画像
314- Image^ img = GStaticData::staticData->m_SpriteContainer->getImage(
315- GStaticData::staticData->getCommonSpriteID(),
316- GStaticData::staticData->getTileSeqID(), 0 );
317- // パレット画像描画
318- e->Graphics->DrawImage(img,
319- 0,0,(int)(img->Width * fZoom),(int)(img->Height * fZoom) );
320- int nIndex = 0;
321- int nColumnPerRow = GStaticData::staticData->getColumnPerRow();
322- int nColumnNum = img->Width / TILE_SIZE;
323- int nRowNum = img->Height / TILE_SIZE;
324- RectangleF destRect = Rectangle(0,0,(int)(TILE_SIZE * fZoom),(int)(TILE_SIZE*fZoom) );
325- System::Drawing::Font^ fnt = gcnew System::Drawing::Font( _T("MS UI Gothic"), 10);
326- Pen^ pmPen = gcnew Pen( Color::Blue );
327- Drawing::Brush^ brush = Drawing::Brushes::White;
315+ // ズーム
316+ float fZoom = GStaticData::staticData->getZoomPalette();
328317
329- // 範囲選択用情報
330- //SelectData^ sel = GStaticData::staticData->m_PaletteSelData;
318+ // パレット画像
319+ Image^ img = GStaticData::staticData->m_SpriteContainer->getImage(
320+ GStaticData::staticData->getCommonSpriteID(),
321+ GStaticData::staticData->getTileSeqID(), 0);
322+ // パレット画像描画
323+ e->Graphics->DrawImage(img,
324+ 0, 0, (int)(img->Width * fZoom), (int)(img->Height * fZoom));
325+ int nIndex = 0;
326+ int nColumnPerRow = GStaticData::staticData->getColumnPerRow();
327+ int nColumnNum = img->Width / TILE_SIZE;
328+ int nRowNum = img->Height / TILE_SIZE;
329+ RectangleF destRect = Rectangle(0, 0, (int)(TILE_SIZE * fZoom), (int)(TILE_SIZE*fZoom));
330+ System::Drawing::Font^ fnt = gcnew System::Drawing::Font(_T("MS UI Gothic"), 10);
331+ Pen^ pmPen = gcnew Pen(Color::Blue);
332+ Drawing::Brush^ brush = Drawing::Brushes::White;
331333
332- // GroupIDとPanelIDを表示(選択しているグループのみ
333- // 何も選択していない場合、全グループの設定を表示
334-
335- // groupを全部表示?
336- // 選択しているグループのみ表示
337-
338- for each( Generic::KeyValuePair<int,GGroupPanel^>^ p in GStaticData::staticData->m_GroupManager->m_mapGroupPanels){
339- int nMapItemID = p->Key;
340- if(this->m_nSelGroupID < 0 ){
341- } else if(this->m_nSelGroupID != p->Value->m_nGroupID){
342- continue;
343- }
344- // 位置を特定
345- int nX = nMapItemID % nColumnPerRow;
346- int nY = nMapItemID / nColumnPerRow;
347- e->Graphics->DrawString(
348- String::Format("G:{0},PT:{1}", p->Value->m_nGroupID,
349- p->Value->m_nGroupPanelType),
350- fnt,brush,nX*TILE_SIZE*fZoom,nY*TILE_SIZE*fZoom);
334+ // 範囲選択用情報
335+ //SelectData^ sel = GStaticData::staticData->m_PaletteSelData;
351336
352- }
337+ // GroupIDとPanelIDを表示(選択しているグループのみ
338+ // 何も選択していない場合、全グループの設定を表示
353339
354- // sel
355- if(this->m_nMouseCoordX >= 0 && this->m_nMouseCoordX < nColumnNum&&
356- this->m_nMouseCoordY >= 0 && this->m_nMouseCoordY < nRowNum )
357- {
358- e->Graphics->DrawImage(imgSelect,
359- this->m_nMouseCoordX* TILE_SIZE * fZoom,
360- this->m_nMouseCoordY* TILE_SIZE * fZoom,
361- TILE_SIZE * fZoom, TILE_SIZE * fZoom);
362- }
363- //bool bIsDrawSelectedRange = false;
340+ // groupを全部表示?
341+ // 選択しているグループのみ表示
342+
343+ for each(Generic::KeyValuePair<int, GGroupPanel^>^ p in GStaticData::staticData->m_GroupManager->m_mapGroupPanels) {
344+ int nMapItemID = p->Key;
345+ if (this->m_nSelGroupID < 0) {
346+ }
347+ else if (this->m_nSelGroupID != p->Value->m_nGroupID) {
348+ continue;
349+ }
350+ // 位置を特定
351+ int nX = nMapItemID % nColumnPerRow;
352+ int nY = nMapItemID / nColumnPerRow;
353+ e->Graphics->DrawString(
354+ String::Format("G:{0},PT:{1}", p->Value->m_nGroupID,
355+ p->Value->m_nGroupPanelType),
356+ fnt, brush, nX*TILE_SIZE*fZoom, nY*TILE_SIZE*fZoom);
357+
358+ }
359+
360+ // sel
361+ if (this->m_nMouseCoordX >= 0 && this->m_nMouseCoordX < nColumnNum&&
362+ this->m_nMouseCoordY >= 0 && this->m_nMouseCoordY < nRowNum)
363+ {
364+ e->Graphics->DrawImage(imgSelect,
365+ this->m_nMouseCoordX* TILE_SIZE * fZoom,
366+ this->m_nMouseCoordY* TILE_SIZE * fZoom,
367+ TILE_SIZE * fZoom, TILE_SIZE * fZoom);
368+ }
369+ //bool bIsDrawSelectedRange = false;
364370 // switch( GStaticData::staticData->getToolType()) {
365371 // case ToolType::PENCIL:
366372 // case ToolType::RECT:
@@ -424,184 +430,193 @@
424430 // break;
425431 // } // switch tool type
426432
427- // GRID
428- if( GStaticData::staticData->m_bIsShowGridPalette ) {
429- // draw grid!
433+ // GRID
434+ if (GStaticData::staticData->m_bIsShowGridPalette) {
435+ // draw grid!
430436
431- // horizontal
432- for( int y = 0; y < nRowNum; y ++ ) {
433- e->Graphics->FillRectangle(
434- Brushes::White,
435- 0, (int)(y * TILE_SIZE * fZoom),
436- (int)(nColumnNum * TILE_SIZE * fZoom), 1 );
437+ // horizontal
438+ for (int y = 0; y < nRowNum; y++) {
439+ e->Graphics->FillRectangle(
440+ Brushes::White,
441+ 0, (int)(y * TILE_SIZE * fZoom),
442+ (int)(nColumnNum * TILE_SIZE * fZoom), 1);
437443
438- }
444+ }
439445
440- // vertical
441- for( int x = 0; x < nColumnNum; x ++ ) {
442- e->Graphics->FillRectangle(
443- Brushes::White,
444- (int)(x * TILE_SIZE * fZoom), 0,
445- 1, (int)(nRowNum * TILE_SIZE * fZoom ));
446+ // vertical
447+ for (int x = 0; x < nColumnNum; x++) {
448+ e->Graphics->FillRectangle(
449+ Brushes::White,
450+ (int)(x * TILE_SIZE * fZoom), 0,
451+ 1, (int)(nRowNum * TILE_SIZE * fZoom));
446452
447- }
448- }
449- }
450-private: System::Void listBoxPanelType_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
451- this->m_nSelPanelType = this->listBoxPanelType->SelectedIndex-1;
452- this->Refresh();
453- }
454-private: System::Void listBoxGroupID_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
455- this->m_nSelGroupID = this->listBoxGroupID->SelectedIndex;
456- // repaint
457- this->Refresh();
458- }
459-private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) {
453+ }
454+ }
455+ }
456+ private: System::Void listBoxPanelType_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
457+ this->m_nSelPanelType = this->listBoxPanelType->SelectedIndex - 1;
458+ this->Refresh();
459+ }
460+ private: System::Void listBoxGroupID_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e) {
461+ this->m_nSelGroupID = this->listBoxGroupID->SelectedIndex;
462+ // repaint
463+ this->Refresh();
464+ }
465+ private: System::Void pictureBox1_Click(System::Object^ sender, System::EventArgs^ e) {
460466
461467
462- }
463- public:
464- void selectGroupID(int nGroupID){
465- if(nGroupID < 0 || nGroupID >= this->listBoxGroupID->Items->Count){
466- return;
468+ }
469+ public:
470+ void selectGroupID(int nGroupID) {
471+ if (nGroupID < 0 || nGroupID >= this->listBoxGroupID->Items->Count) {
472+ return;
473+ }
474+ this->listBoxGroupID->SelectedIndex = nGroupID;
475+ }
476+ void selectPanelType(int nPanelType) {
477+ if (nPanelType < -1 || nPanelType >= this->listBoxPanelType->Items->Count) {
478+ return;
479+ }
480+ this->listBoxPanelType->SelectedIndex = nPanelType + 1;
481+ this->m_nSelPanelType = nPanelType;
482+ }
483+ private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
484+ int nNewGroupID = this->listBoxGroupID->Items->Count;
485+ this->listBoxGroupID->Items->Add("" + nNewGroupID);
486+ //// group listを追加
487+ //GGroup^ g = gcnew GGroup();
488+ //g->m_nGroupID = nNewGroupID;
489+ //GStaticData::staticData->m_GroupManager->m_mapGroups[nNewGroupID] = g;
490+ //// listに追加
491+ }
492+ private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
493+ // ラストを削除する
494+ //if(this->listBoxGroupID->Items->Count <= 0){
495+ // return;
496+ //}
497+ //this->listBoxGroupID->Items->RemoveAt(this->listBoxGroupID->Items->Count-1);
498+ //// group dataも削除
499+
500+ }
501+ private: System::Void openToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
502+ this->openFileDialog1->Filter = "Text file(*.txt)|*.txt|All file(*.*)|*.*";
503+ if (this->openFileDialog1->ShowDialog() == Windows::Forms::DialogResult::OK) {
504+ GStaticData::staticData->m_GroupManager->load(
505+ this->openFileDialog1->FileName);
506+ // 登録
507+ this->setupGroupByStaticData();
508+ // change pre-load
509+ // change pre-load
510+ HPLNetLibTool::changeConfiguration(
511+ GStaticData::CFG_DEFAULT_GROUP, this->openFileDialog1->FileName);
512+ }
513+ this->Refresh();
514+ }
515+ private: System::Void saveAsToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
516+ this->saveFileDialog1->Filter = "Text file(*.txt)|*.txt|All File(*.*)|*.*";
517+ if (this->saveFileDialog1->ShowDialog() == Windows::Forms::DialogResult::OK) {
518+ // save groups
519+ GStaticData::staticData->m_GroupManager->save(
520+ this->saveFileDialog1->FileName);
521+ // change pre-load
522+ // change pre-load
523+ HPLNetLibTool::changeConfiguration(
524+ GStaticData::CFG_DEFAULT_GROUP, this->openFileDialog1->FileName);
525+ }
526+ }
527+
528+ public:
529+ void setupGroupByStaticData() {
530+ this->listBoxGroupID->Items->Clear();
531+ int nMaxGroupID = -1;
532+ // 最大のグループID→その数だけ用意する
533+ for each(Generic::KeyValuePair<int, GGroupPanel^>^ gp in GStaticData::staticData->m_GroupManager->m_mapGroupPanels) {
534+ if (gp->Value->m_nGroupID > nMaxGroupID) {
535+ nMaxGroupID = gp->Value->m_nGroupID;
467536 }
468- this->listBoxGroupID->SelectedIndex = nGroupID;
469- }
470- void selectPanelType(int nPanelType){
471- if(nPanelType < -1 || nPanelType>=this->listBoxPanelType->Items->Count){
472- return;
473- }
474- this->listBoxPanelType->SelectedIndex = nPanelType+1;
475- this->m_nSelPanelType = nPanelType;
476- }
477-private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
478- int nNewGroupID = this->listBoxGroupID->Items->Count;
479- this->listBoxGroupID->Items->Add(""+nNewGroupID);
480- //// group listを追加
481- //GGroup^ g = gcnew GGroup();
482- //g->m_nGroupID = nNewGroupID;
483- //GStaticData::staticData->m_GroupManager->m_mapGroups[nNewGroupID] = g;
484- //// listに追加
485- }
486-private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
487- // ラストを削除する
488- //if(this->listBoxGroupID->Items->Count <= 0){
489- // return;
490- //}
491- //this->listBoxGroupID->Items->RemoveAt(this->listBoxGroupID->Items->Count-1);
492- //// group dataも削除
493-
494- }
495-private: System::Void openToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
496- this->openFileDialog1->Filter = "Text file(*.txt)|*.txt|All file(*.*)|*.*";
497- if( this->openFileDialog1->ShowDialog() == Windows::Forms::DialogResult::OK ) {
498- GStaticData::staticData->m_GroupManager->load(
499- this->openFileDialog1->FileName);
500- // 登録
501- this->setupGroupByStaticData();
502- }
503- this->Refresh();
504- }
505-private: System::Void saveAsToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
506- this->saveFileDialog1->Filter = "Text file(*.txt)|*.txt|All File(*.*)|*.*";
507- if( this->saveFileDialog1->ShowDialog() == Windows::Forms::DialogResult::OK ) {
508- // save groups
509- GStaticData::staticData->m_GroupManager->save(
510- this->saveFileDialog1->FileName);
511- }
512- }
513-
514- public:
515- void setupGroupByStaticData(){
516- this->listBoxGroupID->Items->Clear();
517- int nMaxGroupID = -1;
518- // 最大のグループID→その数だけ用意する
519- for each( Generic::KeyValuePair<int,GGroupPanel^>^ gp in GStaticData::staticData->m_GroupManager->m_mapGroupPanels){
520- if(gp->Value->m_nGroupID > nMaxGroupID){
521- nMaxGroupID = gp->Value->m_nGroupID;
522- }
523- }
524- if( nMaxGroupID >= 0)
537+ }
538+ if (nMaxGroupID >= 0)
539+ {
540+ for (int i = 0; i < nMaxGroupID + 1; i++)
525541 {
526- for( int i = 0; i < nMaxGroupID + 1; i ++ )
527- {
528- this->listBoxGroupID->Items->Add(""+i);
529- }
542+ this->listBoxGroupID->Items->Add("" + i);
530543 }
531- }
544+ }
545+ }
532546
533-private: System::Void pictureBox1_MouseMove(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
534- this->updateMousePos(e->X,e->Y);
535- }
547+ private: System::Void pictureBox1_MouseMove(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
548+ this->updateMousePos(e->X, e->Y);
549+ }
536550
537- private:
538- void updateMousePos(int nMouseX,int nMouseY){
539- const int TILE_SIZE = GStaticData::staticData->m_nTileSize;
540- float fZoom = GStaticData::staticData->getZoomPalette();
541- this->m_nMouseCoordX = (int)(nMouseX / (TILE_SIZE * fZoom));
542- this->m_nMouseCoordY = (int)(nMouseY / (TILE_SIZE * fZoom));
543- }
551+ private:
552+ void updateMousePos(int nMouseX, int nMouseY) {
553+ const int TILE_SIZE = GStaticData::staticData->m_nTileSize;
554+ float fZoom = GStaticData::staticData->getZoomPalette();
555+ this->m_nMouseCoordX = (int)(nMouseX / (TILE_SIZE * fZoom));
556+ this->m_nMouseCoordY = (int)(nMouseY / (TILE_SIZE * fZoom));
557+ }
544558
545-private: System::Void pictureBox1_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
546- // 右クリック→読み取り(GroupID)
547- // 左クリック→選択したGourpID、PanelTypeで指定。重複したものは…とりあえず虫
548- switch( e->Button ) {
549- case Forms::MouseButtons::Left: // left press
550- {
551- // 範囲外なら何もしない
552- // apply selected group and paneltype
553- int nMapItemID = GStaticData::staticData->m_BlockTypeManager->getIDFromColRow(
554- this->m_nMouseCoordX,this->m_nMouseCoordY);
555- // find if exists
556- GGroupPanel^ p = GStaticData::staticData->m_GroupManager->getGroupPanelByMapItemID(
557- nMapItemID);
558- // remove if exists
559- if(p){
560- GStaticData::staticData->m_GroupManager->removeGroupPanel(
561- p->m_nGroupID, nMapItemID);
562- }
563- if(this->m_nSelPanelType < 0 ){
564- // NONEにする
565-
566- break;
567- } else{
568- }
569- if(this->m_nSelGroupID < 0){
570- break;
571- }
572- // セット
573- // 既存のセットがあったら消す
574- GStaticData::staticData->m_GroupManager->removeGroupPanel(
575- this->m_nSelGroupID, this->m_nSelPanelType);
576-
577- // 追加
578- GStaticData::staticData->m_GroupManager->addGroupPanel(
579- this->m_nSelGroupID,
580- this->m_nSelPanelType,
581- nMapItemID);
582- this->Refresh();
583- }
559+ private: System::Void pictureBox1_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
560+ // 右クリック→読み取り(GroupID)
561+ // 左クリック→選択したGourpID、PanelTypeで指定。重複したものは…とりあえず虫
562+ switch (e->Button) {
563+ case Forms::MouseButtons::Left: // left press
564+ {
565+ // 範囲外なら何もしない
566+ // apply selected group and paneltype
567+ int nMapItemID = GStaticData::staticData->m_BlockTypeManager->getIDFromColRow(
568+ this->m_nMouseCoordX, this->m_nMouseCoordY);
569+ // find if exists
570+ GGroupPanel^ p = GStaticData::staticData->m_GroupManager->getGroupPanelByMapItemID(
571+ nMapItemID);
572+ // remove if exists
573+ if (p) {
574+ GStaticData::staticData->m_GroupManager->removeGroupPanel(
575+ p->m_nGroupID, nMapItemID);
576+ }
577+ if (this->m_nSelPanelType < 0) {
578+ // NONEにする
579+
584580 break;
585- case Forms::MouseButtons::Right: // right click
586- // refer its panel type and group
587- {
588- int nMapItemID = GStaticData::staticData->m_BlockTypeManager->getIDFromColRow(
589- this->m_nMouseCoordX,this->m_nMouseCoordY);
590- GGroupPanel^ gp = GStaticData::staticData->m_GroupManager->getGroupPanelByMapItemID(
591- nMapItemID);
592- if(!gp){
593- break;
594- }
595- this->selectGroupID(gp->m_nGroupID);
596- this->selectPanelType(gp->m_nGroupPanelType);
581+ }
582+ else {
583+ }
584+ if (this->m_nSelGroupID < 0) {
585+ break;
586+ }
587+ // セット
588+ // 既存のセットがあったら消す
589+ GStaticData::staticData->m_GroupManager->removeGroupPanel(
590+ this->m_nSelGroupID, this->m_nSelPanelType);
597591
598- }
592+ // 追加
593+ GStaticData::staticData->m_GroupManager->addGroupPanel(
594+ this->m_nSelGroupID,
595+ this->m_nSelPanelType,
596+ nMapItemID);
597+ this->Refresh();
598+ }
599+ break;
600+ case Forms::MouseButtons::Right: // right click
601+ // refer its panel type and group
602+ {
603+ int nMapItemID = GStaticData::staticData->m_BlockTypeManager->getIDFromColRow(
604+ this->m_nMouseCoordX, this->m_nMouseCoordY);
605+ GGroupPanel^ gp = GStaticData::staticData->m_GroupManager->getGroupPanelByMapItemID(
606+ nMapItemID);
607+ if (!gp) {
599608 break;
600609 }
601- }
602-private: System::Void GroupEditor_FormClosing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e) {
603- e->Cancel = true;
604- this->Hide();
605- }
606-};
610+ this->selectGroupID(gp->m_nGroupID);
611+ this->selectPanelType(gp->m_nGroupPanelType);
612+
613+ }
614+ break;
615+ }
616+ }
617+ private: System::Void GroupEditor_FormClosing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e) {
618+ e->Cancel = true;
619+ this->Hide();
620+ }
621+ };
607622 }
--- DXProject/Evigen2MapEditor/Evigen2MapEditor/Palette.h (revision 3231)
+++ DXProject/Evigen2MapEditor/Evigen2MapEditor/Palette.h (revision 3232)
@@ -70,7 +70,8 @@
7070 // block000.txtをデフォルトでロードしておく
7171 GStaticData::staticData->m_BlockTypeManager->loadBlockFile("data\\maps\\Block000.txt",
7272 GStaticData::staticData->m_PortableLogger,
73- img);
73+ img,
74+ GStaticData::staticData->m_nTileSize);
7475
7576 GStaticData::staticData->m_PaletteSelData->unselect(true);
7677
@@ -2520,6 +2521,21 @@
25202521 }
25212522
25222523 }
2524+public: void resizePaletteFitToSize() {
2525+ //const int TILE_SIZE = GStaticData::staticData->m_nTileSize;
2526+ float fZoom = GStaticData::staticData->getZoomPalette();
2527+ Image^ img = GStaticData::staticData->m_SpriteContainer->getImage(
2528+ GStaticData::staticData->getCommonSpriteID(),
2529+ GStaticData::staticData->getTileSeqID(), 0);
2530+ Drawing::Size s = Drawing::Size(img->Width*fZoom, img->Height*fZoom);
2531+ this->pictureBox1->Size = s;
2532+ this->panel1->AutoScrollMinSize = s;
2533+ //this->m_MainFrame->getPict()->Size = Drawing::Size(
2534+ // GStaticData::staticData->m_Project->m_Size.Width * TILE_SIZE * fZoom,
2535+ // GStaticData::staticData->m_Project->m_Size.Height * TILE_SIZE * fZoom);
2536+
2537+
2538+}
25232539 };
25242540 }
25252541
--- DXProject/HPLAirscapeLib/src/minerva/MinervaGUI.h (revision 3231)
+++ DXProject/HPLAirscapeLib/src/minerva/MinervaGUI.h (revision 3232)
@@ -61,6 +61,8 @@
6161 int m_nSelectedIndex;
6262 int m_nButtonIndex;
6363 int m_nDefaultIndex;
64+ // なんのDialogか指定したい場合に。
65+ int m_nDialogType;
6466 private:
6567 bool m_bIsEnable;
6668 public:
@@ -68,6 +70,10 @@
6870 public:
6971 MinervaDialog() {
7072 this->m_bIsEnable = false;
73+ this->m_nDialogType = 0;
74+ this->m_nSelectedIndex = 0;
75+ this->m_nDefaultIndex = 0;
76+ this->m_strMessage = _T("ダイアログ");
7177 }
7278
7379 void setup(int nDefaultButtonIndex) {
--- DXProject/HPLAirscapeLib/src/minerva/MinervaMenuManager.h (revision 3231)
+++ DXProject/HPLAirscapeLib/src/minerva/MinervaMenuManager.h (revision 3232)
@@ -117,8 +117,9 @@
117117 namespace MenuReturnType {
118118 enum MenuReturnType {
119119 SYSTEM_MENU, // システムメニューに戻る
120- CLOSE_MENU,
120+ CLOSE_MENU, // そのままメニューを閉じる
121121 SA, // SAに戻る
122+ CLOSE_MENU_CHECK_CONFIRM, // メニューを閉じるが、その前に確認を取る
122123 MAX_NUM
123124 };
124125 }
--- DXProject/HPLNETLib/build/VC9/HPLNetLib/HPLNetBlockTypeManager.cpp (revision 3231)
+++ DXProject/HPLNETLib/build/VC9/HPLNetLib/HPLNetBlockTypeManager.cpp (revision 3232)
@@ -5,7 +5,7 @@
55 //using namespace HPL;
66
77 void HPLNetBlockTypeManager::loadBlockFile( String^ strBlockFilePath, HPLNetPortableLogger^ portableLogger,
8- Image^ imgTile)
8+ Image^ imgTile, int nTileSize)
99 {
1010 List<String^>^ aryResult = gcnew List<String^>();
1111 // encoding
@@ -49,6 +49,7 @@
4949 } else {
5050 }
5151 }
52+ this->m_nTileSize = nTileSize;
5253 // calculate size
5354 this->m_matIDs = gcnew HPLNetMatrix( this->m_nColumnPerRow, imgTile->Height / this->m_nTileSize );
5455 this->m_matIDs->fill(TileType::BLOCK);
--- DXProject/HPLNETLib/build/VC9/HPLNetLib/HPLNetBlockTypeManager.h (revision 3231)
+++ DXProject/HPLNETLib/build/VC9/HPLNetLib/HPLNetBlockTypeManager.h (revision 3232)
@@ -25,7 +25,7 @@
2525 int getBlockType(int nMapItemID);
2626 int getBlockType(int nCol, int nRow);
2727 void loadBlockFile( String^ strBlockFilePath, HPLNetPortableLogger^ portableLogger,
28- Image^ imgTile);
28+ Image^ imgTile, int nTileSize);
2929
3030 int getIDFromColRow( int nCol, int nRow);
3131 void getColRowFromID( int nID, int& nCol, int& nRow );
--- DXProject/HPLNETLib/build/VC9/HPLNetLib/HPLNetLib.h (revision 3231)
+++ DXProject/HPLNETLib/build/VC9/HPLNetLib/HPLNetLib.h (revision 3232)
@@ -130,4 +130,19 @@
130130 }
131131 return strResult;
132132 }
133+
134+ /** change configuration item
135+ */
136+ static void changeConfiguration(//System::Configuration::Configuration^ lpConfig,
137+ String^ CFG_LABEL, String^ strConfigData)
138+ {
139+ System::Configuration::Configuration^ lpConfig = System::Configuration::ConfigurationManager::OpenExeConfiguration(
140+ System::Configuration::ConfigurationUserLevel::None);
141+ // remove
142+ lpConfig->AppSettings->Settings->Remove(CFG_LABEL);
143+
144+ // add
145+ lpConfig->AppSettings->Settings->Add(CFG_LABEL, strConfigData);
146+ lpConfig->Save();
147+ }
133148 };
Show on old repository browser