diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-09-05 01:09:44 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-09-05 01:22:13 +0900 |
commit | 37aaa67152936f4fefff22d559c03e943a86ae69 (patch) | |
tree | ffffcd595eecef631bc1fc38922c63060aa175ea /kpacman/score.h | |
parent | ac81a3c3e8d1a61fc2ff39da89c7c2ea290d5e34 (diff) | |
download | tdepacman-37aaa67152936f4fefff22d559c03e943a86ae69.tar.gz tdepacman-37aaa67152936f4fefff22d559c03e943a86ae69.zip |
Renamed kpacman -> tdepacman.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kpacman/score.h')
-rw-r--r-- | kpacman/score.h | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/kpacman/score.h b/kpacman/score.h deleted file mode 100644 index fc0da45..0000000 --- a/kpacman/score.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef SCORE_H -#define SCORE_H - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <kapp.h> - -#include <tqwidget.h> -#include <tqstring.h> -#include <tqpoint.h> -#include <tqrect.h> -#include <tqfile.h> -#include <tqfileinfo.h> -#include <tqdatetime.h> - -#include "painter.h" -#include "bitfont.h" - -#define maxPlayer 1 -#define minPlayerNameLength 3 -#define highscoreName "highscore" - -class Score : public TQWidget -{ - Q_OBJECT -public: - Score (TQWidget *parent=0, const char *name=0, int scheme=-1, int mode=-1, Bitfont *font=0); - ~Score(); - -public slots: - void setScheme(int scheme, int mode, Bitfont *font=0); - - void set(int score); - void set(int score, int player); - void setScore(int level, int player); - void setPause(bool paused); - - void initKeys(); - -private slots: - void read(); - void write(); - void end(); - -signals: - void gameFinished(); - void gameHighscores(); - -protected: - void timerEvent(TQTimerEvent *); - void paintEvent(TQPaintEvent *); - void keyPressEvent(TQKeyEvent *); - - void focusInEvent(TQFocusEvent *) { ; } - void focusOutEvent(TQFocusEvent *) { ; } - - void confScheme(); - void confTiming(bool defGroup=TRUE); - -private: - Bitfont *bitfont; - - TQRect rect(int col, float row, TQString str, int align = AlignCenter); - int x(int col); - int y(float row); - - TQString formatDate(TQDate date); - - /** - * Ermittelt die zu benutzende "highscore"-Datei, in die auch geschrieben werden kann. - * Über den "highscoreFilePath"-TDEConfig-Eintrag, kann abweichend von der Standardlokation - * der Standort der "highscore"-Datei spezifiziert werden. - * Wenn die systemweite "globale" Datei nicht beschrieben werden kann, wird mit einer - * privaten Datei gearbeitet. - */ - TQFileInfo locateHighscoreFilePath(); - - int cursorBlinkMS; - int hallOfFameMS; - int afterPauseMS; - - bool paused; - - uint UpKey; - uint DownKey; - uint RightKey; - uint LeftKey; - - int lastScore; - int lastPlayer; - int HighScore; - int playerScore[maxPlayer]; - TQString playerName[maxPlayer]; - - struct { - int x; - int y; - TQChar chr; - bool on; - } cursor; - - int cursorBlinkTimer; - bool scrollRepeat; - - struct { - int points; - int levels; - TQTime duration; - TQDateTime moment; - TQString name; - } hallOfFame[10]; - - TQFileInfo systemHighscoreFileInfo; - TQFileInfo privateHighscoreFileInfo; - - TQFile highscoreFile; - - int scheme; - int mode; -}; - -#endif // SCORE_H |