Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Snooping through the files now are we?
- // Compile With: g++ main.cpp loadImage.h playSound.h -lSDL2 -lSDL2_image -lSDL2_mixer -Wall -o "Butter Game"
- #include <SDL2/SDL.h>
- #include <SDL2/SDL_image.h>
- #include <iostream>
- SDL_Texture* imageSlot1;
- SDL_Texture* imageSlot2;
- SDL_Texture* imageSlot3;
- SDL_Texture* imageSlot4;
- SDL_Texture* imageSlot5;
- SDL_Texture* imageSlot6;
- SDL_Texture* imageSlot7;
- SDL_Texture* imageSlot8;
- SDL_Texture* imageSlot9;
- SDL_Texture* imageSlot10;
- SDL_Rect imageRect1;
- SDL_Rect imageRect2;
- SDL_Rect imageRect3;
- SDL_Rect imageRect4;
- SDL_Rect imageRect5;
- SDL_Rect imageRect6;
- SDL_Rect imageRect7;
- SDL_Rect imageRect8;
- SDL_Rect imageRect9;
- SDL_Rect imageRect10;
- SDL_Rect* hitbox1;
- SDL_Rect* hitbox2;
- SDL_Rect* hitbox3;
- SDL_Rect* hitbox4;
- SDL_Rect* hitbox5;
- SDL_Rect* hitbox6;
- SDL_Rect* hitbox7;
- SDL_Rect* hitbox8;
- SDL_Rect* hitbox9;
- SDL_Rect* hitbox10;
- SDL_Rect* hitbox11;
- SDL_Rect* hitbox12;
- SDL_Rect* hitbox13;
- SDL_Rect* hitbox14;
- SDL_Rect* hitbox15;
- SDL_Rect* hitbox16;
- SDL_Rect* hitbox17;
- SDL_Rect* hitbox18;
- SDL_Rect* hitbox19;
- SDL_Rect* hitbox20;
- int hitboxIndex = 1;
- int imageIndex = 1;
- extern SDL_Renderer* renderer;
- extern void deleteButtons();
- int loadImage(const char* path, int posX, int posY, int sizeX, int sizeY)
- {
- if(imageIndex > 10)
- {
- imageIndex = 1;
- }
- switch(imageIndex)
- {
- case 1:
- imageRect1.x = posX;
- imageRect1.y = posY;
- imageRect1.w = sizeX;
- imageRect1.h = sizeY;
- SDL_Surface* surface1;
- surface1 = IMG_Load(path);
- imageSlot1 = SDL_CreateTextureFromSurface(renderer, surface1);
- SDL_FreeSurface(surface1);
- imageIndex++;
- std::cout << "imageIndex 1 loaded." << std::endl;
- break;
- case 2:
- imageRect2.x = posX;
- imageRect2.y = posY;
- imageRect2.w = sizeX;
- imageRect2.h = sizeY;
- SDL_Surface* surface2;
- surface2 = IMG_Load(path);
- imageSlot2 = SDL_CreateTextureFromSurface(renderer, surface2);
- SDL_FreeSurface(surface2);
- imageIndex++;
- std::cout << "imageIndex 2 loaded." << std::endl;
- break;
- case 3:
- imageRect3.x = posX;
- imageRect3.y = posY;
- imageRect3.w = sizeX;
- imageRect3.h = sizeY;
- SDL_Surface* surface3;
- surface3 = IMG_Load(path);
- imageSlot3 = SDL_CreateTextureFromSurface(renderer, surface3);
- SDL_FreeSurface(surface3);
- imageIndex++;
- std::cout << "imageIndex 3 loaded." << std::endl;
- break;
- case 4:
- imageRect4.x = posX;
- imageRect4.y = posY;
- imageRect4.w = sizeX;
- imageRect4.h = sizeY;
- SDL_Surface* surface4;
- surface4 = IMG_Load(path);
- imageSlot4 = SDL_CreateTextureFromSurface(renderer, surface4);
- SDL_FreeSurface(surface4);
- imageIndex++;
- std::cout << "imageIndex 4 loaded." << std::endl;
- break;
- case 5:
- imageRect5.x = posX;
- imageRect5.y = posY;
- imageRect5.w = sizeX;
- imageRect5.h = sizeY;
- SDL_Surface* surface5;
- surface5 = IMG_Load(path);
- imageSlot5 = SDL_CreateTextureFromSurface(renderer, surface5);
- SDL_FreeSurface(surface5);
- imageIndex++;
- std::cout << "imageIndex 5 loaded." << std::endl;
- break;
- case 6:
- imageRect6.x = posX;
- imageRect6.y = posY;
- imageRect6.w = sizeX;
- imageRect6.h = sizeY;
- SDL_Surface* surface6;
- surface6 = IMG_Load(path);
- imageSlot6 = SDL_CreateTextureFromSurface(renderer, surface6);
- SDL_FreeSurface(surface6);
- imageIndex++;
- std::cout << "imageIndex 6 loaded." << std::endl;
- break;
- case 7:
- imageRect7.x = posX;
- imageRect7.y = posY;
- imageRect7.w = sizeX;
- imageRect7.h = sizeY;
- SDL_Surface* surface7;
- surface7 = IMG_Load(path);
- imageSlot7 = SDL_CreateTextureFromSurface(renderer, surface7);
- SDL_FreeSurface(surface7);
- imageIndex++;
- std::cout << "imageIndex 7 loaded." << std::endl;
- break;
- case 8:
- imageRect8.x = posX;
- imageRect8.y = posY;
- imageRect8.w = sizeX;
- imageRect8.h = sizeY;
- SDL_Surface* surface8;
- surface8 = IMG_Load(path);
- imageSlot8 = SDL_CreateTextureFromSurface(renderer, surface8);
- SDL_FreeSurface(surface8);
- imageIndex++;
- std::cout << "imageIndex 8 loaded." << std::endl;
- break;
- case 9:
- imageRect9.x = posX;
- imageRect9.y = posY;
- imageRect9.w = sizeX;
- imageRect9.h = sizeY;
- SDL_Surface* surface9;
- surface9 = IMG_Load(path);
- imageSlot9 = SDL_CreateTextureFromSurface(renderer, surface9);
- SDL_FreeSurface(surface9);
- imageIndex++;
- std::cout << "imageIndex 9 loaded." << std::endl;
- break;
- case 10:
- imageRect10.x = posX;
- imageRect10.y = posY;
- imageRect10.w = sizeX;
- imageRect10.h = sizeY;
- SDL_Surface* surface10;
- surface10 = IMG_Load(path);
- imageSlot10 = SDL_CreateTextureFromSurface(renderer, surface10);
- SDL_FreeSurface(surface10);
- imageIndex++;
- std::cout << "imageIndex 10 loaded." << std::endl;
- break;
- }
- return imageIndex;
- }
- void loadSpecificImageSlot(const char* path, int posX, int posY, int sizeX, int sizeY, int imageSlot)
- {
- switch(imageSlot)
- {
- case 1:
- imageRect1.x = posX;
- imageRect1.y = posY;
- imageRect1.w = sizeX;
- imageRect1.h = sizeY;
- SDL_Surface* surface1;
- surface1 = IMG_Load(path);
- imageSlot1 = SDL_CreateTextureFromSurface(renderer, surface1);
- SDL_FreeSurface(surface1);
- imageIndex++;
- break;
- case 2:
- imageRect2.x = posX;
- imageRect2.y = posY;
- imageRect2.w = sizeX;
- imageRect2.h = sizeY;
- SDL_Surface* surface2;
- surface2 = IMG_Load(path);
- imageSlot2 = SDL_CreateTextureFromSurface(renderer, surface2);
- SDL_FreeSurface(surface2);
- imageIndex++;
- break;
- case 3:
- imageRect3.x = posX;
- imageRect3.y = posY;
- imageRect3.w = sizeX;
- imageRect3.h = sizeY;
- SDL_Surface* surface3;
- surface3 = IMG_Load(path);
- imageSlot3 = SDL_CreateTextureFromSurface(renderer, surface3);
- SDL_FreeSurface(surface3);
- imageIndex++;
- break;
- case 4:
- imageRect4.x = posX;
- imageRect4.y = posY;
- imageRect4.w = sizeX;
- imageRect4.h = sizeY;
- SDL_Surface* surface4;
- surface4 = IMG_Load(path);
- imageSlot4 = SDL_CreateTextureFromSurface(renderer, surface4);
- SDL_FreeSurface(surface4);
- imageIndex++;
- break;
- case 5:
- imageRect5.x = posX;
- imageRect5.y = posY;
- imageRect5.w = sizeX;
- imageRect5.h = sizeY;
- SDL_Surface* surface5;
- surface5 = IMG_Load(path);
- imageSlot5 = SDL_CreateTextureFromSurface(renderer, surface5);
- SDL_FreeSurface(surface5);
- imageIndex++;
- break;
- case 6:
- imageRect6.x = posX;
- imageRect6.y = posY;
- imageRect6.w = sizeX;
- imageRect6.h = sizeY;
- SDL_Surface* surface6;
- surface6 = IMG_Load(path);
- imageSlot6 = SDL_CreateTextureFromSurface(renderer, surface6);
- SDL_FreeSurface(surface6);
- imageIndex++;
- break;
- case 7:
- imageRect7.x = posX;
- imageRect7.y = posY;
- imageRect7.w = sizeX;
- imageRect7.h = sizeY;
- SDL_Surface* surface7;
- surface7 = IMG_Load(path);
- imageSlot7 = SDL_CreateTextureFromSurface(renderer, surface7);
- SDL_FreeSurface(surface7);
- imageIndex++;
- break;
- case 8:
- imageRect8.x = posX;
- imageRect8.y = posY;
- imageRect8.w = sizeX;
- imageRect8.h = sizeY;
- SDL_Surface* surface8;
- surface8 = IMG_Load(path);
- imageSlot8 = SDL_CreateTextureFromSurface(renderer, surface8);
- SDL_FreeSurface(surface8);
- imageIndex++;
- break;
- case 9:
- imageRect9.x = posX;
- imageRect9.y = posY;
- imageRect9.w = sizeX;
- imageRect9.h = sizeY;
- SDL_Surface* surface9;
- surface9 = IMG_Load(path);
- imageSlot9 = SDL_CreateTextureFromSurface(renderer, surface9);
- SDL_FreeSurface(surface9);
- imageIndex++;
- break;
- case 10:
- imageRect10.x = posX;
- imageRect10.y = posY;
- imageRect10.w = sizeX;
- imageRect10.h = sizeY;
- SDL_Surface* surface10;
- surface10 = IMG_Load(path);
- imageSlot10 = SDL_CreateTextureFromSurface(renderer, surface10);
- SDL_FreeSurface(surface10);
- imageIndex++;
- break;
- }
- }
- void freeImageSlot(int imageSlot)
- {
- switch(imageSlot)
- {
- case 1:
- SDL_DestroyTexture(imageSlot1);
- break;
- case 2:
- SDL_DestroyTexture(imageSlot2);
- break;
- case 3:
- SDL_DestroyTexture(imageSlot3);
- break;
- case 4:
- SDL_DestroyTexture(imageSlot4);
- break;
- case 5:
- SDL_DestroyTexture(imageSlot5);
- break;
- case 6:
- SDL_DestroyTexture(imageSlot6);
- break;
- case 7:
- SDL_DestroyTexture(imageSlot7);
- break;
- case 8:
- SDL_DestroyTexture(imageSlot8);
- break;
- case 9:
- SDL_DestroyTexture(imageSlot9);
- break;
- case 10:
- SDL_DestroyTexture(imageSlot10);
- break;
- }
- }
- void createHitbox(int posX, int posY, int width, int height)
- {
- switch(hitboxIndex)
- {
- case 1:
- hitbox1->x = posX;
- hitbox1->y = posY;
- hitbox1->w = width;
- hitbox1->h = height;
- break;
- case 2:
- hitbox2->x = posX;
- hitbox2->y = posY;
- hitbox2->w = width;
- hitbox2->h = height;
- break;
- case 3:
- hitbox3->x = posX;
- hitbox3->y = posY;
- hitbox3->w = width;
- hitbox1->h = height;
- break;
- case 4:
- hitbox4->x = posX;
- hitbox4->y = posY;
- hitbox4->w = width;
- hitbox4->h = height;
- break;
- case 5:
- hitbox5->x = posX;
- hitbox5->y = posY;
- hitbox5->w = width;
- hitbox5->h = height;
- break;
- case 6:
- hitbox6->x = posX;
- hitbox6->y = posY;
- hitbox6->w = width;
- hitbox6->h = height;
- break;
- case 7:
- hitbox7->x = posX;
- hitbox7->y = posY;
- hitbox7->w = width;
- hitbox7->h = height;
- break;
- case 8:
- hitbox8->x = posX;
- hitbox8->y = posY;
- hitbox8->w = width;
- hitbox8->h = height;
- break;
- case 9:
- hitbox9->x = posX;
- hitbox9->y = posY;
- hitbox9->w = width;
- hitbox9->h = height;
- hitbox9->h = height;
- break;
- case 10:
- hitbox10->x = posX;
- hitbox10->y = posY;
- hitbox10->w = width;
- hitbox10->h = height;
- break;
- case 11:
- hitbox11->x = posX;
- hitbox11->y = posY;
- hitbox11->w = width;
- hitbox11->h = height;
- break;
- case 12:
- hitbox12->x = posX;
- hitbox12->y = posY;
- hitbox12->w = width;
- hitbox12->h = height;
- break;
- case 13:
- hitbox13->x = posX;
- hitbox13->y = posY;
- hitbox13->w = width;
- hitbox13->h = height;
- break;
- case 14:
- hitbox14->x = posX;
- hitbox14->y = posY;
- hitbox14->w = width;
- hitbox14->h = height;
- break;
- case 15:
- hitbox15->x = posX;
- hitbox15->y = posY;
- hitbox15->w = width;
- hitbox15->h = height;
- break;
- case 16:
- hitbox16->x = posX;
- hitbox16->y = posY;
- hitbox16->w = width;
- hitbox16->h = height;
- break;
- case 17:
- hitbox17->x = posX;
- hitbox17->y = posY;
- hitbox17->w = width;
- hitbox17->h = height;
- break;
- case 18:
- hitbox18->x = posX;
- hitbox18->y = posY;
- hitbox18->w = width;
- hitbox18->h = height;
- break;
- case 19:
- hitbox19->x = posX;
- hitbox19->y = posY;
- hitbox19->w = width;
- hitbox19->h = height;
- break;
- case 20:
- hitbox20->x = posX;
- hitbox20->y = posY;
- hitbox20->w = width;
- hitbox20->h = height;
- break;
- }
- }
- void moveHitbox(SDL_Rect* hitbox, int X, int Y)
- {
- hitbox->x += X;
- hitbox->y += Y;
- }
- int proccessHitboxes()
- {
- if(SDL_HasIntersection(hitbox1, hitbox2) == true){return 12;}
- if(SDL_HasIntersection(hitbox1, hitbox3) == true){return 13;}
- if(SDL_HasIntersection(hitbox1, hitbox4) == true){return 14;}
- if(SDL_HasIntersection(hitbox1, hitbox5) == true){return 15;}
- if(SDL_HasIntersection(hitbox1, hitbox6) == true){return 16;}
- if(SDL_HasIntersection(hitbox1, hitbox7) == true){return 17;}
- if(SDL_HasIntersection(hitbox1, hitbox8) == true){return 18;}
- if(SDL_HasIntersection(hitbox1, hitbox9) == true){return 19;}
- if(SDL_HasIntersection(hitbox1, hitbox10) == true){return 110;}
- if(SDL_HasIntersection(hitbox1, hitbox11) == true){return 111;}
- if(SDL_HasIntersection(hitbox1, hitbox12) == true){return 112;}
- if(SDL_HasIntersection(hitbox1, hitbox13) == true){return 113;}
- if(SDL_HasIntersection(hitbox1, hitbox14) == true){return 114;}
- if(SDL_HasIntersection(hitbox1, hitbox15) == true){return 115;}
- if(SDL_HasIntersection(hitbox1, hitbox16) == true){return 116;}
- if(SDL_HasIntersection(hitbox1, hitbox17) == true){return 117;}
- if(SDL_HasIntersection(hitbox1, hitbox18) == true){return 118;}
- if(SDL_HasIntersection(hitbox1, hitbox19) == true){return 119;}
- if(SDL_HasIntersection(hitbox1, hitbox20) == true){return 120;}
- if(SDL_HasIntersection(hitbox2, hitbox3) == true){return 23;}
- if(SDL_HasIntersection(hitbox2, hitbox4) == true){return 24;}
- if(SDL_HasIntersection(hitbox2, hitbox5) == true){return 25;}
- if(SDL_HasIntersection(hitbox2, hitbox6) == true){return 26;}
- if(SDL_HasIntersection(hitbox2, hitbox7) == true){return 27;}
- if(SDL_HasIntersection(hitbox2, hitbox8) == true){return 28;}
- if(SDL_HasIntersection(hitbox2, hitbox9) == true){return 29;}
- if(SDL_HasIntersection(hitbox2, hitbox10) == true){return 210;}
- if(SDL_HasIntersection(hitbox2, hitbox11) == true){return 211;}
- if(SDL_HasIntersection(hitbox2, hitbox12) == true){return 212;}
- if(SDL_HasIntersection(hitbox2, hitbox13) == true){return 213;}
- if(SDL_HasIntersection(hitbox2, hitbox14) == true){return 214;}
- if(SDL_HasIntersection(hitbox2, hitbox15) == true){return 215;}
- if(SDL_HasIntersection(hitbox2, hitbox16) == true){return 216;}
- if(SDL_HasIntersection(hitbox2, hitbox17) == true){return 217;}
- if(SDL_HasIntersection(hitbox2, hitbox18) == true){return 218;}
- if(SDL_HasIntersection(hitbox2, hitbox19) == true){return 219;}
- if(SDL_HasIntersection(hitbox2, hitbox20) == true){return 220;}
- if(SDL_HasIntersection(hitbox3, hitbox4) == true){return 34;}
- if(SDL_HasIntersection(hitbox3, hitbox5) == true){return 35;}
- if(SDL_HasIntersection(hitbox3, hitbox6) == true){return 36;}
- if(SDL_HasIntersection(hitbox3, hitbox7) == true){return 37;}
- if(SDL_HasIntersection(hitbox3, hitbox8) == true){return 38;}
- if(SDL_HasIntersection(hitbox3, hitbox9) == true){return 39;}
- if(SDL_HasIntersection(hitbox3, hitbox10) == true){return 310;}
- if(SDL_HasIntersection(hitbox3, hitbox11) == true){return 311;}
- if(SDL_HasIntersection(hitbox3, hitbox12) == true){return 312;}
- if(SDL_HasIntersection(hitbox3, hitbox13) == true){return 313;}
- if(SDL_HasIntersection(hitbox3, hitbox14) == true){return 314;}
- if(SDL_HasIntersection(hitbox3, hitbox15) == true){return 315;}
- if(SDL_HasIntersection(hitbox3, hitbox16) == true){return 316;}
- if(SDL_HasIntersection(hitbox3, hitbox17) == true){return 317;}
- if(SDL_HasIntersection(hitbox3, hitbox18) == true){return 318;}
- if(SDL_HasIntersection(hitbox3, hitbox19) == true){return 319;}
- if(SDL_HasIntersection(hitbox3, hitbox20) == true){return 320;}
- if(SDL_HasIntersection(hitbox4, hitbox5) == true){return 45;}
- if(SDL_HasIntersection(hitbox4, hitbox6) == true){return 46;}
- if(SDL_HasIntersection(hitbox4, hitbox7) == true){return 47;}
- if(SDL_HasIntersection(hitbox4, hitbox8) == true){return 48;}
- if(SDL_HasIntersection(hitbox4, hitbox9) == true){return 49;}
- if(SDL_HasIntersection(hitbox4, hitbox10) == true){return 410;}
- if(SDL_HasIntersection(hitbox4, hitbox11) == true){return 411;}
- if(SDL_HasIntersection(hitbox4, hitbox12) == true){return 412;}
- if(SDL_HasIntersection(hitbox4, hitbox13) == true){return 413;}
- if(SDL_HasIntersection(hitbox4, hitbox14) == true){return 414;}
- if(SDL_HasIntersection(hitbox4, hitbox15) == true){return 415;}
- if(SDL_HasIntersection(hitbox4, hitbox16) == true){return 416;}
- if(SDL_HasIntersection(hitbox4, hitbox17) == true){return 417;}
- if(SDL_HasIntersection(hitbox4, hitbox18) == true){return 418;}
- if(SDL_HasIntersection(hitbox4, hitbox19) == true){return 419;}
- if(SDL_HasIntersection(hitbox4, hitbox20) == true){return 420;}
- if(SDL_HasIntersection(hitbox5, hitbox6) == true){return 56;}
- if(SDL_HasIntersection(hitbox5, hitbox7) == true){return 57;}
- if(SDL_HasIntersection(hitbox5, hitbox8) == true){return 58;}
- if(SDL_HasIntersection(hitbox5, hitbox9) == true){return 59;}
- if(SDL_HasIntersection(hitbox5, hitbox10) == true){return 510;}
- if(SDL_HasIntersection(hitbox5, hitbox11) == true){return 511;}
- if(SDL_HasIntersection(hitbox5, hitbox12) == true){return 512;}
- if(SDL_HasIntersection(hitbox5, hitbox13) == true){return 513;}
- if(SDL_HasIntersection(hitbox5, hitbox14) == true){return 514;}
- if(SDL_HasIntersection(hitbox5, hitbox15) == true){return 515;}
- if(SDL_HasIntersection(hitbox5, hitbox16) == true){return 516;}
- if(SDL_HasIntersection(hitbox5, hitbox17) == true){return 517;}
- if(SDL_HasIntersection(hitbox5, hitbox18) == true){return 518;}
- if(SDL_HasIntersection(hitbox5, hitbox19) == true){return 519;}
- if(SDL_HasIntersection(hitbox5, hitbox20) == true){return 520;}
- if(SDL_HasIntersection(hitbox6, hitbox7) == true){return 67;}
- if(SDL_HasIntersection(hitbox6, hitbox8) == true){return 68;}
- if(SDL_HasIntersection(hitbox6, hitbox9) == true){return 69;} // NICE
- if(SDL_HasIntersection(hitbox6, hitbox10) == true){return 610;}
- if(SDL_HasIntersection(hitbox6, hitbox11) == true){return 611;}
- if(SDL_HasIntersection(hitbox6, hitbox12) == true){return 612;}
- if(SDL_HasIntersection(hitbox6, hitbox13) == true){return 613;}
- if(SDL_HasIntersection(hitbox6, hitbox14) == true){return 614;}
- if(SDL_HasIntersection(hitbox6, hitbox15) == true){return 615;}
- if(SDL_HasIntersection(hitbox6, hitbox16) == true){return 616;}
- if(SDL_HasIntersection(hitbox6, hitbox17) == true){return 617;}
- if(SDL_HasIntersection(hitbox6, hitbox18) == true){return 618;}
- if(SDL_HasIntersection(hitbox6, hitbox19) == true){return 619;}
- if(SDL_HasIntersection(hitbox6, hitbox20) == true){return 620;}
- if(SDL_HasIntersection(hitbox7, hitbox8) == true){return 78;}
- if(SDL_HasIntersection(hitbox7, hitbox9) == true){return 79;}
- if(SDL_HasIntersection(hitbox7, hitbox10) == true){return 710;}
- if(SDL_HasIntersection(hitbox7, hitbox11) == true){return 711;}
- if(SDL_HasIntersection(hitbox7, hitbox12) == true){return 712;}
- if(SDL_HasIntersection(hitbox7, hitbox13) == true){return 713;}
- if(SDL_HasIntersection(hitbox7, hitbox14) == true){return 714;}
- if(SDL_HasIntersection(hitbox7, hitbox15) == true){return 715;}
- if(SDL_HasIntersection(hitbox7, hitbox16) == true){return 716;}
- if(SDL_HasIntersection(hitbox7, hitbox17) == true){return 717;}
- if(SDL_HasIntersection(hitbox7, hitbox18) == true){return 718;}
- if(SDL_HasIntersection(hitbox7, hitbox19) == true){return 719;}
- if(SDL_HasIntersection(hitbox7, hitbox20) == true){return 720;}
- if(SDL_HasIntersection(hitbox8, hitbox9) == true){return 89;}
- if(SDL_HasIntersection(hitbox8, hitbox10) == true){return 810;}
- if(SDL_HasIntersection(hitbox8, hitbox11) == true){return 811;}
- if(SDL_HasIntersection(hitbox8, hitbox12) == true){return 812;}
- if(SDL_HasIntersection(hitbox8, hitbox13) == true){return 813;}
- if(SDL_HasIntersection(hitbox8, hitbox14) == true){return 814;}
- if(SDL_HasIntersection(hitbox8, hitbox15) == true){return 815;}
- if(SDL_HasIntersection(hitbox8, hitbox16) == true){return 816;}
- if(SDL_HasIntersection(hitbox8, hitbox17) == true){return 817;}
- if(SDL_HasIntersection(hitbox8, hitbox18) == true){return 818;}
- if(SDL_HasIntersection(hitbox8, hitbox19) == true){return 819;}
- if(SDL_HasIntersection(hitbox8, hitbox20) == true){return 820;}
- if(SDL_HasIntersection(hitbox9, hitbox10) == true){return 910;}
- if(SDL_HasIntersection(hitbox9, hitbox11) == true){return 911;}
- if(SDL_HasIntersection(hitbox9, hitbox12) == true){return 912;}
- if(SDL_HasIntersection(hitbox9, hitbox13) == true){return 913;}
- if(SDL_HasIntersection(hitbox9, hitbox14) == true){return 914;}
- if(SDL_HasIntersection(hitbox9, hitbox15) == true){return 915;}
- if(SDL_HasIntersection(hitbox9, hitbox16) == true){return 916;}
- if(SDL_HasIntersection(hitbox9, hitbox17) == true){return 917;}
- if(SDL_HasIntersection(hitbox9, hitbox18) == true){return 918;}
- if(SDL_HasIntersection(hitbox9, hitbox19) == true){return 919;}
- if(SDL_HasIntersection(hitbox9, hitbox20) == true){return 920;}
- if(SDL_HasIntersection(hitbox10, hitbox11) == true){return 1011;}
- if(SDL_HasIntersection(hitbox10, hitbox12) == true){return 1012;}
- if(SDL_HasIntersection(hitbox10, hitbox13) == true){return 1013;}
- if(SDL_HasIntersection(hitbox10, hitbox14) == true){return 1014;}
- if(SDL_HasIntersection(hitbox10, hitbox15) == true){return 1015;}
- if(SDL_HasIntersection(hitbox10, hitbox16) == true){return 1016;}
- if(SDL_HasIntersection(hitbox10, hitbox17) == true){return 1017;}
- if(SDL_HasIntersection(hitbox10, hitbox18) == true){return 1018;}
- if(SDL_HasIntersection(hitbox10, hitbox19) == true){return 1019;}
- if(SDL_HasIntersection(hitbox10, hitbox20) == true){return 1020;}
- if(SDL_HasIntersection(hitbox11, hitbox12) == true){return 1112;}
- if(SDL_HasIntersection(hitbox11, hitbox13) == true){return 1113;}
- if(SDL_HasIntersection(hitbox11, hitbox14) == true){return 1114;}
- if(SDL_HasIntersection(hitbox11, hitbox15) == true){return 1115;}
- if(SDL_HasIntersection(hitbox11, hitbox16) == true){return 1116;}
- if(SDL_HasIntersection(hitbox11, hitbox17) == true){return 1117;}
- if(SDL_HasIntersection(hitbox11, hitbox18) == true){return 1118;}
- if(SDL_HasIntersection(hitbox11, hitbox19) == true){return 1119;}
- if(SDL_HasIntersection(hitbox11, hitbox20) == true){return 1120;}
- if(SDL_HasIntersection(hitbox12, hitbox13) == true){return 1213;}
- if(SDL_HasIntersection(hitbox12, hitbox14) == true){return 1214;}
- if(SDL_HasIntersection(hitbox12, hitbox15) == true){return 1215;}
- if(SDL_HasIntersection(hitbox12, hitbox16) == true){return 1216;}
- if(SDL_HasIntersection(hitbox12, hitbox17) == true){return 1217;}
- if(SDL_HasIntersection(hitbox12, hitbox18) == true){return 1218;}
- if(SDL_HasIntersection(hitbox12, hitbox19) == true){return 1219;}
- if(SDL_HasIntersection(hitbox12, hitbox20) == true){return 1220;}
- if(SDL_HasIntersection(hitbox13, hitbox14) == true){return 1314;}
- if(SDL_HasIntersection(hitbox13, hitbox15) == true){return 1315;}
- if(SDL_HasIntersection(hitbox13, hitbox16) == true){return 1316;}
- if(SDL_HasIntersection(hitbox13, hitbox17) == true){return 1317;}
- if(SDL_HasIntersection(hitbox13, hitbox18) == true){return 1318;}
- if(SDL_HasIntersection(hitbox13, hitbox19) == true){return 1319;}
- if(SDL_HasIntersection(hitbox13, hitbox20) == true){return 1320;}
- if(SDL_HasIntersection(hitbox14, hitbox15) == true){return 1415;}
- if(SDL_HasIntersection(hitbox14, hitbox16) == true){return 1416;}
- if(SDL_HasIntersection(hitbox14, hitbox17) == true){return 1417;}
- if(SDL_HasIntersection(hitbox14, hitbox18) == true){return 1418;}
- if(SDL_HasIntersection(hitbox14, hitbox19) == true){return 1419;}
- if(SDL_HasIntersection(hitbox14, hitbox20) == true){return 1420;}
- if(SDL_HasIntersection(hitbox15, hitbox16) == true){return 1516;}
- if(SDL_HasIntersection(hitbox15, hitbox17) == true){return 1517;}
- if(SDL_HasIntersection(hitbox15, hitbox18) == true){return 1518;}
- if(SDL_HasIntersection(hitbox15, hitbox19) == true){return 1519;}
- if(SDL_HasIntersection(hitbox15, hitbox20) == true){return 1520;}
- if(SDL_HasIntersection(hitbox16, hitbox17) == true){return 1617;}
- if(SDL_HasIntersection(hitbox16, hitbox17) == true){return 1618;}
- if(SDL_HasIntersection(hitbox16, hitbox17) == true){return 1619;}
- if(SDL_HasIntersection(hitbox16, hitbox17) == true){return 1620;}
- if(SDL_HasIntersection(hitbox17, hitbox18) == true){return 1718;}
- if(SDL_HasIntersection(hitbox17, hitbox19) == true){return 1719;}
- if(SDL_HasIntersection(hitbox17, hitbox20) == true){return 1720;}
- if(SDL_HasIntersection(hitbox18, hitbox19) == true){return 1819;}
- if(SDL_HasIntersection(hitbox18, hitbox20) == true){return 1820;}
- if(SDL_HasIntersection(hitbox19, hitbox20) == true){return 1920;}
- }
- void clearScene()
- {
- imageIndex = 1;
- freeImageSlot(1);
- freeImageSlot(2);
- freeImageSlot(3);
- freeImageSlot(4);
- freeImageSlot(5);
- freeImageSlot(6);
- freeImageSlot(7);
- freeImageSlot(8);
- freeImageSlot(9);
- freeImageSlot(10);
- deleteButtons();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement