⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chighscores.h

📁 symbian 的一个 二维飞行游戏 源码 及相关技术文章
💻 H
字号:
// Copyright 2002 Kenneth Guy,
// 
// CHighScores.h
//


#ifndef _CHIGHSCORE_H_
#define _CHIGHSCORE_H_

/** \file CHighScores.h 
    defines class CHighScores */


#include <e32std.h>
#include <e32base.h>

/** High score table.
    
    Handles saving and restoring the high score table. */

class CHighScores : public CBase {
public:
  static CHighScores* NewL(const TDesC& aFileName);
  
  TInt  Number();
  void  AddScoreL(const TDesC& aName, TInt aScore);
  TBool GoodEnough(TInt aScore);
  TInt  Score(TInt aEntry);
  const TDesC& Name(TInt aEntry);
  TInt LastAdded();

  ~CHighScores();
  void InitL();

private:
  void ConstructL(const TDesC& aFileName);

  void SaveL();
  void LoadL();
  void Reset();
          
private:
  HBufC*          iFileName; ///< file to store high score table in on exit
  RArray<HBufC*>  iNames; ///< Array of names
  RArray<TInt>    iScores;///< Array of scores
  TInt            iLastAdded; ///< Last added, so that ui can highlite it.
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -