Use XPM for symbols and pictures on all platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,10 +36,8 @@
|
|||||||
#include "forty.h"
|
#include "forty.h"
|
||||||
#include "card.h"
|
#include "card.h"
|
||||||
|
|
||||||
#ifndef __WXMSW__
|
|
||||||
#include "pictures.xpm"
|
#include "pictures.xpm"
|
||||||
#include "symbols.xbm"
|
#include "symbols.xpm"
|
||||||
#endif
|
|
||||||
|
|
||||||
wxBitmap* Card::m_pictureBmap = 0;
|
wxBitmap* Card::m_pictureBmap = 0;
|
||||||
wxBitmap* Card::m_symbolBmap = 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(symbols_xpm);
|
||||||
m_symbolBmap = new wxBitmap(_T("CardSymbols"), wxBITMAP_TYPE_BMP_RESOURCE);
|
|
||||||
#else
|
|
||||||
m_symbolBmap = new wxBitmap(Symbols_bits, Symbols_width, Symbols_height);
|
|
||||||
#endif
|
|
||||||
if (!m_symbolBmap->Ok())
|
if (!m_symbolBmap->Ok())
|
||||||
{
|
{
|
||||||
::wxMessageBox(_T("Failed to load bitmap CardSymbols"), _T("Error"));
|
::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())
|
if (!m_pictureBmap->Ok())
|
||||||
{
|
{
|
||||||
::wxMessageBox(_T("Failed to load bitmap CardPictures"), _T("Error"));
|
::wxMessageBox(_T("Failed to load bitmap CardPictures"), _T("Error"));
|
||||||
|
@@ -3,6 +3,4 @@ aaaaa ICON "cards.ico"
|
|||||||
#include "wx/msw/wx.rc"
|
#include "wx/msw/wx.rc"
|
||||||
|
|
||||||
CardsIcon ICON "cards.ico"
|
CardsIcon ICON "cards.ico"
|
||||||
CardPictures BITMAP "pictures.bmp"
|
|
||||||
CardSymbols BITMAP "symbols.bmp"
|
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
@@ -1,93 +1,78 @@
|
|||||||
/* XPM */
|
/* XPM */
|
||||||
static char *symbols[] = {
|
static char *symbols_xpm[] = {
|
||||||
/* width height num_colors chars_per_pixel */
|
/* columns rows colors chars-per-pixel */
|
||||||
" 117 70 16 1",
|
"117 70 2 1",
|
||||||
/* colors */
|
". c Black",
|
||||||
"` c #ffffff",
|
" c #FFFFFF",
|
||||||
". c #ff0000",
|
|
||||||
"# c #000000",
|
|
||||||
"a c #b40000",
|
|
||||||
"b c #000000",
|
|
||||||
"c c #000000",
|
|
||||||
"d c #000000",
|
|
||||||
"e c #000000",
|
|
||||||
"f c #000000",
|
|
||||||
"g c #000000",
|
|
||||||
"h c #000000",
|
|
||||||
"i c #000000",
|
|
||||||
"j c #000000",
|
|
||||||
"k c #000000",
|
|
||||||
"l c #000000",
|
|
||||||
"m c #000000",
|
|
||||||
/* pixels */
|
/* pixels */
|
||||||
"```#``````.````..`..````#````````````````````````````````````````````````````````````````````````````````````````````",
|
" . . .. .. . ",
|
||||||
"``###````...``.......``###```````````````````````````````````````````````````````````````````````````````````````````",
|
" ... ... ....... ... ",
|
||||||
"`#`#`#``.....`.......`#####``````````````````````````````````````````````````````````````````````````````````````````",
|
" . . . ..... ....... ..... ",
|
||||||
"#######..............#######`````````````````````````````````````````````````````````````````````````````````````````",
|
"............................ ",
|
||||||
"`#`#`#``.....``.....``#####``````````````````````````````````````````````````````````````````````````````````````````",
|
" . . . ..... ..... ..... ",
|
||||||
"```#`````...````...`````#````````````````````````````````````````````````````````````````````````````````````````````",
|
" . ... ... . ",
|
||||||
"``###`````.``````.`````###```````````````````````````````````````````````````````````````````````````````````````````",
|
" ... . . ... ",
|
||||||
"``###`````.``````.`````###```````````````````````````````````````````````````````````````````````````````````````````",
|
" ... . . ... ",
|
||||||
"```#`````...````...`````#````````````````````````````````````````````````````````````````````````````````````````````",
|
" . ... ... . ",
|
||||||
"`#`#`#``.....``.....``#####``````````````````````````````````````````````````````````````````````````````````````````",
|
" . . . ..... ..... ..... ",
|
||||||
"#######..............#######`````````````````````````````````````````````````````````````````````````````````````````",
|
"............................ ",
|
||||||
"`#`#`#``.....`.......`#####``````````````````````````````````````````````````````````````````````````````````````````",
|
" . . . ..... ....... ..... ",
|
||||||
"``###````...``.......``###```````````````````````````````````````````````````````````````````````````````````````````",
|
" ... ... ....... ... ",
|
||||||
"```#``````.````..`..````#````````````````````````````````````````````````````````````````````````````````````````````",
|
" . . .. .. . ",
|
||||||
"````###`````````.```````..```..```````#``````````````````````````````````````````````````````````````````````````````",
|
" ... . .. .. . ",
|
||||||
"```#####```````...`````....`....`````###`````````````````````````````````````````````````````````````````````````````",
|
" ..... ... .... .... ... ",
|
||||||
"```#####```````...````...........```#####````````````````````````````````````````````````````````````````````````````",
|
" ..... ... ........... ..... ",
|
||||||
"````###```````.....```...........``#######```````````````````````````````````````````````````````````````````````````",
|
" ... ..... ........... ....... ",
|
||||||
"`##``#``##```.......``...........`#########``````````````````````````````````````````````````````````````````````````",
|
" .. . .. ....... ........... ......... ",
|
||||||
"####`#`####`.........`...........###########`````````````````````````````````````````````````````````````````````````",
|
".... . .... ......... ...................... ",
|
||||||
"###########``.......```.........`###########`````````````````````````````````````````````````````````````````````````",
|
"........... ....... ......... ........... ",
|
||||||
"####`#`####```.....`````.......``####`#`####`````````````````````````````````````````````````````````````````````````",
|
".... . .... ..... ....... .... . .... ",
|
||||||
"`##``#``##`````...```````.....````##``#``##``````````````````````````````````````````````````````````````````````````",
|
" .. . .. ... ..... .. . .. ",
|
||||||
"````###````````...````````...````````###`````````````````````````````````````````````````````````````````````````````",
|
" ... ... ... ... ",
|
||||||
"``#######```````.``````````.```````#######```````````````````````````````````````````````````````````````````````````",
|
" ....... . . ....... ",
|
||||||
"``#######```````.``````````.```````#######```````````````````````````````````````````````````````````````````````````",
|
" ....... . . ....... ",
|
||||||
"````###````````...````````...````````###`````````````````````````````````````````````````````````````````````````````",
|
" ... ... ... ... ",
|
||||||
"`##``#``##`````...```````.....````##``#``##``````````````````````````````````````````````````````````````````````````",
|
" .. . .. ... ..... .. . .. ",
|
||||||
"####`#`####```.....`````.......``####`#`####`````````````````````````````````````````````````````````````````````````",
|
".... . .... ..... ....... .... . .... ",
|
||||||
"###########``.......```.........`###########`````````````````````````````````````````````````````````````````````````",
|
"........... ....... ......... ........... ",
|
||||||
"####`#`####`.........`...........###########`````````````````````````````````````````````````````````````````````````",
|
".... . .... ......... ...................... ",
|
||||||
"`##``#``##```.......``...........`#########``````````````````````````````````````````````````````````````````````````",
|
" .. . .. ....... ........... ......... ",
|
||||||
"````###```````.....```...........``#######```````````````````````````````````````````````````````````````````````````",
|
" ... ..... ........... ....... ",
|
||||||
"```#####```````...````...........```#####````````````````````````````````````````````````````````````````````````````",
|
" ..... ... ........... ..... ",
|
||||||
"```#####```````...`````....`....`````###`````````````````````````````````````````````````````````````````````````````",
|
" ..... ... .... .... ... ",
|
||||||
"````###`````````.```````..```..```````#``````````````````````````````````````````````````````````````````````````````",
|
" ... . .. .. . ",
|
||||||
"``##````###``#####````#``#####``###``#####``###```###`#``##``#####``###``#```#```````````````````````````````````````",
|
" .. ... ..... . ..... ... ..... ... ... . .. ..... ... . . ",
|
||||||
"`#``#``#```#````#````##``#`````#`````````#`#```#`#```##`#``#````#``#```#`#``#````````````````````````````````````````",
|
" . . . . . .. . . . . . . .. . . . . . . . ",
|
||||||
"#````#`````#```#````#`#``####``#````````#``#```#`#```##`#``#````#``#```#`#`#`````````````````````````````````````````",
|
". . . . . . .... . . . . . .. . . . . . . . ",
|
||||||
"#````#```##```###``#``#``````#`####````#````###```#####`#``#````#``#```#`##``````````````````````````````````````````",
|
". . .. ... . . . .... . ... ..... . . . . . .. ",
|
||||||
"######``#````````#`#####`````#`#```#```#```#```#`````##`#``#````#``#`#`#`#`#`````````````````````````````````````````",
|
"...... . . ..... . . . . . . .. . . . . . . . . ",
|
||||||
"#````#`#`````#```#````#``#```#`#```#```#```#```#````#`#`#``#`#``#``#``#``#``#````````````````````````````````````````",
|
". . . . . . . . . . . . . . . . . . . . . . . ",
|
||||||
"#````#`#####``###`````#```###```###````#````###````#``#``##```##````##`#`#```#```````````````````````````````````````",
|
". . ..... ... . ... ... . ... . . .. .. .. . . . ",
|
||||||
"#````#`#####``###```#`````###```###````#````###````#```##``#```##``#`##``#```#```````````````````````````````````````",
|
". . ..... ... . ... ... . ... . .. . .. . .. . . ",
|
||||||
"#````#`````#`#```#``#````#```#`#```#```#```#```#``#```#``#`#``#``#``#``#``#``#```````````````````````````````````````",
|
". . . . . . . . . . . . . . . . . . . . . . . ",
|
||||||
"######````#``#`````#####`#`````#```#```#```#```#`#````#``#`#``#````#`#`#```#`#```````````````````````````````````````",
|
"...... . . ..... . . . . . . . . . . . . . . . . ",
|
||||||
"#````#``##````###```#``#`#`````#####```#````###``####`#``#`#``#````#```#````##```````````````````````````````````````",
|
". . .. ... . . . ..... . ... .... . . . . . . .. ",
|
||||||
"#````#`#```````#````#`#```####`````#``#````#```#`#```##``#`#``#````#```#```#`#```````````````````````````````````````",
|
". . . . . . .... . . . . . .. . . . . . . . ",
|
||||||
"`#``#``#```#``#`````##```````#`````#`#`````#```#`#```##``#`#``#````#```#``#``#```````````````````````````````````````",
|
" . . . . . .. . . . . . . .. . . . . . . . ",
|
||||||
"``##````###``#####``#````#####``###``#####``###```###``##``#`#####``###``#```#```````````````````````````````````````",
|
" ... ... ..... . ..... ... ..... ... ... .. . ..... ... . . ",
|
||||||
"```##``````#####```#######``````##```#######````####```#######```#####````#####``##``###```#######```#####```##````#`",
|
" .. ..... ....... .. ....... .... ....... ..... ..... .. ... ....... ..... .. . ",
|
||||||
"``####````#######``######``````###```#######```#####```#######``#######``#######`##`#####``#######``#######``##```##`",
|
" .... ....... ...... ... ....... ..... ....... ....... ....... .. ..... ....... ....... .. .. ",
|
||||||
"`######```##```##`````##``````####```##```````###``````````###``##```##``##```##`##`##`##``````##```##```##``##``###`",
|
" ...... .. .. .. .... .. ... ... .. .. .. .. .. .. .. .. .. .. .. ... ",
|
||||||
"###``###``````###````##``````#####```######```##``````````###```###`###``##```##`##`##`##``````##```##```##``##`###``",
|
"... ... ... .. ..... ...... .. ... ... ... .. .. .. .. .. .. .. .. .. ... ",
|
||||||
"##````##````####````####````###`##```#######``######`````###`````#####```#######`##`##`##``````##```##```##``#####```",
|
".. .. .... .... ... .. ....... ...... ... ..... ....... .. .. .. .. .. .. ..... ",
|
||||||
"########```####`````#####```##``##````````##``#######````##``````#####````######`##`##`##``````##```##```##``####````",
|
"........ .... ..... .. .. .. ....... .. ..... ...... .. .. .. .. .. .. .... ",
|
||||||
"########``###``````````###``#######```````##``##```##````##`````###`###``````###`##`##`##``````##```####`##``#####```",
|
"........ ... ... ....... .. .. .. .. ... ... ... .. .. .. .. .... .. ..... ",
|
||||||
"##````##``##```````##```##``#######``##```##``##```##````##`````##```##`````###``##`##`##``##``##```##`####``##`###``",
|
".. .. .. .. .. ....... .. .. .. .. .. .. .. ... .. .. .. .. .. .. .... .. ... ",
|
||||||
"##````##``#######``#######``````##```#######``#######````##`````#######````###```##`#####``######```######```##``###`",
|
".. .. ....... ....... .. ....... ....... .. ....... ... .. ..... ...... ...... .. ... ",
|
||||||
"##````##``#######```#####```````##````#####````#####`````##``````#####````###````##``###````####`````######``##```##`",
|
".. .. ....... ..... .. ..... ..... .. ..... ... .. ... .... ...... .. .. ",
|
||||||
"`##````##`#######```#####````##```````#####````#####``````##`````#####``````###````###``##```####```######```##```##`",
|
" .. .. ....... ..... .. ..... ..... .. ..... ... ... .. .... ...... .. .. ",
|
||||||
"`##````##`#######``#######```##``````#######``#######`````##````#######````###````#####`##``######```######``###``##`",
|
" .. .. ....... ....... .. ....... ....... .. ....... ... ..... .. ...... ...... ... .. ",
|
||||||
"`##````##``````##``##```##``#######``##```##``##```##`````##````##```##```###`````##`##`##``##``##``####`##```###`##`",
|
" .. .. .. .. .. ....... .. .. .. .. .. .. .. ... .. .. .. .. .. .... .. ... .. ",
|
||||||
"`########`````###``###``````#######``##```````##```##`````##````###`###``###``````##`##`##``##``````##`####````#####`",
|
" ........ ... ... ....... .. .. .. .. ... ... ... .. .. .. .. .. .... ..... ",
|
||||||
"`########```####````#####````##``##``##```````#######`````##`````#####```######```##`##`##``##``````##```##`````####`",
|
" ........ .... ..... .. .. .. ....... .. ..... ...... .. .. .. .. .. .. .... ",
|
||||||
"`##````##``####``````####````##`###``#######```######````###`````#####```#######``##`##`##``##``````##```##````#####`",
|
" .. .. .... .... .. ... ....... ...... ... ..... ....... .. .. .. .. .. .. ..... ",
|
||||||
"`###``###`###`````````##`````#####````######```````##```###`````###`###``##```##``##`##`##``##``````##```##```###`##`",
|
" ... ... ... .. ..... ...... .. ... ... ... .. .. .. .. .. .. .. .. ... .. ",
|
||||||
"``######``##```##````##``````####`````````##``````###``###``````##```##``##```##``##`##`##``##``````##```##``###``##`",
|
" ...... .. .. .. .... .. ... ... .. .. .. .. .. .. .. .. .. .. ... .. ",
|
||||||
"```####```#######```######```###`````#######```#####```#######``#######``#######``#####`##`#######``#######``##```##`",
|
" .... ....... ...... ... ....... ..... ....... ....... ....... ..... .. ....... ....... .. .. ",
|
||||||
"````##`````#####```#######```##``````#######```####````#######```#####````#####````###``##`#######```#####```#````##`"
|
" .. ..... ....... .. ....... .... ....... ..... ..... ... .. ....... ..... . .. "
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user