00001 /*************************************************************************** 00002 ballpainter.h - description 00003 ------------------- 00004 begin : Fri May 19 2000 00005 copyright : (C) 2000 by Roman Merzlyakov 00006 email : roman@sbrf.barrt.ru 00007 copyright : (C) 2000 by Roman Razilov 00008 email : Roman.Razilov@gmx.de 00009 ***************************************************************************/ 00010 00011 /*************************************************************************** 00012 * * 00013 * This program is free software; you can redistribute it and/or modify * 00014 * it under the terms of the GNU General Public License as published by * 00015 * the Free Software Foundation; either version 2 of the License, or * 00016 * (at your option) any later version. * 00017 * * 00018 ***************************************************************************/ 00019 #ifndef __BALLPAINTER_H 00020 #define __BALLPAINTER_H 00021 00022 #include <qobject.h> 00023 #include <qpixmap.h> 00024 #include "cfg.h" 00025 00026 #define CELLSIZE 21 00027 00028 class BallPainter : public QObject 00029 { 00030 Q_OBJECT 00031 00032 enum Pixmaps { 00033 Field, 00034 Balls, 00035 Fire 00036 }; 00037 QPixmap *pixmap( enum Pixmaps ); 00038 QPixmap* imgCash[NCOLORS][PIXTIME + FIREBALLS + BOOMBALLS + 1]; 00039 QPixmap* backgroundPix; 00040 QPixmap* firePix[FIREPIX]; 00041 00042 void createPixmap(); 00043 00044 public: 00045 00046 BallPainter(); 00047 ~BallPainter(); 00048 00049 00050 // QPixmap* GetAnimatedBall(int color, int shot); 00051 QPixmap* GetBall( int color, int animstep, int panim ); 00052 QPixmap* GetNormalBall(int color) {return GetBall(color,0,ANIM_NO);} 00053 QPixmap* GetBackgroundPix() { return GetBall(NOBALL,0,ANIM_NO);} 00054 00055 }; 00056 00057 #endif
1.4.2