📄 tgamedata.h
字号:
// Copyright 2002 Kenneth Guy,
//
// TGameData.h
#ifndef _TGAMEDATA_H_
#define _TGAMEDATA_H_
/** \file TGameData.h
defines class TGameData */
#include <e32std.h>
#include "TLevelData.h"
/** Data assoicated with a game.
Contains the information that is in common between the CGame, CGameFramework and ui classes.
*/
class TGameData {
public:
/** Defines values for the iKeys bitmask. */
enum TGameKey {
ELeft = 0x00000001, ///< Left arrow pressed
ERight = 0x00000002, ///< Right arrow pressed
EUp = 0x00000004, ///< Up arrow pressed
EDown = 0x00000008, ///< Down arrow pressed
EAction1 = 0x00000010, ///< 'A' pressed, unused
EAction2 = 0x00000020, ///< space pressed, unused
EAction3 = 0x00000040, ///< Left shift pressed, fire button
EAction4 = 0x00000080, ///< Enter pressed, unused
EQuit = 0x20000000 ///< 'Q' pressed
};
TUint32 iKeys; /**< Bit mask of keys currently pressed.
Keys bits are set when CGameFramework receives
a key down event, and unset when it receives a
key up event. The fire button is also unset by
the CGame class when it fires a bullet. */
TUint32 iScore; /**< Players score */
TUint32 iLives; /**< Number of lives left */
TBool iForceRedraw; /**< Set to force the status area to reupdate
after the game has been paused */
TBool iLevelCompleted; /**< ETrue if CGame::Play finishes because
player got to the end of the level, EFalse
if the player quit or died.*/
TLevelData iLevel; /**< Level information, set up by CGameFramework::LoadLevelL */
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -