📄 mopoidpanel.h
字号:
/*
========================================================================
Name : MopoidPanel.h
Author :
Copyright :
Description : Handles the panel ("avatar" of the player).
License :
========================================================================
*/
#ifndef __MOPOIDPANEL_H__
#define __MOPOIDPANEL_H__
#include <e32std.h>
#include "MopoidSharedData.h"
#include "MopoidSettings.h"
/**
* Stores position and movement information about the mopoid panel.
*/
class TPanel {
public:
TPanel();
/**
* Store a pointer to the settings object.
* This is requied - without the pointer assigned, you will get
* null pointer exceptions (KERN-EXEC 3) as there are no checks
* for performance reasons.
* This class does not take ownership of this object.
*/
void SetSettingsPointer(CMopoidSettings* aSettings);
/**
* Set the speed of the panel according to the specified direction.
*/
void KeyboardMove(MopoidShared::TDirection aDirection);
/**
* Set the speed of the panel directly.
*/
void SetSpeed(TReal aSpeed);
/**
* Calculate the new position of the panel, using its current speed and
* the time that has passed since the last frame.
* @param aStep time difference to the last frame
*/
void ConvertToPos(TReal aStep);
public:
/**
* Current screen position of the panel.
*/
TPoint iPos;
/**
* Current exact position of the panel (x-axis).
*/
TReal iX;
/**
* Current exact position of the panel (y-axis).
*/
TReal iVx;
private:
/**
* Pointer to the settings object, required for
* various calculations.
* Will need the size of some objects from the settings object.
*/
CMopoidSettings* iSettings;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -