From 0aa204ea71ce2d60fef9fc9c25aee9bef487f681 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 10 Feb 2018 07:57:31 +0000 Subject: [PATCH] At least 1 enemy type. --- src/test/atlasTest.c | 2 +- src/world/worldLoader.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/atlasTest.c b/src/test/atlasTest.c index 21cf54f..4cfae11 100644 --- a/src/test/atlasTest.c +++ b/src/test/atlasTest.c @@ -30,7 +30,7 @@ void initAtlasTest(void) initHub(); - loadWorld("data/maps/beachFront3.json"); + loadWorld("data/maps/beachApproach.json"); initWorld(); diff --git a/src/world/worldLoader.c b/src/world/worldLoader.c index 5ab4be1..6bd00c9 100644 --- a/src/world/worldLoader.c +++ b/src/world/worldLoader.c @@ -76,6 +76,8 @@ static void loadEnemyTypes(char *enemyTypes) { int i; char *enemyType; + + world.numEnemyTypes = 1; for (i = 0 ; i < strlen(enemyTypes) ; i++) { @@ -93,6 +95,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, "|");