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

📄 mopoidlevels.h

📁 mopoid game symbian os application development
💻 H
字号:
/*
========================================================================
 Name        : MopoidLevels.h
 Author      :
 Copyright   : 
 Description : Loads and manages level definitions.
 License     : 
 
========================================================================
*/
#ifndef __MOPOIDLEVELS_H__
#define __MOPOIDLEVELS_H__

#include <eikenv.h>
#include <aknutils.h>
#include "MopoidGrid.h"
#include "CommonFunctions.h"
#include "MopoidSharedData.h"
#include "MopoidSettings.h"

_LIT(KLevelsDataFile, "levels.dat");
_LIT8(KNewLevel8, "---");

/**
 * Loads level layouts and stores them.
 */
class TMopoidLevels {
public:
	TMopoidLevels();
	
    /**
     * Load the level file and store its contents.
     */
    void LoadLevelL(RFs& aFs, const TInt aLevelNum,
    		CMopoidGrid* aGrid, CMopoidSettings* aSettings);

private:
    /**
     * Reads a file into a descriptor.
     * @param inPath the full path + filename of the file to read.
     * @return a heap descriptor containing the contents of the file.
     */
    HBufC8* ReadFileL(RFs& aFs, const TDesC& inPath);

    /**
     * Searches the next occurence of the specified separator in the string
     * and returns a pointer from the previous to the new separator pos.
     * @param aLex the lex class for analyzing the string.
     * @param aSeparator separating char.
     * @return a TPtr to the part of the text between the previous separator pos
     * and the new one.
     */
	TPtrC8 ExtractToken(TLex8& aLex, const TChar aSeparator);

	TInt ReadLineNumberIntL(TLex8& aFileLex);
	TReal ReadLineNumberFloatL(TLex8& aFileLex);
public:
	TInt iNumLevels;
	
	const TChar KNewLine;
};

#endif

⌨️ 快捷键说明

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