At least 1 enemy type.

This commit is contained in:
Steve 2018-02-10 07:57:31 +00:00
parent bab333d492
commit 0aa204ea71
2 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,7 @@ void initAtlasTest(void)
initHub();
loadWorld("data/maps/beachFront3.json");
loadWorld("data/maps/beachApproach.json");
initWorld();

View File

@ -77,6 +77,8 @@ static void loadEnemyTypes(char *enemyTypes)
int i;
char *enemyType;
world.numEnemyTypes = 1;
for (i = 0 ; i < strlen(enemyTypes) ; i++)
{
if (enemyTypes[i] == '|')
@ -94,6 +96,8 @@ static void loadEnemyTypes(char *enemyTypes)
world.enemyTypes[i] = malloc(strlen(enemyType) + 1);
strcpy(world.enemyTypes[i], enemyType);
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_DEBUG, "world.entityTypes[%d] = %s", i, enemyType);
enemyType = strtok(NULL, "|");
i++;