• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン368 (tree)
日時2007-07-08 01:08:55
作者hogepiyo

ログメッセージ

*** empty log message ***

変更サマリ

差分

--- marathon/trunk/MapEditorWX/src/MapEditorWX.cpp (revision 367)
+++ marathon/trunk/MapEditorWX/src/MapEditorWX.cpp (revision 368)
@@ -146,7 +146,7 @@
146146 char *cursorPolygon = "cur00004.bmp";
147147 char *cursorLine = "LineCursor1.bmp";
148148 char *cursorFill = "pot.bmp";
149- char *cursorMag = "mag.bmp";
149+ char *cursorMag = "mag1.bmp";
150150
151151 int cursorId[] ={
152152 wxCURSOR_ARROW,
--- marathon/trunk/MapEditorWX/src/LinePropDialog.cpp (revision 367)
+++ marathon/trunk/MapEditorWX/src/LinePropDialog.cpp (revision 368)
@@ -199,6 +199,9 @@
199199 index = (int)PolygonList.size();
200200 }
201201 choice_27->SetSelection(index);
202+
203+ //値代入
204+ setupDialog();
202205 }
203206
204207 void LinePropDialog::OnElevation(wxCommandEvent &event)
@@ -269,3 +272,54 @@
269272 event.Skip();
270273 std::cout<<"Event handler (LinePropDialog::OnCClockwisePoly) not implemented yet"<<std::endl; //notify the user that he hasn't implemented the event handler yet
271274 }
275+static void setupChoice(wxChoice* choice, int max){
276+ for(int i = 0; i < max; i ++){
277+ choice->Insert(getString("%d", i), i);
278+ }
279+ choice->Insert(_T("NONE"), max);
280+}
281+void LinePropDialog::setupDialog()
282+{
283+ //Side Choiceのセットアップ
284+ setupChoice(this->choice_24, (int)SideList.size());
285+ setupChoice(this->choice_25, (int)SideList.size());
286+ //Polygon Choice
287+ setupChoice(this->choice_26, (int)PolygonList.size());
288+ setupChoice(this->choice_27, (int)PolygonList.size());
289+
290+ int index = getLineIndex();
291+ if(index == NONE){
292+ return;
293+ }
294+
295+ line_data* line = get_line_data(index);
296+#ifdef __WXDEBUG__
297+ wxASSERT(line);
298+#endif
299+ this->text_ctrl_42->SetValue(getString("%d", line->endpoint_indexes[0]));
300+ this->text_ctrl_43->SetValue(getString("%d", line->endpoint_indexes[1]));
301+
302+ this->checkbox_45->SetValue(LINE_IS_LANDSCAPED(line) != 0);
303+ this->checkbox_52->SetValue(LINE_IS_ELEVATION(line) != 0);
304+ this->checkbox_53->SetValue(LINE_IS_VARIABLE_ELEVATION(line) != 0);
305+ this->checkbox_54->SetValue(LINE_HAS_TRANSPARENT_SIDE(line) != 0);
306+
307+ this->radio_box_1->SetValue(LINE_IS_SOLID(line)?0:1);
308+
309+ this->text_ctrl_45->SetValue(getString("%d", line->length));
310+ this->text_ctrl_46->SetValue(getString("%d", line->length));
311+ this->text_ctrl_47->SetValue(getString("%d", line->length));
312+
313+ int n = line->clockwise_polygon_side_index;
314+ if(n == NONE) n = (int)SideList.size();
315+ this->choice_24->SetSelection(n);
316+ n = line->counterclockwise_polygon_side_index;
317+ if(n == NONE) n = (int)SideList.size();
318+ this->choice_25->SetSelection(n);
319+ n = line->clockwise_polygon_owner;
320+ if(n == NONE) n = (int)PolygonList.size();
321+ this->choice_26->SetSelection(n);
322+ n = line->counterclockwise_polygon_owner;
323+ if(n == NONE) n = (int)PolygonList.size();
324+ this->choice_27->SetSelection(n);
325+}
--- marathon/trunk/MapEditorWX/src/PolygonPropDialog.cpp (revision 367)
+++ marathon/trunk/MapEditorWX/src/PolygonPropDialog.cpp (revision 368)
@@ -209,6 +209,8 @@
209209 {
210210 this->polyIndex = index;
211211 setupDialog();
212+ //タイトル変更
213+ SetTitle(getString("Polygon prop [index:%d]", this->getPolyIndex()));
212214 }
213215 int PolygonPropDialog::getPolyIndex()
214216 {
--- marathon/trunk/MapEditorWX/src/MainFrameDraw.cpp (revision 367)
+++ marathon/trunk/MapEditorWX/src/MainFrameDraw.cpp (revision 368)
@@ -560,8 +560,8 @@
560560 wxGetApp().setting.getColorSetting()->strings[1],
561561 wxGetApp().setting.getColorSetting()->strings[2]);
562562 dc->SetTextForeground(col);
563- dc->SetPen(wxRED_PEN);
564- dc->SetBrush(wxTRANSPARENT_BRUSH);
563+ dc->SetPen(*wxRED_PEN);
564+ dc->SetBrush(*wxTRANSPARENT_BRUSH);
565565
566566 for(int i = 0; i < (int)MapAnnotationList.size(); i ++){
567567 map_annotation *annotation = &MapAnnotationList[i];
--- marathon/trunk/MapEditorWX/src/SelectLevelDialog.cpp (revision 367)
+++ marathon/trunk/MapEditorWX/src/SelectLevelDialog.cpp (revision 368)
@@ -20,7 +20,7 @@
2020 bool result = wxDialog::Create(parent, id, _T("Select Level"));
2121 label_57 = new wxStaticText(this, wxID_ANY, wxT("Select level"));
2222
23- list_box_4 = new wxListBox(this, wxID_ANY);
23+ list_box_4 = new wxListBox(this, ID_List);
2424 // button_22 = new wxButton(this, wxID_OK, wxEmptyString);
2525 button_23 = new wxButton(this, wxID_CANCEL, wxEmptyString);
2626
@@ -49,6 +49,10 @@
4949 {
5050 int sel = event.GetSelection();
5151 this->selectLevel = sel;
52+
53+ //終了
54+ SetReturnCode(wxID_OK);
55+ Destroy();
5256 }
5357 int SelectLevelDialog::getSelectLevel()
5458 {
@@ -65,6 +69,6 @@
6569
6670 void SelectLevelDialog::OnCancel(wxCommandEvent &event)
6771 {
68- SetReturnCode(wxCANCEL);
72+ SetReturnCode(wxID_CANCEL);
6973 Destroy();
7074 }
--- marathon/trunk/MapEditorWX/src/ObjectPropDialog.cpp (revision 367)
+++ marathon/trunk/MapEditorWX/src/ObjectPropDialog.cpp (revision 368)
@@ -67,9 +67,11 @@
6767 text_ctrl_40 = new wxTextCtrl(this, wxID_ANY, wxEmptyString);
6868 panel_18 = new wxPanel(this, wxID_ANY);
6969
70- text_ctrl_27->SetMinSize(wxSize(20, -1));
71- text_ctrl_32->SetMinSize(wxSize(20, -1));
70+ text_ctrl_27->SetMinSize(wxSize(25, -1));
71+ text_ctrl_32->SetMinSize(wxSize(25, -1));
7272 panel_16->SetMinSize(wxSize(120, 120));
73+ choice_21->SetMinSize(wxSize(130, 22));
74+ choice_22->SetMinSize(wxSize(130, 22));
7375 choice_23->SetMinSize(wxSize(90, 22));
7476 text_ctrl_39->SetMinSize(wxSize(50, -1));
7577 text_ctrl_41->SetMinSize(wxSize(50, -1));
--- marathon/trunk/MapEditorWX/src/ColorCustomizeDialog.cpp (revision 367)
+++ marathon/trunk/MapEditorWX/src/ColorCustomizeDialog.cpp (revision 368)
@@ -157,7 +157,7 @@
157157 }
158158 void ColorCustomizeDialog::OnCancel(wxCommandEvent &ev)
159159 {
160- SetReturnCode(wxID_OK);
160+ SetReturnCode(wxID_CANCEL);
161161 Destroy();
162162 }
163163 void ColorCustomizeDialog::setColor(int cols[]){
--- marathon/trunk/MapEditorWX/src/MainFrameLeftDown.cpp (revision 367)
+++ marathon/trunk/MapEditorWX/src/MainFrameLeftDown.cpp (revision 368)
@@ -9,11 +9,11 @@
99 void MapEditorMainFrame::OnLeftDown(wxMouseEvent &ev)
1010 {
1111 //線・点・オブジェクト・ポリゴン・Sideの指定を解除する
12- linePropDialog.setLineIndex(NONE);
12+/* linePropDialog.setLineIndex(NONE);
1313 pointPropDialog.setIndex(NONE);
1414 objPropDialog.setObjIndex(NONE);
1515 polyPropDialog.setPolyIndex(NONE);
16- sidePropDialog.setIndex(NONE);
16+ sidePropDialog.setIndex(NONE);*/
1717
1818 //カーソル設定
1919 wxGetApp().setCursor();
@@ -601,6 +601,15 @@
601601 }
602602 void MapEditorMainFrame::doLButtonOnTextTool(wxMouseEvent& ev)
603603 {
604+ int mx = ev.m_x;
605+ int my = ev.m_y;
606+ int voffset[2];
607+ //グリッドマネージャー
608+ hpl::aleph::view::HPLViewGridManager* vmgr = wxGetApp().getViewGridManager();
609+ vmgr->getOffset(voffset);
610+ int div = wxGetApp().getViewGridManager()->getZoomDivision();
611+ int zMin = vmgr->getViewHeightMin();
612+ int zMax = vmgr->getViewHeightMax();
604613 #ifdef MAP_VIEWER
605614 #else
606615 //shiftを押しながらだと編集モードになる
@@ -622,17 +631,17 @@
622631 if(annotationIndex != NONE){
623632 //アノテーションを編集します
624633 AnnotationDialog dlg;
625- dlg.Create(this, wxID_ANY, MapAnnotation[annotationIndex]);
626- if(dlg.ShowModal() == wxOK){
634+ dlg.Create(this, wxID_ANY, MapAnnotationList[annotationIndex]);
635+ if(dlg.ShowModal() == wxID_OK){
627636 map_annotation newAn = dlg.getAnnotation();
628637 //変更
629- memcpy(&MapAnnotation[annotationIndex],
638+ memcpy(&MapAnnotationList[annotationIndex],
630639 &newAn, sizeof(map_annotation));
631640 }
632641 }
633642
634643 //見つからなかった
635- hpl::error;;caution("No annotation found there");
644+ hpl::error::caution("No annotation found there");
636645 }else{
637646
638647 //アノテーション追加
--- marathon/trunk/MapEditorWX/src/PlatformDialog.cpp (revision 367)
+++ marathon/trunk/MapEditorWX/src/PlatformDialog.cpp (revision 368)
@@ -213,11 +213,15 @@
213213 sizer_1->Fit(this);
214214 Layout();
215215
216+ polyIndex = pindex;
217+
218+ platform_data *platform = &PlatformList[platformIndex];
219+
216220 //チョイスの初期化
217221 //TODO
218222 //値の設定
219223 //TODO
220- polyIndex = pindex;
224+
221225
222226 return result;
223227 }
--- marathon/trunk/MapEditorWX/src/MapEditorWX.h (revision 367)
+++ marathon/trunk/MapEditorWX/src/MapEditorWX.h (revision 368)
@@ -286,6 +286,8 @@
286286 線編集情報を初期化します
287287 */
288288 void resetLineEditInfo();
289+
290+ void getShapesImage(wxImage* img, int collection, int clut, int index);
289291 private:
290292
291293 };
--- marathon/trunk/MapEditorWX/src/LinePropDialog.h (revision 367)
+++ marathon/trunk/MapEditorWX/src/LinePropDialog.h (revision 368)
@@ -55,7 +55,7 @@
5555 int getLineIndex();
5656 public:
5757 void setLineIndex(int index);
58-
58+ void setupDialog();
5959 };
6060
6161 #endif
--- marathon/trunk/MapEditorWX/src/MainFrameMenuEvent.cpp (revision 367)
+++ marathon/trunk/MapEditorWX/src/MainFrameMenuEvent.cpp (revision 368)
@@ -439,8 +439,9 @@
439439 int sel = dlg.getSelectLevel();
440440 wxGetApp().editLevelIndex = sel;
441441 //ステージ読み込み
442- initLevel();
442+// initLevel();
443443 loadLevel(sel);
444+ Refresh();
444445 }
445446 }
446447 void MapEditorMainFrame::OnLevelInfo(wxCommandEvent& ev)
@@ -447,7 +448,7 @@
447448 {
448449 LevelInfoDialog dlg;
449450 dlg.Create(this, wxID_ANY);
450- if(dlg.ShowModal() != wxCANCEL){
451+ if(dlg.ShowModal() == wxID_OK){
451452 //設定反映
452453 }
453454 }
--- marathon/trunk/MapEditorWX/setting.ini (revision 367)
+++ marathon/trunk/MapEditorWX/setting.ini (revision 368)
@@ -1,9 +1,9 @@
11 GRID_SIZE_INDEX=0
2-COLOR_PRESET=1
3-BACKGROUND=0,0,0
4-GRID=50,50,50
5-LINES=50,255,0
6-POLYGONS=0,50,0
7-STRINGS=100,255,0
8-POINTS=255,255,0
2+COLOR_PRESET=2
3+BACKGROUND=128,255,255
4+GRID=0,128,255
5+LINES=0,0,255
6+POLYGONS=64,128,128
7+STRINGS=0,0,64
8+POINTS=0,255,64
99 FLAGS=1,1,1,1,1,1,1,1,1,1,1,1,
\ No newline at end of file
--- marathon/trunk/MapEditorWX/WXTODOリスト.txt (revision 367)
+++ marathon/trunk/MapEditorWX/WXTODOリスト.txt (revision 368)
@@ -166,7 +166,7 @@
166166 ?????Ԃ?????ĂȂ??H
167167 --
168168 TODO 2007 07 01
169-?H Jump (Select) other level
169+?ς? Jump (Select) other level
170170 object place
171171 placement dialog edit <-> listctrl
172172 object/point/side/line prop
@@ -203,3 +203,11 @@
203203 Refresh?
204204 ?ς? TODO ?|???S???h??‚Ԃ????s?̎??̃_?C?A???O????????
205205 EditPreferenceDiallog?Œlj????ׂ?Sizer???قȂ?CheckBox??????
206+
207+TODO Platform?l???f?A?ύX?L??
208+TODO Placement?N???b?N???e?L?X?g?{?b?N?X?ɕ\??
209+
210+?_?C?A???O?̕Ԃ??L????wxID_OK?ɓ???B
211+wxOK?̓X?^?C???ݒ?p?B
212+
213+TODO Shapes?f?[?^?ǂݍ???
\ No newline at end of file
--- marathon/trunk/MapEditorCommonSrc/MapEditorOneSetting.cpp (revision 367)
+++ marathon/trunk/MapEditorCommonSrc/MapEditorOneSetting.cpp (revision 368)
@@ -270,5 +270,5 @@
270270 }
271271
272272 //カスタム
273- return -1;
273+ return COL_CUSTOM;
274274 }
--- marathon/trunk/MapEditorCommonSrc/MapEditorOneSetting.h (revision 367)
+++ marathon/trunk/MapEditorCommonSrc/MapEditorOneSetting.h (revision 368)
@@ -49,8 +49,8 @@
4949 static char* POLYGON_SELECT_STLIPPLE_BITMAP_FILE_PATH = "data/img/bmp00005.bmp";
5050
5151 //ツールダイアログのサイズ
52-const int TOOL_DIALOG_W = 50;
53-const int TOOL_DIALOG_H = 150;
52+const int TOOL_DIALOG_W = 55;
53+const int TOOL_DIALOG_H = 120;
5454
5555 //ツールパレット
5656 static char *TOOL_BAR_ICONS_DIR_NAMR = "Toolbar/";
--- marathon/trunk/HPLLib/HPLShapesManager.cpp (nonexistent)
+++ marathon/trunk/HPLLib/HPLShapesManager.cpp (revision 368)
@@ -0,0 +1,44 @@
1+#include "HPLShapesManager.h"
2+#include "HPLError.h"
3+
4+hpl::shapes::HPLShapesManager::HPLShapesManager()
5+{
6+ this->isLoadedShapesFile_ = false;
7+}
8+hpl::shapes::HPLShapesManager::~HPLShapesManager()
9+{
10+}
11+bool hpl::shapes::HPLShapesManager::isLoadedShapesFile()
12+{
13+ return this->isLoadedShapesFile_;
14+}
15+/**
16+ Shapesファイルを読み込みます
17+ <en> load Shapes file
18+ @param path Shapesファイルパス <en> Shapes file's path
19+*/
20+void hpl::shapes::HPLShapesManager::loadShapesFile(const char* path)
21+{
22+ initialize_shape_handler();
23+
24+ FileSpecifier ShapesFile(path);
25+ if(!ShapesFile.Exists()){
26+ hpl::error::caution("no shapes file");
27+ }else{
28+ isLoadedShapesFile_ = true;
29+ open_shapes_file(ShapesFile);
30+ for(int i = 0; i < NUMBER_OF_COLLECTIONS; i ++){
31+ mark_collection_for_loading(i);
32+ }
33+ load_collections(false, false);
34+ }
35+}
36+/**
37+ 指定したShapesデータを取得します。
38+ @return 失敗時にNULL
39+*/
40+SDL_Surface* hpl::shapes::HPLShapesManager::getSurface(int collection, int clut, int index)
41+{
42+ //TODO
43+ return NULL;
44+}
--- marathon/trunk/HPLLib/HPLShapesManager.h (nonexistent)
+++ marathon/trunk/HPLLib/HPLShapesManager.h (revision 368)
@@ -0,0 +1,46 @@
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+ 指定したShapesデータを取得します。
40+ @return 失敗時にNULL
41+ */
42+ SDL_Surface* getSurface(int collection, int clut, int index);
43+ };
44+};
45+};
46+#endif
旧リポジトリブラウザで表示