mapDekar.SpriteOffset() = Vector<float>(0, -32);
mapGuy.AddFollower(&mapDekar);
+ SDL_Surface *mapMonsterImg(IMG_Load("test-data/monster-map.png"));
+ Sprite mapMonsterSprite(mapMonsterImg, 32, 32);
+ SimpleAnimation mapMonsterAnimation(&mapMonsterSprite, 500, 2, 0, 0, true);
+ Entity mapMonster;
+ mapMonster.SetAnimation(&mapMonsterAnimation);
+ mapMonster.Position() = Vector<float>(64, 32);
+ mapMonster.SetOrientation(Entity::ORIENTATION_SOUTH);
+
InitScreen screen(width, height);
app::State *state(0);
state = battleState;
} else {
MapState *mapState(new MapState(&map));
+
mapState->AddEntity(&mapMaxim);
mapState->AddEntity(&mapSelan);
mapState->AddEntity(&mapGuy);
mapState->AddEntity(&mapDekar);
+
mapState->ControlEntity(&mapMaxim);
mapState->SetWalkingSpeed(walkSpeed);
+
+ mapState->AddEntity(&mapMonster);
+ mapMonster.StartAnimation(*mapState);
+
state = mapState;
}