补强注释
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
#include "stdafx.h"
|
||||
/**
|
||||
* @file TetrisPieceEffects.cpp
|
||||
* @brief 实现彩虹、爆破、激光、十字和稳定结构等特殊方块落地效果。
|
||||
*/
|
||||
|
||||
#include "TetrisLogicInternal.h"
|
||||
|
||||
/**
|
||||
* @brief 结算彩虹方块固定后的染色和清除效果。
|
||||
* @param overflowTop 固定时是否已经越过棋盘顶部。
|
||||
* @param fixedCells 当前方块写入棋盘的格子数组。
|
||||
* @param fixedCellCount 写入棋盘的格子数量。
|
||||
*/
|
||||
void ApplyRainbowLandingEffect(bool overflowTop, const Point* fixedCells, int fixedCellCount)
|
||||
{
|
||||
@@ -11,6 +19,7 @@ void ApplyRainbowLandingEffect(bool overflowTop, const Point* fixedCells, int fi
|
||||
return;
|
||||
}
|
||||
|
||||
// 优先使用实际固定格子的平均行作为主色行,避免旋转形状偏移导致判定不自然。
|
||||
int rainbowAnchorRow = point.y + 1;
|
||||
if (fixedCellCount > 0)
|
||||
{
|
||||
@@ -72,6 +81,8 @@ void ApplyRainbowLandingEffect(bool overflowTop, const Point* fixedCells, int fi
|
||||
|
||||
/**
|
||||
* @brief 结算爆破方块的范围清除效果。
|
||||
* @param explosiveCells 爆破方块写入棋盘的格子数组。
|
||||
* @param explosiveCellCount 爆破格子数量。
|
||||
*/
|
||||
static void ApplyExplosiveLandingEffect(const Point* explosiveCells, int explosiveCellCount)
|
||||
{
|
||||
@@ -102,6 +113,7 @@ static void ApplyExplosiveLandingEffect(const Point* explosiveCells, int explosi
|
||||
explosiveExpGain);
|
||||
SetFeedbackMessage(_T("爆破核心"), explosiveDetail, 12);
|
||||
|
||||
// 连环炸弹需要等标准消行判断完成后,再决定是否追加一次小爆炸。
|
||||
if (rogueStats.chainBombLevel > 0 && explosiveCellCount > 0)
|
||||
{
|
||||
pendingChainBombCenter = explosiveCells[0];
|
||||
@@ -111,6 +123,8 @@ static void ApplyExplosiveLandingEffect(const Point* explosiveCells, int explosi
|
||||
|
||||
/**
|
||||
* @brief 结算激光方块的整列清除效果。
|
||||
* @param fixedCells 当前方块写入棋盘的格子数组。
|
||||
* @param fixedCellCount 写入棋盘的格子数量。
|
||||
*/
|
||||
static void ApplyLaserLandingEffect(const Point* fixedCells, int fixedCellCount)
|
||||
{
|
||||
@@ -153,6 +167,8 @@ static void ApplyLaserLandingEffect(const Point* fixedCells, int fixedCellCount)
|
||||
|
||||
/**
|
||||
* @brief 结算十字方块的整行整列清除效果。
|
||||
* @param fixedCells 当前方块写入棋盘的格子数组。
|
||||
* @param fixedCellCount 写入棋盘的格子数量。
|
||||
*/
|
||||
static void ApplyCrossLandingEffect(const Point* fixedCells, int fixedCellCount)
|
||||
{
|
||||
@@ -225,6 +241,10 @@ static void ApplyStableStructureEffect()
|
||||
|
||||
/**
|
||||
* @brief 结算爆破、激光、十字和稳定结构等特殊落地效果。
|
||||
* @param fixedCells 当前方块写入棋盘的格子数组。
|
||||
* @param fixedCellCount 写入棋盘的格子数量。
|
||||
* @param explosiveCells 爆破方块写入棋盘的格子数组。
|
||||
* @param explosiveCellCount 爆破格子数量。
|
||||
*/
|
||||
void ApplySpecialLandingEffects(const Point* fixedCells, int fixedCellCount, const Point* explosiveCells, int explosiveCellCount)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user