~ubuntu-branches/ubuntu/precise/gnome-games/precise-proposed

« back to all changes in this revision

Viewing changes to quadrapassel/preview.cpp

  • Committer: Package Import Robot
  • Author(s): Rodrigo Moya
  • Date: 2011-05-30 13:32:04 UTC
  • mfrom: (1.3.4)
  • mto: (163.1.3 precise)
  • mto: This revision was merged to the branch mainline in revision 143.
  • Revision ID: package-import@ubuntu.com-20110530133204-celaq1v1dsxc48q1
Tags: upstream-3.0.2
ImportĀ upstreamĀ versionĀ 3.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
        if (!cache)
92
92
                cache = blocks_cache_new ();
93
93
        blocks_cache_set_theme (cache, themeID);
94
 
        previewBlock (blocknr, color);
 
94
        previewBlock (blocknr, color, TRUE);
95
95
}
96
96
 
97
97
void
98
 
Preview::previewBlock(gint bnr, gint bcol)
 
98
Preview::previewBlock(gint bnr, gint bcol, bool force)
99
99
{
100
100
        ClutterActor *stage;
101
101
        stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (w));
102
102
 
103
103
        int x, y;
 
104
        bool disable = FALSE;
104
105
 
105
106
        blocknr = bnr;
106
107
        color = bcol;
107
108
 
 
109
        if(!force && (!do_preview || bastard_mode))
 
110
        {
 
111
                disable = TRUE;
 
112
        }
 
113
 
108
114
        for (x = 0; x < PREVIEW_WIDTH; x++) {
109
115
                for (y = 0; y < PREVIEW_HEIGHT; y++) {
110
 
                        if ((blocknr != -1) &&
 
116
                        if (!disable && 
 
117
                            (blocknr != -1) &&
111
118
                            blockTable[blocknr][rot_next][x][y]) {
112
119
                                blocks[x][y].emptyCell ();
113
120
                                blocks[x][y].what = LAYING;
141
148
        if (!p->cache)
142
149
                p->cache = blocks_cache_new ();
143
150
        blocks_cache_set_size (p->cache, p->cell_size);
144
 
        p->previewBlock (p->blocknr, p->color);
 
151
        p->previewBlock (p->blocknr, p->color, TRUE);
145
152
        return FALSE;
146
153
}
147
154