Hello community,

here is the log from the commit of package kbounce for openSUSE:Factory checked 
in at 2014-07-16 16:16:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kbounce (Old)
 and      /work/SRC/openSUSE:Factory/.kbounce.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kbounce"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kbounce/kbounce.changes  2014-06-19 
13:17:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kbounce.new/kbounce.changes     2014-07-16 
16:17:05.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Jul 10 22:16:36 UTC 2014 - cgiboude...@gmx.com
+
+- Update to 4.13.80
+   * KDE 4.14 Beta 1 release
+   * See http://www.kde.org/announcements/announce-4.14-beta1.php
+
+-------------------------------------------------------------------

Old:
----
  kbounce-4.13.2.tar.xz

New:
----
  kbounce-4.13.80.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kbounce.spec ++++++
--- /var/tmp/diff_new_pack.CMQXs1/_old  2014-07-16 16:17:06.000000000 +0200
+++ /var/tmp/diff_new_pack.CMQXs1/_new  2014-07-16 16:17:06.000000000 +0200
@@ -23,7 +23,7 @@
 License:        LGPL-2.0+
 Group:          Amusements/Games/Action/Other
 Url:            http://www.kde.org
-Version:        4.13.2
+Version:        4.13.80
 Release:        0
 Source0:        kbounce-%{version}.tar.xz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ kbounce-4.13.2.tar.xz -> kbounce-4.13.80.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kbounce-4.13.2/board.cpp 
new/kbounce-4.13.80/board.cpp
--- old/kbounce-4.13.2/board.cpp        2013-07-10 11:54:12.000000000 +0200
+++ new/kbounce-4.13.80/board.cpp       2014-05-15 02:55:33.000000000 +0200
@@ -22,6 +22,7 @@
 #include <KGlobal>
 #include <KRandom>
 
+#include <QGraphicsScene>
 #include <QTimer>
 #include <QPainter>
 
@@ -41,10 +42,6 @@
 : QGraphicsObject()
 , m_renderer( renderer )
 {
-    m_tilesPix = new QGraphicsPixmapItem( this );
-    m_tilesPix->setPos( QPointF( 0, 0 ) );
-    m_tilesPix->hide();
-
     m_clock = new QTimer( this );
     m_clock->setInterval( GAME_DELAY );
     connect( m_clock, SIGNAL(timeout()), this, SLOT(tick()) );
@@ -71,7 +68,6 @@
 {
     qDeleteAll( m_balls );
     qDeleteAll( m_walls );
-    delete m_tilesPix;
 }
 
 void KBounceBoard::resize( QSize& size )
@@ -89,16 +85,21 @@
     }
                 
     int minTileSize;
-    if ( TILE_NUM_H * size.width() - TILE_NUM_W * size.height() > 0 )
-       minTileSize = size.height() / TILE_NUM_H;
-    else
-       minTileSize = size.width() / TILE_NUM_W;
+    if ( TILE_NUM_H * size.width() - TILE_NUM_W * size.height() > 0 ) {
+        minTileSize = size.height() / TILE_NUM_H;
+    } else {
+        minTileSize = size.width() / TILE_NUM_W;
+    }
 
     m_tileSize = QSize( minTileSize, minTileSize );
-    foreach( KBounceBall* ball, m_balls )
-       ball->resize( m_tileSize );
-    foreach( KBounceWall* wall, m_walls )
-       wall->resize( m_tileSize );
+
+    foreach( KBounceBall* ball, m_balls ) {
+        ball->resize( m_tileSize );
+    }
+
+    foreach( KBounceWall* wall, m_walls ) {
+        wall->resize( m_tileSize );
+    }
 
     size.setWidth( minTileSize * TILE_NUM_W );
     size.setHeight( minTileSize * TILE_NUM_H );
@@ -108,52 +109,6 @@
     }
 }
 
-void KBounceBoard::paint(QPainter * p, const QStyleOptionGraphicsItem *, 
QWidget *)
-{
-    if ( m_tileSize.isEmpty() ) {
-        m_tilesPix->setPixmap( QPixmap() );
-        m_tilesPix->hide();
-    }
-    else {
-        QPixmap px( m_tileSize.width()  * TILE_NUM_W,
-                    m_tileSize.height() * TILE_NUM_H );
-       px.fill( QColor( 0, 0, 0, 0 ) );
-       p->drawPixmap( 0, 0, px );
-
-       for ( int i = 0; i < TILE_NUM_W; i++ ) {
-           for ( int j = 0; j < TILE_NUM_H; j++ ) {
-                switch ( m_tiles[i][j] ) {
-                case Free:
-                    p->drawPixmap(
-                            i * m_tileSize.width(),
-                            j * m_tileSize.height(),
-                            m_renderer->spritePixmap( "gridTile", m_tileSize )
-                    );
-                break;
-
-                case Border:
-                case Wall:
-                    p->drawPixmap(
-                            i * m_tileSize.width(),
-                            j * m_tileSize.height(),
-                            m_renderer->spritePixmap( "wallTile", m_tileSize )
-                    );
-                break;
-
-                default:
-                break;
-                }
-           }
-       }
-
-       m_tilesPix->setPixmap( px );
-       m_tilesPix->show();
-    }
-
-    foreach( KBounceWall* wall, m_walls )
-        wall->update();
-}
-
 void KBounceBoard::newLevel( int level )
 {
     m_clock->stop();
@@ -390,6 +345,35 @@
        }
 }
 
+QPixmap KBounceBoard::applyWallsOn(QPixmap background) const
+{
+    if (m_tileSize.isEmpty())
+        return background;
+
+    QPixmap walledBackground = background;
+    const QPixmap gridTile = m_renderer->spritePixmap("gridTile", m_tileSize);
+    const QPixmap wallTile = m_renderer->spritePixmap("wallTile", m_tileSize);
+    QPainter p(&walledBackground);
+    for (int i = 0; i < TILE_NUM_W; ++i) {
+        for (int j = 0; j < TILE_NUM_H; ++j) {
+            switch (m_tiles[i][j]) {
+            case Free:
+                p.drawPixmap(x() + i * m_tileSize.width(), y() + j * 
m_tileSize.height(), gridTile);
+                break;
+
+            case Border:
+            case Wall:
+                p.drawPixmap(x() + i * m_tileSize.width(), y() + j * 
m_tileSize.height(), wallTile);
+                break;
+
+            default:
+                break;
+            }
+        }
+    }
+    return walledBackground;
+}
+
 void KBounceBoard::wallFinished( int x1, int y1, int x2, int y2 )
 {
     for ( int x = x1; x < x2; x++ )
@@ -426,6 +410,8 @@
                filled++;
     m_filled = filled * 100 / ( ( TILE_NUM_W - 2 ) * ( TILE_NUM_H - 2 ) );
 
+    scene()->setBackgroundBrush(applyWallsOn(m_renderer->renderBackground()));
+
     emit fillChanged( m_filled );
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kbounce-4.13.2/board.h new/kbounce-4.13.80/board.h
--- old/kbounce-4.13.2/board.h  2013-07-10 11:54:12.000000000 +0200
+++ new/kbounce-4.13.80/board.h 2014-05-15 02:55:33.000000000 +0200
@@ -45,8 +45,9 @@
        explicit KBounceBoard( KBounceRenderer *renderer );
        ~KBounceBoard();
 
+    QPixmap applyWallsOn(QPixmap background) const;
        void resize( QSize& size );
-        void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
+    void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) {}
 
        void newLevel( int level );
        void setPaused( bool );
@@ -81,7 +82,6 @@
        KBounceRenderer* m_renderer;
 
        TileType m_tiles[TILE_NUM_W][TILE_NUM_H];
-       QGraphicsPixmapItem* m_tilesPix;
        QSize m_tileSize;
        int m_filled;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kbounce-4.13.2/gameobject.h 
new/kbounce-4.13.80/gameobject.h
--- old/kbounce-4.13.2/gameobject.h     2013-07-10 11:54:12.000000000 +0200
+++ new/kbounce-4.13.80/gameobject.h    2014-05-15 02:55:33.000000000 +0200
@@ -87,7 +87,7 @@
 
 typedef QList<KBounceHit> KBounceCollision;
 
-#define GAME_DELAY 15 
+#define GAME_DELAY 16
 #define MS2TICKS( ms ) ((ms)/GAME_DELAY)
 #define SOUND_DELAY MS2TICKS( 60 ) 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kbounce-4.13.2/gamewidget.cpp 
new/kbounce-4.13.80/gamewidget.cpp
--- old/kbounce-4.13.2/gamewidget.cpp   2013-07-10 11:54:12.000000000 +0200
+++ new/kbounce-4.13.80/gamewidget.cpp  2014-05-15 02:55:33.000000000 +0200
@@ -18,6 +18,7 @@
 
 #include "gamewidget.h"
 #include "settings.h"
+#include "wall.h"
 
 #include <QPalette>
 #include <QTimer>
@@ -168,7 +169,6 @@
     {
         m_renderer.setCustomBackgroundPath(QString());
     }
-   
     redraw();
 }
 
@@ -365,7 +365,8 @@
     }
 
     updateCursor();
-    m_scene.setBackgroundBrush( m_renderer.renderBackground() );
+    KBounceWall::loadSprites();
+    m_scene.setBackgroundBrush( 
m_board->applyWallsOn(m_renderer.renderBackground()) );
     update();
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kbounce-4.13.2/wall.cpp new/kbounce-4.13.80/wall.cpp
--- old/kbounce-4.13.2/wall.cpp 2013-07-10 11:54:12.000000000 +0200
+++ new/kbounce-4.13.80/wall.cpp        2014-05-15 02:55:33.000000000 +0200
@@ -29,17 +29,28 @@
 #include "renderer.h"
 #include "settings.h"
 
+QSize KBounceWall::s_tileSize;
+KBounceRenderer * KBounceWall::m_renderer = NULL;
+KBounceWall::Sprites * KBounceWall::s_sprites = NULL;
+
+
 KBounceWall::KBounceWall( Direction dir, KBounceRenderer* renderer, 
KBounceBoard* board )
 : KGameRenderedItem( renderer,"",board )
-, m_renderer( renderer )
 , m_board( board )
 , m_dir( dir )
-, m_tileSize( QSize( 16, 16 ) )
 , m_soundWallstart( KStandardDirs::locate( "appdata", "sounds/wallstart.wav" ) 
)
 , m_soundReflect( KStandardDirs::locate( "appdata", "sounds/reflect.wav" ) )
 {
     // The wall velocity would initialised on every new level.
     m_wallVelocity = 0.0;
+
+    if (!s_sprites) {
+        s_sprites = new Sprites;
+    }
+
+    if (!m_renderer) {
+        m_renderer = renderer;
+    }
 }
 
 KBounceWall::~KBounceWall()
@@ -48,197 +59,174 @@
 
 void KBounceWall::collide( KBounceCollision collision )
 {
-       if ( !isVisible() )
-       return;
+    if ( !isVisible() )
+        return;
 
-       foreach( const KBounceHit &hit, collision )
-       {
-           switch (hit.type)
-           {
-                       case ALL:
-                               break;
-                       case TILE:
-                               finish();
-                               break;
-                       case BALL:
-                               if ( safeEdgeHit( hit.boundingRect ) )
-                               {
-                                   KBounceVector normal = hit.normal;
-                                   bool vertical = qAbs(normal.x) < 
qAbs(normal.y);
-
-                                   if ( vertical && ( (m_dir == Up) || (m_dir 
== Down) ) )
-                                   {
-                                       finish( true, m_dir );
-                                   }
-                                   if ( !vertical && ( (m_dir == Left) || 
(m_dir == Right ) ) )
-                                   {
-                                       finish( true, m_dir );
-                                   }
-                               }
-                               else
-                               {
-                                   emit died();
-                                   hide();
-                               }
-                               break;
-                       case WALL:
-                               if ( safeEdgeHit( hit.boundingRect ) )
-                               {
-                                   finish();
-                               }
-                               break;
-           }
-       }
+    foreach( const KBounceHit &hit, collision ) {
+        switch (hit.type) {
+        case ALL:
+            break;
+        case TILE:
+            finish();
+            break;
+        case BALL:
+            if (safeEdgeHit(hit.boundingRect)) {
+                KBounceVector normal = hit.normal;
+                if (qAbs(normal.x) < qAbs(normal.y)) { // vertical
+                    if (m_dir == Up || m_dir == Down) {
+                        finish( true, m_dir );
+                    }
+                }
+                else if (m_dir == Left || m_dir == Right) {
+                    finish( true, m_dir );
+                }
+            } else {
+                emit died();
+                hide();
+            }
+            break;
+        case WALL:
+            if (safeEdgeHit(hit.boundingRect)) {
+                finish();
+            }
+            break;
+        }
+    }
 }
 
 
 void KBounceWall::goForward()
 {
-       if ( !isVisible() )
-       {
-               return;
-       }
+    if (!isVisible()) {
+        return;
+    }
 
-       switch( m_dir )
-       {
-       case Up:
-           m_boundingRect.setTop( m_boundingRect.top() - m_wallVelocity );
-           m_nextBoundingRect.setTop( m_boundingRect.top() - m_wallVelocity );
-           break;
-       case Left:
-           m_boundingRect.setLeft( m_boundingRect.left() - m_wallVelocity );
-           m_nextBoundingRect.setLeft( m_boundingRect.left() - m_wallVelocity 
);
-           break;
-       case Down:
-           m_boundingRect.setBottom( m_boundingRect.bottom() + m_wallVelocity 
);
-           m_nextBoundingRect.setBottom( m_boundingRect.bottom() + 
m_wallVelocity );
-           break;
-       case Right:
-           m_boundingRect.setRight( m_boundingRect.right() + m_wallVelocity );
-           m_nextBoundingRect.setRight( m_boundingRect.right() + 
m_wallVelocity );
-           break;
+    switch( m_dir ) {
+    case Up:
+        m_boundingRect.setTop( m_boundingRect.top() - m_wallVelocity );
+        m_nextBoundingRect.setTop( m_boundingRect.top() - m_wallVelocity );
+        break;
+    case Left:
+        m_boundingRect.setLeft( m_boundingRect.left() - m_wallVelocity );
+        m_nextBoundingRect.setLeft( m_boundingRect.left() - m_wallVelocity );
+        break;
+    case Down:
+        m_boundingRect.setBottom( m_boundingRect.bottom() + m_wallVelocity );
+        m_nextBoundingRect.setBottom( m_boundingRect.bottom() + m_wallVelocity 
);
+        break;
+    case Right:
+        m_boundingRect.setRight( m_boundingRect.right() + m_wallVelocity );
+        m_nextBoundingRect.setRight( m_boundingRect.right() + m_wallVelocity );
+        break;
     }
 }
 
 void KBounceWall::update()
 {
-       if ( !isVisible() )
-       return;
+    if (!isVisible())
+        return;
+
+    int boundingRectWidth = static_cast<int>(std::ceil(m_boundingRect.width() 
* s_tileSize.width()));
+    int boundingRectHeight = 
static_cast<int>(std::ceil(m_boundingRect.height() * s_tileSize.height()));
 
-       int boundingRectWidth = static_cast<int>
-       ( std::ceil( m_boundingRect.width() * m_tileSize.width() ) );
-       int boundingRectHeight = static_cast<int>
-       ( std::ceil( m_boundingRect.height() * m_tileSize.height()  ) );
+    if (!(boundingRectWidth && boundingRectHeight))
+        return;
 
-       if ( boundingRectWidth == 0 || boundingRectHeight == 0 )
-       return;
+    int tileWidth = s_tileSize.width();
+    int tileHeight = s_tileSize.height();
+
+    QSize pixSize;
+    if (m_dir == Left || m_dir == Right) {
+        pixSize = QSize(boundingRectWidth + 64 - (boundingRectWidth%64), 
boundingRectHeight);
+    } else {
+        pixSize = QSize(boundingRectWidth, boundingRectHeight + 64 - 
(boundingRectHeight%64));
+    }
 
-       int tileWidth = m_tileSize.width();
-       int tileHeight = m_tileSize.height();
+    QPixmap px;
+    if (pixmap().width() < pixSize.width() || pixmap().height() < 
pixSize.height()) {
+        px = QPixmap(pixSize);
+    } else {
+        px = pixmap(); // already ARGB
+    }
+    px.fill(Qt::transparent);
 
-       QPixmap px( boundingRectWidth, boundingRectHeight );
-       px.fill( Qt::transparent );
-       QPainter p( &px );
+    QPainter p(&px);
 
-       switch ( m_dir )
-       {
-       case Up:
-           p.drawPixmap( 
-                   QRect( 0, 0, tileWidth, qMin( tileHeight, 
boundingRectHeight ) ),
-                   m_renderer->spritePixmap( "wallEndUp", m_tileSize ),
-                   QRect( 0, 0, tileWidth, qMin( tileHeight, 
boundingRectHeight ) ) );
-           p.drawPixmap( 
-                   QRect( 0, tileHeight, tileWidth, boundingRectHeight - 
tileHeight ),
-                   m_renderer->spritePixmap( "wallV",
-                       QSize( tileWidth,  18 * tileHeight ) ),
-                   QRect( 0, 18 * tileHeight - boundingRectHeight + tileHeight,
-                       tileWidth, boundingRectHeight - tileHeight ) );
-           break;
-       case Right:
-           p.drawPixmap(
-                   QRect( boundingRectWidth - tileWidth, 0, qMin( tileWidth, 
boundingRectWidth ), 
-                           tileHeight ), 
-                   m_renderer->spritePixmap( "wallEndRight", m_tileSize ),
-                   QRect( 0, 0, qMin( tileWidth, boundingRectWidth ), 
tileHeight ) );
-           p.drawPixmap(
-                   QRect( 0, 0, boundingRectWidth - tileWidth, tileHeight ),
-                   m_renderer->spritePixmap( "wallH", 
-                       QSize( 32 * tileWidth, tileHeight ) ),
-                   QRect( 0, 0, boundingRectWidth - tileWidth, tileHeight ) );
-           break;
-       case Down:
-           p.drawPixmap(
-                   QRect( 0, boundingRectHeight - tileHeight, tileWidth,
-                       qMin( tileHeight, boundingRectHeight ) ),
-                   m_renderer->spritePixmap( "wallEndDown", m_tileSize ),
-                   QRect( 0, qMax( 0, tileHeight - boundingRectHeight ), 
tileWidth,
-                       qMin( tileHeight, boundingRectHeight ) ) );
-           p.drawPixmap(
-                   QRect( 0, 0, tileWidth, boundingRectHeight - tileHeight ),
-                   m_renderer->spritePixmap( "wallV",
-                       QSize( tileWidth, 18 * tileHeight ) ),
-                   QRect( 0, 0, tileWidth, boundingRectHeight - tileHeight ) );
-           break;
-       case Left:
-           p.drawPixmap( 
-                   QRect( 0, 0, qMin( boundingRectWidth, tileWidth ), 
tileHeight ),
-                   m_renderer->spritePixmap( "wallEndLeft", m_tileSize ),
-                   QRect( qMax( 0, tileWidth - boundingRectWidth ), 0,
-                       tileWidth, tileHeight ) );
-           p.drawPixmap( 
-                   QRect( tileWidth, 0, boundingRectWidth - tileWidth, 
tileHeight ),
-                   m_renderer->spritePixmap( "wallH", 
-                       QSize( 32 * tileWidth, tileHeight ) ),
-                   QRect( 32 * tileWidth - boundingRectWidth + tileWidth, 0, 
-                       boundingRectWidth - tileWidth, tileHeight ) );
-       }
-       setPos( m_board->mapPosition( m_boundingRect.topLeft() ) );
-       p.end();
-       setPixmap( px );
+    QPointF offset = m_board->mapPosition(m_boundingRect.topLeft());
+
+    switch ( m_dir ) {
+    case Up: {
+        const int split = qMin(tileHeight, boundingRectHeight);
+        p.drawPixmap(0, 0, s_sprites->wallEndUp, 0, 0, tileWidth, split);
+        p.drawTiledPixmap(0, split, tileWidth, boundingRectHeight - split, 
s_sprites->wallV, 0, offset.y());
+        break;
+    }
+    case Right: {
+        const int split = qMin(tileWidth, boundingRectWidth);
+        p.drawPixmap(boundingRectWidth - tileWidth, 0, split, tileHeight, 
s_sprites->wallEndRight);
+        p.drawTiledPixmap(0, 0, boundingRectWidth - split, tileHeight, 
s_sprites->wallH);
+        break;
+    }
+    case Down: {
+        const int split = qMin(tileHeight, boundingRectHeight);
+        p.drawPixmap(0, boundingRectHeight - tileHeight, tileWidth, split, 
s_sprites->wallEndDown);
+        p.drawTiledPixmap(0, 0, tileWidth, boundingRectHeight - split, 
s_sprites->wallV);
+        break;
+    }
+    case Left:
+        const int split = qMin(boundingRectWidth, tileWidth);
+        p.drawPixmap(0, 0, split, tileHeight, s_sprites->wallEndLeft);
+        p.drawTiledPixmap(split, 0, boundingRectWidth - split, tileHeight, 
s_sprites->wallH, offset.x());
+    }
+    setPos(offset);
+    p.end();
+    setPixmap(px);
+}
+
+void KBounceWall::loadSprites() {
+    s_sprites->wallEndLeft = m_renderer->spritePixmap("wallEndLeft", 
s_tileSize);
+    s_sprites->wallEndUp = m_renderer->spritePixmap("wallEndUp", s_tileSize);
+    s_sprites->wallEndRight = m_renderer->spritePixmap("wallEndRight", 
s_tileSize);
+    s_sprites->wallEndDown = m_renderer->spritePixmap("wallEndDown", 
s_tileSize);
+
+    s_sprites->wallH = m_renderer->spritePixmap("wallH", QSize(32 * 
s_tileSize.width(), s_tileSize.height()));
+    s_sprites->wallV = m_renderer->spritePixmap("wallV", 
QSize(s_tileSize.width(), 18*s_tileSize.height()));
 }
 
 void KBounceWall::resize( const QSize& tileSize )
 {
-       if ( tileSize != m_tileSize )
-       {
-               m_tileSize = tileSize;
-               update();
-       }
+    if ( tileSize != s_tileSize ) {
+        s_tileSize = tileSize;
+        loadSprites();
+        update();
+    }
 }
 
 void KBounceWall::build( int x, int y )
 {
-    if ( isVisible() )
-       return;
+    if (isVisible())
+        return;
 
-   if ( m_dir == Up || m_dir == Down )
-    {
+   if ( m_dir == Up || m_dir == Down ) {
         m_boundingRect.setTop( y );
 
-        if (m_dir == Down)
-        {
+        if (m_dir == Down) {
             m_boundingRect.setBottom(y + 1);
-        }
-        else
-        {
+        } else {
             m_boundingRect.setBottom( y );
         }
 
         m_boundingRect.setLeft( x );
         m_boundingRect.setRight( x + 1 );
     }
-    else if ( m_dir == Left || m_dir == Right )
-    {
+    else if ( m_dir == Left || m_dir == Right ) {
         m_boundingRect.setTop( y );
         m_boundingRect.setBottom( y + 1 );
         m_boundingRect.setLeft( x );
 
-        if (m_dir == Right)
-        {
+        if (m_dir == Right) {
             m_boundingRect.setRight(x + 1);
-        }
-        else
-        {
+        } else {
             m_boundingRect.setRight( x );
         }
     }
@@ -246,9 +234,9 @@
 
     m_nextBoundingRect = m_boundingRect;
 
-    setPixmap( QPixmap( 0, 0 ) );
+    setPixmap(QPixmap());
 
-    setPos( m_board->mapPosition( QPointF( x, y ) ) );
+    setPos(m_board->mapPosition(QPointF( x, y )));
     show();
 
     if ( KBounceSettings::playSounds() )
@@ -257,12 +245,12 @@
 
 QRectF KBounceWall::nextBoundingRect() const
 {
-       return m_nextBoundingRect;
+    return m_nextBoundingRect;
 }
 
 bool KBounceWall::safeEdgeHit( const QRectF& rect2 ) const
 {
-       bool safeEdgeHit = false;
+    bool safeEdgeHit = false;
 
        QPointF p1, p2, p3;
        switch ( m_dir ) 
@@ -307,27 +295,26 @@
     int right = static_cast<int>( m_boundingRect.right() );
     int bottom = static_cast<int>( m_boundingRect.bottom() );
 
-    if ( shorten ) 
-    {
-               switch ( dir )
-               {
-                   case Left: left++; break;
-                   case Up: top++; break;
-                   case Right: right--; break;
-                   case Down: bottom--; break;
-               }
+    if ( shorten ) {
+        switch ( dir )
+        {
+            case Left: left++; break;
+            case Up: top++; break;
+            case Right: right--; break;
+            case Down: bottom--; break;
+        }
     }
 
     emit finished( left, top, right, bottom );
     hide();
 
-    if ( KBounceSettings::playSounds() )
+    if (KBounceSettings::playSounds())
         m_soundReflect.start();
 }
 
 void KBounceWall::setWallVelocity(qreal velocity)
 {
-       m_wallVelocity = velocity;
+    m_wallVelocity = velocity;
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kbounce-4.13.2/wall.h new/kbounce-4.13.80/wall.h
--- old/kbounce-4.13.2/wall.h   2013-07-10 11:54:12.000000000 +0200
+++ new/kbounce-4.13.80/wall.h  2014-05-15 02:55:33.000000000 +0200
@@ -95,6 +95,13 @@
        */
        void setWallVelocity(qreal velocity);
 
+    /**
+     * Load all sprites for top, down, left and right walls as well as for
+     * the vertical and horizontal semi transparent bars drawn before a wall is
+     * built.
+     */
+    void static loadSprites();
+
     signals:
        void finished( int left, int top, int right, int bottom );
        void died();
@@ -114,16 +121,29 @@
         */
        void finish( bool shorten = false, Direction dir = Up);
 
-
-       KBounceRenderer *m_renderer;
        KBounceBoard *m_board;
        Direction m_dir;
-       QSize m_tileSize;
-       KgSound m_soundWallstart;
+
+    KgSound m_soundWallstart;
        KgSound m_soundReflect;
+
        QRectF m_boundingRect;
        QRectF m_nextBoundingRect;
        qreal m_wallVelocity;
+
+    typedef struct {
+        QPixmap wallEndLeft;
+        QPixmap wallEndUp;
+        QPixmap wallEndRight;
+        QPixmap wallEndDown;
+        QPixmap wallH;
+        QPixmap wallV;
+
+    } Sprites;
+    static Sprites *s_sprites;
+
+    static QSize s_tileSize;
+    static KBounceRenderer *m_renderer;
 };
 
 #endif

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to