X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmain.cpp;h=05f3d8ad231057619d140110c6f6b42b0cc95abc;hb=5d1a76ae7725af998c6ee46adfe492c68ee1d34f;hp=96bfad7c7da9966d4d2a843728b6ba2bf3d89119;hpb=988ba6d1b4e18a4ae5d30a892224f76cee2355cc;p=l2e.git diff --git a/src/main.cpp b/src/main.cpp index 96bfad7..05f3d8a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,7 +17,8 @@ #include "common/Script.h" #include "common/Spell.h" #include "common/Stats.h" -#include "geometry/Vector.h" +#include "math/Fixed.h" +#include "math/Vector.h" #include "graphics/CharSelect.h" #include "graphics/ComplexAnimation.h" #include "graphics/Font.h" @@ -63,7 +64,8 @@ using common::GameConfig; using common::GameState; using common::Hero; using common::Spell; -using geometry::Vector; +using math::Fixed; +using math::Vector; using graphics::Texture; using loader::Caster; using loader::Interpreter; @@ -87,7 +89,7 @@ int main(int argc, char **argv) { const int width = 512; const int height = 448; - const float walkSpeed = 128.0f; + const Fixed<8> walkSpeed = Fixed<8>(1, 8); bool battle(false); @@ -233,7 +235,9 @@ int main(int argc, char **argv) { gameState.heroes[0].AddSpell(valorSpell); gameState.heroes[1].AddSpell(valorSpell); - gameState.inventory.Add(caster.GetItem("zirconPlateItem")); + gameState.inventory.Add(caster.GetItem("zirconPlateItem"), 32); + gameState.inventory.Add(caster.GetItem("holyFruitItem")); + gameState.inventory.Add(caster.GetItem("darkFruitItem")); gameState.inventory.Add(caster.GetItem("antidoteItem"), 9); gameState.inventory.Add(caster.GetItem("powerRingItem")); gameState.inventory.Add(caster.GetItem("magicJarItem"), 4); @@ -276,17 +280,17 @@ int main(int argc, char **argv) { gameState.heroes[3].SetEquipment(Hero::EQUIP_RING, caster.GetItem("rocketRingItem")); gameState.heroes[3].SetEquipment(Hero::EQUIP_JEWEL, caster.GetItem("krakenRockItem")); - gameState.heroes[0].MapEntity().Position() = Vector(64, 128); + gameState.heroes[0].MapEntity().Position() = Vector >(64, 128); - gameState.heroes[1].MapEntity().Position() = Vector(64, 128); + gameState.heroes[1].MapEntity().Position() = Vector >(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(64, 128); + gameState.heroes[2].MapEntity().Position() = Vector >(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(64, 128); + gameState.heroes[3].MapEntity().Position() = Vector >(64, 128); gameState.heroes[3].MapEntity().SetFlags(Entity::FLAG_NONBLOCKING); gameState.heroes[2].MapEntity().AddFollower(&gameState.heroes[3].MapEntity());