28 lines
436 B
C
28 lines
436 B
C
/*
|
|
* DESCRIPTION:
|
|
* c_rotation.c header.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "entity.h"
|
|
|
|
#define C_ROTATION_ANGLE_DEFAULT (PI / 2)
|
|
#define C_ROTATION_VELOCITY_DEFAULT -2.5f
|
|
|
|
#define C_ROTATION_LIMIT 0xFF
|
|
|
|
struct CRotation
|
|
{
|
|
u32 id;
|
|
bool isDisabled;
|
|
f32 velocity;
|
|
f32 friction;
|
|
f32 angle;
|
|
f32 speed;
|
|
f32 velocityMax;
|
|
};
|
|
|
|
void c_rotation_set(struct CRotation* self, f32 speed, f32 speedMax, f32 friction);
|
|
void c_rotation_register(void);
|