~neon/kolf/master

« back to all changes in this revision

Viewing changes to floater.h

  • Committer: Stefan Majewsky
  • Date: 2010-10-31 23:23:16 UTC
  • Revision ID: git-v1:45f6fdbcc5733b0daa25631ea13b5b2f2d86f20e
Create a Box2D world, and attach Box2D bodies to all CanvasItems.

This is unfortunately a very large patch, because it touches everything
in the CanvasItem hierarchy, the ItemFactory, the KolfGame and the
shapes at once. All these objects are closely related through Box2D's
object hierarchy (world -> bodies -> fixtures -> shapes), so these
changes can hardly be split up further.

svn path=/trunk/KDE/kdegames/kolf/; revision=1191711

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
class FloaterGuide : public Wall
41
41
{
42
42
public:
43
 
        FloaterGuide(Floater *floater, QGraphicsItem *parent) : Wall(parent) { this->floater = floater; almostDead = false; }
 
43
        FloaterGuide(Floater *floater, QGraphicsItem *parent, b2World* world) : Wall(parent, world) { this->floater = floater; almostDead = false; }
44
44
        virtual void setPoints(double xa, double ya, double xb, double yb);
45
45
        virtual void moveBy(double dx, double dy);
46
46
        virtual Config *config(QWidget *parent);
57
57
class Floater : public Bridge
58
58
{
59
59
public:
60
 
        Floater(QGraphicsItem * parent);
 
60
        Floater(QGraphicsItem * parent, b2World* world);
61
61
 
62
62
        virtual bool collision(Ball *ball, long int id) { Bridge::collision(ball, id); return false; }
63
63
        virtual void save(KConfigGroup *cfgGroup);