X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/010216e3bc0fc54595d59b6fa4ceec220aff3632..64b9776ca61d8d589da77c1524ae8ae9425dd826:/demos/forty/game.cpp?ds=sidebyside diff --git a/demos/forty/game.cpp b/demos/forty/game.cpp index e03c98373e..dcf32e42b1 100644 --- a/demos/forty/game.cpp +++ b/demos/forty/game.cpp @@ -11,11 +11,6 @@ // Last modified: 22nd July 1998 - ported to wxWidgets 2.0 ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation -#pragma interface -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -193,7 +188,7 @@ void Game::DoMove(wxDC& dc, Pile* src, Pile* dest) if (frame) { - wxNode *node = (wxNode *)frame->GetChildren().GetFirst(); + wxWindowList::compatibility_iterator node = frame->GetChildren().GetFirst(); if (node) canvas = (wxWindow*)node->GetData(); } @@ -238,9 +233,9 @@ void Game::DisplayScore(wxDC& dc) m_pack->GetTopCardPos(x, y); x += 12 * CardWidth - 105; - int w, h; + wxCoord w, h; { - long width, height; + wxCoord width, height; dc.GetTextExtent(_T("Average score:m_x"), &width, &height); w = width; h = height; @@ -829,7 +824,7 @@ Pack::~Pack() { delete m_cards[m_topCard]; } -}; +} //------------------------------------------------------// @@ -861,11 +856,6 @@ bool Base::AcceptCard(Card* card) return retval; } -Base::~Base() -{ -// nothing special at the moment -}; - //----------------------------------------------------------------// // The Foundation class: holds the cards built up from the ace... // @@ -895,11 +885,6 @@ bool Foundation::AcceptCard(Card* card) return retval; } -Foundation::~Foundation() -{ -// nothing special at the moment -}; - //----------------------------------------------------// // The Discard class: holds cards dealt from the m_pack // @@ -981,7 +966,7 @@ Card* Discard::RemoveTopCard(wxDC& dc, int m_xOffset, int m_yOffset) for (int i = m_topCard - 31; i <= m_topCard - 31 + CardWidth / m_dx; i++) { - m_cards[i]->Draw(dc, m_x - m_xOffset + i * m_dx, m_y - m_yOffset); + m_cards[i]->Draw(dc, m_x - m_xOffset + i * m_dx, m_y - m_yOffset); } if (m_topCard > 31) { @@ -992,9 +977,3 @@ Card* Discard::RemoveTopCard(wxDC& dc, int m_xOffset, int m_yOffset) return card; } - - -Discard::~Discard() -{ -// nothing special at the moment -};