-// dekar.SetWeapon(cst.GetItem("lizardBlowItem"));
- dekar.SetArmor(caster.GetItem("holyRobeItem"));
- dekar.SetShield(caster.GetItem("zircoGlovesItem"));
- dekar.SetHelmet(caster.GetItem("holyCapItem"));
- dekar.SetRing(caster.GetItem("rocketRingItem"));
- dekar.SetJewel(caster.GetItem("krakenRockItem"));
-
- Tile tiles1[64];
-
- tiles1[ 0].SetOffset(Vector<int>(2, 1));
- tiles1[ 1].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_NORTH | Tile::BLOCK_WEST);
- tiles1[ 2].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_NORTH);
- tiles1[ 3].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_NORTH | Tile::BLOCK_EAST);
- tiles1[ 4].SetOffset(Vector<int>(0, 1));
- tiles1[ 5].SetOffset(Vector<int>(2, 0));
- tiles1[ 6].SetOffset(Vector<int>(2, 0));
- tiles1[ 7].SetOffset(Vector<int>(2, 0));
-
- tiles1[ 8].SetOffset(Vector<int>(2, 1));
- tiles1[ 9].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_WEST);
- tiles1[10].SetOffset(Vector<int>(3, 0));
- tiles1[11].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_EAST);
- tiles1[12].SetOffset(Vector<int>(0, 2));
- tiles1[13].SetOffset(Vector<int>(1, 2));
- tiles1[14].SetOffset(Vector<int>(1, 2));
- tiles1[15].SetOffset(Vector<int>(1, 2));
-
- tiles1[16].SetOffset(Vector<int>(2, 1));
- tiles1[17].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_WEST);
- tiles1[18].SetOffset(Vector<int>(3, 0));
- tiles1[19].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_EAST);
- tiles1[20].SetOffset(Vector<int>(0, 3));
- tiles1[21].SetOffset(Vector<int>(1, 3));
- tiles1[22].SetOffset(Vector<int>(1, 3));
- tiles1[23].SetOffset(Vector<int>(2, 3));
-
- tiles1[24].SetOffset(Vector<int>(2, 1));
- tiles1[25].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_WEST);
- tiles1[26].SetOffset(Vector<int>(3, 0));
- tiles1[27].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_EAST);
- tiles1[28].SetOffset(Vector<int>(0, 4));
- tiles1[29].SetOffset(Vector<int>(1, 4));
- tiles1[30].SetOffset(Vector<int>(1, 4));
- tiles1[31].SetOffset(Vector<int>(2, 4));
-
- tiles1[32].SetOffset(Vector<int>(2, 1));
- tiles1[33].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_WEST);
- tiles1[34].SetOffset(Vector<int>(3, 0));
- tiles1[35].SetOffset(Vector<int>(3, 0));
- tiles1[36].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_NORTH);
- tiles1[37].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_NORTH);
- tiles1[38].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_NORTH);
- tiles1[39].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_NORTH);
-
- tiles1[40].SetOffset(Vector<int>(2, 1));
- tiles1[41].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_WEST);
- tiles1[42].SetOffset(Vector<int>(3, 0));
- tiles1[43].SetOffset(Vector<int>(3, 0));
- tiles1[44].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_SOUTH);
- tiles1[45].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_SOUTH);
- tiles1[46].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_SOUTH);
- tiles1[47].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_SOUTH);
-
- tiles1[48].SetOffset(Vector<int>(2, 1));
- tiles1[49].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_WEST);
- tiles1[50].SetOffset(Vector<int>(3, 0));
- tiles1[51].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_EAST);
- tiles1[52].SetOffset(Vector<int>(0, 0));
- tiles1[53].SetOffset(Vector<int>(1, 0));
- tiles1[54].SetOffset(Vector<int>(1, 0));
- tiles1[55].SetOffset(Vector<int>(1, 0));
-
- tiles1[56].SetOffset(Vector<int>(2, 1));
- tiles1[57].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_SOUTH | Tile::BLOCK_WEST);
- tiles1[58].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_SOUTH);
- tiles1[59].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_SOUTH | Tile::BLOCK_EAST);
- tiles1[60].SetOffset(Vector<int>(0, 1));
- tiles1[61].SetOffset(Vector<int>(1, 1));
- tiles1[62].SetOffset(Vector<int>(1, 1));
- tiles1[63].SetOffset(Vector<int>(1, 1));
-
- Tile tiles2[64];
-
- tiles2[ 0].SetOffset(Vector<int>(2, 0));
- tiles2[ 1].SetOffset(Vector<int>(2, 0));
- tiles2[ 2].SetOffset(Vector<int>(2, 0));
- tiles2[ 3].SetOffset(Vector<int>(2, 0));
- tiles2[ 4].SetOffset(Vector<int>(2, 0));
- tiles2[ 5].SetOffset(Vector<int>(2, 0));
- tiles2[ 6].SetOffset(Vector<int>(2, 0));
- tiles2[ 7].SetOffset(Vector<int>(2, 0));
-
- tiles2[ 8].SetOffset(Vector<int>(1, 2));
- tiles2[ 9].SetOffset(Vector<int>(1, 2));
- tiles2[10].SetOffset(Vector<int>(5, 3));
- tiles2[11].SetOffset(Vector<int>(2, 0));
- tiles2[12].SetOffset(Vector<int>(2, 0));
- tiles2[13].SetOffset(Vector<int>(2, 0));
- tiles2[14].SetOffset(Vector<int>(2, 0));
- tiles2[15].SetOffset(Vector<int>(2, 0));
-
- tiles2[16].SetOffset(Vector<int>(3, 3));
- tiles2[17].SetOffset(Vector<int>(0, 3));
- tiles2[18].SetOffset(Vector<int>(0, 1));
- tiles2[19].SetOffset(Vector<int>(2, 0));
- tiles2[20].SetOffset(Vector<int>(2, 0));
- tiles2[21].SetOffset(Vector<int>(2, 0));
- tiles2[22].SetOffset(Vector<int>(2, 0));
- tiles2[23].SetOffset(Vector<int>(2, 0));
-
- tiles2[24].SetOffset(Vector<int>(3, 4)).SetFlags(Tile::BLOCK_NORTH | Tile::BLOCK_EAST | Tile::BLOCK_WEST);
- tiles2[25].SetOffset(Vector<int>(0, 4));
- tiles2[26].SetOffset(Vector<int>(0, 1));
- tiles2[27].SetOffset(Vector<int>(2, 0));
- tiles2[28].SetOffset(Vector<int>(2, 0));
- tiles2[29].SetOffset(Vector<int>(2, 0));
- tiles2[30].SetOffset(Vector<int>(2, 0));
- tiles2[31].SetOffset(Vector<int>(2, 0));
-
- tiles2[32].SetOffset(Vector<int>(5, 0));
- tiles2[33].SetOffset(Vector<int>(3, 0)).SetFlags(Tile::BLOCK_NORTH | Tile::BLOCK_EAST);
- tiles2[34].SetOffset(Vector<int>(0, 1));
- tiles2[35].SetOffset(Vector<int>(2, 0));
- tiles2[36].SetOffset(Vector<int>(2, 0));
- tiles2[37].SetOffset(Vector<int>(2, 0));
- tiles2[38].SetOffset(Vector<int>(2, 0));
- tiles2[39].SetOffset(Vector<int>(2, 0));
-
- tiles2[40].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_SOUTH);
- tiles2[41].SetOffset(Vector<int>(4, 0)).SetFlags(Tile::BLOCK_SOUTH | Tile::BLOCK_EAST);
- tiles2[42].SetOffset(Vector<int>(0, 1));
- tiles2[43].SetOffset(Vector<int>(2, 0));
- tiles2[44].SetOffset(Vector<int>(2, 0));
- tiles2[45].SetOffset(Vector<int>(2, 0));
- tiles2[46].SetOffset(Vector<int>(2, 0));
- tiles2[47].SetOffset(Vector<int>(2, 0));
-
- tiles2[48].SetOffset(Vector<int>(1, 0));
- tiles2[49].SetOffset(Vector<int>(1, 0));
- tiles2[50].SetOffset(Vector<int>(5, 4));
- tiles2[51].SetOffset(Vector<int>(2, 0));
- tiles2[52].SetOffset(Vector<int>(2, 0));
- tiles2[53].SetOffset(Vector<int>(2, 0));
- tiles2[54].SetOffset(Vector<int>(2, 0));
- tiles2[55].SetOffset(Vector<int>(2, 0));
-
- tiles2[56].SetOffset(Vector<int>(2, 0));
- tiles2[57].SetOffset(Vector<int>(2, 0));
- tiles2[58].SetOffset(Vector<int>(2, 0));
- tiles2[59].SetOffset(Vector<int>(2, 0));
- tiles2[60].SetOffset(Vector<int>(2, 0));
- tiles2[61].SetOffset(Vector<int>(2, 0));
- tiles2[62].SetOffset(Vector<int>(2, 0));
- tiles2[63].SetOffset(Vector<int>(2, 0));
-
- Area areas[2];
- areas[0].SetTiles(tiles1, 64);
- areas[0].SetWidth(8);
- areas[1].SetTiles(tiles2, 64);
- areas[1].SetWidth(8);
-
- Trigger triggers[1];
- triggers[0].SetTilePosition(Vector<int>(2, 0));
-
- SDL_Surface *tilesetImg(IMG_Load("test-data/tileset.png"));
- Sprite tileset(tilesetImg, tileSize, tileSize);
-
- Map map;
- map.SetAreas(areas, 2);
- map.SetTileset(&tileset);
- map.SetTriggers(triggers, 1);
- map.SetWidth(2);
-
- 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);
-
- 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);