- SDL_Surface *mapMaximImg(IMG_Load("test-data/maxim-map.png"));
- Sprite mapMaximSprite(mapMaximImg, 32, 64);
- SimpleAnimation mapMaximAnimation(&mapMaximSprite, (tileSize/walkSpeed) / 2 * 1000, 2, 0, 0, true);
- Entity mapMaxim;
- mapMaxim.SetAnimation(&mapMaximAnimation);
- mapMaxim.Position() = Vector<float>(64, 128);
- mapMaxim.SpriteOffset() = Vector<float>(0, -32);
-
- SDL_Surface *mapSelanImg(IMG_Load("test-data/selan-map.png"));
- Sprite mapSelanSprite(mapSelanImg, 32, 64);
- SimpleAnimation mapSelanAnimation(&mapSelanSprite, (tileSize/walkSpeed) / 2 * 1000, 2, 0, 0, true);
- Entity mapSelan;
- mapSelan.SetAnimation(&mapSelanAnimation);
- mapSelan.Position() = Vector<float>(64, 128);
- mapSelan.SpriteOffset() = Vector<float>(0, -32);
- mapSelan.SetFlags(Entity::FLAG_NONBLOCKING);
- mapMaxim.AddFollower(&mapSelan);
-
- SDL_Surface *mapGuyImg(IMG_Load("test-data/guy-map.png"));
- Sprite mapGuySprite(mapGuyImg, 32, 64);
- SimpleAnimation mapGuyAnimation(&mapGuySprite, (tileSize/walkSpeed) / 2 * 1000, 2, 0, 0, true);
- Entity mapGuy;
- mapGuy.SetAnimation(&mapGuyAnimation);
- mapGuy.Position() = Vector<float>(64, 128);
- mapGuy.SpriteOffset() = Vector<float>(0, -32);
- mapGuy.SetFlags(Entity::FLAG_NONBLOCKING);
- mapSelan.AddFollower(&mapGuy);
-
- SDL_Surface *mapDekarImg(IMG_Load("test-data/dekar-map.png"));
- Sprite mapDekarSprite(mapDekarImg, 32, 64);
- SimpleAnimation mapDekarAnimation(&mapDekarSprite, (tileSize/walkSpeed) / 2 * 1000, 2, 0, 0, true);
- Entity mapDekar;
- mapDekar.SetAnimation(&mapDekarAnimation);
- mapDekar.Position() = Vector<float>(64, 128);
- mapDekar.SpriteOffset() = Vector<float>(0, -32);
- mapDekar.SetFlags(Entity::FLAG_NONBLOCKING);
- mapGuy.AddFollower(&mapDekar);
+ gameState.heroes[0].MapEntity().Position() = Vector<float>(64, 128);
+
+ gameState.heroes[1].MapEntity().Position() = Vector<float>(64, 128);
+ gameState.heroes[1].MapEntity().SetFlags(Entity::FLAG_NONBLOCKING);
+ gameState.heroes[0].MapEntity().AddFollower(&gameState.heroes[1].MapEntity());
+
+ gameState.heroes[2].MapEntity().Position() = Vector<float>(64, 128);
+ gameState.heroes[2].MapEntity().SetFlags(Entity::FLAG_NONBLOCKING);
+ gameState.heroes[1].MapEntity().AddFollower(&gameState.heroes[2].MapEntity());
+
+ gameState.heroes[3].MapEntity().Position() = Vector<float>(64, 128);
+ gameState.heroes[3].MapEntity().SetFlags(Entity::FLAG_NONBLOCKING);
+ gameState.heroes[2].MapEntity().AddFollower(&gameState.heroes[3].MapEntity());
+
+ Entity mapPopulation[2];
+ map1.SetEntities(mapPopulation, 2);