Replace "for" loops with "while" loops

I can't believe i didn't know what "while" loops were when i wrote this! I actually tried using "for" loops like that!
This commit is contained in:
Michael Hinrichs 2023-10-29 00:33:59 -04:00
parent f9a23b8fd9
commit c003da0ca1
1 changed files with 8 additions and 4 deletions

View File

@ -28,7 +28,8 @@ namespace RPG_Maker_LDB_Printer
{ {
Data.GetInt(); Data.GetInt();
OpenIndent(); OpenIndent();
for (bool stop = false; stop == false;) bool stop = false;
while ( stop == false)
{ {
ContinueIndent(); ContinueIndent();
int data = Data.GetInt(); int data = Data.GetInt();
@ -138,7 +139,8 @@ namespace RPG_Maker_LDB_Printer
ContinueIndent(); ContinueIndent();
Data.GetInt(); Data.GetInt();
OpenIndent(); OpenIndent();
for (bool timingStop = false; timingStop == false;) bool timingStop = false;
while (timingStop == false)
{ {
ContinueIndent(); ContinueIndent();
int timingData = Data.GetInt(); int timingData = Data.GetInt();
@ -172,7 +174,8 @@ namespace RPG_Maker_LDB_Printer
ContinueIndent(); ContinueIndent();
Data.GetInt(); Data.GetInt();
OpenIndent(); OpenIndent();
for (bool frameStop = false; frameStop == false;) bool frameStop = false;
while(frameStop == false)
{ {
ContinueIndent(); ContinueIndent();
int frameData = Data.GetInt(); int frameData = Data.GetInt();
@ -192,7 +195,8 @@ namespace RPG_Maker_LDB_Printer
ContinueIndent(); ContinueIndent();
Data.GetInt(); Data.GetInt();
OpenIndent(); OpenIndent();
for (bool cellDataStop = false; cellDataStop == false;) bool cellDataStop = false;
while (cellDataStop == false)
{ {
ContinueIndent(); ContinueIndent();
int Cell_Data = Data.GetInt(); int Cell_Data = Data.GetInt();