Refactor GetEvent function.

Closes #4.
This commit is contained in:
Michael Hinrichs 2024-07-27 16:11:48 -05:00
parent cf7a9f6674
commit 9bb648d099
1 changed files with 15 additions and 30 deletions

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;
}
}
}