• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン463 (tree)
日時2007-08-31 22:19:39
作者hogepiyo

ログメッセージ

*** empty log message ***

変更サマリ

差分

--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.cpp (revision 462)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.cpp (revision 463)
@@ -59,6 +59,7 @@
5959 wxGetApp().setEditingMonsterIndex(type);
6060
6161 //appearanceの更新
62+ this->appearancePanel->setup();
6263
6364 //flagsの更新
6465 this->flagsPanel->setup();
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.cpp (revision 462)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.cpp (revision 463)
@@ -57,6 +57,80 @@
5757 ID_RESET,
5858 };
5959
60+BEGIN_EVENT_TABLE(MonsterAppearancePanel, wxPanel)
61+ EVT_CHOICE(ID_COLLECTION, MonsterAppearancePanel::OnCollection)
62+ EVT_CHOICE(ID_PALETTE, MonsterAppearancePanel::OnPalette)
63+ EVT_TEXT(ID_VITALITY, MonsterAppearancePanel::OnVitality)
64+ EVT_CHOICE(ID_CLASS, MonsterAppearancePanel::OnClass)
65+ EVT_TEXT(ID_RADIUS, MonsterAppearancePanel::OnRadius)
66+ EVT_TEXT(ID_HEIGHT, MonsterAppearancePanel::OnHeight)
67+ EVT_TEXT(ID_HOVER, MonsterAppearancePanel::OnHover)
68+ EVT_TEXT(ID_MIN_LEDGE, MonsterAppearancePanel::OnMinLedge)
69+ EVT_TEXT(ID_MAX_LEDGE, MonsterAppearancePanel::OnMaxLedge)
70+ EVT_TEXT(ID_EXT_VEL_SCALE, MonsterAppearancePanel::OnExtVelScale)
71+ EVT_CHOICE(ID_CARRY_ITEM, MonsterAppearancePanel::OnCarryItem)
72+ EVT_TEXT(ID_HALF_VISUAL_ARC, MonsterAppearancePanel::OnHalfVisualArc)
73+ EVT_TEXT(ID_VERT_VISUAL_ARC, MonsterAppearancePanel::OnVertVisualArc)
74+ EVT_CHOICE(ID_INTELLIGENCE, MonsterAppearancePanel::OnIntelligence)
75+ EVT_TEXT(ID_SPEED_TEXT, MonsterAppearancePanel::OnSpeedText)
76+ EVT_CHOICE(ID_SPEED_CHOICE, MonsterAppearancePanel::OnSpeedChoice)
77+ EVT_TEXT(ID_GRAVITY, MonsterAppearancePanel::OnGravity)
78+
79+ EVT_TEXT(ID_STATIONALY, MonsterAppearancePanel::OnStationaly)
80+ EVT_TEXT(ID_MOVING, MonsterAppearancePanel::OnMoving)
81+ EVT_TEXT(ID_HITTING, MonsterAppearancePanel::OnHitting)
82+ EVT_TEXT(ID_SOFT_DYING, MonsterAppearancePanel::OnSoftDying)
83+ EVT_TEXT(ID_SOFT_DEAD, MonsterAppearancePanel::OnSoftDead)
84+ EVT_TEXT(ID_HARD_DYING, MonsterAppearancePanel::OnHardDying)
85+ EVT_TEXT(ID_HARD_DEAD, MonsterAppearancePanel::OnHardDead)
86+ EVT_TEXT(ID_TELEPORT_IN, MonsterAppearancePanel::OnTeleportIn)
87+ EVT_TEXT(ID_TELEPORT_OUT, MonsterAppearancePanel::OnTeleportOut)
88+
89+ EVT_TEXT(ID_SHRAPNEL_RADIUS, MonsterAppearancePanel::OnShrapnelRadius)
90+ EVT_TEXT(ID_SHRAPNEL_BASE, MonsterAppearancePanel::OnShrapnelBase)
91+ EVT_TEXT(ID_SHRAPNEL_RND, MonsterAppearancePanel::OnShrapnelRnd)
92+ EVT_TEXT(ID_SHRAPNEL_SCALE, MonsterAppearancePanel::OnShrapnelScale)
93+ EVT_CHOICE(ID_SHRAPNEL_TYPE, MonsterAppearancePanel::OnShrapnelType)
94+ EVT_CHECKBOX(ID_SHRAPNEL_IS_ALIEN, MonsterAppearancePanel::OnShrapnelIsAlien)
95+
96+ EVT_BUTTON(ID_COPY_FROM, MonsterAppearancePanel::OnCopyFrom)
97+
98+ EVT_TEXT(ID_PITCH, MonsterAppearancePanel::OnSoundPitch)
99+ EVT_CHOICE(ID_ACTIVATION, MonsterAppearancePanel::OnSoundActivation)
100+ EVT_CHOICE(ID_FRIEND_ACT, MonsterAppearancePanel::OnSoundFriendAct)
101+ EVT_CHOICE(ID_CLEAR, MonsterAppearancePanel::OnSoundClear)
102+ EVT_CHOICE(ID_KILL, MonsterAppearancePanel::OnSoundKill)
103+ EVT_CHOICE(ID_APOLYGY, MonsterAppearancePanel::OnSoundApology)
104+ EVT_CHOICE(ID_FRIEND_FIRE, MonsterAppearancePanel::OnSoundFriendFire)
105+ EVT_CHOICE(ID_FLAMING, MonsterAppearancePanel::OnSoundFlaming)
106+ EVT_CHOICE(ID_RANDOM, MonsterAppearancePanel::OnSoundRandom)
107+ EVT_TEXT(ID_RANDOM_MASK, MonsterAppearancePanel::OnSoundRandomMask)
108+
109+ EVT_CHOICE(ID_RANDOM, MonsterAppearancePanel::OnSoundRandom)
110+ EVT_CHOICE(ID_RANDOM, MonsterAppearancePanel::OnSoundRandom)
111+ EVT_CHOICE(ID_RANDOM, MonsterAppearancePanel::OnSoundRandom)
112+
113+ EVT_BUTTON(ID_RESET, MonsterAppearancePanel::OnResetButton)
114+END_EVENT_TABLE()
115+
116+static void setChoice(wxChoice* choice, int index, int max)
117+{
118+ index = index == NONE ? max : index;
119+ choice->SetSelection(index);
120+}
121+static int getChoice(wxChoice* choice, int max)
122+{
123+ int index = choice->GetSelection();
124+ index = index == max ? NONE : index;
125+ return index;
126+}
127+static int getChoice(wxCommandEvent* choice, int max)
128+{
129+ int index = choice->GetSelection();
130+ index = index == max ? NONE : index;
131+ return index;
132+}
133+
60134 MonsterAppearancePanel::MonsterAppearancePanel(wxWindow* parent, wxWindowID id)
61135 :wxPanel(parent, id)
62136 {
@@ -139,8 +213,9 @@
139213 }
140214 // item
141215 for(int i = 0; i < NUMBER_OF_DEFINED_ITEMS; i ++){
142- classChoice->Insert(wxConvertMB2WX(wxGetApp().itemInfo[i].jname.c_str()), i);
216+ carryItemChoice->Insert(wxConvertMB2WX(wxGetApp().itemInfo[i].jname.c_str()), i);
143217 }
218+ carryItemChoice->Insert(_T("NONE"), NUMBER_OF_DEFINED_ITEMS);
144219 // intelligence
145220 for(int i = 0; i < NUMBER_OF_MONSTER_INTELLIGENCE_INFORMATIONS; i ++){
146221 intelligenceChoice->Insert(wxConvertMB2WX(wxGetApp().monsterIntelligenceBind[i].jname.c_str()), i);
@@ -147,11 +222,43 @@
147222 }
148223 // speed
149224 for(int i = 0; i < NUMBER_OF_SPEED_INFORMATIONS; i ++){
150- intelligenceChoice->Insert(wxConvertMB2WX(wxGetApp().speedBind[i].jname.c_str()), i);
225+ speedChoice->Insert(wxConvertMB2WX(wxGetApp().speedBind[i].jname.c_str()), i);
151226 }
227+ speedChoice->Insert(_T("Other"), NUMBER_OF_SPEED_INFORMATIONS);
152228 // shrapnel type
229+ for(int i = 0; i < NUMBER_OF_DAMAGE_TYPES; i ++){
230+ shrapnelTypeChoice->Insert(wxConvertMB2WX(wxGetApp().damageInfo[i].jname.c_str()), i);
231+ }
232+ shrapnelTypeChoice->Insert(_T("NONE"), NUMBER_OF_DAMAGE_TYPES);
153233 // sounds
234+ for(int i = 0; i < NUMBER_OF_SOUND_DEFINITIONS; i ++){
235+ soundActivationChoice->Insert(wxConvertMB2WX(wxGetApp().soundInfo[i].jname.c_str()), i);
236+ soundFriendActChoice->Insert(wxConvertMB2WX(wxGetApp().soundInfo[i].jname.c_str()), i);
237+ soundClearChoice->Insert(wxConvertMB2WX(wxGetApp().soundInfo[i].jname.c_str()), i);
238+ soundKillChoice->Insert(wxConvertMB2WX(wxGetApp().soundInfo[i].jname.c_str()), i);
239+ soundApologyChoice->Insert(wxConvertMB2WX(wxGetApp().soundInfo[i].jname.c_str()), i);
240+ soundFriendFireChoice->Insert(wxConvertMB2WX(wxGetApp().soundInfo[i].jname.c_str()), i);
241+ soundFlamingChoice->Insert(wxConvertMB2WX(wxGetApp().soundInfo[i].jname.c_str()), i);
242+ soundRandomChoice->Insert(wxConvertMB2WX(wxGetApp().soundInfo[i].jname.c_str()), i);
243+ }
244+ soundActivationChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
245+ soundFriendActChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
246+ soundClearChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
247+ soundKillChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
248+ soundApologyChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
249+ soundFriendFireChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
250+ soundFlamingChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
251+ soundRandomChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
252+
154253 // effects
254+ for(int i = 0; i < NUMBER_OF_EFFECT_TYPES; i ++){
255+ effectChoice->Insert(wxConvertMB2WX(wxGetApp().effectInfo[i].jname.c_str()), i);
256+ effectMeleeChoice->Insert(wxConvertMB2WX(wxGetApp().effectInfo[i].jname.c_str()), i);
257+ effectContrailChoice->Insert(wxConvertMB2WX(wxGetApp().effectInfo[i].jname.c_str()), i);
258+ }
259+ effectChoice->Insert(_T("NONE"), NUMBER_OF_EFFECT_TYPES);
260+ effectMeleeChoice->Insert(_T("NONE"), NUMBER_OF_EFFECT_TYPES);
261+ effectContrailChoice->Insert(_T("NONE"), NUMBER_OF_EFFECT_TYPES);
155262
156263 //layout
157264 wxBoxSizer* baseSizer = new wxBoxSizer(wxHORIZONTAL);
@@ -442,7 +549,69 @@
442549 void MonsterAppearancePanel::OnResetButton(wxCommandEvent& ev)
443550 {
444551 }
552+void MonsterAppearancePanel::OnDoorRetryMask(wxCommandEvent& ev)
553+{
554+}
445555
556+
446557 void MonsterAppearancePanel::setup()
447558 {
559+ int type = wxGetApp().getEditingMonsterIndex();
560+
561+ int collection = GET_COLLECTION(monster_definitions[type].collection);
562+ int clut = GET_COLLECTION_CLUT(monster_definitions[type].collection);
563+
564+ collectionChoice->SetSelection(collection);
565+ paletteText->SetValue(wx::string::getString("%d", clut));
566+ vitalityText->SetValue(wx::string::getString("%d", monster_definitions[type].vitality));
567+ classChoice->SetSelection(monster_definitions[type]._class);
568+ radiusText->SetValue(wx::string::getString("%d", monster_definitions[type].radius));
569+ heightText->SetValue(wx::string::getString("%d", monster_definitions[type].height));
570+ hoverText->SetValue(wx::string::getString("%d", monster_definitions[type].preferred_hover_height));
571+ minLedgeText->SetValue(wx::string::getString("%d", monster_definitions[type].minimum_ledge_delta));
572+ maxLedgeText->SetValue(wx::string::getString("%d", monster_definitions[type].maximum_ledge_delta));
573+ extVelScaleText->SetValue(wx::string::getString("%d", monster_definitions[type].external_velocity_scale));
574+ setChoice(carryItemChoice, monster_definitions[type].carrying_item_type, NUMBER_OF_DEFINED_ITEMS);
575+ halfVisualArcText->SetValue(wx::string::getString("%d",
576+ monster_definitions[type].half_visual_arc));
577+ vertVisualArcText->SetValue(wx::string::getString("%d",
578+ monster_definitions[type].half_vertical_visual_arc));
579+ intelligenceChoice->SetSelection(hpl::aleph::getIndexFromInformationBinded(monster_definitions[type].intelligence,
580+ wxGetApp().monsterIntelligenceBind, NUMBER_OF_MONSTER_INTELLIGENCE_INFORMATIONS));
581+ speedText->SetValue(wx::string::getString("%d", monster_definitions[type].speed));
582+ int index = hpl::aleph::getIndexFromInformationBinded(monster_definitions[type].speed,
583+ wxGetApp().speedBind, NUMBER_OF_SPEED_INFORMATIONS);
584+ if(index < 0){
585+ index = NUMBER_OF_SPEED_INFORMATIONS;
586+ }
587+ speedChoice->SetSelection(index);
588+ gravityText->SetValue(wx::string::getString("%d", monster_definitions[type].gravity));
589+
590+ //sequences
591+ stationalyText->SetValue(wx::string::getString("%d", monster_definitions[type].stationary_shape));
592+ movingText->SetValue(wx::string::getString("%d", monster_definitions[type].moving_shape));
593+ hittingText->SetValue(wx::string::getString("%d", monster_definitions[type].hit_shapes));
594+ softDyingText->SetValue(wx::string::getString("%d", monster_definitions[type].soft_dying_shape));
595+ softDeadText->SetValue(wx::string::getString("%d", monster_definitions[type].soft_dead_shapes));
596+ hardDyingText->SetValue(wx::string::getString("%d", monster_definitions[type].hard_dying_shape));
597+ hardDeadText->SetValue(wx::string::getString("%d", monster_definitions[type].hard_dead_shapes));
598+ teleportInText->SetValue(wx::string::getString("%d", monster_definitions[type].teleport_in_shape));
599+ teleportOutText->SetValue(wx::string::getString("%d", monster_definitions[type].teleport_out_shape));
600+
601+ //sound
602+ soundPitchText->SetValue(wx::string::getString("%d", monster_definitions[type].teleport_out_shape));
603+ setChoice(soundActivationChoice, monster_definitions[type].activation_sound, NUMBER_OF_SOUND_DEFINITIONS);
604+ setChoice(soundFriendActChoice, monster_definitions[type].friendly_activation_sound, NUMBER_OF_SOUND_DEFINITIONS);
605+ setChoice(soundClearChoice, monster_definitions[type].clear_sound, NUMBER_OF_SOUND_DEFINITIONS);
606+ setChoice(soundKillChoice, monster_definitions[type].kill_sound, NUMBER_OF_SOUND_DEFINITIONS);
607+ setChoice(soundApologyChoice, monster_definitions[type].apology_sound, NUMBER_OF_SOUND_DEFINITIONS);
608+ setChoice(soundFriendFireChoice, monster_definitions[type].friendly_fire_sound, NUMBER_OF_SOUND_DEFINITIONS);
609+ setChoice(soundFlamingChoice, monster_definitions[type].flaming_sound, NUMBER_OF_SOUND_DEFINITIONS);
610+ setChoice(soundRandomChoice, monster_definitions[type].random_sound, NUMBER_OF_SOUND_DEFINITIONS);
611+ soundRandomMask->SetValue(wx::string::getString("%d", monster_definitions[type].random_sound_mask));
612+
613+ //effect
614+ setChoice(effectChoice, monster_definitions[type].impact_effect, NUMBER_OF_EFFECT_TYPES);
615+ setChoice(effectMeleeChoice, monster_definitions[type].melee_impact_effect, NUMBER_OF_EFFECT_TYPES);
616+ setChoice(effectContrailChoice, monster_definitions[type].contrail_effect, NUMBER_OF_EFFECT_TYPES);
448617 }
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.h (revision 462)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.h (revision 463)
@@ -66,6 +66,9 @@
6666 wxChoice* effectMeleeChoice;
6767 wxChoice* effectContrailChoice;
6868
69+ //TODO door retry mask
70+ wxTextCtrl* doorRetryMask;
71+
6972 //button
7073 wxButton* resetButton;
7174
@@ -126,6 +129,8 @@
126129 void OnEffectMelee(wxCommandEvent& ev);
127130 void OnEffectContrail(wxCommandEvent& ev);
128131
132+ void OnDoorRetryMask(wxCommandEvent& ev);
133+
129134 void OnResetButton(wxCommandEvent& ev);
130135 public:
131136 void setup();
旧リポジトリブラウザで表示