Commit 80d129ed authored by Gerhard Stein's avatar Gerhard Stein

typedef removes

parent d63ad2ec
......@@ -248,16 +248,30 @@ void CPlayerWM::verifyTeleportation()
// Elevator
const int SLOW_TELEPORT_WALK_SPEED = 3;
void CPlayerWM::processEnteringElevator()
{
// Move him to the target
VectorD2<int> pos(getXPosition(), getYPosition());
VectorD2<int> vec = target-pos;
VectorD2<int> vec_norm;
const int dist_x = abs(vec.x);
const int dist_y = abs(vec.y);
vec_norm.x /= dist_x;
vec_norm.y /= dist_y;
//vec / vec.GetLength2();
moveDir(vec_norm*SLOW_TELEPORT_WALK_SPEED);
moveDir(vec);
if( dist_x < SLOW_TELEPORT_WALK_SPEED &&
dist_y < SLOW_TELEPORT_WALK_SPEED)
{
moveDir(vec);
mProcessPtr = &CPlayerWM::processClosingElevator;
}
performWalkingAnimation(true);
}
......
......@@ -51,7 +51,7 @@ typedef Bits (*VolumeHandler)(Operator *self);
typedef Channel* (*SynthHandler)(Channel *self, Chip* chip, Bit32u samples, Bit32s* output );
//Different synth modes that can generate blocks of data
typedef enum {
enum SynthMode{
sm2AM,
sm2FM,
sm3AM,
......@@ -64,7 +64,7 @@ typedef enum {
sm6Start,
sm2Percussion,
sm3Percussion,
} SynthMode;
} ;
//Shifts for the values contained in chandata variable
enum {
......
......@@ -51,7 +51,7 @@ typedef Bits (*VolumeHandler)(Operator *self);
typedef Channel* (*SynthHandler)(Channel *self, Chip* chip, Bit32u samples, Bit32s* output );
//Different synth modes that can generate blocks of data
typedef enum {
enum SynthMode {
sm2AM,
sm2FM,
sm3AM,
......@@ -64,7 +64,7 @@ typedef enum {
sm6Start,
sm2Percussion,
sm3Percussion,
} SynthMode;
};
//Shifts for the values contained in chandata variable
enum {
......@@ -77,16 +77,17 @@ enum {
MASK_KSR = 0x10,
MASK_SUSTAIN = 0x20,
MASK_VIBRATO = 0x40,
MASK_TREMOLO = 0x80,
MASK_TREMOLO = 0x80
};
typedef enum {
OFF,
enum OperatorState
{
OFF = 0,
RELEASE,
SUSTAIN,
DECAY,
ATTACK,
} OperatorState;
ATTACK
};
struct _Operator {
VolumeHandler volHandler;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment