Untitled
unknown
plain_text
4 months ago
51 kB
2
Indexable
#include "iGraphics.h" #include <windows.h> #include <time.h> #include <string.h> #define screenWidth 1100 #define screenHeight 600 int menupage = 1; int level_1 = 0, level_2 = 0, level_change = 0, instructions = 0, congratulations = 0, leaderboard = 0, gameOver = 0, namepage = 0; int dx = 20; int dy = 0; int gravity = 2; int ballX = 0; int ballY = 90; int lives = 3; int score = 0; int isPopped = 0; clock_t startTime = 0; int hoop_level1[4] = {0, 0, 0, 0}; int hoop_level2[3] = {0, 0, 0}; char coins[9][100]; int idlecoin = 0; int musicOn = 1; int blueDisco = 0, purpleDisco = 0, redBall = 1; int initialX, initialY; int writingMode = 0, len = 0, backspace = 0; char nickname[100], printName[100]; struct player { char name[100]; int score; } players[100]; int nameIndex = 0; FILE *fp = fopen("piechart.txt", "a"); FILE *read = fopen("piechart.txt", "r"); void menuPage(); void levelOne(); void ballPosition(); void restart(); void levelChange(); void levelTwo(); void thornChecker(); void livesAndScores(); void showCoinAnimation(); void updateCoin(); void instructionPage(); void congratulationPage(); void leaderBoard(); void gameOverPage(); void namePage(); void pauseScreen(); int map[60][55] = { {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}}; void iDraw() { iClear(); if (menupage == 1) { menuPage(); } else if (instructions == 1) { instructionPage(); } else if (namepage == 1) { namePage(); } else if (level_1 == 1) { levelOne(); } else if (level_change == 1) { // processing msg ashbe levelChange(); } else if (level_2 == 1) { levelTwo(); } else if (congratulations == 1) { congratulationPage(); } else if (leaderboard == 1) { leaderBoard(); } else if (gameOver == 1) { gameOverPage(); } } void iMouseMove(int mx, int my) { } void iMouse(int button, int state, int mx, int my) { if (button == GLUT_LEFT_BUTTON && state == GLUT_DOWN) { if (mx >= 452 && mx <= 646 && my <= 335 && my >= 250 && menupage == 1) { menupage = 0; namepage = 1; fp = fopen("piechart.txt", "a"); } if (mx >= 1060 && mx <= 1090 && my >= 560 && my <= 590 && menupage == 1) { exit(0); } if (mx >= 1060 && mx <= 1090 && my >= 560 && my <= 590 && leaderboard == 1) { exit(0); } if (mx >= 452 && mx <= 646 && my <= 240 && my >= 155 && menupage == 1) { menupage = 0; leaderboard = 1; } if (mx >= 452 && mx <= 646 && my <= 145 && my >= 55 && menupage == 1) { menupage = 0; instructions = 1; } if (mx >= 1050 && mx <= 1080 && my <= 50 && my >= 20 && instructions == 1) { menupage = 1; instructions = 0; } if (mx >= 253 && mx <= 524 && my <= 180 && my >= 125 && congratulations == 1) { leaderboard = 1; congratulations = 0; } if (mx >= 560 && mx <= 840 && my <= 180 && my >= 125 && congratulations == 1) { exit(0); } if (mx >= 380 && mx <= 525 && my <= 208 && my >= 130 && gameOver == 1) { menupage = 1; gameOver = 0; } if (mx >= 10 && mx <= 40 && my <= 40 && my >= 10 && leaderboard == 1) { menupage = 1; leaderboard = 0; } if (mx >= 570 && mx <= 690 && my <= 208 && my >= 130 && gameOver == 1) { exit(0); } if (mx >= 10 && mx <= 40 && my >= 560 && my <= 590 && menupage == 1) { musicOn++; musicOn = musicOn % 2; if (musicOn) { PlaySound("C://cakes/bumps/funky music.wav", NULL, SND_LOOP | SND_ASYNC); } else { PlaySound(0, 0, 0); } } if (mx >= 1030 && mx <= 1090 && my <= 90 && my >= 10 && namepage == 1) { level_1 = 1; namepage = 0; } if (mx >= 150 && mx <= 950 && my >= 340 && my <= 400 && writingMode == 0) { writingMode = 1; } } if (button == GLUT_RIGHT_BUTTON && state == GLUT_DOWN) { } } void iKeyboard(unsigned char key) { if (key == 'q' && writingMode == 0) { exit(0); } else if (key == 'b' && writingMode == 0) { blueDisco = 1; redBall = 0; purpleDisco = 0; } else if (key == 'r' && writingMode == 0) { redBall = 1; blueDisco = 0; purpleDisco = 0; } else if (key == 'p' && writingMode == 0) { purpleDisco = 1; blueDisco = 0; redBall = 0; } else if (key == 'm' && writingMode == 0) { musicOn++; musicOn = musicOn % 2; if (musicOn) { PlaySound("C://cakes/bumps/funky music.wav", NULL, SND_LOOP | SND_ASYNC); } else { PlaySound(0, 0, 0); } } else if (key == 'a' && writingMode == 0) { if (level_1 == 1 && (map[(ballY / 10)][(ballX / 20) - 1] != 1)) { ballX -= dx; } else if (level_2 == 1 && (map2[(ballY / 10)][(ballX / 20) - 1] != 1)) { ballX -= dx; } } else if (key == 'd' && writingMode == 0) { if (level_1 == 1 && (map[(ballY / 10)][(ballX / 20) + 1] != 1)) { ballX += dx; } else if (level_2 == 1 && (map2[(ballY / 10)][(ballX / 20) + 1] != 1)) { ballX += dx; } } else if (key == 'w' && writingMode == 0) { if (level_1 == 1 && map[(ballY / 10) - 1][ballX / 20] == 1) { dy = 30; ballY += 10; } else if (level_2 == 1 && map2[(ballY / 10) - 1][ballX / 20] == 1) { dy = 30; ballY += 10; } } int i; if (writingMode == 1) { if (key == '\r') { writingMode = 0; strcpy(printName, nickname); printf("%s\n", printName); for (i = 0; i < len; i++) nickname[i] = 0; len = 0; backspace = 0; } else if (key == '\b') { if (len >= 0) { if (backspace == 0) len--; nickname[len] = 0; len--; backspace = 1; } } else { if (backspace == 1) len++; nickname[len] = key; len++; backspace = 0; } } } void iSpecialKeyboard(unsigned char key) { // if(key == GLUT_KEY_RIGHT){ // } // else if(key == GLUT_KEY_LEFT){ // } // else if(key == GLUT_KEY_UP && ballY == groundHeight){ // } } void menuPage() { // fp = fopen("piechart.txt", "a"); int i, j; iShowBMP(0, 0, "C://cakes/bumps/menu.bmp"); iShowBMP2(1060, 560, "C://cakes/bumps/cross.bmp", 0); // sound buttons 40, 30 if (musicOn) iShowBMP2(10, 560, "C://cakes/bumps/speaker mute.bmp", 0); else iShowBMP2(10, 560, "C://cakes/bumps/speaker on.bmp", 0); restart(); } void restart() { lives = 3; ballX = 0; ballY = 90; score = 0; blueDisco = 0; purpleDisco = 0; redBall = 1; for (int i = 0; i < 4; i++) { hoop_level1[i] = 0; } for (int i = 0; i < 3; i++) { hoop_level2[i] = 0; } for (int i = 0; i < 60; i++) { for (int j = 0; j < 55; j++) { if (map[i][j] == 5) map[i][j] = 2; if (map[i][j] == 7) map[i][j] = 6; } } for (int i = 0; i < 60; i++) { for (int j = 0; j < 55; j++) { if (map2[i][j] == 5) map2[i][j] = 2; if (map2[i][j] == 7) map2[i][j] = 6; } } } void instructionPage() { iShowBMP(0, 0, "C://cakes/bumps/instruction page.bmp"); iShowBMP2(1050, 20, "C://cakes/bumps/left arrow.bmp", 0); } void namePage() { // fp = fopen("piechart.txt", "a"); iSetColor(150, 150, 150); iText(150, 420, "Enter your nickname ^_^", GLUT_BITMAP_TIMES_ROMAN_24); if (writingMode == 1) { iSetColor(33, 94, 43); } else { iSetColor(150, 150, 150); } iRectangle(150, 340, 800, 60); if (writingMode == 1) { iSetColor(255, 255, 255); iText(155, 362, nickname, GLUT_BITMAP_HELVETICA_18); } // ball toggles iSetColor(150, 150, 150); iShowBMP2(150, 260, "C://cakes/bumps/ball_big.bmp", 0); iText(178, 264, "- Press r to get the red ball", GLUT_BITMAP_HELVETICA_18); iShowBMP2(150, 230, "C://cakes/bumps/disco ball purple.bmp", 0); iText(178, 234, "- Press p to get the purple ball", GLUT_BITMAP_HELVETICA_18); iShowBMP2(150, 200, "C://cakes/bumps/disco try.bmp", 0); iText(178, 204, "- Press b to get the blue ball", GLUT_BITMAP_HELVETICA_18); iText(150, 120, "Click on the cat to start playing!", GLUT_BITMAP_HELVETICA_18); iShowBMP2(1030, 10, "C://cakes/bumps/cat button.bmp", 0); } void levelOne() { int i = 0, j = 0; writingMode = 0; iShowBMP(0, 0, "C://cakes/bumps/sky.bmp"); for (i = 0; i < 60; i++) { for (j = 0; j < 55; j++) { if (map[i][j] == 1) { iShowBMP(j * 20, i * 10, "C://cakes/bumps/grey brick.bmp"); } if (map[i][j] == 6 && map[i + 1][j] == 6) { iShowBMP(j * 20, i * 10, coins[idlecoin]); } } } // first hoop 220, 280 if (hoop_level1[0] == 0) { iShowBMP2(220, 280, "C://cakes/bumps/full hoop.bmp", 0); } else if (hoop_level1[0] == 1) { iShowBMP2(220, 280, "C://cakes/bumps/hoop done 1.bmp", 0); } // second hoop upore alternate path e 640, 410 if (hoop_level1[1] == 0) { iShowBMP2(640, 410, "C://cakes/bumps/full hoop.bmp", 0); } else if (hoop_level1[1] == 1) { iShowBMP2(640, 410, "C://cakes/bumps/hoop done 1.bmp", 0); } // third hoop 740, 220 if (hoop_level1[2] == 0) { iShowBMP2(740, 220, "C://cakes/bumps/full hoop.bmp", 0); } else if (hoop_level1[2] == 1) { iShowBMP2(740, 220, "C://cakes/bumps/hoop done 1.bmp", 0); } // last right hoop 970, 270 if (hoop_level1[3] == 0) { iShowBMP2(970, 270, "C://cakes/bumps/full hoop.bmp", 0); } else if (hoop_level1[3] == 1) { iShowBMP2(970, 270, "C://cakes/bumps/hoop done 1.bmp", 0); } // first thorn iShowBMP2(200, 100, "C://cakes/bumps/blue thorn black bg.bmp", 0); // second thorn iShowBMP2(360, 100, "C://cakes/bumps/thorn.bmp", 0); // third thorn iShowBMP2(440, 360, "C://cakes/bumps/blue thorn black bg.bmp", 0); // fourth thorn iShowBMP2(620, 160, "C://cakes/bumps/blue thorn black bg.bmp", 0); // fifth thorn iShowBMP2(720, 100, "C://cakes/bumps/thorn.bmp", 0); // sixth thorn iShowBMP2(880, 190, "C://cakes/bumps/blue thorn black bg.bmp", 0); // finishing star 20, 20 size iShowBMP2(1060, 280, "C://cakes/bumps/star.bmp", 0); // ball if (!isPopped) { if (purpleDisco == 1) { iShowBMP2(ballX, ballY, "C://cakes/bumps/disco ball purple.bmp", 0); } else if (blueDisco == 1) { iShowBMP2(ballX, ballY, "C://cakes/bumps/disco try.bmp", 0); } else { iShowBMP2(ballX, ballY, "C://cakes/bumps/ball_big.bmp", 0); } } else { iShowBMP2(initialX, initialY, "C://cakes/bumps/ball pop.bmp", 0); } livesAndScores(); } void levelChange() { iClear(); clock_t currentTime = clock(); // printf("%d\n", currentTime); int elapsedTime = (currentTime - startTime) * 1000 / CLOCKS_PER_SEC; printf("%d\n", elapsedTime); iSetColor(255, 255, 255); iText(440, 400, "Change in progress..."); iShowBMP(420, 200, "C://cakes/bumps/two cats.bmp"); iText(440, 170, "Cattos are working hard"); iText(440, 150, "To build your new world!"); if (elapsedTime >= 4000) { level_change = 0; level_1 = 0; level_2 = 1; } } void levelTwo() { iClear(); level_change = 0; int i, j; iShowBMP(0, 0, "C://cakes/bumps/vanilla bg.bmp"); for (i = 0; i < 60; i++) { for (j = 0; j < 55; j++) { if (map2[i][j] == 1) { iShowBMP(j * 20, i * 10, "C://cakes/bumps/grey brick.bmp"); } if (map2[i][j] == 6 && map2[i + 1][j] == 6) { iShowBMP(j * 20, i * 10, "C://cakes/bumps/star cream bg.bmp"); } } } // first blue thorn iShowBMP2(20, 30, "C://cakes/bumps/blue thorn.bmp", 0); // second thorn niche iShowBMP2(240, 30, "C://cakes/bumps/cream blue thorn.bmp", 0); // third thorn upore mid layer e iShowBMP2(320, 260, "C://cakes/bumps/cream blue thorn.bmp", 0); // fourth thorn upore mid layer e iShowBMP2(480, 260, "C://cakes/bumps/cream blue thorn.bmp", 0); // fifth thorn niche iShowBMP2(700, 30, "C://cakes/bumps/cream blue thorn.bmp", 0); // sixth thorn mid layer e iShowBMP2(700, 400, "C://cakes/bumps/cream blue thorn.bmp", 0); // seventh thorn mid layer e iShowBMP2(780, 400, "C://cakes/bumps/cream blue thorn.bmp", 0); // first hoop left e 10, 170 if (hoop_level2[0] == 0) { iShowBMP2(10, 170, "C://cakes/bumps/cream hoop.bmp", 0); } else if (hoop_level2[0] == 1) { iShowBMP2(10, 170, "C://cakes/bumps/hoop done 2.bmp", 0); } // second hoop mid layer e 460, 390 if (hoop_level2[1] == 0) { iShowBMP2(460, 390, "C://cakes/bumps/cream hoop.bmp", 0); } else if (hoop_level2[1] == 1) { iShowBMP2(460, 390, "C://cakes/bumps/hoop done 2.bmp", 0); } // third hoop 820, 180 if (hoop_level2[2] == 0) { iShowBMP2(820, 180, "C://cakes/bumps/cream hoop.bmp", 0); } else if (hoop_level2[2] == 1) { iShowBMP2(820, 180, "C://cakes/bumps/hoop done 2.bmp", 0); } // my ball if (!isPopped) { if (purpleDisco == 1) { iShowBMP2(ballX, ballY, "C://cakes/bumps/disco ball purple.bmp", 0); } else if (blueDisco == 1) { iShowBMP2(ballX, ballY, "C://cakes/bumps/disco try.bmp", 0); } else { iShowBMP2(ballX, ballY, "C://cakes/bumps/ball_big.bmp", 0); } } else { iShowBMP2(initialX, initialY, "C://cakes/bumps/ball pop.bmp", 0); } livesAndScores(); } void congratulationPage() { iShowBMP(0, 0, "C://cakes/bumps/congratulations.bmp"); char displayScore[300]; sprintf(displayScore, "You scored %d points!", score); iSetColor(153, 0, 0); iText(440, 350, displayScore, GLUT_BITMAP_TIMES_ROMAN_24); iSetColor(255, 153, 51); iText(370, 310, "You've reached the end of the game!", GLUT_BITMAP_TIMES_ROMAN_24); } void leaderBoard() { // iText(100, 100, "welcome to leaderboard"); read = fopen("piechart.txt", "r"); int counter = 0; char ch; if (read == NULL) { printf("File not found\n"); return; } int i = 0; while ((ch = fgetc(read)) != EOF) { if (ch == '\n') { counter++; i++; } fscanf(read, "%d %s", &players[i].score, players[i].name); } /*for (i = 0; i < counter; i++) { printf("%s %d\n", players[i].name, players[i].score); }*/ fclose(fp); int n = 100, j, swap, max; char swapName[100]; for (i = 0; i < counter - 1; i++) { max = i; for (j = i; j < counter; j++) { if (players[j].score > players[max].score) { max = j; } } swap = players[i].score; players[i].score = players[max].score; players[max].score = swap; strcpy(swapName, players[i].name); strcpy(players[i].name, players[max].name); strcpy(players[max].name, swapName); } /*for (i = 0; i < counter; i++) { printf("%s %d\n", players[i].name, players[i].score); }*/ // leaderboard show shuru iShowBMP(0, 0, "C://cakes/bumps/starboard.bmp"); iShowBMP2(1060, 560, "C://cakes/bumps/cross.bmp", 0); iShowBMP2(10, 10, "C://cakes/bumps/home 2.bmp", 0); iSetColor(255, 255, 255); char scorecheck[150]; for (i = 0; i < 5; i++) { sprintf(scorecheck, "%d. %s - %d", i + 1, players[i].name, players[i].score); iText(270, 400 - i * 62, scorecheck); } for (i = 5; i < 10; i++) { sprintf(scorecheck, "%d. %s - %d", i + 1, players[i].name, players[i].score); iText(600, 400 - (i - 5) * 62, scorecheck); } } void gameOverPage() { iShowBMP(0, 0, "C://cakes/bumps/game over.bmp"); } void livesAndScores() { int livesX, livesY; if (lives == 0) { gameOver = 1; level_1 = 0; level_2 = 0; fclose(fp); } for (int i = 0; i < lives; i++) { if (level_1 == 1) { livesX = 1030; livesY = 500; iSetColor(212, 229, 249); iFilledCircle(livesX + i * 25, livesY, 10, 100); } else if (level_2 == 1) { livesX = 1010; livesY = 550; iSetColor(100, 100, 100); iFilledCircle(livesX + i * 25, livesY, 10, 100); } } char scoreText[50]; sprintf(scoreText, "Score: %d", score); if (level_1 == 1) { iText(1010, 460, scoreText); } else if (level_2 == 1) { iSetColor(50, 50, 50); iText(990, 460, scoreText); } } void showCoinAnimation() { // change the animations for (int i = 0; i < 9; i++) { sprintf(coins[i], "C://cakes/bumps/coins/coins%d.bmp", i); } } void updateCoin() { idlecoin = (idlecoin + 1) % 9; } void ballPosition() { int x = ballX / 20; int y = ballY / 10; if (ballX <= 0) { ballX = 0; } if (ballX >= 1090) { ballX = 1060; } if (level_1 == 1) { if (map[ballY / 10 - 1][ballX / 20] != 1) { dy -= gravity; ballY += dy; } else if (map[ballY / 10 - 1][x] == 1 && (ballY % 10) != 0) { int p = ballY % 10; ballY -= p; } else if (map[y - 1][ballX / 20] == 1) { dy = 0; if (map[ballY / 10][ballX / 20] == 1) { ballY = 10 * (y + 1); } } if (map[(ballY / 10) + 3][ballX / 20] == 1) { dy = -10; } // score points start now; if (map[ballY / 10][ballX / 20] == 2) { if (ballX / 20 == 11) hoop_level1[0] = 1; if (ballX / 20 == 32) hoop_level1[1] = 1; if (ballX / 20 == 37) hoop_level1[2] = 1; if (ballX / 20 == 49) hoop_level1[3] = 1; for (int i = 0; i <= 3; i++) { if (map[ballY / 10 + i][ballX / 20] == 2) map[ballY / 10 + i][ballX / 20] = 5; if (map[ballY / 10 - i][ballX / 20] == 2) map[ballY / 10 - i][ballX / 20] = 5; } // map[ballY / 10][ballX / 20] = 5; score += 40; } // coins 6 - changed to 7 if (map[ballY / 10][ballX / 20] == 6) { for (int i = 0; i <= 1; i++) { if (map[ballY / 10 + i][ballX / 20] == 6) map[ballY / 10 + i][ballX / 20] = 7; if (map[ballY / 10 - i][ballX / 20] == 6) map[ballY / 10 - i][ballX / 20] = 7; } score += 10; } // star e gele level change if (map[ballY / 10][ballX / 20] == 8 && level_1 == 1) { startTime = clock(); level_1 = 0; level_change = 1; ballX = 20; ballY = 490; lives = 3; } } else if (level_2 == 1) { if (map2[ballY / 10 - 1][ballX / 20] != 1) { dy -= gravity; ballY += dy; } else if (map2[ballY / 10 - 1][x] == 1 && (ballY % 10) != 0) { int p = ballY % 10; ballY -= p; } else if (map2[y - 1][ballX / 20] == 1) { dy = 0; if (map2[ballY / 10][ballX / 20] == 1) { ballY = 10 * (y + 1); } } if (map2[(ballY / 10) + 3][ballX / 20] == 1) { dy = -10; } // score points start now; if (map2[ballY / 10][ballX / 20] == 2) { if (ballX / 20 == 0) hoop_level2[0] = 1; if (ballX / 20 == 23) hoop_level2[1] = 1; if (ballX / 20 == 41) hoop_level2[2] = 1; for (int i = 0; i <= 3; i++) { if (map2[ballY / 10 + i][ballX / 20] == 2) map2[ballY / 10 + i][ballX / 20] = 5; if (map2[ballY / 10 - i][ballX / 20] == 2) map2[ballY / 10 - i][ballX / 20] = 5; } score += 40; } // coins 6 - changed to 7 if (map2[ballY / 10][ballX / 20] == 6) { for (int i = 0; i <= 1; i++) { if (map2[ballY / 10 + i][ballX / 20] == 6) map2[ballY / 10 + i][ballX / 20] = 7; if (map2[ballY / 10 - i][ballX / 20] == 6) map2[ballY / 10 - i][ballX / 20] = 7; } score += 10; } // last hoop e ashle congratulations page displayed hobe 10, 170 if (ballX <= 10 && ballY == 170) { fprintf(fp, "%d %s\n", score, printName); fclose(fp); level_2 = 0; congratulations = 1; } } } void thornChecker() { if (level_1 == 1) { // first thorn 200, 100 if ((ballX > 180 && ballX <= 210) && (ballY >= 100 && ballY <= 150)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 140; ballY = 180; } // second thorn 360, 100 if ((ballX > 340 && ballX <= 370) && (ballY >= 100 && ballY <= 150)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 300; ballY = 270; } // third thorn 440, 360 if ((ballX > 420 && ballX <= 450) && (ballY >= 360 && ballY <= 410)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 280; ballY = 270; } // fourth thorn 620, 160 if ((ballX > 600 && ballX <= 630) && (ballY >= 160 && ballY <= 210)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 480; ballY = 160; } // fifth thorn 720, 100 if ((ballX > 700 && ballX <= 730) && (ballY >= 100 && ballY <= 150)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 680; ballY = 160; } // sixth thorn 880, 190 if ((ballX > 860 && ballX <= 890) && (ballY >= 190 && ballY <= 240)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 780; ballY = 100; } } else if (level_2 == 1) { // first blue thorn 20, 30 if ((ballX > 0 && ballX <= 40) && (ballY >= 30 && ballY <= 80)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 100; ballY = 30; } // second thorn niche 240, 30 if ((ballX > 220 && ballX <= 250) && (ballY >= 30 && ballY <= 80)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 260; ballY = 150; } // third thorn upore mid layer e 320, 260 if ((ballX > 300 && ballX <= 330) && (ballY >= 260 && ballY <= 310)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 360; ballY = 350; } // fourth thorn upore mid layer e 480, 260 if ((ballX > 460 && ballX <= 490) && (ballY >= 260 && ballY <= 310)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 460; ballY = 490; } // fifth thorn niche 700, 30 if ((ballX > 680 && ballX <= 710) && (ballY >= 30 && ballY <= 80)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 660; ballY = 360; } // sixth thorn mid layer e 700, 400 if ((ballX > 680 && ballX <= 710) && (ballY >= 400 && ballY <= 430)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 460; ballY = 490; } // seventh thorn mid layer 780, 400 if ((ballX > 760 && ballX <= 790) && (ballY >= 400 && ballY <= 430)) { lives--; initialX = ballX; initialY = ballY; isPopped = 1; iPauseTimer(1); iSetTimer(1500, pauseScreen); score -= 5; ballX = 1060; ballY = 400; } } } int main() { showCoinAnimation(); iSetTimer(1, ballPosition); iSetTimer(1, thornChecker); iSetTimer(30, updateCoin); if (musicOn) { PlaySound("C://cakes/bumps/funky music.wav", NULL, SND_LOOP | SND_ASYNC); } iInitialize(screenWidth, screenHeight, "hi"); return 0; } void pauseScreen() { isPopped = 0; iPauseTimer(1); iResumeTimer(1); }
Editor is loading...
Leave a Comment