Compare commits

..

7 Commits

Author SHA1 Message Date
NintenHero 0ea1cf6af2
Merge pull request #7 from MichaelHinrichs/deepsource-transform-db25a971
style: format code with dotnet-format
2024-07-27 16:24:40 -05:00
NintenHero ad3106247b
Merge pull request #11 from MichaelHinrichs/deepsource-transform-85bd50f2
style: format code with dotnet-format
2024-07-27 16:23:49 -05:00
Michael Hinrichs 9bb648d099 Refactor GetEvent function.
Closes #4.
2024-07-27 16:11:48 -05:00
deepsource-autofix[bot] 8b7dd0cdfa
style: format code with dotnet-format
This commit fixes the style issues introduced in cf7a9f6 according to the output
from dotnet-format.

Details: None
2024-07-27 21:04:50 +00:00
Michael Hinrichs cf7a9f6674 Refactor Subdata function 2024-07-27 16:04:27 -05:00
Michael Hinrichs 0abfc8515a Change FOR loop to WHILE loop 2024-07-27 16:00:13 -05:00
deepsource-autofix[bot] 0349d266fe
style: format code with dotnet-format
This commit fixes the style issues introduced in 53f4b37 according to the output
from dotnet-format.

Details: None
2024-06-29 18:37:53 +00:00
3 changed files with 35 additions and 44 deletions

View File

@ -35,7 +35,17 @@ namespace RPG_Maker_LDB_Printer
ContinueIndent(); ContinueIndent();
GetInt(); GetInt();
OpenIndent(); OpenIndent();
for (bool Data_end = false; Data_end == false;) ReadSubdata(PartID, data);
CloseIndent();
}
CloseIndent();
}
}
public static void ReadSubdata(byte PartID, int data)
{
bool Data_end = false;
while (Data_end == false)
{ {
ContinueIndent(); ContinueIndent();
int subData = GetInt(); int subData = GetInt();
@ -46,10 +56,6 @@ namespace RPG_Maker_LDB_Printer
else else
GetBytes(); GetBytes();
} }
CloseIndent();
}
CloseIndent();
}
} }
public static int GetInt() public static int GetInt()

View File

@ -34,18 +34,10 @@ namespace RPG_Maker_LDB_Printer
break; break;
case 12010://DD 6A case 12010://DD 6A
case 13310://E7 7E case 13310://E7 7E
while (stop == false) CheckEnd();
{
GetEvent();
}
stop = false;
if (gotInts[5] == 1) if (gotInts[5] == 1)
{ {
while (stop == false) CheckEnd();
{
GetEvent();
}
stop = false;
} }
GetEvent(); GetEvent();
break; break;
@ -53,17 +45,9 @@ namespace RPG_Maker_LDB_Printer
if (gotInts[3] == 2 || gotInts[4] == 1) if (gotInts[3] == 2 || gotInts[4] == 1)
{ {
GetEvent(); GetEvent();
while (stop == false) CheckEnd();
{
GetEvent(); GetEvent();
} CheckEnd();
stop = false;
GetEvent();
while (stop == false)
{
GetEvent();
}
stop = false;
GetEvent(); GetEvent();
} }
break; break;
@ -73,17 +57,9 @@ namespace RPG_Maker_LDB_Printer
{ {
stop = false; stop = false;
GetEvent(); GetEvent();
while (stop == false) CheckEnd();
{
GetEvent(); GetEvent();
} CheckEnd();
stop = false;
GetEvent();
while (stop == false)
{
GetEvent();
}
stop = false;
GetEvent(); GetEvent();
} }
break; break;
@ -99,5 +75,14 @@ namespace RPG_Maker_LDB_Printer
Formating.CloseIndent(); Formating.CloseIndent();
Formating.CloseIndent(); Formating.CloseIndent();
} }
static void CheckEnd()
{
while (stop == false)
{
GetEvent();
}
stop = false;
}
} }
} }