X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmain.cpp;h=05f3d8ad231057619d140110c6f6b42b0cc95abc;hb=5d1a76ae7725af998c6ee46adfe492c68ee1d34f;hp=a890871fb4c162dd12399ff1baa0190f5a6d7dc8;hpb=06db9f596cd1c5aa4c0832b387882f7c74c1b4c0;p=l2e.git diff --git a/src/main.cpp b/src/main.cpp index a890871..05f3d8a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,6 +17,7 @@ #include "common/Script.h" #include "common/Spell.h" #include "common/Stats.h" +#include "math/Fixed.h" #include "math/Vector.h" #include "graphics/CharSelect.h" #include "graphics/ComplexAnimation.h" @@ -63,6 +64,7 @@ using common::GameConfig; using common::GameState; using common::Hero; using common::Spell; +using math::Fixed; using math::Vector; using graphics::Texture; using loader::Caster; @@ -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); @@ -278,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());