• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン365 (tree)
日時2007-07-05 20:46:35
作者hogepiyo

ログメッセージ

*** empty log message ***

変更サマリ

差分

--- marathon/trunk/MapEditorWX/src/LinePropDialog.cpp (revision 364)
+++ marathon/trunk/MapEditorWX/src/LinePropDialog.cpp (revision 365)
@@ -158,6 +158,9 @@
158158 choice_27->Insert(_T("NONE"), (int)PolygonList.size());
159159
160160
161+ //タイトル設定
162+ SetTitle(getString("line ID = [%d", getLineIndex()));
163+
161164 if(this->getLineIndex() == NONE){
162165 return;
163166 }
--- marathon/trunk/MapEditorWX/src/PlatformDialog.h (revision 364)
+++ marathon/trunk/MapEditorWX/src/PlatformDialog.h (revision 365)
@@ -64,9 +64,10 @@
6464 wxButton* button_1;
6565 wxButton* button_2;
6666
67+ int polyIndex;
6768 public:
6869 PlatformDialog();
69- bool Create(wxWindow* parent, wxWindowID id);
70+ bool Create(wxWindow* parent, wxWindowID id, int pindex);
7071 virtual ~PlatformDialog();
7172 DECLARE_EVENT_TABLE()
7273
--- marathon/trunk/MapEditorWX/src/HPLShapesManager.h (nonexistent)
+++ marathon/trunk/MapEditorWX/src/HPLShapesManager.h (revision 365)
@@ -0,0 +1,40 @@
1+#ifndef _HPL_SHAPES_MANAGER_
2+#define _HPL_SHAPES_MANAGER_
3+
4+#include "header.h"
5+#include "extensions.h"
6+#include "FileHandler.h"
7+#include "map.h"
8+#include "game_wad.h"
9+#include "weapons.h"
10+#include "items.h"
11+#include "monsters.h"
12+#include "scenery_definitions.h"
13+#include "mysound.h"
14+#include "computer_interface.h"
15+#include "editor.h"
16+#include "lightsource.h"
17+#include "media.h"
18+
19+namespace hpl{
20+namespace shapes{
21+ class HPLShapesManager{
22+ //Shapesファイルを読み込めていたら真 <en> true when Shapes file loaded
23+ bool isLoadedShapesFile_;
24+
25+ public:
26+ HPLShapesManager();
27+ ~HPLShapesManager();
28+
29+ public:
30+ bool isLoadedShapesFile();
31+ /**
32+ Shapesファイルを読み込みます
33+ <en> load Shapes file
34+ @param path Shapesファイルパス <en> Shapes file's path
35+ */
36+ void loadShapesFile(const char* path);
37+ };
38+};
39+};
40+#endif
--- marathon/trunk/MapEditorWX/src/ObjectPropDialog.cpp (revision 364)
+++ marathon/trunk/MapEditorWX/src/ObjectPropDialog.cpp (revision 365)
@@ -38,22 +38,22 @@
3838 }
3939 bool ObjectPropDialog::Create(wxWindow* parent, wxWindowID id)
4040 {
41- bool result = wxDialog::Create(parent, id, _T("Object Properties"));
42- label_45 = new wxStaticText(this, wxID_ANY, wxT("Object type"));
41+ bool result = wxDialog::Create(parent, id, _T("Edit Object"));
42+ label_45 = new wxStaticText(this, wxID_ANY, wxT("Group"));
4343 text_ctrl_27 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
4444 choice_21 = new wxChoice(this, wxID_ANY);
45- label_56 = new wxStaticText(this, wxID_ANY, wxT("Object index"));
45+ label_56 = new wxStaticText(this, wxID_ANY, wxT("Type"));
4646 text_ctrl_32 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
4747 choice_22 = new wxChoice(this, wxID_ANY);
48- checkbox_46 = new wxCheckBox(this, wxID_ANY, wxT("Hidden"));
49- checkbox_47 = new wxCheckBox(this, wxID_ANY, wxT("Hung on ceiling"));
50- checkbox_48 = new wxCheckBox(this, wxID_ANY, wxT("Can't seeing"));
51- checkbox_49 = new wxCheckBox(this, wxID_ANY, wxT("Can't hearing"));
52- checkbox_50 = new wxCheckBox(this, wxID_ANY, wxT("From aerial"));
53- checkbox_51 = new wxCheckBox(this, wxID_ANY, wxT("Only network game"));
48+ checkbox_46 = new wxCheckBox(this, wxID_ANY, wxT("Teleports In"));
49+ checkbox_47 = new wxCheckBox(this, wxID_ANY, wxT("From Ceiling"));
50+ checkbox_48 = new wxCheckBox(this, wxID_ANY, wxT("Is Blind"));
51+ checkbox_49 = new wxCheckBox(this, wxID_ANY, wxT("Is Deaf"));
52+ checkbox_50 = new wxCheckBox(this, wxID_ANY, wxT("Teleports Out"));
53+ checkbox_51 = new wxCheckBox(this, wxID_ANY, wxT("Network Only"));
5454 label_59 = new wxStaticText(this, wxID_ANY, wxT("Polygon ID"));
5555 text_ctrl_37 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
56- label_58 = new wxStaticText(this, wxID_ANY, wxT("Facing/Direction"));
56+ label_58 = new wxStaticText(this, wxID_ANY, wxT("Facing"));
5757 text_ctrl_38 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
5858 panel_16 = new wxPanel(this, wxID_ANY);
5959 label_60 = new wxStaticText(this, wxID_ANY, wxT("Launch by"));
@@ -179,9 +179,9 @@
179179 }
180180 break;
181181 case _saved_sound_source:
182- for(int i = 0; i < NUMBER_OF_SOUND_DEFINITIONS; i ++){
182+ for(int i = 0; i < NUMBER_OF_AMBIENT_SOUND_DEFINITIONS; i ++){
183183 this->choice_22->Insert(wxConvertMB2WX(
184- wxGetApp().monsterTypeInfo[i].jname.c_str()),
184+ wxGetApp().soundSourceTypeInfo[i].jname.c_str()),
185185 i);
186186 }
187187 break;
@@ -214,7 +214,7 @@
214214 this->setObject(obj);
215215 }else{
216216 #ifdef __WXDEBUG__
217- wxASSERT(this->objIndex >= 0 && this->objIndex < SavedObjectList.size());
217+ wxASSERT(this->objIndex >= 0 && this->objIndex < (int)SavedObjectList.size());
218218 #endif
219219 map_object* obj = &SavedObjectList[this->objIndex];
220220 this->setObject(*obj);
@@ -309,9 +309,25 @@
309309 map_object ObjectPropDialog::getObject()
310310 {
311311 map_object obj;
312+ memset(&obj, 0, sizeof(map_object));
313+
312314 obj.type = choice_21->GetSelection();
313315 obj.index = choice_22->GetSelection();
314- //TODO obj.flags
316+
317+ obj.flags = 0;
318+ if(checkbox_46->GetValue()) obj.flags |= _map_object_is_invisible;
319+ if(checkbox_47->GetValue()) obj.flags |= _map_object_hanging_from_ceiling;
320+ if(checkbox_48->GetValue()) obj.flags |= _map_object_is_blind;
321+ if(checkbox_49->GetValue()) obj.flags |= _map_object_is_deaf;
322+ if(checkbox_50->GetValue()) obj.flags |= _map_object_floats;
323+ if(checkbox_51->GetValue()) obj.flags |= _map_object_is_network_only;
324+
325+ //obj.polygon_index = text_ctr
326+
327+ obj.facing = atoi(wxConvertWX2MB(text_ctrl_38));
328+ obj.location.x = atoi(wxConvertWX2MB(text_ctrl_39));
329+ obj.location.x = atoi(wxConvertWX2MB(text_ctrl_40));
330+ obj.location.x = atoi(wxConvertWX2MB(text_ctrl_41));
315331 return obj;
316332 }
317333
--- marathon/trunk/MapEditorWX/src/MainFrameLeftDown.cpp (revision 364)
+++ marathon/trunk/MapEditorWX/src/MainFrameLeftDown.cpp (revision 365)
@@ -573,6 +573,7 @@
573573
574574 hpl::aleph::HPLStockManager* smgr = wxGetApp().getStockManager();
575575
576+ bool found = false;
576577 for(int i = 0; i < (int)PolygonList.size(); i ++){
577578 if(smgr->delPolygons[i]){
578579 continue;
@@ -582,13 +583,17 @@
582583 //点が含まれる
583584 //このポリゴン上に置く
584585 //TODO
585- /*int flags = 0;
586+ int flags = 0;
586587 map_object objv = this->objPropDialog.getObject();
587- int type = this->objPropDialog.getObject();
588- hpl::aleph::map::createObject(wpoint, i, &obj, flags, type, index);
589- int newIndex = hpl::aleph::map::addMapSavedObject(obj);*/
588+ objv.polygon_index = i;
589+ int newIndex = hpl::aleph::map::addMapSavedObject(obj);
590+ found = true;
591+ break;
590592 }
591593 }
594+ if(!found){
595+ hpl::error::caution("You must place objects ON POLYGON");
596+ }
592597 #endif
593598 }
594599 void MapEditorMainFrame::doLButtonOnTextTool(wxMouseEvent& ev)
--- marathon/trunk/MapEditorWX/src/PlatformDialog.cpp (revision 364)
+++ marathon/trunk/MapEditorWX/src/PlatformDialog.cpp (revision 365)
@@ -10,7 +10,7 @@
1010 PlatformDialog::~PlatformDialog()
1111 {
1212 }
13-bool PlatformDialog::Create(wxWindow* parent, wxWindowID id)
13+bool PlatformDialog::Create(wxWindow* parent, wxWindowID id, int pindex)
1414 {
1515 bool result = wxDialog::Create(parent, id, _T("Platform"));
1616
@@ -213,11 +213,20 @@
213213 sizer_1->Fit(this);
214214 Layout();
215215
216+ //チョイスの初期化
217+ //TODO
218+ //値の設定
219+ //TODO
220+ polyIndex = pindex;
221+
216222 return result;
217223 }
218224
219225 void PlatformDialog::OnOk(wxCommandEvent& ev)
220226 {
227+ //値の反映
228+ //TODO
229+
221230 SetReturnCode(wxID_OK);
222231 Destroy();
223232 }
--- marathon/trunk/MapEditorWX/src/HPLShapesManager.cpp (nonexistent)
+++ marathon/trunk/MapEditorWX/src/HPLShapesManager.cpp (revision 365)
@@ -0,0 +1,34 @@
1+#include "HPLShapesManager.h"
2+
3+hpl::shapes::HPLShapesManager::HPLShapesManager()
4+{
5+ this->isLoadedShapesFile_ = false;
6+}
7+hpl::shapes::HPLShapesManager::~HPLShapesManager()
8+{
9+}
10+bool hpl::shapes::HPLShapesManager::isLoadedShapesFile()
11+{
12+ return this->isLoadedShapesFile_;
13+}
14+/**
15+ Shapesファイルを読み込みます
16+ <en> load Shapes file
17+ @param path Shapesファイルパス <en> Shapes file's path
18+*/
19+void hpl::shapes::HPLShapesManager::loadShapesFile(const char* path)
20+{
21+ initialize_shape_handler();
22+
23+ FileSpecifier ShapesFile(path);
24+ if(!ShapesFile.Exists()){
25+ MessageBox(L"no shapes file");
26+ }else{
27+ isLoadedShapesFile_ = true;
28+ open_shapes_file(ShapesFile);
29+ for(int i = 0; i < NUMBER_OF_COLLECTIONS; i ++){
30+ mark_collection_for_loading(i);
31+ }
32+ load_collections(false, false);
33+ }
34+}
--- marathon/trunk/MapEditorWX/data/PolygonType.txt (revision 364)
+++ marathon/trunk/MapEditorWX/data/PolygonType.txt (revision 365)
@@ -1,24 +1,24 @@
1-標準
2-アイテム退出
3-モンスター退出
4-陣地取りの陣地
5-ネットゲーム基地
6-プラットフォーム
7-Light-On
8-プラットフォームON
9-ライトOFF
10-プラットフォームOFF
11-テレポーター
12-ゾーンボーダー
13-ゴール
14-見えるモンスター起動
15-見えないモンスター起動
16-全てモンスター起動
17-アイテム起動
18-探索
19-自動次レベル
20-マイナーアイタタタ
21-メジャーアイタタタ
22-吸着
23-吸着トリガー
24-超吸着
1+Normal
2+Item Impassable
3+Monster & Item Impassable
4+Hill
5+Base
6+Platform
7+Light On Trigger
8+Platform On Trigger
9+Light Off Trigger
10+Platform Off Trigger
11+Teleporter
12+Zone Border
13+Goal
14+Visible Monster Trigger
15+Invisible Monster Trigger
16+Dual Monster Trigger
17+Item Trigger
18+Must be Explored
19+Automatic Exit
20+Minor Ouch
21+Major Ouch
22+Glue
23+Glue Trigger
24+Superglue
--- marathon/trunk/MapEditorWX/WXTODOリスト.txt (revision 364)
+++ marathon/trunk/MapEditorWX/WXTODOリスト.txt (revision 365)
@@ -48,11 +48,10 @@
4848 PolygonNum :???o??
4949 PolygonProp :?z?u
5050 PolygonType :?z?u
51-SelectLevel :?z?u
5251 SideProp :
5352 Terminal :???o??
5453 Texture :?z?u
55-Tool :?z?u
54+Tool :???o??
5655 Visual :
5756
5857 XXXX JumpLevel
@@ -66,7 +65,7 @@
6665 ?E?????Ȃ犮???Ə???
6766 Draw
6867 Arrow
69- ?E?P??I???͉”\
68+ ?ς݁E?P??I??
7069 ?E?e?L?X?g?I?????A?m?e?[?V?????_?C?A???O???o??
7170 Fill
7271 ?E?h???|???S???T????????
@@ -202,4 +201,5 @@
202201 TODO ?T?E???h?I???????S
203202 TODO ???̃I?u?W?F?N?g??I?????Ă??A?????????肵?Ȃ??ƕς??Ȃ?
204203 Refresh?
205-TODO ?|???S???h??‚Ԃ????s?̎??̃_?C?A???O????????
204+?ς? TODO ?|???S???h??‚Ԃ????s?̎??̃_?C?A???O????????
205+EditPreferenceDiallog?Œlj????ׂ?Sizer???قȂ?CheckBox??????
--- marathon/trunk/HPLLib/HPLMapToolModifier.cpp (revision 364)
+++ marathon/trunk/HPLLib/HPLMapToolModifier.cpp (revision 365)
@@ -92,6 +92,11 @@
9292 int index = dynamic_world->polygon_count - 1;
9393
9494 polygon_data* poly = get_polygon_data(index);
95+#ifdef __WXDEBUG__
96+ wxASSERT(poly);
97+#else
98+ if(!poly)continue;
99+#endif
95100
96101 //以下の依存する項目を修正する
97102 //・点(adjacent)
@@ -104,6 +109,11 @@
104109 next = 0;
105110 }
106111 endpoint_data* ep1 = get_endpoint_data(poly->endpoint_indexes[i]);
112+#ifdef __WXDEBUG__
113+ wxASSERT(ep1);
114+#else
115+ if(!ep1)continue;
116+#endif
107117 //関連ポリゴンの指定が無ければ指定
108118 if(ep1->supporting_polygon_index == NONE){
109119 ep1->supporting_polygon_index = index;
@@ -110,9 +120,19 @@
110120 }
111121
112122 endpoint_data* ep2 = get_endpoint_data(poly->endpoint_indexes[next]);
123+#ifdef __WXDEBUG__
124+ wxASSERT(ep2);
125+#else
126+ if(!ep2)continue;
127+#endif
113128
114129 //線
115130 line_data* line = get_line_data(poly->line_indexes[i]);
131+#ifdef __WXDEBUG__
132+ wxASSERT(line);
133+#else
134+ if(!line)continue;
135+#endif
116136 if(line->endpoint_indexes[0] == poly->endpoint_indexes[i]){
117137 //順向き→clockwise
118138 line->clockwise_polygon_owner = index;
@@ -129,7 +149,8 @@
129149 #ifdef __WXDEBUG__
130150 wxASSERT(false);
131151 #else
132- hpl::error::halt("invalid polygon frame");
152+ continue;
153+// hpl::error::halt("invalid polygon frame");
133154 #endif
134155 }
135156 }
@@ -330,7 +351,12 @@
330351 hpl::math::exchange(&startBasePointIndex, &endBasePointIndex);
331352 }else if(endBasePointIndex == basePointIndex){
332353 }else{
333- hpl::error::halt("invalid basePointIndex");
354+#ifdef __WXDEBUG__
355+ wxASSERT(false);
356+#else
357+ return;
358+#endif
359+
334360 }
335361
336362 int lastPointIndex = NONE;
@@ -352,7 +378,11 @@
352378 }
353379
354380 line_data* line = get_line_data(conLineIndex);
355- if(!line)hpl::error::halt("line is null");
381+#ifdef __WXDEBUG__
382+ wxASSERT(line );
383+#else
384+ if(!line )continue;
385+#endif
356386 //高さチェック
357387 if(!hpl::aleph::map::isValidHeight(line->highest_adjacent_floor,
358388 line->lowest_adjacent_ceiling, zMin, zMax))
@@ -367,13 +397,25 @@
367397 //入れ替え
368398 hpl::math::exchange(&ep0Index, &ep1Index);
369399 }else{
370- assert(false);
400+#ifdef __WXDEBUG__
401+ wxASSERT(false );
402+#else
403+ continue;
404+#endif
371405 }
372406
373407 endpoint_data* ep0 = get_endpoint_data(ep0Index);
374- if(!ep0)hpl::error::halt("ep0 is null");
408+#ifdef __WXDEBUG__
409+ wxASSERT(ep0 );
410+#else
411+ if(!ep0 )continue;
412+#endif
375413 endpoint_data* ep1 = get_endpoint_data(ep1Index);
376- if(!ep1)hpl::error::halt("ep1 is null");
414+#ifdef __WXDEBUG__
415+ wxASSERT(ep1 );
416+#else
417+ if(!ep1 )continue;
418+#endif
377419
378420 double l0x = ep0->vertex.x;
379421 double l0y = ep0->vertex.y;
@@ -390,7 +432,11 @@
390432 //前の線の始点→共有点→最後の点で角度を求める
391433 //前の線の始点
392434 endpoint_data* prevStartEp = get_endpoint_data(startBasePointIndex);
393- assert(prevStartEp);
435+#ifdef __WXDEBUG__
436+ wxASSERT(prevStartEp );
437+#else
438+ if(!prevStartEp )continue;
439+#endif
394440 double deg = hpl::math::getTwoLinesDegree(prevStartEp->vertex.x,
395441 prevStartEp->vertex.y, l0x, l0y,
396442 l0x, l0y, l1x, l1y);
@@ -485,7 +531,11 @@
485531 }
486532 int lineIndexBase = pairs[i].index;
487533 line_data* startLine = get_line_data(lineIndexBase);
488- if(!startLine)hpl::error::halt("startLine is null");
534+#ifdef __WXDEBUG__
535+ wxASSERT(startLine );
536+#else
537+ if(!startLine )continue;
538+#endif
489539 //高さチェック
490540 if(!hpl::aleph::map::isValidHeight(startLine->highest_adjacent_floor,
491541 startLine->lowest_adjacent_ceiling, zMin, zMax))
@@ -495,10 +545,18 @@
495545
496546 int startPointIndex = startLine->endpoint_indexes[0];
497547 endpoint_data* epStart = get_endpoint_data(startPointIndex);
498- if(!epStart)hpl::error::halt("epStart is null");
548+#ifdef __WXDEBUG__
549+ wxASSERT(epStart );
550+#else
551+ if(!epStart )continue;
552+#endif
499553 int endPointIndex = startLine->endpoint_indexes[1];
500554 endpoint_data* epEnd = get_endpoint_data(endPointIndex);
501- if(!epEnd)hpl::error::halt("epEnd is null");
555+#ifdef __WXDEBUG__
556+ wxASSERT(epEnd );
557+#else
558+ if(!epEnd )continue;
559+#endif
502560
503561 //線の左右どちらの側に点があるかをチェックします
504562 int rotRem = hpl::math::getPointRotationTypeFromLine(
@@ -509,13 +567,13 @@
509567 {
510568 //右周りで、かつ線の右側(指定点のある領域)
511569 //にポリゴンが既にある場合スキップ
512- hpl::error::caution("already polygon exists");
570+// hpl::error::caution("already polygon exists");
513571 continue;
514572 }
515573 if(rotRem == hpl::math::RotationType::Counterclockwise &&
516574 startLine->clockwise_polygon_owner != NONE)
517575 {
518- hpl::error::caution("already polygon exists");
576+// hpl::error::caution("already polygon exists");
519577 continue;
520578 }
521579 //これ以降はすでに指定点の部分にポリゴンがないと仮定する
--- marathon/trunk/HPLLib/HPLMapTool.cpp (revision 364)
+++ marathon/trunk/HPLLib/HPLMapTool.cpp (revision 365)
@@ -860,9 +860,6 @@
860860 #ifdef __WXDEBUG__
861861 wxASSERT(poly);
862862 #else
863- if(!poly){
864- hpl::error::halt("polygon[%d] doesn't exist", selpoly->index);
865- }
866863 #endif
867864 int n = poly->vertex_count;
868865 selpoly->num = n;
@@ -870,11 +867,8 @@
870867 int vpoint[2];
871868 endpoint_data* ep = get_endpoint_data(poly->endpoint_indexes[j]);
872869 #ifdef __WXDEBUG__
873- wxASSERT(ep);
870+ wxASSERT(ep);
874871 #else
875- if(!ep){
876- hpl::error::halt("endpoint[%d] doesn't exist", poly->endpoint_indexes[j]);
877- }
878872 #endif
879873 hpl::aleph::map::getViewPointFromWorldPoint2D(ep->vertex, vpoint,
880874 woffsetX, woffsetY, div, voffsetX, voffsetY);
旧リポジトリブラウザで表示