• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン461 (tree)
日時2007-08-30 20:52:45
作者hogepiyo

ログメッセージ

パネルに色々追加
フラグの表示は大体OK

変更サマリ

差分

--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.cpp (revision 460)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.cpp (revision 461)
@@ -56,9 +56,13 @@
5656 {
5757 wxASSERT(type >= 0 && type < NUMBER_OF_MONSTER_TYPES);
5858
59+ wxGetApp().setEditingMonsterIndex(type);
60+
5961 //appearanceの更新
6062
6163 //flagsの更新
64+ this->flagsPanel->setup();
65+
6266 //attackの更新
6367
6468 }
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.cpp (revision 460)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.cpp (revision 461)
@@ -69,8 +69,8 @@
6969 staticFlagsSizer->Add(sizerFlags);
7070
7171 sizerBase->Add(staticDamageSizer, 0, wxEXPAND);
72- sizerBase->Add(staticEnemySizer, 1, wxEXPAND);
73- sizerBase->Add(staticFlagsSizer, 2, wxEXPAND);
72+ sizerBase->Add(staticEnemySizer, 0, wxEXPAND);
73+ sizerBase->Add(staticFlagsSizer, 0, wxEXPAND);
7474 this->SetSizer(sizerBase);
7575 sizerBase->Fit(this);
7676 this->Layout();
@@ -82,20 +82,83 @@
8282
8383 void MonsterFlagsPanel::OnImmunities(wxCommandEvent& ev)
8484 {
85-/* //全フラグチェックボックスの状態をデータにコピー
85+ uint32 flags = 0;
86+ //全フラグチェックボックスの状態をデータにコピー
8687 for(int i = 0; i < NUMBER_OF_DAMAGE_TYPES; i ++){
87- SET_FLAG32(monster_definitions[wxGetApp().frame->get]
88- }*/
88+ SET_FLAG32(flags, i, this->immunities[i]->GetValue());
89+ }
90+ int type = wxGetApp().getEditingMonsterIndex();
91+ monster_definitions[type].immunities = flags;
8992 }
9093 void MonsterFlagsPanel::OnWeaknesses(wxCommandEvent& ev)
9194 {
95+ uint32 flags = 0;
96+ //全フラグチェックボックスの状態をデータにコピー
97+ for(int i = 0; i < NUMBER_OF_DAMAGE_TYPES; i ++){
98+ SET_FLAG32(flags, i, this->weaknesses[i]->GetValue());
99+ }
100+ int type = wxGetApp().getEditingMonsterIndex();
101+ monster_definitions[type].weaknesses = flags;
92102 }
103+
104+//////////////////
93105 void MonsterFlagsPanel::OnFriends(wxCommandEvent& ev)
94106 {
107+ uint32 flags = 0;
108+ //全フラグチェックボックスの状態をデータにコピー
109+ for(int i = 0; i < NUMBER_OF_CLASS_INFORMATIONS; i ++){
110+ SET_FLAG32(flags, i, this->friends[i]->GetValue());
111+ }
112+ int type = wxGetApp().getEditingMonsterIndex();
113+ monster_definitions[type].friends = flags;
95114 }
96115 void MonsterFlagsPanel::OnEnemies(wxCommandEvent& ev)
97116 {
117+ uint32 flags = 0;
118+ //全フラグチェックボックスの状態をデータにコピー
119+ for(int i = 0; i < NUMBER_OF_CLASS_INFORMATIONS; i ++){
120+ SET_FLAG32(flags, i, this->enemies[i]->GetValue());
121+ }
122+ int type = wxGetApp().getEditingMonsterIndex();
123+ monster_definitions[type].enemies = flags;
98124 }
125+
126+///////////////////
99127 void MonsterFlagsPanel::OnFlags(wxCommandEvent& ev)
100128 {
129+ uint32 flags = 0;
130+ //全フラグチェックボックスの状態をデータにコピー
131+ for(int i = 0; i < NUMBER_OF_MONSTER_FLAG_INFORMATIONS; i ++){
132+ SET_FLAG32(flags, i, this->flags[i]->GetValue());
133+ }
134+ int type = wxGetApp().getEditingMonsterIndex();
135+ monster_definitions[type].flags = flags;
101136 }
137+
138+/////////////////
139+void MonsterFlagsPanel::setup()
140+{
141+ int type = wxGetApp().getEditingMonsterIndex();
142+
143+ //immunities/weaknesses
144+ for(int i = 0; i < NUMBER_OF_DAMAGE_TYPES; i ++){
145+ this->immunities[i]->SetValue(TEST_FLAG32(
146+ monster_definitions[type].immunities, i));
147+ this->weaknesses[i]->SetValue(TEST_FLAG32(
148+ monster_definitions[type].weaknesses, i));
149+ }
150+
151+ //friends/enemies
152+ for(int i = 0; i < NUMBER_OF_CLASS_INFORMATIONS; i ++){
153+ this->friends[i]->SetValue(TEST_FLAG32(
154+ monster_definitions[type].friends, i));
155+ this->enemies[i]->SetValue(TEST_FLAG32(
156+ monster_definitions[type].enemies, i));
157+ }
158+
159+ //flags
160+ for(int i = 0; i < NUMBER_OF_MONSTER_FLAG_INFORMATIONS; i ++){
161+ this->flags[i]->SetValue(TEST_FLAG32(
162+ monster_definitions[type].flags, i));
163+ }
164+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.cpp (revision 460)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.cpp (revision 461)
@@ -61,6 +61,7 @@
6161 :wxPanel(parent, id)
6262 {
6363 //create
64+ // appearance/system
6465 this->collectionChoice = new wxChoice(this, ID_COLLECTION);
6566 this->paletteText = new wxTextCtrl(this, ID_PALETTE);
6667 this->vitalityText = new wxTextCtrl(this, ID_VITALITY);
@@ -79,6 +80,49 @@
7980 this->speedChoice = new wxChoice(this, ID_SPEED_CHOICE);
8081 this->gravityText = new wxTextCtrl(this, ID_GRAVITY);
8182
83+ //sequences
84+ this->stationalyText = new wxTextCtrl(this, ID_STATIONALY);
85+ this->movingText = new wxTextCtrl(this, ID_MOVING);
86+ this->hittingText = new wxTextCtrl(this, ID_HITTING);
87+ this->softDyingText = new wxTextCtrl(this, ID_SOFT_DYING);
88+ this->softDeadText = new wxTextCtrl(this, ID_SOFT_DEAD);
89+ this->hardDyingText = new wxTextCtrl(this, ID_HARD_DYING);
90+ this->hardDeadText = new wxTextCtrl(this, ID_HARD_DEAD);
91+ this->teleportInText = new wxTextCtrl(this, ID_TELEPORT_IN);
92+ this->teleportOutText = new wxTextCtrl(this, ID_TELEPORT_OUT);
93+
94+ //shrapnel damages
95+ this->shrapnelRadiusText = new wxTextCtrl(this, ID_SHRAPNEL_RADIUS);
96+ this->shrapnelBaseText = new wxTextCtrl(this, ID_SHRAPNEL_BASE);
97+ this->shrapnelRndText = new wxTextCtrl(this, ID_SHRAPNEL_RND);
98+ this->shrapnelScaleText = new wxTextCtrl(this, ID_SHRAPNEL_SCALE);
99+ this->shrapnelTypeChoice = new wxChoice(this, ID_SHRAPNEL_TYPE);
100+ this->shrapnelIsAlienCheckbox = new wxCheckBox(this, ID_SHRAPNEL_IS_ALIEN,
101+ _T("Shrapnel is alien"));
102+
103+ copyFromButton = new wxButton(this, ID_COPY_FROM, _T("Copy from ..."));
104+
105+ //sound
106+ soundPitchText = new wxTextCtrl(this, ID_PITCH);
107+ soundActivationChoice = new wxChoice(this, ID_ACTIVATION);
108+ soundFriendActChoice = new wxChoice(this, ID_FRIEND_ACT);
109+ soundClearChoice = new wxChoice(this, ID_CLEAR);
110+ soundKillChoice = new wxChoice(this, ID_KILL);
111+ soundApologyChoice = new wxChoice(this, ID_APOLYGY);
112+ soundFriendFireChoice = new wxChoice(this, ID_FRIEND_FIRE);
113+ soundFlamingChoice = new wxChoice(this, ID_FLAMING);
114+ soundRandomChoice = new wxChoice(this, ID_RANDOM);
115+ soundRandomMask = new wxTextCtrl(this, ID_RANDOM_MASK);
116+
117+ //effect
118+ effectChoice = new wxChoice(this, ID_EFFECT);
119+ effectMeleeChoice = new wxChoice(this, ID_EFFECT_MELEE);
120+ effectContrailChoice = new wxChoice(this, ID_EFFECT_CONTRAIL);
121+
122+ //reset
123+ resetButton = new wxButton(this, ID_RESET, _T("Reset"));
124+
125+ //static boxes
82126 wxStaticBox* appearanceStaticBox = new wxStaticBox(this, wxID_ANY, _T("Apeearance"));
83127 wxStaticBox* shrapnelStaticBox = new wxStaticBox(this, wxID_ANY, _T("Shrapnel damages"));
84128 wxStaticBox* soundStaticBox = new wxStaticBox(this, wxID_ANY, _T("Sounds"));
@@ -151,14 +195,27 @@
151195
152196 // center column
153197 wxFlexGridSizer* appearanceAndShrapnelSizer = new wxFlexGridSizer(3, 1,0,0);
154- wxStaticBoxSizer* appearanceStaticSizer = new wxStaticBoxSizer(appearanceStaticBox, wxVERTICAL);
198+ // appearance
199+ wxStaticBoxSizer* appearanceStaticSizer = new wxStaticBoxSizer(appearanceStaticBox,
200+ wxVERTICAL);
155201 appearanceAndShrapnelSizer->Add(appearanceStaticSizer);
202+ // shrapnel
156203 wxStaticBoxSizer* shrapnelStaticSizer = new wxStaticBoxSizer(shrapnelStaticBox, wxVERTICAL);
157204 appearanceAndShrapnelSizer->Add(shrapnelStaticSizer);
158205 // button
206+ appearanceAndShrapnelSizer->Add(this->copyFromButton,0,wxEXPAND,0,0);
159207
208+
209+ // right column
210+ wxFlexGridSizer* soundAndEffectSizer = new wxFlexGridSizer(3, 1, 0,0);
211+ wxStaticBoxSizer* soundStaticSizer = new wxStaticBoxSizer(soundStaticBox, wxVERTICAL);
212+ soundAndEffectSizer->Add(soundStaticSizer);
213+ wxStaticBoxSizer* effectStaticSizer = new wxStaticBoxSizer(effectStaticBox, wxVERTICAL);
214+ soundAndEffectSizer->Add(effectStaticSizer);
215+
160216 baseSizer->Add(infoSizer);
161217 baseSizer->Add(appearanceAndShrapnelSizer);
218+ baseSizer->Add(soundAndEffectSizer);
162219
163220 this->SetSizer(baseSizer);
164221 baseSizer->Fit(this);
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.h (revision 460)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.h (revision 461)
@@ -23,6 +23,7 @@
2323 MonsterFlagsPanel(wxWindow* parent, wxWindowID id);
2424 virtual ~MonsterFlagsPanel();
2525
26+protected:
2627 DECLARE_EVENT_TABLE()
2728 void OnImmunities(wxCommandEvent& ev);
2829 void OnWeaknesses(wxCommandEvent& ev);
@@ -29,6 +30,9 @@
2930 void OnFriends(wxCommandEvent& ev);
3031 void OnEnemies(wxCommandEvent& ev);
3132 void OnFlags(wxCommandEvent& ev);
33+public:
34+
35+ void setup();
3236 };
3337
3438 #endif
旧リポジトリブラウザで表示