Changeset 131 for trunk


Ignore:
Timestamp:
22/12/07 08:24:12 (6 years ago)
Author:
guyru
Message:

dice themes

Location:
trunk/OpenYahtzee
Files:
17 added
3 edited
6 moved

Legend:

Unmodified
Added
Removed
  • trunk/OpenYahtzee/src/Makefile.am

    r130 r131  
    11bin_PROGRAMS = openyahtzee 
    2 openyahtzee_SOURCES = openyahtzee.cpp MainFrame.cpp five.xpm four.xpm one.xpm \ 
    3         six.xpm three.xpm two.xpm DBwrapper.cpp DBwrapper.h SettingsDB.cpp \ 
    4         HighScoreTableDB.cpp HighScoreDialog.cpp SettingsDialog.cpp icon.xpm \ 
    5         icon32.xpm openyahtzee.rc wxDynamicBitmap.cpp About.cpp \ 
     2openyahtzee_SOURCES = openyahtzee.cpp MainFrame.cpp DBwrapper.cpp DBwrapper.h \ 
     3        SettingsDB.cpp HighScoreTableDB.cpp HighScoreDialog.cpp SettingsDialog.cpp \ 
     4        icon.xpm icon32.xpm openyahtzee.rc wxDynamicBitmap.cpp About.cpp \ 
    65        UtilityFunctions.cpp ScoreDice.cpp dice_graphics.cpp 
    76 
     
    1514        UtilityFunctions.h ScoreDice.h dice_graphics.cpp 
    1615 
     16noinst_dicedir = dice 
     17noinst_dice_HEADERS = dice/theme1/one.xpm dice/theme1/two.xpm dice/theme1/three.xpm \ 
     18        dice/theme1/four.xpm dice/theme1/five.xpm dice/theme1/six.xpm 
     19        dice/theme2/one.xpm dice/theme2/two.xpm dice/theme2/three.xpm \ 
     20        dice/theme2/four.xpm dice/theme2/five.xpm dice/theme2/six.xpm 
     21        dice/theme3/1.xpm dice/theme3/2.xpm dice/theme3/3.xpm \ 
     22        dice/theme3/4.xpm dice/theme3/5.xpm dice/theme3/6.xpm 
     23 
    1724AM_CXXFLAGS = `wx-config --cxxflags` 
    1825openyahtzee_LDADD = -lsqlite3 
  • trunk/OpenYahtzee/src/dice/theme1/five.xpm

    r124 r131  
    11/* XPM */ 
    2 static char *five_xpm[] = { 
     2static char *theme1_five_xpm[] = { 
    33/* columns rows colors chars-per-pixel */ 
    44"64 64 246 2", 
  • trunk/OpenYahtzee/src/dice/theme1/four.xpm

    r124 r131  
    11/* XPM */ 
    2 static char *four_xpm[] = { 
     2static char *theme1_four_xpm[] = { 
    33/* columns rows colors chars-per-pixel */ 
    44"64 64 221 2", 
  • trunk/OpenYahtzee/src/dice/theme1/one.xpm

    r124 r131  
    11/* XPM */ 
    2 static char *one_xpm[] = { 
     2static char *theme1_one_xpm[] = { 
    33/* columns rows colors chars-per-pixel */ 
    44"64 64 203 2", 
  • trunk/OpenYahtzee/src/dice/theme1/six.xpm

    r124 r131  
    11/* XPM */ 
    2 static char *six_xpm[] = { 
     2static char *theme1_six_xpm[] = { 
    33/* columns rows colors chars-per-pixel */ 
    44"64 64 255 2", 
  • trunk/OpenYahtzee/src/dice/theme1/three.xpm

    r124 r131  
    11/* XPM */ 
    2 static char *three_xpm[] = { 
     2static char *theme1_three_xpm[] = { 
    33/* columns rows colors chars-per-pixel */ 
    44"64 64 227 2", 
  • trunk/OpenYahtzee/src/dice/theme1/two.xpm

    r124 r131  
    11/* XPM */ 
    2 static char *two_xpm[] = { 
     2static char *theme1_two_xpm[] = { 
    33/* columns rows colors chars-per-pixel */ 
    44"64 64 218 2", 
  • trunk/OpenYahtzee/src/dice_graphics.cpp

    r130 r131  
    2121#include "dice_graphics.h" 
    2222 
    23 #include "one.xpm" 
    24 #include "two.xpm" 
    25 #include "three.xpm" 
    26 #include "four.xpm" 
    27 #include "five.xpm" 
    28 #include "six.xpm" 
     23#include "dice/theme1/one.xpm" 
     24#include "dice/theme1/two.xpm" 
     25#include "dice/theme1/three.xpm" 
     26#include "dice/theme1/four.xpm" 
     27#include "dice/theme1/five.xpm" 
     28#include "dice/theme1/six.xpm" 
     29 
     30#include "dice/theme2/one.xpm" 
     31#include "dice/theme2/two.xpm" 
     32#include "dice/theme2/three.xpm" 
     33#include "dice/theme2/four.xpm" 
     34#include "dice/theme2/five.xpm" 
     35#include "dice/theme2/six.xpm" 
     36 
     37#include "dice/theme3/1.xpm" 
     38#include "dice/theme3/2.xpm" 
     39#include "dice/theme3/3.xpm" 
     40#include "dice/theme3/4.xpm" 
     41#include "dice/theme3/5.xpm" 
     42#include "dice/theme3/6.xpm" 
    2943 
    3044DiceGraphics::DiceGraphics() 
     
    3347 
    3448        LoadTheme1(); 
     49        LoadTheme2(); 
     50        LoadTheme3(); 
    3551} 
     52 
    3653void DiceGraphics::LoadTheme1() 
    3754{ 
    38         m_bitmaps[0][0] = new wxBitmap(one_xpm); 
    39         m_bitmaps[0][1] = new wxBitmap(two_xpm); 
    40         m_bitmaps[0][2] = new wxBitmap(three_xpm); 
    41         m_bitmaps[0][3] = new wxBitmap(four_xpm); 
    42         m_bitmaps[0][4] = new wxBitmap(five_xpm); 
    43         m_bitmaps[0][5] = new wxBitmap(six_xpm); 
     55        m_bitmaps[0][0] = new wxBitmap(theme1_one_xpm); 
     56        m_bitmaps[0][1] = new wxBitmap(theme1_two_xpm); 
     57        m_bitmaps[0][2] = new wxBitmap(theme1_three_xpm); 
     58        m_bitmaps[0][3] = new wxBitmap(theme1_four_xpm); 
     59        m_bitmaps[0][4] = new wxBitmap(theme1_five_xpm); 
     60        m_bitmaps[0][5] = new wxBitmap(theme1_six_xpm); 
     61} 
     62 
     63void DiceGraphics::LoadTheme2() 
     64{ 
     65        m_bitmaps[1][0] = new wxBitmap(theme2_one_xpm); 
     66        m_bitmaps[1][1] = new wxBitmap(theme2_two_xpm); 
     67        m_bitmaps[1][2] = new wxBitmap(theme2_three_xpm); 
     68        m_bitmaps[1][3] = new wxBitmap(theme2_four_xpm); 
     69        m_bitmaps[1][4] = new wxBitmap(theme2_five_xpm); 
     70        m_bitmaps[1][5] = new wxBitmap(theme2_six_xpm); 
     71} 
     72 
     73void DiceGraphics::LoadTheme3() 
     74{ 
     75        m_bitmaps[2][0] = new wxBitmap(theme3_1_xpm); 
     76        m_bitmaps[2][1] = new wxBitmap(theme3_2_xpm); 
     77        m_bitmaps[2][2] = new wxBitmap(theme3_3_xpm); 
     78        m_bitmaps[2][3] = new wxBitmap(theme3_4_xpm); 
     79        m_bitmaps[2][4] = new wxBitmap(theme3_5_xpm); 
     80        m_bitmaps[2][5] = new wxBitmap(theme3_6_xpm); 
    4481} 
    4582/** 
  • trunk/OpenYahtzee/src/dice_graphics.h

    r130 r131  
    2222 
    2323#include <wx/bitmap.h> 
     24#define NUM_OF_THEMES 3 
    2425 
    2526class DiceGraphics { 
     
    3132        void LoadTheme1(); 
    3233        void LoadTheme2(); 
    33         wxBitmap *m_bitmaps[1][6]; 
     34        void LoadTheme3(); 
     35        wxBitmap *m_bitmaps[ NUM_OF_THEMES ][6]; 
    3436        int m_theme; 
    3537 
Note: See TracChangeset for help on using the changeset viewer.