~ubuntu-branches/ubuntu/trusty/enigma/trusty

« back to all changes in this revision

Viewing changes to src/display.cc

  • Committer: Package Import Robot
  • Author(s): Erich Schubert
  • Date: 2012-06-19 21:47:22 UTC
  • mfrom: (5.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20120619214722-o8v3jobogn60iw68
Tags: 1.10~~pre-alpha+r2236-1
* New upstream checkout. No release on the horizon, but well playable.
* Acknowledge NMUs. Thank you!
* Drop suggest on enigma-level-previews which are not available for 1.10
* Update policy version, no changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
: Window(area),
89
89
  m_itemarea (),
90
90
  m_models(),
 
91
  player (enigma::YIN),
91
92
  m_changedp(false),
92
93
  m_textview (*enigma::GetFont("statusbarfont")),
93
94
  m_leveltime (0),
96
97
  m_showcounter_p(false),
97
98
  m_interruptible(true),
98
99
  m_text_active(false),
99
 
  player (enigma::YIN),
100
100
  playerImage (0),
101
101
  playerImageDuration (0),
102
102
  widthInit (false)
304
304
            }
305
305
        }
306
306
        else {                  // only moves            
307
 
            int x = timearea.x + (timearea.w - xsize_moves)/2;
308
 
            int y = timearea.y + (timearea.h - movesfont->get_lineskip())/2;
 
307
            x = timearea.x + (timearea.w - xsize_moves)/2;
 
308
            y = timearea.y + (timearea.h - movesfont->get_lineskip())/2;
309
309
            blit(gc, x, y, s_moves);
310
310
        }
311
311
 
318
318
    } else {
319
319
        client::Msg_FinishedText();
320
320
        int itemsize = static_cast<int>(vminfo->tile_size * 1.125);
321
 
        int x = m_itemarea.x;
 
321
        x = m_itemarea.x;
322
322
        for (unsigned i=0; i<m_models.size(); ++i) {
323
323
            Model *m = m_models[i];
324
324
            m->draw(gc, x, m_itemarea.y);
356
356
    // Animation of player indicator
357
357
    playerImageDuration += dtime;
358
358
    if ((player * 12 != playerImage) && (playerImageDuration > 0.1)) {
359
 
        playerImage = (++playerImage) % 24;
 
359
        playerImage = (playerImage+1) % 24;
360
360
        playerImageDuration = 0;
361
361
        m_changedp = true;
362
362
    }
711
711
    for (int x=wa.x; x<x2; x++, xpos += m_tilew) {
712
712
        int ypos = ypos0;
713
713
        for (int y=wa.y; y<y2; y++, ypos += m_tileh) {
714
 
            if (m_redrawp(x,y) == 1)
 
714
            if (m_redrawp(x,y) == 1) {
715
715
                if (y<y2m1 && m_redrawp(x,y+1) == 1) {
716
716
                    l->draw (gc, WorldArea(x,y,1,2), xpos, ypos);
717
717
                    y++;
718
718
                    ypos += m_tileh;
719
719
                } else
720
720
                    l->draw (gc, WorldArea(x,y,1,1), xpos, ypos);
 
721
            }
721
722
        }
722
723
    }
723
724
    l->draw_onepass (gc);
1056
1057
 
1057
1058
 
1058
1059
void DL_Sprites::draw_sprites (bool drawshadowp, GC &gc, const WorldArea &a) {
1059
 
    SpriteList &sl = sprites;
 
1060
//    SpriteList &sl = sprites;
1060
1061
 
1061
1062
//    for (unsigned i=0, sl_size=sl.size() ; i<sl_size; ++i) {
1062
1063
//        Sprite *s = sl[i];
1077
1078
    }
1078
1079
}
1079
1080
 
1080
 
void DL_Sprites::draw_onepass (ecl::GC &gc)
 
1081
void DL_Sprites::draw_onepass (ecl::GC &/*gc*/)
1081
1082
{
1082
1083
//     draw_sprites (false, gc);
1083
1084
}
1258
1259
        m_rubbers.erase(i);
1259
1260
}
1260
1261
 
1261
 
void DL_Lines::new_world (int w, int h) {
 
1262
void DL_Lines::new_world (int /*w*/, int /*h*/) {
1262
1263
    m_rubbers.clear();
1263
1264
    m_id = 1;
1264
1265
}