bugfixed initEnemyFormations
This commit is contained in:
@@ -423,13 +423,13 @@ void Director::runGame()
|
|||||||
|
|
||||||
void Director::run()
|
void Director::run()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 100; i++)
|
//for (int i = 0; i < 100; i++)
|
||||||
{
|
//{
|
||||||
Game *test = new Game(mRenderer, mFileList, mInput, true);
|
// Game *test = new Game(mRenderer, mFileList, mInput, true);
|
||||||
delete test;
|
// delete test;
|
||||||
printf("%i\n", i);
|
// printf("%i\n", i);
|
||||||
}
|
//}
|
||||||
mSection.name = PROG_SECTION_QUIT;
|
//mSection.name = PROG_SECTION_QUIT;
|
||||||
|
|
||||||
// Bucle principal
|
// Bucle principal
|
||||||
while (!(getSection() == PROG_SECTION_QUIT))
|
while (!(getSection() == PROG_SECTION_QUIT))
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ Game::Game(SDL_Renderer *renderer, std::string *filelist, Input *input, bool dem
|
|||||||
int status = mkdir("/media/data/local/home/.coffee_crisis", 755);
|
int status = mkdir("/media/data/local/home/.coffee_crisis", 755);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Game::~Game()
|
Game::~Game()
|
||||||
@@ -662,7 +661,7 @@ void Game::initEnemyFormations()
|
|||||||
for (int i = 0; i < NUMBER_OF_ENEMY_FORMATIONS; i++)
|
for (int i = 0; i < NUMBER_OF_ENEMY_FORMATIONS; i++)
|
||||||
{
|
{
|
||||||
mEnemyFormation[i].numberOfEnemies = 0;
|
mEnemyFormation[i].numberOfEnemies = 0;
|
||||||
for (int j = 0; i < MAX_NUMBER_OF_ENEMIES_IN_A_FORMATION; i++)
|
for (int j = 0; j < MAX_NUMBER_OF_ENEMIES_IN_A_FORMATION; j++)
|
||||||
{
|
{
|
||||||
mEnemyFormation[i].init[j].x = 0;
|
mEnemyFormation[i].init[j].x = 0;
|
||||||
mEnemyFormation[i].init[j].y = 0;
|
mEnemyFormation[i].init[j].y = 0;
|
||||||
@@ -1101,7 +1100,7 @@ void Game::initEnemyFormations()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Crea las mismas formaciones pero con hexagonos a partir de la posición 50 del vector
|
// Crea las mismas formaciones pero con hexagonos a partir de la posición 50 del vector
|
||||||
for (int k = 0; k < 26; k++)
|
for (int k = 0; k < j + 1; k++)
|
||||||
{
|
{
|
||||||
mEnemyFormation[k + 50].numberOfEnemies = mEnemyFormation[k].numberOfEnemies;
|
mEnemyFormation[k + 50].numberOfEnemies = mEnemyFormation[k].numberOfEnemies;
|
||||||
for (int i = 0; i < mEnemyFormation[k + 50].numberOfEnemies; i++)
|
for (int i = 0; i < mEnemyFormation[k + 50].numberOfEnemies; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user