Skip to content

Commit

Permalink
엔딩 이미지 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
riadan710 committed Jun 6, 2021
1 parent 069c080 commit 5202bb6
Show file tree
Hide file tree
Showing 10 changed files with 214 additions and 50 deletions.
Binary file modified .vs/Tetris/v16/.suo
Binary file not shown.
Binary file modified Debug/Tetris.exe
Binary file not shown.
Binary file modified Debug/Tetris.ilk
Binary file not shown.
4 changes: 2 additions & 2 deletions Debug/Tetris.log
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
 tetris.c
C:\Users\a0334\source\repos\Tetris\tetris.c(333,18): warning C4244: '함수': 'time_t'에서 'unsigned int'(으)로 변환하면서 데이터가 손실될 수 있습니다.
C:\Users\a0334\source\repos\Tetris\tetris.c(367,2): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\a0334\source\repos\Tetris\tetris.c(343,18): warning C4244: '함수': 'time_t'에서 'unsigned int'(으)로 변환하면서 데이터가 손실될 수 있습니다.
C:\Users\a0334\source\repos\Tetris\tetris.c(377,2): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
Tetris.vcxproj -> C:\Users\a0334\source\repos\Tetris\Debug\Tetris.exe
Binary file modified Debug/Tetris.pdb
Binary file not shown.
Binary file modified Debug/tetris.obj
Binary file not shown.
Binary file modified Debug/vc142.idb
Binary file not shown.
Binary file modified Debug/vc142.pdb
Binary file not shown.
112 changes: 112 additions & 0 deletions food.h
Original file line number Diff line number Diff line change
Expand Up @@ -894,4 +894,116 @@ void cake(int a, int b) {
}
}
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 15);
}


void dog_cook(int a, int b) {
int dog_cook[50][45] = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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1,7,7,7,7,7,1,0,0,0,0,0,0,1,7,7,7,7,7,1,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,7,7,7,7,7,1,0,0,0,0,0,0,1,7,7,7,7,7,1,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
};

for (int i = 0; i < 50; i++) {
gotoxy(a, (b + i));
for (int j = 0; j < 45; j++) {
switch (dog_cook[i][j]) {
case 0:
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 15);
printf("■");
break;
case 1:
SET_COLOR(FOREGROUND, 0, 0, 0);
printf("■");
break;
case 2:
SET_COLOR(FOREGROUND, 205, 204, 205);
printf("■");
break;
case 3:
SET_COLOR(FOREGROUND, 130, 130, 130);
printf("■");
break;
case 4:
SET_COLOR(FOREGROUND, 81, 81, 81);
printf("■");
break;
case 5:
SET_COLOR(FOREGROUND, 166, 143, 125);
printf("■");
break;
case 6:
SET_COLOR(FOREGROUND, 100, 58, 61);
printf("■");
break;
case 7:
SET_COLOR(FOREGROUND, 230, 230, 230);
printf("■");
break;
case 8:
SET_COLOR(FOREGROUND, 251, 147, 154);
printf("■");
break;
case 9:
SET_COLOR(FOREGROUND, 218, 218, 218);
printf("■");
break;
case 10:
SET_COLOR(FOREGROUND, 255, 0, 0);
printf("■");
break;
case 11:
SET_COLOR(FOREGROUND, 89, 80, 71);
printf("■");
break;
}
}
}
}
148 changes: 100 additions & 48 deletions tetris.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,19 @@ int Themespace[10][10] = {
{1,1,1,1,1,1,1,1,1,1}
};

int Themespace2[10][10] = {
{1,1,1,1,1,1,1,1,1,1},
{1,0,0,0,0,0,0,0,0,1},
{1,0,0,2,2,2,2,0,0,1},
{1,0,2,2,0,0,2,2,0,1},
{1,0,2,0,0,0,0,2,0,1},
{1,0,2,0,0,0,0,2,0,1},
{1,0,2,2,0,0,2,2,0,1},
{1,0,0,2,2,2,2,0,0,1},
{1,0,0,0,0,0,0,0,0,1},
{1,1,1,1,1,1,1,1,1,1}
};

void Console_Size(); // 콘솔 사이즈 설정
void CursorView(char show); // 커서 깜빡임 숨기기. 0이면 숨김, 1이면 보임
void DesignMainMenu(); // 메인 메뉴 디자인
Expand All @@ -321,9 +334,6 @@ void DeleteArea(int x1, int y1, int x2, int y2); // 범위 지정 삭제
void RemoveSelectedLine(); // 원하는 줄 지우기 아이템
void RemoveSelectedColor(); // 원하는 색 지우기 아이템
void SelectTheme(); // 테마 선택 메뉴
void Theme1();
void Theme2();
void Theme3();
void SlowFallSpeed(); // 하강 속도 일시적 감소 아이템
void DrawGauge(); // 게이즈 출력
void CheckClear(); // 스테이지 클리어 체크
Expand Down Expand Up @@ -655,33 +665,83 @@ void SelectTheme() {
printf("테마를 선택하세요");
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
switch (Themespace[i][j]) {
case 1:
gotoxy(j * 2 + 6, i + 10);
if (isThemeClear[0] == false) printf("▣");
else printf(FG_COLOR(255, 0, 0) "▣" RESET);

gotoxy(j * 2 + 35, i + 10);
if (isThemeClear[1] == false) printf("▣");
else printf(FG_COLOR(255, 255, 0) "▣" RESET);

gotoxy(j * 2 + 64, i + 10);
if (isThemeClear[2] == false) printf("▣");
else printf(FG_COLOR(0, 102, 255) "▣" RESET);
break;
case 2:
gotoxy(j * 2 + 6, i + 10);
if (isThemeClear[0] == false) printf("■");
else printf(FG_COLOR(255, 0, 0) "■" RESET);

gotoxy(j * 2 + 35, i + 10);
if (isThemeClear[1] == false) printf("■");
else printf(FG_COLOR(255, 255, 0) "■" RESET);

gotoxy(j * 2 + 64, i + 10);
if (isThemeClear[2] == false) printf("■");
else printf(FG_COLOR(0, 102, 255) "■" RESET);
break;
if (isThemeClear[0] == false) {
switch (Themespace[i][j]) {
case 1:
gotoxy(j * 2 + 6, i + 10);
printf("▣");
break;
case 2:
gotoxy(j * 2 + 6, i + 10);
printf("■");
break;
}
}
else {
gotoxy(14, 20);
printf("clear");
switch (Themespace2[i][j]) {
case 1:
gotoxy(j * 2 + 6, i + 10);
printf(FG_COLOR(255, 0, 0) "▣" RESET);
break;
case 2:
gotoxy(j * 2 + 6, i + 10);
printf(FG_COLOR(255, 0, 0) "■" RESET);
break;
}
}
if (isThemeClear[1] == false) {
switch (Themespace[i][j]) {
case 1:
gotoxy(j * 2 + 35, i + 10);
printf("▣");
break;
case 2:
gotoxy(j * 2 + 35, i + 10);
printf("■");
break;
}
}
else {
gotoxy(43, 20);
printf("clear");
switch (Themespace2[i][j]) {
case 1:
gotoxy(j * 2 + 35, i + 10);
printf(FG_COLOR(255, 255, 0) "▣" RESET);
break;
case 2:
gotoxy(j * 2 + 35, i + 10);
printf(FG_COLOR(255, 255, 0) "■" RESET);
break;
}
}
if (isThemeClear[2] == false) {
switch (Themespace[i][j]) {
case 1:
gotoxy(j * 2 + 64, i + 10);
printf("▣");
break;
case 2:
gotoxy(j * 2 + 64, i + 10);
printf("■");
break;
}
}
else {
gotoxy(72, 20);
printf("clear");
switch (Themespace2[i][j]) {
case 1:
gotoxy(j * 2 + 64, i + 10);
printf(FG_COLOR(0, 255, 0) "▣" RESET);
break;
case 2:
gotoxy(j * 2 + 64, i + 10);
printf(FG_COLOR(0, 255, 0) "■" RESET);
break;
}
}
}
}
Expand Down Expand Up @@ -737,31 +797,18 @@ void SelectTheme() {
if (key == 13) // 엔터
{
if (return_n == 0) // 튀김류
Theme1();
themenum = 1;
else if (return_n == 29)
Theme2();
themenum = 2;
else
Theme3();
themenum = 3;

break;
}
}
}
}
}

void Theme1() {
themenum = 1;
system("cls");
MenuOne();
}

void Theme2() {
themenum = 2;
system("cls");
MenuOne();
}

void Theme3() {
themenum = 3;
system("cls");
MenuOne();
}
Expand Down Expand Up @@ -2197,13 +2244,18 @@ void CheckClear() {
} //키보드 입력이 들어올 때 까지 글씨가 깜빡거림

if (stagenum == 4) {
Height = 60;
Width = 100;
Console_Size();
system("cls");
isThemeClear[themenum - 1] = true;
gotoxy(Width / 2 - 12, 2);
if (themenum == 1) printf(FG_COLOR(255, 255, 0) "< 튀김류 > " RESET);
else if (themenum == 2) printf(FG_COLOR(255, 255, 0) "< 밥류 > " RESET);
else printf(FG_COLOR(255, 255, 0) "< 디저트류 > " RESET);
printf("요리 마스터 !!");
dog_cook(5, 5);

while (1)
{
gotoxy(Width / 2 - 15, Height - 3);
Expand Down

0 comments on commit 5202bb6

Please sign in to comment.