It's really long so...
main.cpp
#include "DarkGDK.h"
#include <fstream>
//#include <iostream>
#include "Player1.h"
#include "Ammo01.h"
#include "Enemy01.h"
#include "Menu.h"
#include "Score.h"
#include <vector>
using namespace std;
//#include "Variables.h"
//#include "Zombie01.h"
void DarkGDK( void )
{
int ZombieID_UP = 1001;
int ZombieID_DOWN = 2001;
int ZombieID_RIGHT = 3001;
int ZombieID_LEFT = 4001;
bool z_canSpawn = false;
const int ZOMBIE_DELAY = 20;
float angl;
angl = dbAtanFull(dbSpriteY(01) - dbMouseY(), dbSpriteX(01) - dbMouseX()) + 90;
bool shot_taken_01 = 0;
bool shot_taken_02 = 1;
bool shot_taken_03 = 1;
bool shot_taken_04 = 1;
int zvar1 = 1001;
int zvar2 = 2001;
int zvar3 = 3001;
int zvar4 = 4001;
int zROT_UP = 1001;
int zROT_DOWN = 2001;
int zROT_LEFT = 3001;
int zROT_RIGHT = 4001;
int zCOL_UP = 1001;
int zCOL_DOWN = 2001;
int zCOL_LEFT = 3001;
int zCOL_RIGHT = 4001;
//======
bool PlayerSpawned_1 = false;
//======
const int FIRE_DELAY = 1000;
int g_timer = 0;
bool g_canFire = true;
//======
//MENU;GAME
bool GameStarted = false;
bool Options = false;
bool GameOver = false;
bool HighScore = false;
//bool mpSTARTED = false;
//======
dbDisableEscapeKey();
dbSetDisplayMode(1024,768,32);
dbSetImageColorKey(181, 230, 29);
//-----------------------------------
//dbCreateAnimatedSprite(4,"ZAnime.bmp", 1, 4, 4);
//dbCreateAnimatedSprite(12,"ZAnime.bmp", 1, 4, 12);
//dbCreateAnimatedSprite(4,"ZAnime.bmp",4,1,4);
dbLoadImage("Zombie01.bmp", 4);
dbLoadImage("Mouse.bmp", 9998);
/*dbLoadImage("/AmmoCount/00.bmp", 1000);
dbLoadImage("/AmmoCount/01.bmp", 1001);
dbLoadImage("/AmmoCount/02.bmp", 1002);
dbLoadImage("/AmmoCount/03.bmp", 1003);
dbLoadImage("/AmmoCount/04.bmp", 1004);
dbLoadImage("/AmmoCount/05.bmp", 1005);
dbLoadImage("/AmmoCount/06.bmp", 1006);
dbLoadImage("/AmmoCount/07.bmp", 1007);
dbLoadImage("/AmmoCount/08.bmp", 1008);
dbLoadImage("/AmmoCount/09.bmp", 1009);
dbLoadImage("/AmmoCount/10.bmp", 1010);
dbLoadImage("/AmmoCount/11.bmp", 1011);
dbLoadImage("/AmmoCount/12.bmp", 1012);
dbLoadImage("/AmmoCount/13.bmp", 1013);
dbLoadImage("/AmmoCount/14.bmp", 1014);
dbLoadImage("/AmmoCount/15.bmp", 1015);
dbLoadImage("/AmmoCount/16.bmp", 1016);
dbLoadImage("/AmmoCount/17.bmp", 1017);
dbLoadImage("/AmmoCount/18.bmp", 1018);
dbLoadImage("/AmmoCount/19.bmp", 1019);
dbLoadImage("/AmmoCount/20.bmp", 1020);
dbLoadImage("/AmmoCount/21.bmp", 1021);
dbLoadImage("/AmmoCount/22.bmp", 1022);
dbLoadImage("/AmmoCount/23.bmp", 1023);
dbLoadImage("/AmmoCount/24.bmp", 1024);
dbLoadImage("/AmmoCount/25.bmp", 1025);
dbLoadImage("/AmmoCount/26.bmp", 1026);
dbLoadImage("/AmmoCount/27.bmp", 1027);
dbLoadImage("/AmmoCount/28.bmp", 1028);
dbLoadImage("/AmmoCount/29.bmp", 1029);
dbLoadImage("/AmmoCount/30.bmp", 1030);*/
//-----------------------------------
dbLoadImage("Player01.bmp", 01);
dbLoadImage("Ammo01.bmp", 02);
dbLoadSound("Ammo01.wav", 101);
dbLoadSound("aReload.wav", 102);
dbLoadMusic("bg.mp3", 01);
dbLoadImage("Light.bmp", 05);
dbLoadImage("Circle.bmp", 06);
//-----------------------------------
dbLoadImage("Health.bmp", 310);
//dbLoadImage("HUD.bmp", 5010);
dbLoadImage("MenuBG.bmp", 5000);
dbLoadImage("Menu_START.bmp", 5001);
dbLoadImage("MenuMP.bmp", 5002);
dbLoadImage("MenuOPT.bmp", 5003);
dbLoadImage("MenuEXT.bmp", 5004);
dbLoadImage("MenuS_SP.bmp", 5005);
dbLoadImage("MenuS_MP.bmp", 5006);
dbLoadImage("MenuS_OPT.bmp", 5007);
dbLoadImage("MenuS_EXT.bmp", 5008);
dbLoadImage("MenuS_HS.bmp", 5009);
dbLoadImage("Board.bmp", 5010);
dbLoadImage("BG.png", 5020);
dbLoadImage("GameOver.jpg", 9999);
//--------------------------------------
dbLoadImage("OptWINDOWS.bmp", 5200);
dbLoadImage("OptBACK.bmp", 5201);
//--------------------------------------
/*dbLoadImage("Numbers/0.bmp", 300);
dbLoadImage("Numbers/1.bmp", 301);
dbLoadImage("Numbers/2.bmp", 302);
dbLoadImage("Numbers/3.bmp", 303);
dbLoadImage("Numbers/4.bmp", 304);
dbLoadImage("Numbers/5.bmp", 305);
dbLoadImage("Numbers/6.bmp", 306);
dbLoadImage("Numbers/7.bmp", 307);
dbLoadImage("Numbers/8.bmp", 308);
dbLoadImage("Numbers/9.bmp", 309);*/
//--------------------------------------
bool Windowed = true;
int FPS = 100;
Player1 P1;
Ammo01 A01;
Zombie Z;
Menu M;
Score S;
fstream myfile;
dbSyncOn();
dbSyncRate(FPS);
dbLoopMusic(01);
dbSetMusicVolume(01, 120);
dbSetSoundVolume(102, 84);
dbSetSoundVolume(101, 84);
while(LoopGDK())
{
dbSprite(9998, dbMouseX(), dbMouseY(), 9998);
dbHideSprite(9998);
dbDrawSpritesFirst();
if(GameStarted == false && Options == false && GameOver == false)
{
M.CreateMenu();
//Button SINGLE-PLAYER
if(dbSpriteCollision(9998, 5101)){
dbDeleteSprite(5101);
dbSprite(5106, 187, 350, 5005);
};
if(!dbSpriteCollision(9998, 5106)){
dbDeleteSprite(5106);
dbSprite(5101, 187,350,5001);
}
if(dbSpriteCollision(9998, 5101) || dbSpriteCollision(9998, 5106)){
if(dbMouseClick() == 1){
GameStarted = true;
p_HP = 3;
hs_Written = false;
Nick = false;
SCR = 0;
HighScore = false;
}
};
//Button MULTI-PLAYER
if(dbSpriteCollision(9998, 5102)){
dbDeleteSprite(5102);
dbSprite(5107, 187, 430, 5006);
};
if(!dbSpriteCollision(9998, 5107)){
dbDeleteSprite(5107);
dbSprite(5102, 187,430,5002);
}
if(dbSpriteCollision(9998, 5102) || dbSpriteCollision(9998, 5107)){
if(dbMouseClick() == 1){
dbSprite(10000000, 0, 0, 4);
dbPlaySprite(10000000,1,3,50);
};
}
//Button OPTIONS
if(dbSpriteCollision(9998, 5103)){
if(dbMouseClick() == 1){
Options = true;
HighScore = false;
};
};
//Button HighScore
if(dbSpriteCollision(9998, 5105)){
if(dbMouseClick() == 1){
if(!dbSpriteExist(5010)){
HighScore = true;
}
};
};
//Button EXIT
if(dbSpriteCollision(9998, 5104)){
dbDeleteSprite(5104);
dbSprite(5108,187,500,5008);
};
if(!dbSpriteCollision(9998, 5108)){
dbDeleteSprite(5108);
dbSprite(5104, 187,500,5004);
}
if(dbSpriteCollision(9998, 5104) || dbSpriteCollision(9998, 5108)){
if(dbMouseClick()){
break;
}
}
}
//HighScore
if(HighScore == true && GameStarted == false && GameOver == false)
{
//*****DELETE***
/*if(dbSpriteExist(5101)){
dbDeleteSprite(5101);
dbDeleteSprite(5102);
dbDeleteSprite(5103);
dbDeleteSprite(5104);
dbDeleteSprite(5105);
dbDeleteSprite(5106);
dbDeleteSprite(5107);
dbDeleteSprite(5108);
}*/
//****DELETE***
int oldSize = dbTextSize();
string file;
int lineCount = 0;
const int lines = 0;
//string name[256];
//int score[256];
int tempS = 0;
int tempN = 0;
int tempN1 = 0;
int tempN2 = 0;
dbSetTextSize(35);
fstream f;
f.open("score.dt", fstream::out | fstream::in);
if(!f.is_open()){
break;
system("msg * Failed To Load HighScore Board");
}
else{
while ( getline(f, file))
lineCount ++;
f.clear();
f.seekg(0, ios::beg);
vector<int> HSBscore(lineCount);
vector<string> HSBname(lineCount);
for(int hs1 = 0; hs1 < (lineCount); hs1 ++){
f >> HSBname[hs1];
f >> HSBscore[hs1];
//cout << name[hs1] << " --- " << score[hs1] << endl;
}
cout << endl;
for(int hs2 = 0; hs2 < (lineCount); hs2 ++){
if(tempS < HSBscore[hs2]){
tempN = hs2;
tempS = HSBscore[hs2];
}
}
tempS = 0;
for(int hs2 = 0; hs2 < (lineCount); hs2 ++){
if(tempS < HSBscore[hs2] && hs2 != tempN){
tempN1 = hs2;
tempS = HSBscore[hs2];
}
}
tempS = 0;
for(int hs3 = 0; hs3 < (lineCount); hs3 ++){
if(tempS < HSBscore[hs3] && hs3 != tempN && hs3!= tempN1){
tempN2 = hs3;
tempS = HSBscore[hs3];
}
}
dbSprite(5010, 350, 180, 5010);
char HSBn1[1024];
char HSBn2[1024];
char HSBn3[1024];
strcpy(HSBn1,HSBname[tempN].c_str());
strcpy(HSBn2,HSBname[tempN1].c_str());
strcpy(HSBn3,HSBname[tempN2].c_str());
dbText(380, 315, HSBn1);
dbText(380, 425, HSBn2);
dbText(380, 540, HSBn3);
//dbText(10, 10, HSBname[tempN].c_str());
dbText(500,315, dbStr(HSBscore[tempN]));
dbText(500,425, dbStr(HSBscore[tempN1]));
dbText(500,540, dbStr(HSBscore[tempN2]));
//cout << endl << "TOP SCORE:" << endl << name[tempN] << " | " << score[tempN] << endl;
//cout << name[tempN1] << " | " << score[tempN1] << endl;
//cout << name[tempN2] << " | " << score[tempN2] << endl;
dbSetTextSize(oldSize);
}
}
//OPTIONS
if(Options == true && GameStarted == false && GameOver == false)
{
M.Options();
};
//GAMEOVER
if(GameStarted == false && Options == false && GameOver == true){
dbSprite(9999,0,0,9999);
S.GO_SCORE();
if(Nick == 0){
strcpy(NickName,dbInput());
Nick = 1;
}
dbText(220, 80, "Nickname: ");
dbText(350, 80, NickName);
if(hs_Written == 0){
myfile.open("Score.dt",ios::app);
if(myfile.is_open() == 1)
{
myfile << NickName << " " << SCR << endl;
}
myfile.close();
hs_Written = true;
}
if(dbMouseX() > 280 && dbMouseX() < 359 && dbMouseY() > 250 && dbMouseY() < 269){
dbSprite(5106, 280, 250, 5006);
dbDeleteSprite(5102);
if(dbMouseClick() == 1){
GameOver = false;
hs_Written = false;
Nick = false;
dbDeleteSprite(9999);
};
};
if(dbMouseX() < 280 || dbMouseY() < 250 || dbMouseX() > 360 || dbMouseY() > 270)
if(dbSpriteExist(5102) == 0){
dbSprite(5102, 280, 250, 5002);
if(dbSpriteExist(5106) == 1){
dbDeleteSprite(5106);
}
}
}
//GAME
if(GameStarted == true && Options == false && GameOver == false){
M.DeleteMenu();
//dbSprite(01,1,1,01);
if(p_HP > 0 && GameStarted == true && !dbSpriteExist(01)){
P1.SpawnPlayer();
}
if(p_HP < 1)
{
GameOver = true;
GameStarted = false;
};
//dbSprite(5010,0,0,5010);
P1.Move();
P1.Rotation();
A01.Move();
A01.CheckFire(1);
Z.ZombieSpawner();
Z.HP_Control();
for(zROT_UP; zROT_UP < 1031; zROT_UP ++)
{
Z.RotateZombie(zROT_UP);}
for(zROT_DOWN; zROT_DOWN < 2031; zROT_DOWN ++)
{
Z.RotateZombie(zROT_DOWN);}
for(zROT_LEFT; zROT_LEFT < 3031; zROT_LEFT ++)
{
Z.RotateZombie(zROT_LEFT);}
for(zROT_RIGHT; zROT_RIGHT < 4031; zROT_RIGHT ++)
{
Z.RotateZombie(zROT_RIGHT);}
zROT_UP = 1001;
zROT_DOWN = 2001;
zROT_LEFT = 3001;
zROT_RIGHT = 4001;
Z.zCC();
Z.ZombieMovement();
for(zCOL_UP; zCOL_UP < 1031; zCOL_UP ++)
{
S.zShot(zCOL_UP);}
for(zCOL_DOWN; zCOL_DOWN < 2031; zCOL_DOWN ++)
{
S.zShot(zCOL_DOWN);}
for(zCOL_LEFT; zCOL_LEFT < 3031; zCOL_LEFT ++)
{
S.zShot(zCOL_LEFT);}
for(zCOL_RIGHT; zCOL_RIGHT < 4031; zCOL_RIGHT ++)
{
S.zShot(zCOL_RIGHT);}
zCOL_UP = 1001;
zCOL_DOWN = 2001;
zCOL_LEFT = 3001;
zCOL_RIGHT = 4001;
S.ScoreBase();
}
if(dbEscapeKey() == 1)
{
break;
};
dbSync();
};
return;
};
Enemy01.h (where i'm using dbPlaySprite)
#include "darkGDK.h"
//#include "Player1.h"
#include "Variables.h"
//************************
//Zombie Spawner uses:
bool z_canSpawn = true;
int z_timer;
const int ZOMBIE_DELAY = 100;
int timeDelta = 3;
//*************************
//Zombie Spawn uses:
int Zombie_Case = 0;
int zID_UP = 1001;
bool zSP_UP = false;
int zID_DOWN = 2001;
bool zSP_DOWN = false;
int zID_LEFT = 3001;
bool zSP_LEFT = false;
int zID_RIGHT = 4001;
bool zSP_RIGHT = false;
//*************************
//Zombie Movement uses:
int zMOV_UP = 1001;
int zMOV_DOWN = 2001;
int zMOV_LEFT = 3001;
int zMOV_RIGHT = 4001;
//Zomvie Collision uses:
int bulletID = 501;
int zCOL2_UP = 1001;
int zCOL2_DOWN = 2001;
int zCOL2_LEFT = 3001;
int zCOL2_RIGHT = 4001;
int zCOL3_UP = 1001;
int zCOL3_DOWN = 2001;
int zCOL3_LEFT = 3001;
int zCOL3_RIGHT = 4001;
//Variables
//Player1 P1;
class Zombie{
private:
float angle;
float angle1;
float angle2;
float angle3;
public:
//int p_HP = 0;
void HP_Control()
{
dbSetTextToBold();
dbText(735, 21, "HEALTH: ");
//dbSetTextToNormal();
if(p_HP == 0){
dbDeleteSprite(303);
dbDeleteSprite(302);
dbDeleteSprite(301);
}
if(p_HP == 1){
dbDeleteSprite(303);
dbDeleteSprite(302);
dbDeleteSprite(301);
dbSprite(301, 815, 15, 310);
}
if(p_HP == 2){
dbDeleteSprite(303);
dbDeleteSprite(302);
dbDeleteSprite(301);
dbSprite(301, 815, 15, 310);
dbSprite(302, 855, 15, 310);
}
if(p_HP == 3){
dbDeleteSprite(303);
dbDeleteSprite(302);
dbDeleteSprite(301);
dbSprite(301, 815, 15, 310);
dbSprite(302, 855, 15, 310);
dbSprite(303, 895, 15, 310);
}
// dbText(510, 10, "Health: ");
// dbText(580,10, dbStr(p_HP));
}
void RotateZombie( int ZombieID)
{
float angle;
angle = dbAtanFull(dbSpriteY(ZombieID) - dbSpriteY(01), dbSpriteX(ZombieID) - dbSpriteX(01)) + 90;
dbRotateSprite(ZombieID, angle);
};
void ZombieSpawner(){
//************************************
if ( !z_canSpawn )
{
z_timer += timeDelta;
//Check if the timer has passed the delay time
if ( z_timer >= ZOMBIE_DELAY )
{
z_timer = 0;
z_canSpawn = true;
}
}
if(z_canSpawn == true)
{
Zombie::ZombieSpawn();
z_canSpawn = false;
}
};
//-----------------------------------------------------
//-----------------------------------------------------
void ZombieSpawn(){
//All zombie ID's and variables etc. are:
//UP : 1000++ zID_UP case 0 zSP_UP zMOV_UP
//DOWN : 2000++ zID_DOWN case 1 zSP_DOWN zMOV_DOWN
//LEFT : 3000++ zID_LEFT case 2 zSP_LEFT zMOV_LEFT
//RIGHT : 4000++ zID_RIGHT case 3 zSP_RIGHT zMOV_RIGHT
//************************************
switch(Zombie_Case){
case 0:
{
if(!dbSpriteExist(zID_UP)){
dbSprite(zID_UP, dbRnd(1024), 20, 4);
dbOffsetSprite(zID_UP, 18, 24);
zSP_UP = true;}
if(dbSpriteExist(zID_UP) && zSP_UP == false){
zID_UP ++;
}
if(zSP_UP = true){
Zombie_Case = Zombie_Case + 1;
//timeDelta = timeDelta + 0.2;
zSP_UP = false;
break;
}
};
case 1:
{
if(!dbSpriteExist(zID_DOWN)){
dbSprite(zID_DOWN, dbRnd(1024), 748, 4);
dbOffsetSprite(zID_DOWN, 18, 24);
zSP_DOWN = true;}
if(dbSpriteExist(zID_DOWN) && zSP_DOWN == false){
zID_DOWN ++;
}
if(zSP_DOWN = true){
Zombie_Case = Zombie_Case + 1;
//timeDelta = timeDelta + 0.2;
zSP_DOWN = false;
break;
}
}
case 2:
{
if(!dbSpriteExist(zID_LEFT)){
dbSprite(zID_LEFT, 20, dbRnd(768), 4);
dbOffsetSprite(zID_LEFT, 18, 24);
zSP_LEFT = true;}
if(dbSpriteExist(zID_LEFT) && zSP_LEFT == false){
zID_LEFT ++;
}
if(zSP_LEFT = true){
Zombie_Case = Zombie_Case + 1;
//timeDelta = timeDelta + 0.2;
zSP_LEFT = false;
break;
}
}
case 3:
{
if(!dbSpriteExist(zID_RIGHT)){
dbSprite(zID_RIGHT, 1004, dbRnd(768), 4);
dbOffsetSprite(zID_RIGHT, 18, 24);
zSP_RIGHT = true;}
if(dbSpriteExist(zID_RIGHT) && zSP_RIGHT == false){
zID_RIGHT ++;
}
if(zSP_RIGHT = true){
Zombie_Case = 0;
//timeDelta = timeDelta + 0.2;
zSP_RIGHT = false;
break;
}
}
};
};
void Reset(){
for(int r_1 = 1001; r_1 < 1031; r_1 ++){
dbDeleteSprite(r_1);}
for(int r_2 = 2001; r_2 < 2031; r_2 ++){
dbDeleteSprite(r_2);}
for(int r_3 = 3001; r_3 < 3031; r_3 ++){
dbDeleteSprite(r_3);}
for(int r_4 = 4001; r_4 < 4031; r_4 ++){
dbDeleteSprite(r_4);}
};
void ZombieMovement()
{
//dbPlayAnimation(4);
for(zMOV_UP; zMOV_UP < 1031; zMOV_UP ++){
if(!dbSpriteCollision(zMOV_UP, 01))
{
dbMoveSprite(zMOV_UP, -2);
//dbPlaySprite(zMOV_UP,1,4,100);
}
if(dbSpriteCollision(zMOV_UP, 01))
{
Reset();
dbDeleteSprite(01);
p_HP = p_HP - 1;
//dbDeleteSprite(zMOV_UP);
}
}
for(zMOV_DOWN; zMOV_DOWN < 2031; zMOV_DOWN ++){
if(!dbSpriteCollision(zMOV_DOWN, 01))
{
dbMoveSprite(zMOV_DOWN, -2);
//dbPlaySprite(zMOV_DOWN,1,4,50);
}
if(dbSpriteCollision(zMOV_DOWN, 01))
{
Reset();
dbDeleteSprite(01);
p_HP = p_HP - 1;
//dbDeleteSprite(zMOV_DOWN);
}
}
for(zMOV_LEFT; zMOV_LEFT < 3031; zMOV_LEFT ++){
if(!dbSpriteCollision(zMOV_LEFT, 01))
{
dbMoveSprite(zMOV_LEFT, -2);
//dbPlaySprite(zMOV_LEFT,1,4,100);
}
if(dbSpriteCollision(zMOV_LEFT, 01))
{
Reset();
dbDeleteSprite(01);
p_HP = p_HP - 1;
//dbDeleteSprite(zMOV_LEFT);
}
}
for(zMOV_RIGHT; zMOV_RIGHT < 4031; zMOV_RIGHT ++){
if(!dbSpriteCollision(zMOV_RIGHT, 01))
{
dbMoveSprite(zMOV_RIGHT, -2);
//dbPlaySprite(zMOV_RIGHT,1,4,100);
}
if(dbSpriteCollision(zMOV_RIGHT, 01))
{
Reset();
dbDeleteSprite(01);
p_HP = p_HP - 1;
//dbDeleteSprite(zMOV_RIGHT);
}
}
zMOV_UP = 1001;
zMOV_DOWN = 2001;
zMOV_LEFT = 3001;
zMOV_RIGHT = 4001;
}
//All zombie ID's and variables etc. are:
//UP : 1000++ zID_UP case 0 zSP_UP zMOV_UP
//DOWN : 2000++ zID_DOWN case 1 zSP_DOWN zMOV_DOWN
//LEFT : 3000++ zID_LEFT case 2 zSP_LEFT zMOV_LEFT
//RIGHT : 4000++ zID_RIGHT case 3 zSP_RIGHT zMOV_RIGHT
//************************************
void ZZCollision(int zID)
{
for(zCOL2_UP; zCOL2_UP < 1031; zCOL2_UP ++)
{
if(zID != zCOL2_UP && dbSpriteCollision(zID, zCOL2_UP))
{
dbMoveSprite(zID, 9);
}
};
for(zCOL2_DOWN; zCOL2_DOWN < 2031; zCOL2_DOWN ++)
{
if(zID != zCOL2_DOWN && dbSpriteCollision(zID, zCOL2_DOWN))
{
dbMoveSprite(zID, 9);
}
};
for(zCOL2_LEFT; zCOL2_LEFT < 3031; zCOL2_LEFT ++)
{
if(zID != zCOL2_LEFT && dbSpriteCollision(zID, zCOL2_LEFT))
{
dbMoveSprite(zID, 9);
}
};
for(zCOL2_RIGHT; zCOL2_RIGHT < 4031; zCOL2_RIGHT ++)
{
if(zID != zCOL2_RIGHT && dbSpriteCollision(zID, zCOL2_RIGHT))
{
dbMoveSprite(zID, 9);
}
};
zCOL2_UP = 1001;
zCOL2_DOWN = 2001;
zCOL2_LEFT = 3001;
zCOL2_RIGHT = 4001;
}
void zCC()
//Zombie Control Center
//For Score, Max Zombies etc.
{
if(zID_UP > 1030)
{
zID_UP = 1001;
}
if(zID_DOWN > 2030)
{
zID_DOWN = 2001;
}
if(zID_LEFT > 3030)
{
zID_LEFT = 3001;
}
if(zID_RIGHT > 4030)
{
zID_RIGHT = 4001;
}
//***********************
//Zombie-Zombie Collision
for(zCOL3_UP; zCOL3_UP < 1031; zCOL3_UP ++)
{
Zombie::ZZCollision(zCOL3_UP);}
for(zCOL3_DOWN; zCOL3_DOWN < 2031; zCOL3_DOWN ++)
{
Zombie::ZZCollision(zCOL3_DOWN);}
for(zCOL3_LEFT; zCOL3_LEFT < 3031; zCOL3_LEFT ++)
{
Zombie::ZZCollision(zCOL3_LEFT);}
for(zCOL3_RIGHT; zCOL3_RIGHT < 4031; zCOL3_RIGHT ++)
{
Zombie::ZZCollision(zCOL3_RIGHT);}
zCOL3_UP = 1001;
zCOL3_DOWN = 2001;
zCOL3_LEFT = 3001;
zCOL3_RIGHT = 4001;
}
};