• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン355 (tree)
日時2007-07-01 01:05:56
作者hogepiyo

ログメッセージ

*** empty log message ***

変更サマリ

差分

--- marathon/trunk/MapEditorWX/src/MapEditorMainFrame.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/MapEditorMainFrame.cpp (revision 355)
@@ -55,10 +55,10 @@
5555 EVT_MENU(ID_TerminalViewer, MapEditorMainFrame::OnTerminalViewer)
5656
5757 //popup
58- EVT_MENU(ID_LineProp, MapEditorMainFrame::OnJumpLevel)
59- EVT_MENU(ID_ClockwiseSideProp, MapEditorMainFrame::OnJumpLevel)
60- EVT_MENU(ID_CounterclockwiseSideProp, MapEditorMainFrame::OnJumpLevel)
61- EVT_MENU(ID_PointProp, MapEditorMainFrame::OnJumpLevel)
58+ EVT_MENU(ID_LineProp, MapEditorMainFrame::OnLineProp)
59+ EVT_MENU(ID_ClockwiseSideProp, MapEditorMainFrame::OnClockwiseSide)
60+ EVT_MENU(ID_CounterclockwiseSideProp, MapEditorMainFrame::OnCounterclockwiseSide)
61+ EVT_MENU(ID_PointProp, MapEditorMainFrame::OnPointProp)
6262
6363 EVT_PAINT(MapEditorMainFrame::OnPaint)
6464 EVT_LEFT_DOWN(MapEditorMainFrame::OnLeftDown)
@@ -111,7 +111,6 @@
111111 this->heightDialog.Show();
112112
113113 //パレット
114- this->ceilingHeightPaletteDialog.Create(this, wx_ID_ANY);
115114 this->heightPaletteDialog.Create(this, wxID_ANY);
116115 this->lightPaletteDialog.Create(this, wxID_ANY);
117116 this->mediaPaletteDialog.Create(this, wxID_ANY);
@@ -127,8 +126,10 @@
127126 this->sidePropDialog.Create(this, wxID_ANY);
128127
129128 //初期化
130- wxCommandEvent dummy;
131- this->OnNew(dummy);
129+ wxGetApp().isChanged = false;
130+ this->initLevel();
131+ //セットアップ
132+ wxGetApp().getStockManager()->updateDeletes();
132133 }
133134 MapEditorMainFrame::~MapEditorMainFrame()
134135 {
--- marathon/trunk/MapEditorWX/src/ColorCustomizeDialog.h (revision 354)
+++ marathon/trunk/MapEditorWX/src/ColorCustomizeDialog.h (revision 355)
@@ -51,6 +51,8 @@
5151 @param type MapEditorOneSetting.hをみよう
5252 */
5353 void drawPanel(wxPanel* panel, int type);
54+ void setPanelColors();
55+ wxColor getColorFromSetting(int type);
5456 };
5557
5658 #endif
--- marathon/trunk/MapEditorWX/src/LevelInfoDialog.h (revision 354)
+++ marathon/trunk/MapEditorWX/src/LevelInfoDialog.h (revision 355)
@@ -38,6 +38,9 @@
3838 virtual ~LevelInfoDialog();
3939 //イベントテーブル作成<en>declare
4040 DECLARE_EVENT_TABLE()
41+
42+ void OnOk(wxCommandEvent &event); // wxGlade: <event_handler>
43+ void OnCancel(wxCommandEvent &event); // wxGlade: <event_handler>
4144 };
4245
4346 #endif
--- marathon/trunk/MapEditorWX/src/LinePropDialog.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/LinePropDialog.cpp (revision 355)
@@ -128,7 +128,7 @@
128128 //line->flags
129129 }
130130 }
131-void LinePropDialog::getLineIndex()
131+int LinePropDialog::getLineIndex()
132132 {
133133 return this->lineIndex;
134134 }
@@ -170,11 +170,11 @@
170170 text_ctrl_45->SetValue(getString("%d", line->length));
171171 text_ctrl_46->SetValue(getString("%d", line->highest_adjacent_floor));
172172 text_ctrl_47->SetValue(getString("%d", line->lowest_adjacent_ceiling));
173- checkbox_45->SetValue(LINE_IS_LANDSCAPED(index));
174- checkbox_52->SetValue(LINE_IS_ELEVATION(index));
175- checkbox_53->SetValue(LINE_IS_VARIABLE_ELEVATION(index));
176- checkbox_54->SetValue(LINE_HAS_TRANSPARENT_SIDE(index));
177- int sel = LINE_IS_SOLID(index) ? 0: 1;
173+ checkbox_45->SetValue(LINE_IS_LANDSCAPED(line));
174+ checkbox_52->SetValue(LINE_IS_ELEVATION(line));
175+ checkbox_53->SetValue(LINE_IS_VARIABLE_ELEVATION(line));
176+ checkbox_54->SetValue(LINE_HAS_TRANSPARENT_SIDE(line));
177+ int sel = LINE_IS_SOLID(line) ? 0: 1;
178178 radio_box_1->SetSelection(sel);
179179 index = line->clockwise_polygon_side_index;
180180 if(index == NONE){
--- marathon/trunk/MapEditorWX/src/PolygonPropDialog.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/PolygonPropDialog.cpp (revision 355)
@@ -198,7 +198,7 @@
198198
199199 //Typeに追加
200200 for(int i = 0; i < NUMBER_OF_POLYGON_TYPE; i ++){
201- choice_12->Insert(wxConvertMB2WX(wxGetApp().polyTypeInfo[i].jname.c_str()), i);
201+ choice_12->Insert(wxConvertMB2WX(wxGetApp().polygonTypeInfo[i].jname.c_str()), i);
202202 }
203203
204204
@@ -269,28 +269,28 @@
269269 polygon_data* poly = get_polygon_data(this->getPolyIndex());
270270 text_ctrl_20->SetValue(getString("%d", this->getPolyIndex()));
271271 choice_12->SetSelection(poly->type);
272- text_ctrl_25->SetValue(getString("%d", poly->permutation);
273- choice_13->SetSelection(poly->floor_light);
274- choice_14->SetSelection(poly->ceiling_light);
275- text_ctrl_26->SetValue(getString("%d", poly->permutation);
272+ text_ctrl_25->SetValue(getString("%d", poly->permutation));
273+ choice_13->SetSelection(poly->floor_lightsource_index);
274+ choice_14->SetSelection(poly->ceiling_lightsource_index);
275+ text_ctrl_26->SetValue(getString("%d", poly->permutation));
276276 int index = poly->first_object;
277277 if(index == NONE){
278278 index = SavedObjectList.size();
279279 }
280280 choice_19->SetSelection(index);
281- text_ctrl_28->SetValue(getString("%d", poly->first_exclusion_zone_index);
282- text_ctrl_29->SetValue(getString("%d", poly->line_exclusion_zone_index);
283- text_ctrl_30->SetValue(getString("%d", poly->floor_transfer_mode);
284- text_ctrl_31->SetValue(getString("%d", poly->ceiling_transfer_mode);
281+ text_ctrl_28->SetValue(getString("%d", poly->first_exclusion_zone_index));
282+ text_ctrl_29->SetValue(getString("%d", poly->line_exclusion_zone_count));
283+ text_ctrl_30->SetValue(getString("%d", poly->floor_transfer_mode));
284+ text_ctrl_31->SetValue(getString("%d", poly->ceiling_transfer_mode));
285285
286- text_ctrl_21->SetValue(getString("%d", poly->first_neighbor_index);
287- text_ctrl_22->SetValue(getString("%d", poly->neighbor_count);
288- text_ctrl_23->SetValue(getString("%d", poly->center.x);
289- text_ctrl_24->SetValue(getString("%d", poly->center.y);
290- text_ctrl_33->SetValue(getString("%d", poly->floor_origin.x);
291- text_ctrl_35->SetValue(getString("%d", poly->floor_origin.y);
292- text_ctrl_34->SetValue(getString("%d", poly->ceiling_origin.x);
293- text_ctrl_36->SetValue(getString("%d", poly->ceiling_origin.y);
286+ text_ctrl_21->SetValue(getString("%d", poly->first_neighbor_index));
287+ text_ctrl_22->SetValue(getString("%d", poly->neighbor_count));
288+ text_ctrl_23->SetValue(getString("%d", poly->center.x));
289+ text_ctrl_24->SetValue(getString("%d", poly->center.y));
290+ text_ctrl_33->SetValue(getString("%d", poly->floor_origin.x));
291+ text_ctrl_35->SetValue(getString("%d", poly->floor_origin.y));
292+ text_ctrl_34->SetValue(getString("%d", poly->ceiling_origin.x));
293+ text_ctrl_36->SetValue(getString("%d", poly->ceiling_origin.y));
294294 index = poly->media_index;
295295 if(index == NONE){
296296 index = MediaList.size();
--- marathon/trunk/MapEditorWX/src/SidePropDialog.h (revision 354)
+++ marathon/trunk/MapEditorWX/src/SidePropDialog.h (revision 355)
@@ -4,7 +4,9 @@
44 #include "DlgCommon.h"
55
66 class SidePropDialog: public wxDialog{
7+ int index;
78 public:
9+ void setIndex(int ind);
810 SidePropDialog();
911 bool Create(wxWindow* parent, wxWindowID id);
1012 virtual ~SidePropDialog();
--- marathon/trunk/MapEditorWX/src/LightPaletteDialog.h (revision 354)
+++ marathon/trunk/MapEditorWX/src/LightPaletteDialog.h (revision 355)
@@ -7,6 +7,7 @@
77 wxButton* button_31;
88 wxButton* button_30;
99 wxListCtrl* list_ctrl_5;
10+ bool isFloor_;
1011 public:
1112 LightPaletteDialog();
1213 bool Create(wxWindow* parent, wxWindowID id);
@@ -16,6 +17,8 @@
1617 void OnAdd(wxCommandEvent &event); // wxGlade: <event_handler>
1718 void OnDelete(wxCommandEvent &event); // wxGlade: <event_handler>
1819 void OnEdit(wxListEvent &event); // wxGlade: <event_handler>
20+public:
21+ void setFloor(bool fl);
1922 };
2023
2124 #endif
--- marathon/trunk/MapEditorWX/src/MainFrameDraw.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/MainFrameDraw.cpp (revision 355)
@@ -348,9 +348,9 @@
348348 }
349349 void MapEditorMainFrame::drawPoints(wxDC* dc)
350350 {
351- if(!wxGetApp().setting.flags[IS_SHOW_POINTS]){
352- return;
353- }
351+ //if(!wxGetApp().setting.flags[IS_SHOW]){
352+ // return;
353+ //}
354354 //高さ制限
355355 int zMin = wxGetApp().getViewGridManager()->getViewHeightMin();
356356 int zMax = wxGetApp().getViewGridManager()->getViewHeightMax();
@@ -367,10 +367,12 @@
367367 int vpoint[2];
368368 wxGetApp().getViewPointFromWorldPoint(ep->vertex, vpoint);
369369
370+ int SIZE = 5;
370371 //点(小さい四角)を打つ
371372 dc->SetPen(this->pointPen);
372373 dc->SetBrush(this->pointBrush);
373-
374+ dc->DrawRectangle(vpoint[0] - SIZE / 2, vpoint[1] - SIZE / 2,
375+ SIZE, SIZE);
374376 //選択中ならしるしをつける
375377 if(wxGetApp().selectData.isSelected() &&
376378 wxGetApp().selectData.containsPoint(i))
@@ -377,7 +379,6 @@
377379 {
378380 dc->SetPen(this->selectedLinePen);
379381 dc->SetBrush(*wxTRANSPARENT_BRUSH);
380- int SIZE = 5;
381382 dc->DrawRectangle(vpoint[0] - SIZE / 2, vpoint[1] - SIZE / 2,
382383 SIZE, SIZE);
383384 }
--- marathon/trunk/MapEditorWX/src/PointPropDialog.h (revision 354)
+++ marathon/trunk/MapEditorWX/src/PointPropDialog.h (revision 355)
@@ -23,7 +23,9 @@
2323 wxTextCtrl* text_ctrl_19;
2424 wxStaticText* label_33;
2525 wxChoice* choice_11;
26+ int index;
2627 public:
28+ void setIndex(int ind);
2729 PointPropDialog();
2830 bool Create(wxWindow* parent, wxWindowID id);
2931 virtual ~PointPropDialog();
--- marathon/trunk/MapEditorWX/src/TextureDialog.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/TextureDialog.cpp (revision 355)
@@ -1,5 +1,12 @@
11 #include "TextureDialog.h"
22 #include "MapEditorWX.h"
3+
4+const int TEX_ICON_SIZE = 32;
5+const int INTERVAL_X = 10;
6+const int INTERVAL_Y = 10;
7+const int TEX_TOP = 10;
8+const int TEX_LEFT = 10;
9+
310 enum{
411 ID_TYPE,
512 };
@@ -40,7 +47,11 @@
4047 if(false){
4148 hpl::error::caution("Shapes file not loaded");
4249 Destroy();
50+ return false;
4351 }
52+
53+ //Shapesデータからサイズを計算します
54+
4455 return result;
4556 }
4657 void TextureDialog::OnType(wxCommandEvent &event)
--- marathon/trunk/MapEditorWX/src/PlacementDialog.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/PlacementDialog.cpp (revision 355)
@@ -23,7 +23,7 @@
2323 EVT_BUTTON(ID_ALL_INF, PlacementDialog::OnAllInf)
2424 EVT_BUTTON(ID_SET_INITIAL, PlacementDialog::OnSetInitial)
2525 EVT_BUTTON(wxID_OK, PlacementDialog::OnOk)
26- EVT_LIST_ITEM_SELECTED(ID_SEL,
26+ EVT_LIST_ITEM_SELECTED(ID_SEL, PlacementDialog::OnSel)
2727 END_EVENT_TABLE()
2828
2929 PlacementDialog::PlacementDialog():wxDialog()
@@ -37,7 +37,9 @@
3737 const int COLUMN_NUM = 7;
3838
3939 static void addListItem(wxListCtrl* lstctrl, object_frequency_definition* placement, wxString type,
40- int id){
40+ int id)
41+{
42+ assert(placement);
4143 wxString str[COLUMN_NUM];
4244 str[0] = type;
4345 str[1] = getString("%d", placement->minimum_count);
@@ -183,44 +185,45 @@
183185 event.Skip();
184186 std::cout<<"Event handler (PlacementDialog::OnRandomChance) not implemented yet"<<std::endl; //notify the user that he hasn't implemented the event handler yet
185187 }
186-void PlacementDialog::OnSel(wxCommandEvent &ev)
188+void PlacementDialog::OnSel(wxListEvent &ev)
187189 {
190+ int sel = ev.GetSelection();
188191 }
189192 void PlacementDialog::OnRandomPlace(wxCommandEvent& ev)
190193 {
191194 }
195+/*
192196 void PlacementDialog::setPlacementText()
193197 {
194- int sel = this->list_ctrl_1->GetSelection();
195- if(sel >= 0){
196- object_frequency_definition* placement;
197- //対象をデータで書き換える
198- if(sel >= NUMBER_OF_DEFINED_ITEMS){
199- placement =
200- hpl::aleph::map::getPlacementData(_saved_item,
201- sel - NUMBER_OF_DEFINED_ITEMS);
202- }else{
203- placement =
204- hpl::aleph::map::getPlacementData(_saved_monster, sel);
205- }
206- assert(placement);
198+ object_frequency_definition* placement;
199+ //対象をデータで書き換える
200+ if(sel >= NUMBER_OF_DEFINED_ITEMS){
201+ placement =
202+ hpl::aleph::map::getPlacementData(_saved_item,
203+ sel - NUMBER_OF_DEFINED_ITEMS);
204+ }else{
205+ placement =
206+ hpl::aleph::map::getPlacementData(_saved_monster, sel);
207+ }
208+ assert(placement);
207209
208- wxString str[COLUMN_NUM];
209- str[0] = type;
210- str[1] = getString("%d", placement->minimum_count);
211- str[2] = getString("%d", placement->maximum_count);
212- str[3] = getString("%d", placement->initial_count);
213- str[4] = getString("%d", placement->random_count);
214- str[5] = getString("%d", placement->random_chance);
215- str[6] = getString("%d", placement->flags);
210+ wxString str[COLUMN_NUM];
211+ str[0] = type;
212+ str[1] = getString("%d", placement->minimum_count);
213+ str[2] = getString("%d", placement->maximum_count);
214+ str[3] = getString("%d", placement->initial_count);
215+ str[4] = getString("%d", placement->random_count);
216+ str[5] = getString("%d", placement->random_chance);
217+ str[6] = getString("%d", placement->flags);
216218
217- for(int j = 0; j < COLUMN_NUM; j ++){
218- wxListItem item;
219- item.SetId(sel);
220- item.SetColumn(j);
221- item.SetText(str[j]);
222- lstctrl->SetItem(item);
223- }
219+ for(int j = 0; j < COLUMN_NUM; j ++){
220+ wxListItem item;
221+ item.SetId(sel);
222+ item.SetColumn(j);
223+ item.SetText(str[j]);
224+ lstctrl->SetItem(item);
225+ }
224226
225- }
227+ //}
226228 }
229+*/
\ No newline at end of file
--- marathon/trunk/MapEditorWX/src/EditorPreferencesDialog.h (revision 354)
+++ marathon/trunk/MapEditorWX/src/EditorPreferencesDialog.h (revision 355)
@@ -28,7 +28,6 @@
2828 void OnOk(wxCommandEvent &event); // wxGlade: <event_handler>
2929 void OnCancel(wxCommandEvent &event); // wxGlade: <event_handler>
3030 void OnColor(wxCommandEvent &event);
31- void OnGrid(wxCommandEvent &event);
3231 };
3332
3433 #endif
--- marathon/trunk/MapEditorWX/src/ColorCustomizeDialog.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/ColorCustomizeDialog.cpp (revision 355)
@@ -17,7 +17,7 @@
1717 EVT_BUTTON(ID_POINTS, ColorCustomizeDialog::OnPoints)
1818 EVT_BUTTON(wxID_OK, ColorCustomizeDialog::OnOk)
1919 EVT_BUTTON(wxID_CANCEL, ColorCustomizeDialog::OnCancel)
20- EVT_PAINT(ColorCustomizeDialog::OnPaint)
20+// EVT_PAINT(ColorCustomizeDialog::OnPaint)
2121 END_EVENT_TABLE()
2222
2323 ColorCustomizeDialog::ColorCustomizeDialog()
@@ -94,8 +94,62 @@
9494
9595 memcpy(&this->colorSetting, &color, sizeof(ColorSettings));
9696
97+ //色設定
98+ this->setPanelColors();
9799 return result;
98100 }
101+wxColor ColorCustomizeDialog::getColorFromSetting(int type)
102+{
103+ int col[COL_NUM];
104+
105+ switch(type){
106+ case ColorType::Background:
107+ for(int i = 0; i < COL_NUM; i ++){
108+ col[i] = this->colorSetting.background[i];
109+ }
110+ break;
111+ case ColorType::GridLine:
112+ for(int i = 0; i < COL_NUM; i ++){
113+ col[i] = this->colorSetting.gridLine[i];
114+ }
115+ break;
116+ case ColorType::Lines:
117+ for(int i = 0; i < COL_NUM; i ++){
118+ col[i] = this->colorSetting.lines[i];
119+ }
120+ break;
121+ case ColorType::Polygons:
122+ for(int i = 0; i < COL_NUM; i ++){
123+ col[i] = this->colorSetting.polygons[i];
124+ }
125+ break;
126+ case ColorType::Strings:
127+ for(int i = 0; i < COL_NUM; i ++){
128+ col[i] = this->colorSetting.strings[i];
129+ }
130+ break;
131+ case ColorType::Points:
132+ for(int i = 0; i < COL_NUM; i ++){
133+ col[i] = this->colorSetting.points[i];
134+ }
135+ break;
136+ default:
137+ break;
138+ }
139+ wxColor color(col[0], col[1], col[2]);
140+ return color;
141+}
142+
143+void ColorCustomizeDialog::setPanelColors()
144+{
145+ panel_1->SetBackgroundColour(getColorFromSetting(ColorType::Background));
146+ panel_2->SetBackgroundColour(getColorFromSetting(ColorType::GridLine));
147+ panel_3->SetBackgroundColour(getColorFromSetting(ColorType::Lines));
148+ panel_4->SetBackgroundColour(getColorFromSetting(ColorType::Polygons));
149+ panel_5->SetBackgroundColour(getColorFromSetting(ColorType::Strings));
150+ panel_6->SetBackgroundColour(getColorFromSetting(ColorType::Points));
151+ Refresh();
152+}
99153 void ColorCustomizeDialog::OnOk(wxCommandEvent& ev)
100154 {
101155 SetReturnCode(wxID_OK);
@@ -107,57 +161,48 @@
107161 Destroy();
108162 }
109163 void ColorCustomizeDialog::setColor(int cols[]){
110- wxColor col = wxGetColourFromUser(this);
164+ wxColor defCol(cols[0], cols[1], cols[2]);
165+ wxColor col = wxGetColourFromUser(this, defCol);
111166 cols[0] = col.Red();
112167 cols[1] = col.Green();
113168 cols[2] = col.Blue();
169+ this->colorSetting.type = COL_CUSTOM;
170+ this->setPanelColors();
114171 }
115172
116173 void ColorCustomizeDialog::OnBackground(wxCommandEvent &event)
117174 {
118- ColorSettings* cols = wxGetApp().setting.getColorSetting();
119- cols->type = COL_CUSTOM;
120- setColor(cols->background);
175+ setColor(colorSetting.background);
121176 }
122177
123178
124179 void ColorCustomizeDialog::OnGrid(wxCommandEvent &event)
125180 {
126- ColorSettings* cols = wxGetApp().setting.getColorSetting();
127- cols->type = COL_CUSTOM;
128- setColor(cols->gridLine);
181+ setColor(colorSetting.gridLine);
129182 }
130183
131184
132185 void ColorCustomizeDialog::OnLines(wxCommandEvent &event)
133186 {
134- ColorSettings* cols = wxGetApp().setting.getColorSetting();
135- cols->type = COL_CUSTOM;
136- setColor(cols->lines);
187+ setColor(colorSetting.lines);
137188 }
138189
139190
140191 void ColorCustomizeDialog::OnPolygons(wxCommandEvent &event)
141192 {
142- ColorSettings* cols = wxGetApp().setting.getColorSetting();
143- cols->type = COL_CUSTOM;
144- setColor(cols->polygons);
193+ setColor(colorSetting.polygons);
145194 }
146195
147196
148197 void ColorCustomizeDialog::OnStrings(wxCommandEvent &event)
149198 {
150- ColorSettings* cols = wxGetApp().setting.getColorSetting();
151- cols->type = COL_CUSTOM;
152- setColor(cols->strings);
199+ setColor(colorSetting.strings);
153200 }
154201
155202
156203 void ColorCustomizeDialog::OnPoints(wxCommandEvent &event)
157204 {
158- ColorSettings* cols = wxGetApp().setting.getColorSetting();
159- cols->type = COL_CUSTOM;
160- setColor(cols->points);
205+ setColor(colorSetting.points);
161206 }
162207
163208 void ColorCustomizeDialog::OnPaint(wxPaintEvent &event)
@@ -184,40 +229,6 @@
184229 wxRect rect = panel->GetClientRect();
185230 int col[COL_NUM];
186231
187- switch(type){
188- case ColorType::Background:
189- for(int i = 0; i < COL_NUM; i ++){
190- col[i] = this->colorSetting.background[i];
191- }
192- break;
193- case ColorType::GridLine:
194- for(int i = 0; i < COL_NUM; i ++){
195- col[i] = this->colorSetting.gridLine[i];
196- }
197- break;
198- case ColorType::Lines:
199- for(int i = 0; i < COL_NUM; i ++){
200- col[i] = this->colorSetting.lines[i];
201- }
202- break;
203- case ColorType::Polygons:
204- for(int i = 0; i < COL_NUM; i ++){
205- col[i] = this->colorSetting.polygons[i];
206- }
207- break;
208- case ColorType::Strings:
209- for(int i = 0; i < COL_NUM; i ++){
210- col[i] = this->colorSetting.strings[i];
211- }
212- break;
213- case ColorType::Points:
214- for(int i = 0; i < COL_NUM; i ++){
215- col[i] = this->colorSetting.points[i];
216- }
217- break;
218- default:
219- break;
220- }
221232 dc.SetBrush(wxBrush(wxColor(col[0], col[1], col[2])));
222233 dc.DrawRectangle(rect);
223234 }
--- marathon/trunk/MapEditorWX/src/MainFrameEvent.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/MainFrameEvent.cpp (revision 355)
@@ -605,6 +605,9 @@
605605 //追加
606606 hpl::aleph::map::addAnnotation(newAnnotation);
607607 }
608+ //情報を更新する
609+ wxGetApp().getStockManager()->updateDeletes();
610+
608611 #endif
609612 }
610613 void MapEditorMainFrame::doLButtonOnPolygonTool(wxMouseEvent& ev)
@@ -675,6 +678,7 @@
675678 if(editMode == EditModeType::EM_DRAW && toolType == ToolType::TI_ARROW){
676679 //点の上で右クリックしたか?
677680 int epIndex = hpl::aleph::map::getSelectPointIndex(wmp, POINT_DISTANCE_EPSILON * div, zMin, zMax);
681+ wxGetApp().popupEndpointIndex = epIndex;
678682 if(epIndex != NONE){
679683 //点ポップアップ表示
680684 PopupMenu(&wxGetApp().pointPopupMenu);
@@ -681,11 +685,13 @@
681685 }else{
682686 //点は押されなかった
683687 int lineIndex = hpl::aleph::map::getSelectLineIndex(wmp, LINE_DISTANCE_EPSILON * div, zMin, zMax);
688+ wxGetApp().popupLineIndex = lineIndex;
684689 if(lineIndex != NONE){
685690 //線が押された
686691 //→線プロパティをだす
687692 PopupMenu(&wxGetApp().linePopupMenu);
688693 }
694+
689695 }
690696 }
691697
@@ -701,40 +707,7 @@
701707 //マウス座標記録
702708 wxGetApp().getViewGridManager()->setNewMousePoint(mx, my);
703709
704- //ポリゴンモードの時新しいポリゴンを作る
705- hpl::aleph::HPLEventManager* emgr = wxGetApp().getEventManager();
706- int editMode = emgr->getEditModeType();
707- int toolType = emgr->getToolType();
708- if(editMode == EditModeType::EM_DRAW &&
709- toolType == ToolType::TI_POLYGON)
710- {
711- if(emgr->isSelectingGroup()){
712- //選択範囲中だった
713- //→独立ポリゴンの作成
714- int n = wxGetApp().nPolygonPoints;
715- int selStartPoint[2];
716- emgr->getSelectGroupStartPoint(selStartPoint);
717- //n角形の座標を取得
718- double polyPointsView[8][2];
719- hpl::math::getRectangleScaledPreparedPolygon(
720- selStartPoint[0], selStartPoint[1], mx, my,
721- n, polyPointsView);
722710
723- //ワールド系に座標変換
724- world_point2d polyPointsWorld[8];
725- for(int i = 0; i < n; i ++){
726- polyPointsWorld[i] =
727- wxGetApp().getWorldPointFromViewPoint(
728- (int)polyPointsView[i][0],
729- (int)polyPointsView[i][1]);
730- }
731-
732- //ポリゴン生成
733- hpl::aleph::map::addNewPolygon(polyPointsWorld, n);
734- }
735-
736- }
737-
738711 }
739712 void MapEditorMainFrame::OnLeftUp(wxMouseEvent& ev)
740713 {
@@ -918,6 +891,8 @@
918891 }
919892 //ポリゴン生成
920893 hpl::aleph::map::addNewPolygon(polyPointsWorld, n);
894+ //情報更新
895+ wxGetApp().getStockManager()->updateDeletes();
921896 }
922897 }
923898
--- marathon/trunk/MapEditorWX/src/LevelInfoDialog.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/LevelInfoDialog.cpp (revision 355)
@@ -1,6 +1,29 @@
11 #include "LevelInfoDialog.h"
22 #include "MapEditorWX.h"
3+/*
4+enum{
5+ ID_LABEL,
6+ ID_ENV,
7+ ID_LANDSCAPE,
8+ ID_SINGLE_PLAYER,
9+ ID_COOP,
10+ ID_CTF,
11+ ID_KOTH,
12+ ID_BALL,
13+ ID_DEFENSE,
14+ ID_RUGBY,
15+ ID_TAG,
16+ ID_VACUUME,
17+ ID_REBELLION,
18+ ID_LOW_GRAVITY,
19+ ID_MAGNETIC,
20+ ID_EXTERMINATION,
21+
22+};
23+*/
324 BEGIN_EVENT_TABLE(LevelInfoDialog, wxDialog)
25+ EVT_BUTTON(wxID_OK, LevelInfoDialog::OnOk)
26+ EVT_BUTTON(wxID_CANCEL, LevelInfoDialog::OnCancel)
427 END_EVENT_TABLE()
528 LevelInfoDialog::LevelInfoDialog()
629 {
@@ -14,7 +37,7 @@
1437 sizer_58_staticbox = new wxStaticBox(this, -1, wxT("Env Type"));
1538 sizer_59_staticbox = new wxStaticBox(this, -1, wxT("Mission Type"));
1639 sizer_60_staticbox = new wxStaticBox(this, -1, wxT("Game Type"));
17- label_65 = new wxStaticText(this, wxID_ANY, wxT("Level lavel"));
40+ label_65 = new wxStaticText(this, wxID_ANY, wxT("Level label"));
1841 text_ctrl_44 = new wxTextCtrl(this, wxID_ANY, wxEmptyString);
1942 label_73 = new wxStaticText(this, wxID_ANY, wxT("Environment"));
2043 choice_28 = new wxChoice(this, wxID_ANY);
@@ -27,7 +50,7 @@
2750 checkbox_64 = new wxCheckBox(this, wxID_ANY, wxT("Kill Man With Ball (BALL)"));
2851 checkbox_65 = new wxCheckBox(this, wxID_ANY, wxT("Defense"));
2952 checkbox_67 = new wxCheckBox(this, wxID_ANY, wxT("Rugby"));
30- checkbox_61 = new wxCheckBox(this, ID_TAG, wxT("Tag"));
53+ checkbox_61 = new wxCheckBox(this, wxID_ANY, wxT("Tag"));
3154 checkbox_41 = new wxCheckBox(this, wxID_ANY, wxT("Vacuum"));
3255 checkbox_42 = new wxCheckBox(this, wxID_ANY, wxT("Rebellion"));
3356 checkbox_43 = new wxCheckBox(this, wxID_ANY, wxT("LowGravity"));
@@ -90,5 +113,18 @@
90113 SetSizer(grid_sizer_32);
91114 grid_sizer_32->Fit(this);
92115 Layout();
116+
117+ //環境追加
118+ //背景追加
93119 return result;
94120 }
121+void LevelInfoDialog::OnOk(wxCommandEvent &ev)
122+{
123+ SetReturnCode(wxID_OK);
124+ Destroy();
125+}
126+void LevelInfoDialog::OnCancel(wxCommandEvent &ev)
127+{
128+ SetReturnCode(wxID_CANCEL);
129+ Destroy();
130+}
--- marathon/trunk/MapEditorWX/src/SidePropDialog.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/SidePropDialog.cpp (revision 355)
@@ -14,3 +14,7 @@
1414
1515 return result;
1616 }
17+void SidePropDialog::setIndex(int ind)
18+{
19+ this->index = ind;
20+}
--- marathon/trunk/MapEditorWX/src/LightPaletteDialog.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/LightPaletteDialog.cpp (revision 355)
@@ -1,5 +1,9 @@
11 #include "LightPaletteDialog.h"
22 #include "MapEditorWX.h"
3+enum{
4+ ID_EDIT
5+};
6+
37 BEGIN_EVENT_TABLE(LightPaletteDialog, wxDialog)
48 EVT_BUTTON(wxID_ADD, LightPaletteDialog::OnAdd)
59 EVT_BUTTON(wxID_DELETE, LightPaletteDialog::OnDelete)
@@ -13,11 +17,11 @@
1317 }
1418 bool LightPaletteDialog::Create(wxWindow* parent, wxWindowID id)
1519 {
16- bool result = wxDialog::Create(parent, id, _T("Height Pallet"));
20+ bool result = wxDialog::Create(parent, id, _T("Light Pallet"));
1721
1822 button_31 = new wxButton(this, wxID_ADD, wxEmptyString);
1923 button_30 = new wxButton(this, wxID_DELETE, wxEmptyString);
20- list_ctrl_5 = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER);
24+ list_ctrl_5 = new wxListCtrl(this, ID_EDIT, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER);
2125
2226 list_ctrl_5->SetMinSize(wxSize(150, 200));
2327
@@ -31,5 +35,23 @@
3135 grid_sizer_40->Fit(this);
3236 Layout();
3337
38+
3439 return result;
3540 }
41+void LightPaletteDialog::OnAdd(wxCommandEvent &event)
42+{
43+ //TODO
44+}
45+void LightPaletteDialog::OnDelete(wxCommandEvent &event)
46+{
47+ //TODO
48+}
49+void LightPaletteDialog::OnEdit(wxListEvent &event)
50+{
51+ //TODO
52+}
53+
54+void LightPaletteDialog::setFloor(bool fl)
55+{
56+ this->isFloor_ = fl;
57+}
--- marathon/trunk/MapEditorWX/src/MapEditorWX.h (revision 354)
+++ marathon/trunk/MapEditorWX/src/MapEditorWX.h (revision 355)
@@ -189,6 +189,9 @@
189189 wxMenu linePopupMenu;
190190 wxMenu pointPopupMenu;
191191
192+ //popup用インデックス覚書
193+ int popupEndpointIndex;
194+ int popupLineIndex;
192195 //public メンバ変数 ここまで
193196 private:
194197
--- marathon/trunk/MapEditorWX/src/MapEditorMainFrame.h (revision 354)
+++ marathon/trunk/MapEditorWX/src/MapEditorMainFrame.h (revision 355)
@@ -19,7 +19,6 @@
1919 //height
2020 #include "HeightDialog.h"
2121 //palettes
22-#include "CeilingHeightPaletteDialog.h"
2322 #include "HeightPaletteDialog.h"
2423 #include "LightPaletteDialog.h"
2524 #include "MediaPaletteDialog.h"
@@ -125,7 +124,6 @@
125124 //高さ <en> height
126125 HeightDialog heightDialog;
127126 //パレット類 <en> palettes
128- CeilingHeightPaletteDialog ceilingHeightPaletteDialog;
129127 HeightPaletteDialog heightPaletteDialog;
130128 LightPaletteDialog lightPaletteDialog;
131129 MediaPaletteDialog mediaPaletteDialog;
@@ -393,4 +391,6 @@
393391 void changeEditMode(int mode);
394392
395393 void closeAllModelessDialogs();
394+
395+ void initLevel();
396396 };
--- marathon/trunk/MapEditorWX/src/PointPropDialog.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/PointPropDialog.cpp (revision 355)
@@ -20,6 +20,11 @@
2020 EVT_CHOICE(ID_POLY_INDEX, PointPropDialog::OnPolyChoice)
2121 END_EVENT_TABLE()
2222
23+void PointPropDialog::setIndex(int ind)
24+{
25+ this->index = ind;
26+}
27+
2328 PointPropDialog::PointPropDialog()
2429 {
2530 }
--- marathon/trunk/MapEditorWX/src/DlgCommon.h (revision 354)
+++ marathon/trunk/MapEditorWX/src/DlgCommon.h (revision 355)
@@ -16,6 +16,7 @@
1616 #include <wx/listbox.h>
1717 #include <wx/bmpbuttn.h>
1818 #include <wx/colordlg.h>
19+#include <wx/scrolwin.h>
1920
2021 #include "HPLLib/HPLEventManager.h"
2122 #include "MapEditorOneSetting.h"
--- marathon/trunk/MapEditorWX/src/MainFrameMenuEvent.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/MainFrameMenuEvent.cpp (revision 355)
@@ -14,6 +14,32 @@
1414 void MapEditorMainFrame::OnPrintSetup(wxCommandEvent& ev)
1515 {
1616 }
17+
18+void MapEditorMainFrame::initLevel()
19+{
20+ //初期化
21+ wxGetApp().editLevelIndex = 0;
22+ build_trig_tables();
23+ //allocate
24+ if(dynamic_world == NULL){
25+ allocate_map_memory();
26+ }
27+ //ズーム・オフセットを初期化
28+ wxCommandEvent dummy;
29+ this->OnZoomDefault(dummy);
30+ this->OnMoveToCenter(dummy);
31+
32+
33+ wxGetApp().getStockManager()->resetDeletes();
34+ wxGetApp().isChanged = false;
35+ //レベル一覧削除
36+ wxGetApp().levelNameList.clear();
37+ initialize_map_for_new_level();
38+ //データの初期化
39+ wxGetApp().getStockManager()->resetDeletes();
40+ wxGetApp().getViewGridManager()->setViewHeightMin(SHRT_MAX);
41+ wxGetApp().getViewGridManager()->setViewHeightMin(SHRT_MIN);
42+}
1743 void MapEditorMainFrame::OnNew(wxCommandEvent& ev)
1844 {
1945 if(wxGetApp().isChanged){
@@ -23,11 +49,8 @@
2349 return;
2450 }
2551 }
26- initialize_map_for_new_level();
27- //レベル一覧削除
28- wxGetApp().levelNameList.clear();
52+ initLevel();
2953
30- wxGetApp().isChanged = false;
3154
3255 //ついでにレベル設定
3356 //TODO
@@ -38,10 +61,6 @@
3861 //内容をマップデータに反映
3962 //TODO
4063
41- //データの初期化
42- wxGetApp().getStockManager()->resetDeletes();
43- wxGetApp().getViewGridManager()->setViewHeightMin(SHRT_MAX);
44- wxGetApp().getViewGridManager()->setViewHeightMin(SHRT_MIN);
4564 Refresh();
4665 }
4766 void MapEditorMainFrame::OnNewLevel(wxCommandEvent& ev)
@@ -56,8 +75,6 @@
5675 void MapEditorMainFrame::OnOpen(wxCommandEvent& WXUNUSED(ev))
5776 {
5877 //TODO 未セーブチェック
59-
60- //file dialog open
6178 wxFileDialog fileDialog(this, _T("Choose a file"),
6279 _T("."), _T(""), _T("*.*"));
6380
@@ -72,12 +89,10 @@
7289 //set map file
7390 set_map_file(mapFile);
7491
75- wxGetApp().editLevelIndex = 0;
76- build_trig_tables();
77- //allocate
78- if(dynamic_world == NULL){
79- allocate_map_memory();
80- }
92+ wxGetApp().filePath = path;
93+ //初期化
94+ initLevel();
95+
8196 //Level1を読み込み
8297 bool check = load_level_from_map(wxGetApp().editLevelIndex);
8398 if(!check){
@@ -99,15 +114,8 @@
99114 wxGetApp().levelNameList.push_back("unnamed");
100115 }
101116 }
102- //ズーム・オフセットを初期化
103- wxCommandEvent dummy;
104- this->OnZoomDefault(dummy);
105- this->OnMoveToCenter(dummy);
106-
107- wxGetApp().filePath = path;
108- wxGetApp().isChanged = false;
109-
110- wxGetApp().getStockManager()->resetDeletes();
117+ //セットアップ
118+ wxGetApp().getStockManager()->updateDeletes();
111119 //再描画
112120 Refresh();
113121 }
@@ -258,10 +266,10 @@
258266 }
259267 void MapEditorMainFrame::closeAllModelessDialogs()
260268 {
261- this->objectPropDialog.Show(false);
269+ this->objPropDialog.Show(false);
262270 this->pointPropDialog.Show(false);
263- this->polygonPropDialog.Show(false);
264- this->linPropDialog.Show(false);
271+ this->polyPropDialog.Show(false);
272+ this->linePropDialog.Show(false);
265273 this->sidePropDialog.Show(false);
266274 this->polyTypeDialog.Show(false);
267275 this->mediaPaletteDialog.Show(false);
@@ -283,6 +291,10 @@
283291 {
284292 //モード変更
285293 this->changeEditMode(EditModeType::EM_POLYGON_TYPE);
294+
295+ //全部のダイアログを閉じます
296+ this->closeAllModelessDialogs();
297+
286298 //ポリゴンタイプダイアログ表示
287299 this->polyTypeDialog.Show(true);
288300 }
@@ -290,6 +302,12 @@
290302 {
291303 //モード変更
292304 this->changeEditMode(EditModeType::EM_FLOOR_HEIGHT);
305+
306+ //全部のダイアログを閉じます
307+ this->closeAllModelessDialogs();
308+
309+ //床の高さ
310+ this->heightPaletteDialog.setFloor(true);
293311 //高さパレットダイアログ表示
294312 this->heightPaletteDialog.Show(true);
295313 }
@@ -297,6 +315,12 @@
297315 {
298316 //モード変更
299317 this->changeEditMode(EditModeType::EM_CEILING_HEIGHT);
318+
319+ //全部のダイアログを閉じます
320+ this->closeAllModelessDialogs();
321+
322+ //天井の高さ
323+ this->heightPaletteDialog.setFloor(false);
300324 //高さパレットダイアログ表示
301325 this->heightPaletteDialog.Show(true);
302326 }
@@ -304,28 +328,47 @@
304328 {
305329 //モード変更
306330 this->changeEditMode(EditModeType::EM_FLOOR_LIGHT);
331+
332+ //全部のダイアログを閉じます
333+ this->closeAllModelessDialogs();
334+
335+ this->lightPaletteDialog.setFloor(true);
307336 //ライトパレットダイアログ表示
308- //TODO this->lightPaletteDialog.Show(true);
337+ this->lightPaletteDialog.Show(true);
309338 }
310339 void MapEditorMainFrame::OnCeilingLightMode(wxCommandEvent& ev)
311340 {
312341 //モード変更
313342 this->changeEditMode(EditModeType::EM_CEILING_LIGHT);
343+
344+ //全部のダイアログを閉じます
345+ this->closeAllModelessDialogs();
346+
347+ this->lightPaletteDialog.setFloor(false);
314348 //ライトパレットダイアログ表示
315- //TODO this->lightPaletteDialog.Show(true);
349+ this->lightPaletteDialog.Show(true);
316350 }
317351 void MapEditorMainFrame::OnMediaMode(wxCommandEvent& ev)
318352 {
319353 //モード変更
320354 this->changeEditMode(EditModeType::EM_MEDIA);
355+
356+ //全部のダイアログを閉じます
357+ this->closeAllModelessDialogs();
358+
321359 //メディアパレットダイアログ表示
322- //TODO this->mediaPaletteDialog.Show(true);
360+ this->mediaPaletteDialog.Show(true);
323361 }
324362 void MapEditorMainFrame::OnFloorTextureMode(wxCommandEvent& ev)
325363 {
326364 //モード変更
327365 this->changeEditMode(EditModeType::EM_FLOOR_TEXTURE);
366+
367+ //全部のダイアログを閉じます
368+ this->closeAllModelessDialogs();
369+
328370 //テクスチャダイアログ表示
371+ this->textureDialog.setFloor(true);
329372 this->textureDialog.Show(true);
330373 }
331374 void MapEditorMainFrame::OnCeilingTextureMode(wxCommandEvent& ev)
@@ -332,6 +375,11 @@
332375 {
333376 //モード変更
334377 this->changeEditMode(EditModeType::EM_CEILING_TEXTURE);
378+
379+ //全部のダイアログを閉じます
380+ this->closeAllModelessDialogs();
381+
382+ this->textureDialog.setFloor(false);
335383 //テクスチャダイアログ表示
336384 this->textureDialog.Show(true);
337385 }
@@ -365,9 +413,39 @@
365413 }
366414 void MapEditorMainFrame::OnTerminalViewer(wxCommandEvent& ev)
367415 {
368- //
416+ //ターミナル
369417 TerminalDialog dlg;
370418 dlg.Create(this, wxID_ANY);
371419 dlg.ShowModal();
372420 }
373421
422+void MapEditorMainFrame::OnLineProp(wxCommandEvent& ev)
423+{
424+ LinePropDialog dlg;
425+ dlg.Create(this, wxID_ANY);
426+ dlg.setLineIndex(wxGetApp().popupLineIndex);
427+ dlg.ShowModal();
428+}
429+void MapEditorMainFrame::OnClockwiseSide(wxCommandEvent& ev)
430+{
431+ //TODO
432+ SidePropDialog dlg;
433+ dlg.Create(this, wxID_ANY);
434+ dlg.setIndex(get_line_data(wxGetApp().popupLineIndex)->clockwise_polygon_side_index);
435+ dlg.ShowModal();
436+}
437+void MapEditorMainFrame::OnCounterclockwiseSide(wxCommandEvent& ev)
438+{
439+ //TODO
440+ SidePropDialog dlg;
441+ dlg.Create(this, wxID_ANY);
442+ dlg.setIndex(get_line_data(wxGetApp().popupLineIndex)->counterclockwise_polygon_side_index);
443+ dlg.ShowModal();
444+}
445+void MapEditorMainFrame::OnPointProp(wxCommandEvent& ev)
446+{
447+ PointPropDialog dlg;
448+ dlg.Create(this, wxID_ANY);
449+ dlg.setIndex(wxGetApp().popupEndpointIndex);
450+ dlg.ShowModal();
451+}
--- marathon/trunk/MapEditorWX/src/EditorPreferencesDialog.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/EditorPreferencesDialog.cpp (revision 355)
@@ -15,7 +15,7 @@
1515 EVT_BUTTON(wxID_OK, EditorPreferencesDialog::OnOk)
1616 EVT_BUTTON(wxID_CANCEL, EditorPreferencesDialog::OnCancel)
1717 EVT_CHOICE(ID_COLOR, EditorPreferencesDialog::OnColor)
18- EVT_CHOICE(ID_GRID, EditorPreferencesDialog::OnGrid)
18+// EVT_CHOICE(ID_GRID, EditorPreferencesDialog::OnGrid)
1919 // end wxGlade
2020 END_EVENT_TABLE();
2121 EditorPreferencesDialog::EditorPreferencesDialog()
@@ -121,6 +121,7 @@
121121 //グリッド番号 <en> grid index
122122 int index = this->choice_9->GetSelection();
123123 setting->setGridSizeIndex(index);
124+ wxGetApp().getViewGridManager()->setGridIntervalIndex(index);
124125
125126 //カラー設定 <en> color setting
126127 int colType = this->choice_10->GetSelection();
@@ -167,7 +168,3 @@
167168 MapEditorOneSetting def = MapEditorOneSetting::getDefaultSetting();
168169 setupDialog(&def);
169170 }
170-void EditorPreferencesDialog::OnGrid(wxCommandEvent &ev)
171-{
172-
173-}
\ No newline at end of file
--- marathon/trunk/MapEditorWX/src/HeightDialog.cpp (revision 354)
+++ marathon/trunk/MapEditorWX/src/HeightDialog.cpp (revision 355)
@@ -36,7 +36,7 @@
3636 slider_2 = new wxSlider(this, ID_FLOOR_SLIDER, 0, 0, 10, wxDefaultPosition, wxDefaultSize,
3737 wxSL_VERTICAL | wxSL_INVERSE);
3838 slider_3 = new wxSlider(this, ID_CEILING_SLIDER, 0, 0, 10, wxDefaultPosition, wxDefaultSize,
39- wxSL_VERTICAL | wxSL_INVERSE;
39+ wxSL_VERTICAL | wxSL_INVERSE);
4040 label_10 = new wxStaticText(this, wxID_ANY, wxT("Ceiling"));
4141 text_ctrl_6 = new wxTextCtrl(this, ID_CEILING_EDIT, wxEmptyString);
4242 checkbox_11 = new wxCheckBox(this, ID_DRAW_HIDDEN_CHECK, wxT("Draw hidden lines"));
--- marathon/trunk/MapEditorWX/src/PlacementDialog.h (revision 354)
+++ marathon/trunk/MapEditorWX/src/PlacementDialog.h (revision 355)
@@ -35,12 +35,12 @@
3535 void OnInf(wxCommandEvent &ev);
3636 void OnAllInf(wxCommandEvent &ev);
3737 void OnSetInitial(wxCommandEvent &ev);
38- void OnSel(wxCommandEvent &ev);
38+ void OnSel(wxListEvent &ev);
3939 void OnRandomPlace(wxCommandEvent& ev);
4040 //イベントテーブル作成<en>declare
4141 DECLARE_EVENT_TABLE()
4242 public:
43- void setPlacementText();
43+// void setPlacementText();
4444 };
4545
4646 #endif
--- marathon/trunk/MapEditorWX/setting.ini (revision 354)
+++ marathon/trunk/MapEditorWX/setting.ini (revision 355)
@@ -1,7 +1,7 @@
1-GRID_SIZE_INDEX=3
1+GRID_SIZE_INDEX=4
22 COLOR_PRESET=1
33 BACKGROUND=0,0,0
4-GRID=10,10,10
4+GRID=50,50,50
55 LINES=50,255,0
66 POLYGONS=0,50,0
77 STRINGS=100,255,0
--- marathon/trunk/MapEditorWX/WXTODOリスト.txt (revision 354)
+++ marathon/trunk/MapEditorWX/WXTODOリスト.txt (revision 355)
@@ -165,3 +165,18 @@
165165 TODO ObjectPlacement
166166 ?ς? TODO MediaList???ď?????Ԃœ????Ă???̂Ȃ́H
167167 ?????Ԃ?????ĂȂ??H
168+--
169+TODO 2007 07 01
170+Jump (Select) other level
171+object place
172+placement dialog edit <-> listctrl
173+object/point/side/line prop
174+adding line
175+no editable when layer disabled in preferences
176+fit to grid
177+color customize
178+polygon type dialog
179+heights/light/media/sound palette
180+texture dialog
181+load textures from shapes file
182+level info dialog I/O
\ No newline at end of file
--- marathon/trunk/MapEditorCommonSrc/MapEditorOneSetting.h (revision 354)
+++ marathon/trunk/MapEditorCommonSrc/MapEditorOneSetting.h (revision 355)
@@ -14,6 +14,8 @@
1414 #include "mysound.h"
1515 #include "computer_interface.h"
1616 #include "editor.h"
17+#include "lightsource.h"
18+#include "media.h"
1719
1820 //#include "MapEditorSDI.h"
1921 const int NUMBER_OF_POLYGON_TYPE = 24;
--- marathon/trunk/HPLLib/HPLMapTool.cpp (revision 354)
+++ marathon/trunk/HPLLib/HPLMapTool.cpp (revision 355)
@@ -743,6 +743,7 @@
743743 std::map<int,int> epIndexTable;
744744 std::string str;
745745 for(int i = 0; i < n; i ++){
746+ //点の追加
746747 int newIndex = hpl::aleph::map::addEndpoint(epd[i]);
747748 epIndexTable[i] = newIndex;
748749
@@ -754,6 +755,7 @@
754755 }
755756 // const char *buf = str.c_str();
756757
758+ //線の追加
757759 std::map<int,int> lIndexTable;
758760 for(int i = 0; i < n; i ++){
759761 //修正
@@ -761,6 +763,7 @@
761763 ld[i].endpoint_indexes[j] = epIndexTable[ld[i].endpoint_indexes[j]];
762764 }
763765
766+
764767 int newIndex = hpl::aleph::map::addLine(ld[i]);
765768 lIndexTable[i] = newIndex;
766769 }
@@ -768,9 +771,8 @@
768771 //ポリゴン情報修正
769772 for(int i = 0; i < n; i ++){
770773 pdata.endpoint_indexes[i] = epIndexTable[pdata.endpoint_indexes[i]];
771- }
772- for(int i = 0; i < n; i ++){
773774 pdata.line_indexes[i] = lIndexTable[pdata.line_indexes[i]];
775+ pdata.side_indexes[i] = NONE;
774776 }
775777
776778 //ポリゴン追加
@@ -1077,6 +1079,13 @@
10771079 */
10781080 struct object_frequency_definition* hpl::aleph::map::getPlacementData(int objectType, int index)
10791081 {
1082+ if(item_placement_info == NULL || monster_placement_info == NULL){
1083+ item_placement_info = object_placement_info;
1084+ monster_placement_info = object_placement_info+MAXIMUM_OBJECT_TYPES;
1085+
1086+ /* Clear the arrays */
1087+ objlist_clear(object_placement_info, 2*MAXIMUM_OBJECT_TYPES);
1088+ }
10801089 struct object_frequency_definition* place = NULL;
10811090 if(objectType == _saved_item && item_placement_info){
10821091 place = &item_placement_info[index];
--- marathon/trunk/HPLLib/HPLStockManager.cpp (revision 354)
+++ marathon/trunk/HPLLib/HPLStockManager.cpp (revision 355)
@@ -238,19 +238,21 @@
238238 }
239239
240240 //乗っているオブジェクトが一つもない場合はfirst_objectをNONEにする
241- if(delObjects[poly->first_object]){
242- int firstObjIndex = NONE;
243- for(int j = 0; j < (int)SavedObjectList.size(); j ++){
244- if(!delObjects[j]){
245- map_object* obj = &SavedObjectList[j];
246- assert(obj);
247- if(obj->polygon_index == i){
248- firstObjIndex = j;
249- break;
241+ if(poly->first_object != NONE){
242+ if(delObjects[poly->first_object]){
243+ int firstObjIndex = NONE;
244+ for(int j = 0; j < (int)SavedObjectList.size(); j ++){
245+ if(!delObjects[j]){
246+ map_object* obj = &SavedObjectList[j];
247+ assert(obj);
248+ if(obj->polygon_index == i){
249+ firstObjIndex = j;
250+ break;
251+ }
250252 }
251253 }
254+ poly->first_object = firstObjIndex;
252255 }
253- poly->first_object = firstObjIndex;
254256 }
255257 }
256258 }
旧リポジトリブラウザで表示