📄 rscreenutils.h
字号:
// Copyright 2002 Kenneth Guy,
//
// RScreenUtils.h
#ifndef _RSCREENUTILS_H_
#define _RSCREENUTILS_H_
/** \file RScreenUtils.h
defines class RScreenUtils */
#include <e32std.h>
/** Direct screen access.
This class provides utilities to plot numbers and sprites direct to
the screen. It also provides the base address of the screen. All X
coordinates are in steps of 2 pixels (ie one 32 bit word).
*/
class RScreenUtils {
/** Picture to plot on the screen */
class TPicture {
public:
const TUint16 *iData; ///< location of sprite data
TUint32 iXSize; ///< sprite X size
TUint32 iYSize; ///< sprite Y size
TUint32 iXPos; ///< sprite X pos (0->319)
TUint32 iYPos; ///< sprite Y pos (0->199)
};
/** Area of the screen to clear */
class TBlank {
public:
TUint32 iColor; ///< color to blank to
TUint32 iXSize; ///< area X size
TUint32 iYSize; ///< area Y size
TUint32 iXPos; ///< area X pos (0->319)
TUint32 iYPos; ///< area Y pos (0->199)
};
public:
RScreenUtils();
TInt Open();
void Close();
void Blank(TUint16 aColor);
void Number(TUint aX,TUint aY,TUint32 aNumber,
TUint16 aForeColor,TUint16 aBackColor);
void HexNumber(TUint aX,TUint aY,TUint32 aNumber,
TUint16 aForeColor,TUint16 aBackColor);
TUint16 *ScreenBase();
void DrawPicture(TPicture &aPicture);
void BlankArea(TBlank &aBlank);
private:
TUint32 BCDNumber(TUint32 aNumber);
static void NumberAsm(TUint16 *aPos,TUint32 aNumber,
TUint16 aForeColor,TUint16 aBackColor);
void BlankAsm(TUint16 aColor);
void BlankAreaAsm(TBlank *aBlank);
void DrawPictureAsm(TPicture *aPicture);
private:
TUint16 *iScreenBase; /**< Base address of screen memory.
number.s and blank.s require that this is
the first data member of the object */
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -