본문내용
#define IDM_START 11
#define IDM_PAUSE 12
#define IDM_ABOUT 21
#define IDM_EXIT 31
char _board[BOARD_HEIGHT + 1][BOARD_WIDTH + 2];
int xCellOrigin = BOARD_HOME_X,
yCellOrigin = BOARD_HOME_Y;
BOOL bPlaying = FALSE, bPaused = FALSE;
char szAppName[] = _T("Tetris");
char szAppTitle[] = _T("Tetris");
COLORREF _fillcolor;
HPEN hPenCell[7][2], hPenFill;
HBRUSH hBrushCell[7], hBrushFill;
long CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam);
void DrawBrickElement(HDC hdc, int x, int y, int color);
void DrawBrick(HDC hdc, int x, int y, char (*buffer)[4]);
void EraseBrick(HDC hdc, int x, int y, char (*buffer)[4]);
void DrawBoard(HDC hdc);
void AllocateMem(void);
void ReleaseMem(void);
void InitBoard(void);
void GetBrickShape(int type, int angle, char (*buffer)[4]);
BOOL IsBlocked(int x, int y, int xstep, int ystep, char (*buffer)[4]);
void LandBrick(int x, int y, char (*buffer)[4]);
int CheckBoard(void);
void DrawBackground(HDC hdc);
void PutInfo(HDC hdc, int nBlockType, int nLines, int nScore, int nLevel);
void RegisterButtons(HWND hwnd);
// application entry point
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdParam, int nCmdShow)
{
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
#define IDM_PAUSE 12
#define IDM_ABOUT 21
#define IDM_EXIT 31
char _board[BOARD_HEIGHT + 1][BOARD_WIDTH + 2];
int xCellOrigin = BOARD_HOME_X,
yCellOrigin = BOARD_HOME_Y;
BOOL bPlaying = FALSE, bPaused = FALSE;
char szAppName[] = _T("Tetris");
char szAppTitle[] = _T("Tetris");
COLORREF _fillcolor;
HPEN hPenCell[7][2], hPenFill;
HBRUSH hBrushCell[7], hBrushFill;
long CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam,
LPARAM lParam);
void DrawBrickElement(HDC hdc, int x, int y, int color);
void DrawBrick(HDC hdc, int x, int y, char (*buffer)[4]);
void EraseBrick(HDC hdc, int x, int y, char (*buffer)[4]);
void DrawBoard(HDC hdc);
void AllocateMem(void);
void ReleaseMem(void);
void InitBoard(void);
void GetBrickShape(int type, int angle, char (*buffer)[4]);
BOOL IsBlocked(int x, int y, int xstep, int ystep, char (*buffer)[4]);
void LandBrick(int x, int y, char (*buffer)[4]);
int CheckBoard(void);
void DrawBackground(HDC hdc);
void PutInfo(HDC hdc, int nBlockType, int nLines, int nScore, int nLevel);
void RegisterButtons(HWND hwnd);
// application entry point
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdParam, int nCmdShow)
{
HWND hwnd;
MSG msg;
WNDCLASS wndclass;
소개글