At least 1 enemy type.
This commit is contained in:
parent
bab333d492
commit
0aa204ea71
|
@ -30,7 +30,7 @@ void initAtlasTest(void)
|
||||||
|
|
||||||
initHub();
|
initHub();
|
||||||
|
|
||||||
loadWorld("data/maps/beachFront3.json");
|
loadWorld("data/maps/beachApproach.json");
|
||||||
|
|
||||||
initWorld();
|
initWorld();
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,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++)
|
||||||
{
|
{
|
||||||
if (enemyTypes[i] == '|')
|
if (enemyTypes[i] == '|')
|
||||||
|
@ -94,6 +96,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, "|");
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
|
|
Loading…
Reference in New Issue