summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/decorations/flat/flat.cpp4
-rw-r--r--noncore/games/bounce/game.cpp17
-rw-r--r--noncore/games/kbill/Game.cc14
-rw-r--r--noncore/games/kbill/Game.h2
-rw-r--r--noncore/games/kbill/field.cpp2
-rw-r--r--noncore/games/kbill/inputbox.cpp10
-rw-r--r--noncore/games/kbill/kbill.h42
-rw-r--r--noncore/games/zsame/ZSameWidget.cpp12
8 files changed, 53 insertions, 50 deletions
diff --git a/noncore/decorations/flat/flat.cpp b/noncore/decorations/flat/flat.cpp
index a2f12be..9a670cc 100644
--- a/noncore/decorations/flat/flat.cpp
+++ b/noncore/decorations/flat/flat.cpp
@@ -288,3 +288,3 @@ void FlatDecoration::drawArea( Area a, QPainter *p, const WindowData *wd ) const
-void FlatDecoration::drawButton( Button b, QPainter *p, const WindowData *wd, int x, int y, int w, int h, QWSButton::State state ) const
+void FlatDecoration::drawButton( Button b, QPainter *p, const WindowData *wd, int x, int y, int, int, QWSButton::State state ) const
{
@@ -323,3 +323,3 @@ void FlatDecoration::drawButton( Button b, QPainter *p, const WindowData *wd, in
}
-
+
p->drawImage( x, y, *img );
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
@@ -32,3 +32,3 @@ using namespace Opie::Core;
-#define TILE_SIZE 9
+#define TILE_SIZE 9
@@ -69,3 +69,3 @@ void Arrow::changeDirection()
}
-
+
@@ -102,3 +102,3 @@ void Ball::advance(int stage)
QRect r = boundingRect();
- r.moveBy( xVelocity(), yVelocity() );
+ r.moveBy( static_cast<int>(xVelocity()), static_cast<int>( yVelocity() ) );
JezzField* field = (JezzField *)canvas();
@@ -127,3 +127,3 @@ 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();
@@ -301,3 +301,3 @@ JezzGame::JezzGame( int ballNum, QWidget *parent, const char *name )
{
- QString path = QPEApplication::qpeDir()+"pics/bounce/";
+ QString path = QPEApplication::qpeDir()+"pics/bounce/";
@@ -349,3 +349,3 @@ JezzGame::JezzGame( int ballNum, QWidget *parent, const char *name )
}
-
+
// create arrow
@@ -376,3 +376,3 @@ void JezzGame::display( QString text, int size )
{
- odebug << "This function \"display\" shouldn't be called!!!" << oendl;
+ odebug << "This function \"display\" shouldn't be called!!!" << oendl;
if ( !text.isEmpty() )
@@ -415,3 +415,4 @@ void JezzGame::makeBlack()
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 ) );
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
@@ -60,3 +60,3 @@ void Game::update_info() {
}
-
+
void Game::update_score (int action) {
@@ -74,3 +74,3 @@ void Game::warp_to_level (unsigned int lev) {
else {
- if (lev<=0) return;
+ if (lev <=0) return;
start(lev);
@@ -101,3 +101,3 @@ void Game::button_press(int x, int y) {
{
- if (bill.list[i].state == bill.list[i].AT)
+ if (bill.list[i].state == bill.list[i].AT)
net.computers[bill.list[i].target_c].busy=0;
@@ -133,6 +133,6 @@ void Game::button_release(int x, int y) {
&&
- (net.computers[i].os == OS.WINGDOWS ||
+ (net.computers[i].os == OS.WINGDOWS ||
net.computers[i].os == OS.OFF))
{
- net.base++;
+ net.base++;
if (net.computers[i].os == OS.WINGDOWS)
@@ -147,3 +147,3 @@ void Game::button_release(int x, int y) {
grabbed = EMPTY;
-}
+}
@@ -152,3 +152,3 @@ void Game::update() {
case PLAYING:
- ui.clear();
+ ui.clear();
bucket.draw();
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
@@ -6,3 +6,3 @@
class Game {
- unsigned state;
+ int state;
int efficiency;
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
@@ -82,2 +82,2 @@ void Field::paintEvent(QPaintEvent *) {
bitBlt(this, 0, 0, pix);
-} \ No newline at end of file
+}
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
@@ -18,5 +18,5 @@
#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);
@@ -24,3 +24,3 @@ InputBox::InputBox(QWidget *parent, const char *name, const char *caption, const
// question->setGeometry(10, 10, 240, 50);
-//
+//
// input = new QLineEdit(this);
@@ -29,3 +29,3 @@ InputBox::InputBox(QWidget *parent, const char *name, const char *caption, const
// input->setMaxLength(19);
-//
+//
// ok = new QPushButton( "Ok", this );
@@ -34,3 +34,3 @@ InputBox::InputBox(QWidget *parent, const char *name, const char *caption, const
// connect( ok, SIGNAL(clicked()), SLOT(accept()) );
-//
+//
// cancel = new QPushButton( "Cancel", this );
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
@@ -30,23 +30,25 @@ class KBill : public QMainWindow
{
- Q_OBJECT
- public:
+ Q_OBJECT
+public:
KBill();
- ~KBill();
- Field* getField();
- private:
- QMenuBar *menu;
- QPopupMenu *file, *help;
- Field *field;
- int pauseid;
- protected slots:
- void Quit();
- void About();
- void NewGame();
- void Pause();
- void WarpTo();
- void Story();
- void Rules();
- void ViewHighScores();
-
- friend class UI;
+ ~KBill();
+ Field* getField();
+private:
+ QMenuBar *menu;
+ QPopupMenu *file, *help;
+ Field *field;
+ int pauseid;
+
+protected slots:
+ void Quit();
+ void About();
+ void NewGame();
+ void Pause();
+ void WarpTo();
+ void Story();
+ void Rules();
+ void ViewHighScores();
+
+protected:
+ friend class UI;
};
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
@@ -111,3 +111,3 @@ ZSameWidget::~ZSameWidget() {
-void ZSameWidget::readProperties(Config *conf) {
+void ZSameWidget::readProperties(Config *) {
/*
@@ -118,3 +118,3 @@ void ZSameWidget::readProperties(Config *conf) {
-void ZSameWidget::saveProperties(Config *conf) {
+void ZSameWidget::saveProperties(Config *) {
/*
@@ -191,3 +191,3 @@ void ZSameWidget::m_tglboard() {
-void ZSameWidget::setColors(int colors) {
+void ZSameWidget::setColors(int ) {
// status->changeItem(i18n("%1 Colors").arg(colors),1);
@@ -195,3 +195,3 @@ void ZSameWidget::setColors(int colors) {
-void ZSameWidget::setBoard(int board) {
+void ZSameWidget::setBoard(int ) {
// status->changeItem(i18n("Board: %1").arg(board, 6), 2);
@@ -199,3 +199,3 @@ void ZSameWidget::setBoard(int board) {
-void ZSameWidget::setMarked(int m) {
+void ZSameWidget::setMarked(int ) {
// status->changeItem(i18n("Marked: %1").arg(m, 6),3);
@@ -208,3 +208,3 @@ void ZSameWidget::stonesRemoved(int,int) {
-void ZSameWidget::setScore(int score) {
+void ZSameWidget::setScore(int ) {
// status->changeItem(i18n("Score: %1").arg(score, 6),4);