diff --git a/DS_Map/DS Map.csproj b/DS_Map/DS Map.csproj
index f90953e..19f25ae 100644
--- a/DS_Map/DS Map.csproj
+++ b/DS_Map/DS Map.csproj
@@ -178,9 +178,9 @@
-
+
-
+
@@ -311,11 +311,11 @@
-
+
Designer
-
+
diff --git a/DS_Map/HeaderSearch.Designer.cs b/DS_Map/HeaderSearch.Designer.cs
index 7135a7e..06a1c64 100644
--- a/DS_Map/HeaderSearch.Designer.cs
+++ b/DS_Map/HeaderSearch.Designer.cs
@@ -78,6 +78,7 @@
this.value1TextBox.Name = "value1TextBox";
this.value1TextBox.Size = new System.Drawing.Size(190, 22);
this.value1TextBox.TabIndex = 9;
+ this.value1TextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.value1TextBox_KeyDown);
//
// startSearchButton
//
diff --git a/DS_Map/HeaderSearch.cs b/DS_Map/HeaderSearch.cs
index bcabfc5..c930fe4 100644
--- a/DS_Map/HeaderSearch.cs
+++ b/DS_Map/HeaderSearch.cs
@@ -89,22 +89,23 @@ namespace DSPRE {
switch (fieldToSearch) {
case "Internal Name":
for (short i = startID; i < finalID; i++) {
- if (oper.Equals("Is Exactly"))
+ if (oper.Equals("Is Exactly")) {
if (intNames[i].Equals(valToSearch)) {
result.Add(i.ToString("D3") + Header.nameSeparator + intNames[i]);
}
- if (oper.Equals("Is Not"))
+ } else if (oper.Equals("Is Not")) {
if (!intNames[i].Equals(valToSearch)) {
result.Add(i.ToString("D3") + Header.nameSeparator + intNames[i]);
}
- if (oper.Equals("Contains"))
- if (intNames[i].Contains(valToSearch)) {
+ } else if (oper.Equals("Contains")) {
+ if (intNames[i].IndexOf(valToSearch, StringComparison.InvariantCultureIgnoreCase) >= 0) {
result.Add(i.ToString("D3") + Header.nameSeparator + intNames[i]);
}
- if (oper.Equals("Does not contain"))
- if (!intNames[i].Contains(valToSearch)) {
+ } else if (oper.Equals("Does not contain")) {
+ if (intNames[i].IndexOf(valToSearch, StringComparison.InvariantCultureIgnoreCase) < 0) {
result.Add(i.ToString("D3") + Header.nameSeparator + intNames[i]);
}
+ }
}
break;
case "Music Day (Name)":
@@ -196,6 +197,11 @@ namespace DSPRE {
}
Update();
}
+ private void value1TextBox_KeyDown(object sender, KeyEventArgs e) {
+ if (e.KeyCode == Keys.Enter) {
+ startSearchButton_Click(null, null);
+ }
+ }
private void headerSearchResetButton_Click(object sender, EventArgs e) {
HeaderSearchReset(headerListBox, intNames);
statusLabel.Text = "Ready";
diff --git a/DS_Map/Main Window.cs b/DS_Map/Main Window.cs
index af936f3..6bf3179 100644
--- a/DS_Map/Main Window.cs
+++ b/DS_Map/Main Window.cs
@@ -888,7 +888,6 @@ namespace DSPRE {
//DeleteTempFolders();
RepackRom(saveRom.FileName);
-
if (RomInfo.gameVersion != "D" && RomInfo.gameVersion != "P" && RomInfo.gameVersion != "Plat")
if (eventEditorIsReady)
DSUtils.DecompressOverlay(1, true);
@@ -2090,27 +2089,65 @@ namespace DSPRE {
mapFilesGridView.Columns.RemoveAt(currentMatrix.width - 1 - i);
} else {
/* Add columns */
- headersGridView.Columns.Add(" ", (currentMatrix.width + i).ToString());
- heightsGridView.Columns.Add(" ", (currentMatrix.width + i).ToString());
- mapFilesGridView.Columns.Add(" ", (currentMatrix.width + i).ToString());
+ int index = currentMatrix.width + i;
+ headersGridView.Columns.Add(" ", (index).ToString());
+ heightsGridView.Columns.Add(" ", (index).ToString());
+ mapFilesGridView.Columns.Add(" ", (index).ToString());
/* Adjust column width */
- headersGridView.Columns[currentMatrix.width + i].Width = 34;
- heightsGridView.Columns[currentMatrix.width + i].Width = 22;
- mapFilesGridView.Columns[currentMatrix.width + i].Width = 34;
+ headersGridView.Columns[index].Width = 34;
+ heightsGridView.Columns[index].Width = 22;
+ mapFilesGridView.Columns[index].Width = 34;
/* Fill new rows */
for (int j = 0; j < currentMatrix.height; j++) {
- headersGridView.Rows[j].Cells[currentMatrix.width + i].Value = 0;
- heightsGridView.Rows[j].Cells[currentMatrix.width + i].Value = 0;
- mapFilesGridView.Rows[j].Cells[currentMatrix.width + i].Value = Matrix.EMPTY;
+ headersGridView.Rows[j].Cells[index].Value = 0;
+ heightsGridView.Rows[j].Cells[index].Value = 0;
+ mapFilesGridView.Rows[j].Cells[index].Value = Matrix.EMPTY;
}
}
}
/* Modify matrix object */
currentMatrix.ResizeMatrix((int)heightUpDown.Value, (int)widthUpDown.Value);
+ disableHandlers = false;
+ }
+ private void heightUpDown_ValueChanged(object sender, EventArgs e) {
+ if (disableHandlers)
+ return;
+ disableHandlers = true;
+
+ /* Add or remove rows in DataGridView control */
+ int delta = (int)heightUpDown.Value - currentMatrix.height;
+ for (int i = 0; i < Math.Abs(delta); i++) {
+ if (delta < 0) // Remove rows
+ {
+ headersGridView.Rows.RemoveAt(currentMatrix.height - 1 - i);
+ heightsGridView.Rows.RemoveAt(currentMatrix.height - 1 - i);
+ mapFilesGridView.Rows.RemoveAt(currentMatrix.height - 1 - i);
+ } else {
+ /* Add row in DataGridView */
+ headersGridView.Rows.Add();
+ heightsGridView.Rows.Add();
+ mapFilesGridView.Rows.Add();
+
+ int index = currentMatrix.height + i;
+ headersGridView.Rows[index].HeaderCell.Value = (index).ToString();
+ heightsGridView.Rows[index].HeaderCell.Value = (index).ToString();
+ mapFilesGridView.Rows[index].HeaderCell.Value = (index).ToString();
+
+ /* Fill new rows */
+ for (int j = 0; j < currentMatrix.width; j++) {
+ headersGridView.Rows[index].Cells[j].Value = 0;
+ heightsGridView.Rows[index].Cells[j].Value = 0;
+ mapFilesGridView.Rows[index].Cells[j].Value = Matrix.EMPTY;
+ }
+ }
+ }
+
+ /* Modify matrix object */
+ currentMatrix.ResizeMatrix((int)heightUpDown.Value, (int)widthUpDown.Value);
disableHandlers = false;
}
private void heightsGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) {
@@ -2133,7 +2170,6 @@ namespace DSPRE {
e.Value = 0;
disableHandlers = false;
-
}
private void importMatrixButton_Click(object sender, EventArgs e) {
/* Prompt user to select .mtx file */
@@ -2164,45 +2200,7 @@ namespace DSPRE {
widthUpDown.Value = currentMatrix.width;
heightUpDown.Value = currentMatrix.height;
disableHandlers = false;
- }
- private void heightUpDown_ValueChanged(object sender, EventArgs e) {
- if (disableHandlers)
- return;
-
- disableHandlers = true;
-
- /* Add or remove rows in DataGridView control */
- int delta = (int)heightUpDown.Value - currentMatrix.height;
- for (int i = 0; i < Math.Abs(delta); i++) {
- if (delta < 0) // Remove rows
- {
- headersGridView.Rows.RemoveAt(currentMatrix.height - 1 - i);
- heightsGridView.Rows.RemoveAt(currentMatrix.height - 1 - i);
- mapFilesGridView.Rows.RemoveAt(currentMatrix.height - 1 - i);
- } else {
- /* Add row in DataGridView */
- headersGridView.Rows.Add();
- heightsGridView.Rows.Add();
- mapFilesGridView.Rows.Add();
-
- /* Add row header */
- headersGridView.Rows[currentMatrix.height + i].HeaderCell.Value = (currentMatrix.height + i + 1).ToString();
- heightsGridView.Rows[currentMatrix.height + i].HeaderCell.Value = (currentMatrix.height + i + 1).ToString();
- mapFilesGridView.Rows[currentMatrix.height + i].HeaderCell.Value = (currentMatrix.height + i + 1).ToString();
-
- /* Fill new rows */
- for (int j = 0; j < currentMatrix.width; j++) {
- headersGridView.Rows[currentMatrix.height + i].Cells[j].Value = 0;
- heightsGridView.Rows[currentMatrix.height + i].Cells[j].Value = 0;
- mapFilesGridView.Rows[currentMatrix.height + i].Cells[j].Value = Matrix.EMPTY;
- }
- }
- }
-
- /* Modify matrix object */
- currentMatrix.ResizeMatrix((int)heightUpDown.Value, (int)widthUpDown.Value);
- disableHandlers = false;
- }
+ }
private void mapFilesGridView_CellMouseDoubleClick(object sender, DataGridViewCellEventArgs e) {
if (!mapEditorIsReady) {
SetupMapEditor();
diff --git a/DS_Map/Resources/ScriptNamesHGSS.resx b/DS_Map/Resources/ScriptNamesHGSS.resx
index f0f21e5..7d35cfc 100644
--- a/DS_Map/Resources/ScriptNamesHGSS.resx
+++ b/DS_Map/Resources/ScriptNamesHGSS.resx
@@ -424,10 +424,10 @@
GivePokemonNickname
- FadeScreen
+ SetFadeScreen
- ResetScreen
+ WaitFadeScreen
Warp
@@ -438,6 +438,9 @@
WFC1
+
+ CyclingRoadMode
+
SetVariableHero
@@ -523,19 +526,19 @@
DisableBadge
- PrepareDoorAnimation
+ DoorAnimation
- CloseDoor
+ WaitDoor
- MoveDoor
+ FreeDoor
OpenDoor
- WaitDoor
+ CloseDoor
VermillionGymAnimation
@@ -550,7 +553,7 @@
AzaleaGym2
- CheckPartyNumber
+ GetPartyCount
SetOverworldPosition
@@ -573,12 +576,21 @@
CheckHiroMoneyNumber
+
+ OverworldUnvanish
+
+
+ OverworldVanish
+
OpenMail
CheckMail
+
+ GetPlayerDirection
+
ComparePokemonHeight
@@ -600,6 +612,9 @@
SetVariableMoveDelete
+
+ Strength
+
GiveItemStored
diff --git a/DS_Map/Resources/ScriptNamesDP.Designer.cs b/DS_Map/Resources/ScriptNamesPt.Designer.cs
similarity index 100%
rename from DS_Map/Resources/ScriptNamesDP.Designer.cs
rename to DS_Map/Resources/ScriptNamesPt.Designer.cs
diff --git a/DS_Map/Resources/ScriptNamesDP.resx b/DS_Map/Resources/ScriptNamesPt.resx
similarity index 96%
rename from DS_Map/Resources/ScriptNamesDP.resx
rename to DS_Map/Resources/ScriptNamesPt.resx
index 7919d9d..640e37e 100644
--- a/DS_Map/Resources/ScriptNamesDP.resx
+++ b/DS_Map/Resources/ScriptNamesPt.resx
@@ -187,7 +187,7 @@
Message
- Message2
+ MessageSp
Message3
@@ -367,13 +367,22 @@
TakeCoins
- TakeItem
+ GiveItem
- CheckStoreItem
+ TakeItem
- CheckItem
+ GiveItemPrecheck
+
+
+ CheckPlayerHasItem
+
+
+ CheckItemIsMachine
+
+
+ GetItemPocket
CheckUndergroundPcStatus
@@ -399,6 +408,15 @@
CheckPlaceStored
+
+ SetWeather
+
+
+ InitWeather
+
+
+ UpdateWeather
+
CallEnd
@@ -457,10 +475,10 @@
ChoosePokémonName
- FadeScreen
+ SetFadeScreen
- ResetScreen
+ WaitFadeScreen
Warp
@@ -655,22 +673,22 @@
DisableBadge
- PrepareDoorAnimation
+ DoorAnimation
- DoorWait
+ WaitDoor
- DoorFree
+ FreeDoor
- DoorOpen
+ OpenDoor
- DoorOpen
+ CloseDoor
- PartyCountCheck
+ GetPartyCount
OpenBerryPouch
@@ -724,7 +742,7 @@
RecordList
- CheckHappiness
+ GetPokemonHappiness
CheckPosition
@@ -750,6 +768,9 @@
StoreMove
+
+ CheckMoveCount
+
DeleteMove
diff --git a/DS_Map/Resources/ScriptParametersDP.Designer.cs b/DS_Map/Resources/ScriptParametersPt.Designer.cs
similarity index 100%
rename from DS_Map/Resources/ScriptParametersDP.Designer.cs
rename to DS_Map/Resources/ScriptParametersPt.Designer.cs
diff --git a/DS_Map/Resources/ScriptParametersDP.resx b/DS_Map/Resources/ScriptParametersPt.resx
similarity index 99%
rename from DS_Map/Resources/ScriptParametersDP.resx
rename to DS_Map/Resources/ScriptParametersPt.resx
index e00dc46..3cf9b04 100644
--- a/DS_Map/Resources/ScriptParametersDP.resx
+++ b/DS_Map/Resources/ScriptParametersPt.resx
@@ -973,7 +973,7 @@
1 2
- 2 2 2
+ 4 1 1 2 2
1 2
@@ -2635,6 +2635,6 @@
1 1
- 1 2
+ 2 1 1
\ No newline at end of file
diff --git a/DS_Map/RomInfo.cs b/DS_Map/RomInfo.cs
index d5401e6..6d542f1 100644
--- a/DS_Map/RomInfo.cs
+++ b/DS_Map/RomInfo.cs
@@ -275,8 +275,8 @@ namespace DSPRE {
case "D":
case "P":
case "Plat":
- scriptCommandNamesDatabase = new ResourceManager("DSPRE.Resources.ScriptNamesDP", Assembly.GetExecutingAssembly());
- scriptParametersDatabase = new ResourceManager("DSPRE.Resources.ScriptParametersDP", Assembly.GetExecutingAssembly());
+ scriptCommandNamesDatabase = new ResourceManager("DSPRE.Resources.ScriptNamesPt", Assembly.GetExecutingAssembly());
+ scriptParametersDatabase = new ResourceManager("DSPRE.Resources.ScriptParametersPt", Assembly.GetExecutingAssembly());
break;
default:
scriptCommandNamesDatabase = new ResourceManager("DSPRE.Resources.ScriptNamesHGSS", Assembly.GetExecutingAssembly());