mario-kart-casio/src/physics.h

41 lines
654 B
C
Raw Normal View History

#ifndef _PHYSICS_H
#define _PHYSICS_H
#include <stdbool.h>
2022-06-29 20:54:53 +02:00
2022-07-02 21:20:17 +02:00
#include "./buttons.h"
2022-12-01 18:24:09 +01:00
#include "./data.h"
2022-06-29 20:54:53 +02:00
typedef struct {
2022-12-01 18:24:09 +01:00
bool isPlayer;
2022-06-29 20:54:53 +02:00
double x;
double y;
double xVelocity;
double yVelocity;
double power;
2022-07-08 18:08:25 +02:00
// double reverse;
2022-06-29 20:54:53 +02:00
double angle;
double angularVelocity;
2022-07-24 19:52:23 +02:00
int kartSteerAnim;
int hopStage;
bool drifting;
int driftDir;
int driftCharge;
int boostTime;
int lapCount;
2022-12-01 18:24:09 +01:00
bool lastHop;
2022-07-08 18:08:25 +02:00
} Kart;
2022-06-29 20:54:53 +02:00
extern bool applyOffRoadDrag;
extern bool applyBoost;
2022-07-21 17:14:02 +02:00
// extern double turnSpeedModifier;
2022-07-08 18:08:25 +02:00
extern double maxPower;
extern double powerFactor;
2022-06-29 20:54:53 +02:00
2022-07-08 18:08:25 +02:00
void updateWithControls(Kart *car, ButtonState controls);
#endif // _PHYSICS_H