Update of /home/kde/kdegames/atlantik/libatlantic In directory office:/tmp/cvs-serv27349/libatlantic Modified Files: atlantic_core.cpp atlantic_core.h player.cpp player.h Log Message: cleanup in token geometry, animation works again Index: atlantic_core.cpp =================================================================== RCS file: /home/kde/kdegames/atlantik/libatlantic/atlantic_core.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- atlantic_core.cpp 2002/11/27 21:08:56 1.15 +++ atlantic_core.cpp 2002/11/28 21:38:24 1.16 @@ -90,6 +90,22 @@ return 0; } +Estate *AtlanticCore::estateAfter(Estate *estate) +{ + Estate *eFirst = 0, *eTmp = 0; + bool useNext = false; + for (QPtrListIterator it(m_estates); (eTmp = *it) ; ++it) + { + if (!eFirst) + eFirst = eTmp; + if (eTmp == estate) + useNext = true; + else if (useNext) + return eTmp; + } + return eFirst; +} + QPtrList AtlanticCore::estateGroups() { return m_estateGroups; Index: atlantic_core.h =================================================================== RCS file: /home/kde/kdegames/atlantik/libatlantic/atlantic_core.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- atlantic_core.h 2002/11/27 21:08:56 1.14 +++ atlantic_core.h 2002/11/28 21:38:24 1.15 @@ -42,6 +42,7 @@ QPtrList estates(); Estate *newEstate(int estateId); Estate *findEstate(int groupId); + Estate *estateAfter(Estate *estate); QPtrList estateGroups(); EstateGroup *newEstateGroup(int groupId); Index: player.cpp =================================================================== RCS file: /home/kde/kdegames/atlantik/libatlantic/player.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- player.cpp 2002/11/28 11:59:24 1.11 +++ player.cpp 2002/11/28 21:38:24 1.12 @@ -21,7 +21,7 @@ Player::Player(int playerId) : QObject() { m_id = playerId; - m_location = 0; + m_location = m_destination = 0; m_money = 0; m_changed = m_isSelf = false; m_hasTurn = m_canRoll = m_canBuy = m_inJail = false; @@ -32,6 +32,15 @@ if (m_location != location) { m_location = location; + m_changed = true; + } +} + +void Player::setDestination(Estate *destination) +{ + if (m_destination != destination) + { + m_destination = destination; m_changed = true; } } Index: player.h =================================================================== RCS file: /home/kde/kdegames/atlantik/libatlantic/player.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- player.h 2002/11/27 21:08:56 1.8 +++ player.h 2002/11/28 21:38:24 1.9 @@ -32,6 +32,8 @@ int id() { return m_id; } void setLocation(Estate *estate); Estate *location() { return m_location; } + void setDestination(Estate *estate); + Estate *destination() { return m_destination; } void setIsSelf(const bool isSelf) { m_isSelf = isSelf; } bool isSelf() const { return m_isSelf; } void setHasTurn(const bool hasTurn); @@ -57,7 +59,7 @@ bool m_hasTurn, m_canRoll, m_canBuy, m_inJail; unsigned int m_money; QString m_name; - Estate *m_location; + Estate *m_location, *m_destination; }; #endif _______________________________________________ atlantik-cvs mailing list atlantik-cvs@mail.kde.org http://mail.kde.org/mailman/listinfo/atlantik-cvs