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();
|
||||||
|
|
||||||
|
|
|
@ -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, "|");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue