]> git.saurik.com Git - wxWidgets.git/commitdiff
Use XPM for symbols and pictures on all platforms
authorJulian Smart <julian@anthemion.co.uk>
Tue, 28 Mar 2006 11:12:48 +0000 (11:12 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 28 Mar 2006 11:12:48 +0000 (11:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

demos/forty/card.cpp
demos/forty/forty.rc
demos/forty/pictures.bmp [deleted file]
demos/forty/symbols.bmp [deleted file]
demos/forty/symbols.xpm

index 25c9d532a425a9c81352f36db6483bb111c141a1..7f126fdafad1687aa2a3c6fca16b95d5a36b9410 100644 (file)
 #include "forty.h"
 #include "card.h"
 
 #include "forty.h"
 #include "card.h"
 
-#ifndef __WXMSW__
 #include "pictures.xpm"
 #include "pictures.xpm"
-#include "symbols.xbm"
-#endif
+#include "symbols.xpm"
 
 wxBitmap* Card::m_pictureBmap = 0;
 wxBitmap* Card::m_symbolBmap = 0;
 
 wxBitmap* Card::m_pictureBmap = 0;
 wxBitmap* Card::m_symbolBmap = 0;
@@ -61,11 +59,7 @@ Card::Card(int value, WayUp way_up) :
 {
     if (!m_symbolBmap)
     {
 {
     if (!m_symbolBmap)
     {
-#ifdef __WXMSW__
-        m_symbolBmap = new wxBitmap(_T("CardSymbols"), wxBITMAP_TYPE_BMP_RESOURCE);
-#else
-        m_symbolBmap = new wxBitmap(Symbols_bits, Symbols_width, Symbols_height);
-#endif
+        m_symbolBmap = new wxBitmap(symbols_xpm);
         if (!m_symbolBmap->Ok())
         {
             ::wxMessageBox(_T("Failed to load bitmap CardSymbols"), _T("Error"));
         if (!m_symbolBmap->Ok())
         {
             ::wxMessageBox(_T("Failed to load bitmap CardSymbols"), _T("Error"));
@@ -73,11 +67,7 @@ Card::Card(int value, WayUp way_up) :
     }
     if (!m_pictureBmap)
     {
     }
     if (!m_pictureBmap)
     {
-#ifdef __WXMSW__
-        m_pictureBmap = new wxBitmap(_T("CardPictures"), wxBITMAP_TYPE_BMP_RESOURCE);
-#else
         m_pictureBmap = new wxBitmap(Pictures);
         m_pictureBmap = new wxBitmap(Pictures);
-#endif
         if (!m_pictureBmap->Ok())
         {
             ::wxMessageBox(_T("Failed to load bitmap CardPictures"), _T("Error"));
         if (!m_pictureBmap->Ok())
         {
             ::wxMessageBox(_T("Failed to load bitmap CardPictures"), _T("Error"));
index 8457ac83a3eeaa8c42b270fc017ca161ed6d367f..e1fb6e531d52b32fbb1be0288bfb8e9d356ae08a 100644 (file)
@@ -3,6 +3,4 @@ aaaaa    ICON   "cards.ico"
 #include "wx/msw/wx.rc"
 
 CardsIcon    ICON   "cards.ico"
 #include "wx/msw/wx.rc"
 
 CardsIcon    ICON   "cards.ico"
-CardPictures BITMAP "pictures.bmp"
-CardSymbols  BITMAP "symbols.bmp"
 
 
diff --git a/demos/forty/pictures.bmp b/demos/forty/pictures.bmp
deleted file mode 100644 (file)
index d8c3345..0000000
Binary files a/demos/forty/pictures.bmp and /dev/null differ
diff --git a/demos/forty/symbols.bmp b/demos/forty/symbols.bmp
deleted file mode 100644 (file)
index c993a06..0000000
Binary files a/demos/forty/symbols.bmp and /dev/null differ
index d15a98adffc145e7456aaac7e732b9d356dcb0df..b72ffb184944b52e3da16b49d461fd2daf0a80c4 100644 (file)
@@ -1,93 +1,78 @@
-/* XPM */\r
-static char *symbols[] = {\r
-/* width height num_colors chars_per_pixel */\r
-"   117    70       16            1",\r
-/* colors */\r
-"` c #ffffff",\r
-". c #ff0000",\r
-"# c #000000",\r
-"a c #b40000",\r
-"b c #000000",\r
-"c c #000000",\r
-"d c #000000",\r
-"e c #000000",\r
-"f c #000000",\r
-"g c #000000",\r
-"h c #000000",\r
-"i c #000000",\r
-"j c #000000",\r
-"k c #000000",\r
-"l c #000000",\r
-"m c #000000",\r
-/* pixels */\r
-"```#``````.````..`..````#````````````````````````````````````````````````````````````````````````````````````````````",\r
-"``###````...``.......``###```````````````````````````````````````````````````````````````````````````````````````````",\r
-"`#`#`#``.....`.......`#####``````````````````````````````````````````````````````````````````````````````````````````",\r
-"#######..............#######`````````````````````````````````````````````````````````````````````````````````````````",\r
-"`#`#`#``.....``.....``#####``````````````````````````````````````````````````````````````````````````````````````````",\r
-"```#`````...````...`````#````````````````````````````````````````````````````````````````````````````````````````````",\r
-"``###`````.``````.`````###```````````````````````````````````````````````````````````````````````````````````````````",\r
-"``###`````.``````.`````###```````````````````````````````````````````````````````````````````````````````````````````",\r
-"```#`````...````...`````#````````````````````````````````````````````````````````````````````````````````````````````",\r
-"`#`#`#``.....``.....``#####``````````````````````````````````````````````````````````````````````````````````````````",\r
-"#######..............#######`````````````````````````````````````````````````````````````````````````````````````````",\r
-"`#`#`#``.....`.......`#####``````````````````````````````````````````````````````````````````````````````````````````",\r
-"``###````...``.......``###```````````````````````````````````````````````````````````````````````````````````````````",\r
-"```#``````.````..`..````#````````````````````````````````````````````````````````````````````````````````````````````",\r
-"````###`````````.```````..```..```````#``````````````````````````````````````````````````````````````````````````````",\r
-"```#####```````...`````....`....`````###`````````````````````````````````````````````````````````````````````````````",\r
-"```#####```````...````...........```#####````````````````````````````````````````````````````````````````````````````",\r
-"````###```````.....```...........``#######```````````````````````````````````````````````````````````````````````````",\r
-"`##``#``##```.......``...........`#########``````````````````````````````````````````````````````````````````````````",\r
-"####`#`####`.........`...........###########`````````````````````````````````````````````````````````````````````````",\r
-"###########``.......```.........`###########`````````````````````````````````````````````````````````````````````````",\r
-"####`#`####```.....`````.......``####`#`####`````````````````````````````````````````````````````````````````````````",\r
-"`##``#``##`````...```````.....````##``#``##``````````````````````````````````````````````````````````````````````````",\r
-"````###````````...````````...````````###`````````````````````````````````````````````````````````````````````````````",\r
-"``#######```````.``````````.```````#######```````````````````````````````````````````````````````````````````````````",\r
-"``#######```````.``````````.```````#######```````````````````````````````````````````````````````````````````````````",\r
-"````###````````...````````...````````###`````````````````````````````````````````````````````````````````````````````",\r
-"`##``#``##`````...```````.....````##``#``##``````````````````````````````````````````````````````````````````````````",\r
-"####`#`####```.....`````.......``####`#`####`````````````````````````````````````````````````````````````````````````",\r
-"###########``.......```.........`###########`````````````````````````````````````````````````````````````````````````",\r
-"####`#`####`.........`...........###########`````````````````````````````````````````````````````````````````````````",\r
-"`##``#``##```.......``...........`#########``````````````````````````````````````````````````````````````````````````",\r
-"````###```````.....```...........``#######```````````````````````````````````````````````````````````````````````````",\r
-"```#####```````...````...........```#####````````````````````````````````````````````````````````````````````````````",\r
-"```#####```````...`````....`....`````###`````````````````````````````````````````````````````````````````````````````",\r
-"````###`````````.```````..```..```````#``````````````````````````````````````````````````````````````````````````````",\r
-"``##````###``#####````#``#####``###``#####``###```###`#``##``#####``###``#```#```````````````````````````````````````",\r
-"`#``#``#```#````#````##``#`````#`````````#`#```#`#```##`#``#````#``#```#`#``#````````````````````````````````````````",\r
-"#````#`````#```#````#`#``####``#````````#``#```#`#```##`#``#````#``#```#`#`#`````````````````````````````````````````",\r
-"#````#```##```###``#``#``````#`####````#````###```#####`#``#````#``#```#`##``````````````````````````````````````````",\r
-"######``#````````#`#####`````#`#```#```#```#```#`````##`#``#````#``#`#`#`#`#`````````````````````````````````````````",\r
-"#````#`#`````#```#````#``#```#`#```#```#```#```#````#`#`#``#`#``#``#``#``#``#````````````````````````````````````````",\r
-"#````#`#####``###`````#```###```###````#````###````#``#``##```##````##`#`#```#```````````````````````````````````````",\r
-"#````#`#####``###```#`````###```###````#````###````#```##``#```##``#`##``#```#```````````````````````````````````````",\r
-"#````#`````#`#```#``#````#```#`#```#```#```#```#``#```#``#`#``#``#``#``#``#``#```````````````````````````````````````",\r
-"######````#``#`````#####`#`````#```#```#```#```#`#````#``#`#``#````#`#`#```#`#```````````````````````````````````````",\r
-"#````#``##````###```#``#`#`````#####```#````###``####`#``#`#``#````#```#````##```````````````````````````````````````",\r
-"#````#`#```````#````#`#```####`````#``#````#```#`#```##``#`#``#````#```#```#`#```````````````````````````````````````",\r
-"`#``#``#```#``#`````##```````#`````#`#`````#```#`#```##``#`#``#````#```#``#``#```````````````````````````````````````",\r
-"``##````###``#####``#````#####``###``#####``###```###``##``#`#####``###``#```#```````````````````````````````````````",\r
-"```##``````#####```#######``````##```#######````####```#######```#####````#####``##``###```#######```#####```##````#`",\r
-"``####````#######``######``````###```#######```#####```#######``#######``#######`##`#####``#######``#######``##```##`",\r
-"`######```##```##`````##``````####```##```````###``````````###``##```##``##```##`##`##`##``````##```##```##``##``###`",\r
-"###``###``````###````##``````#####```######```##``````````###```###`###``##```##`##`##`##``````##```##```##``##`###``",\r
-"##````##````####````####````###`##```#######``######`````###`````#####```#######`##`##`##``````##```##```##``#####```",\r
-"########```####`````#####```##``##````````##``#######````##``````#####````######`##`##`##``````##```##```##``####````",\r
-"########``###``````````###``#######```````##``##```##````##`````###`###``````###`##`##`##``````##```####`##``#####```",\r
-"##````##``##```````##```##``#######``##```##``##```##````##`````##```##`````###``##`##`##``##``##```##`####``##`###``",\r
-"##````##``#######``#######``````##```#######``#######````##`````#######````###```##`#####``######```######```##``###`",\r
-"##````##``#######```#####```````##````#####````#####`````##``````#####````###````##``###````####`````######``##```##`",\r
-"`##````##`#######```#####````##```````#####````#####``````##`````#####``````###````###``##```####```######```##```##`",\r
-"`##````##`#######``#######```##``````#######``#######`````##````#######````###````#####`##``######```######``###``##`",\r
-"`##````##``````##``##```##``#######``##```##``##```##`````##````##```##```###`````##`##`##``##``##``####`##```###`##`",\r
-"`########`````###``###``````#######``##```````##```##`````##````###`###``###``````##`##`##``##``````##`####````#####`",\r
-"`########```####````#####````##``##``##```````#######`````##`````#####```######```##`##`##``##``````##```##`````####`",\r
-"`##````##``####``````####````##`###``#######```######````###`````#####```#######``##`##`##``##``````##```##````#####`",\r
-"`###``###`###`````````##`````#####````######```````##```###`````###`###``##```##``##`##`##``##``````##```##```###`##`",\r
-"``######``##```##````##``````####`````````##``````###``###``````##```##``##```##``##`##`##``##``````##```##``###``##`",\r
-"```####```#######```######```###`````#######```#####```#######``#######``#######``#####`##`#######``#######``##```##`",\r
-"````##`````#####```#######```##``````#######```####````#######```#####````#####````###``##`#######```#####```#````##`"\r
-};\r
+/* XPM */
+static char *symbols_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"117 70 2 1",
+". c Black",
+"  c #FFFFFF",
+/* pixels */
+"   .      .    .. ..    .                                                                                            ",
+"  ...    ...  .......  ...                                                                                           ",
+" . . .  ..... ....... .....                                                                                          ",
+"............................                                                                                         ",
+" . . .  .....  .....  .....                                                                                          ",
+"   .     ...    ...     .                                                                                            ",
+"  ...     .      .     ...                                                                                           ",
+"  ...     .      .     ...                                                                                           ",
+"   .     ...    ...     .                                                                                            ",
+" . . .  .....  .....  .....                                                                                          ",
+"............................                                                                                         ",
+" . . .  ..... ....... .....                                                                                          ",
+"  ...    ...  .......  ...                                                                                           ",
+"   .      .    .. ..    .                                                                                            ",
+"    ...         .       ..   ..       .                                                                              ",
+"   .....       ...     .... ....     ...                                                                             ",
+"   .....       ...    ...........   .....                                                                            ",
+"    ...       .....   ...........  .......                                                                           ",
+" ..  .  ..   .......  ........... .........                                                                          ",
+".... . .... ......... ......................                                                                         ",
+"...........  .......   ......... ...........                                                                         ",
+".... . ....   .....     .......  .... . ....                                                                         ",
+" ..  .  ..     ...       .....    ..  .  ..                                                                          ",
+"    ...        ...        ...        ...                                                                             ",
+"  .......       .          .       .......                                                                           ",
+"  .......       .          .       .......                                                                           ",
+"    ...        ...        ...        ...                                                                             ",
+" ..  .  ..     ...       .....    ..  .  ..                                                                          ",
+".... . ....   .....     .......  .... . ....                                                                         ",
+"...........  .......   ......... ...........                                                                         ",
+".... . .... ......... ......................                                                                         ",
+" ..  .  ..   .......  ........... .........                                                                          ",
+"    ...       .....   ...........  .......                                                                           ",
+"   .....       ...    ...........   .....                                                                            ",
+"   .....       ...     .... ....     ...                                                                             ",
+"    ...         .       ..   ..       .                                                                              ",
+"  ..    ...  .....    .  .....  ...  .....  ...   ... .  ..  .....  ...  .   .                                       ",
+" .  .  .   .    .    ..  .     .         . .   . .   .. .  .    .  .   . .  .                                        ",
+".    .     .   .    . .  ....  .        .  .   . .   .. .  .    .  .   . . .                                         ",
+".    .   ..   ...  .  .      . ....    .    ...   ..... .  .    .  .   . ..                                          ",
+"......  .        . .....     . .   .   .   .   .     .. .  .    .  . . . . .                                         ",
+".    . .     .   .    .  .   . .   .   .   .   .    . . .  . .  .  .  .  .  .                                        ",
+".    . .....  ...     .   ...   ...    .    ...    .  .  ..   ..    .. . .   .                                       ",
+".    . .....  ...   .     ...   ...    .    ...    .   ..  .   ..  . ..  .   .                                       ",
+".    .     . .   .  .    .   . .   .   .   .   .  .   .  . .  .  .  .  .  .  .                                       ",
+"......    .  .     ..... .     .   .   .   .   . .    .  . .  .    . . .   . .                                       ",
+".    .  ..    ...   .  . .     .....   .    ...  .... .  . .  .    .   .    ..                                       ",
+".    . .       .    . .   ....     .  .    .   . .   ..  . .  .    .   .   . .                                       ",
+" .  .  .   .  .     ..       .     . .     .   . .   ..  . .  .    .   .  .  .                                       ",
+"  ...   ...  .....  .    .....  ...  .....  ...   ...  ..  . .....  ...  .   .                                       ",
+"   ..      .....   .......      ..   .......    ....   .......   .....    .....  ..  ...   .......   .....   ..    . ",
+"  ....    .......  ......      ...   .......   .....   .......  .......  ....... .. .....  .......  .......  ..   .. ",
+" ......   ..   ..     ..      ....   ..       ...          ...  ..   ..  ..   .. .. .. ..      ..   ..   ..  ..  ... ",
+"...  ...      ...    ..      .....   ......   ..          ...   ... ...  ..   .. .. .. ..      ..   ..   ..  .. ...  ",
+"..    ..    ....    ....    ... ..   .......  ......     ...     .....   ....... .. .. ..      ..   ..   ..  .....   ",
+"........   ....     .....   ..  ..        ..  .......    ..      .....    ...... .. .. ..      ..   ..   ..  ....    ",
+"........  ...          ...  .......       ..  ..   ..    ..     ... ...      ... .. .. ..      ..   .... ..  .....   ",
+"..    ..  ..       ..   ..  .......  ..   ..  ..   ..    ..     ..   ..     ...  .. .. ..  ..  ..   .. ....  .. ...  ",
+"..    ..  .......  .......      ..   .......  .......    ..     .......    ...   .. .....  ......   ......   ..  ... ",
+"..    ..  .......   .....       ..    .....    .....     ..      .....    ...    ..  ...    ....     ......  ..   .. ",
+" ..    .. .......   .....    ..       .....    .....      ..     .....      ...    ...  ..   ....   ......   ..   .. ",
+" ..    .. .......  .......   ..      .......  .......     ..    .......    ...    ..... ..  ......   ......  ...  .. ",
+" ..    ..      ..  ..   ..  .......  ..   ..  ..   ..     ..    ..   ..   ...     .. .. ..  ..  ..  .... ..   ... .. ",
+" ........     ...  ...      .......  ..       ..   ..     ..    ... ...  ...      .. .. ..  ..      .. ....    ..... ",
+" ........   ....    .....    ..  ..  ..       .......     ..     .....   ......   .. .. ..  ..      ..   ..     .... ",
+" ..    ..  ....      ....    .. ...  .......   ......    ...     .....   .......  .. .. ..  ..      ..   ..    ..... ",
+" ...  ... ...         ..     .....    ......       ..   ...     ... ...  ..   ..  .. .. ..  ..      ..   ..   ... .. ",
+"  ......  ..   ..    ..      ....         ..      ...  ...      ..   ..  ..   ..  .. .. ..  ..      ..   ..  ...  .. ",
+"   ....   .......   ......   ...     .......   .....   .......  .......  .......  ..... .. .......  .......  ..   .. ",
+"    ..     .....   .......   ..      .......   ....    .......   .....    .....    ...  .. .......   .....   .    .. "
+};