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

📄 ctilemap.h

📁 基于SYMBIAN OS,series 60平台的经典游戏,超级马力
💻 H
字号:
///////////////////////////////////////////////////////////////////////////////
//
// CTileMap.h
//
// Copyright (c) 2003 Forum Nokia.  All rights reserved.
//
// 	 Technology developed by Rocket Science Oy Ltd
//
///////////////////////////////////////////////////////////////////////////////

#ifndef __CTILEMAP_H__
#define __CTILEMAP_H__

// INCLUDE FILES
#include <e32base.h>
#include "CBitmap.h"

// FORWARD DECLARATIONS
class MSystem;

// CLASS DECLARATION

/**
* CTilemap class holds the game level.
*/
class CTileMap
	: public CBase
	{
	public:
		
		/**
		* Two-phased constructor.
		*/
		static CTileMap* NewL( CBitmap* aBitmap, TSize aSize, const TUint8* aMap, MSystem* aSystem );

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

	private:
		
		/**
		* Default constructor
		*/	
		CTileMap( CBitmap* aBitmap, TSize aSize, const TUint8* aMap, MSystem* aSystem );

		/**
		* Second phase constructor
		*/
		void ConstructL();

	public:

		/**
		* Draws the tilemap.
		* @param aTarget Target bitmap where tilemap is drawn.
		* @param aCamera Current camera position.
		*/
		void Draw( CBitmap& aTarget, const TPoint& aCamera );

		/**
		* Returns the tile from given position.
		* @param aLayer From which layer the tile is checked.
		* @return TInt Number of tile.
		*/
		TInt Tile( const TPoint& aPixel, TInt aLayer );

	private: // Data members

		CBitmap* iBitmap;			/// tile graphics
		TSize iSize;				/// tilemap size
		MSystem* iSystem;			/// pointer to system
		const TUint8* iMap[ 3 ];	/// map layers

	};

#endif

// End of file

⌨️ 快捷键说明

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