2020-11-01 15:45:29 +00:00
|
|
|
#pragma once
|
2020-12-27 15:19:36 +00:00
|
|
|
#include "maths.h"
|
2020-11-01 15:45:29 +00:00
|
|
|
#include "TPinballComponent.h"
|
|
|
|
|
2021-01-06 14:06:13 +00:00
|
|
|
class TCollisionComponent;
|
2020-12-27 15:19:36 +00:00
|
|
|
class TEdgeSegment;
|
|
|
|
|
|
|
|
class TBall : public TPinballComponent
|
2020-11-01 15:45:29 +00:00
|
|
|
{
|
|
|
|
public :
|
2020-12-27 15:19:36 +00:00
|
|
|
TBall(TPinballTable* table);
|
|
|
|
void Repaint();
|
|
|
|
void not_again(TEdgeSegment* edge);
|
|
|
|
bool already_hit(TEdgeSegment* edge);
|
|
|
|
int Message(int code, float value) override;
|
|
|
|
|
2021-01-17 15:26:03 +00:00
|
|
|
static void throw_ball(TBall* ball, struct vector_type* acceleration, float angleMult, float speedMult1,
|
|
|
|
float speedMult2);
|
|
|
|
|
2020-12-27 15:19:36 +00:00
|
|
|
vector_type Position;
|
|
|
|
vector_type Acceleration;
|
|
|
|
float Speed;
|
2021-01-06 14:06:13 +00:00
|
|
|
float RayMaxDistance;
|
|
|
|
float TimeDelta;
|
|
|
|
float TimeNow;
|
2021-01-17 15:26:03 +00:00
|
|
|
vector_type InvAcceleration;
|
2021-01-19 15:28:48 +00:00
|
|
|
vector_type RampFieldForce;
|
2021-01-06 14:06:13 +00:00
|
|
|
TCollisionComponent* CollisionComp;
|
2021-01-07 16:00:38 +00:00
|
|
|
int FieldFlag;
|
2020-12-27 15:19:36 +00:00
|
|
|
TEdgeSegment* Collisions[5];
|
|
|
|
int EdgeCollisionCount;
|
|
|
|
vector_type CollisionOffset;
|
|
|
|
int CollisionFlag;
|
|
|
|
float Offset;
|
|
|
|
int Unknown29;
|
2021-01-17 15:26:03 +00:00
|
|
|
float VisualZArray[50];
|
2020-11-01 15:45:29 +00:00
|
|
|
};
|