2020-11-01 15:45:29 +00:00
|
|
|
#pragma once
|
2020-12-25 13:46:06 +00:00
|
|
|
|
2020-11-01 15:45:29 +00:00
|
|
|
#include "TPinballComponent.h"
|
2020-12-25 13:46:06 +00:00
|
|
|
|
|
|
|
struct scoreStruct;
|
|
|
|
class TFlipper;
|
|
|
|
class TPlunger;
|
|
|
|
class TDrain;
|
|
|
|
class TDemo;
|
|
|
|
class objlist_class;
|
|
|
|
class TLightGroup;
|
|
|
|
|
|
|
|
struct score_struct_super
|
|
|
|
{
|
|
|
|
scoreStruct* ScoreStruct;
|
|
|
|
int Score;
|
|
|
|
int ScoreE9Part;
|
|
|
|
int Unknown2;
|
|
|
|
int BallCount;
|
|
|
|
int ExtraBalls;
|
|
|
|
int BallLockedCounter;
|
|
|
|
};
|
|
|
|
|
2020-11-01 15:45:29 +00:00
|
|
|
|
2020-11-06 13:56:32 +00:00
|
|
|
class TPinballTable : public TPinballComponent
|
2020-11-01 15:45:29 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
TPinballTable();
|
2021-01-08 15:50:12 +00:00
|
|
|
~TPinballTable() override;
|
2020-11-04 13:22:52 +00:00
|
|
|
TPinballComponent* find_component(LPCSTR componentName);
|
|
|
|
TPinballComponent* find_component(int groupIndex);
|
2020-12-25 13:46:06 +00:00
|
|
|
int AddScore(int score);
|
|
|
|
void ChangeBallCount(int count);
|
|
|
|
void tilt(float time);
|
2020-11-29 15:50:49 +00:00
|
|
|
void port_draw() override;
|
2020-12-25 13:46:06 +00:00
|
|
|
int Message(int code, float value) override;
|
|
|
|
|
|
|
|
static void EndGame_timeout(int timerId, void* caller);
|
|
|
|
static void LightShow_timeout(int timerId, void* caller);
|
|
|
|
static void replay_timer_callback(int timerId, void* caller);
|
|
|
|
static void tilt_timeout(int timerId, void* caller);
|
2020-11-06 13:56:32 +00:00
|
|
|
|
2020-11-01 15:45:29 +00:00
|
|
|
TFlipper* FlipperL;
|
|
|
|
TFlipper* FlipperR;
|
2020-12-25 13:46:06 +00:00
|
|
|
scoreStruct* CurScoreStruct;
|
|
|
|
scoreStruct* ScoreBallcount;
|
|
|
|
scoreStruct* ScorePlayerNumber1;
|
2021-01-06 14:06:13 +00:00
|
|
|
int CheatsUsed;
|
2020-12-20 11:13:12 +00:00
|
|
|
int SoundIndex1;
|
|
|
|
int SoundIndex2;
|
|
|
|
int SoundIndex3;
|
2021-01-17 15:26:03 +00:00
|
|
|
int BallInSink;
|
2020-12-25 13:46:06 +00:00
|
|
|
int CurScore;
|
|
|
|
int CurScoreE9;
|
|
|
|
int LightShowTimer;
|
|
|
|
int EndGameTimeoutTimer;
|
|
|
|
int TiltTimeoutTimer;
|
|
|
|
score_struct_super PlayerScores[4];
|
2020-12-20 11:13:12 +00:00
|
|
|
int PlayerCount;
|
|
|
|
int CurrentPlayer;
|
2020-11-01 15:45:29 +00:00
|
|
|
TPlunger* Plunger;
|
|
|
|
TDrain* Drain;
|
2020-12-25 13:46:06 +00:00
|
|
|
TDemo* Demo;
|
2020-11-08 15:37:59 +00:00
|
|
|
int XOffset;
|
|
|
|
int YOffset;
|
2020-12-20 11:13:12 +00:00
|
|
|
int Width;
|
|
|
|
int Height;
|
2020-12-27 15:19:36 +00:00
|
|
|
objlist_class* ComponentList;
|
|
|
|
objlist_class* BallList;
|
2020-11-01 15:45:29 +00:00
|
|
|
TLightGroup* LightGroup;
|
2021-01-07 16:00:38 +00:00
|
|
|
float GravityDirVectMult;
|
|
|
|
float GravityAngleX;
|
|
|
|
float GravityAnglY;
|
2020-11-28 12:59:42 +00:00
|
|
|
float CollisionCompOffset;
|
2021-01-07 16:00:38 +00:00
|
|
|
float PlungerPositionX;
|
|
|
|
float PlungerPositionY;
|
2020-12-25 13:46:06 +00:00
|
|
|
int ScoreMultiplier;
|
|
|
|
int ScoreAdded;
|
|
|
|
int ScoreSpecial1;
|
|
|
|
int ScoreSpecial2;
|
|
|
|
int ScoreSpecial2Flag;
|
|
|
|
int ScoreSpecial3;
|
|
|
|
int ScoreSpecial3Flag;
|
2020-11-01 15:45:29 +00:00
|
|
|
int UnknownP71;
|
2020-12-25 13:46:06 +00:00
|
|
|
int BallCount;
|
|
|
|
int MaxBallCount;
|
|
|
|
int ExtraBalls;
|
2020-11-01 15:45:29 +00:00
|
|
|
int UnknownP75;
|
2020-12-25 13:46:06 +00:00
|
|
|
int BallLockedCounter;
|
|
|
|
int MultiballFlag;
|
2020-11-01 15:45:29 +00:00
|
|
|
int UnknownP78;
|
2020-12-25 13:46:06 +00:00
|
|
|
int ReplayActiveFlag;
|
|
|
|
int ReplayTimer;
|
2020-11-01 15:45:29 +00:00
|
|
|
int UnknownP81;
|
|
|
|
int UnknownP82;
|
2020-12-25 13:46:06 +00:00
|
|
|
int TiltLockFlag;
|
|
|
|
|
|
|
|
private:
|
|
|
|
static int score_multipliers[5];
|
2020-11-01 15:45:29 +00:00
|
|
|
};
|