summaryrefslogtreecommitdiff
path: root/noncore/games
Side-by-side diff
Diffstat (limited to 'noncore/games') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/bounce/game.cpp7
-rw-r--r--noncore/games/kbill/Game.cc0
-rw-r--r--noncore/games/kbill/Game.h2
-rw-r--r--noncore/games/kbill/field.cpp0
-rw-r--r--noncore/games/kbill/inputbox.cpp2
-rw-r--r--noncore/games/kbill/kbill.h2
-rw-r--r--noncore/games/zsame/ZSameWidget.cpp12
7 files changed, 14 insertions, 11 deletions
diff --git a/noncore/games/bounce/game.cpp b/noncore/games/bounce/game.cpp
index bbd3d0b..5ef9f15 100644
--- a/noncore/games/bounce/game.cpp
+++ b/noncore/games/bounce/game.cpp
@@ -99,9 +99,9 @@ void Ball::advance(int stage)
if ( !reflectX && !reflectY && collide(xVelocity(), yVelocity()) ) reflectX = reflectY = true;
// emit collision
QRect r = boundingRect();
- r.moveBy( xVelocity(), yVelocity() );
+ r.moveBy( static_cast<int>(xVelocity()), static_cast<int>( yVelocity() ) );
JezzField* field = (JezzField *)canvas();
int ul = field->tile( r.left() / TILE_SIZE, r.top() / TILE_SIZE );
int ur = field->tile( r.right() / TILE_SIZE, r.top() / TILE_SIZE );
@@ -124,9 +124,9 @@ void Ball::advance(int stage)
bool Ball::collide( double dx, double dy )
{
QRect r = boundingRect();
- r.moveBy( dx, dy );
+ r.moveBy( static_cast<int>( dx ), static_cast<int>( dy ) );
JezzField* field = (JezzField *)canvas();
int ul = field->tile( r.left() / TILE_SIZE, r.top() / TILE_SIZE );
int ur = field->tile( r.right() / TILE_SIZE, r.top() / TILE_SIZE );
@@ -412,9 +412,10 @@ void JezzGame::makeBlack()
m_buf[x][y] = m_field->tile( x, y );
// fill areas that contains a ball
for ( Ball *ball=m_balls.first(); ball!=0; ball=m_balls.next() )
- fill( ball->x()/TILE_SIZE, ball->y()/TILE_SIZE );
+ fill( static_cast<int>( ball->x()/TILE_SIZE ),
+ static_cast<int>( ball->y()/TILE_SIZE ) );
// areas still free can be blacked now
for ( int y=0; y<FIELD_HEIGHT; y++ )
for ( int x=0; x<FIELD_WIDTH; x++ )
diff --git a/noncore/games/kbill/Game.cc b/noncore/games/kbill/Game.cc
index 624b50b..4cd5322 100644
--- a/noncore/games/kbill/Game.cc
+++ b/noncore/games/kbill/Game.cc
diff --git a/noncore/games/kbill/Game.h b/noncore/games/kbill/Game.h
index 4473936..5c9c497 100644
--- a/noncore/games/kbill/Game.h
+++ b/noncore/games/kbill/Game.h
@@ -3,9 +3,9 @@
#include "objects.h"
class Game {
- unsigned state;
+ int state;
int efficiency;
public:
unsigned score, level, iteration;
Picture logo;
diff --git a/noncore/games/kbill/field.cpp b/noncore/games/kbill/field.cpp
index a974ab2..0dd8d72 100644
--- a/noncore/games/kbill/field.cpp
+++ b/noncore/games/kbill/field.cpp
diff --git a/noncore/games/kbill/inputbox.cpp b/noncore/games/kbill/inputbox.cpp
index 5087fbb..7aaebe7 100644
--- a/noncore/games/kbill/inputbox.cpp
+++ b/noncore/games/kbill/inputbox.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
#include "inputbox.h"
-InputBox::InputBox(QWidget *parent, const char *name, const char *caption, const char *text) : QDialog(parent, name, TRUE) {
+InputBox::InputBox(QWidget *parent, const char *name, const char *, const char *) : QDialog(parent, name, TRUE) {
// setCaption(caption);
//
// question = new QLabel(this);
// question->setText(text);
diff --git a/noncore/games/kbill/kbill.h b/noncore/games/kbill/kbill.h
index fbc0c6c..da1a111 100644
--- a/noncore/games/kbill/kbill.h
+++ b/noncore/games/kbill/kbill.h
@@ -37,8 +37,9 @@ class KBill : public QMainWindow
QMenuBar *menu;
QPopupMenu *file, *help;
Field *field;
int pauseid;
+
protected slots:
void Quit();
void About();
void NewGame();
@@ -47,8 +48,9 @@ class KBill : public QMainWindow
void Story();
void Rules();
void ViewHighScores();
+protected:
friend class UI;
};
#endif
diff --git a/noncore/games/zsame/ZSameWidget.cpp b/noncore/games/zsame/ZSameWidget.cpp
index 4fab0f6..04ad825 100644
--- a/noncore/games/zsame/ZSameWidget.cpp
+++ b/noncore/games/zsame/ZSameWidget.cpp
@@ -108,16 +108,16 @@ ZSameWidget::ZSameWidget( QWidget* parent, const char* name, WFlags fl )
ZSameWidget::~ZSameWidget() {
}
-void ZSameWidget::readProperties(Config *conf) {
+void ZSameWidget::readProperties(Config *) {
/*
Q_ASSERT(conf);
stone->readProperties(conf);
*/
}
-void ZSameWidget::saveProperties(Config *conf) {
+void ZSameWidget::saveProperties(Config *) {
/*
Q_ASSERT(conf);
stone->saveProperties(conf);
conf->sync();
@@ -188,26 +188,26 @@ void ZSameWidget::m_tglboard() {
// kdDebug() << "toggled" << endl;
}
-void ZSameWidget::setColors(int colors) {
+void ZSameWidget::setColors(int ) {
// status->changeItem(i18n("%1 Colors").arg(colors),1);
}
-void ZSameWidget::setBoard(int board) {
+void ZSameWidget::setBoard(int ) {
// status->changeItem(i18n("Board: %1").arg(board, 6), 2);
}
-void ZSameWidget::setMarked(int m) {
+void ZSameWidget::setMarked(int ) {
// status->changeItem(i18n("Marked: %1").arg(m, 6),3);
}
void ZSameWidget::stonesRemoved(int,int) {
// KNotifyClient::event("stones removed",
// i18n("%1 stones removed.").arg(stone->marked()));
}
-void ZSameWidget::setScore(int score) {
+void ZSameWidget::setScore(int ) {
// status->changeItem(i18n("Score: %1").arg(score, 6),4);
// undo->setEnabled(stone->undoPossible());
// restart->setEnabled(!stone->isOriginalBoard());
}