Fix typo and sync bool-typed fields
This commit is contained in:
+16
-28
@@ -209,9 +209,9 @@ struct BerryCrushGame_Player
|
|||||||
struct BerryCrushGame_LocalState
|
struct BerryCrushGame_LocalState
|
||||||
{
|
{
|
||||||
u16 sendFlag;
|
u16 sendFlag;
|
||||||
u8 endGame:1;
|
bool8 endGame:1;
|
||||||
u8 bigSparkle:1;
|
bool8 bigSparkle:1;
|
||||||
u8 pushedAButton:1;
|
bool8 pushedAButton:1;
|
||||||
u8 playerPressedAFlags:5;
|
u8 playerPressedAFlags:5;
|
||||||
s8 vibration;
|
s8 vibration;
|
||||||
u16 depth;
|
u16 depth;
|
||||||
@@ -224,9 +224,9 @@ struct BerryCrushGame_LinkState
|
|||||||
{
|
{
|
||||||
u16 rfuCmd;
|
u16 rfuCmd;
|
||||||
u16 sendFlag;
|
u16 sendFlag;
|
||||||
u8 endGame:1;
|
bool8 endGame:1;
|
||||||
u8 bigSparkle:1;
|
bool8 bigSparkle:1;
|
||||||
u8 pushedAButton:1;
|
bool8 pushedAButton:1;
|
||||||
u8 playerPressedAFlags:5;
|
u8 playerPressedAFlags:5;
|
||||||
s8 vibration;
|
s8 vibration;
|
||||||
u16 depth;
|
u16 depth;
|
||||||
@@ -235,18 +235,6 @@ struct BerryCrushGame_LinkState
|
|||||||
u16 sparkleAmount;
|
u16 sparkleAmount;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BerryCrushGame_40
|
|
||||||
{
|
|
||||||
s16 unk0;
|
|
||||||
s16 unk2;
|
|
||||||
s16 unk4;
|
|
||||||
s16 unk6;
|
|
||||||
s16 unk8;
|
|
||||||
s16 unkA;
|
|
||||||
s16 unkC;
|
|
||||||
s16 unkE;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Flags for the inputFlags field
|
// Flags for the inputFlags field
|
||||||
// Field is 16 bits; 3 bits for each player, last bit is unused
|
// Field is 16 bits; 3 bits for each player, last bit is unused
|
||||||
// The first two bits are interchangeable
|
// The first two bits are interchangeable
|
||||||
@@ -331,11 +319,11 @@ struct BerryCrushGame
|
|||||||
s32 powder;
|
s32 powder;
|
||||||
s32 targetDepth;
|
s32 targetDepth;
|
||||||
u8 newDepth;
|
u8 newDepth;
|
||||||
u8 noRoomForPowder:1; // Never read
|
bool8 noRoomForPowder:1; // Never read
|
||||||
u8 newRecord:1;
|
bool8 newRecord:1;
|
||||||
u8 playedSound:1;
|
bool8 playedSound:1;
|
||||||
u8 endGame:1;
|
bool8 endGame:1;
|
||||||
u8 bigSparkle:1;
|
bool8 bigSparkle:1;
|
||||||
u8 sparkleAmount:3;
|
u8 sparkleAmount:3;
|
||||||
u16 leaderTimer;
|
u16 leaderTimer;
|
||||||
u16 timer;
|
u16 timer;
|
||||||
@@ -640,7 +628,7 @@ static const struct WindowTemplate sWindowTemplates_Results[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const u8 sResultsWindowHeights[][MAX_RFU_PLAYERS - 1] = {
|
static const u8 sResultsWindowHeights[][MAX_RFU_PLAYERS - 1] = {
|
||||||
{ 6, 8, 9, 11 }, // "Preses" and "Neatness/Cooperative/Power" pages
|
{ 6, 8, 9, 11 }, // "Presses" and "Neatness/Cooperative/Power" pages
|
||||||
{ 12, 14, 15, 16 }, // "Crushing" page
|
{ 12, 14, 15, 16 }, // "Crushing" page
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1075,28 +1063,28 @@ static void SaveResults(void)
|
|||||||
case 2:
|
case 2:
|
||||||
if (sGame->pressingSpeed > gSaveBlock2Ptr->berryCrush.berryCrushResults[0])
|
if (sGame->pressingSpeed > gSaveBlock2Ptr->berryCrush.berryCrushResults[0])
|
||||||
{
|
{
|
||||||
sGame->newRecord = 1;
|
sGame->newRecord = TRUE;
|
||||||
gSaveBlock2Ptr->berryCrush.berryCrushResults[0] = sGame->pressingSpeed;
|
gSaveBlock2Ptr->berryCrush.berryCrushResults[0] = sGame->pressingSpeed;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (sGame->pressingSpeed > gSaveBlock2Ptr->berryCrush.berryCrushResults[1])
|
if (sGame->pressingSpeed > gSaveBlock2Ptr->berryCrush.berryCrushResults[1])
|
||||||
{
|
{
|
||||||
sGame->newRecord = 1;
|
sGame->newRecord = TRUE;
|
||||||
gSaveBlock2Ptr->berryCrush.berryCrushResults[1] = sGame->pressingSpeed;
|
gSaveBlock2Ptr->berryCrush.berryCrushResults[1] = sGame->pressingSpeed;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (sGame->pressingSpeed > gSaveBlock2Ptr->berryCrush.berryCrushResults[2])
|
if (sGame->pressingSpeed > gSaveBlock2Ptr->berryCrush.berryCrushResults[2])
|
||||||
{
|
{
|
||||||
sGame->newRecord = 1;
|
sGame->newRecord = TRUE;
|
||||||
gSaveBlock2Ptr->berryCrush.berryCrushResults[2] = sGame->pressingSpeed;
|
gSaveBlock2Ptr->berryCrush.berryCrushResults[2] = sGame->pressingSpeed;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
if (sGame->pressingSpeed > gSaveBlock2Ptr->berryCrush.berryCrushResults[3])
|
if (sGame->pressingSpeed > gSaveBlock2Ptr->berryCrush.berryCrushResults[3])
|
||||||
{
|
{
|
||||||
sGame->newRecord = 1;
|
sGame->newRecord = TRUE;
|
||||||
gSaveBlock2Ptr->berryCrush.berryCrushResults[3] = sGame->pressingSpeed;
|
gSaveBlock2Ptr->berryCrush.berryCrushResults[3] = sGame->pressingSpeed;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user