-rw-r--r-- | noncore/games/mindbreaker/mindbreaker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/games/mindbreaker/mindbreaker.cpp b/noncore/games/mindbreaker/mindbreaker.cpp index 2b924c6..1f554d2 100644 --- a/noncore/games/mindbreaker/mindbreaker.cpp +++ b/noncore/games/mindbreaker/mindbreaker.cpp @@ -45,97 +45,97 @@ static int adjusted_answerpeg_size; static int adjusted_title_height; static int adjusted_title_width; static int adjusted_first_peg_x_diff; static int adjusted_first_peg_y_diff; static int adjusted_peg_spacing; static int adjusted_answerpegx; static int adjusted_answerpegy; static int adjusted_answerpeg_xdiff; static int adjusted_answerpeg_ydiff; static int adjusted_board_height; static int adjusted_board_width; static void setupBoardSize(int w, int h) { adjusted_panel_width = w * 3/4; adjusted_title_width = w * 3/4; adjusted_title_height = h/10; adjusted_panel_height = (h-adjusted_title_height)/9; adjusted_bin_margin = w * 10/240; adjusted_peg_size = adjusted_panel_height*3/4; adjusted_answerpeg_size = QMIN(adjusted_panel_width*15/180,adjusted_panel_height*15/25); // looks a bit dodgy on larger sizes if ( adjusted_peg_size > 40 ) adjusted_peg_size = 40; adjusted_first_peg_x_diff = w * 31/240-adjusted_peg_size/2; adjusted_first_peg_y_diff = (adjusted_panel_height - adjusted_peg_size)/2; adjusted_peg_spacing = w * 30/240; // looks a bit dodgy on larger sizes (still does though, but not as much...) if ( adjusted_answerpeg_size > 22 ) adjusted_answerpeg_size = 22; adjusted_answerpegx = adjusted_panel_width * 159/180 - adjusted_answerpeg_size/2; adjusted_answerpegy = adjusted_panel_height/3 - adjusted_answerpeg_size/2; adjusted_answerpeg_xdiff = adjusted_panel_width * 10/180; adjusted_answerpeg_ydiff = adjusted_panel_height * 9/25; adjusted_board_height = adjusted_title_height + (adjusted_panel_height * 9); adjusted_board_width = adjusted_panel_width + (adjusted_bin_margin * 2) + adjusted_peg_size; -// qDebug("Adjusted width %d height %d", adjusted_board_width, adjusted_board_height); +// odebug << "Adjusted width " << adjusted_board_width << " height " << adjusted_board_height << "" << oendl; } /* helper class, */ class Peg : public QCanvasRectangle { public: Peg(QCanvas *canvas, int type, int go = -1, int pos = -1); int rtti() const {return pegRTTI; } void advance(int phase); bool hit( const QPoint &) const; /* a placed peg is one that has been set down on the board correctly and should not be moved, only copied */ bool placed() const; void setPlaced(bool); int pegGo() const; int pegPos() const; void setPegPos(int); int type() const; static void buildImages(); static QImage imageForType(int t); static int eggLevel; protected: void drawShape(QPainter &); private: static QVector<QImage> normalPegs; static QVector<QImage> specialPegs; bool isplaced; int pegtype; int peg_go; int peg_pos; int aniStep; }; int Peg::eggLevel = 0; QVector<QImage> Peg::normalPegs; QVector<QImage> Peg::specialPegs; void Peg::buildImages() { |