i'm trying to figure out a way to use data structures to handle multiple enemies. I tried to use a linked list. (i'm only working with 5 enemies
i'm very much aware that linked lists' search is O(n) hehe ) but when I compile, i get this error:
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
does this mean I can't use the standard library?
i'm using a struct to keep tabs with the enemies in the game:
struct enemy
{
Enemy stingray;
int id;
};
where the stringray is the object of the enemy class which has all the stats of the enemies, and id is the object id stored in DGDK
I'm trying to load the enemies meshes,position the meshes, store the object id number and create an object of the class and push it on to the list, simultaneously.
void LoadEnemies()
{
dbRandomize(dbTimer());
struct enemy temp;
for (int i = 5; i <= 10; i++)
{
dbLoadObject("stringray.x", i);
temp.id = i;
dbPositionObject(i, (float)dbRND(dbObjectPositionX(4) - 5), 0, (float)dbRND( dbObjectPositionZ(4)) );
enemies.push_back(temp);
}
}
is there anything wrong that I'm doing/is there a better way to approach this?
-- from my island, aloha wau 'ia 'oe --