Update of /home/kde/kdegames/atlantik/libatlantic In directory office:/tmp/cvs-serv32291/libatlantic Modified Files: Tag: KDE_3_1_BRANCH atlantic_core.cpp atlantic_core.h player.cpp player.h Log Message: backport of token animation fixes Index: atlantic_core.cpp =================================================================== RCS file: /home/kde/kdegames/atlantik/libatlantic/atlantic_core.cpp,v retrieving revision 1.14.4.3 retrieving revision 1.14.4.4 diff -u -d -r1.14.4.3 -r1.14.4.4 --- atlantic_core.cpp 20 Jan 2003 22:37:59 -0000 1.14.4.3 +++ atlantic_core.cpp 31 Jan 2003 06:24:39 -0000 1.14.4.4 @@ -103,6 +103,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.13.4.3 retrieving revision 1.13.4.4 diff -u -d -r1.13.4.3 -r1.13.4.4 --- atlantic_core.h 20 Jan 2003 22:37:59 -0000 1.13.4.3 +++ atlantic_core.h 31 Jan 2003 06:24:39 -0000 1.13.4.4 @@ -43,6 +43,7 @@ QPtrList estates(); Estate *newEstate(int estateId); Estate *findEstate(int estateId); + 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.9.8.4 retrieving revision 1.9.8.5 diff -u -d -r1.9.8.4 -r1.9.8.5 --- player.cpp 20 Jan 2003 23:47:36 -0000 1.9.8.4 +++ player.cpp 31 Jan 2003 06:24:39 -0000 1.9.8.5 @@ -21,7 +21,7 @@ Player::Player(int playerId) : QObject() { m_id = playerId; - m_location = 0; + m_location = m_destination = 0; m_money = 0; m_gameId = -1; m_name = ""; @@ -44,6 +44,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.7.8.3 retrieving revision 1.7.8.4 diff -u -d -r1.7.8.3 -r1.7.8.4 --- player.h 20 Jan 2003 23:47:37 -0000 1.7.8.3 +++ player.h 31 Jan 2003 06:24:39 -0000 1.7.8.4 @@ -34,6 +34,8 @@ int gameId() { return m_gameId; } 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); @@ -61,7 +63,7 @@ bool m_hasTurn, m_canRoll, m_canBuy, m_inJail; unsigned int m_money; QString m_name, m_host; - 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