Skip to content
This repository has been archived by the owner on Aug 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #12 from GlitchyPSIX/csharp
Browse files Browse the repository at this point in the history
M64MM2.1.1
  • Loading branch information
James Pelster authored May 10, 2019
2 parents e269a0c + fb0dedc commit 535a4d7
Show file tree
Hide file tree
Showing 21 changed files with 917 additions and 315 deletions.
4 changes: 2 additions & 2 deletions M64MM2/AboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ private void btnOK_Click(object sender, EventArgs e)

private void AboutForm_Load(object sender, EventArgs e)
{
lnkDiscord.Text = ("http://discord.gg/" + Resources.discordInvite);
lnkDiscord.Text = (Resources.discordInvite);
}

private void lnkDiscord_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
Process.Start("http://discord.gg/" + Resources.discordInvite);
Process.Start("http://" + Resources.discordInvite);
}

private void lnkGithubIssues_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
Expand Down
6 changes: 3 additions & 3 deletions M64MM2/AboutForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ Special thanks to Matthew "MatthewGU4" Guerra for helping me make this project a
<value>6</value>
</data>
<data name="lblBuildDate.Text" xml:space="preserve">
<value>Build Date: August 6, 2017</value>
<value>Build Date: May 5th, 2019</value>
</data>
<data name="lblBuildDate.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>TopCenter</value>
Expand Down Expand Up @@ -376,13 +376,13 @@ Special thanks to Matthew "MatthewGU4" Guerra for helping me make this project a
<value>206, 264</value>
</data>
<data name="lnkDiscord.Size" type="System.Drawing.Size, System.Drawing">
<value>108, 13</value>
<value>131, 13</value>
</data>
<data name="lnkDiscord.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="lnkDiscord.Text" xml:space="preserve">
<value>http://discord.gg/link</value>
<value>http://comet.glitchypsi.xyz</value>
</data>
<data name="&gt;&gt;lnkDiscord.Name" xml:space="preserve">
<value>lnkDiscord</value>
Expand Down
37 changes: 24 additions & 13 deletions M64MM2/AppearanceForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,67 +184,78 @@ void applyAllColors()
if (!IsEmuOpen || BaseAddress == 0) return;

byte[] colorData = new byte[4];
colorData[3] = 0;

colorData[0] = pantsColorShade.BackColor.R;
colorData[1] = pantsColorShade.BackColor.G;
colorData[2] = pantsColorShade.BackColor.B;
WriteBytes(BaseAddress + 0x07EC20, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07EC20, colorData);

colorData[0] = pantsColorMain.BackColor.R;
colorData[1] = pantsColorMain.BackColor.G;
colorData[2] = pantsColorMain.BackColor.B;
WriteBytes(BaseAddress + 0x07EC28, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07EC28, colorData);

colorData[0] = hatColorShade.BackColor.R;
colorData[1] = hatColorShade.BackColor.G;
colorData[2] = hatColorShade.BackColor.B;
WriteBytes(BaseAddress + 0x07EC38, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07EC38, colorData);

colorData[0] = hatColorMain.BackColor.R;
colorData[1] = hatColorMain.BackColor.G;
colorData[2] = hatColorMain.BackColor.B;
WriteBytes(BaseAddress + 0x07EC40, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07EC40, colorData);

colorData[0] = glovesColorShade.BackColor.R;
colorData[1] = glovesColorShade.BackColor.G;
colorData[2] = glovesColorShade.BackColor.B;
WriteBytes(BaseAddress + 0x07EC50, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07EC50, colorData);

colorData[0] = glovesColorMain.BackColor.R;
colorData[1] = glovesColorMain.BackColor.G;
colorData[2] = glovesColorMain.BackColor.B;
WriteBytes(BaseAddress + 0x07EC58, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07EC58, colorData);

colorData[0] = shoesColorShade.BackColor.R;
colorData[1] = shoesColorShade.BackColor.G;
colorData[2] = shoesColorShade.BackColor.B;
WriteBytes(BaseAddress + 0x07EC68, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07EC68, colorData);

colorData[0] = shoesColorMain.BackColor.R;
colorData[1] = shoesColorMain.BackColor.G;
colorData[2] = shoesColorMain.BackColor.B;
WriteBytes(BaseAddress + 0x07EC70, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07EC70, colorData);

colorData[0] = skinColorShade.BackColor.R;
colorData[1] = skinColorShade.BackColor.G;
colorData[2] = skinColorShade.BackColor.B;
WriteBytes(BaseAddress + 0x07EC80, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07EC80, colorData);

colorData[0] = skinColorMain.BackColor.R;
colorData[1] = skinColorMain.BackColor.G;
colorData[2] = skinColorMain.BackColor.B;
WriteBytes(BaseAddress + 0x07EC88, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07EC88, colorData);

colorData[0] = hairColorShade.BackColor.R;
colorData[1] = hairColorShade.BackColor.G;
colorData[2] = hairColorShade.BackColor.B;
WriteBytes(BaseAddress + 0x07EC98, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07EC98, colorData);

colorData[0] = hairColorMain.BackColor.R;
colorData[1] = hairColorMain.BackColor.G;
colorData[2] = hairColorMain.BackColor.B;
WriteBytes(BaseAddress + 0x07ECA0, SwapEndian(colorData, 4));
SwapEndian(colorData, 4)[0] = 0;
WriteBytes(BaseAddress + 0x07ECA0, colorData);
}

void openCopyPasteForm(object sender, EventArgs e)
Expand Down
52 changes: 50 additions & 2 deletions M64MM2/ExtraControlsForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion M64MM2/ExtraControlsForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void tbLevitate_ValueChanged(object sender, EventArgs e)
{
if (!IsEmuOpen || BaseAddress == 0) return;

byte[] data = { (byte) tbLevitate.Value };
byte[] data = { (byte)tbLevitate.Value };
WriteBytes(BaseAddress + 0x33B223, data);
}

Expand All @@ -42,5 +42,23 @@ void btnRemoveHud_Click(object sender, EventArgs e)
WriteUInt(BaseAddress + 0x2E3DC8, 0);
WriteUInt(BaseAddress + 0x3325F4, 0x01000000);
}

private void btnBatchWrite_Click(object sender, EventArgs e)
{
//Separate by commas and only commas
string[] addrs = tbAddresses.Text.Split(',');
//for (int i = 0; i < addrs.Length; i++)
//{
// addrs[i] = "0x" + addrs[i];
//}
byte[] dataTW = StringToByteArray(tbData.Text.ToUpper());
WriteBatchBytes(addrs, dataTW, true);
}

private void btnClearBoxes_Click(object sender, EventArgs e)
{
tbAddresses.Text = "";
tbData.Text = "";
}
}
}
6 changes: 3 additions & 3 deletions M64MM2/ExtraControlsForm.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@
<data name="groupBox1.Text" xml:space="preserve">
<value>Levitar a Mario</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Controles Misc.</value>
</data>
<data name="btnRemoveHud.Text" xml:space="preserve">
<value>Remover IU</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Controles Misc.</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAQAAAAAAAEAIAB9CQAARgAAADAwAAABACAAqCUAAMMJAAAgIAAAAQAgAKgQAABrLwAAEBAAAAEA
Expand Down
Loading

0 comments on commit 535a4d7

Please sign in to comment.