Update of /home/kde/kdegames/atlantik/client
In directory office:/tmp/cvs-serv5342/client
Modified Files:
Tag: KDE_3_1_BRANCH
atlantik.cpp atlantik.h
Log Message:
move playerSelf to core, fixes some token issues
Index: atlantik.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.cpp,v
retrieving revision 1.121.6.20
retrieving revision 1.121.6.21
diff -u -d -r1.121.6.20 -r1.121.6.21
--- atlantik.cpp 13 Jul 2003 04:43:40 -0000 1.121.6.20
+++ atlantik.cpp 14 Jul 2003 01:30:10 -0000 1.121.6.21
@@ -62,7 +62,6 @@
m_selectServer = 0;
m_selectGame = 0;
m_selectConfiguration = 0;
- m_playerSelf = 0;
m_atlantikNetwork = 0;
// Game and network core
@@ -176,7 +175,7 @@
playerChanged(player);
if (player->isSelf())
- m_playerSelf = player;
+ m_atlanticCore->setPlayerSelf(player);
connect(player, SIGNAL(changed(Player *)), this, SLOT(playerChanged(Player *)));
connect(player, SIGNAL(changed(Player *)), m_board, SLOT(playerChanged(Player *)));
@@ -233,7 +232,6 @@
}
m_atlanticCore->reset(true);
- m_playerSelf = 0;
initNetworkObject();
@@ -297,8 +295,9 @@
if (m_selectConfiguration)
return;
+ Player *playerSelf = m_atlanticCore->playerSelf();
m_selectConfiguration = new SelectConfiguration(m_mainWidget, "selectConfiguration");
- m_selectConfiguration->setCanStart(m_playerSelf ? m_playerSelf->master() : false);
+ m_selectConfiguration->setCanStart(playerSelf ? playerSelf->master() : false);
m_mainLayout->addMultiCellWidget(m_selectConfiguration, 0, 2, 1, 1);
m_selectConfiguration->show();
@@ -515,7 +514,8 @@
if (!portfolioView)
portfolioView = addPortfolioView(player);
- if (player == m_playerSelf)
+ Player *playerSelf = m_atlanticCore->playerSelf();
+ if (player == playerSelf)
{
// We changed ourselves, see if other players (that we know
// about) have the same gameId..
@@ -525,7 +525,7 @@
if ((portfolioView = dynamic_cast<PortfolioView*>(*it)))
{
Player *pTmp = portfolioView->player();
- if (pTmp->gameId() == m_playerSelf->gameId())
+ if (pTmp->gameId() == playerSelf->gameId())
portfolioView->show();
else
portfolioView->hide();
@@ -548,9 +548,9 @@
{
// Another player changed, check if we need to show or hide
// his/her portfolioView.
- if (m_playerSelf)
+ if (playerSelf)
{
- if (player->gameId() == m_playerSelf->gameId())
+ if (player->gameId() == playerSelf->gameId())
portfolioView->show();
else
portfolioView->hide();
Index: atlantik.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/client/atlantik.h,v
retrieving revision 1.51.6.3
retrieving revision 1.51.6.4
diff -u -d -r1.51.6.3 -r1.51.6.4
--- atlantik.h 13 Jul 2003 04:43:42 -0000 1.51.6.3
+++ atlantik.h 14 Jul 2003 01:30:10 -0000 1.51.6.4
@@ -202,8 +202,6 @@
AtlantikNetwork *m_atlantikNetwork;
AtlantikConfig m_config;
- Player *m_playerSelf;
-
ConfigDialog *m_configDialog;
AtlantikBoard *m_board;
SelectServer *m_selectServer;
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.