|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
看来论坛里的俄罗斯方块,因为没有注释和运行不了,自己用自己的想法写了一个。写的很糙,加了注释,多多谅解
#include <windows.h> //第一次写没有优化 vs2012编写
#include <windowsx.h>
#include "strsafe.h"
#define BLOCKX 30
#define BLOCKY 30
#define RED SetDCBrushColor(hdc, RGB(255, 0, 0)) //预定义是为了下面少写代码
#define YELLOW SetDCBrushColor(hdc, RGB(232, 232, 0))
#define GREEN SetDCBrushColor(hdc, RGB(0, 255, 0))
#define BLUE SetDCBrushColor(hdc, RGB(0, 0, 255))
#define ORANGE SetDCBrushColor(hdc, RGB(255, 128, 0))
#define PURPLE SetDCBrushColor(hdc, RGB(255, 0, 255))
#define CYAN SetDCBrushColor(hdc, RGB(0, 255, 255))
typedef struct Blockall //定义了两个结构:上面的是方块的两个坐标, BOOL ShowBlock用于确定画不画方块
{
short Topx; //Color 存放方块的颜色
short Topy;
short Bottomx;
short Bottomy;
BOOL ShowBlock;
int Color;
}WDWCOORD;
typedef struct ShapeStruct //Color 是为了方便索引颜色, shape 是变形式索引数组位置 A,B,C,D,四个是方块的位置
{
int color;
short Shape;
short InitialA[2];
short InitialB[2];
short InitialC[2];
short InitialD[2];
}SHAPE;
int ChangeBlock(int, int);
int AllBlock(HDC, WDWCOORD *, SHAPE *, int, int, int);
void DrawBlock(HDC, WDWCOORD *);
void EraseBlock();
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT("MyWindows");
MSG msg;
HWND hwnd;
WNDCLASS wndclass;
wndclass.style = CS_HREDRAW | CS_VREDRAW;
wndclass.lpfnWndProc = WndProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = hInstance;
wndclass.hIcon = LoadIcon(hInstance, IDI_APPLICATION);
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = szAppName;
if (!RegisterClass(&wndclass))
{
MessageBox(NULL,TEXT("该程序需要在 Windows NT 下才能运行"),szAppName,MB_ICONERROR);
}
hwnd = CreateWindow(szAppName,TEXT("Russia.block"),
WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX,
CW_USEDEFAULT,
CW_USEDEFAULT,
720,
620,
NULL,
NULL,
hInstance,
NULL);
ShowWindow(hwnd,iCmdShow);
UpdateWindow(hwnd);
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
RECT rect;
static WDWCOORD Wdw[10][19];
int i, j, x, y;
static int MoveLR = 0, MoveUD = 0, bType;
static SHAPE Shape[19] = {0, 0, {4, 0},{4, 1},{4, 2},{4, 3},
0, 1, {3, 0},{4, 0},{5, 0},{6, 0}, //条形 red
1, 2, {3, 0},{4, 0},{4, 1},{5, 1},
1, 3, {4, 1},{5, 1},{4, 2},{5, 0},//左折 yellow
2, 4, {3, 1},{4, 0},{4, 1},{5, 0},
2, 5, {4, 0},{4, 1},{5, 1},{5, 2},//右折 greed
3, 6, {4, 2},{5, 0},{5, 1},{5, 2},
3, 6, {3, 0},{4, 0},{5, 0},{5, 1},
3, 6, {4, 0},{4, 1},{4, 2},{5, 0},
3, 6, {3, 0},{3, 1},{4, 1},{5, 1},//左L形 blue
4, 7, {4, 0},{4, 1},{4, 2},{5, 2},
4, 7, {3, 1},{4, 1},{5, 0},{5, 1},
4, 7, {4, 0},{5, 0},{5, 1},{5, 2},
4, 7, {3, 0},{3, 1},{4, 0},{5, 0},//右L形 purple
5, 8, {4, 0},{4, 1},{5, 0},{5, 1}, //正方形 orange
6, 9, {3, 1},{4, 0},{4, 1},{5, 1},//上凸形 cyan
6, 9, {4, 1},{5, 0},{5, 1},{5, 2},
6, 9, {3, 0},{4, 0},{4, 1},{5, 0},
6, 9, {4, 0},{4, 1},{4, 2},{5, 1}};
switch (message)
{
case WM_CREATE:
SetTimer(hwnd,1,1000,NULL);
GetClientRect(hwnd, &rect);
bType = rand() % 7;
x = (rect.right - rect.left) * 2 / 9 + 8;
y = rect.top + 8;
for (j = 0; j < 19; j++) //给二维数组结构体赋值, 分别是方块的两个坐标和初始化showblock的值
{
for (i = 0; i < 10; i++)
{
Wdw[i][j].Topx = x + BLOCKX * i;
Wdw[i][j].Topy = y + BLOCKY * j;
Wdw[i][j].Bottomx = x + BLOCKX * (i + 1);
Wdw[i][j].Bottomy = y + BLOCKY * (j + 1);
Wdw[i][j].ShowBlock = 0;
}
}
case WM_PAINT:
hdc = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &rect);
SetDCPenColor(hdc, RGB(205, 205, 205));
SelectObject(hdc, GetStockObject(DC_PEN));
MoveToEx(hdc, (rect.right - rect.left) * 2 / 9, rect.top + 1, NULL); // 画出游戏区域的长方形区域
LineTo(hdc, (rect.right - rect.left) * 6 / 9 , rect.top + 1);
LineTo(hdc,(rect.right - rect.left) * 6 / 9 , rect.bottom - 1);
LineTo(hdc,(rect.right - rect.left) * 2 / 9 , rect.bottom - 1);
LineTo(hdc,(rect.right - rect.left) * 2 / 9 , rect.top + 1);
SetDCPenColor(hdc, RGB(250, 250, 250));
SelectObject(hdc, GetStockObject(DC_PEN));
MoveToEx(hdc, (rect.right - rect.left) * 2 / 9 + 1, rect.top + 2, NULL);
LineTo(hdc, (rect.right - rect.left) * 6 / 9 -1 , rect.top + 2);
LineTo(hdc,(rect.right - rect.left) * 6 / 9 - 1, rect.bottom - 2);
LineTo(hdc,(rect.right - rect.left) * 2 / 9 + 1, rect.bottom - 2);
LineTo(hdc,(rect.right - rect.left) * 2 / 9 + 1, rect.top + 2);
SetDCPenColor(hdc, RGB(205, 205, 205));
SelectObject(hdc, GetStockObject(DC_PEN));
MoveToEx(hdc, (rect.right - rect.left) * 2 / 9 + 2, rect.top + 3, NULL);
LineTo(hdc, (rect.right - rect.left) * 6 / 9 - 2, rect.top + 3);
LineTo(hdc,(rect.right - rect.left) * 6 / 9 - 2, rect.bottom - 3);
LineTo(hdc,(rect.right - rect.left) * 2 / 9 + 2, rect.bottom - 3);
LineTo(hdc,(rect.right - rect.left) * 2 / 9 + 2, rect.top + 3);
SetDCPenColor(hdc, RGB(255, 255, 255));
SelectObject(hdc, GetStockObject(DC_PEN));
switch (Shape[bType].color) //开始画方块
{
case 0:
RED;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 1:
YELLOW;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 2:
GREEN;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 3:
BLUE;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 4:
PURPLE;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 5:
ORANGE;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 6:
CYAN;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
}
Rectangle(hdc, Wdw[Shape[bType].InitialA[0] + MoveLR][Shape[bType].InitialA[1] + MoveUD].Topx,
Wdw[Shape[bType].InitialA[0] + MoveLR][Shape[bType].InitialA[1] + MoveUD].Topy,
Wdw[Shape[bType].InitialA[0] + MoveLR][Shape[bType].InitialA[1] + MoveUD].Bottomx,
Wdw[Shape[bType].InitialA[0] + MoveLR][Shape[bType].InitialA[1] + MoveUD].Bottomy);
Rectangle(hdc, Wdw[Shape[bType].InitialB[0] + MoveLR][Shape[bType].InitialB[1] + MoveUD].Topx,
Wdw[Shape[bType].InitialB[0] + MoveLR][Shape[bType].InitialB[1] + MoveUD].Topy,
Wdw[Shape[bType].InitialB[0] + MoveLR][Shape[bType].InitialB[1] + MoveUD].Bottomx,
Wdw[Shape[bType].InitialB[0] + MoveLR][Shape[bType].InitialB[1] + MoveUD].Bottomy);
Rectangle(hdc, Wdw[Shape[bType].InitialC[0] + MoveLR][Shape[bType].InitialC[1] + MoveUD].Topx,
Wdw[Shape[bType].InitialC[0] + MoveLR][Shape[bType].InitialC[1] + MoveUD].Topy,
Wdw[Shape[bType].InitialC[0] + MoveLR][Shape[bType].InitialC[1] + MoveUD].Bottomx,
Wdw[Shape[bType].InitialC[0] + MoveLR][Shape[bType].InitialC[1] + MoveUD].Bottomy);
Rectangle(hdc, Wdw[Shape[bType].InitialD[0] + MoveLR][Shape[bType].InitialD[1] + MoveUD].Topx,
Wdw[Shape[bType].InitialD[0] + MoveLR][Shape[bType].InitialD[1] + MoveUD].Topy,
Wdw[Shape[bType].InitialD[0] + MoveLR][Shape[bType].InitialD[1] + MoveUD].Bottomx,
Wdw[Shape[bType].InitialD[0] + MoveLR][Shape[bType].InitialD[1] + MoveUD].Bottomy);
if (AllBlock(hdc, Wdw[0], Shape, bType, MoveUD, MoveLR)) //根据返回值确定是否消除和堆叠方块
{
EraseBlock(Wdw[0], Shape, bType, MoveUD);
bType = rand() % 7; //取随机数 0 - 6 (这里是伪随机数,要取随机是用函数srand()取种子)
switch (bType)
{
case 0:
bType += 0;
break;
case 1:
bType += 1;
break;
case 2:
bType += 2;
break;
case 3:
bType += 3;
break;
case 4:
bType += 6;
break;
case 5:
bType += 9; //5 + 9 = 14
break;
case 6:
bType += 9; //6 + 9 = 15
}
MoveLR = 0; MoveUD = 0; // 置0 在开始的地方重绘一个方块
}
DrawBlock(hdc, Wdw[0]);
EndPaint(hwnd,&ps);
return 0;
case WM_TIMER:
MoveUD += 1;
InvalidateRect(hwnd, NULL, TRUE);
return 0;
case WM_KEYDOWN:
switch (LOWORD(wParam))
{
case VK_UP:
bType = ChangeBlock(Shape[bType].Shape, bType);
break;
case VK_DOWN:
MoveUD += 1;
;
break;
case VK_LEFT:
MoveLR -= 1;
break;
case VK_RIGHT:
MoveLR += 1;
break;
default:
break;
}
MoveLR = max(-(int)Shape[bType].InitialA[0], min(MoveLR, 9 - (int)Shape[bType].InitialD[0])); // 根据方块的位置来确定方块不会越界
InvalidateRect(hwnd, NULL, TRUE);
UpdateWindow(hwnd);
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hwnd, message, wParam, lParam);
}
int ChangeBlock(int a, int b)
{
switch (a) //改变方块是根据改变结构体SHAPE Shape[19] short InitialABCD 来索引数组 static WDWCOORD Wdw[10][19]
{
case 0:
return 1;
break;
case 1:
return 0;
break;
case 2:
return 3;
break;
case 3:
return 2;
break;
case 4:
return 5;
break;
case 5:
return 4;
break;
case 6:
if (b < 9)
{
return b + 1;
break;
}
else
{
return 6;
break;
}
case 7:
if (b < 13)
{
return b + 1;
break;
}
else
{
return 10;
break;
}
case 8:
return 14;
break;
case 9:
if (b < 18)
{
return b + 1;
break;
}
else
{
return 15;
break;
}
}
return 0;
};
int AllBlock(HDC hdc, WDWCOORD *a, SHAPE *b, int c, int d, int e) //根据WDWCOORD Wdw[10][19]里面的showblock值 和 color 值来绘制屏幕上的方块
{
if ((((b + c) ->InitialA[1] + d) == 18 || ((b + c) ->InitialB[1] + d) == 18 //判断是不是到达底部
|| ((b + c) ->InitialC[1] + d) == 18 || ((b + c) ->InitialD[1] + d) == 18)||
(((a + (((b + c) -> InitialA[0] + e) * 19)) + ((b + c) -> InitialA[1] + (d + 1)))->ShowBlock == TRUE) || //判断是不是堆叠方块
(((a + (((b + c) -> InitialB[0] + e) * 19)) + ((b + c) -> InitialB[1] + (d + 1)))->ShowBlock == TRUE) ||
(((a + (((b + c) -> InitialC[0] + e) * 19)) + ((b + c) -> InitialC[1] + (d + 1)))->ShowBlock == TRUE) ||
(((a + (((b + c) -> InitialD[0] + e) * 19)) + ((b + c) -> InitialD[1] + (d + 1)))->ShowBlock == TRUE))
{
((a + (((b + c) -> InitialA[0] + e) * 19)) + ((b + c) -> InitialA[1] + d))->ShowBlock = TRUE; //如果是将坐标的showblock值 置 TRUE
((a + (((b + c) -> InitialB[0] + e) * 19)) + ((b + c) -> InitialB[1] + d))->ShowBlock = TRUE;
((a + (((b + c) -> InitialC[0] + e) * 19)) + ((b + c) -> InitialC[1] + d))->ShowBlock = TRUE;
((a + (((b + c) -> InitialD[0] + e) * 19)) + ((b + c) -> InitialD[1] + d))->ShowBlock = TRUE;
switch((b + c) -> color)
{
case 0:
((a + (((b + c) -> InitialA[0] + e) * 19)) + ((b + c) -> InitialA[1] + d))->Color = 0; //根据结构体Shape.color的值 填入Wdw[][].color
((a + (((b + c) -> InitialB[0] + e) * 19)) + ((b + c) -> InitialB[1] + d))->Color = 0;
((a + (((b + c) -> InitialC[0] + e) * 19)) + ((b + c) -> InitialC[1] + d))->Color = 0;
((a + (((b + c) -> InitialD[0] + e) * 19)) + ((b + c) -> InitialD[1] + d))->Color = 0;
break;
case 1:
((a + (((b + c) -> InitialA[0] + e) * 19)) + ((b + c) -> InitialA[1] + d))->Color = 1;
((a + (((b + c) -> InitialB[0] + e) * 19)) + ((b + c) -> InitialB[1] + d))->Color = 1;
((a + (((b + c) -> InitialC[0] + e) * 19)) + ((b + c) -> InitialC[1] + d))->Color = 1;
((a + (((b + c) -> InitialD[0] + e) * 19)) + ((b + c) -> InitialD[1] + d))->Color = 1;
break;
case 2:
((a + (((b + c) -> InitialA[0] + e) * 19)) + ((b + c) -> InitialA[1] + d))->Color = 2;
((a + (((b + c) -> InitialB[0] + e) * 19)) + ((b + c) -> InitialB[1] + d))->Color = 2;
((a + (((b + c) -> InitialC[0] + e) * 19)) + ((b + c) -> InitialC[1] + d))->Color = 2;
((a + (((b + c) -> InitialD[0] + e) * 19)) + ((b + c) -> InitialD[1] + d))->Color = 2;
break;
case 3:
((a + (((b + c) -> InitialA[0] + e) * 19)) + ((b + c) -> InitialA[1] + d))->Color = 3;
((a + (((b + c) -> InitialB[0] + e) * 19)) + ((b + c) -> InitialB[1] + d))->Color = 3;
((a + (((b + c) -> InitialC[0] + e) * 19)) + ((b + c) -> InitialC[1] + d))->Color = 3;
((a + (((b + c) -> InitialD[0] + e) * 19)) + ((b + c) -> InitialD[1] + d))->Color = 3;
break;
case 4:
((a + (((b + c) -> InitialA[0] + e) * 19)) + ((b + c) -> InitialA[1] + d))->Color = 4;
((a + (((b + c) -> InitialB[0] + e) * 19)) + ((b + c) -> InitialB[1] + d))->Color = 4;
((a + (((b + c) -> InitialC[0] + e) * 19)) + ((b + c) -> InitialC[1] + d))->Color = 4;
((a + (((b + c) -> InitialD[0] + e) * 19)) + ((b + c) -> InitialD[1] + d))->Color = 4;
break;
case 5:
((a + (((b + c) -> InitialA[0] + e) * 19)) + ((b + c) -> InitialA[1] + d))->Color = 5;
((a + (((b + c) -> InitialB[0] + e) * 19)) + ((b + c) -> InitialB[1] + d))->Color = 5;
((a + (((b + c) -> InitialC[0] + e) * 19)) + ((b + c) -> InitialC[1] + d))->Color = 5;
((a + (((b + c) -> InitialD[0] + e) * 19)) + ((b + c) -> InitialD[1] + d))->Color = 5;
break;
case 6:
((a + (((b + c) -> InitialA[0] + e) * 19)) + ((b + c) -> InitialA[1] + d))->Color = 6;
((a + (((b + c) -> InitialB[0] + e) * 19)) + ((b + c) -> InitialB[1] + d))->Color = 6;
((a + (((b + c) -> InitialC[0] + e) * 19)) + ((b + c) -> InitialC[1] + d))->Color = 6;
((a + (((b + c) -> InitialD[0] + e) * 19)) + ((b + c) -> InitialD[1] + d))->Color = 6;
break;
}
return 1; //堆叠了返回 1 否则返回 0
}
else
{
return 0;
}
}
void DrawBlock(HDC hdc, WDWCOORD *a) //画框里的方块根据Wdw[][]里的showblock和color来绘制
{
int i, j;
for (i = 0; i < 19; i++)
{
for (j = 0; j < 10; j++)
{
if ((a + j * 19)[i].ShowBlock == TRUE)
{
switch ((a + j * 19)[i].Color)
{
case 0:
RED;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 1:
YELLOW;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 2:
GREEN;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 3:
BLUE;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 4:
PURPLE;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 5:
ORANGE;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
case 6:
CYAN;SelectObject(hdc, GetStockObject(DC_BRUSH));
break;
}
SetDCPenColor(hdc, RGB(255, 255, 255));
SelectObject(hdc, GetStockObject(DC_PEN));
Rectangle(hdc,(a + j * 19)[i].Topx, (a + j * 19)[i].Topy,
(a + j * 19)[i].Bottomx, (a + j * 19)[i].Bottomy);
}
}
}
}
void EraseBlock(WDWCOORD *a, SHAPE *b, int c, int d) //消除方块
{
int i, j = 0, k, Blocka = TRUE, Blockb = TRUE, Blockc = TRUE, Blockd = TRUE, Same;
for(i = 0; i < 10; i++)
{
if((((a + (i * 19)) + ((b + c) -> InitialA[1] + d))->ShowBlock) == FALSE)
{
Blocka--;
}
if((((a + (i * 19)) + ((b + c) -> InitialB[1] + d))->ShowBlock) == FALSE)
{
Blockb--;
}
if((((a + (i * 19)) + ((b + c) -> InitialC[1] + d))->ShowBlock) == FALSE)
{
Blockc--;
}
if((((a + (i * 19)) + ((b + c) -> InitialD[1] + d))->ShowBlock) == FALSE)
{
Blockd--;
}
}
if (Blocka == TRUE)
{
for(i = 0; i < 10; i++)
{
((a + (i * 19)) + ((b + c) -> InitialA[1] + d))->ShowBlock = FALSE;
}
for(j = 0; j < ((b + c) -> InitialA[1] + d); j++)
{
for(k = 0; k < 10; k++)
{
((a + (k * 19)) + ((b + c) -> InitialA[1] + (d - j)))->ShowBlock ^= ((a + (k * 19)) + ((b + c) -> InitialA[1] + (d - j - 1)))->ShowBlock;
((a + (k * 19)) + ((b + c) -> InitialA[1] + (d - j)))->Color = ((a + (k * 19)) + ((b + c) -> InitialA[1] + (d - j - 1)))->Color;
((a + (k * 19)) + ((b + c) -> InitialA[1] + (d - j - 1)))->ShowBlock = FALSE;
}
}
}
if (Blockb == TRUE)
{
if(((b + c) -> InitialA[1] + d) != ((b + c) -> InitialB[1] + d))
{
for(i = 0; i < 10; i++)
{
((a + (i * 19)) + ((b + c) -> InitialB[1] + d))->ShowBlock = FALSE;
}
for(j = 0; j < ((b + c) -> InitialB[1] + d); j++)
{
for(k = 0; k < 10; k++)
{
((a + (k * 19)) + ((b + c) -> InitialB[1] + (d - j)))->ShowBlock ^= ((a + (k * 19)) + ((b + c) -> InitialB[1] + (d - j - 1)))->ShowBlock;
((a + (k * 19)) + ((b + c) -> InitialB[1] + (d - j)))->Color = ((a + (k * 19)) + ((b + c) -> InitialB[1] + (d - j - 1)))->Color;
((a + (k * 19)) + ((b + c) -> InitialB[1] + (d - j - 1)))->ShowBlock = FALSE;
}
}
}
}
if (Blockc == TRUE)
{
if(((b + c) -> InitialC[1] + d) != ((b + c) -> InitialA[1] + d) && ((b + c) -> InitialC[1] + d) != ((b + c) -> InitialB[1] + d))
{
for(i = 0; i < 10; i++)
{
((a + (i * 19)) + ((b + c) -> InitialC[1] + d))->ShowBlock = FALSE;
}
for(j = 0; j < ((b + c) -> InitialC[1] + d); j++)
{
for(k = 0; k < 10; k++)
{
((a + (k * 19)) + ((b + c) -> InitialC[1] + (d - j)))->ShowBlock ^=((a + (k * 19)) + ((b + c) -> InitialC[1] + (d - j - 1)))->ShowBlock;
((a + (k * 19)) + ((b + c) -> InitialC[1] + (d - j)))->Color = ((a + (k * 19)) + ((b + c) -> InitialC[1] + (d - j - 1)))->Color;
((a + (k * 19)) + ((b + c) -> InitialC[1] + (d - j - 1)))->ShowBlock = FALSE;
}
}
}
}
if (Blockd == TRUE)
{
if(((b + c) -> InitialD[1] + d) != ((b + c) -> InitialA[1] + d) && ((b + c) -> InitialD[1] + d) != ((b + c) -> InitialB[1] + d)
&& ((b + c) -> InitialD[1] + d) != ((b + c) -> InitialC[1] + d))
{
for(i = 0; i < 10; i++)
{
((a + (i * 19)) + ((b + c) -> InitialD[1] + d))->ShowBlock = FALSE;
}
for(j = 0; j < ((b + c) -> InitialD[1] + d); j++)
{
for(k = 0; k < 10; k++)
{
((a + (k * 19)) + ((b + c) -> InitialD[1] + (d - j)))->ShowBlock ^= ((a + (k * 19)) + ((b + c) -> InitialD[1] + (d - j - 1)))->ShowBlock;
((a + (k * 19)) + ((b + c) -> InitialD[1] + (d - j)))->Color = ((a + (k * 19)) + ((b + c) -> InitialD[1] + (d - j - 1)))->Color;
((a + (k * 19)) + ((b + c) -> InitialD[1] + (d - j - 1)))->ShowBlock = FALSE;
}
}
}
}
}
|
|