1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2024-12-18 18:37:55 +01:00
SpaceCadetPinball/SpaceCadetPinball/TBall.h

36 lines
878 B
C++

#pragma once
#include "maths.h"
#include "TPinballComponent.h"
class TCollisionComponent;
class TEdgeSegment;
class TBall : public TPinballComponent
{
public :
TBall(TPinballTable* table);
void Repaint();
void not_again(TEdgeSegment* edge);
bool already_hit(TEdgeSegment* edge);
int Message(int code, float value) override;
static void throw_ball(TBall* ball, struct vector_type* acceleration, float angleMult, float speedMult1,
float speedMult2);
vector_type Position{};
vector_type Acceleration{};
float Speed;
float RayMaxDistance;
float TimeDelta;
float TimeNow;
vector_type InvAcceleration{};
vector_type RampFieldForce{};
TCollisionComponent* CollisionComp;
int FieldFlag;
TEdgeSegment* Collisions[5]{};
int EdgeCollisionCount;
vector_type CollisionOffset{};
int CollisionFlag;
float Offset;
float VisualZArray[50]{};
};