*** empty log message ***
@@ -31,7 +31,8 @@ | ||
31 | 31 | virtual ~ColorCustomizeDialog(); |
32 | 32 | //イベントテーブル作成<en>declare |
33 | 33 | DECLARE_EVENT_TABLE() |
34 | - void OnOk(wxCommandEvent& wv); | |
34 | + | |
35 | + void OnOk(wxCommandEvent& ev); | |
35 | 36 | void OnCancel(wxCommandEvent &ev); |
36 | 37 | void OnBackground(wxCommandEvent &event); // wxGlade: <event_handler> |
37 | 38 | void OnGrid(wxCommandEvent &event); // wxGlade: <event_handler> |
@@ -158,7 +158,6 @@ | ||
158 | 158 | dc->SetBrush(this->invalidBrush); |
159 | 159 | } |
160 | 160 | } |
161 | - //TODO 整合性 | |
162 | 161 | |
163 | 162 | dc->DrawPolygon(vertexCount, points); |
164 | 163 | } |
@@ -9,15 +9,16 @@ | ||
9 | 9 | ID_POINTS, |
10 | 10 | }; |
11 | 11 | BEGIN_EVENT_TABLE(ColorCustomizeDialog, wxDialog) |
12 | - EVT_BUTTON(ID_BACKGROUND, ColorCustomize::OnBackground) | |
13 | - EVT_BUTTON(ID_GRID, ColorCustomize::OnGrid) | |
14 | - EVT_BUTTON(ID_LINES, ColorCustomize::OnLines) | |
15 | - EVT_BUTTON(ID_POLYGONS, ColorCustomize::OnPolygons) | |
16 | - EVT_BUTTON(ID_STRINGS, ColorCustomize::OnStrings) | |
17 | - EVT_BUTTON(ID_POINTS, ColorCustomize::OnPoints) | |
18 | - EVT_COMMAND(wxID_OK, ColorCustomizeDialog::OnOk) | |
19 | - EVT_COMMAND(wxID_CANCEL, ColorCustomizeDialog::OnCancel) | |
12 | + EVT_BUTTON(ID_BACKGROUND, ColorCustomizeDialog::OnBackground) | |
13 | + EVT_BUTTON(ID_GRID, ColorCustomizeDialog::OnGrid) | |
14 | + EVT_BUTTON(ID_LINES, ColorCustomizeDialog::OnLines) | |
15 | + EVT_BUTTON(ID_POLYGONS, ColorCustomizeDialog::OnPolygons) | |
16 | + EVT_BUTTON(ID_STRINGS, ColorCustomizeDialog::OnStrings) | |
17 | + EVT_BUTTON(ID_POINTS, ColorCustomizeDialog::OnPoints) | |
18 | + EVT_BUTTON(wxID_OK, ColorCustomizeDialog::OnOk) | |
19 | + EVT_BUTTON(wxID_CANCEL, ColorCustomizeDialog::OnCancel) | |
20 | 20 | END_EVENT_TABLE() |
21 | + | |
21 | 22 | ColorCustomizeDialog::ColorCustomizeDialog() |
22 | 23 | { |
23 | 24 | } |
@@ -92,7 +93,7 @@ | ||
92 | 93 | |
93 | 94 | return result; |
94 | 95 | } |
95 | -void ColorCustomize::OnOk(wxCommandEvent& wv) | |
96 | +void ColorCustomize::OnOk(wxCommandEvent& ev) | |
96 | 97 | { |
97 | 98 | SetReturnCode(wxID_OK); |
98 | 99 | Destroy(); |
@@ -18,6 +18,8 @@ | ||
18 | 18 | EVT_TEXT(ID_TX, PointPropDialog::OnEditTX) |
19 | 19 | EVT_TEXT(ID_TY, PointPropDialog::OnEditTY) |
20 | 20 | EVT_CHOICE(ID_POLY_INDEX, PointPropDialog::OnPolyChoice) |
21 | +END_EVENT_TABLE() | |
22 | + | |
21 | 23 | PointPropDialog::PointPropDialog() |
22 | 24 | { |
23 | 25 | } |
@@ -12,8 +12,12 @@ | ||
12 | 12 | #include <wx/sizer.h> |
13 | 13 | #include <wx/image.h> |
14 | 14 | #include <wx/radiobut.h> |
15 | +#include <wx/listctrl.h> | |
16 | +#include <wx/listbox.h> | |
15 | 17 | |
16 | 18 | #include "HPLLib/HPLEventManager.h" |
17 | 19 | #include <string> |
18 | 20 | |
21 | +#include <iostream> | |
22 | + | |
19 | 23 | #endif |
@@ -841,35 +841,35 @@ | ||
841 | 841 | return index; |
842 | 842 | } |
843 | 843 | |
844 | -line_data hpl::aleph::map::createLine(int beginPointIndex, int endPointIndex) | |
844 | +bool hpl::aleph::map::createLine(int beginPointIndex, int endPointIndex, line_data* line) | |
845 | 845 | { |
846 | 846 | endpoint_data* begin = get_endpoint_data(beginPointIndex); |
847 | 847 | endpoint_data* end = get_endpoint_data(endPointIndex); |
848 | 848 | if(begin == NULL || end == NULL){ |
849 | - return NONE; | |
849 | + return false; | |
850 | 850 | } |
851 | - line_data line; | |
852 | - line.clockwise_polygon_owner = NONE; | |
853 | - line.clockwise_polygon_side_index = NONE; | |
854 | - line.counterclockwise_polygon_owner = NONE; | |
855 | - line.counterclockwise_polygon_side_index = NONE; | |
856 | - line.endpoint_indexes[0] = beginPointIndex; | |
857 | - line.endpoint_indexes[1] = endPointIndex; | |
858 | - line.flags = 0; | |
851 | + line->clockwise_polygon_owner = NONE; | |
852 | + line->clockwise_polygon_side_index = NONE; | |
853 | + line->counterclockwise_polygon_owner = NONE; | |
854 | + line->counterclockwise_polygon_side_index = NONE; | |
855 | + line->endpoint_indexes[0] = beginPointIndex; | |
856 | + line->endpoint_indexes[1] = endPointIndex; | |
857 | + line->flags = 0; | |
859 | 858 | //TODO 点のうち高い方のフロア高度 |
860 | - line.highest_adjacent_floor = 0; | |
861 | - return line; | |
859 | + line->highest_adjacent_floor = 0; | |
860 | + return true; | |
862 | 861 | } |
863 | -polygon_data hpl::aleph::map::createPolygon(int pointIndexes[], int n) | |
862 | + | |
863 | +bool hpl::aleph::map::createPolygon(int pointIndexes[], int n, polygon_data* poly) | |
864 | 864 | { |
865 | 865 | endpoint_data* ep[MAXIMUM_VERTICES_PER_POLYGON]; |
866 | - polygon_data poly; | |
866 | + | |
867 | 867 | for(int i = 0; i < n; i ++){ |
868 | 868 | ep[i] = get_endpoint_data(pointIndexes[i]); |
869 | 869 | if(ep[i] == NULL){ |
870 | - return NONE; | |
870 | + return false; | |
871 | 871 | } |
872 | - poly.endpoint_indexes[i] = pointIndexes[i]; | |
872 | + poly->endpoint_indexes[i] = pointIndexes[i]; | |
873 | 873 | } |
874 | 874 | for(int i = 0; i < n; i ++){ |
875 | 875 | int next = i + 1; |
@@ -878,47 +878,48 @@ | ||
878 | 878 | } |
879 | 879 | int lIndex = hpl::aleph::map::getLineIndexFromTwoLPoints(pointIndexes[i], pointIndexes[next]); |
880 | 880 | if(lIndex == NONE){ |
881 | - return NONE; | |
881 | + return false; | |
882 | 882 | } |
883 | - poly.line_indexes[i] = lIndex; | |
883 | + poly->line_indexes[i] = lIndex; | |
884 | 884 | } |
885 | - poly.adjacent_polygon_indexes = NONE; | |
886 | - poly.ambient_sound_image_index = NONE; | |
885 | + //TODO | |
886 | + //poly->adjacent_polygon_indexes = NONE; | |
887 | + poly->ambient_sound_image_index = NONE; | |
887 | 888 | //TODO area? |
888 | - poly.area = 0; | |
889 | + poly->area = 0; | |
889 | 890 | //TODO 点のうち一番高い高度 |
890 | - poly.ceiling_height = WORLD_ONE; | |
891 | - poly.ceiling_lightsource_index = NONE; | |
891 | + poly->ceiling_height = WORLD_ONE; | |
892 | + poly->ceiling_lightsource_index = NONE; | |
892 | 893 | //TODO ? |
893 | - poly.ceiling_origin.x = 0; | |
894 | - poly.ceiling_origin.y = 0; | |
895 | - poly.ceiling_texture = NONE; | |
894 | + poly->ceiling_origin.x = 0; | |
895 | + poly->ceiling_origin.y = 0; | |
896 | + poly->ceiling_texture = NONE; | |
896 | 897 | //TODO ? |
897 | - poly.ceiling_transfer_mode = 0; | |
898 | + poly->ceiling_transfer_mode = 0; | |
898 | 899 | //TODO center? |
899 | - poly.center.x = 0; | |
900 | - poly.center.y = 0; | |
900 | + poly->center.x = 0; | |
901 | + poly->center.y = 0; | |
901 | 902 | //TODO ZONE? |
902 | - poly.first_exclusion_zone_index = NONE; | |
903 | - poly.line_exclusion_zone_count = 0; | |
904 | - poly.point_exclusion_zone_count = 0; | |
903 | + poly->first_exclusion_zone_index = NONE; | |
904 | + poly->line_exclusion_zone_count = 0; | |
905 | + poly->point_exclusion_zone_count = 0; | |
905 | 906 | //TODO ? |
906 | - poly.first_neighbor_index = NONE; | |
907 | - poly.first_object = NONE; | |
907 | + poly->first_neighbor_index = NONE; | |
908 | + poly->first_object = NONE; | |
908 | 909 | //TODO flags? |
909 | - poly.flags = 0; | |
910 | - poly.media_index = NONE; | |
911 | - poly.media_lightsource_index = NONE; | |
910 | + poly->flags = 0; | |
911 | + poly->media_index = NONE; | |
912 | + poly->media_lightsource_index = NONE; | |
912 | 913 | //TODO count 線の反対側の |
913 | - poly.neighbor_count = 0; | |
914 | + poly->neighbor_count = 0; | |
914 | 915 | //TODO ? |
915 | - poly.permutation = 0; | |
916 | - poly.random_sound_image_index = NONE; | |
917 | - //poly.side_indexes[0] = NONE; | |
918 | - //poly.sound_source_indexes; | |
919 | - poly.type = _polygon_is_normal; | |
920 | - poly.vertex_count = n; | |
921 | - return poly; | |
916 | + poly->permutation = 0; | |
917 | + poly->random_sound_image_index = NONE; | |
918 | + //poly->side_indexes[0] = NONE; | |
919 | + //poly->sound_source_indexes; | |
920 | + poly->type = _polygon_is_normal; | |
921 | + poly->vertex_count = n; | |
922 | + return true; | |
922 | 923 | } |
923 | 924 | |
924 | 925 | /** |
@@ -310,8 +310,8 @@ | ||
310 | 310 | 既存の点を用いて線やポリゴンを作成します |
311 | 311 | <en> create new line and polygon with points already exist |
312 | 312 | */ |
313 | - line_data createLine(int beginPointIndex, int endPointIndex); | |
314 | - polygon_data createPolygon(int pointIndexes[], int n); | |
313 | + bool createLine(int beginPointIndex, int endPointIndex, line_data* line); | |
314 | + bool createPolygon(int pointIndexes[], int n, polygon_data* poly); | |
315 | 315 | |
316 | 316 | /** |
317 | 317 | 点情報を削除します |