Skip to content

Commit

Permalink
Minor bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yahya14 committed Feb 9, 2017
1 parent ce7d1a0 commit c811fe2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 25 deletions.
1 change: 0 additions & 1 deletion Octoslots/Form1.Designer.cs

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

35 changes: 14 additions & 21 deletions Octoslots/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Drawing.Text;
using System.Threading;
using System.Linq;

namespace Octoslots
Expand Down Expand Up @@ -65,7 +63,7 @@ public Form1()
public static uint octodiff;
public uint SquadAddrs;
public bool canName = true;
public bool combineBoth;
public bool combineToggle;
public bool sendStats = false;
public uint delayRead = 1337;
public uint mainNameDelay = 1337;
Expand Down Expand Up @@ -187,7 +185,6 @@ private void connectBox_Click(object sender, EventArgs e)
sfxEliteRadio_CheckedChanged(sender, e);

//Fixes the player Octoling sfx
Gecko.poke(0x105EC6B8, 0x506C6179);
Gecko.poke(0x105EC6BC, 0x65724F74);
Gecko.poke(0x105EC6C0, 0x68657200);

Expand Down Expand Up @@ -251,7 +248,7 @@ public void hold()
private void disconnectBox_Click(object sender, EventArgs e)
{
Disconnect();
combineBoth = false;
combineToggle = false;
}

private void Disconnect()
Expand Down Expand Up @@ -289,14 +286,14 @@ private void autoRefreshTimer_Tick(object sender, EventArgs e)
//toggled combine between normal and elite octoling when checked
if (sfxCombineRadio.Checked)
{
if (combineBoth)
if (combineToggle)
{
combineBoth = false;
combineToggle = false;
sfxNormalRadio_CheckedChanged(sender, e);
}
else
{
combineBoth = true;
combineToggle = true;
sfxEliteRadio_CheckedChanged(sender, e);
}
}
Expand All @@ -320,7 +317,7 @@ public void getNames()
nameDump(FestAddr, 0x460, 0x9C);
else if (modeComboBox.Text == "Turf/Ranked Battle")
nameDump(OnlineAddr, 0x460, 0x9C);
else if (modeComboBox.Text == "Classic Offsets") //Offset names within range of 0x12. Originally "Classic". Changed to squad because squadAddr is unreliable.
else if (modeComboBox.Text == "Classic Offsets") //Offset names within range of 0x12.
nameDump(0x12D1F32E + diff, 0x704, 0xFC);
//All broken addresses need pointers for it, which I have no possesion of yet.
}
Expand All @@ -329,7 +326,7 @@ public void getNames()
}

//DUMP
public void nameDump(uint address, uint length, uint nameOffset) // sender and e params need to be there for the disconnect function to work
public void nameDump(uint address, uint length, uint nameOffset)
{
try
{
Expand Down Expand Up @@ -461,7 +458,7 @@ private bool validNamesChecker(byte[] array, uint nameOffset)
//CHANGE GUI NAMES
private void changeNames()
{
if (modeComboBox.Text != "Classic Offsets") //deals with the old offsets bug where your name appears at the top after a game.
if (modeComboBox.Text != "Classic Offsets") //prevents the first player slot to be change in Classic mode, until one of the names have changed
{
checkBoxP1.Text = " " + Encoding.BigEndianUnicode.GetString(name[0]);
}
Expand All @@ -480,7 +477,7 @@ private void checkBoxAllPlayers_TextChanged(object sender, EventArgs e)
checkBoxP1.Text = " " + Encoding.BigEndianUnicode.GetString(name[0]);
}

//squads have two address since it's dynamic
//squads have two address since it's dynamic (un-used)
public void switchSquadAddr()
{
switch (SquadAddrs)
Expand All @@ -500,7 +497,7 @@ public void switchSquadAddr()
}
}

//reads and returns mii name in a byte array (intended to convert to string later)
//reads and returns mii name in a byte array
public byte[] yourMiiName()
{
//mii name address
Expand All @@ -516,7 +513,7 @@ public byte[] yourMiiName()
small.Seek(0, SeekOrigin.Begin);
byte[] b = small.GetBuffer();

uint nameLength = 0;
uint nameLength = 0x14;
for (uint i = 0; i < length; i += 2)
{
if (b[i] == 0 && b[i + 1] == 0)
Expand Down Expand Up @@ -621,6 +618,7 @@ private void mainNameChecker()
if (name[i].SequenceEqual(miiName) && name[i].Length == miiName.Length )
{
autoRefresh[i] = true;
break;
}
}

Expand All @@ -644,20 +642,14 @@ private void mainNameChecker()

if (P1.SequenceEqual(miiName))
autoRefresh[0] = true;
Console.WriteLine(mainNameDelay);
}

mainNameDelay = mainNameDelay <= 111116 ? mainNameDelay + 1 : mainNameDelay;
mainNameDelay = mainNameDelay < 1337 ? mainNameDelay + 1 : mainNameDelay;
}
else
mainNameDelay = 0;
}

private void mainPlayerPokeCheck_CheckedChanged(object sender, EventArgs e)
{
checkVerify();
}

private void checkVerify()
{
//verifies the checks
Expand All @@ -670,6 +662,7 @@ private void checkVerify()
autoRefresh[5] = checkBoxP7.Checked;
autoRefresh[7] = checkBoxP8.Checked;
}

//load singleplayerform from the toolstrip single player button
private void singlePlayerToolStripMenuItem_Click(object sender, EventArgs e)
{
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ http://fizzystack.web.fc2.com/paintball.html

+ Windows Vista or higher (Mac and Linux users, use Wine)
+ [.NET Framework 4.5.2](http://go.microsoft.com/fwlink/?LinkId=328843)
+ Wii U System Firmware 5.5.1 or below
+ Splatoon with version 2.12.0
+ Wii U FW v5.5.1 or below
+ Splatoon with v2.12.0
+ TCPGecko + kernel from loadiine.ovh website, Dimok's [TCPGecko elf](http://wiiubru.com/appstore/#/app/TCPgecko), or [geckiine](https://gbatemp.net/threads/release-geckiine-tcpgecko-and-cafiine-combined.433057/)

##Usage
Expand Down Expand Up @@ -58,5 +58,5 @@ http://fizzystack.web.fc2.com/paintball.html

##Credits

Most of the credit goes to Bkool999, the creator of the program, and implemented all the octoling hacks. The credits also goes to Yahya14 for the coding, and Seressa and OatmealDome for their Splat AIO 2 for the base of the program.
Most of the credit goes to Bkool999, the creator of the program, and implemented all the octoling hacks. The credits also goes to Yahya14 for the coding, and Seressa and OatmealDome for their Splat AIO 2 as the base of the program.

0 comments on commit c811fe2

Please sign in to comment.