Document main_menu state machine, name window constants

The new names for the constants (and newly named functions) give a much
better understanding of what the window system is trying to do.
This commit is contained in:
Phlosioneer
2019-02-11 00:05:20 -05:00
parent 6f1d2b870c
commit d979ac3bf3
69 changed files with 480 additions and 334 deletions
+5 -5
View File
@@ -1918,7 +1918,7 @@ static bool8 Fishing9(struct Task *task)
static bool8 Fishing10(struct Task *task)
{
AlignFishingAnimationFrames();
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
AddTextPrinterParameterized2(0, 1, gText_PokemonOnHook, 1, 0, 2, 1, 3);
task->tStep++;
task->tFrameCounter = 0;
@@ -1944,7 +1944,7 @@ static bool8 Fishing11(struct Task *task)
sub_8155604(gEventObjects[gPlayerAvatar.eventObjectId].fieldEffectSpriteId, 0, 0);
gSprites[gPlayerAvatar.spriteId].pos2.x = 0;
gSprites[gPlayerAvatar.spriteId].pos2.y = 0;
sub_8197434(0, TRUE);
ClearWindowAndWideBorder(0, TRUE);
task->tFrameCounter++;
return FALSE;
}
@@ -1966,7 +1966,7 @@ static bool8 Fishing12(struct Task *task)
{
AlignFishingAnimationFrames();
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
AddTextPrinterParameterized2(0, 1, gText_NotEvenANibble, 1, 0, 2, 1, 3);
task->tStep = FISHING_SHOW_RESULT;
return TRUE;
@@ -1977,7 +1977,7 @@ static bool8 Fishing13(struct Task *task)
{
AlignFishingAnimationFrames();
StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection()));
FillWindowPixelBuffer(0, 0x11);
FillWindowPixelBuffer(0, PIXEL_BUFFER_WHITE);
AddTextPrinterParameterized2(0, 1, gText_ItGotAway, 1, 0, 2, 1, 3);
task->tStep++;
return TRUE;
@@ -2017,7 +2017,7 @@ static bool8 Fishing16(struct Task *task)
gPlayerAvatar.preventStep = FALSE;
ScriptContext2_Disable();
UnfreezeEventObjects();
sub_8197434(0, TRUE);
ClearWindowAndWideBorder(0, TRUE);
sub_80ED950(0);
DestroyTask(FindTaskIdByFunc(Task_Fishing));
}