突出特殊方块删除
This commit is contained in:
@@ -1042,6 +1042,47 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 64; i++)
|
||||
{
|
||||
if (cellFlashEffects[i].ticks <= 0 || cellFlashEffects[i].totalTicks <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cellFlashEffects[i].x < 0 || cellFlashEffects[i].x >= nGameWidth ||
|
||||
cellFlashEffects[i].y < 0 || cellFlashEffects[i].y >= nGameHeight)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
int alpha = 48 + cellFlashEffects[i].ticks * 168 / cellFlashEffects[i].totalTicks;
|
||||
int pulseInset = SS(2 + (cellFlashEffects[i].totalTicks - cellFlashEffects[i].ticks) % 3);
|
||||
RECT flashRect =
|
||||
{
|
||||
gameRect.left + cellFlashEffects[i].x * grid + pulseInset,
|
||||
gameRect.top + cellFlashEffects[i].y * grid + pulseInset,
|
||||
gameRect.left + (cellFlashEffects[i].x + 1) * grid - pulseInset,
|
||||
gameRect.top + (cellFlashEffects[i].y + 1) * grid - pulseInset
|
||||
};
|
||||
|
||||
Graphics cellGraphics(hdc);
|
||||
cellGraphics.SetSmoothingMode(SmoothingModeAntiAlias);
|
||||
SolidBrush cellBrush(Color(alpha, GetRValue(cellFlashEffects[i].color), GetGValue(cellFlashEffects[i].color), GetBValue(cellFlashEffects[i].color)));
|
||||
Pen cellPen(Color(230, GetRValue(cellFlashEffects[i].color), GetGValue(cellFlashEffects[i].color), GetBValue(cellFlashEffects[i].color)), static_cast<REAL>(SS(2)));
|
||||
cellGraphics.FillRectangle(
|
||||
&cellBrush,
|
||||
static_cast<INT>(flashRect.left),
|
||||
static_cast<INT>(flashRect.top),
|
||||
static_cast<INT>(flashRect.right - flashRect.left),
|
||||
static_cast<INT>(flashRect.bottom - flashRect.top));
|
||||
cellGraphics.DrawRectangle(
|
||||
&cellPen,
|
||||
static_cast<INT>(flashRect.left),
|
||||
static_cast<INT>(flashRect.top),
|
||||
static_cast<INT>(flashRect.right - flashRect.left),
|
||||
static_cast<INT>(flashRect.bottom - flashRect.top));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 96; i++)
|
||||
{
|
||||
if (particleEffects[i].ticks <= 0 || particleEffects[i].totalTicks <= 0)
|
||||
|
||||
Reference in New Issue
Block a user