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(); initHub();
loadWorld("data/maps/beachFront3.json"); loadWorld("data/maps/beachApproach.json");
initWorld(); initWorld();

View File

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