summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-09 05:16:27 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-03-09 05:16:27 +0000
commite5f795ad9952b8bba6993ee3e324b22a0f104816 (patch)
tree1602ac0f74865135eae5acf935b0a285a8e918c2 /src/player.cpp
parent7593d6c71e2331c3e43c732db60ad03ee4d5385d (diff)
downloadmana-e5f795ad9952b8bba6993ee3e324b22a0f104816.tar.gz
mana-e5f795ad9952b8bba6993ee3e324b22a0f104816.tar.bz2
mana-e5f795ad9952b8bba6993ee3e324b22a0f104816.tar.xz
mana-e5f795ad9952b8bba6993ee3e324b22a0f104816.zip
Made all class members named like mClassMember.
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/player.cpp b/src/player.cpp
index 67110bd8..d13cd2f4 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -71,9 +71,9 @@ Player::Player(Uint32 id, Uint16 job, Map *map):
void Player::logic()
{
- switch (action) {
+ switch (mAction) {
case WALK:
- mFrame = (get_elapsed_time(walk_time) * 6) / mWalkSpeed;
+ mFrame = (get_elapsed_time(mWalkTime) * 6) / mWalkSpeed;
if (mFrame >= 6) {
nextStep();
}
@@ -85,7 +85,7 @@ void Player::logic()
{
frames = 5;
}
- mFrame = (get_elapsed_time(walk_time) * frames) / aspd;
+ mFrame = (get_elapsed_time(mWalkTime) * frames) / mAttackSpeed;
if (mFrame >= frames) {
nextStep();
}
@@ -106,16 +106,16 @@ void Player::draw(Graphics *graphics, int offsetX, int offsetY)
{
int px = mPx + offsetX;
int py = mPy + offsetY;
- int frame = action;
+ int frame = mAction;
- frame = action;
+ frame = mAction;
- if (action != SIT && action != DEAD)
+ if (mAction != SIT && mAction != DEAD)
{
frame += mFrame;
}
- if (action == ATTACK && getWeapon() > 0)
+ if (mAction == ATTACK && getWeapon() > 0)
{
if (getWeapon() == 2)
{
@@ -124,12 +124,12 @@ void Player::draw(Graphics *graphics, int offsetX, int offsetY)
}
unsigned char dir = 0;
- while (!(direction & (1 << dir))) dir++;
+ while (!(mDirection & (1 << dir))) dir++;
graphics->drawImage(playerset->get(frame + 18 * dir),
px - 16, py - 32);
- if (getWeapon() != 0 && action == ATTACK)
+ if (getWeapon() != 0 && mAction == ATTACK)
{
int frames = 4;
if (getWeapon() == 2)