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,23 +35,29 @@ namespace RPG_Maker_LDB_Printer
ContinueIndent();
GetInt();
OpenIndent();
for (bool Data_end = false; Data_end == false;)
{
ContinueIndent();
int subData = GetInt();
if (subData == 0x00)
Data_end = true;
else if (PartID == 0x1D & data == 0x0A & subData == 0x01 | PartID == 0x20 & data == 0x0A & subData == 0x01 | PartID == 0x20 & data == 0x0A & subData == 0x02 | PartID == 0x20 & data == 0x0B & subData == 0x01 | PartID == 0x20 & data == 0x0B & subData == 0x02)
GetString();
else
GetBytes();
}
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();
if (subData == 0x00)
Data_end = true;
else if (PartID == 0x1D & data == 0x0A & subData == 0x01 | PartID == 0x20 & data == 0x0A & subData == 0x01 | PartID == 0x20 & data == 0x0A & subData == 0x02 | PartID == 0x20 & data == 0x0B & subData == 0x01 | PartID == 0x20 & data == 0x0B & subData == 0x02)
GetString();
else
GetBytes();
}
}
public static int GetInt()
{
return Convert7BitHex(0);

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)
{
GetEvent();
}
stop = false;
CheckEnd();
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)
{
GetEvent();
}
stop = false;
CheckEnd();
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();
@ -221,7 +221,7 @@ namespace RPG_Maker_LDB_Printer
if (AnimationFrame > 0)
CloseIndent();
break;
#endregion
#endregion
case (0x19, 0x16):
#region Event
Data.GetInt();