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

📄 jewelview.h

📁 symbian下的泡泡龙游戏源码,手机游戏开放新手学习的好资料
💻 H
字号:
/*
* ============================================================================
*  Name     : CJewelView from JewelView.h
*  Part of  : Jewel
*  Created  : 02.10.2005 by Thosing
*  Description:
*     Declares container control for application.
*  Version  : 0.1
*  Copyright: Another
* ============================================================================
*/

#ifndef JEWELVIEW_H
#define JEWELVIEW_H

#define NUM_OF_JEWELS 7

#define BOARD_SIZE_X 8
#define BOARD_SIZE_Y 8

// INCLUDES
#include <coecntrl.h>
   
// FORWARD DECLARATIONS
class CFbsBitmap;
class CJewelEngine;

// CLASS DECLARATION

/**
*  CJewelView  container control class.
*  
*/
class CJewelView : public CCoeControl {
public: // Constructors and destructor

  /**
  * EPOC default constructor.
  * @param aRect Frame rectangle for container.
  */
  void ConstructL(const TRect& aRect);

  /**
  * Destructor.
  */
  ~CJewelView();

public: // New functions
  static CFbsBitmap* LoadBitmapL(TInt aID);
  void DrawBoard(TInt* aJewels, TInt aHighLight, TBool aShowIndicator=EFalse);
  void SawpEffect(TInt aJewelA, TInt aJewelB);

public: // Functions from base classes
  TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
  void FullLife();

private: 
  void DrawJewel(TPoint aPoint, TInt aID, TBool aDrawSmall=ETrue);
  void DrawSwapIndicator(TInt aX, TInt aY);

  /**
  * From CCoeControl,Draw.
  */
  void Draw(const TRect& aRect) const;



private: //data
  CJewelEngine* iGameEngine;           //Engine

  //Bitmap
  CFbsBitmap* iGameBoard;              //Board
  CFbsBitmap* iGameOverBitmap;         //Game Over
  CFbsBitmap* iLifeIndicator;		   //Time Indicator
  CFbsBitmap* iLifeIndicatorMask;      //Mask
  CFbsBitmap* iProgressBar;            //ProgressBar

  CFbsBitmap* iJewelsSmall[NUM_OF_JEWELS];        //small
  CFbsBitmap* iJewelsSmallMask[NUM_OF_JEWELS];    //small mask
  CFbsBitmap* iJewelsLarge[NUM_OF_JEWELS];        //large
  CFbsBitmap* iJewelsLargeMask[NUM_OF_JEWELS];    //large mask

  CFbsBitmap* iBackBuffer;                        //back ground
  CFbsBitmapDevice* iBackDevice;
  CFbsBitGc* iBackGc;

  static const TRect iJewelSmallRect;		//SmallRect
  static const TRect iJewelLargeRect;		//LargeRect
  static const TRect iBoardRect;			//BoardRect
  static const TPoint iGridStart;			//grid's start point
  static const TSize iGridSize;				//grid's size
  static const TInt iNumGridsX;				//grid's x position
  static const TInt iNumGridsY;				//grid's y position
  static const TInt iLifeTotal;				//time
};

#endif

// End of File

⌨️ 快捷键说明

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