添加看视频复活
This commit is contained in:
@@ -9,6 +9,7 @@ int tScore = 0;
|
||||
bool gameOverFlag = false;
|
||||
bool suspendFlag = false;
|
||||
bool targetFlag = false;
|
||||
bool reviveAvailable = false;
|
||||
int workRegion[20][10] = { 0 };
|
||||
Point point = { 0, 0 };
|
||||
Point target = { 0, 0 };
|
||||
@@ -1160,6 +1161,7 @@ void Restart()
|
||||
gameOverFlag = false;
|
||||
suspendFlag = false;
|
||||
targetFlag = true;
|
||||
reviveAvailable = true;
|
||||
currentFallInterval = 500;
|
||||
|
||||
ResetPlayerStats(classicStats, false);
|
||||
@@ -1194,6 +1196,45 @@ void Restart()
|
||||
ComputeTarget();
|
||||
}
|
||||
|
||||
void ReviveAfterVideo()
|
||||
{
|
||||
if (!gameOverFlag || !reviveAvailable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
reviveAvailable = false;
|
||||
gameOverFlag = false;
|
||||
suspendFlag = false;
|
||||
currentScreen = SCREEN_PLAYING;
|
||||
|
||||
int playableHeight = GetRoguePlayableHeight();
|
||||
int rowsToClear = playableHeight / 3;
|
||||
if (rowsToClear < 5)
|
||||
{
|
||||
rowsToClear = 5;
|
||||
}
|
||||
|
||||
for (int y = 0; y < rowsToClear && y < playableHeight; y++)
|
||||
{
|
||||
for (int x = 0; x < nGameWidth; x++)
|
||||
{
|
||||
workRegion[y][x] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
type = ConsumeNextType();
|
||||
nType = nextTypes[0];
|
||||
state = 0;
|
||||
holdUsedThisTurn = false;
|
||||
RollCurrentPieceSpecialFlags(true);
|
||||
point = GetSpawnPoint(type);
|
||||
target = point;
|
||||
ComputeTarget();
|
||||
|
||||
SetFeedbackMessage(_T("复活成功"), _T("已清理顶部空间,本局复活机会已用完。"), 14);
|
||||
}
|
||||
|
||||
void StartGameWithMode(int mode)
|
||||
{
|
||||
currentMode = mode;
|
||||
|
||||
Reference in New Issue
Block a user