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();
GetInt();
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();
int subData = GetInt();
@ -46,10 +56,6 @@ namespace RPG_Maker_LDB_Printer
else
GetBytes();
}
CloseIndent();
}
CloseIndent();
}
}
public static int GetInt()

View File

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

View File

@ -29,7 +29,7 @@ namespace RPG_Maker_LDB_Printer
Data.GetInt();
OpenIndent();
bool stop = false;
while ( stop == false)
while (stop == false)
{
ContinueIndent();
int data = Data.GetInt();
@ -175,7 +175,7 @@ namespace RPG_Maker_LDB_Printer
Data.GetInt();
OpenIndent();
bool frameStop = false;
while(frameStop == false)
while (frameStop == false)
{
ContinueIndent();
int frameData = Data.GetInt();