• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン349 (tree)
日時2007-06-26 18:29:02
作者hogepiyo

ログメッセージ

*** empty log message ***

変更サマリ

差分

--- marathon/trunk/MapEditorWX/src/MainFrameDraw.cpp (revision 348)
+++ marathon/trunk/MapEditorWX/src/MainFrameDraw.cpp (revision 349)
@@ -19,6 +19,8 @@
1919 if(!wxWindow::IsExposed(0,0,size.GetWidth(), size.GetHeight())){
2020 return;
2121 }
22+
23+
2224 wxBufferedPaintDC dc(this, this->doubleBufferingBitmap);
2325 PrepareDC(dc);
2426 //dc.Clear();
@@ -182,6 +184,9 @@
182184 int flags = polygon->flags;
183185 int vertexCount = polygon->vertex_count;
184186
187+ if(wxGetApp().getStockManager()->delPolygons[i]){
188+ continue;
189+ }
185190 //まあ無いと思うが…
186191 if(vertexCount == 0){
187192 continue;
--- marathon/trunk/MapEditorWX/src/PolygonNumDialog.cpp (revision 348)
+++ marathon/trunk/MapEditorWX/src/PolygonNumDialog.cpp (revision 349)
@@ -1,21 +1,21 @@
11 #include "PolygonNumDialog.h"
22 #include "MapEditorWX.h"
33 enum{
4- iD_Poly3,
5- iD_Poly4,
6- iD_Poly5,
7- iD_Poly6,
8- iD_Poly7,
9- iD_Poly8,
4+ ID_Poly3,
5+ ID_Poly4,
6+ ID_Poly5,
7+ ID_Poly6,
8+ ID_Poly7,
9+ ID_Poly8,
1010 };
1111
1212 BEGIN_EVENT_TABLE(PolygonNumDialog, wxDialog)
13- EVT_BUTTON(iD_Poly3, PolygonNumDialog::OnPoly3)
14- EVT_BUTTON(iD_Poly4, PolygonNumDialog::OnPoly4)
15- EVT_BUTTON(iD_Poly5, PolygonNumDialog::OnPoly5)
16- EVT_BUTTON(iD_Poly6, PolygonNumDialog::OnPoly6)
17- EVT_BUTTON(iD_Poly7, PolygonNumDialog::OnPoly7)
18- EVT_BUTTON(iD_Poly8, PolygonNumDialog::OnPoly8)
13+ EVT_BUTTON(ID_Poly3, PolygonNumDialog::OnPoly3)
14+ EVT_BUTTON(ID_Poly4, PolygonNumDialog::OnPoly4)
15+ EVT_BUTTON(ID_Poly5, PolygonNumDialog::OnPoly5)
16+ EVT_BUTTON(ID_Poly6, PolygonNumDialog::OnPoly6)
17+ EVT_BUTTON(ID_Poly7, PolygonNumDialog::OnPoly7)
18+ EVT_BUTTON(ID_Poly8, PolygonNumDialog::OnPoly8)
1919 END_EVENT_TABLE()
2020 PolygonNumDialog::PolygonNumDialog()
2121 {
@@ -27,18 +27,18 @@
2727 {
2828 bool result = wxDialog::Create(parent, id, _T("Polygon Num"));
2929 wxBitmap bmp;
30- bmp.LoadFile(_T("data/img/poly3.bmp"));
31- bitmap_button_1 = new wxBitmapButton(this, iD_Poly3, bmp);
32- bmp.LoadFile(_T("data/img/poly4.bmp"));
33- bitmap_button_2 = new wxBitmapButton(this, iD_Poly4, bmp);
34- bmp.LoadFile(_T("data/img/poly5.bmp"));
35- bitmap_button_3 = new wxBitmapButton(this, iD_Poly5, bmp);
36- bmp.LoadFile(_T("data/img/poly6.bmp"));
37- bitmap_button_4 = new wxBitmapButton(this, iD_Poly6, bmp);
38- bmp.LoadFile(_T("data/img/poly7.bmp"));
39- bitmap_button_5 = new wxBitmapButton(this, iD_Poly7, bmp);
40- bmp.LoadFile(_T("data/img/poly8.bmp"));
41- bitmap_button_6 = new wxBitmapButton(this, iD_Poly8, bmp);
30+ bmp.LoadFile(_T("data/img/poly3.bmp"), wxBITMAP_TYPE_BMP);
31+ bitmap_button_1 = new wxBitmapButton(this, ID_Poly3, bmp);
32+ bmp.LoadFile(_T("data/img/poly4.bmp"), wxBITMAP_TYPE_BMP);
33+ bitmap_button_2 = new wxBitmapButton(this, ID_Poly4, bmp);
34+ bmp.LoadFile(_T("data/img/poly5.bmp"), wxBITMAP_TYPE_BMP);
35+ bitmap_button_3 = new wxBitmapButton(this, ID_Poly5, bmp);
36+ bmp.LoadFile(_T("data/img/poly6.bmp"), wxBITMAP_TYPE_BMP);
37+ bitmap_button_4 = new wxBitmapButton(this, ID_Poly6, bmp);
38+ bmp.LoadFile(_T("data/img/poly7.bmp"), wxBITMAP_TYPE_BMP);
39+ bitmap_button_5 = new wxBitmapButton(this, ID_Poly7, bmp);
40+ bmp.LoadFile(_T("data/img/poly8.bmp"), wxBITMAP_TYPE_BMP);
41+ bitmap_button_6 = new wxBitmapButton(this, ID_Poly8, bmp);
4242
4343 //
4444 bitmap_button_1->SetSize(bitmap_button_1->GetBestSize());
--- marathon/trunk/MapEditorWX/src/MainFrameEvent.cpp (revision 348)
+++ marathon/trunk/MapEditorWX/src/MainFrameEvent.cpp (revision 349)
@@ -520,12 +520,15 @@
520520
521521 //点→終点の線を追加
522522 line_data newLine2;
523-
523+ //TODO
524524 }
525525 }else{
526526 //新規追加
527527 if(wxGetApp().isFirstOfLineToAdd){
528528 //最初の点
529+ endpoint_data ep;
530+ assert(hpl::aleph::map::createPoint(wpoint, &ep, POINT_DISTANCE_EPSILON));
531+
529532 }else{
530533 //点を追加
531534 }
@@ -534,6 +537,10 @@
534537 }
535538 }
536539 wxGetApp().isFirstOfLineToAdd = isFirst;
540+
541+ //情報を更新する
542+ wxGetApp().getStockManager()->updateDeletes();
543+
537544 #endif
538545 }
539546 void MapEditorMainFrame::doLButtonOnMagnifyTool(wxMouseEvent& ev)
--- marathon/trunk/MapEditorWX/src/MainFrameMenuEvent.cpp (revision 348)
+++ marathon/trunk/MapEditorWX/src/MainFrameMenuEvent.cpp (revision 349)
@@ -162,6 +162,15 @@
162162 }
163163 void MapEditorMainFrame::OnPreference(wxCommandEvent& ev)
164164 {
165+ //Call up editor preferences dialog
166+ EditorPreferencesDialog dlg;
167+ dlg.Create(this, wxID_ANY);
168+ if(dlg.ShowModal() == wxID_OK){
169+ //ファイルに保存
170+ if(!wxGetApp().setting.saveSetting()){
171+ hpl::error::caution("Fail to save setting as [%s]", wxGetApp().setting.getFilePath().c_str());
172+ }
173+ }
165174 }
166175
167176 /////////////////////////////////////////////////////////////////////
@@ -169,7 +178,7 @@
169178 // show/hide menus
170179 void MapEditorMainFrame::OnToolDialog(wxCommandEvent& ev)
171180 {
172- //TODO tool dialog
181+ this->toolDialog.Show(!this->toolDialog.IsShown());
173182 }
174183 void MapEditorMainFrame::OnZoomIn(wxCommandEvent& ev)
175184 {
--- marathon/trunk/MapEditorWX/WXTODOリスト.txt (revision 348)
+++ marathon/trunk/MapEditorWX/WXTODOリスト.txt (revision 349)
@@ -33,7 +33,7 @@
3333 ?T?F?f?o?b?O????
3434
3535 Annotation :?f?o?b?O?????i?I?????[?h?͖????j
36-ColorCustomize :?z?u?ς?
36+ColorCustomize :?Ăяo??
3737 EditPreferences :?z?u?ς?
3838 Height :?z?u?ς݁B
3939 HeightPallet :
@@ -153,4 +153,5 @@
153153 ?ۑ????ɃG???R?[?h???邱?Ƃ?Y?ꂸ?ɁI
154154
155155 TODO ?_?C?A???O?̍쐬
156-TODO VisualMode oh visual mode!
\ No newline at end of file
156+TODO VisualMode oh visual mode!
157+TODO Polygon tool
\ No newline at end of file
--- marathon/trunk/HPLLib/HPLStockManager.cpp (revision 348)
+++ marathon/trunk/HPLLib/HPLStockManager.cpp (revision 349)
@@ -42,6 +42,29 @@
4242 }
4343
4444 /**
45+ サイズを実際のものに合わせます
46+*/
47+void hpl::aleph::HPLStockManager::resizeDeletes()
48+{
49+ //points
50+ for(int i = delPoints.size(); i < dynamic_world->endpoint_count; i ++){
51+ delPoints.push_back(false);
52+ }
53+ for(int i = delLines.size(); i < dynamic_world->line_count; i ++){
54+ delLines.push_back(false);
55+ }
56+ for(int i = delSides.size(); i < dynamic_world->side_count; i ++){
57+ delSides.push_back(false);
58+ }
59+ for(int i = delPolygons.size(); i < dynamic_world->polygon_count; i ++){
60+ delPolygons.push_back(false);
61+ }
62+ for(int i = delObjects.size(); i < SavedObjectList.size(); i ++){
63+ delObjects.push_back(false);
64+ }
65+}
66+
67+/**
4568 削除情報を更新します。
4669 具体的にはdynamic_worldの値に合わせて要素数を増加させます
4770 増加分は削除対象ではないのですべてfalseです。
@@ -99,22 +122,7 @@
99122 */
100123 void hpl::aleph::HPLStockManager::updateDeletes()
101124 {
102- //points
103- for(int i = delPoints.size(); i < dynamic_world->endpoint_count; i ++){
104- delPoints.push_back(false);
105- }
106- for(int i = delLines.size(); i < dynamic_world->line_count; i ++){
107- delLines.push_back(false);
108- }
109- for(int i = delSides.size(); i < dynamic_world->side_count; i ++){
110- delSides.push_back(false);
111- }
112- for(int i = delPolygons.size(); i < dynamic_world->polygon_count; i ++){
113- delPolygons.push_back(false);
114- }
115- for(int i = delObjects.size(); i < SavedObjectList.size(); i ++){
116- delObjects.push_back(false);
117- }
125+ this->resizeDeletes();
118126
119127 //点関連の削除対象整理 <en> endpoints
120128 for(int i = 0; i < (int)delPoints.size(); i ++){
--- marathon/trunk/HPLLib/HPLStockManager.h (revision 348)
+++ marathon/trunk/HPLLib/HPLStockManager.h (revision 349)
@@ -14,7 +14,7 @@
1414 ・削除予定のマップアイテム
1515 */
1616 class HPLStockManager{
17- private:
17+ public:
1818 /**ポリゴンの整合性*/
1919 std::vector<bool> polygonValidity;
2020
@@ -42,6 +42,11 @@
4242 //ポリゴン整合性情報を更新します
4343 void updatePolygonValidityStored();
4444
45+ /**
46+ サイズを実際のものに合わせます
47+ */
48+ void resizeDeletes();
49+
4550 //削除対象の覚え書き
4651 //hpl::aleph::map::HPLSelectData toDeleteList;
4752
旧リポジトリブラウザで表示