• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン473 (tree)
日時2007-09-08 19:51:31
作者hogepiyo

ログメッセージ

*** empty log message ***

変更サマリ

差分

--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponAppearancePanel.h (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponAppearancePanel.h (revision 473)
@@ -34,6 +34,30 @@
3434 WeaponAppearancePanel(wxWindow* parent, wxWindowID id);
3535 virtual ~WeaponAppearancePanel();
3636 DECLARE_EVENT_TABLE()
37+ void OnCollection(wxCommandEvent& ev);
38+ void OnPalette(wxCommandEvent& ev);
39+ void OnIdleSeq(wxCommandEvent& ev);
40+ void OnFiringSeq(wxCommandEvent& ev);
41+ void OnReloadSeq(wxCommandEvent& ev);
42+ void OnChargingSeq(wxCommandEvent& ev);
43+ void OnChargedSeq(wxCommandEvent& ev);
44+ void OnItem(wxCommandEvent& ev);
45+ void OnClass(wxCommandEvent& ev);
46+ void OnLightIntensity(wxCommandEvent& ev);
47+ void OnIntensityDecay(wxCommandEvent& ev);
48+ void OnIdleWidth(wxCommandEvent& ev);
49+ void OnIdleHeight(wxCommandEvent& ev);
50+ void OnFiringHeight(wxCommandEvent& ev);
51+ void OnReloadingHeight(wxCommandEvent& ev);
52+ void OnHorizontalAmplitude(wxCommandEvent& ev);
53+ void OnUserAmplitude(wxCommandEvent& ev);
54+ void OnReadyTicks(wxCommandEvent& ev);
55+ void OnAwaitReloadTicks(wxCommandEvent& ev);
56+ void OnLoadingTicks(wxCommandEvent& ev);
57+ void OnLoadedTicks(wxCommandEvent& ev);
58+
59+ void OnFlags(wxCommandEvent& ev);
60+ int common();
3761 public:
3862 void setup();
3963 };
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAttackPanel.cpp (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAttackPanel.cpp (revision 473)
@@ -178,58 +178,56 @@
178178 }
179179 void MonsterAttackPanel::OnFrequency(wxCommandEvent& ev)
180180 {
181- int type = wxGetApp().getEditingMonsterIndex();
181+ int type = common();
182182 monster_definitions[type].attack_frequency = getNumberFromTextCtrl(&ev);
183- wxGetApp().setNewAndChanged(false, true);
184183 }
185184
186185 void MonsterAttackPanel::OnMeleeType(wxCommandEvent& ev)
187186 {
188- int type = wxGetApp().getEditingMonsterIndex();
187+ int type = common();
189188 monster_definitions[type].melee_attack.type = getChoice(&ev, NUMBER_OF_PROJECTILE_TYPES);
190- wxGetApp().setNewAndChanged(false, true);
189+
191190 }
192191 void MonsterAttackPanel::OnMeleeRep(wxCommandEvent& ev)
193192 {
194- int type = wxGetApp().getEditingMonsterIndex();
193+ int type = common();
195194 monster_definitions[type].melee_attack.repetitions = getNumberFromTextCtrl(&ev);
196- wxGetApp().setNewAndChanged(false, true);
195+
197196 }
198197 void MonsterAttackPanel::OnMeleeError(wxCommandEvent& ev)
199198 {
200- int type = wxGetApp().getEditingMonsterIndex();
199+ int type = common();
201200 monster_definitions[type].melee_attack.error = getNumberFromTextCtrl(&ev);
202- wxGetApp().setNewAndChanged(false, true);
203201 }
204202 void MonsterAttackPanel::OnMeleeRange(wxCommandEvent& ev)
205203 {
206- int type = wxGetApp().getEditingMonsterIndex();
204+ int type = common();
207205 monster_definitions[type].melee_attack.range = getNumberFromTextCtrl(&ev);
208- wxGetApp().setNewAndChanged(false, true);
206+
209207 }
210208 void MonsterAttackPanel::OnMeleeSequence(wxCommandEvent& ev)
211209 {
212- int type = wxGetApp().getEditingMonsterIndex();
210+ int type = common();
213211 monster_definitions[type].melee_attack.attack_shape = getNumberFromTextCtrl(&ev);
214- wxGetApp().setNewAndChanged(false, true);
212+
215213 }
216214 void MonsterAttackPanel::OnMeleeDX(wxCommandEvent& ev)
217215 {
218- int type = wxGetApp().getEditingMonsterIndex();
216+ int type = common();
219217 monster_definitions[type].melee_attack.dx = getNumberFromTextCtrl(&ev);
220- wxGetApp().setNewAndChanged(false, true);
218+
221219 }
222220 void MonsterAttackPanel::OnMeleeDY(wxCommandEvent& ev)
223221 {
224- int type = wxGetApp().getEditingMonsterIndex();
222+ int type = common();
225223 monster_definitions[type].melee_attack.dy = getNumberFromTextCtrl(&ev);
226- wxGetApp().setNewAndChanged(false, true);
224+
227225 }
228226 void MonsterAttackPanel::OnMeleeDZ(wxCommandEvent& ev)
229227 {
230- int type = wxGetApp().getEditingMonsterIndex();
228+ int type = common();
231229 monster_definitions[type].melee_attack.dz = getNumberFromTextCtrl(&ev);
232- wxGetApp().setNewAndChanged(false, true);
230+
233231 }
234232 void MonsterAttackPanel::OnMeleeCopyFrom(wxCommandEvent& ev)
235233 {
@@ -239,62 +237,62 @@
239237 int index = dlg->getIndex();
240238 //
241239 monster_definition* def = wxGetApp().getDefaultValues()->getMonsterDefinition(index);
242- int type = wxGetApp().getEditingMonsterIndex();
240+ int type = common();
243241 //関連だけコピー
244242 memcpy(&monster_definitions[type].melee_attack,
245243 &def->melee_attack, sizeof(attack_definition));
246244 setup();
247245 }
248- wxGetApp().setNewAndChanged(false, true);
246+
249247 }
250248
251249 void MonsterAttackPanel::OnRangedType(wxCommandEvent& ev)
252250 {
253- int type = wxGetApp().getEditingMonsterIndex();
251+ int type = common();
254252 monster_definitions[type].ranged_attack.type = getChoice(&ev, NUMBER_OF_PROJECTILE_TYPES);
255- wxGetApp().setNewAndChanged(false, true);
253+
256254 }
257255 void MonsterAttackPanel::OnRangedRep(wxCommandEvent& ev)
258256 {
259- int type = wxGetApp().getEditingMonsterIndex();
257+ int type = common();
260258 monster_definitions[type].ranged_attack.repetitions = getNumberFromTextCtrl(&ev);
261- wxGetApp().setNewAndChanged(false, true);
259+
262260 }
263261 void MonsterAttackPanel::OnRangedError(wxCommandEvent& ev)
264262 {
265- int type = wxGetApp().getEditingMonsterIndex();
263+ int type = common();
266264 monster_definitions[type].ranged_attack.error = getNumberFromTextCtrl(&ev);
267- wxGetApp().setNewAndChanged(false, true);
265+
268266 }
269267 void MonsterAttackPanel::OnRangedRange(wxCommandEvent& ev)
270268 {
271- int type = wxGetApp().getEditingMonsterIndex();
269+ int type = common();
272270 monster_definitions[type].ranged_attack.range = getNumberFromTextCtrl(&ev);
273- wxGetApp().setNewAndChanged(false, true);
271+
274272 }
275273 void MonsterAttackPanel::OnRangedSequence(wxCommandEvent& ev)
276274 {
277- int type = wxGetApp().getEditingMonsterIndex();
275+ int type = common();
278276 monster_definitions[type].ranged_attack.attack_shape = getNumberFromTextCtrl(&ev);
279- wxGetApp().setNewAndChanged(false, true);
277+
280278 }
281279 void MonsterAttackPanel::OnRangedDX(wxCommandEvent& ev)
282280 {
283- int type = wxGetApp().getEditingMonsterIndex();
284- wxGetApp().setNewAndChanged(false, true);
281+ int type = common();
282+
285283 monster_definitions[type].ranged_attack.dx = getNumberFromTextCtrl(&ev);
286284 }
287285 void MonsterAttackPanel::OnRangedDY(wxCommandEvent& ev)
288286 {
289- int type = wxGetApp().getEditingMonsterIndex();
287+ int type = common();
290288 monster_definitions[type].ranged_attack.dy = getNumberFromTextCtrl(&ev);
291- wxGetApp().setNewAndChanged(false, true);
289+
292290 }
293291 void MonsterAttackPanel::OnRangedDZ(wxCommandEvent& ev)
294292 {
295- int type = wxGetApp().getEditingMonsterIndex();
293+ int type = common();
296294 monster_definitions[type].ranged_attack.dz = getNumberFromTextCtrl(&ev);
297- wxGetApp().setNewAndChanged(false, true);
295+
298296 }
299297 void MonsterAttackPanel::OnRangedCopyFrom(wxCommandEvent& ev)
300298 {
@@ -304,18 +302,18 @@
304302 int index = dlg->getIndex();
305303 //
306304 monster_definition* def = wxGetApp().getDefaultValues()->getMonsterDefinition(index);
307- int type = wxGetApp().getEditingMonsterIndex();
305+ int type = common();
308306 //関連だけコピー
309307 memcpy(&monster_definitions[type].ranged_attack,
310308 &def->ranged_attack, sizeof(attack_definition));
311309 setup();
312310 }
313- wxGetApp().setNewAndChanged(false, true);
311+
314312 }
315313
316314 void MonsterAttackPanel::setup()
317315 {
318- int type = wxGetApp().getEditingMonsterIndex();
316+ int type = common();
319317
320318 //frequency
321319 frequencyText->SetValue(wx::string::getString("%d",
@@ -358,3 +356,10 @@
358356 monster_definitions[type].ranged_attack.dz));
359357
360358 }
359+
360+int MonsterAttackPanel::common()
361+{
362+ int type = wxGetApp().getEditingMonsterIndex();
363+ wxGetApp().setChanged(true);
364+ return type;
365+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.h (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.h (revision 473)
@@ -72,7 +72,7 @@
7272 void OnSecondaryShellCasing(wxCommandEvent& ev);
7373 void OnSecondaryBurstCount(wxCommandEvent& ev);
7474 int common();
75- wxStaticBoxSizer* getTriggerSizer(WeaponTrigger& trigger);
75+ wxStaticBoxSizer* getTriggerSizer(WeaponSet& trigger, wxString title);
7676
7777 public:
7878 void setup();
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/PhysicsPanel.cpp (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/PhysicsPanel.cpp (revision 473)
@@ -8,36 +8,36 @@
88
99 BEGIN_EVENT_TABLE(PhysicsPanel, wxPanel)
1010 EVT_CHOICE(ID_TYPE, PhysicsPanel::OnType)
11- EVT_CHOICE( 0, PhysicsPanel::OnData00)
12- EVT_CHOICE( 1, PhysicsPanel::OnData01)
13- EVT_CHOICE( 2, PhysicsPanel::OnData02)
14- EVT_CHOICE( 3, PhysicsPanel::OnData03)
15- EVT_CHOICE( 4, PhysicsPanel::OnData04)
11+ EVT_TEXT( 0, PhysicsPanel::OnData00)
12+ EVT_TEXT( 1, PhysicsPanel::OnData01)
13+ EVT_TEXT( 2, PhysicsPanel::OnData02)
14+ EVT_TEXT( 3, PhysicsPanel::OnData03)
15+ EVT_TEXT( 4, PhysicsPanel::OnData04)
1616
17- EVT_CHOICE( 5, PhysicsPanel::OnData05)
18- EVT_CHOICE( 6, PhysicsPanel::OnData06)
19- EVT_CHOICE( 7, PhysicsPanel::OnData07)
20- EVT_CHOICE( 8, PhysicsPanel::OnData08)
21- EVT_CHOICE( 9, PhysicsPanel::OnData09)
17+ EVT_TEXT( 5, PhysicsPanel::OnData05)
18+ EVT_TEXT( 6, PhysicsPanel::OnData06)
19+ EVT_TEXT( 7, PhysicsPanel::OnData07)
20+ EVT_TEXT( 8, PhysicsPanel::OnData08)
21+ EVT_TEXT( 9, PhysicsPanel::OnData09)
2222
23- EVT_CHOICE(10, PhysicsPanel::OnData10)
24- EVT_CHOICE(11, PhysicsPanel::OnData11)
25- EVT_CHOICE(12, PhysicsPanel::OnData12)
26- EVT_CHOICE(13, PhysicsPanel::OnData13)
27- EVT_CHOICE(14, PhysicsPanel::OnData14)
23+ EVT_TEXT(10, PhysicsPanel::OnData10)
24+ EVT_TEXT(11, PhysicsPanel::OnData11)
25+ EVT_TEXT(12, PhysicsPanel::OnData12)
26+ EVT_TEXT(13, PhysicsPanel::OnData13)
27+ EVT_TEXT(14, PhysicsPanel::OnData14)
2828
29- EVT_CHOICE(15, PhysicsPanel::OnData15)
30- EVT_CHOICE(16, PhysicsPanel::OnData16)
31- EVT_CHOICE(17, PhysicsPanel::OnData17)
32- EVT_CHOICE(18, PhysicsPanel::OnData18)
33- EVT_CHOICE(19, PhysicsPanel::OnData19)
29+ EVT_TEXT(15, PhysicsPanel::OnData15)
30+ EVT_TEXT(16, PhysicsPanel::OnData16)
31+ EVT_TEXT(17, PhysicsPanel::OnData17)
32+ EVT_TEXT(18, PhysicsPanel::OnData18)
33+ EVT_TEXT(19, PhysicsPanel::OnData19)
3434
35- EVT_CHOICE(20, PhysicsPanel::OnData20)
36- EVT_CHOICE(21, PhysicsPanel::OnData21)
37- EVT_CHOICE(22, PhysicsPanel::OnData22)
38- EVT_CHOICE(23, PhysicsPanel::OnData23)
39- EVT_CHOICE(24, PhysicsPanel::OnData24)
40- EVT_CHOICE(25, PhysicsPanel::OnData25)
35+ EVT_TEXT(20, PhysicsPanel::OnData20)
36+ EVT_TEXT(21, PhysicsPanel::OnData21)
37+ EVT_TEXT(22, PhysicsPanel::OnData22)
38+ EVT_TEXT(23, PhysicsPanel::OnData23)
39+ EVT_TEXT(24, PhysicsPanel::OnData24)
40+ EVT_TEXT(25, PhysicsPanel::OnData25)
4141 END_EVENT_TABLE()
4242
4343 PhysicsPanel::PhysicsPanel(wxWindow* parent, wxWindowID id):
@@ -57,7 +57,7 @@
5757
5858 //layout
5959 wxFlexGridSizer* leftSizer = new wxFlexGridSizer(21,2,0,0);
60- leftSizer->Add(new wxTextCtrl(this, wxID_ANY,
60+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
6161 _T("Type")));
6262 leftSizer->Add(this->typeChoice);
6363 char labels[][100] = {
@@ -100,15 +100,15 @@
100100
101101 wxFlexGridSizer* rightSizer = new wxFlexGridSizer(6,2,0,0);
102102 for(int i = 20; i < NUMBER_OF_PHYSICS_ITEMS; i ++){
103- leftSizer->Add(new wxStaticText(this, wxID_ANY,
103+ rightSizer->Add(new wxStaticText(this, wxID_ANY,
104104 wxConvertMB2WX(labels[i])));
105- leftSizer->Add(this->datas[i]);
105+ rightSizer->Add(this->datas[i]);
106106 }
107107
108108 wxFlexGridSizer* allSizer = new wxFlexGridSizer(1,2,0,0);
109- this->SetSizer(allSizer);
110109 allSizer->Add(leftSizer);
111110 allSizer->Add(rightSizer);
111+ this->SetSizer(allSizer);
112112
113113 allSizer->Fit(this);
114114 Layout();
@@ -307,6 +307,6 @@
307307 int PhysicsPanel::common()
308308 {
309309 int type = wxGetApp().getEditingPhysicsIndex();
310- wxGetApp().setNewAndChanged(false, true);
310+ wxGetApp().setChanged(true);
311311 return type;
312312 }
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAttackPanel.h (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAttackPanel.h (revision 473)
@@ -58,6 +58,8 @@
5858 void OnRangedDY(wxCommandEvent& ev);
5959 void OnRangedDZ(wxCommandEvent& ev);
6060 void OnRangedCopyFrom(wxCommandEvent& ev);
61+
62+ int common();
6163 public:
6264
6365 void setup();
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/PhysicsPanel.h (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/PhysicsPanel.h (revision 473)
@@ -9,7 +9,7 @@
99 private:
1010 wxChoice* typeChoice;
1111 wxTextCtrl* datas[NUMBER_OF_PHYSICS_ITEMS];
12- int *nums[NUMBER_OF_PHYSICS_ITEMS];
12+ _fixed *nums[NUMBER_OF_PHYSICS_ITEMS];
1313 private:
1414 PhysicsPanel(){}
1515 public:
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponPanel.cpp (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponPanel.cpp (revision 473)
@@ -15,14 +15,18 @@
1515 //create
1616 this->typeListBox = new wxListBox(this, ID_TYPE);
1717
18- appearancePanel = new WeaponAppearancePanel(this, wxID_ANY);
19- triggerPanel = new WeaponTriggerPanel(this, wxID_ANY);
2018 this->notebook = new wxNotebook(this, wxID_ANY);
19+ appearancePanel = new WeaponAppearancePanel(notebook, wxID_ANY);
20+ triggerPanel = new WeaponTriggerPanel(notebook, wxID_ANY);
2121 notebook->AddPage(this->appearancePanel, _T("Appearance"), true);
2222 notebook->AddPage(this->triggerPanel, _T("Trigger"));
2323
2424 //set
2525 this->typeListBox->SetMinSize(wxSize(-1, LIST_BOX_HEIGHT));
26+ for(int i = 0; i < MAXIMUM_NUMBER_OF_WEAPONS; i ++){
27+ this->typeListBox->Insert(wxConvertMB2WX(
28+ wxGetApp().weaponInfo[i].jname.c_str()),i);
29+ }
2630
2731 //layout
2832 wxFlexGridSizer* allSizer = new wxFlexGridSizer(1,2,0,0);
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/EffectPanel.cpp (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/EffectPanel.cpp (revision 473)
@@ -47,6 +47,16 @@
4747 //set
4848 this->typeListBox->SetMinSize(wxSize(-1,LIST_BOX_HEIGHT));
4949
50+ for(int i = 0; i < NUMBER_OF_COLLECTIONS; i ++){
51+ this->collectionChoice->Insert(wxConvertMB2WX(
52+ wxGetApp().collectionInfo[i].jname.c_str()),i);
53+ }
54+ for(int i = 0; i < NUMBER_OF_SOUND_DEFINITIONS; i ++){
55+ this->delaySoundChoice->Insert(wxConvertMB2WX(
56+ wxGetApp().soundInfo[i].jname.c_str()),i);
57+ }
58+ this->delaySoundChoice->Insert(_T("NONE"),NUMBER_OF_SOUND_DEFINITIONS);
59+
5060 for(int i = 0; i < NUMBER_OF_EFFECT_TYPES; i ++){
5161 this->typeListBox->Insert(wxConvertMB2WX(
5262 wxGetApp().effectInfo[i].jname.c_str()), i);
@@ -109,30 +119,46 @@
109119 void EffectPanel::OnCollection(wxCommandEvent& ev)
110120 {
111121 int type = common();
122+ int col = ev.GetSelection();
123+ int clut = getNumberFromTextCtrl(this->paletteText);
124+ effect_definitions[type].collection = BUILD_COLLECTION(col, clut);
112125 }
113126 void EffectPanel::OnPalette(wxCommandEvent& ev)
114127 {
115128 int type = common();
129+ int col = this->collectionChoice->GetSelection();
130+ int clut = getNumberFromTextCtrl(&ev);
131+ effect_definitions[type].collection = BUILD_COLLECTION(col, clut);
116132 }
117133 void EffectPanel::OnSequence(wxCommandEvent& ev)
118134 {
119135 int type = common();
136+ effect_definitions[type].shape = getNumberFromTextCtrl(&ev);
120137 }
121138 void EffectPanel::OnSoundPitch(wxCommandEvent& ev)
122139 {
123140 int type = common();
141+ effect_definitions[type].sound_pitch = getNumberFromTextCtrl(&ev);
124142 }
125143 void EffectPanel::OnDelay(wxCommandEvent& ev)
126144 {
127145 int type = common();
146+ effect_definitions[type].delay = getNumberFromTextCtrl(&ev);
128147 }
129148 void EffectPanel::OnDelaySound(wxCommandEvent& ev)
130149 {
131150 int type = common();
151+ effect_definitions[type].delay_sound =
152+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
132153 }
133154 void EffectPanel::OnFlags(wxCommandEvent& ev)
134155 {
135156 int type = common();
157+ int flag = 0;
158+ for(int i = 0; i < NUMBER_OF_EFFECT_FLAG_INFORMATIONS; i ++){
159+ flag |= this->flags[i]->GetValue() ? wxGetApp().effectFlagsBind[i].bind : 0;
160+ }
161+ effect_definitions[type].flags = flag;
136162 }
137163 void EffectPanel::setup()
138164 {
@@ -155,15 +181,14 @@
155181 setChoice(this->delaySoundChoice, effect_definitions[type].delay_sound,
156182 NUMBER_OF_SOUND_DEFINITIONS);
157183 for(int i = 0; i < NUMBER_OF_EFFECT_FLAG_INFORMATIONS; i ++){
158- this->flags[i]->SetValue(TEST_FLAG16(
159- effect_definitions[type].flags,
160- wxGetApp().effectFlagsBind[i].bind));
184+ this->flags[i]->SetValue(
185+ (effect_definitions[type].flags & wxGetApp().effectFlagsBind[i].bind) != 0);
161186 }
162187 }
163188 int EffectPanel::common()
164189 {
165- int type = wxGetApp().getEditingEffectIndex();
166- int type = common();
190+ int type = wxGetApp().getEditingMonsterIndex();
191+ wxGetApp().setChanged(true);
167192 return type;
168193 }
169194
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/ProjectilePanel.cpp (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/ProjectilePanel.cpp (revision 473)
@@ -87,10 +87,12 @@
8787 this->damageBaseText = new wxTextCtrl(this, ID_DAMAGE_BASE);
8888 this->damageRandomText = new wxTextCtrl(this, ID_DAMAGE_RANDOM);
8989 this->damageScaleText = new wxTextCtrl(this, ID_DAMAGE_SCALE);
90- this->damageIsAlienCheckBox = new wxCheckBox(this, ID_DAMAGE_IS_ALIEN);
90+ this->damageIsAlienCheckBox = new wxCheckBox(this, ID_DAMAGE_IS_ALIEN,
91+ _T("Damage is alien"));
9192
9293 for(int i = 0; i < NUMBER_OF_PROJECTILE_FLAG_INFORMATIONS; i ++){
93- this->flags[i] = new wxCheckBox(this, ID_FLAGS);
94+ this->flags[i] = new wxCheckBox(this, ID_FLAGS,
95+ wxConvertMB2WX(wxGetApp().projectileFlagsBind[i].jname.c_str()));
9496 }
9597
9698 this->speedText = new wxTextCtrl(this, ID_SPEED);
@@ -109,6 +111,43 @@
109111 areaText->SetHelpText(_T(
110112 "The radius the effect this projectile generates"));
111113
114+ for(int i = 0; i < NUMBER_OF_COLLECTIONS; i ++){
115+ this->collectionChoice->Insert(wxConvertMB2WX(
116+ wxGetApp().collectionInfo[i].jname.c_str()),i);
117+ }
118+ for(int i = 0; i < NUMBER_OF_EFFECT_TYPES; i ++){
119+ this->detonationEffectChoice->Insert(wxConvertMB2WX(
120+ wxGetApp().effectInfo[i].jname.c_str()),i);
121+ this->detonationMediaEffectChoice->Insert(wxConvertMB2WX(
122+ wxGetApp().effectInfo[i].jname.c_str()),i);
123+ this->contrailEffectChoice->Insert(wxConvertMB2WX(
124+ wxGetApp().effectInfo[i].jname.c_str()),i);
125+ }
126+ this->detonationEffectChoice->Insert(
127+ _T("NONE"), NUMBER_OF_EFFECT_TYPES);
128+ this->detonationMediaEffectChoice->Insert(
129+ _T("NONE"), NUMBER_OF_EFFECT_TYPES);
130+ this->contrailEffectChoice->Insert(
131+ _T("NONE"), NUMBER_OF_EFFECT_TYPES);
132+
133+ for(int i = 0; i < NUMBER_OF_DAMAGE_TYPES; i ++){
134+ this->damageTypeChoice->Insert(wxConvertMB2WX(
135+ wxGetApp().damageInfo[i].jname.c_str()),i);
136+ }
137+ this->damageTypeChoice->Insert(_T("NONE"),
138+ NUMBER_OF_DAMAGE_TYPES);
139+
140+ for(int i = 0; i < NUMBER_OF_SOUND_DEFINITIONS; i ++){
141+ this->flyBySoundChoice->Insert(wxConvertMB2WX(
142+ wxGetApp().soundInfo[i].jname.c_str()),i);
143+ this->reboundSoundChoice->Insert(wxConvertMB2WX(
144+ wxGetApp().soundInfo[i].jname.c_str()),i);
145+ }
146+ this->flyBySoundChoice->Insert(_T("NONE"),
147+ NUMBER_OF_SOUND_DEFINITIONS);
148+ this->reboundSoundChoice->Insert(_T("NONE"),
149+ NUMBER_OF_SOUND_DEFINITIONS);
150+
112151 //layout
113152 // left
114153 wxFlexGridSizer* leftSizer = new wxFlexGridSizer(2,1,0,0);
@@ -165,6 +204,7 @@
165204 _T("Scale")));
166205 damageFlexGridSizer->Add(this->damageScaleText);
167206 damageFlexGridSizer->Add(this->damageIsAlienCheckBox);
207+ damageStaticBoxSizer->Add(damageFlexGridSizer);
168208 leftSizer->Add(leftUpSizer);
169209 leftSizer->Add(damageStaticBoxSizer);
170210
@@ -189,11 +229,14 @@
189229 // right
190230 wxFlexGridSizer* rightSizer = new wxFlexGridSizer(2,1,0,0);
191231 wxStaticBox* flagsStaticBox = new wxStaticBox(this, wxID_ANY,
192- _T("Flags");
232+ _T("Flags"));
193233 wxStaticBoxSizer* flagsStaticBoxSizer = new wxStaticBoxSizer(
194234 flagsStaticBox, wxVERTICAL);
195235 wxFlexGridSizer* flagsSizer = new wxFlexGridSizer(
196236 NUMBER_OF_PROJECTILE_FLAG_INFORMATIONS,1,0,0);
237+ for(int i = 0; i < NUMBER_OF_PROJECTILE_FLAG_INFORMATIONS; i ++){
238+ flagsSizer->Add(this->flags[i]);
239+ }
197240 flagsStaticBoxSizer->Add(flagsSizer);
198241 rightSizer->Add(flagsStaticBoxSizer);
199242 rightSizer->Add(this->resetButton);
@@ -214,111 +257,206 @@
214257
215258 void ProjectilePanel::OnType(wxCommandEvent& ev)
216259 {
217- common();
260+ int index = ev.GetSelection();
261+ if(index >= 0 && index < NUMBER_OF_PROJECTILE_TYPES){
262+ wxGetApp().setEditingProjectileIndex(index);
263+ common();
264+ setup();
265+ }
218266 }
219267 void ProjectilePanel::OnCollection(wxCommandEvent& ev)
220268 {
221269 int type = common();
270+ int col = ev.GetSelection();
271+ int clut = getNumberFromTextCtrl(this->paletteType);
272+ projectile_definitions[type].collection = BUILD_COLLECTION(col, clut);
222273 }
223274 void ProjectilePanel::OnPalette(wxCommandEvent& ev)
224275 {
225276 int type = common();
277+ int col = this->collectionChoice->GetSelection();
278+ int clut = getNumberFromTextCtrl(&ev);
279+ projectile_definitions[type].collection = BUILD_COLLECTION(col, clut);
226280 }
227281 void ProjectilePanel::OnSequence(wxCommandEvent& ev)
228282 {
229283 int type = common();
284+ projectile_definitions[type].shape = getNumberFromTextCtrl(&ev);
230285 }
231286 void ProjectilePanel::OnDetonationEffect(wxCommandEvent& ev)
232287 {
233288 int type = common();
289+ projectile_definitions[type].detonation_effect =
290+ getChoice(&ev, NUMBER_OF_EFFECT_TYPES);
234291 }
235292 void ProjectilePanel::OnDetonationMediaEffect(wxCommandEvent& ev)
236293 {
237294 int type = common();
295+ projectile_definitions[type].media_detonation_effect =
296+ getChoice(&ev, NUMBER_OF_EFFECT_TYPES);
238297 }
239298 void ProjectilePanel::OnContrailEffect(wxCommandEvent& ev)
240299 {
241300 int type = common();
301+ projectile_definitions[type].contrail_effect =
302+ getChoice(&ev, NUMBER_OF_EFFECT_TYPES);
242303 }
243304 void ProjectilePanel::OnTicksBetweenContrails(wxCommandEvent& ev)
244305 {
245306 int type = common();
307+ projectile_definitions[type].ticks_between_contrails = getNumberFromTextCtrl(&ev);
246308 }
247309 void ProjectilePanel::OnMaxContrail(wxCommandEvent& ev)
248310 {
249311 int type = common();
312+ projectile_definitions[type].maximum_contrails = getNumberFromTextCtrl(&ev);
250313 }
251314 void ProjectilePanel::OnMediaPromotion(wxCommandEvent& ev)
252315 {
253316 int type = common();
317+ projectile_definitions[type].media_projectile_promotion = getNumberFromTextCtrl(&ev);
254318 }
255319 void ProjectilePanel::OnRadius(wxCommandEvent& ev)
256320 {
257321 int type = common();
322+ projectile_definitions[type].radius = getNumberFromTextCtrl(&ev);
258323 }
259324 void ProjectilePanel::OnArea(wxCommandEvent& ev)
260325 {
261326 int type = common();
327+ projectile_definitions[type].area_of_effect = getNumberFromTextCtrl(&ev);
262328 }
263329
264330 void ProjectilePanel::OnDamageType(wxCommandEvent& ev)
265331 {
266332 int type = common();
333+ projectile_definitions[type].damage.type = getChoice(&ev, NUMBER_OF_DAMAGE_TYPES);
267334 }
268335 void ProjectilePanel::OnDamageBase(wxCommandEvent& ev)
269336 {
270337 int type = common();
338+ projectile_definitions[type].damage.base = getNumberFromTextCtrl(&ev);
271339 }
272340 void ProjectilePanel::OnDamageRandom(wxCommandEvent& ev)
273341 {
274342 int type = common();
343+ projectile_definitions[type].damage.random = getNumberFromTextCtrl(&ev);
275344 }
276345 void ProjectilePanel::OnDamageScale(wxCommandEvent& ev)
277346 {
278347 int type = common();
348+ projectile_definitions[type].damage.scale = getNumberFromTextCtrl(&ev);
279349 }
280350 void ProjectilePanel::OnDamageIsAlien(wxCommandEvent& ev)
281351 {
282352 int type = common();
353+ projectile_definitions[type].damage.flags = ev.IsChecked() ? 1: 0;
283354 }
284355
285356 void ProjectilePanel::OnFlags(wxCommandEvent& ev)
286357 {
287358 int type = common();
359+ int flags = 0;
360+ for(int i = 0; i < NUMBER_OF_PROJECTILE_FLAG_INFORMATIONS; i ++){
361+ SET_FLAG32(flags, i, this->flags[i]->GetValue());
362+ }
363+ projectile_definitions[type].flags = flags;
288364 }
289365 void ProjectilePanel::OnSpeed(wxCommandEvent& ev)
290366 {
291367 int type = common();
368+ projectile_definitions[type].speed = getNumberFromTextCtrl(&ev);
292369 }
293370 void ProjectilePanel::OnMaxRange(wxCommandEvent& ev)
294371 {
295372 int type = common();
373+ projectile_definitions[type].maximum_range = getNumberFromTextCtrl(&ev);
296374 }
297375 void ProjectilePanel::OnSoundPitch(wxCommandEvent& ev)
298376 {
299377 int type = common();
378+ projectile_definitions[type].sound_pitch = getNumberFromTextCtrl(&ev);
300379 }
301380 void ProjectilePanel::OnFlyBySound(wxCommandEvent& ev)
302381 {
303382 int type = common();
383+ projectile_definitions[type].flyby_sound = getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
304384 }
305385 void ProjectilePanel::OnReboundSound(wxCommandEvent& ev)
306386 {
307387 int type = common();
388+ projectile_definitions[type].rebound_sound = getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
308389 }
309390
310391 void ProjectilePanel::OnReset(wxCommandEvent& ev)
311392 {
312393 int type = common();
394+ memcpy(&projectile_definitions[type],
395+ wxGetApp().getDefaultValues()->getProjectileDefinition(type),
396+ sizeof(projectile_definition));
397+ setup();
313398 }
314399
315400 void ProjectilePanel::setup()
316401 {
402+ int type = wxGetApp().getEditingProjectileIndex();
403+ int collection = projectile_definitions[type].collection;
404+ int col = GET_COLLECTION(collection);
405+ int clut = GET_COLLECTION_CLUT(collection);
406+ collectionChoice->SetSelection(col);
407+ paletteType->SetValue(wx::string::getString("%d",
408+ clut));
409+ sequenceText->SetValue(wx::string::getString("%d",
410+ projectile_definitions[type].shape));
411+ setChoice(detonationEffectChoice,
412+ projectile_definitions[type].detonation_effect, NUMBER_OF_EFFECT_TYPES);
413+ setChoice(detonationMediaEffectChoice,
414+ projectile_definitions[type].media_detonation_effect, NUMBER_OF_EFFECT_TYPES);
415+ setChoice(contrailEffectChoice,
416+ projectile_definitions[type].contrail_effect, NUMBER_OF_EFFECT_TYPES);
417+ ticksBetweenContrailsText->SetValue(wx::string::getString("%d",
418+ projectile_definitions[type].ticks_between_contrails));
419+ maxContrailsText->SetValue(wx::string::getString("%d",
420+ projectile_definitions[type].maximum_contrails));
421+ mediaPromotionText->SetValue(wx::string::getString("%d",
422+ projectile_definitions[type].media_projectile_promotion));
423+ radiusText->SetValue(wx::string::getString("%d",
424+ projectile_definitions[type].radius));
425+ areaText->SetValue(wx::string::getString("%d",
426+ projectile_definitions[type].area_of_effect));
427+
428+ setChoice(damageTypeChoice,
429+ projectile_definitions[type].damage.type, NUMBER_OF_EFFECT_TYPES);
430+ damageBaseText->SetValue(wx::string::getString("%d",
431+ projectile_definitions[type].damage.base));
432+ damageRandomText->SetValue(wx::string::getString("%d",
433+ projectile_definitions[type].damage.random));
434+ damageScaleText->SetValue(wx::string::getString("%d",
435+ projectile_definitions[type].damage.scale));
436+ damageIsAlienCheckBox->SetValue(
437+ projectile_definitions[type].damage.flags != 0);
438+
439+ for(int i = 0; i < NUMBER_OF_PROJECTILE_FLAG_INFORMATIONS; i ++){
440+ this->flags[i]->SetValue(
441+ (projectile_definitions[type].flags &
442+ wxGetApp().projectileFlagsBind[i].bind) != 0);
443+ }
444+
445+ speedText->SetValue(wx::string::getString("%d",
446+ projectile_definitions[type].speed));
447+ maxRangeText->SetValue(wx::string::getString("%d",
448+ projectile_definitions[type].maximum_range));
449+ soundPitchText->SetValue(wx::string::getString("%d",
450+ projectile_definitions[type].sound_pitch));
451+ setChoice(flyBySoundChoice,
452+ projectile_definitions[type].flyby_sound, NUMBER_OF_SOUND_DEFINITIONS);
453+ setChoice(reboundSoundChoice,
454+ projectile_definitions[type].rebound_sound, NUMBER_OF_SOUND_DEFINITIONS);
317455 }
318456
319457 int ProjectilePanel::common()
320458 {
321459 int type = wxGetApp().getEditingProjectileIndex();
322- wxGetApp().setNewAndChanged(false, true);
460+ wxGetApp().setChanged(true);
323461 return type;
324462 }
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.cpp (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.cpp (revision 473)
@@ -87,9 +87,8 @@
8787 for(int i = 0; i < NUMBER_OF_DAMAGE_TYPES; i ++){
8888 SET_FLAG32(flags, i, this->immunities[i]->GetValue());
8989 }
90- int type = wxGetApp().getEditingMonsterIndex();
90+ int type = common();
9191 monster_definitions[type].immunities = flags;
92- wxGetApp().setNewAndChanged(false, true);
9392 }
9493 void MonsterFlagsPanel::OnWeaknesses(wxCommandEvent& ev)
9594 {
@@ -98,9 +97,8 @@
9897 for(int i = 0; i < NUMBER_OF_DAMAGE_TYPES; i ++){
9998 SET_FLAG32(flags, i, this->weaknesses[i]->GetValue());
10099 }
101- int type = wxGetApp().getEditingMonsterIndex();
100+ int type = common();
102101 monster_definitions[type].weaknesses = flags;
103- wxGetApp().setNewAndChanged(false, true);
104102 }
105103
106104 //////////////////
@@ -122,9 +120,8 @@
122120 for(int i = 0; i < NUMBER_OF_CLASS_INFORMATIONS; i ++){
123121 SET_FLAG32(flags, i, this->enemies[i]->GetValue());
124122 }
125- int type = wxGetApp().getEditingMonsterIndex();
123+ int type = common();
126124 monster_definitions[type].enemies = flags;
127- wxGetApp().setNewAndChanged(false, true);
128125 }
129126
130127 ///////////////////
@@ -135,11 +132,16 @@
135132 for(int i = 0; i < NUMBER_OF_MONSTER_FLAG_INFORMATIONS; i ++){
136133 SET_FLAG32(flags, i, this->flags[i]->GetValue());
137134 }
138- int type = wxGetApp().getEditingMonsterIndex();
135+ int type = common();
139136 monster_definitions[type].flags = flags;
140- wxGetApp().setNewAndChanged(false, true);
141137 }
142138
139+int MonsterFlagsPanel::common(){
140+ int type = wxGetApp().getEditingMonsterIndex();
141+ wxGetApp().setChanged(true);
142+ return type;
143+}
144+
143145 /////////////////
144146 void MonsterFlagsPanel::setup()
145147 {
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.cpp (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.cpp (revision 473)
@@ -398,102 +398,100 @@
398398
399399 void MonsterAppearancePanel::OnCollection(wxCommandEvent& ev)
400400 {
401- int type = wxGetApp().getEditingMonsterIndex();
401+ int type = common();
402402 //
403403 int col = ev.GetSelection();
404404 int clut = getNumberFromTextCtrl(paletteText);
405405 monster_definitions[type].collection = BUILD_COLLECTION(col, clut);
406- wxGetApp().setNewAndChanged(false, true);
407406
408407 }
409408 void MonsterAppearancePanel::OnPalette(wxCommandEvent& ev)
410409 {
411- int type = wxGetApp().getEditingMonsterIndex();
410+ int type = common();
412411 //
413412 int col = collectionChoice->GetSelection();
414413 int clut = getNumberFromTextCtrl(&ev);
415414 monster_definitions[type].collection = BUILD_COLLECTION(col, clut);
416- wxGetApp().setNewAndChanged(false, true);
417415 }
418416 void MonsterAppearancePanel::OnVitality(wxCommandEvent& ev)
419417 {
420- int type = wxGetApp().getEditingMonsterIndex();
418+ int type = common();
421419 monster_definitions[type].vitality = getNumberFromTextCtrl(&ev);
422- wxGetApp().setNewAndChanged(false, true);
420+
423421 }
424422 void MonsterAppearancePanel::OnClass(wxCommandEvent& ev)
425423 {
426- int type = wxGetApp().getEditingMonsterIndex();
424+ int type = common();
427425 monster_definitions[type]._class =
428426 wxGetApp().monsterClassBind[ev.GetSelection()].bind;
429- wxGetApp().setNewAndChanged(false, true);
427+
430428 }
431429 void MonsterAppearancePanel::OnRadius(wxCommandEvent& ev)
432430 {
433- int type = wxGetApp().getEditingMonsterIndex();
431+ int type = common();
434432 monster_definitions[type].radius = getNumberFromTextCtrl(&ev);
435- wxGetApp().setNewAndChanged(false, true);
433+
436434 }
437435 void MonsterAppearancePanel::OnHeight(wxCommandEvent& ev)
438436 {
439- int type = wxGetApp().getEditingMonsterIndex();
437+ int type = common();
440438 monster_definitions[type].height= getNumberFromTextCtrl(&ev);
441- wxGetApp().setNewAndChanged(false, true);
439+
442440 }
443441 void MonsterAppearancePanel::OnHover(wxCommandEvent& ev)
444442 {
445- int type = wxGetApp().getEditingMonsterIndex();
443+ int type = common();
446444 monster_definitions[type].preferred_hover_height = getNumberFromTextCtrl(&ev);
447- wxGetApp().setNewAndChanged(false, true);
445+
448446 }
449447 void MonsterAppearancePanel::OnMinLedge(wxCommandEvent& ev)
450448 {
451- int type = wxGetApp().getEditingMonsterIndex();
449+ int type = common();
452450 monster_definitions[type].minimum_ledge_delta = getNumberFromTextCtrl(&ev);
453- wxGetApp().setNewAndChanged(false, true);
451+
454452 }
455453 void MonsterAppearancePanel::OnMaxLedge(wxCommandEvent& ev)
456454 {
457- int type = wxGetApp().getEditingMonsterIndex();
455+ int type = common();
458456 monster_definitions[type].maximum_ledge_delta = getNumberFromTextCtrl(&ev);
459- wxGetApp().setNewAndChanged(false, true);
457+
460458 }
461459 void MonsterAppearancePanel::OnExtVelScale(wxCommandEvent& ev)
462460 {
463- int type = wxGetApp().getEditingMonsterIndex();
461+ int type = common();
464462 monster_definitions[type].external_velocity_scale = getNumberFromTextCtrl(&ev);
465- wxGetApp().setNewAndChanged(false, true);
463+
466464 }
467465 void MonsterAppearancePanel::OnCarryItem(wxCommandEvent& ev)
468466 {
469- int type = wxGetApp().getEditingMonsterIndex();
467+ int type = common();
470468 monster_definitions[type].carrying_item_type =
471469 getChoice(carryItemChoice, NUMBER_OF_DEFINED_ITEMS);
472- wxGetApp().setNewAndChanged(false, true);
470+
473471 }
474472 void MonsterAppearancePanel::OnHalfVisualArc(wxCommandEvent& ev)
475473 {
476- int type = wxGetApp().getEditingMonsterIndex();
474+ int type = common();
477475 monster_definitions[type].half_visual_arc = getNumberFromTextCtrl(&ev);
478- wxGetApp().setNewAndChanged(false, true);
476+
479477 }
480478 void MonsterAppearancePanel::OnVertVisualArc(wxCommandEvent& ev)
481479 {
482- int type = wxGetApp().getEditingMonsterIndex();
480+ int type = common();
483481 monster_definitions[type].half_vertical_visual_arc = getNumberFromTextCtrl(&ev);
484- wxGetApp().setNewAndChanged(false, true);
482+
485483 }
486484 void MonsterAppearancePanel::OnIntelligence(wxCommandEvent& ev)
487485 {
488- int type = wxGetApp().getEditingMonsterIndex();
486+ int type = common();
489487 monster_definitions[type].intelligence = wxGetApp().monsterIntelligenceBind[
490488 getChoice(&ev, NUMBER_OF_MONSTER_INTELLIGENCE_INFORMATIONS)].bind;
491- wxGetApp().setNewAndChanged(false, true);
489+
492490 }
493491
494492 void MonsterAppearancePanel::OnSpeedText(wxCommandEvent& ev)
495493 {
496- int type = wxGetApp().getEditingMonsterIndex();
494+ int type = common();
497495 monster_definitions[type].speed = getNumberFromTextCtrl(&ev);
498496
499497 int oldIndex = this->speedChoice->GetSelection();
@@ -507,11 +505,11 @@
507505 if(index != oldIndex){
508506 this->speedChoice->SetSelection(index);
509507 }
510- wxGetApp().setNewAndChanged(false, true);
508+
511509 }
512510 void MonsterAppearancePanel::OnSpeedChoice(wxCommandEvent& ev)
513511 {
514- int type = wxGetApp().getEditingMonsterIndex();
512+ int type = common();
515513 int sel = ev.GetSelection();
516514 if(sel >= NUMBER_OF_SPEED_INFORMATIONS){
517515 }else{
@@ -521,106 +519,100 @@
521519 this->speedText->SetValue(wx::string::getString("%d", prefferedNum));
522520 }
523521 }
524- wxGetApp().setNewAndChanged(false, true);
522+
525523 }
526524
527525 void MonsterAppearancePanel::OnGravity(wxCommandEvent& ev)
528526 {
529- int type = wxGetApp().getEditingMonsterIndex();
527+ int type = common();
530528 monster_definitions[type].gravity = getNumberFromTextCtrl(&ev);
531- wxGetApp().setNewAndChanged(false, true);
529+
532530 }
533531
534532 void MonsterAppearancePanel::OnStationaly(wxCommandEvent& ev)
535533 {
536- int type = wxGetApp().getEditingMonsterIndex();
534+ int type = common();
537535 monster_definitions[type].stationary_shape = getNumberFromTextCtrl(&ev);
538- wxGetApp().setNewAndChanged(false, true);
536+
539537 }
540538 void MonsterAppearancePanel::OnMoving(wxCommandEvent& ev)
541539 {
542- int type = wxGetApp().getEditingMonsterIndex();
540+ int type = common();
543541 monster_definitions[type].moving_shape = getNumberFromTextCtrl(&ev);
544- wxGetApp().setNewAndChanged(false, true);
542+
545543 }
546544 void MonsterAppearancePanel::OnHitting(wxCommandEvent& ev)
547545 {
548- int type = wxGetApp().getEditingMonsterIndex();
546+ int type = common();
549547 monster_definitions[type].hit_shapes = getNumberFromTextCtrl(&ev);
550- wxGetApp().setNewAndChanged(false, true);
548+
551549 }
552550 void MonsterAppearancePanel::OnSoftDying(wxCommandEvent& ev)
553551 {
554- int type = wxGetApp().getEditingMonsterIndex();
552+ int type = common();
555553 monster_definitions[type].soft_dying_shape = getNumberFromTextCtrl(&ev);
556- wxGetApp().setNewAndChanged(false, true);
554+
557555 }
558556 void MonsterAppearancePanel::OnSoftDead(wxCommandEvent& ev)
559557 {
560- int type = wxGetApp().getEditingMonsterIndex();
558+ int type = common();
561559 monster_definitions[type].soft_dead_shapes = getNumberFromTextCtrl(&ev);
562- wxGetApp().setNewAndChanged(false, true);
560+
563561 }
564562 void MonsterAppearancePanel::OnHardDying(wxCommandEvent& ev)
565563 {
566- int type = wxGetApp().getEditingMonsterIndex();
564+ int type = common();
567565 monster_definitions[type].hard_dying_shape = getNumberFromTextCtrl(&ev);
568- wxGetApp().setNewAndChanged(false, true);
566+
569567 }
570568 void MonsterAppearancePanel::OnHardDead(wxCommandEvent& ev)
571569 {
572- int type = wxGetApp().getEditingMonsterIndex();
570+ int type = common();
573571 monster_definitions[type].hard_dead_shapes = getNumberFromTextCtrl(&ev);
574- wxGetApp().setNewAndChanged(false, true);
572+
575573 }
576574 void MonsterAppearancePanel::OnTeleportIn(wxCommandEvent& ev)
577575 {
578- int type = wxGetApp().getEditingMonsterIndex();
576+ int type = common();
579577 monster_definitions[type].teleport_in_shape = getNumberFromTextCtrl(&ev);
580- wxGetApp().setNewAndChanged(false, true);
578+
581579 }
582580 void MonsterAppearancePanel::OnTeleportOut(wxCommandEvent& ev)
583581 {
584- int type = wxGetApp().getEditingMonsterIndex();
582+ int type = common();
585583 monster_definitions[type].teleport_out_shape = getNumberFromTextCtrl(&ev);
586- wxGetApp().setNewAndChanged(false, true);
584+
587585 }
588586
589587 void MonsterAppearancePanel::OnShrapnelRadius(wxCommandEvent& ev)
590588 {
591- int type = wxGetApp().getEditingMonsterIndex();
589+ int type = common();
592590 monster_definitions[type].shrapnel_radius = getNumberFromTextCtrl(&ev);
593- wxGetApp().setNewAndChanged(false, true);
594591 }
595592 void MonsterAppearancePanel::OnShrapnelBase(wxCommandEvent& ev)
596593 {
597- int type = wxGetApp().getEditingMonsterIndex();
594+ int type = common();
598595 monster_definitions[type].shrapnel_damage.base = getNumberFromTextCtrl(&ev);
599- wxGetApp().setNewAndChanged(false, true);
600596 }
601597 void MonsterAppearancePanel::OnShrapnelRnd(wxCommandEvent& ev)
602598 {
603- int type = wxGetApp().getEditingMonsterIndex();
599+ int type = common();
604600 monster_definitions[type].shrapnel_damage.random = getNumberFromTextCtrl(&ev);
605- wxGetApp().setNewAndChanged(false, true);
606601 }
607602 void MonsterAppearancePanel::OnShrapnelScale(wxCommandEvent& ev)
608603 {
609- int type = wxGetApp().getEditingMonsterIndex();
604+ int type = common();
610605 monster_definitions[type].shrapnel_damage.scale = getNumberFromTextCtrl(&ev);
611- wxGetApp().setNewAndChanged(false, true);
612606 }
613607 void MonsterAppearancePanel::OnShrapnelType(wxCommandEvent& ev)
614608 {
615- int type = wxGetApp().getEditingMonsterIndex();
609+ int type = common();
616610 monster_definitions[type].shrapnel_damage.type = getChoice(&ev, NUMBER_OF_DAMAGE_TYPES);
617- wxGetApp().setNewAndChanged(false, true);
618611 }
619612 void MonsterAppearancePanel::OnShrapnelIsAlien(wxCommandEvent& ev)
620613 {
621- int type = wxGetApp().getEditingMonsterIndex();
614+ int type = common();
622615 monster_definitions[type].shrapnel_damage.flags = ev.IsChecked() ? 1: 0;
623- wxGetApp().setNewAndChanged(false, true);
624616 }
625617
626618 void MonsterAppearancePanel::OnCopyFrom(wxCommandEvent& ev)
@@ -693,78 +685,78 @@
693685
694686 void MonsterAppearancePanel::OnSoundPitch(wxCommandEvent& ev)
695687 {
696- int type = wxGetApp().getEditingMonsterIndex();
688+ int type = common();
697689 monster_definitions[type].sound_pitch = getNumberFromTextCtrl(&ev);
698690 }
699691 void MonsterAppearancePanel::OnSoundActivation(wxCommandEvent& ev)
700692 {
701- int type = wxGetApp().getEditingMonsterIndex();
693+ int type = common();
702694 monster_definitions[type].activation_sound = getChoice(&ev,
703695 NUMBER_OF_SOUND_DEFINITIONS);
704696 }
705697 void MonsterAppearancePanel::OnSoundFriendAct(wxCommandEvent& ev)
706698 {
707- int type = wxGetApp().getEditingMonsterIndex();
699+ int type = common();
708700 monster_definitions[type].friendly_activation_sound = getChoice(&ev,
709701 NUMBER_OF_SOUND_DEFINITIONS);
710702 }
711703 void MonsterAppearancePanel::OnSoundClear(wxCommandEvent& ev)
712704 {
713- int type = wxGetApp().getEditingMonsterIndex();
705+ int type = common();
714706 monster_definitions[type].clear_sound = getChoice(&ev,
715707 NUMBER_OF_SOUND_DEFINITIONS);
716708 }
717709 void MonsterAppearancePanel::OnSoundKill(wxCommandEvent& ev)
718710 {
719- int type = wxGetApp().getEditingMonsterIndex();
711+ int type = common();
720712 monster_definitions[type].kill_sound = getChoice(&ev,
721713 NUMBER_OF_SOUND_DEFINITIONS);
722714 }
723715 void MonsterAppearancePanel::OnSoundApology(wxCommandEvent& ev)
724716 {
725- int type = wxGetApp().getEditingMonsterIndex();
717+ int type = common();
726718 monster_definitions[type].apology_sound = getChoice(&ev,
727719 NUMBER_OF_SOUND_DEFINITIONS);
728720 }
729721 void MonsterAppearancePanel::OnSoundFriendFire(wxCommandEvent& ev)
730722 {
731- int type = wxGetApp().getEditingMonsterIndex();
723+ int type = common();
732724 monster_definitions[type].friendly_fire_sound = getChoice(&ev,
733725 NUMBER_OF_SOUND_DEFINITIONS);
734726 }
735727 void MonsterAppearancePanel::OnSoundFlaming(wxCommandEvent& ev)
736728 {
737- int type = wxGetApp().getEditingMonsterIndex();
729+ int type = common();
738730 monster_definitions[type].flaming_sound = getChoice(&ev,
739731 NUMBER_OF_SOUND_DEFINITIONS);
740732 }
741733 void MonsterAppearancePanel::OnSoundRandom(wxCommandEvent& ev)
742734 {
743- int type = wxGetApp().getEditingMonsterIndex();
735+ int type = common();
744736 monster_definitions[type].random_sound = getChoice(&ev,
745737 NUMBER_OF_SOUND_DEFINITIONS);
746738 }
747739 void MonsterAppearancePanel::OnSoundRandomMask(wxCommandEvent& ev)
748740 {
749- int type = wxGetApp().getEditingMonsterIndex();
741+ int type = common();
750742 monster_definitions[type].random_sound_mask = getNumberFromTextCtrl(&ev);
751743 }
752744
753745 void MonsterAppearancePanel::OnEffect(wxCommandEvent& ev)
754746 {
755- int type = wxGetApp().getEditingMonsterIndex();
747+ int type = common();
756748 monster_definitions[type].impact_effect = getChoice(&ev,
757749 NUMBER_OF_EFFECT_TYPES);
758750 }
759751 void MonsterAppearancePanel::OnEffectMelee(wxCommandEvent& ev)
760752 {
761- int type = wxGetApp().getEditingMonsterIndex();
753+ int type = common();
762754 monster_definitions[type].melee_impact_effect = getChoice(&ev,
763755 NUMBER_OF_EFFECT_TYPES);
764756 }
765757 void MonsterAppearancePanel::OnEffectContrail(wxCommandEvent& ev)
766758 {
767- int type = wxGetApp().getEditingMonsterIndex();
759+ int type = common();
768760 monster_definitions[type].contrail_effect = getChoice(&ev,
769761 NUMBER_OF_EFFECT_TYPES);
770762 }
@@ -771,7 +763,7 @@
771763
772764 void MonsterAppearancePanel::OnDoorRetryMask(wxCommandEvent& ev)
773765 {
774- int type = wxGetApp().getEditingMonsterIndex();
766+ int type = common();
775767 monster_definitions[type].door_retry_mask = getNumberFromTextCtrl(&ev);
776768 }
777769
@@ -788,6 +780,13 @@
788780 }
789781 }
790782
783+int MonsterAppearancePanel::common()
784+{
785+ int type = wxGetApp().getEditingMonsterIndex();
786+ wxGetApp().setChanged(true);
787+ return type;
788+}
789+
791790 void MonsterAppearancePanel::setup()
792791 {
793792 int type = wxGetApp().getEditingMonsterIndex();
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponAppearancePanel.cpp (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponAppearancePanel.cpp (revision 473)
@@ -2,9 +2,55 @@
22 #include "../PhysicsEditorOneWX.h"
33
44 enum{
5+ ID_COLLECTION,
6+ ID_PALETTE,
7+ ID_IDLE_SEQ,
8+ ID_FIRING_SEQ,
9+ ID_RELOAD_SEQ,
10+ ID_CHARGING_SEQ,
11+ ID_CHARGED_SEQ,
12+ ID_ITEM,
13+ ID_CLASS,
14+ ID_LIGHT_INTENSITY,
15+ ID_INTENSITY_DECAY,
16+ ID_IDLE_WIDTH,
17+ ID_IDLE_HEIGHT,
18+ ID_FIRING_HEIGHT,
19+ ID_RELOADING_HEIGHT,
20+ ID_HORIZONTAL_AMPLITUDE,
21+ ID_USER_AMPLITUDE,
22+ ID_READY_TICKS,
23+ ID_AWAIT_RELOAD_TICKS,
24+ ID_LOADING_TICKS,
25+ ID_LOADED_TICKS,
26+
27+ ID_FLAGS,
528 };
629
730 BEGIN_EVENT_TABLE(WeaponAppearancePanel, wxPanel)
31+EVT_CHOICE(ID_COLLECTION, WeaponAppearancePanel::OnCollection)
32+EVT_TEXT(ID_PALETTE, WeaponAppearancePanel::OnPalette)
33+EVT_TEXT(ID_IDLE_SEQ, WeaponAppearancePanel::OnIdleSeq)
34+EVT_TEXT(ID_FIRING_SEQ, WeaponAppearancePanel::OnFiringSeq)
35+EVT_TEXT(ID_RELOAD_SEQ, WeaponAppearancePanel::OnReloadSeq)
36+EVT_TEXT(ID_CHARGING_SEQ, WeaponAppearancePanel::OnChargingSeq)
37+EVT_TEXT(ID_CHARGED_SEQ, WeaponAppearancePanel::OnChargedSeq)
38+EVT_CHOICE(ID_ITEM, WeaponAppearancePanel::OnItem)
39+EVT_CHOICE(ID_CLASS, WeaponAppearancePanel::OnClass)
40+EVT_TEXT(ID_LIGHT_INTENSITY, WeaponAppearancePanel::OnLightIntensity)
41+EVT_TEXT(ID_INTENSITY_DECAY, WeaponAppearancePanel::OnIntensityDecay)
42+EVT_TEXT(ID_IDLE_WIDTH, WeaponAppearancePanel::OnIdleWidth)
43+EVT_TEXT(ID_IDLE_HEIGHT, WeaponAppearancePanel::OnIdleHeight)
44+EVT_TEXT(ID_FIRING_HEIGHT, WeaponAppearancePanel::OnFiringHeight)
45+EVT_TEXT(ID_RELOADING_HEIGHT, WeaponAppearancePanel::OnReloadingHeight)
46+EVT_TEXT(ID_HORIZONTAL_AMPLITUDE, WeaponAppearancePanel::OnHorizontalAmplitude)
47+EVT_TEXT(ID_USER_AMPLITUDE, WeaponAppearancePanel::OnUserAmplitude)
48+EVT_TEXT(ID_READY_TICKS, WeaponAppearancePanel::OnReadyTicks)
49+EVT_TEXT(ID_AWAIT_RELOAD_TICKS, WeaponAppearancePanel::OnAwaitReloadTicks)
50+EVT_TEXT(ID_LOADING_TICKS, WeaponAppearancePanel::OnLoadingTicks)
51+EVT_TEXT(ID_LOADED_TICKS, WeaponAppearancePanel::OnLoadedTicks)
52+
53+EVT_CHECKBOX(ID_FLAGS, WeaponAppearancePanel::OnFlags)
854 END_EVENT_TABLE()
955
1056 WeaponAppearancePanel::WeaponAppearancePanel(wxWindow* parent, wxWindowID id):
@@ -11,11 +57,131 @@
1157 wxPanel(parent, id)
1258 {
1359 //create
60+ this->collectionChoice = new wxChoice(this, ID_COLLECTION);
61+ this->paletteText = new wxTextCtrl(this, ID_PALETTE);
62+ this->idleSeqText = new wxTextCtrl(this, ID_IDLE_SEQ);
63+ this->firingSeqText = new wxTextCtrl(this, ID_FIRING_SEQ);
64+ this->reloadSeqText = new wxTextCtrl(this, ID_RELOAD_SEQ);
65+ this->chargingSeqText = new wxTextCtrl(this, ID_CHARGING_SEQ);
66+ this->chargedSeqText = new wxTextCtrl(this, ID_CHARGED_SEQ);
67+ this->itemChoice = new wxChoice(this, ID_ITEM);
68+ this->classChoice = new wxChoice(this, ID_CLASS);
69+ this->lightIntensityText = new wxTextCtrl(this, ID_LIGHT_INTENSITY);
70+ this->intensityDecayText = new wxTextCtrl(this, ID_INTENSITY_DECAY);
71+ this->idleWidthText = new wxTextCtrl(this, ID_IDLE_WIDTH);
72+ this->idleHeightText = new wxTextCtrl(this, ID_IDLE_HEIGHT);
73+ this->firingHeightText = new wxTextCtrl(this, ID_FIRING_HEIGHT);
74+ this->reloadHeightText = new wxTextCtrl(this, ID_RELOADING_HEIGHT);
75+ this->horizontalAmplitudeText = new wxTextCtrl(this, ID_HORIZONTAL_AMPLITUDE);
76+ this->userAmplitudeText = new wxTextCtrl(this, ID_USER_AMPLITUDE);
77+ this->readyTicksText = new wxTextCtrl(this, ID_READY_TICKS);
78+ this->awaitReloadTicksText = new wxTextCtrl(this, ID_AWAIT_RELOAD_TICKS);
79+ this->loadingTicksText = new wxTextCtrl(this, ID_LOADING_TICKS);
80+ this->loadedTicksText = new wxTextCtrl(this, ID_LOADED_TICKS);
1481
82+ for(int i = 0; i < NUMBER_OF_WEAPON_FLAG_INFORMATIONS; i ++){
83+ this->flags[i] = new wxCheckBox(this, ID_FLAGS,
84+ wxConvertMB2WX(wxGetApp().weaponFlagsBind[i].jname.c_str()));
85+ }
86+
1587 //set
88+ for(int i = 0; i < NUMBER_OF_COLLECTIONS; i ++){
89+ this->collectionChoice->Insert(wxConvertMB2WX(
90+ wxGetApp().collectionInfo[i].jname.c_str()),i);
91+ }
92+ for(int i = 0; i < NUMBER_OF_DEFINED_ITEMS; i ++){
93+ this->itemChoice->Insert(wxConvertMB2WX(
94+ wxGetApp().itemInfo[i].jname.c_str()),i);
95+ }
96+ this->itemChoice->Insert(_T("NONE"),
97+ NUMBER_OF_DEFINED_ITEMS);
98+ // class
99+ for(int i = 0; i < NUMBER_OF_WEAPON_CLASS_INFORMATIONS; i ++){
100+ this->classChoice->Insert(wxConvertMB2WX(
101+ wxGetApp().weaponClassInfo[i].jname.c_str()),i);
102+ }
103+ this->classChoice->Insert(_T("NONE"),
104+ NUMBER_OF_WEAPON_CLASS_INFORMATIONS);
105+
106+ //layout
107+ wxFlexGridSizer* leftSizer = new wxFlexGridSizer(21,2,0,0);
108+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
109+ _T("Collection")));
110+ leftSizer->Add(collectionChoice);
111+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
112+ _T("Palette")));
113+ leftSizer->Add(paletteText);
114+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
115+ _T("Idle Sequence")));
116+ leftSizer->Add(idleSeqText);
117+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
118+ _T("Firing Sequence")));
119+ leftSizer->Add(firingSeqText);
120+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
121+ _T("Reload Sequence")));
122+ leftSizer->Add(reloadSeqText);
123+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
124+ _T("Charging Sequence")));
125+ leftSizer->Add(chargingSeqText);
126+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
127+ _T("Charged Sequence")));
128+ leftSizer->Add(chargedSeqText);
129+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
130+ _T("Item")));
131+ leftSizer->Add(itemChoice);
132+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
133+ _T("Class")));
134+ leftSizer->Add(classChoice);
135+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
136+ _T("Light Intensity")));
137+ leftSizer->Add(lightIntensityText);
16138
17- //layout
139+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
140+ _T("Light Intensity Decay")));
141+ leftSizer->Add(intensityDecayText);
142+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
143+ _T("Idle Width")));
144+ leftSizer->Add(idleWidthText);
145+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
146+ _T("Idle Height")));
147+ leftSizer->Add(idleHeightText);
148+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
149+ _T("Firing Height")));
150+ leftSizer->Add(firingHeightText);
151+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
152+ _T("Reloading Height")));
153+ leftSizer->Add(reloadHeightText);
154+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
155+ _T("Horizontal Amplitude")));
156+ leftSizer->Add(horizontalAmplitudeText);
157+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
158+ _T("Usre Amplitude")));
159+ leftSizer->Add(userAmplitudeText);
160+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
161+ _T("Ready Ticks")));
162+ leftSizer->Add(readyTicksText);
163+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
164+ _T("Await Reload Ticks")));
165+ leftSizer->Add(awaitReloadTicksText);
166+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
167+ _T("Loading Ticks")));
168+ leftSizer->Add(loadingTicksText);
169+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
170+ _T("Loaded Ticks")));
171+ leftSizer->Add(loadedTicksText);
172+ wxStaticBox* flagStaticBox = new wxStaticBox(this, wxID_ANY,
173+ _T("Flags"));
174+ wxStaticBoxSizer* flagSizer = new wxStaticBoxSizer(flagStaticBox,
175+ wxVERTICAL);
176+ wxFlexGridSizer* flagFlexSizer = new wxFlexGridSizer(
177+ NUMBER_OF_WEAPON_FLAG_INFORMATIONS, 1, 0,0);
178+ for(int i = 0; i < NUMBER_OF_WEAPON_FLAG_INFORMATIONS; i ++){
179+ flagFlexSizer->Add(this->flags[i]);
180+ }
181+ flagSizer->Add(flagFlexSizer);
18182 wxFlexGridSizer* allSizer = new wxFlexGridSizer(1,2,0,0);
183+ allSizer->Add(leftSizer);
184+ allSizer->Add(flagSizer);
19185 this->SetSizer(allSizer);
20186 allSizer->Fit(this);
21187 Layout();
@@ -24,3 +190,188 @@
24190 WeaponAppearancePanel::~WeaponAppearancePanel()
25191 {
26192 }
193+
194+void WeaponAppearancePanel::OnCollection(wxCommandEvent& ev)
195+{
196+ int type = common();
197+ int col = ev.GetSelection();
198+ int clut = getNumberFromTextCtrl(this->paletteText);
199+ weapon_definitions[type].collection =
200+ BUILD_COLLECTION(col, clut);
201+}
202+void WeaponAppearancePanel::OnPalette(wxCommandEvent& ev)
203+{
204+ int type = common();
205+ int col = this->collectionChoice->GetSelection();
206+ int clut = getNumberFromTextCtrl(&ev);
207+ weapon_definitions[type].collection =
208+ BUILD_COLLECTION(col, clut);
209+}
210+void WeaponAppearancePanel::OnIdleSeq(wxCommandEvent& ev)
211+{
212+ int type = common();
213+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
214+}
215+void WeaponAppearancePanel::OnFiringSeq(wxCommandEvent& ev)
216+{
217+ int type = common();
218+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
219+}
220+void WeaponAppearancePanel::OnReloadSeq(wxCommandEvent& ev)
221+{
222+ int type = common();
223+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
224+}
225+void WeaponAppearancePanel::OnChargingSeq(wxCommandEvent& ev)
226+{
227+ int type = common();
228+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
229+}
230+void WeaponAppearancePanel::OnChargedSeq(wxCommandEvent& ev)
231+{
232+ int type = common();
233+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
234+}
235+void WeaponAppearancePanel::OnItem(wxCommandEvent& ev)
236+{
237+ int type = common();
238+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
239+}
240+void WeaponAppearancePanel::OnClass(wxCommandEvent& ev)
241+{
242+ int type = common();
243+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
244+}
245+void WeaponAppearancePanel::OnLightIntensity(wxCommandEvent& ev)
246+{
247+ int type = common();
248+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
249+}
250+void WeaponAppearancePanel::OnIntensityDecay(wxCommandEvent& ev)
251+{
252+ int type = common();
253+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
254+}
255+void WeaponAppearancePanel::OnIdleWidth(wxCommandEvent& ev)
256+{
257+ int type = common();
258+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
259+}
260+void WeaponAppearancePanel::OnIdleHeight(wxCommandEvent& ev)
261+{
262+ int type = common();
263+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
264+}
265+void WeaponAppearancePanel::OnFiringHeight(wxCommandEvent& ev)
266+{
267+ int type = common();
268+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
269+}
270+void WeaponAppearancePanel::OnReloadingHeight(wxCommandEvent& ev)
271+{
272+ int type = common();
273+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
274+}
275+void WeaponAppearancePanel::OnHorizontalAmplitude(wxCommandEvent& ev)
276+{
277+ int type = common();
278+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
279+}
280+void WeaponAppearancePanel::OnUserAmplitude(wxCommandEvent& ev)
281+{
282+ int type = common();
283+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
284+}
285+void WeaponAppearancePanel::OnReadyTicks(wxCommandEvent& ev)
286+{
287+ int type = common();
288+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
289+}
290+void WeaponAppearancePanel::OnAwaitReloadTicks(wxCommandEvent& ev)
291+{
292+ int type = common();
293+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
294+}
295+void WeaponAppearancePanel::OnLoadingTicks(wxCommandEvent& ev)
296+{
297+ int type = common();
298+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
299+}
300+void WeaponAppearancePanel::OnLoadedTicks(wxCommandEvent& ev)
301+{
302+ int type = common();
303+ weapon_definitions[type].idle_shape = getNumberFromTextCtrl(&ev);
304+}
305+
306+void WeaponAppearancePanel::OnFlags(wxCommandEvent& ev)
307+{
308+ int type = common();
309+ int flag = 0;
310+ for(int i = 0; i < NUMBER_OF_WEAPON_FLAG_INFORMATIONS; i ++){
311+ if(this->flags[i]->IsChecked()){
312+ flag |= wxGetApp().weaponFlagsBind[i].bind;
313+ }
314+ }
315+ weapon_definitions[type].flags = flag;
316+}
317+int WeaponAppearancePanel::common()
318+{
319+ int type = wxGetApp().getEditingWeaponIndex();
320+ wxGetApp().setChanged(true);
321+ return type;
322+}
323+void WeaponAppearancePanel::setup()
324+{
325+ int type = wxGetApp().getEditingWeaponIndex();
326+
327+ int collection = weapon_definitions[type].collection;
328+ int col = GET_COLLECTION(collection);
329+ int clut = GET_COLLECTION_CLUT(collection);
330+ collectionChoice->SetSelection(col);
331+ paletteText->SetValue(wx::string::getString("%d",
332+ clut));
333+ idleSeqText->SetValue(wx::string::getString("%d",
334+ weapon_definitions[type].idle_shape));
335+ firingSeqText->SetValue(wx::string::getString("%d",
336+ weapon_definitions[type].firing_shape));
337+ reloadSeqText->SetValue(wx::string::getString("%d",
338+ weapon_definitions[type].reloading_shape));
339+ chargingSeqText->SetValue(wx::string::getString("%d",
340+ weapon_definitions[type].charging_shape));
341+ chargedSeqText->SetValue(wx::string::getString("%d",
342+ weapon_definitions[type].charged_shape));
343+ setChoice(itemChoice, weapon_definitions[type].item_type,
344+ NUMBER_OF_DEFINED_ITEMS);
345+ setChoice(classChoice, weapon_definitions[type].weapon_class,
346+ NUMBER_OF_WEAPON_CLASS_INFORMATIONS);
347+ lightIntensityText->SetValue(wx::string::getString("%d",
348+ weapon_definitions[type].firing_light_intensity));
349+ intensityDecayText->SetValue(wx::string::getString("%d",
350+ weapon_definitions[type].firing_intensity_decay_ticks));
351+ idleWidthText->SetValue(wx::string::getString("%d",
352+ weapon_definitions[type].idle_width));
353+ idleHeightText->SetValue(wx::string::getString("%d",
354+ weapon_definitions[type].idle_height));
355+ firingHeightText->SetValue(wx::string::getString("%d",
356+ weapon_definitions[type].kick_height));
357+ reloadHeightText->SetValue(wx::string::getString("%d",
358+ weapon_definitions[type].reload_height));
359+ horizontalAmplitudeText->SetValue(wx::string::getString("%d",
360+ weapon_definitions[type].horizontal_amplitude));
361+ userAmplitudeText->SetValue(wx::string::getString("%d",
362+ weapon_definitions[type].bob_amplitude));
363+ readyTicksText->SetValue(wx::string::getString("%d",
364+ weapon_definitions[type].ready_ticks));
365+ awaitReloadTicksText->SetValue(wx::string::getString("%d",
366+ weapon_definitions[type].await_reload_ticks));
367+ loadingTicksText->SetValue(wx::string::getString("%d",
368+ weapon_definitions[type].loading_ticks));
369+ loadedTicksText->SetValue(wx::string::getString("%d",
370+ weapon_definitions[type].finish_loading_ticks));
371+
372+ for(int i = 0; i < NUMBER_OF_WEAPON_FLAG_INFORMATIONS; i ++){
373+ this->flags[i]->SetValue(
374+ (weapon_definitions[type].flags &
375+ wxGetApp().weaponFlagsBind[i].bind) != 0);
376+ }
377+}
\ No newline at end of file
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.h (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.h (revision 473)
@@ -30,6 +30,7 @@
3030 void OnFriends(wxCommandEvent& ev);
3131 void OnEnemies(wxCommandEvent& ev);
3232 void OnFlags(wxCommandEvent& ev);
33+ int common();
3334 public:
3435
3536 void setup();
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.h (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.h (revision 473)
@@ -136,6 +136,7 @@
136136 void OnDoorRetryMask(wxCommandEvent& ev);
137137
138138 void OnResetButton(wxCommandEvent& ev);
139+ int common();
139140 public:
140141 void setup();
141142 };
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.cpp (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.cpp (revision 473)
@@ -127,9 +127,9 @@
127127 //set
128128 for(int i = 0; i < NUMBER_OF_DEFINED_ITEMS; i ++){
129129 this->primary.ammoItemChoice->Insert(wxConvertMB2WX(
130- wxGetApp().weaponInfo[i].jname.c_str()), i);
130+ wxGetApp().itemInfo[i].jname.c_str()), i);
131131 this->secondary.ammoItemChoice->Insert(wxConvertMB2WX(
132- wxGetApp().weaponInfo[i].jname.c_str()), i);
132+ wxGetApp().itemInfo[i].jname.c_str()), i);
133133 }
134134 this->primary.ammoItemChoice->Insert(_T("NONE"), NUMBER_OF_DEFINED_ITEMS);
135135 this->secondary.ammoItemChoice->Insert(_T("NONE"), NUMBER_OF_DEFINED_ITEMS);
@@ -185,12 +185,24 @@
185185 this->primary.projectileChoice->Insert(_T("NONE"), NUMBER_OF_PROJECTILE_TYPES);
186186 this->secondary.projectileChoice->Insert(_T("NONE"), NUMBER_OF_PROJECTILE_TYPES);
187187
188+ // shell casing
189+ for(int i = 0; i < NUMBER_OF_SHELL_CASING_TYPES; i ++){
190+ this->primary.shellCasingChoice->Insert(wxConvertMB2WX(
191+ wxGetApp().weaponShellCasingInfo[i].jname.c_str()), i);
192+ }
193+ this->primary.shellCasingChoice->Insert(_T("NONE"),
194+ NUMBER_OF_SHELL_CASING_TYPES);
195+
188196 //layout
189197 wxFlexGridSizer* allSizer = new wxFlexGridSizer(1,2,0,0);
190198 this->SetSizer(allSizer);
191199 // primary
192- wxStaticBoxSizer* primarySizer = getTriggerSizer(this->primary);
193-
200+ wxStaticBoxSizer* primarySizer = getTriggerSizer(this->primary,
201+ _T("Primary"));
202+ wxStaticBoxSizer* secondarySizer = getTriggerSizer(this->secondary,
203+ _T("Secondary"));
204+ allSizer->Add(primarySizer);
205+ allSizer->Add(secondarySizer);
194206 allSizer->Fit(this);
195207 Layout();
196208 }
@@ -232,87 +244,196 @@
232244 void WeaponTriggerPanel::OnPrimaryRecoil(wxCommandEvent& ev)
233245 {
234246 int type = common();
235- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
247+ weapon_definitions[type].weapons_by_trigger[0].rounds_per_magazine =
236248 getNumberFromTextCtrl(&ev);
237249 }
238250 void WeaponTriggerPanel::OnPrimaryFiringSound(wxCommandEvent& ev)
239251 {
240252 int type = common();
241- weapon_definitions[type].weapons_by_trigger[0]. =
242- getNumberFromTextCtrl(&ev);
253+ weapon_definitions[type].weapons_by_trigger[0].firing_sound =
254+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
243255 }
244256 void WeaponTriggerPanel::OnPrimaryClickSound(wxCommandEvent& ev)
245257 {
246258 int type = common();
247- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
248- getNumberFromTextCtrl(&ev);
259+ weapon_definitions[type].weapons_by_trigger[0].click_sound =
260+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
249261 }
250262 void WeaponTriggerPanel::OnPrimaryChargingSound(wxCommandEvent& ev)
251263 {
252264 int type = common();
253- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
254- getNumberFromTextCtrl(&ev);
265+ weapon_definitions[type].weapons_by_trigger[0].charging_sound =
266+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
255267 }
256268 void WeaponTriggerPanel::OnPrimaryShellCasingSound(wxCommandEvent& ev)
257269 {
258270 int type = common();
259- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
260- getNumberFromTextCtrl(&ev);
271+ weapon_definitions[type].weapons_by_trigger[0].shell_casing_sound =
272+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
261273 }
262274 void WeaponTriggerPanel::OnPrimaryReloadSound(wxCommandEvent& ev)
263275 {
264276 int type = common();
265- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
266- getNumberFromTextCtrl(&ev);
277+ weapon_definitions[type].weapons_by_trigger[0].reloading_sound =
278+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
267279 }
268280 void WeaponTriggerPanel::OnPrimaryChargedSound(wxCommandEvent& ev)
269281 {
270282 int type = common();
271- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
272- getNumberFromTextCtrl(&ev);
283+ weapon_definitions[type].weapons_by_trigger[0].charged_sound =
284+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
273285 }
274286 void WeaponTriggerPanel::OnPrimaryProjectile(wxCommandEvent& ev)
275287 {
276288 int type = common();
277- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
278- getNumberFromTextCtrl(&ev);
289+ weapon_definitions[type].weapons_by_trigger[0].projectile_type =
290+ getChoice(&ev, NUMBER_OF_PROJECTILE_TYPES);
279291 }
280292 void WeaponTriggerPanel::OnPrimaryError(wxCommandEvent& ev)
281293 {
282294 int type = common();
283- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
295+ weapon_definitions[type].weapons_by_trigger[0].theta_error =
284296 getNumberFromTextCtrl(&ev);
285297 }
286298 void WeaponTriggerPanel::OnPrimaryDX(wxCommandEvent& ev)
287299 {
288300 int type = common();
289- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
301+ weapon_definitions[type].weapons_by_trigger[0].dx =
290302 getNumberFromTextCtrl(&ev);
291303 }
292304 void WeaponTriggerPanel::OnPrimaryDZ(wxCommandEvent& ev)
293305 {
294306 int type = common();
295- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
307+ weapon_definitions[type].weapons_by_trigger[0].dz =
296308 getNumberFromTextCtrl(&ev);
297309 }
298310 void WeaponTriggerPanel::OnPrimaryShellCasing(wxCommandEvent& ev)
299311 {
300312 int type = common();
301- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
302- getNumberFromTextCtrl(&ev);
313+ weapon_definitions[type].weapons_by_trigger[0].shell_casing_type =
314+ getChoice(&ev, NUMBER_OF_SHELL_CASING_TYPES);
303315 }
304316 void WeaponTriggerPanel::OnPrimaryBurstCount(wxCommandEvent& ev)
305317 {
306318 int type = common();
307- weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
319+ weapon_definitions[type].weapons_by_trigger[0].burst_count =
308320 getNumberFromTextCtrl(&ev);
309321 }
310322
323+/////////////////////////
324+void WeaponTriggerPanel::OnSecondaryRoundPerMagazine(wxCommandEvent& ev)
325+{
326+ int type = common();
327+ weapon_definitions[type].weapons_by_trigger[1].rounds_per_magazine =
328+ getNumberFromTextCtrl(&ev);
329+}
330+void WeaponTriggerPanel::OnSecondaryAmmoItem(wxCommandEvent& ev)
331+{
332+ int type = common();
333+ weapon_definitions[type].weapons_by_trigger[1].ammunition_type =
334+ getNumberFromTextCtrl(&ev);
335+}
336+void WeaponTriggerPanel::OnSecondaryTicksPerRound(wxCommandEvent& ev)
337+{
338+ int type = common();
339+ weapon_definitions[type].weapons_by_trigger[1].ticks_per_round =
340+ getNumberFromTextCtrl(&ev);
341+}
342+void WeaponTriggerPanel::OnSecondaryRecoveryTicks(wxCommandEvent& ev)
343+{
344+ int type = common();
345+ weapon_definitions[type].weapons_by_trigger[1].recovery_ticks =
346+ getNumberFromTextCtrl(&ev);
347+}
348+void WeaponTriggerPanel::OnSecondaryChargingTicks(wxCommandEvent& ev)
349+{
350+ int type = common();
351+ weapon_definitions[type].weapons_by_trigger[1].charging_ticks =
352+ getNumberFromTextCtrl(&ev);
353+}
354+void WeaponTriggerPanel::OnSecondaryRecoil(wxCommandEvent& ev)
355+{
356+ int type = common();
357+ weapon_definitions[type].weapons_by_trigger[1].rounds_per_magazine =
358+ getNumberFromTextCtrl(&ev);
359+}
360+void WeaponTriggerPanel::OnSecondaryFiringSound(wxCommandEvent& ev)
361+{
362+ int type = common();
363+ weapon_definitions[type].weapons_by_trigger[1].firing_sound =
364+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
365+}
366+void WeaponTriggerPanel::OnSecondaryClickSound(wxCommandEvent& ev)
367+{
368+ int type = common();
369+ weapon_definitions[type].weapons_by_trigger[1].click_sound =
370+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
371+}
372+void WeaponTriggerPanel::OnSecondaryChargingSound(wxCommandEvent& ev)
373+{
374+ int type = common();
375+ weapon_definitions[type].weapons_by_trigger[1].charging_sound =
376+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
377+}
378+void WeaponTriggerPanel::OnSecondaryShellCasingSound(wxCommandEvent& ev)
379+{
380+ int type = common();
381+ weapon_definitions[type].weapons_by_trigger[1].shell_casing_sound =
382+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
383+}
384+void WeaponTriggerPanel::OnSecondaryReloadSound(wxCommandEvent& ev)
385+{
386+ int type = common();
387+ weapon_definitions[type].weapons_by_trigger[1].reloading_sound =
388+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
389+}
390+void WeaponTriggerPanel::OnSecondaryChargedSound(wxCommandEvent& ev)
391+{
392+ int type = common();
393+ weapon_definitions[type].weapons_by_trigger[1].charged_sound =
394+ getChoice(&ev, NUMBER_OF_SOUND_DEFINITIONS);
395+}
396+void WeaponTriggerPanel::OnSecondaryProjectile(wxCommandEvent& ev)
397+{
398+ int type = common();
399+ weapon_definitions[type].weapons_by_trigger[1].projectile_type =
400+ getChoice(&ev, NUMBER_OF_PROJECTILE_TYPES);
401+}
402+void WeaponTriggerPanel::OnSecondaryError(wxCommandEvent& ev)
403+{
404+ int type = common();
405+ weapon_definitions[type].weapons_by_trigger[1].theta_error =
406+ getNumberFromTextCtrl(&ev);
407+}
408+void WeaponTriggerPanel::OnSecondaryDX(wxCommandEvent& ev)
409+{
410+ int type = common();
411+ weapon_definitions[type].weapons_by_trigger[1].dx =
412+ getNumberFromTextCtrl(&ev);
413+}
414+void WeaponTriggerPanel::OnSecondaryDZ(wxCommandEvent& ev)
415+{
416+ int type = common();
417+ weapon_definitions[type].weapons_by_trigger[1].dz =
418+ getNumberFromTextCtrl(&ev);
419+}
420+void WeaponTriggerPanel::OnSecondaryShellCasing(wxCommandEvent& ev)
421+{
422+ int type = common();
423+ weapon_definitions[type].weapons_by_trigger[1].shell_casing_type =
424+ getChoice(&ev, NUMBER_OF_SHELL_CASING_TYPES);
425+}
426+void WeaponTriggerPanel::OnSecondaryBurstCount(wxCommandEvent& ev)
427+{
428+ int type = common();
429+ weapon_definitions[type].weapons_by_trigger[1].burst_count =
430+ getNumberFromTextCtrl(&ev);
431+}
311432
312433 int WeaponTriggerPanel::common()
313434 {
314435 int type = wxGetApp().getEditingWeaponIndex();
315- wxGetApp().setNewAndChanged(false, true);
436+ wxGetApp().setChanged(true);
316437 return type;
317438 }
318439 void WeaponTriggerPanel::setup()
@@ -319,7 +440,7 @@
319440 {
320441 }
321442
322-wxStaticBoxSizer* WeaponTriggerPanel::getTriggerSizer(WeaponTrigger& trigger,
443+wxStaticBoxSizer* WeaponTriggerPanel::getTriggerSizer(WeaponSet& trigger,
323444 wxString title)
324445 {
325446 wxStaticBox* box = new wxStaticBox(this, wxID_ANY, title);
@@ -336,47 +457,49 @@
336457 flexSizer->Add(trigger.ticksPerRoundText);
337458 flexSizer->Add(new wxStaticText(this, wxID_ANY,
338459 _T("Recovery Ticks")));
339- flexSizer->Add(trigger.);
460+ flexSizer->Add(trigger.recoveryTicksText);
340461 flexSizer->Add(new wxStaticText(this, wxID_ANY,
341462 _T("Charging Ticks")));
342- flexSizer->Add(trigger.);
463+ flexSizer->Add(trigger.chargingTicksText);
343464 flexSizer->Add(new wxStaticText(this, wxID_ANY,
344465 _T("Recoil")));
345- flexSizer->Add(trigger.);
466+ flexSizer->Add(trigger.recoilText);
346467 flexSizer->Add(new wxStaticText(this, wxID_ANY,
347468 _T("Firing Sound")));
348- flexSizer->Add(trigger.);
469+ flexSizer->Add(trigger.firingSoundChoice);
349470 flexSizer->Add(new wxStaticText(this, wxID_ANY,
350471 _T("Click Sound")));
351- flexSizer->Add(trigger.);
472+ flexSizer->Add(trigger.clickSoundChoice);
352473 flexSizer->Add(new wxStaticText(this, wxID_ANY,
353474 _T("Charging Sound")));
354- flexSizer->Add(trigger.);
475+ flexSizer->Add(trigger.chargingSoundChoice);
355476 flexSizer->Add(new wxStaticText(this, wxID_ANY,
356477 _T("Shell Casing Sound")));
357- flexSizer->Add(trigger.);
478+ flexSizer->Add(trigger.shellSoundChoice);
358479 flexSizer->Add(new wxStaticText(this, wxID_ANY,
359- _T("")));
360- flexSizer->Add(trigger.);
480+ _T("Reload Sound")));
481+ flexSizer->Add(trigger.reloadSoundChoice);
361482 flexSizer->Add(new wxStaticText(this, wxID_ANY,
362- _T("")));
363- flexSizer->Add(trigger.);
483+ _T("Charged Sound")));
484+ flexSizer->Add(trigger.chargedSoundChoice);
364485 flexSizer->Add(new wxStaticText(this, wxID_ANY,
365- _T("")));
366- flexSizer->Add(trigger.);
486+ _T("Projectile")));
487+ flexSizer->Add(trigger.projectileChoice);
367488 flexSizer->Add(new wxStaticText(this, wxID_ANY,
368- _T("")));
369- flexSizer->Add(trigger.);
489+ _T("Error")));
490+ flexSizer->Add(trigger.errorText);
370491 flexSizer->Add(new wxStaticText(this, wxID_ANY,
371- _T("")));
372- flexSizer->Add(trigger.);
492+ _T("dx")));
493+ flexSizer->Add(trigger.dxText);
373494 flexSizer->Add(new wxStaticText(this, wxID_ANY,
374- _T("")));
375- flexSizer->Add(trigger.);
495+ _T("dz")));
496+ flexSizer->Add(trigger.dzText);
376497 flexSizer->Add(new wxStaticText(this, wxID_ANY,
377- _T("")));
378- flexSizer->Add(trigger.);
498+ _T("Shell Casing")));
499+ flexSizer->Add(trigger.shellCasingChoice);
379500 flexSizer->Add(new wxStaticText(this, wxID_ANY,
380- _T("")));
381- flexSizer->Add(trigger.);
501+ _T("Burst Count")));
502+ flexSizer->Add(trigger.burstCountText);
503+ sizer->Add(flexSizer);
504+ return sizer;
382505 }
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/PhysicsEditorOneWX.h (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/PhysicsEditorOneWX.h (revision 473)
@@ -96,6 +96,7 @@
9696 更新があったかどうか
9797 */
9898 void setNewAndChanged(bool new_, bool changed);
99+ void setChanged(bool changed);
99100 bool isChanged();
100101 /**
101102 新規データか
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/PhysicsEditorOneWX.cpp (revision 472)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/PhysicsEditorOneWX.cpp (revision 473)
@@ -177,6 +177,8 @@
177177 };
178178 hpl::aleph::setInformationBind(NUMBER_OF_PROJECTILE_FLAG_INFORMATIONS,
179179 projectileFlagsBind, projectileFlagsBinds);
180+ hpl::aleph::loadInformation("data/WSProjectileFlags.txt", NUMBER_OF_PROJECTILE_FLAG_INFORMATIONS,
181+ projectileFlagsBind);
180182
181183 /////////////////////////
182184 //effects
@@ -193,12 +195,13 @@
193195 };
194196 hpl::aleph::setInformationBind(NUMBER_OF_EFFECT_FLAG_INFORMATIONS,
195197 effectFlagsBind, effectFlagsBinds);
196-
198+ hpl::aleph::loadInformation("data/EffectFlags.txt", NUMBER_OF_EFFECT_FLAG_INFORMATIONS,
199+ effectFlagsBind);
197200 ////////////////////
198201 //physics
199202 // types
200203 hpl::aleph::loadInformation("data/PhysicsTypes.txt", NUMBER_OF_EFFECT_TYPES,
201- effectInfo);
204+ physicsInfo);
202205
203206 /////////////////////
204207 //weapons
@@ -225,6 +228,8 @@
225228 };
226229 hpl::aleph::setInformationBind(NUMBER_OF_WEAPON_FLAG_INFORMATIONS,
227230 weaponFlagsBind, weaponFlagsBinds);
231+ hpl::aleph::loadInformation("data/WSWeaponFlags.txt", NUMBER_OF_WEAPON_FLAG_INFORMATIONS,
232+ weaponFlagsBind);
228233 // shell casing
229234 hpl::aleph::loadInformation("data/ShellCasingTypes.txt", NUMBER_OF_SHELL_CASING_TYPES,
230235 weaponShellCasingInfo);
@@ -241,13 +246,16 @@
241246 */
242247 void PhysicsEditorOneWX::setNewAndChanged(bool new_, bool changed)
243248 {
249+
250+ //状態更新
251+ setChanged(changed);
252+ this->isNew_ = new_;
253+}
254+void PhysicsEditorOneWX::setChanged(bool changed)
255+{
244256 //前の状態
245257 bool prevChanged = this->isChanged();
246-
247- //状態更新
248258 this->isChanged_ = changed;
249- this->isNew_ = new_;
250-
251259 if(changed){
252260 //変更していない状態から変更状態へ移った
253261 if(this->isNew()){
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/data/EffectFlags.txt (nonexistent)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/data/EffectFlags.txt (revision 473)
@@ -0,0 +1,5 @@
1+End when animation
2+End when transfer animation
3+Sound only
4+Make twin visible
5+Media effect
旧リポジトリブラウザで表示