]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/forty/card.cpp
Borland fixes.
[wxWidgets.git] / demos / forty / card.cpp
index 41ff006cd855b43d29e327f52960f421624c0e3c..c68a3b8d717921b3036c6e6c786e5d7f67eb7f75 100644 (file)
@@ -133,17 +133,6 @@ void Card::SetScale(double scale)
     m_height = int(70*scale);
 }
 
-//+-------------------------------------------------------------+
-//| Card::~Card()                                               |
-//+-------------------------------------------------------------+
-//| Description:                                                |
-//| Destructor - nothing to do at present.                      |
-//+-------------------------------------------------------------+
-Card::~Card()
-{
-}
-
-
 //+-------------------------------------------------------------+
 //| Card::Erase()                                               |
 //+-------------------------------------------------------------+
@@ -255,272 +244,272 @@ void Card::Draw(wxDC& dc, int x, int y)
         // Draw the value
         dc.Blit((wxCoord)(x + m_scale*3),
                 (wxCoord)(y + m_scale*3),
-                valuewidth, 
+                valuewidth,
                 valueheight,
-                &memoryDC, 
-                valuewidth * (m_pipValue - 1), 
-                valuepos, 
+                &memoryDC,
+                valuewidth * (m_pipValue - 1),
+                valuepos,
                 wxCOPY);
-        dc.Blit((wxCoord)(x + m_width - m_scale*3 - valuewidth), 
+        dc.Blit((wxCoord)(x + m_width - m_scale*3 - valuewidth),
                 (wxCoord)(y + m_height - valueheight - m_scale*3),
-                valuewidth, 
+                valuewidth,
                 valueheight,
-                &memoryDC, 
-                valuewidth * (m_pipValue - 1), 
-                valuepos+valueheight, 
+                &memoryDC,
+                valuewidth * (m_pipValue - 1),
+                valuepos+valueheight,
                 wxCOPY);
 
         // Draw the pips
-        dc.Blit((wxCoord)(x + m_scale*3 + valuewidth+2), 
-                (wxCoord)(y + m_scale*3), 
-                pipsize, 
+        dc.Blit((wxCoord)(x + m_scale*3 + valuewidth+2),
+                (wxCoord)(y + m_scale*3),
                 pipsize,
-                &memoryDC, 
-                pipsize * m_suit, 
-                pippos, 
+                pipsize,
+                &memoryDC,
+                pipsize * m_suit,
+                pippos,
                 wxCOPY);
-        dc.Blit((wxCoord)(x + m_width - m_scale*3-valuewidth-pipsize-2), 
+        dc.Blit((wxCoord)(x + m_width - m_scale*3-valuewidth-pipsize-2),
                 (wxCoord)(y + m_height - pipsize - m_scale*3),
-                pipsize, 
                 pipsize,
-                &memoryDC, 
-                pipsize * m_suit, 
-                pipsize+pippos, 
+                pipsize,
+                &memoryDC,
+                pipsize * m_suit,
+                pipsize+pippos,
                 wxCOPY);
 
         switch (m_pipValue)
         {
         case 1:
-            dc.Blit((wxCoord)(x - symdist + m_width / 2), 
-                    (wxCoord)(y - m_scale*5 + m_height / 2), 
-                    symsize, 
+            dc.Blit((wxCoord)(x - symdist + m_width / 2),
+                    (wxCoord)(y - m_scale*5 + m_height / 2),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             break;
 
         case 3:
-            dc.Blit((wxCoord)(x - symdist + m_width / 2), 
-                    (wxCoord)(y - symdist + m_height / 2), 
-                    symsize, 
+            dc.Blit((wxCoord)(x - symdist + m_width / 2),
+                    (wxCoord)(y - symdist + m_height / 2),
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    symsize,
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
         case 2:
             dc.Blit((wxCoord)(x - symdist + m_width / 2),
-                    (wxCoord)(y - symdist + m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + m_height / 4),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + m_width / 2),
-                    (wxCoord)(y - symdist + 3 * m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 3 * m_height / 4),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
             break;
 
         case 5:
-            dc.Blit((wxCoord)(x - symdist + m_width / 2), 
-                    (wxCoord)(y - symdist + m_height / 2), 
-                    symsize, 
+            dc.Blit((wxCoord)(x - symdist + m_width / 2),
+                    (wxCoord)(y - symdist + m_height / 2),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
         case 4:
             dc.Blit((wxCoord)(x - symdist +  m_width / 4),
-                    (wxCoord)(y - symdist + m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + m_height / 4),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + m_width / 4),
-                    (wxCoord)(y - symdist + 3 * m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 3 * m_height / 4),
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    symsize,
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
-                    (wxCoord)(y - symdist + m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + m_height / 4),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
-                    (wxCoord)(y - symdist + 3 * m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 3 * m_height / 4),
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    symsize,
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
             break;
 
         case 8:
             dc.Blit((wxCoord)(x - symdist + 5 * m_width / 10),
-                    (wxCoord)(y - symdist + 5 * m_height / 8), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 5 * m_height / 8),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
         case 7:
             dc.Blit((wxCoord)(x - symdist + 5 * m_width / 10),
-                    (wxCoord)(y - symdist + 3 * m_height / 8), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 3 * m_height / 8),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
         case 6:
             dc.Blit((wxCoord)(x - symdist + m_width / 4),
-                    (wxCoord)(y - symdist + m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + m_height / 4),
+                    symsize,
                     symsize,
                     &memoryDC, symsize * m_suit, sympos, wxCOPY);
             dc.Blit((wxCoord)(x - symdist + m_width / 4),
-                    (wxCoord)(y - symdist + m_height / 2), 
-                    symsize, 
+                    (wxCoord)(y - symdist + m_height / 2),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + m_width / 4),
-                    (wxCoord)(y - symdist + 3 * m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 3 * m_height / 4),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
-                    (wxCoord)(y - symdist + m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + m_height / 4),
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    symsize,
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
-                    (wxCoord)(y - symdist + m_height / 2), 
-                    symsize, 
+                    (wxCoord)(y - symdist + m_height / 2),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
-                    (wxCoord)(y - symdist + 3 * m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 3 * m_height / 4),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
             break;
 
         case 10:
             dc.Blit((wxCoord)(x - symdist + m_width / 2),
-                    (wxCoord)(y - symdist + 2 * m_height / 3), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 2 * m_height / 3),
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    symsize,
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
         case 9:
             dc.Blit((wxCoord)(x - symdist + m_width / 4),
-                    (wxCoord)(y - symdist2 + m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist2 + m_height / 4),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + m_width / 4),
-                    (wxCoord)(y - symdist2 + 5 * m_height / 12), 
-                    symsize, 
+                    (wxCoord)(y - symdist2 + 5 * m_height / 12),
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    symsize,
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + m_width / 4),
-                    (wxCoord)(y - symdist + 7 * m_height / 12), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 7 * m_height / 12),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + m_width / 4),
-                    (wxCoord)(y - symdist + 3 * m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 3 * m_height / 4),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
 
             dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
-                    (wxCoord)(y - symdist2 + m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist2 + m_height / 4),
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    symsize,
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
-                    (wxCoord)(y - symdist2 + 5 * m_height / 12), 
-                    symsize, 
+                    (wxCoord)(y - symdist2 + 5 * m_height / 12),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
-                    (wxCoord)(y - symdist + 7 * m_height / 12), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 7 * m_height / 12),
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    symsize,
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
-                    (wxCoord)(y - symdist + 3 * m_height / 4), 
-                    symsize, 
+                    (wxCoord)(y - symdist + 3 * m_height / 4),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
             dc.Blit((wxCoord)(x - symdist + m_width / 2),
-                    (wxCoord)(y - symdist + m_height / 3), 
-                    symsize, 
+                    (wxCoord)(y - symdist + m_height / 3),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             break;
         case 11:
@@ -528,31 +517,31 @@ void Card::Draw(wxDC& dc, int x, int y)
         case 13:
             memoryDC.SelectObject(*m_pictureBmap);
             int picwidth = 40,picheight = 45;
-            dc.Blit((wxCoord)(x + (m_width-picwidth)/2), 
+            dc.Blit((wxCoord)(x + (m_width-picwidth)/2),
                     (wxCoord)(y - picheight/2 + m_height/2),
-                    picwidth, 
+                    picwidth,
                     picheight,
-                    &memoryDC, 
-                    picwidth * (m_pipValue - 11), 
-                    0, 
+                    &memoryDC,
+                    picwidth * (m_pipValue - 11),
+                    0,
                     wxCOPY);
 
             memoryDC.SelectObject(*m_symbolBmap);
             dc.Blit((wxCoord)(x + m_width-(m_width-picwidth)/2-symsize-3),
-                    (wxCoord)(y - picheight/2+m_height/2+1), 
-                    symsize, 
+                    (wxCoord)(y - picheight/2+m_height/2+1),
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos, 
+                    symsize,
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos,
                     wxCOPY);
             dc.Blit((wxCoord)(x + (m_width-picwidth)/2+2),
-                    (wxCoord)(y + picheight/2 + m_height/2-symsize), 
-                    symsize, 
+                    (wxCoord)(y + picheight/2 + m_height/2-symsize),
+                    symsize,
                     symsize,
-                    &memoryDC, 
-                    symsize * m_suit, 
-                    sympos2, 
+                    &memoryDC,
+                    symsize * m_suit,
+                    sympos2,
                     wxCOPY);
             break;
         }