const int width = 800;
const int height = 480;
+ const int tileSize = 32;
const float walkSpeed = 128.0f;
const bool battle(false);
area.SetWidth(8);
SDL_Surface *tilesetImg(IMG_Load("test-data/tileset.png"));
- Sprite tileset(tilesetImg, 32, 32);
+ Sprite tileset(tilesetImg, tileSize, tileSize);
Map map;
map.SetAreas(&area, 1);
SDL_Surface *mapMaximImg(IMG_Load("test-data/maxim-map.png"));
Sprite mapMaximSprite(mapMaximImg, 32, 64);
- SimpleAnimation mapMaximAnimation(&mapMaximSprite, 128, 2, 0, 0, true);
+ SimpleAnimation mapMaximAnimation(&mapMaximSprite, (tileSize/walkSpeed) / 2 * 1000, 2, 0, 0, true);
Entity mapMaxim;
mapMaxim.SetAnimation(&mapMaximAnimation);
mapMaxim.Position() = Vector<float>(80, 128);