mirror of
https://github.com/k4zmu2a/SpaceCadetPinball.git
synced 2024-11-25 10:20:17 +01:00
Compare commits
No commits in common. "dfe1665ba1af6013914744c6195c714085c21d54" and "803ca14ef26572c9be834514217fde1856b8d509" have entirely different histories.
dfe1665ba1
...
803ca14ef2
56 changed files with 887 additions and 851 deletions
|
@ -11,7 +11,7 @@
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
#include "TTableLayer.h"
|
#include "TTableLayer.h"
|
||||||
|
|
||||||
TBall::TBall(TPinballTable* table) : TPinballComponent(table, -1, false)
|
TBall::TBall(TPinballTable* table) : TPinballComponent2(table, -1, false)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
char ballGroupName[10]{"ball"};
|
char ballGroupName[10]{"ball"};
|
||||||
|
@ -106,7 +106,7 @@ bool TBall::already_hit(TEdgeSegment* edge)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TBall::Message(MessageCode code, float value)
|
int TBall::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
if (code == MessageCode::Reset)
|
if (code == MessageCode::Reset)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
class TCollisionComponent;
|
class TCollisionComponent;
|
||||||
class TEdgeSegment;
|
class TEdgeSegment;
|
||||||
|
|
||||||
class TBall : public TPinballComponent
|
class TBall : public TPinballComponent2
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
TBall(TPinballTable* table);
|
TBall(TPinballTable* table);
|
||||||
void Repaint();
|
void Repaint();
|
||||||
void not_again(TEdgeSegment* edge);
|
void not_again(TEdgeSegment* edge);
|
||||||
bool already_hit(TEdgeSegment* edge);
|
bool already_hit(TEdgeSegment* edge);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
vector2 get_coordinates() override;
|
vector2 get_coordinates() override;
|
||||||
void Disable();
|
void Disable();
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
TBlocker::TBlocker(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
|
TBlocker::TBlocker(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ TBlocker::TBlocker(TPinballTable* table, int groupIndex) : TCollisionComponent(t
|
||||||
render::sprite_set_bitmap(RenderSprite, nullptr);
|
render::sprite_set_bitmap(RenderSprite, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TBlocker::Message(MessageCode code, float value)
|
int TBlocker::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#include "TCollisionComponent.h"
|
#include "TCollisionComponent.h"
|
||||||
|
|
||||||
class TBlocker :
|
class TBlocker :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TBlocker(TPinballTable* table, int groupIndex);
|
TBlocker(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
|
|
||||||
static void TimerExpired(int timerId, void* caller);
|
static void TimerExpired(int timerId, void* caller);
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
|
|
||||||
TBumper::TBumper(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
|
TBumper::TBumper(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ TBumper::TBumper(TPinballTable* table, int groupIndex) : TCollisionComponent(tab
|
||||||
OriginalThreshold = Threshold;
|
OriginalThreshold = Threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TBumper::Message(MessageCode code, float value)
|
int TBumper::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,7 @@ int TBumper::Message(MessageCode code, float value)
|
||||||
auto maxBmp = static_cast<int>(ListBitmap->size()) - 1;
|
auto maxBmp = static_cast<int>(ListBitmap->size()) - 1;
|
||||||
if (2 * nextBmp > maxBmp)
|
if (2 * nextBmp > maxBmp)
|
||||||
nextBmp = maxBmp / 2;
|
nextBmp = maxBmp / 2;
|
||||||
TBumper::Message(MessageCode::TBumperSetBmpIndex, static_cast<float>(nextBmp));
|
TBumper::Message2(MessageCode::TBumperSetBmpIndex, static_cast<float>(nextBmp));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TBumperDecBmpIndex:
|
case MessageCode::TBumperDecBmpIndex:
|
||||||
|
@ -59,7 +59,7 @@ int TBumper::Message(MessageCode code, float value)
|
||||||
auto nextBmp = BmpIndex - 1;
|
auto nextBmp = BmpIndex - 1;
|
||||||
if (nextBmp < 0)
|
if (nextBmp < 0)
|
||||||
nextBmp = 0;
|
nextBmp = 0;
|
||||||
TBumper::Message(MessageCode::TBumperSetBmpIndex, static_cast<float>(nextBmp));
|
TBumper::Message2(MessageCode::TBumperSetBmpIndex, static_cast<float>(nextBmp));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::PlayerChanged:
|
case MessageCode::PlayerChanged:
|
||||||
|
@ -71,7 +71,7 @@ int TBumper::Message(MessageCode code, float value)
|
||||||
playerPtr = &PlayerData[static_cast<int>(floor(value))];
|
playerPtr = &PlayerData[static_cast<int>(floor(value))];
|
||||||
BmpIndex = playerPtr->BmpIndex;
|
BmpIndex = playerPtr->BmpIndex;
|
||||||
MessageField = playerPtr->MessageField;
|
MessageField = playerPtr->MessageField;
|
||||||
TBumper::Message(MessageCode::TBumperSetBmpIndex, static_cast<float>(BmpIndex));
|
TBumper::Message2(MessageCode::TBumperSetBmpIndex, static_cast<float>(BmpIndex));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::Reset:
|
case MessageCode::Reset:
|
||||||
|
|
|
@ -8,12 +8,12 @@ struct TBumper_player_backup
|
||||||
};
|
};
|
||||||
|
|
||||||
class TBumper :
|
class TBumper :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TBumper(TPinballTable* table, int groupIndex);
|
TBumper(TPinballTable* table, int groupIndex);
|
||||||
~TBumper() override = default;
|
~TBumper() override = default;
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
void Fire();
|
void Fire();
|
||||||
|
|
|
@ -24,3 +24,18 @@ public:
|
||||||
virtual int FieldEffect(TBall* ball, vector2* vecDst);
|
virtual int FieldEffect(TBall* ball, vector2* vecDst);
|
||||||
bool DefaultCollision(TBall* ball, vector2* nextPosition, vector2* direction);
|
bool DefaultCollision(TBall* ball, vector2* nextPosition, vector2* direction);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class TCollisionComponent2 : public TCollisionComponent
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TCollisionComponent2(TPinballTable* table, int group_index, bool create_wall)
|
||||||
|
: TCollisionComponent(table, group_index, create_wall)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
DEPRECATED int Message(int code, float value) override
|
||||||
|
{
|
||||||
|
return Message2(static_cast<MessageCode>(code), value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
|
|
||||||
TComponentGroup::TComponentGroup(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
|
TComponentGroup::TComponentGroup(TPinballTable* table, int groupIndex) : TPinballComponent2(table, groupIndex, false)
|
||||||
{
|
{
|
||||||
Timer = 0;
|
Timer = 0;
|
||||||
if (groupIndex > 0)
|
if (groupIndex > 0)
|
||||||
|
@ -33,7 +33,7 @@ TComponentGroup::~TComponentGroup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int TComponentGroup::Message(MessageCode code, float value)
|
int TComponentGroup::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
if (code == MessageCode::TComponentGroupResetNotifyTimer)
|
if (code == MessageCode::TComponentGroupResetNotifyTimer)
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ int TComponentGroup::Message(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
for (auto component : List)
|
for (auto component : List)
|
||||||
{
|
{
|
||||||
component->Message(code, value);
|
component->Message2(code, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
|
|
||||||
|
|
||||||
class TComponentGroup :
|
class TComponentGroup :
|
||||||
public TPinballComponent
|
public TPinballComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TComponentGroup(TPinballTable* table, int groupIndex);
|
TComponentGroup(TPinballTable* table, int groupIndex);
|
||||||
~TComponentGroup() override;
|
~TComponentGroup() override;
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
static void NotifyTimerExpired(int timerId, void* caller);
|
static void NotifyTimerExpired(int timerId, void* caller);
|
||||||
|
|
||||||
std::vector<TPinballComponent*> List;
|
std::vector<TPinballComponent*> List;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "TBall.h"
|
#include "TBall.h"
|
||||||
|
|
||||||
TDemo::TDemo(TPinballTable* table, int groupIndex)
|
TDemo::TDemo(TPinballTable* table, int groupIndex)
|
||||||
: TCollisionComponent(table, groupIndex, false)
|
: TCollisionComponent2(table, groupIndex, false)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ TDemo::TDemo(TPinballTable* table, int groupIndex)
|
||||||
Edge3 = TEdgeSegment::install_wall(v9, this, &ActiveFlag, visual.CollisionGroup, table->CollisionCompOffset, 1404);
|
Edge3 = TEdgeSegment::install_wall(v9, this, &ActiveFlag, visual.CollisionGroup, table->CollisionCompOffset, 1404);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TDemo::Message(MessageCode code, float value)
|
int TDemo::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
@ -125,7 +125,7 @@ void TDemo::Collision(TBall* ball, vector2* nextPosition, vector2* direction, fl
|
||||||
case 1404:
|
case 1404:
|
||||||
if (!PlungerFlag)
|
if (!PlungerFlag)
|
||||||
{
|
{
|
||||||
PinballTable->Message(MessageCode::PlungerInputPressed, ball->TimeNow);
|
PinballTable->Message2(MessageCode::PlungerInputPressed, ball->TimeNow);
|
||||||
float time = RandFloat() + 2.0f;
|
float time = RandFloat() + 2.0f;
|
||||||
PlungerFlag = timer::set(time, this, PlungerRelease);
|
PlungerFlag = timer::set(time, this, PlungerRelease);
|
||||||
}
|
}
|
||||||
|
@ -139,14 +139,14 @@ void TDemo::PlungerRelease(int timerId, void* caller)
|
||||||
{
|
{
|
||||||
auto demo = static_cast<TDemo*>(caller);
|
auto demo = static_cast<TDemo*>(caller);
|
||||||
demo->PlungerFlag = 0;
|
demo->PlungerFlag = 0;
|
||||||
demo->PinballTable->Message(MessageCode::PlungerInputReleased, pb::time_next);
|
demo->PinballTable->Message2(MessageCode::PlungerInputReleased, pb::time_next);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TDemo::UnFlipRight(int timerId, void* caller)
|
void TDemo::UnFlipRight(int timerId, void* caller)
|
||||||
{
|
{
|
||||||
auto demo = static_cast<TDemo*>(caller);
|
auto demo = static_cast<TDemo*>(caller);
|
||||||
if (demo->FlipRightFlag)
|
if (demo->FlipRightFlag)
|
||||||
demo->PinballTable->Message(MessageCode::RightFlipperInputReleased, pb::time_next);
|
demo->PinballTable->Message2(MessageCode::RightFlipperInputReleased, pb::time_next);
|
||||||
demo->FlipRightFlag = 0;
|
demo->FlipRightFlag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ void TDemo::UnFlipLeft(int timerId, void* caller)
|
||||||
{
|
{
|
||||||
auto demo = static_cast<TDemo*>(caller);
|
auto demo = static_cast<TDemo*>(caller);
|
||||||
if (demo->FlipLeftFlag)
|
if (demo->FlipLeftFlag)
|
||||||
demo->PinballTable->Message(MessageCode::LeftFlipperInputReleased, pb::time_next);
|
demo->PinballTable->Message2(MessageCode::LeftFlipperInputReleased, pb::time_next);
|
||||||
demo->FlipLeftFlag = 0;
|
demo->FlipLeftFlag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ void TDemo::FlipRight(int timerId, void* caller)
|
||||||
timer::kill(demo->FlipRightTimer);
|
timer::kill(demo->FlipRightTimer);
|
||||||
demo->FlipRightTimer = 0;
|
demo->FlipRightTimer = 0;
|
||||||
}
|
}
|
||||||
demo->PinballTable->Message(MessageCode::RightFlipperInputPressed, pb::time_next);
|
demo->PinballTable->Message2(MessageCode::RightFlipperInputPressed, pb::time_next);
|
||||||
demo->FlipRightFlag = 1;
|
demo->FlipRightFlag = 1;
|
||||||
float time = demo->UnFlipTimerTime1 + demo->UnFlipTimerTime2 - RandFloat() *
|
float time = demo->UnFlipTimerTime1 + demo->UnFlipTimerTime2 - RandFloat() *
|
||||||
(demo->UnFlipTimerTime2 + demo->UnFlipTimerTime2);
|
(demo->UnFlipTimerTime2 + demo->UnFlipTimerTime2);
|
||||||
|
@ -186,7 +186,7 @@ void TDemo::FlipLeft(int timerId, void* caller)
|
||||||
timer::kill(demo->FlipLeftTimer);
|
timer::kill(demo->FlipLeftTimer);
|
||||||
demo->FlipLeftTimer = 0;
|
demo->FlipLeftTimer = 0;
|
||||||
}
|
}
|
||||||
demo->PinballTable->Message(MessageCode::LeftFlipperInputPressed, pb::time_next);
|
demo->PinballTable->Message2(MessageCode::LeftFlipperInputPressed, pb::time_next);
|
||||||
demo->FlipLeftFlag = 1;
|
demo->FlipLeftFlag = 1;
|
||||||
float time = demo->UnFlipTimerTime1 + demo->UnFlipTimerTime2 - RandFloat() *
|
float time = demo->UnFlipTimerTime1 + demo->UnFlipTimerTime2 - RandFloat() *
|
||||||
(demo->UnFlipTimerTime2 + demo->UnFlipTimerTime2);
|
(demo->UnFlipTimerTime2 + demo->UnFlipTimerTime2);
|
||||||
|
@ -198,6 +198,6 @@ void TDemo::NewGameRestartTimer(int timerId, void* caller)
|
||||||
{
|
{
|
||||||
auto demo = static_cast<TDemo*>(caller);
|
auto demo = static_cast<TDemo*>(caller);
|
||||||
pb::replay_level(true);
|
pb::replay_level(true);
|
||||||
demo->PinballTable->Message(MessageCode::NewGame, static_cast<float>(demo->PinballTable->PlayerCount));
|
demo->PinballTable->Message2(MessageCode::NewGame, static_cast<float>(demo->PinballTable->PlayerCount));
|
||||||
demo->RestartGameTimer = 0;
|
demo->RestartGameTimer = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#include "TCollisionComponent.h"
|
#include "TCollisionComponent.h"
|
||||||
|
|
||||||
class TDemo :
|
class TDemo :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TDemo(TPinballTable* table, int groupIndex);
|
TDemo(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
|
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
|
|
||||||
TDrain::TDrain(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
|
TDrain::TDrain(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
Timer = 0;
|
Timer = 0;
|
||||||
TimerTime = *loader::query_float_attribute(groupIndex, 0, 407);
|
TimerTime = *loader::query_float_attribute(groupIndex, 0, 407);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TDrain::Message(MessageCode code, float value)
|
int TDrain::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
if (code == MessageCode::Reset)
|
if (code == MessageCode::Reset)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#include "TCollisionComponent.h"
|
#include "TCollisionComponent.h"
|
||||||
|
|
||||||
class TDrain :
|
class TDrain :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TDrain(TPinballTable* table, int groupIndex);
|
TDrain(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "TLine.h"
|
#include "TLine.h"
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
|
|
||||||
TFlagSpinner::TFlagSpinner(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, false)
|
TFlagSpinner::TFlagSpinner(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, false)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
vector2 end{}, start{};
|
vector2 end{}, start{};
|
||||||
|
@ -50,7 +50,7 @@ TFlagSpinner::TFlagSpinner(TPinballTable* table, int groupIndex) : TCollisionCom
|
||||||
MinSpeed = *minSpeed;
|
MinSpeed = *minSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TFlagSpinner::Message(MessageCode code, float value)
|
int TFlagSpinner::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
if (code == MessageCode::Reset)
|
if (code == MessageCode::Reset)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#include "TCollisionComponent.h"
|
#include "TCollisionComponent.h"
|
||||||
|
|
||||||
class TFlagSpinner :
|
class TFlagSpinner :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TFlagSpinner(TPinballTable* table, int groupIndex);
|
TFlagSpinner(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
void NextFrame();
|
void NextFrame();
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
|
|
||||||
TFlipper::TFlipper(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, false)
|
TFlipper::TFlipper(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, false)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ TFlipper::~TFlipper()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int TFlipper::Message(MessageCode code, float value)
|
int TFlipper::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
class TFlipperEdge;
|
class TFlipperEdge;
|
||||||
|
|
||||||
class TFlipper :
|
class TFlipper :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TFlipper(TPinballTable* table, int groupIndex);
|
TFlipper(TPinballTable* table, int groupIndex);
|
||||||
~TFlipper() override;
|
~TFlipper() override;
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void port_draw() override;
|
void port_draw() override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include "loader.h"
|
#include "loader.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
|
|
||||||
TGate::TGate(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
|
TGate::TGate(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ TGate::TGate(TPinballTable* table, int groupIndex) : TCollisionComponent(table,
|
||||||
control::handler(1024, this);
|
control::handler(1024, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TGate::Message(MessageCode code, float value)
|
int TGate::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#include "TCollisionComponent.h"
|
#include "TCollisionComponent.h"
|
||||||
|
|
||||||
class TGate :
|
class TGate :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TGate(TPinballTable* table, int groupIndex);
|
TGate(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
|
|
||||||
int SoundIndex4;
|
int SoundIndex4;
|
||||||
int SoundIndex3;
|
int SoundIndex3;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
#include "TTableLayer.h"
|
#include "TTableLayer.h"
|
||||||
|
|
||||||
THole::THole(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, false)
|
THole::THole(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, false)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
circle_type circle{};
|
circle_type circle{};
|
||||||
|
@ -57,7 +57,7 @@ THole::THole(TPinballTable* table, int groupIndex) : TCollisionComponent(table,
|
||||||
TTableLayer::edges_insert_circle(&circle, nullptr, &Field);
|
TTableLayer::edges_insert_circle(&circle, nullptr, &Field);
|
||||||
}
|
}
|
||||||
|
|
||||||
int THole::Message(MessageCode code, float value)
|
int THole::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
if (code == MessageCode::Reset && BallCapturedFlag)
|
if (code == MessageCode::Reset && BallCapturedFlag)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
#include "TEdgeManager.h"
|
#include "TEdgeManager.h"
|
||||||
|
|
||||||
class THole :
|
class THole :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
THole(TPinballTable* table, int groupIndex);
|
THole(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
int FieldEffect(TBall* ball, vector2* vecDst) override;
|
int FieldEffect(TBall* ball, vector2* vecDst) override;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
|
|
||||||
TKickback::TKickback(TPinballTable* table, int groupIndex): TCollisionComponent(table, groupIndex, true)
|
TKickback::TKickback(TPinballTable* table, int groupIndex): TCollisionComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
MessageField = 0;
|
MessageField = 0;
|
||||||
Timer = 0;
|
Timer = 0;
|
||||||
|
@ -19,7 +19,7 @@ TKickback::TKickback(TPinballTable* table, int groupIndex): TCollisionComponent(
|
||||||
Threshold = 1000000000.0f;
|
Threshold = 1000000000.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TKickback::Message(MessageCode code, float value)
|
int TKickback::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
if ((code == MessageCode::SetTiltLock || code == MessageCode::Reset) && Timer)
|
if ((code == MessageCode::SetTiltLock || code == MessageCode::Reset) && Timer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#include "TCollisionComponent.h"
|
#include "TCollisionComponent.h"
|
||||||
|
|
||||||
class TKickback :
|
class TKickback :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TKickback(TPinballTable* table, int groupIndex);
|
TKickback(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
#include "TTableLayer.h"
|
#include "TTableLayer.h"
|
||||||
|
|
||||||
TKickout::TKickout(TPinballTable* table, int groupIndex, bool someFlag): TCollisionComponent(
|
TKickout::TKickout(TPinballTable* table, int groupIndex, bool someFlag): TCollisionComponent2(
|
||||||
table, groupIndex, false)
|
table, groupIndex, false)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
|
@ -60,7 +60,7 @@ TKickout::TKickout(TPinballTable* table, int groupIndex, bool someFlag): TCollis
|
||||||
TTableLayer::edges_insert_circle(&circle, nullptr, &Field);
|
TTableLayer::edges_insert_circle(&circle, nullptr, &Field);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TKickout::Message(MessageCode code, float value)
|
int TKickout::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
@ -107,7 +107,7 @@ void TKickout::Collision(TBall* ball, vector2* nextPosition, vector2* direction,
|
||||||
ball->Position.Z = CollisionBallSetZ;
|
ball->Position.Z = CollisionBallSetZ;
|
||||||
if (PinballTable->TiltLockFlag)
|
if (PinballTable->TiltLockFlag)
|
||||||
{
|
{
|
||||||
Message(MessageCode::TKickoutRestartTimer, 0.1f);
|
Message2(MessageCode::TKickoutRestartTimer, 0.1f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
#include "TEdgeManager.h"
|
#include "TEdgeManager.h"
|
||||||
|
|
||||||
class TKickout :
|
class TKickout :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TKickout(TPinballTable* table, int groupIndex, bool someFlag);
|
TKickout(TPinballTable* table, int groupIndex, bool someFlag);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
int FieldEffect(TBall* ball, vector2* vecDst) override;
|
int FieldEffect(TBall* ball, vector2* vecDst) override;
|
||||||
|
|
|
@ -23,13 +23,13 @@ TLight::TLight(TPinballTable* table, int groupIndex) : TPinballComponent(table,
|
||||||
SourceDelay[1] = *floatArr2;
|
SourceDelay[1] = *floatArr2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TLight::Message(MessageCode code, float value)
|
int TLight::Message(int code, float value)
|
||||||
{
|
{
|
||||||
int bmpIndex;
|
int bmpIndex;
|
||||||
|
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
case MessageCode::Reset:
|
case ~MessageCode::Reset:
|
||||||
Reset();
|
Reset();
|
||||||
for (auto index = 0; index < PinballTable->PlayerCount; ++index)
|
for (auto index = 0; index < PinballTable->PlayerCount; ++index)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ int TLight::Message(MessageCode code, float value)
|
||||||
playerPtr->MessageField = MessageField;
|
playerPtr->MessageField = MessageField;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MessageCode::PlayerChanged:
|
case ~MessageCode::PlayerChanged:
|
||||||
{
|
{
|
||||||
auto playerPtr = &PlayerData[PinballTable->CurrentPlayer];
|
auto playerPtr = &PlayerData[PinballTable->CurrentPlayer];
|
||||||
playerPtr->FlasherOnFlag = FlasherOnFlag;
|
playerPtr->FlasherOnFlag = FlasherOnFlag;
|
||||||
|
@ -57,29 +57,29 @@ int TLight::Message(MessageCode code, float value)
|
||||||
MessageField = playerPtr->MessageField;
|
MessageField = playerPtr->MessageField;
|
||||||
if (LightOnBmpIndex)
|
if (LightOnBmpIndex)
|
||||||
{
|
{
|
||||||
Message(MessageCode::TLightSetOnStateBmpIndex, static_cast<float>(LightOnBmpIndex));
|
Message(11, static_cast<float>(LightOnBmpIndex));
|
||||||
}
|
}
|
||||||
if (LightOnFlag)
|
if (LightOnFlag)
|
||||||
Message(MessageCode::TLightTurnOn, 0.0);
|
Message(1, 0.0);
|
||||||
if (FlasherOnFlag)
|
if (FlasherOnFlag)
|
||||||
Message(MessageCode::TLightFlasherStart, 0.0);
|
Message(4, 0.0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightTurnOff:
|
case 0:
|
||||||
LightOnFlag = false;
|
LightOnFlag = false;
|
||||||
if (!FlasherOnFlag && !ToggledOffFlag && !ToggledOnFlag)
|
if (!FlasherOnFlag && !ToggledOffFlag && !ToggledOnFlag)
|
||||||
SetSpriteBmp(BmpArr[0]);
|
SetSpriteBmp(BmpArr[0]);
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightTurnOn:
|
case 1:
|
||||||
LightOnFlag = true;
|
LightOnFlag = true;
|
||||||
if (!FlasherOnFlag && !ToggledOffFlag && !ToggledOnFlag)
|
if (!FlasherOnFlag && !ToggledOffFlag && !ToggledOnFlag)
|
||||||
SetSpriteBmp(BmpArr[1]);
|
SetSpriteBmp(BmpArr[1]);
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightGetLightOnFlag:
|
case 2:
|
||||||
return LightOnFlag;
|
return LightOnFlag;
|
||||||
case MessageCode::TLightGetFlasherOnFlag:
|
case 3:
|
||||||
return FlasherOnFlag;
|
return FlasherOnFlag;
|
||||||
case MessageCode::TLightFlasherStart:
|
case 4:
|
||||||
schedule_timeout(0.0);
|
schedule_timeout(0.0);
|
||||||
if (!FlasherOnFlag || !FlashTimer)
|
if (!FlasherOnFlag || !FlashTimer)
|
||||||
{
|
{
|
||||||
|
@ -90,15 +90,15 @@ int TLight::Message(MessageCode code, float value)
|
||||||
flasher_start(LightOnFlag);
|
flasher_start(LightOnFlag);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightApplyMultDelay:
|
case 5:
|
||||||
FlashDelay[0] = value * SourceDelay[0];
|
FlashDelay[0] = value * SourceDelay[0];
|
||||||
FlashDelay[1] = value * SourceDelay[1];
|
FlashDelay[1] = value * SourceDelay[1];
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightApplyDelay:
|
case 6:
|
||||||
FlashDelay[0] = SourceDelay[0];
|
FlashDelay[0] = SourceDelay[0];
|
||||||
FlashDelay[1] = SourceDelay[1];
|
FlashDelay[1] = SourceDelay[1];
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightFlasherStartTimed:
|
case 7:
|
||||||
if (!FlasherOnFlag)
|
if (!FlasherOnFlag)
|
||||||
flasher_start(LightOnFlag);
|
flasher_start(LightOnFlag);
|
||||||
FlasherOnFlag = true;
|
FlasherOnFlag = true;
|
||||||
|
@ -107,7 +107,7 @@ int TLight::Message(MessageCode code, float value)
|
||||||
ToggledOffFlag = false;
|
ToggledOffFlag = false;
|
||||||
schedule_timeout(value);
|
schedule_timeout(value);
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightTurnOffTimed:
|
case 8:
|
||||||
if (!ToggledOffFlag)
|
if (!ToggledOffFlag)
|
||||||
{
|
{
|
||||||
if (FlasherOnFlag)
|
if (FlasherOnFlag)
|
||||||
|
@ -124,7 +124,7 @@ int TLight::Message(MessageCode code, float value)
|
||||||
}
|
}
|
||||||
schedule_timeout(value);
|
schedule_timeout(value);
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightTurnOnTimed:
|
case 9:
|
||||||
if (!ToggledOnFlag)
|
if (!ToggledOnFlag)
|
||||||
{
|
{
|
||||||
if (FlasherOnFlag)
|
if (FlasherOnFlag)
|
||||||
|
@ -141,7 +141,7 @@ int TLight::Message(MessageCode code, float value)
|
||||||
}
|
}
|
||||||
schedule_timeout(value);
|
schedule_timeout(value);
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightSetOnStateBmpIndex:
|
case 11:
|
||||||
LightOnBmpIndex = Clamp(static_cast<int>(floor(value)), 0, static_cast<int>(ListBitmap->size()) - 1);
|
LightOnBmpIndex = Clamp(static_cast<int>(floor(value)), 0, static_cast<int>(ListBitmap->size()) - 1);
|
||||||
BmpArr[0] = nullptr;
|
BmpArr[0] = nullptr;
|
||||||
BmpArr[1] = ListBitmap->at(LightOnBmpIndex);
|
BmpArr[1] = ListBitmap->at(LightOnBmpIndex);
|
||||||
|
@ -160,19 +160,19 @@ int TLight::Message(MessageCode code, float value)
|
||||||
}
|
}
|
||||||
SetSpriteBmp(BmpArr[bmpIndex]);
|
SetSpriteBmp(BmpArr[bmpIndex]);
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightIncOnStateBmpIndex:
|
case 12:
|
||||||
bmpIndex = LightOnBmpIndex + 1;
|
bmpIndex = LightOnBmpIndex + 1;
|
||||||
if (bmpIndex >= static_cast<int>(ListBitmap->size()))
|
if (bmpIndex >= static_cast<int>(ListBitmap->size()))
|
||||||
bmpIndex = static_cast<int>(ListBitmap->size()) - 1;
|
bmpIndex = static_cast<int>(ListBitmap->size()) - 1;
|
||||||
Message(MessageCode::TLightSetOnStateBmpIndex, static_cast<float>(bmpIndex));
|
Message(11, static_cast<float>(bmpIndex));
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightDecOnStateBmpIndex:
|
case 13:
|
||||||
bmpIndex = LightOnBmpIndex - 1;
|
bmpIndex = LightOnBmpIndex - 1;
|
||||||
if (bmpIndex < 0)
|
if (bmpIndex < 0)
|
||||||
bmpIndex = 0;
|
bmpIndex = 0;
|
||||||
Message(MessageCode::TLightSetOnStateBmpIndex, static_cast<float>(bmpIndex));
|
Message(11, static_cast<float>(bmpIndex));
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightResetTimed:
|
case 14:
|
||||||
if (TimeoutTimer)
|
if (TimeoutTimer)
|
||||||
timer::kill(TimeoutTimer);
|
timer::kill(TimeoutTimer);
|
||||||
TimeoutTimer = 0;
|
TimeoutTimer = 0;
|
||||||
|
@ -183,49 +183,49 @@ int TLight::Message(MessageCode code, float value)
|
||||||
ToggledOnFlag = false;
|
ToggledOnFlag = false;
|
||||||
SetSpriteBmp(BmpArr[LightOnFlag]);
|
SetSpriteBmp(BmpArr[LightOnFlag]);
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightFlasherStartTimedThenStayOn:
|
case 15:
|
||||||
TurnOffAfterFlashingFg = false;
|
TurnOffAfterFlashingFg = false;
|
||||||
if (UndoOverrideTimer)
|
if (UndoOverrideTimer)
|
||||||
timer::kill(UndoOverrideTimer);
|
timer::kill(UndoOverrideTimer);
|
||||||
UndoOverrideTimer = 0;
|
UndoOverrideTimer = 0;
|
||||||
Message(MessageCode::TLightTurnOn, 0.0);
|
Message(1, 0.0);
|
||||||
Message(MessageCode::TLightFlasherStartTimed, value);
|
Message(7, value);
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightFlasherStartTimedThenStayOff:
|
case 16:
|
||||||
if (UndoOverrideTimer)
|
if (UndoOverrideTimer)
|
||||||
timer::kill(UndoOverrideTimer);
|
timer::kill(UndoOverrideTimer);
|
||||||
UndoOverrideTimer = 0;
|
UndoOverrideTimer = 0;
|
||||||
Message(MessageCode::TLightFlasherStartTimed, value);
|
Message(7, value);
|
||||||
TurnOffAfterFlashingFg = true;
|
TurnOffAfterFlashingFg = true;
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightToggleValue:
|
case 17:
|
||||||
Message(static_cast<int>(floor(value)) ? MessageCode::TLightTurnOn : MessageCode::TLightTurnOff, 0.0);
|
Message(static_cast<int>(floor(value)) != 0, 0.0);
|
||||||
return LightOnFlag;
|
return LightOnFlag;
|
||||||
case MessageCode::TLightResetAndToggleValue:
|
case 18:
|
||||||
Message(MessageCode::TLightToggleValue, value);
|
Message(17, value);
|
||||||
Message(MessageCode::TLightResetTimed, 0.0);
|
Message(14, 0.0);
|
||||||
return LightOnFlag;
|
return LightOnFlag;
|
||||||
case MessageCode::TLightResetAndTurnOn:
|
case 19:
|
||||||
Message(MessageCode::TLightTurnOn, 0.0);
|
Message(1, 0.0);
|
||||||
Message(MessageCode::TLightResetTimed, 0.0);
|
Message(14, 0.0);
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightResetAndTurnOff:
|
case 20:
|
||||||
Message(MessageCode::TLightTurnOff, 0.0);
|
Message(0, 0.0);
|
||||||
Message(MessageCode::TLightResetTimed, 0.0);
|
Message(14, 0.0);
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightToggle:
|
case 21:
|
||||||
Message(MessageCode::TLightToggleValue, !LightOnFlag);
|
Message(17, !LightOnFlag);
|
||||||
return LightOnFlag;
|
return LightOnFlag;
|
||||||
case MessageCode::TLightResetAndToggle:
|
case 22:
|
||||||
Message(MessageCode::TLightResetAndToggleValue, !LightOnFlag);
|
Message(18, !LightOnFlag);
|
||||||
return LightOnFlag;
|
return LightOnFlag;
|
||||||
case MessageCode::TLightSetMessageField:
|
case 23:
|
||||||
MessageField = static_cast<int>(floor(value));
|
MessageField = static_cast<int>(floor(value));
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightFtTmpOverrideOn:
|
case -24:
|
||||||
case MessageCode::TLightFtTmpOverrideOff:
|
case -25:
|
||||||
// FT codes in negative to avoid overlap with 3DPB TLightGroup codes
|
// FT codes in negative to avoid overlap with 3DPB TLightGroup codes
|
||||||
render::sprite_set_bitmap(RenderSprite, BmpArr[code == MessageCode::TLightFtTmpOverrideOn]);
|
render::sprite_set_bitmap(RenderSprite, BmpArr[code == -24]);
|
||||||
if (UndoOverrideTimer)
|
if (UndoOverrideTimer)
|
||||||
timer::kill(UndoOverrideTimer);
|
timer::kill(UndoOverrideTimer);
|
||||||
UndoOverrideTimer = 0;
|
UndoOverrideTimer = 0;
|
||||||
|
@ -235,7 +235,7 @@ int TLight::Message(MessageCode code, float value)
|
||||||
UndoOverrideTimer = timer::set(value, this, UndoTmpOverride);
|
UndoOverrideTimer = timer::set(value, this, UndoTmpOverride);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightFtResetOverride:
|
case -26:
|
||||||
if (UndoOverrideTimer)
|
if (UndoOverrideTimer)
|
||||||
timer::kill(UndoOverrideTimer);
|
timer::kill(UndoOverrideTimer);
|
||||||
UndoOverrideTimer = 0;
|
UndoOverrideTimer = 0;
|
||||||
|
@ -298,7 +298,7 @@ void TLight::TimerExpired(int timerId, void* caller)
|
||||||
if (light->TurnOffAfterFlashingFg)
|
if (light->TurnOffAfterFlashingFg)
|
||||||
{
|
{
|
||||||
light->TurnOffAfterFlashingFg = false;
|
light->TurnOffAfterFlashingFg = false;
|
||||||
light->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
light->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
if (light->Control)
|
if (light->Control)
|
||||||
control::handler(60, light);
|
control::handler(60, light);
|
||||||
|
@ -341,5 +341,5 @@ void TLight::flasher_callback(int timerId, void* caller)
|
||||||
void TLight::UndoTmpOverride(int timerId, void* caller)
|
void TLight::UndoTmpOverride(int timerId, void* caller)
|
||||||
{
|
{
|
||||||
auto light = static_cast<TLight*>(caller);
|
auto light = static_cast<TLight*>(caller);
|
||||||
light->Message(MessageCode::TLightFtResetOverride, 0.0f);
|
light->Message(-26, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ class TLight :
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TLight(TPinballTable* table, int groupIndex);
|
TLight(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message(int code, float value) override;
|
||||||
void Reset();
|
void Reset();
|
||||||
void schedule_timeout(float time);
|
void schedule_timeout(float time);
|
||||||
void flasher_stop(int bmpIndex);
|
void flasher_stop(int bmpIndex);
|
||||||
|
|
|
@ -32,13 +32,13 @@ TLightBargraph::~TLightBargraph()
|
||||||
delete[] TimerTimeArray;
|
delete[] TimerTimeArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TLightBargraph::Message(MessageCode code, float value)
|
int TLightBargraph::Message(int code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
case MessageCode::TLightGroupGetOnCount:
|
case 37:
|
||||||
return TimeIndex;
|
return TimeIndex;
|
||||||
case MessageCode::TLightGroupToggleSplitIndex:
|
case 45:
|
||||||
{
|
{
|
||||||
if (TimerBargraph)
|
if (TimerBargraph)
|
||||||
{
|
{
|
||||||
|
@ -51,24 +51,24 @@ int TLightBargraph::Message(MessageCode code, float value)
|
||||||
timeIndex = maxCount - 1;
|
timeIndex = maxCount - 1;
|
||||||
if (timeIndex >= 0)
|
if (timeIndex >= 0)
|
||||||
{
|
{
|
||||||
TLightGroup::Message(MessageCode::TLightGroupToggleSplitIndex, static_cast<float>(timeIndex / 2));
|
TLightGroup::Message(45, static_cast<float>(timeIndex / 2));
|
||||||
if (!(timeIndex & 1))
|
if (!(timeIndex & 1))
|
||||||
TLightGroup::Message(MessageCode::TLightGroupStartFlasher, 0.0);
|
TLightGroup::Message(46, 0.0);
|
||||||
if (TimerTimeArray)
|
if (TimerTimeArray)
|
||||||
TimerBargraph = timer::set(TimerTimeArray[timeIndex], this, BargraphTimerExpired);
|
TimerBargraph = timer::set(TimerTimeArray[timeIndex], this, BargraphTimerExpired);
|
||||||
TimeIndex = timeIndex;
|
TimeIndex = timeIndex;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TLightGroup::Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
TLightGroup::Message(20, 0.0);
|
||||||
TimeIndex = 0;
|
TimeIndex = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::SetTiltLock:
|
case ~MessageCode::SetTiltLock:
|
||||||
Reset();
|
Reset();
|
||||||
break;
|
break;
|
||||||
case MessageCode::PlayerChanged:
|
case ~MessageCode::PlayerChanged:
|
||||||
if (TimerBargraph)
|
if (TimerBargraph)
|
||||||
{
|
{
|
||||||
timer::kill(TimerBargraph);
|
timer::kill(TimerBargraph);
|
||||||
|
@ -79,10 +79,10 @@ int TLightBargraph::Message(MessageCode code, float value)
|
||||||
TimeIndex = PlayerTimerIndexBackup[static_cast<int>(floor(value))];
|
TimeIndex = PlayerTimerIndexBackup[static_cast<int>(floor(value))];
|
||||||
if (TimeIndex)
|
if (TimeIndex)
|
||||||
{
|
{
|
||||||
TLightBargraph::Message(MessageCode::TLightGroupToggleSplitIndex, static_cast<float>(TimeIndex));
|
TLightBargraph::Message(45, static_cast<float>(TimeIndex));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MessageCode::Reset:
|
case ~MessageCode::Reset:
|
||||||
{
|
{
|
||||||
Reset();
|
Reset();
|
||||||
int* playerPtr = PlayerTimerIndexBackup;
|
int* playerPtr = PlayerTimerIndexBackup;
|
||||||
|
@ -92,7 +92,7 @@ int TLightBargraph::Message(MessageCode code, float value)
|
||||||
|
|
||||||
++playerPtr;
|
++playerPtr;
|
||||||
}
|
}
|
||||||
TLightGroup::Message(MessageCode::Reset, value);
|
TLightGroup::Message(~MessageCode::Reset, value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -119,12 +119,12 @@ void TLightBargraph::BargraphTimerExpired(int timerId, void* caller)
|
||||||
bar->TimerBargraph = 0;
|
bar->TimerBargraph = 0;
|
||||||
if (bar->TimeIndex)
|
if (bar->TimeIndex)
|
||||||
{
|
{
|
||||||
bar->Message(MessageCode::TLightGroupToggleSplitIndex, static_cast<float>(bar->TimeIndex - 1));
|
bar->Message(45, static_cast<float>(bar->TimeIndex - 1));
|
||||||
control::handler(60, bar);
|
control::handler(60, bar);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bar->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
bar->Message(20, 0.0);
|
||||||
control::handler(47, bar);
|
control::handler(47, bar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ class TLightBargraph :
|
||||||
public:
|
public:
|
||||||
TLightBargraph(TPinballTable* table, int groupIndex);
|
TLightBargraph(TPinballTable* table, int groupIndex);
|
||||||
~TLightBargraph() override;
|
~TLightBargraph() override;
|
||||||
int Message(MessageCode code, float value) override;
|
int Message(int code, float value) override;
|
||||||
void Reset() override;
|
void Reset() override;
|
||||||
|
|
||||||
static void BargraphTimerExpired(int timerId, void* caller);
|
static void BargraphTimerExpired(int timerId, void* caller);
|
||||||
|
|
|
@ -28,15 +28,15 @@ TLightGroup::TLightGroup(TPinballTable* table, int groupIndex) : TPinballCompone
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int TLightGroup::Message(MessageCode code, float value)
|
int TLightGroup::Message(int code, float value)
|
||||||
{
|
{
|
||||||
auto const count = static_cast<int>(List.size());
|
auto const count = static_cast<int>(List.size());
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
case MessageCode::SetTiltLock:
|
case ~MessageCode::SetTiltLock:
|
||||||
case MessageCode::GameOver:
|
case ~MessageCode::GameOver:
|
||||||
break;
|
break;
|
||||||
case MessageCode::PlayerChanged:
|
case ~MessageCode::PlayerChanged:
|
||||||
{
|
{
|
||||||
auto playerPtr = &PlayerData[PinballTable->CurrentPlayer];
|
auto playerPtr = &PlayerData[PinballTable->CurrentPlayer];
|
||||||
playerPtr->MessageField = MessageField;
|
playerPtr->MessageField = MessageField;
|
||||||
|
@ -53,7 +53,7 @@ int TLightGroup::Message(MessageCode code, float value)
|
||||||
TimerExpired(0, this);
|
TimerExpired(0, this);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::Reset:
|
case ~MessageCode::Reset:
|
||||||
Reset();
|
Reset();
|
||||||
for (auto index = 0; index < PinballTable->PlayerCount; index++)
|
for (auto index = 0; index < PinballTable->PlayerCount; index++)
|
||||||
{
|
{
|
||||||
|
@ -63,99 +63,99 @@ int TLightGroup::Message(MessageCode code, float value)
|
||||||
playerPtr->Timer1Time = Timer1Time;
|
playerPtr->Timer1Time = Timer1Time;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightGroupStepBackward:
|
case 24:
|
||||||
{
|
{
|
||||||
auto lastLight = List.at(count - 1);
|
auto lastLight = List.at(count - 1);
|
||||||
if (lastLight->FlasherOnFlag || lastLight->ToggledOnFlag || lastLight->ToggledOffFlag)
|
if (lastLight->FlasherOnFlag || lastLight->ToggledOnFlag || lastLight->ToggledOffFlag)
|
||||||
break;
|
break;
|
||||||
if (MessageField2 != MessageCode::TLightGroupNull)
|
if (MessageField2)
|
||||||
{
|
{
|
||||||
TLightGroup::Message(MessageCode::TLightGroupReset, 0.0);
|
TLightGroup::Message(34, 0.0);
|
||||||
}
|
}
|
||||||
AnimationFlag = 1;
|
AnimationFlag = 1;
|
||||||
MessageField2 = code;
|
MessageField2 = code;
|
||||||
auto lastMessage = lastLight->MessageField;
|
auto lightMessageField = lastLight->MessageField;
|
||||||
auto lastStatus = lastLight->LightOnFlag;
|
auto lightStatusBefore = lastLight->LightOnFlag;
|
||||||
for (auto index = count - 1; index > 0; --index)
|
for (auto index = count - 1; index > 0; --index)
|
||||||
{
|
{
|
||||||
auto lightCur = List.at(index);
|
auto lightCur = List.at(index);
|
||||||
auto lightPrev = List.at(index - 1);
|
auto lightPrev = List.at(index - 1);
|
||||||
lightCur->Message(lightPrev->LightOnFlag ? MessageCode::TLightTurnOn : MessageCode::TLightTurnOff, 0.0);
|
lightCur->Message(lightPrev->LightOnFlag, 0.0);
|
||||||
lightCur->MessageField = lightPrev->MessageField;
|
lightCur->MessageField = lightPrev->MessageField;
|
||||||
}
|
}
|
||||||
auto firstLight = List.at(0);
|
auto firstLight = List.at(0);
|
||||||
firstLight->Message(lastStatus ? MessageCode::TLightTurnOn : MessageCode::TLightTurnOff, 0.0);
|
firstLight->Message(lightStatusBefore, 0.0);
|
||||||
firstLight->MessageField = lastMessage;
|
firstLight->MessageField = lightMessageField;
|
||||||
reschedule_animation(value);
|
reschedule_animation(value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupStepForward:
|
case 25:
|
||||||
{
|
{
|
||||||
auto lastLight = List.at(count - 1);
|
auto lastLight = List.at(count - 1);
|
||||||
if (lastLight->FlasherOnFlag || lastLight->ToggledOnFlag || lastLight->ToggledOffFlag)
|
if (lastLight->FlasherOnFlag || lastLight->ToggledOnFlag || lastLight->ToggledOffFlag)
|
||||||
break;
|
break;
|
||||||
if (MessageField2 != MessageCode::TLightGroupNull)
|
if (MessageField2)
|
||||||
{
|
{
|
||||||
TLightGroup::Message(MessageCode::TLightGroupReset, 0.0);
|
TLightGroup::Message(34, 0.0);
|
||||||
}
|
}
|
||||||
auto firstLight = List.at(0);
|
auto firstLight = List.at(0);
|
||||||
AnimationFlag = 1;
|
AnimationFlag = 1;
|
||||||
MessageField2 = code;
|
MessageField2 = code;
|
||||||
auto firstMessage = firstLight->MessageField;
|
auto lightMessageField = firstLight->MessageField;
|
||||||
auto firstStatus = firstLight->LightOnFlag;
|
auto lightStatusBefore = firstLight->LightOnFlag;
|
||||||
for (auto index = 0; index < count - 1; index++)
|
for (auto index = 0; index < count - 1; index++)
|
||||||
{
|
{
|
||||||
auto lightCur = List.at(index);
|
auto lightCur = List.at(index);
|
||||||
auto lightNext = List.at(index + 1);
|
auto lightNext = List.at(index + 1);
|
||||||
lightCur->Message(lightNext->LightOnFlag ? MessageCode::TLightTurnOn : MessageCode::TLightTurnOff, 0.0);
|
lightCur->Message(lightNext->LightOnFlag, 0.0);
|
||||||
lightCur->MessageField = lightNext->MessageField;
|
lightCur->MessageField = lightNext->MessageField;
|
||||||
}
|
}
|
||||||
lastLight->Message(firstStatus ? MessageCode::TLightTurnOn : MessageCode::TLightTurnOff, 0.0);
|
lastLight->Message(lightStatusBefore, 0.0);
|
||||||
lastLight->MessageField = firstMessage;
|
lastLight->MessageField = lightMessageField;
|
||||||
reschedule_animation(value);
|
reschedule_animation(value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupAnimationBackward:
|
case 26:
|
||||||
{
|
{
|
||||||
if (AnimationFlag || MessageField2 == MessageCode::TLightGroupNull)
|
if (AnimationFlag || !MessageField2)
|
||||||
start_animation();
|
start_animation();
|
||||||
MessageField2 = code;
|
MessageField2 = code;
|
||||||
AnimationFlag = 0;
|
AnimationFlag = 0;
|
||||||
auto lastLight = List.at(count - 1);
|
auto lastLight = List.at(count - 1);
|
||||||
auto lastStatus = lastLight->ToggledOnFlag;
|
auto flasherFlag2 = lastLight->ToggledOnFlag;
|
||||||
for (auto i = count - 1; i > 0; --i)
|
for (auto i = count - 1; i > 0; --i)
|
||||||
{
|
{
|
||||||
auto lightCur = List.at(i);
|
auto lightCur = List.at(i);
|
||||||
auto lightPrev = List.at(i - 1);
|
auto lightPrev = List.at(i - 1);
|
||||||
lightCur->Message(lightPrev->ToggledOnFlag ? MessageCode::TLightTurnOnTimed : MessageCode::TLightTurnOffTimed, 0.0);
|
lightCur->Message(lightPrev->ToggledOnFlag + 8, 0.0);
|
||||||
}
|
}
|
||||||
auto firstLight = List.at(0);
|
auto firstLight = List.at(0);
|
||||||
firstLight->Message(lastStatus ? MessageCode::TLightTurnOnTimed : MessageCode::TLightTurnOffTimed, 0);
|
firstLight->Message((flasherFlag2 != 0) + 8, 0);
|
||||||
reschedule_animation(value);
|
reschedule_animation(value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupAnimationForward:
|
case 27:
|
||||||
{
|
{
|
||||||
if (AnimationFlag || MessageField2 == MessageCode::TLightGroupNull)
|
if (AnimationFlag || !MessageField2)
|
||||||
start_animation();
|
start_animation();
|
||||||
MessageField2 = code;
|
MessageField2 = code;
|
||||||
AnimationFlag = 0;
|
AnimationFlag = 0;
|
||||||
auto firstLight = List.at(0);
|
auto firstLight = List.at(0);
|
||||||
auto firstStatus = firstLight->ToggledOnFlag;
|
auto flasherFlag2 = firstLight->ToggledOnFlag;
|
||||||
for (auto i = 0; i < count - 1; i++)
|
for (auto i = 0; i < count - 1; i++)
|
||||||
{
|
{
|
||||||
auto lightCur = List.at(i);
|
auto lightCur = List.at(i);
|
||||||
auto lightNext = List.at(i + 1);
|
auto lightNext = List.at(i + 1);
|
||||||
lightCur->Message(lightNext->ToggledOnFlag ? MessageCode::TLightTurnOnTimed : MessageCode::TLightTurnOffTimed, 0.0);
|
lightCur->Message(lightNext->ToggledOnFlag + 8, 0.0);
|
||||||
}
|
}
|
||||||
auto lastLight = List.at(count - 1);
|
auto lastLight = List.at(count - 1);
|
||||||
lastLight->Message(firstStatus ? MessageCode::TLightTurnOnTimed : MessageCode::TLightTurnOffTimed, 0);
|
lastLight->Message((flasherFlag2 != 0) + 8, 0);
|
||||||
reschedule_animation(value);
|
reschedule_animation(value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupLightShowAnimation:
|
case 28:
|
||||||
{
|
{
|
||||||
if (AnimationFlag || MessageField2 == MessageCode::TLightGroupNull)
|
if (AnimationFlag || !MessageField2)
|
||||||
start_animation();
|
start_animation();
|
||||||
MessageField2 = code;
|
MessageField2 = code;
|
||||||
AnimationFlag = 0;
|
AnimationFlag = 0;
|
||||||
|
@ -164,27 +164,27 @@ int TLightGroup::Message(MessageCode code, float value)
|
||||||
if (rand() % 100 > 70)
|
if (rand() % 100 > 70)
|
||||||
{
|
{
|
||||||
auto randVal = RandFloat() * value * 3.0f + 0.1f;
|
auto randVal = RandFloat() * value * 3.0f + 0.1f;
|
||||||
light->Message(MessageCode::TLightTurnOnTimed, randVal);
|
light->Message(9, randVal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reschedule_animation(value);
|
reschedule_animation(value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupGameOverAnimation:
|
case 29:
|
||||||
{
|
{
|
||||||
if (AnimationFlag || MessageField2 == MessageCode::TLightGroupNull)
|
if (AnimationFlag || !MessageField2)
|
||||||
start_animation();
|
start_animation();
|
||||||
MessageField2 = code;
|
MessageField2 = code;
|
||||||
AnimationFlag = 0;
|
AnimationFlag = 0;
|
||||||
for (auto light : List)
|
for (auto light : List)
|
||||||
{
|
{
|
||||||
auto randVal = static_cast<float>(rand() % 100 > 70);
|
auto randVal = static_cast<float>(rand() % 100 > 70);
|
||||||
light->Message(MessageCode::TLightResetAndToggleValue, randVal);
|
light->Message(18, randVal);
|
||||||
}
|
}
|
||||||
reschedule_animation(value);
|
reschedule_animation(value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupRandomAnimationSaturation:
|
case 30:
|
||||||
{
|
{
|
||||||
auto noBmpInd1Count = 0;
|
auto noBmpInd1Count = 0;
|
||||||
for (auto light : List)
|
for (auto light : List)
|
||||||
|
@ -201,16 +201,16 @@ int TLightGroup::Message(MessageCode code, float value)
|
||||||
auto light = *it;
|
auto light = *it;
|
||||||
if (!light->LightOnFlag && randModCount-- == 0)
|
if (!light->LightOnFlag && randModCount-- == 0)
|
||||||
{
|
{
|
||||||
light->Message(MessageCode::TLightTurnOn, 0.0);
|
light->Message(1, 0.0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MessageField2 != MessageCode::TLightGroupNull)
|
if (MessageField2)
|
||||||
start_animation();
|
start_animation();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupRandomAnimationDesaturation:
|
case 31:
|
||||||
{
|
{
|
||||||
auto bmpInd1Count = 0;
|
auto bmpInd1Count = 0;
|
||||||
for (auto light : List)
|
for (auto light : List)
|
||||||
|
@ -227,72 +227,71 @@ int TLightGroup::Message(MessageCode code, float value)
|
||||||
auto light = *it;
|
auto light = *it;
|
||||||
if (light->LightOnFlag && randModCount-- == 0)
|
if (light->LightOnFlag && randModCount-- == 0)
|
||||||
{
|
{
|
||||||
light->Message(MessageCode::TLightTurnOff, 0.0);
|
light->Message(0, 0.0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MessageField2 != MessageCode::TLightGroupNull)
|
if (MessageField2)
|
||||||
start_animation();
|
start_animation();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupOffsetAnimationForward:
|
case 32:
|
||||||
{
|
{
|
||||||
auto index = next_light_up();
|
auto index = next_light_up();
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
break;
|
break;
|
||||||
List.at(index)->Message(MessageCode::TLightTurnOn, 0.0);
|
List.at(index)->Message(1, 0.0);
|
||||||
if (MessageField2 != MessageCode::TLightGroupNull)
|
if (MessageField2)
|
||||||
start_animation();
|
start_animation();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupOffsetAnimationBackward:
|
case 33:
|
||||||
{
|
{
|
||||||
auto index = next_light_down();
|
auto index = next_light_down();
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
break;
|
break;
|
||||||
List.at(index)->Message(MessageCode::TLightTurnOff, 0.0);
|
List.at(index)->Message(0, 0.0);
|
||||||
if (MessageField2 != MessageCode::TLightGroupNull)
|
if (MessageField2)
|
||||||
start_animation();
|
start_animation();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupReset:
|
case 34:
|
||||||
{
|
{
|
||||||
if (Timer)
|
if (Timer)
|
||||||
timer::kill(Timer);
|
timer::kill(Timer);
|
||||||
Timer = 0;
|
Timer = 0;
|
||||||
if (MessageField2 == MessageCode::TLightGroupAnimationBackward ||
|
if (MessageField2 == 26 || MessageField2 == 27 || MessageField2 == 28)
|
||||||
MessageField2 == MessageCode::TLightGroupAnimationForward || MessageField2 == MessageCode::TLightGroupLightShowAnimation)
|
TLightGroup::Message(14, 0.0);
|
||||||
TLightGroup::Message(MessageCode::TLightResetTimed, 0.0);
|
MessageField2 = 0;
|
||||||
MessageField2 = MessageCode::TLightGroupNull;
|
|
||||||
AnimationFlag = 0;
|
AnimationFlag = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupTurnOnAtIndex:
|
case 35:
|
||||||
{
|
{
|
||||||
auto index = static_cast<int>(floor(value));
|
auto index = static_cast<int>(floor(value));
|
||||||
if (index >= count || index < 0)
|
if (index >= count || index < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
auto light = List.at(index);
|
auto light = List.at(index);
|
||||||
light->Message(MessageCode::TLightTurnOn, 0.0);
|
light->Message(1, 0.0);
|
||||||
if (MessageField2 != MessageCode::TLightGroupNull)
|
if (MessageField2)
|
||||||
start_animation();
|
start_animation();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupTurnOffAtIndex:
|
case 36:
|
||||||
{
|
{
|
||||||
auto index = static_cast<int>(floor(value));
|
auto index = static_cast<int>(floor(value));
|
||||||
if (index >= count || index < 0)
|
if (index >= count || index < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
auto light = List.at(index);
|
auto light = List.at(index);
|
||||||
light->Message(MessageCode::TLightTurnOff, 0.0);
|
light->Message(0, 0.0);
|
||||||
if (MessageField2 != MessageCode::TLightGroupNull)
|
if (MessageField2)
|
||||||
start_animation();
|
start_animation();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupGetOnCount:
|
case 37:
|
||||||
{
|
{
|
||||||
auto bmp1Count = 0;
|
auto bmp1Count = 0;
|
||||||
for (auto light : List)
|
for (auto light : List)
|
||||||
|
@ -302,79 +301,79 @@ int TLightGroup::Message(MessageCode code, float value)
|
||||||
}
|
}
|
||||||
return bmp1Count;
|
return bmp1Count;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupGetLightCount:
|
case 38:
|
||||||
return count;
|
return count;
|
||||||
case MessageCode::TLightGroupGetMessage2:
|
case 39:
|
||||||
return ~MessageField2;
|
return MessageField2;
|
||||||
case MessageCode::TLightGroupGetAnimationFlag:
|
case 40:
|
||||||
return AnimationFlag;
|
return AnimationFlag;
|
||||||
case MessageCode::TLightGroupResetAndTurnOn:
|
case 41:
|
||||||
{
|
{
|
||||||
auto index = next_light_up();
|
auto index = next_light_up();
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
break;
|
break;
|
||||||
if (MessageField2 != MessageCode::TLightGroupNull || AnimationFlag)
|
if (MessageField2 || AnimationFlag)
|
||||||
TLightGroup::Message(MessageCode::TLightGroupReset, 0.0);
|
TLightGroup::Message(34, 0.0);
|
||||||
List.at(index)->Message(MessageCode::TLightFlasherStartTimedThenStayOn, value);
|
List.at(index)->Message(15, value);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupResetAndTurnOff:
|
case 42:
|
||||||
{
|
{
|
||||||
auto index = next_light_down();
|
auto index = next_light_down();
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
break;
|
break;
|
||||||
if (MessageField2 != MessageCode::TLightGroupNull || AnimationFlag)
|
if (MessageField2 || AnimationFlag)
|
||||||
TLightGroup::Message(MessageCode::TLightGroupReset, 0.0);
|
TLightGroup::Message(34, 0.0);
|
||||||
List.at(index)->Message(MessageCode::TLightFlasherStartTimedThenStayOff, value);
|
List.at(index)->Message(16, value);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupRestartNotifyTimer:
|
case 43:
|
||||||
if (NotifyTimer)
|
if (NotifyTimer)
|
||||||
timer::kill(NotifyTimer);
|
timer::kill(NotifyTimer);
|
||||||
NotifyTimer = 0;
|
NotifyTimer = 0;
|
||||||
if (value > 0.0f)
|
if (value > 0.0f)
|
||||||
NotifyTimer = timer::set(value, this, NotifyTimerExpired);
|
NotifyTimer = timer::set(value, this, NotifyTimerExpired);
|
||||||
break;
|
break;
|
||||||
case MessageCode::TLightGroupFlashWhenOn:
|
case 44:
|
||||||
{
|
{
|
||||||
for (auto it = List.rbegin(); it != List.rend(); ++it)
|
for (auto it = List.rbegin(); it != List.rend(); ++it)
|
||||||
{
|
{
|
||||||
auto light = *it;
|
auto light = *it;
|
||||||
if (light->LightOnFlag)
|
if (light->LightOnFlag)
|
||||||
{
|
{
|
||||||
light->Message(MessageCode::TLightTurnOff, 0.0);
|
light->Message(0, 0.0);
|
||||||
light->Message(MessageCode::TLightFlasherStartTimedThenStayOff, value);
|
light->Message(16, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupToggleSplitIndex:
|
case 45:
|
||||||
{
|
{
|
||||||
control::handler(~code, this);
|
control::handler(code, this);
|
||||||
auto index = static_cast<int>(floor(value));
|
auto index = static_cast<int>(floor(value));
|
||||||
if (index >= 0 && index < count)
|
if (index >= 0 && index < count)
|
||||||
{
|
{
|
||||||
// Turn off lights (index, end]
|
// Turn off lights (index, end]
|
||||||
for (auto i = count - 1; i > index; i--)
|
for (auto i = count - 1; i > index; i--)
|
||||||
{
|
{
|
||||||
List.at(i)->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
List.at(i)->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Turn on lights [begin, index]
|
// Turn on lights [begin, index]
|
||||||
for (auto i = index; i >= 0; i--)
|
for (auto i = index; i >= 0; i--)
|
||||||
{
|
{
|
||||||
List.at(i)->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
List.at(i)->Message(19, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MessageCode::TLightGroupStartFlasher:
|
case 46:
|
||||||
{
|
{
|
||||||
auto index = next_light_down();
|
auto index = next_light_down();
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
List.at(index)->Message(MessageCode::TLightFlasherStart, 0.0);
|
List.at(index)->Message(4, 0.0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -396,7 +395,7 @@ void TLightGroup::Reset()
|
||||||
if (NotifyTimer)
|
if (NotifyTimer)
|
||||||
timer::kill(NotifyTimer);
|
timer::kill(NotifyTimer);
|
||||||
NotifyTimer = 0;
|
NotifyTimer = 0;
|
||||||
MessageField2 = MessageCode::TLightGroupNull;
|
MessageField2 = 0;
|
||||||
AnimationFlag = 0;
|
AnimationFlag = 0;
|
||||||
Timer1Time = Timer1TimeDefault;
|
Timer1Time = Timer1TimeDefault;
|
||||||
}
|
}
|
||||||
|
@ -408,7 +407,7 @@ void TLightGroup::reschedule_animation(float time)
|
||||||
Timer = 0;
|
Timer = 0;
|
||||||
if (time == 0)
|
if (time == 0)
|
||||||
{
|
{
|
||||||
MessageField2 = MessageCode::TLightGroupNull;
|
MessageField2 = 0;
|
||||||
AnimationFlag = 0;
|
AnimationFlag = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -423,9 +422,9 @@ void TLightGroup::start_animation()
|
||||||
{
|
{
|
||||||
auto light = *it;
|
auto light = *it;
|
||||||
if (light->LightOnFlag)
|
if (light->LightOnFlag)
|
||||||
light->Message(MessageCode::TLightTurnOnTimed, 0.0);
|
light->Message(9, 0.0);
|
||||||
else
|
else
|
||||||
light->Message(MessageCode::TLightTurnOffTimed, 0.0);
|
light->Message(8, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ class TLight;
|
||||||
struct TLightGroup_player_backup
|
struct TLightGroup_player_backup
|
||||||
{
|
{
|
||||||
int MessageField;
|
int MessageField;
|
||||||
MessageCode MessageField2;
|
int MessageField2;
|
||||||
float Timer1Time;
|
float Timer1Time;
|
||||||
int Unknown3;
|
int Unknown3;
|
||||||
};
|
};
|
||||||
|
@ -19,7 +19,7 @@ class TLightGroup :
|
||||||
public:
|
public:
|
||||||
TLightGroup(TPinballTable* table, int groupIndex);
|
TLightGroup(TPinballTable* table, int groupIndex);
|
||||||
~TLightGroup() override = default;
|
~TLightGroup() override = default;
|
||||||
int Message(MessageCode code, float value) override;
|
int Message(int code, float value) override;
|
||||||
virtual void Reset();
|
virtual void Reset();
|
||||||
void reschedule_animation(float time);
|
void reschedule_animation(float time);
|
||||||
void start_animation();
|
void start_animation();
|
||||||
|
@ -32,7 +32,7 @@ public:
|
||||||
std::vector<TLight*> List;
|
std::vector<TLight*> List;
|
||||||
float Timer1Time{};
|
float Timer1Time{};
|
||||||
float Timer1TimeDefault;
|
float Timer1TimeDefault;
|
||||||
MessageCode MessageField2{};
|
int MessageField2{};
|
||||||
int AnimationFlag{};
|
int AnimationFlag{};
|
||||||
int NotifyTimer;
|
int NotifyTimer;
|
||||||
int Timer;
|
int Timer;
|
||||||
|
|
|
@ -19,7 +19,7 @@ TLightRollover::TLightRollover(TPinballTable* table, int groupIndex) : TRollover
|
||||||
FloatArr = *loader::query_float_attribute(groupIndex, 0, 407);
|
FloatArr = *loader::query_float_attribute(groupIndex, 0, 407);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TLightRollover::Message(MessageCode code, float value)
|
int TLightRollover::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
if (code == MessageCode::Reset)
|
if (code == MessageCode::Reset)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ class TLightRollover :
|
||||||
public:
|
public:
|
||||||
TLightRollover(TPinballTable* table, int groupIndex);
|
TLightRollover(TPinballTable* table, int groupIndex);
|
||||||
~TLightRollover() override = default;
|
~TLightRollover() override = default;
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
|
|
||||||
|
|
|
@ -105,10 +105,10 @@ TPinballComponent::~TPinballComponent()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int TPinballComponent::Message(MessageCode code, float value)
|
int TPinballComponent::Message(int code, float value)
|
||||||
{
|
{
|
||||||
MessageField = ~code;
|
MessageField = code;
|
||||||
if (code == MessageCode::Reset)
|
if (code == ~MessageCode::Reset)
|
||||||
MessageField = 0;
|
MessageField = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,13 +41,12 @@ enum class MessageCode
|
||||||
TLightFtTmpOverrideOff = -25,
|
TLightFtTmpOverrideOff = -25,
|
||||||
TLightFtResetOverride = -26,
|
TLightFtResetOverride = -26,
|
||||||
|
|
||||||
TLightGroupNull = 0,
|
|
||||||
TLightGroupStepBackward = 24,
|
TLightGroupStepBackward = 24,
|
||||||
TLightGroupStepForward = 25,
|
TLightGroupStepForward = 25,
|
||||||
TLightGroupAnimationBackward = 26,
|
TLightGroupAnimationBackward = 26,
|
||||||
TLightGroupAnimationForward = 27,
|
TLightGroupAnimationForward = 27,
|
||||||
TLightGroupLightShowAnimation = 28,
|
TLightGroupRandomAnimation1 = 28,
|
||||||
TLightGroupGameOverAnimation = 29,
|
TLightGroupRandomAnimation2 = 29,
|
||||||
TLightGroupRandomAnimationSaturation = 30,
|
TLightGroupRandomAnimationSaturation = 30,
|
||||||
TLightGroupRandomAnimationDesaturation = 31,
|
TLightGroupRandomAnimationDesaturation = 31,
|
||||||
TLightGroupOffsetAnimationForward = 32,
|
TLightGroupOffsetAnimationForward = 32,
|
||||||
|
@ -122,6 +121,13 @@ constexpr typename std::enable_if<std::is_enum<T>::value, X>::type operator~(T v
|
||||||
{
|
{
|
||||||
return static_cast<X>(value);
|
return static_cast<X>(value);
|
||||||
}
|
}
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
|
#define DEPRECATED __attribute__((deprecated))
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#define DEPRECATED __declspec(deprecated)
|
||||||
|
#else
|
||||||
|
#define DEPRECATED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
class TPinballComponent
|
class TPinballComponent
|
||||||
|
@ -129,7 +135,11 @@ class TPinballComponent
|
||||||
public:
|
public:
|
||||||
TPinballComponent(TPinballTable* table, int groupIndex, bool loadVisuals);
|
TPinballComponent(TPinballTable* table, int groupIndex, bool loadVisuals);
|
||||||
virtual ~TPinballComponent();
|
virtual ~TPinballComponent();
|
||||||
virtual int Message(MessageCode code, float value);
|
virtual int Message(int code, float value);
|
||||||
|
virtual int Message2(MessageCode code, float value)
|
||||||
|
{
|
||||||
|
return Message(~code, value);
|
||||||
|
}
|
||||||
virtual void port_draw();
|
virtual void port_draw();
|
||||||
int get_scoring(unsigned int index) const;
|
int get_scoring(unsigned int index) const;
|
||||||
virtual vector2 get_coordinates();
|
virtual vector2 get_coordinates();
|
||||||
|
@ -148,3 +158,18 @@ private:
|
||||||
float VisualPosNormX;
|
float VisualPosNormX;
|
||||||
float VisualPosNormY;
|
float VisualPosNormY;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class TPinballComponent2 : public TPinballComponent
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TPinballComponent2(TPinballTable* table, int group_index, bool load_visuals)
|
||||||
|
: TPinballComponent(table, group_index, load_visuals)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
DEPRECATED int Message(int code, float value) override
|
||||||
|
{
|
||||||
|
return Message2(static_cast<MessageCode>(code), value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
int TPinballTable::score_multipliers[5] = {1, 2, 3, 5, 10};
|
int TPinballTable::score_multipliers[5] = {1, 2, 3, 5, 10};
|
||||||
|
|
||||||
|
|
||||||
TPinballTable::TPinballTable(): TPinballComponent(nullptr, -1, false)
|
TPinballTable::TPinballTable(): TPinballComponent2(nullptr, -1, false)
|
||||||
{
|
{
|
||||||
int shortArrLength;
|
int shortArrLength;
|
||||||
|
|
||||||
|
@ -297,9 +297,9 @@ void TPinballTable::tilt(float time)
|
||||||
|
|
||||||
for (auto component : ComponentList)
|
for (auto component : ComponentList)
|
||||||
{
|
{
|
||||||
component->Message(MessageCode::SetTiltLock, time);
|
component->Message2(MessageCode::SetTiltLock, time);
|
||||||
}
|
}
|
||||||
LightGroup->Message(MessageCode::TLightTurnOffTimed, 0);
|
LightGroup->Message(8, 0);
|
||||||
TiltLockFlag = 1;
|
TiltLockFlag = 1;
|
||||||
control::table_control_handler(1011);
|
control::table_control_handler(1011);
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ void TPinballTable::port_draw()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int TPinballTable::Message(MessageCode code, float value)
|
int TPinballTable::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
const char* rc_text;
|
const char* rc_text;
|
||||||
|
|
||||||
|
@ -323,41 +323,41 @@ int TPinballTable::Message(MessageCode code, float value)
|
||||||
case MessageCode::LeftFlipperInputPressed:
|
case MessageCode::LeftFlipperInputPressed:
|
||||||
if (!TiltLockFlag)
|
if (!TiltLockFlag)
|
||||||
{
|
{
|
||||||
FlipperL->Message(MessageCode::TFlipperExtend, value);
|
FlipperL->Message2(MessageCode::TFlipperExtend, value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MessageCode::LeftFlipperInputReleased:
|
case MessageCode::LeftFlipperInputReleased:
|
||||||
if (!TiltLockFlag)
|
if (!TiltLockFlag)
|
||||||
{
|
{
|
||||||
FlipperL->Message(MessageCode::TFlipperRetract, value);
|
FlipperL->Message2(MessageCode::TFlipperRetract, value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MessageCode::RightFlipperInputPressed:
|
case MessageCode::RightFlipperInputPressed:
|
||||||
if (!TiltLockFlag)
|
if (!TiltLockFlag)
|
||||||
{
|
{
|
||||||
FlipperR->Message(MessageCode::TFlipperExtend, value);
|
FlipperR->Message2(MessageCode::TFlipperExtend, value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MessageCode::RightFlipperInputReleased:
|
case MessageCode::RightFlipperInputReleased:
|
||||||
if (!TiltLockFlag)
|
if (!TiltLockFlag)
|
||||||
{
|
{
|
||||||
FlipperR->Message(MessageCode::TFlipperRetract, value);
|
FlipperR->Message2(MessageCode::TFlipperRetract, value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MessageCode::PlungerInputPressed:
|
case MessageCode::PlungerInputPressed:
|
||||||
case MessageCode::PlungerInputReleased:
|
case MessageCode::PlungerInputReleased:
|
||||||
Plunger->Message(code, value);
|
Plunger->Message2(code, value);
|
||||||
break;
|
break;
|
||||||
case MessageCode::Pause:
|
case MessageCode::Pause:
|
||||||
case MessageCode::Resume:
|
case MessageCode::Resume:
|
||||||
case MessageCode::LooseFocus:
|
case MessageCode::LooseFocus:
|
||||||
for (auto component : ComponentList)
|
for (auto component : ComponentList)
|
||||||
{
|
{
|
||||||
component->Message(code, value);
|
component->Message2(code, value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MessageCode::ClearTiltLock:
|
case MessageCode::ClearTiltLock:
|
||||||
LightGroup->Message(MessageCode::TLightResetTimed, 0.0);
|
LightGroup->Message(14, 0.0);
|
||||||
if (TiltLockFlag)
|
if (TiltLockFlag)
|
||||||
{
|
{
|
||||||
TiltLockFlag = 0;
|
TiltLockFlag = 0;
|
||||||
|
@ -367,16 +367,16 @@ int TPinballTable::Message(MessageCode code, float value)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MessageCode::StartGamePlayer1:
|
case MessageCode::StartGamePlayer1:
|
||||||
LightGroup->Message(MessageCode::TLightGroupReset, 0.0);
|
LightGroup->Message(34, 0.0);
|
||||||
LightGroup->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
LightGroup->Message(20, 0.0);
|
||||||
Plunger->Message(MessageCode::PlungerStartFeedTimer, 0.0);
|
Plunger->Message2(MessageCode::PlungerStartFeedTimer, 0.0);
|
||||||
if (Demo && Demo->ActiveFlag)
|
if (Demo && Demo->ActiveFlag)
|
||||||
rc_text = pb::get_rc_string(Msg::STRING131);
|
rc_text = pb::get_rc_string(Msg::STRING131);
|
||||||
else
|
else
|
||||||
rc_text = pb::get_rc_string(Msg::STRING127);
|
rc_text = pb::get_rc_string(Msg::STRING127);
|
||||||
pb::InfoTextBox->Display(rc_text, -1.0);
|
pb::InfoTextBox->Display(rc_text, -1.0);
|
||||||
if (Demo)
|
if (Demo)
|
||||||
Demo->Message(MessageCode::NewGame, 0.0);
|
Demo->Message2(MessageCode::NewGame, 0.0);
|
||||||
break;
|
break;
|
||||||
case MessageCode::NewGame:
|
case MessageCode::NewGame:
|
||||||
if (EndGameTimeoutTimer)
|
if (EndGameTimeoutTimer)
|
||||||
|
@ -389,12 +389,12 @@ int TPinballTable::Message(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
timer::kill(LightShowTimer);
|
timer::kill(LightShowTimer);
|
||||||
LightShowTimer = 0;
|
LightShowTimer = 0;
|
||||||
Message(MessageCode::StartGamePlayer1, 0.0);
|
Message2(MessageCode::StartGamePlayer1, 0.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CheatsUsed = 0;
|
CheatsUsed = 0;
|
||||||
Message(MessageCode::Reset, 0.0);
|
Message2(MessageCode::Reset, 0.0);
|
||||||
auto ball = BallList[0];
|
auto ball = BallList[0];
|
||||||
ball->Position.Y = 0.0;
|
ball->Position.Y = 0.0;
|
||||||
ball->Position.X = 0.0;
|
ball->Position.X = 0.0;
|
||||||
|
@ -446,7 +446,7 @@ int TPinballTable::Message(MessageCode code, float value)
|
||||||
UnknownP71 = 0;
|
UnknownP71 = 0;
|
||||||
pb::InfoTextBox->Clear();
|
pb::InfoTextBox->Clear();
|
||||||
pb::MissTextBox->Clear();
|
pb::MissTextBox->Clear();
|
||||||
LightGroup->Message(MessageCode::TLightGroupLightShowAnimation, 0.2f);
|
LightGroup->Message(28, 0.2f);
|
||||||
auto time = loader::play_sound(SoundIndex1, nullptr, "TPinballTable2");
|
auto time = loader::play_sound(SoundIndex1, nullptr, "TPinballTable2");
|
||||||
if (time < 0)
|
if (time < 0)
|
||||||
time = 5.0f;
|
time = 5.0f;
|
||||||
|
@ -506,7 +506,7 @@ int TPinballTable::Message(MessageCode code, float value)
|
||||||
|
|
||||||
for (auto component : ComponentList)
|
for (auto component : ComponentList)
|
||||||
{
|
{
|
||||||
component->Message(MessageCode::PlayerChanged, static_cast<float>(nextPlayer));
|
component->Message2(MessageCode::PlayerChanged, static_cast<float>(nextPlayer));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* textboxText = nullptr;
|
const char* textboxText = nullptr;
|
||||||
|
@ -557,7 +557,7 @@ int TPinballTable::Message(MessageCode code, float value)
|
||||||
case MessageCode::Reset:
|
case MessageCode::Reset:
|
||||||
for (auto component : ComponentList)
|
for (auto component : ComponentList)
|
||||||
{
|
{
|
||||||
component->Message(MessageCode::Reset, 0);
|
component->Message2(MessageCode::Reset, 0);
|
||||||
}
|
}
|
||||||
if (ReplayTimer)
|
if (ReplayTimer)
|
||||||
timer::kill(ReplayTimer);
|
timer::kill(ReplayTimer);
|
||||||
|
@ -565,7 +565,7 @@ int TPinballTable::Message(MessageCode code, float value)
|
||||||
if (LightShowTimer)
|
if (LightShowTimer)
|
||||||
{
|
{
|
||||||
timer::kill(LightShowTimer);
|
timer::kill(LightShowTimer);
|
||||||
LightGroup->Message(MessageCode::TLightGroupReset, 0.0);
|
LightGroup->Message(34, 0.0);
|
||||||
}
|
}
|
||||||
LightShowTimer = 0;
|
LightShowTimer = 0;
|
||||||
ScoreMultiplier = 0;
|
ScoreMultiplier = 0;
|
||||||
|
@ -658,10 +658,10 @@ void TPinballTable::EndGame_timeout(int timerId, void* caller)
|
||||||
|
|
||||||
for (auto component : table->ComponentList)
|
for (auto component : table->ComponentList)
|
||||||
{
|
{
|
||||||
component->Message(MessageCode::GameOver, 0);
|
component->Message2(MessageCode::GameOver, 0);
|
||||||
}
|
}
|
||||||
if (table->Demo)
|
if (table->Demo)
|
||||||
table->Demo->Message(MessageCode::GameOver, 0.0);
|
table->Demo->Message2(MessageCode::GameOver, 0.0);
|
||||||
control::handler(67, pb::MissTextBox);
|
control::handler(67, pb::MissTextBox);
|
||||||
pb::InfoTextBox->Display(pb::get_rc_string(Msg::STRING125), -1.0);
|
pb::InfoTextBox->Display(pb::get_rc_string(Msg::STRING125), -1.0);
|
||||||
}
|
}
|
||||||
|
@ -670,7 +670,7 @@ void TPinballTable::LightShow_timeout(int timerId, void* caller)
|
||||||
{
|
{
|
||||||
auto table = static_cast<TPinballTable*>(caller);
|
auto table = static_cast<TPinballTable*>(caller);
|
||||||
table->LightShowTimer = 0;
|
table->LightShowTimer = 0;
|
||||||
table->Message(MessageCode::StartGamePlayer1, 0.0);
|
table->Message2(MessageCode::StartGamePlayer1, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TPinballTable::replay_timer_callback(int timerId, void* caller)
|
void TPinballTable::replay_timer_callback(int timerId, void* caller)
|
||||||
|
|
|
@ -23,7 +23,7 @@ struct score_struct_super
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class TPinballTable : public TPinballComponent
|
class TPinballTable : public TPinballComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TPinballTable();
|
TPinballTable();
|
||||||
|
@ -34,7 +34,7 @@ public:
|
||||||
void ChangeBallCount(int count);
|
void ChangeBallCount(int count);
|
||||||
void tilt(float time);
|
void tilt(float time);
|
||||||
void port_draw() override;
|
void port_draw() override;
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
TBall* AddBall(float x, float y);
|
TBall* AddBall(float x, float y);
|
||||||
int BallCountInRect(const RectF& rect);
|
int BallCountInRect(const RectF& rect);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
|
|
||||||
TPlunger::TPlunger(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
|
TPlunger::TPlunger(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ void TPlunger::Collision(TBall* ball, vector2* nextPosition, vector2* direction,
|
||||||
maths::basic_collision(ball, nextPosition, direction, Elasticity, Smoothness, 0, boost);
|
maths::basic_collision(ball, nextPosition, direction, Elasticity, Smoothness, 0, boost);
|
||||||
if (SomeCounter)
|
if (SomeCounter)
|
||||||
SomeCounter--;
|
SomeCounter--;
|
||||||
Message(MessageCode::PlungerInputReleased, 0.0);
|
Message2(MessageCode::PlungerInputReleased, 0.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,7 @@ void TPlunger::Collision(TBall* ball, vector2* nextPosition, vector2* direction,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int TPlunger::Message(MessageCode code, float value)
|
int TPlunger::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
@ -98,7 +98,7 @@ int TPlunger::Message(MessageCode code, float value)
|
||||||
case MessageCode::PlungerLaunchBall:
|
case MessageCode::PlungerLaunchBall:
|
||||||
PullbackStartedFlag = true;
|
PullbackStartedFlag = true;
|
||||||
Boost = MaxPullback;
|
Boost = MaxPullback;
|
||||||
Message(MessageCode::PlungerInputReleased, 0.0f);
|
Message2(MessageCode::PlungerInputReleased, 0.0f);
|
||||||
break;
|
break;
|
||||||
case MessageCode::PlungerRelaunchBall:
|
case MessageCode::PlungerRelaunchBall:
|
||||||
SomeCounter++;
|
SomeCounter++;
|
||||||
|
@ -175,7 +175,7 @@ int TPlunger::Message(MessageCode code, float value)
|
||||||
void TPlunger::BallFeedTimer(int timerId, void* caller)
|
void TPlunger::BallFeedTimer(int timerId, void* caller)
|
||||||
{
|
{
|
||||||
auto plunger = static_cast<TPlunger*>(caller);
|
auto plunger = static_cast<TPlunger*>(caller);
|
||||||
plunger->Message(MessageCode::PlungerFeedBall, 0.0);
|
plunger->Message2(MessageCode::PlungerFeedBall, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TPlunger::PullbackTimer(int timerId, void* caller)
|
void TPlunger::PullbackTimer(int timerId, void* caller)
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
#include "TCollisionComponent.h"
|
#include "TCollisionComponent.h"
|
||||||
|
|
||||||
class TPlunger :
|
class TPlunger :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TPlunger(TPinballTable* table, int groupIndex);
|
TPlunger(TPinballTable* table, int groupIndex);
|
||||||
~TPlunger() override = default;
|
~TPlunger() override = default;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
|
|
||||||
static void BallFeedTimer(int timerId, void* caller);
|
static void BallFeedTimer(int timerId, void* caller);
|
||||||
static void PullbackTimer(int timerId, void* caller);
|
static void PullbackTimer(int timerId, void* caller);
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
|
|
||||||
TPopupTarget::TPopupTarget(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
|
TPopupTarget::TPopupTarget(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
Timer = 0;
|
Timer = 0;
|
||||||
TimerTime = *loader::query_float_attribute(groupIndex, 0, 407);
|
TimerTime = *loader::query_float_attribute(groupIndex, 0, 407);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TPopupTarget::Message(MessageCode code, float value)
|
int TPopupTarget::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@ int TPopupTarget::Message(MessageCode code, float value)
|
||||||
case MessageCode::PlayerChanged:
|
case MessageCode::PlayerChanged:
|
||||||
PlayerMessagefieldBackup[PinballTable->CurrentPlayer] = MessageField;
|
PlayerMessagefieldBackup[PinballTable->CurrentPlayer] = MessageField;
|
||||||
MessageField = PlayerMessagefieldBackup[static_cast<int>(floor(value))];
|
MessageField = PlayerMessagefieldBackup[static_cast<int>(floor(value))];
|
||||||
TPopupTarget::Message(MessageField ? MessageCode::TPopupTargetDisable : MessageCode::TPopupTargetEnable, 0.0);
|
TPopupTarget::Message2(MessageField ? MessageCode::TPopupTargetDisable : MessageCode::TPopupTargetEnable, 0.0);
|
||||||
break;
|
break;
|
||||||
case MessageCode::Reset:
|
case MessageCode::Reset:
|
||||||
{
|
{
|
||||||
|
@ -69,7 +69,7 @@ void TPopupTarget::Collision(TBall* ball, vector2* nextPosition, vector2* direct
|
||||||
{
|
{
|
||||||
if (HardHitSoundId)
|
if (HardHitSoundId)
|
||||||
loader::play_sound(HardHitSoundId, this, "TPopupTarget1");
|
loader::play_sound(HardHitSoundId, this, "TPopupTarget1");
|
||||||
Message(MessageCode::TPopupTargetDisable, 0.0);
|
Message2(MessageCode::TPopupTargetDisable, 0.0);
|
||||||
control::handler(63, this);
|
control::handler(63, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#include "TCollisionComponent.h"
|
#include "TCollisionComponent.h"
|
||||||
|
|
||||||
class TPopupTarget :
|
class TPopupTarget :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TPopupTarget(TPinballTable* table, int groupIndex);
|
TPopupTarget(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,13 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
|
|
||||||
TRollover::TRollover(TPinballTable* table, int groupIndex, bool createWall) : TCollisionComponent(
|
TRollover::TRollover(TPinballTable* table, int groupIndex, bool createWall) : TCollisionComponent2(
|
||||||
table, groupIndex, createWall)
|
table, groupIndex, createWall)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TRollover::TRollover(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, false)
|
TRollover::TRollover(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, false)
|
||||||
{
|
{
|
||||||
if (ListBitmap)
|
if (ListBitmap)
|
||||||
render::sprite_set_bitmap(RenderSprite, ListBitmap->at(0));
|
render::sprite_set_bitmap(RenderSprite, ListBitmap->at(0));
|
||||||
|
@ -25,7 +25,7 @@ TRollover::TRollover(TPinballTable* table, int groupIndex) : TCollisionComponent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int TRollover::Message(MessageCode code, float value)
|
int TRollover::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
if (code == MessageCode::Reset)
|
if (code == MessageCode::Reset)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
#include "TCollisionComponent.h"
|
#include "TCollisionComponent.h"
|
||||||
|
|
||||||
class TRollover :
|
class TRollover :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
TRollover(TPinballTable* table, int groupIndex, bool createWall);
|
TRollover(TPinballTable* table, int groupIndex, bool createWall);
|
||||||
public:
|
public:
|
||||||
TRollover(TPinballTable* table, int groupIndex);
|
TRollover(TPinballTable* table, int groupIndex);
|
||||||
~TRollover() override = default;
|
~TRollover() override = default;
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
void build_walls(int groupIndex);
|
void build_walls(int groupIndex);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "TBall.h"
|
#include "TBall.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
TSink::TSink(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
|
TSink::TSink(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ TSink::TSink(TPinballTable* table, int groupIndex) : TCollisionComponent(table,
|
||||||
TimerTime = *loader::query_float_attribute(groupIndex, 0, 407);
|
TimerTime = *loader::query_float_attribute(groupIndex, 0, 407);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TSink::Message(MessageCode code, float value)
|
int TSink::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
#include "TCollisionComponent.h"
|
#include "TCollisionComponent.h"
|
||||||
|
|
||||||
class TSink :
|
class TSink :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TSink(TPinballTable* table, int groupIndex);
|
TSink(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "TPinballTable.h"
|
#include "TPinballTable.h"
|
||||||
|
|
||||||
TSoloTarget::TSoloTarget(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
|
TSoloTarget::TSoloTarget(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
visualStruct visual{};
|
visualStruct visual{};
|
||||||
|
|
||||||
|
@ -16,10 +16,10 @@ TSoloTarget::TSoloTarget(TPinballTable* table, int groupIndex) : TCollisionCompo
|
||||||
TimerTime = 0.1f;
|
TimerTime = 0.1f;
|
||||||
loader::query_visual(groupIndex, 0, &visual);
|
loader::query_visual(groupIndex, 0, &visual);
|
||||||
SoundIndex4 = visual.SoundIndex4;
|
SoundIndex4 = visual.SoundIndex4;
|
||||||
TSoloTarget::Message(MessageCode::TSoloTargetEnable, 0.0);
|
TSoloTarget::Message2(MessageCode::TSoloTargetEnable, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TSoloTarget::Message(MessageCode code, float value)
|
int TSoloTarget::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
@ -58,7 +58,7 @@ void TSoloTarget::Collision(TBall* ball, vector2* nextPosition, vector2* directi
|
||||||
{
|
{
|
||||||
if (DefaultCollision(ball, nextPosition, direction))
|
if (DefaultCollision(ball, nextPosition, direction))
|
||||||
{
|
{
|
||||||
Message(MessageCode::TSoloTargetDisable, 0.0);
|
Message2(MessageCode::TSoloTargetDisable, 0.0);
|
||||||
Timer = timer::set(TimerTime, this, TimerExpired);
|
Timer = timer::set(TimerTime, this, TimerExpired);
|
||||||
control::handler(63, this);
|
control::handler(63, this);
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,6 @@ void TSoloTarget::Collision(TBall* ball, vector2* nextPosition, vector2* directi
|
||||||
void TSoloTarget::TimerExpired(int timerId, void* caller)
|
void TSoloTarget::TimerExpired(int timerId, void* caller)
|
||||||
{
|
{
|
||||||
auto target = static_cast<TSoloTarget*>(caller);
|
auto target = static_cast<TSoloTarget*>(caller);
|
||||||
target->Message(MessageCode::TSoloTargetEnable, 0.0);
|
target->Message2(MessageCode::TSoloTargetEnable, 0.0);
|
||||||
target->Timer = 0;
|
target->Timer = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#include "TCollisionComponent.h"
|
#include "TCollisionComponent.h"
|
||||||
|
|
||||||
class TSoloTarget :
|
class TSoloTarget :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TSoloTarget(TPinballTable* table, int groupIndex);
|
TSoloTarget(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
|
|
||||||
TTextBox::TTextBox(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, true)
|
TTextBox::TTextBox(TPinballTable* table, int groupIndex) : TPinballComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
OffsetX = 0;
|
OffsetX = 0;
|
||||||
OffsetY = 0;
|
OffsetY = 0;
|
||||||
|
@ -51,7 +51,7 @@ TTextBox::~TTextBox()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int TTextBox::Message(MessageCode code, float value)
|
int TTextBox::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "TTextBoxMessage.h"
|
#include "TTextBoxMessage.h"
|
||||||
|
|
||||||
class TTextBox :
|
class TTextBox :
|
||||||
public TPinballComponent
|
public TPinballComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int OffsetX;
|
int OffsetX;
|
||||||
|
@ -19,7 +19,7 @@ public:
|
||||||
|
|
||||||
TTextBox(TPinballTable* table, int groupIndex);
|
TTextBox(TPinballTable* table, int groupIndex);
|
||||||
~TTextBox() override;
|
~TTextBox() override;
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Clear();
|
void Clear();
|
||||||
void Display(const char* text, float time);
|
void Display(const char* text, float time);
|
||||||
void DrawImGui();
|
void DrawImGui();
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
#include "control.h"
|
#include "control.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
TTimer::TTimer(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, true)
|
TTimer::TTimer(TPinballTable* table, int groupIndex) : TPinballComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
Timer = 0;
|
Timer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TTimer::Message(MessageCode code, float value)
|
int TTimer::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
#include "TPinballComponent.h"
|
#include "TPinballComponent.h"
|
||||||
|
|
||||||
class TTimer :
|
class TTimer :
|
||||||
public TPinballComponent
|
public TPinballComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TTimer(TPinballTable* table, int groupIndex);
|
TTimer(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
static void TimerExpired(int timerId, void* caller);
|
static void TimerExpired(int timerId, void* caller);
|
||||||
|
|
||||||
int Timer;
|
int Timer;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
TWall::TWall(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
|
TWall::TWall(TPinballTable* table, int groupIndex) : TCollisionComponent2(table, groupIndex, true)
|
||||||
{
|
{
|
||||||
if (RenderSprite)
|
if (RenderSprite)
|
||||||
render::sprite_set_bitmap(RenderSprite, nullptr);
|
render::sprite_set_bitmap(RenderSprite, nullptr);
|
||||||
|
@ -14,7 +14,7 @@ TWall::TWall(TPinballTable* table, int groupIndex) : TCollisionComponent(table,
|
||||||
BmpPtr = ListBitmap->at(0);
|
BmpPtr = ListBitmap->at(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TWall::Message(MessageCode code, float value)
|
int TWall::Message2(MessageCode code, float value)
|
||||||
{
|
{
|
||||||
if (code == MessageCode::Reset && Timer)
|
if (code == MessageCode::Reset && Timer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
struct gdrv_bitmap8;
|
struct gdrv_bitmap8;
|
||||||
|
|
||||||
class TWall :
|
class TWall :
|
||||||
public TCollisionComponent
|
public TCollisionComponent2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TWall(TPinballTable* table, int groupIndex);
|
TWall(TPinballTable* table, int groupIndex);
|
||||||
int Message(MessageCode code, float value) override;
|
int Message2(MessageCode code, float value) override;
|
||||||
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
void Collision(TBall* ball, vector2* nextPosition, vector2* direction, float distance,
|
||||||
TEdgeSegment* edge) override;
|
TEdgeSegment* edge) override;
|
||||||
|
|
||||||
|
|
|
@ -825,20 +825,19 @@ int control::mission_select_scores[17] =
|
||||||
30000,
|
30000,
|
||||||
30000
|
30000
|
||||||
};
|
};
|
||||||
|
component_tag_base* control::wormhole_tag_array1[3] =
|
||||||
std::reference_wrapper<TSink*> control::wormhole_tag_array1[3] =
|
|
||||||
{
|
{
|
||||||
sink1, sink2, sink3
|
&control_sink1_tag, &control_sink2_tag, &control_sink3_tag
|
||||||
};
|
};
|
||||||
|
|
||||||
std::reference_wrapper<TLight*> control::wormhole_tag_array2[3] =
|
component_tag_base* control::wormhole_tag_array2[3] =
|
||||||
{
|
{
|
||||||
lite5, lite6, lite7
|
&control_lite5_tag, &control_lite6_tag, &control_lite7_tag
|
||||||
};
|
};
|
||||||
|
|
||||||
std::reference_wrapper<TLight*> control::wormhole_tag_array3[3] =
|
component_tag_base* control::wormhole_tag_array3[3] =
|
||||||
{
|
{
|
||||||
lite4, lite2, lite3
|
&control_lite4_tag, &control_lite2_tag, &control_lite3_tag
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -966,29 +965,29 @@ void control::table_add_extra_ball(float count)
|
||||||
|
|
||||||
void control::table_set_bonus_hold()
|
void control::table_set_bonus_hold()
|
||||||
{
|
{
|
||||||
lite58->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite58->Message(19, 0.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING153), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING153), 2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void control::table_set_bonus()
|
void control::table_set_bonus()
|
||||||
{
|
{
|
||||||
TableG->ScoreSpecial2Flag = 1;
|
TableG->ScoreSpecial2Flag = 1;
|
||||||
lite59->Message(MessageCode::TLightTurnOnTimed, 60.0);
|
lite59->Message(9, 60.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING105), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING105), 2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void control::table_set_jackpot()
|
void control::table_set_jackpot()
|
||||||
{
|
{
|
||||||
TableG->ScoreSpecial3Flag = 1;
|
TableG->ScoreSpecial3Flag = 1;
|
||||||
lite60->Message(MessageCode::TLightTurnOnTimed, 60.0);
|
lite60->Message(9, 60.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING116), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING116), 2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void control::table_set_flag_lights()
|
void control::table_set_flag_lights()
|
||||||
{
|
{
|
||||||
lite20->Message(MessageCode::TLightTurnOnTimed, 60.0);
|
lite20->Message(9, 60.0);
|
||||||
lite19->Message(MessageCode::TLightTurnOnTimed, 60.0);
|
lite19->Message(9, 60.0);
|
||||||
lite61->Message(MessageCode::TLightTurnOnTimed, 60.0);
|
lite61->Message(9, 60.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING152), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING152), 2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -997,12 +996,12 @@ void control::table_set_multiball(float time)
|
||||||
if (TableG->MultiballCount <= 1)
|
if (TableG->MultiballCount <= 1)
|
||||||
{
|
{
|
||||||
TableG->MultiballCount += 3;
|
TableG->MultiballCount += 3;
|
||||||
sink1->Message(MessageCode::TSinkResetTimer, time);
|
sink1->Message2(MessageCode::TSinkResetTimer, time);
|
||||||
sink2->Message(MessageCode::TSinkResetTimer, time);
|
sink2->Message2(MessageCode::TSinkResetTimer, time);
|
||||||
sink3->Message(MessageCode::TSinkResetTimer, time);
|
sink3->Message2(MessageCode::TSinkResetTimer, time);
|
||||||
lite38->Message(MessageCode::TLightFlasherStartTimed, -1.0f);
|
lite38->Message(7, -1.0f);
|
||||||
lite39->Message(MessageCode::TLightFlasherStartTimed, -1.0f);
|
lite39->Message(7, -1.0f);
|
||||||
lite40->Message(MessageCode::TLightFlasherStartTimed, -1.0f);
|
lite40->Message(7, -1.0f);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING117), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING117), 2.0);
|
||||||
midi::play_track(MidiTracks::Track3, true);
|
midi::play_track(MidiTracks::Track3, true);
|
||||||
}
|
}
|
||||||
|
@ -1024,14 +1023,14 @@ void control::table_bump_ball_sink_lock()
|
||||||
TableG->BallLockedCounter = TableG->BallLockedCounter + 1;
|
TableG->BallLockedCounter = TableG->BallLockedCounter + 1;
|
||||||
soundwave44->Play(nullptr, "table_bump_ball_sink_lock");
|
soundwave44->Play(nullptr, "table_bump_ball_sink_lock");
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING102), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING102), 2.0);
|
||||||
TableG->Plunger->Message(MessageCode::PlungerRelaunchBall, 2.0f);
|
TableG->Plunger->Message2(MessageCode::PlungerRelaunchBall, 2.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void control::table_set_replay(float value)
|
void control::table_set_replay(float value)
|
||||||
{
|
{
|
||||||
lite199->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite199->Message(19, 0.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING101), value);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING101), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1039,10 +1038,10 @@ void control::cheat_bump_rank()
|
||||||
{
|
{
|
||||||
char Buffer[64]{};
|
char Buffer[64]{};
|
||||||
|
|
||||||
auto rank = middle_circle->Message(MessageCode::TLightGroupGetOnCount, 0.0);
|
auto rank = middle_circle->Message(37, 0.0);
|
||||||
if (rank < 9)
|
if (rank < 9)
|
||||||
{
|
{
|
||||||
middle_circle->Message(MessageCode::TLightGroupResetAndTurnOn, 2.0f);
|
middle_circle->Message(41, 2.0f);
|
||||||
auto rankText = pb::get_rc_string(RankRcArray[rank]);
|
auto rankText = pb::get_rc_string(RankRcArray[rank]);
|
||||||
snprintf(Buffer,sizeof Buffer, pb::get_rc_string(Msg::STRING184), rankText);
|
snprintf(Buffer,sizeof Buffer, pb::get_rc_string(Msg::STRING184), rankText);
|
||||||
mission_text_box->Display(Buffer, 8.0);
|
mission_text_box->Display(Buffer, 8.0);
|
||||||
|
@ -1077,23 +1076,23 @@ int control::AddRankProgress(int rank)
|
||||||
char Buffer[64];
|
char Buffer[64];
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
lite16->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite16->Message(19, 0.0);
|
||||||
for (int index = rank; index; --index)
|
for (int index = rank; index; --index)
|
||||||
{
|
{
|
||||||
outer_circle->Message(MessageCode::TLightGroupResetAndTurnOn, 2.0);
|
outer_circle->Message(41, 2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int activeCount = outer_circle->Message(MessageCode::TLightGroupGetOnCount, 0.0);
|
int activeCount = outer_circle->Message(37, 0.0);
|
||||||
int totalCount = outer_circle->Message(MessageCode::TLightGroupGetLightCount, 0.0);
|
int totalCount = outer_circle->Message(38, 0.0);
|
||||||
if (activeCount == totalCount)
|
if (activeCount == totalCount)
|
||||||
{
|
{
|
||||||
result = 1;
|
result = 1;
|
||||||
outer_circle->Message(MessageCode::TLightFlasherStartTimedThenStayOff, 5.0);
|
outer_circle->Message(16, 5.0);
|
||||||
middle_circle->Message(MessageCode::TLightGroupReset, 0.0);
|
middle_circle->Message(34, 0.0);
|
||||||
int midActiveCount = middle_circle->Message(MessageCode::TLightGroupGetOnCount, 0.0);
|
int midActiveCount = middle_circle->Message(37, 0.0);
|
||||||
if (midActiveCount < 9)
|
if (midActiveCount < 9)
|
||||||
{
|
{
|
||||||
middle_circle->Message(MessageCode::TLightGroupResetAndTurnOn, 5.0);
|
middle_circle->Message(41, 5.0);
|
||||||
auto rankText = pb::get_rc_string(RankRcArray[midActiveCount]);
|
auto rankText = pb::get_rc_string(RankRcArray[midActiveCount]);
|
||||||
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING184), rankText);
|
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING184), rankText);
|
||||||
mission_text_box->Display(Buffer, 8.0);
|
mission_text_box->Display(Buffer, 8.0);
|
||||||
|
@ -1102,7 +1101,7 @@ int control::AddRankProgress(int rank)
|
||||||
}
|
}
|
||||||
else if (activeCount >= 3 * totalCount / 4)
|
else if (activeCount >= 3 * totalCount / 4)
|
||||||
{
|
{
|
||||||
middle_circle->Message(MessageCode::TLightGroupAnimationForward, -1.0);
|
middle_circle->Message(27, -1.0);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -1122,12 +1121,12 @@ void control::AdvanceWormHoleDestination(int flag)
|
||||||
val1 = 1;
|
val1 = 1;
|
||||||
val2 = 1;
|
val2 = 1;
|
||||||
}
|
}
|
||||||
bsink_arrow_lights->Message(MessageCode::TLightSetMessageField, static_cast<float>(val2));
|
bsink_arrow_lights->Message(23, static_cast<float>(val2));
|
||||||
bsink_arrow_lights->Message(MessageCode::TLightSetOnStateBmpIndex, static_cast<float>(3 - val1));
|
bsink_arrow_lights->Message(11, static_cast<float>(3 - val1));
|
||||||
if (!light_on(&control_lite4_tag))
|
if (!light_on(&control_lite4_tag))
|
||||||
{
|
{
|
||||||
worm_hole_lights->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
worm_hole_lights->Message(19, 0.0);
|
||||||
bsink_arrow_lights->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
bsink_arrow_lights->Message(19, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1137,7 +1136,7 @@ void control::FlipperRebounderControl1(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
lite84->Message(MessageCode::TLightTurnOnTimed, 0.1f);
|
lite84->Message(9, 0.1f);
|
||||||
auto score = caller->get_scoring(0);
|
auto score = caller->get_scoring(0);
|
||||||
TableG->AddScore(score);
|
TableG->AddScore(score);
|
||||||
}
|
}
|
||||||
|
@ -1147,7 +1146,7 @@ void control::FlipperRebounderControl2(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
lite85->Message(MessageCode::TLightTurnOnTimed, 0.1f);
|
lite85->Message(9, 0.1f);
|
||||||
int score = caller->get_scoring(0);
|
int score = caller->get_scoring(0);
|
||||||
TableG->AddScore(score);
|
TableG->AddScore(score);
|
||||||
}
|
}
|
||||||
|
@ -1172,26 +1171,26 @@ void control::BumperControl(int code, TPinballComponent* caller)
|
||||||
void control::LeftKickerControl(int code, TPinballComponent* caller)
|
void control::LeftKickerControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 60)
|
if (code == 60)
|
||||||
gate1->Message(MessageCode::TGateEnable, 0.0);
|
gate1->Message2(MessageCode::TGateEnable, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void control::RightKickerControl(int code, TPinballComponent* caller)
|
void control::RightKickerControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 60)
|
if (code == 60)
|
||||||
gate2->Message(MessageCode::TGateEnable, 0.0);
|
gate2->Message2(MessageCode::TGateEnable, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void control::LeftKickerGateControl(int code, TPinballComponent* caller)
|
void control::LeftKickerGateControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == ~MessageCode::TGateDisable)
|
if (code == ~MessageCode::TGateDisable)
|
||||||
{
|
{
|
||||||
lite30->Message(MessageCode::TLightFlasherStartTimedThenStayOn, 5.0);
|
lite30->Message(15, 5.0);
|
||||||
lite196->Message(MessageCode::TLightFlasherStartTimed, 5.0);
|
lite196->Message(7, 5.0);
|
||||||
}
|
}
|
||||||
else if (code == ~MessageCode::TGateEnable)
|
else if (code == ~MessageCode::TGateEnable)
|
||||||
{
|
{
|
||||||
lite30->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite30->Message(20, 0.0);
|
||||||
lite196->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite196->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1199,13 +1198,13 @@ void control::RightKickerGateControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == ~MessageCode::TGateDisable)
|
if (code == ~MessageCode::TGateDisable)
|
||||||
{
|
{
|
||||||
lite29->Message(MessageCode::TLightFlasherStartTimedThenStayOn, 5.0);
|
lite29->Message(15, 5.0);
|
||||||
lite195->Message(MessageCode::TLightFlasherStartTimed, 5.0);
|
lite195->Message(7, 5.0);
|
||||||
}
|
}
|
||||||
else if (code == ~MessageCode::TGateEnable)
|
else if (code == ~MessageCode::TGateEnable)
|
||||||
{
|
{
|
||||||
lite29->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite29->Message(20, 0.0);
|
||||||
lite195->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite195->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1214,7 +1213,7 @@ void control::DeploymentChuteToEscapeChuteOneWayControl(int code, TPinballCompon
|
||||||
char Buffer[64];
|
char Buffer[64];
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
int count = skill_shot_lights->Message(MessageCode::TLightGroupGetOnCount, 0.0);
|
int count = skill_shot_lights->Message(37, 0.0);
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
soundwave3->Play(nullptr, "DeploymentChuteToEscapeChuteOneWayControl");
|
soundwave3->Play(nullptr, "DeploymentChuteToEscapeChuteOneWayControl");
|
||||||
|
@ -1223,12 +1222,12 @@ void control::DeploymentChuteToEscapeChuteOneWayControl(int code, TPinballCompon
|
||||||
info_text_box->Display(Buffer, 2.0);
|
info_text_box->Display(Buffer, 2.0);
|
||||||
if (!light_on(&control_lite56_tag))
|
if (!light_on(&control_lite56_tag))
|
||||||
{
|
{
|
||||||
l_trek_lights->Message(MessageCode::TLightGroupReset, 0.0);
|
l_trek_lights->Message(34, 0.0);
|
||||||
l_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
l_trek_lights->Message(20, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightGroupReset, 0.0);
|
r_trek_lights->Message(34, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
r_trek_lights->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
skill_shot_lights->Message(MessageCode::TLightGroupFlashWhenOn, 1.0);
|
skill_shot_lights->Message(44, 1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1236,12 +1235,12 @@ void control::DeploymentChuteToEscapeChuteOneWayControl(int code, TPinballCompon
|
||||||
void control::DeploymentChuteToTableOneWayControl(int code, TPinballComponent* caller)
|
void control::DeploymentChuteToTableOneWayControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
skill_shot_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
skill_shot_lights->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void control::DrainBallBlockerControl(int code, TPinballComponent* caller)
|
void control::DrainBallBlockerControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
MessageCode lightMessage;
|
int lightMessage;
|
||||||
float blockerDuration;
|
float blockerDuration;
|
||||||
|
|
||||||
auto block = static_cast<TBlocker*>(caller);
|
auto block = static_cast<TBlocker*>(caller);
|
||||||
|
@ -1249,8 +1248,8 @@ void control::DrainBallBlockerControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
block->MessageField = 1;
|
block->MessageField = 1;
|
||||||
blockerDuration = static_cast<float>(block->InitialDuration);
|
blockerDuration = static_cast<float>(block->InitialDuration);
|
||||||
block->Message(MessageCode::TBlockerEnable, blockerDuration);
|
block->Message2(MessageCode::TBlockerEnable, blockerDuration);
|
||||||
lightMessage = MessageCode::TLightTurnOnTimed;
|
lightMessage = 9;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1259,13 +1258,13 @@ void control::DrainBallBlockerControl(int code, TPinballComponent* caller)
|
||||||
if (block->MessageField != 1)
|
if (block->MessageField != 1)
|
||||||
{
|
{
|
||||||
block->MessageField = 0;
|
block->MessageField = 0;
|
||||||
block->Message(MessageCode::TBlockerDisable, 0.0);
|
block->Message2(MessageCode::TBlockerDisable, 0.0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
block->MessageField = 2;
|
block->MessageField = 2;
|
||||||
blockerDuration = static_cast<float>(block->ExtendedDuration);
|
blockerDuration = static_cast<float>(block->ExtendedDuration);
|
||||||
block->Message(MessageCode::TBlockerRestartTimeout, blockerDuration);
|
block->Message2(MessageCode::TBlockerRestartTimeout, blockerDuration);
|
||||||
lightMessage = MessageCode::TLightFlasherStartTimed;
|
lightMessage = 7;
|
||||||
}
|
}
|
||||||
lite1->Message(lightMessage, blockerDuration);
|
lite1->Message(lightMessage, blockerDuration);
|
||||||
}
|
}
|
||||||
|
@ -1316,15 +1315,15 @@ void control::LaunchRampControl(int code, TPinballComponent* caller)
|
||||||
void control::LaunchRampHoleControl(int code, TPinballComponent* caller)
|
void control::LaunchRampHoleControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 58)
|
if (code == 58)
|
||||||
lite54->Message(MessageCode::TLightFlasherStartTimed, 5.0);
|
lite54->Message(7, 5.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void control::SpaceWarpRolloverControl(int code, TPinballComponent* caller)
|
void control::SpaceWarpRolloverControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
lite27->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite27->Message(19, 0.0);
|
||||||
lite28->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite28->Message(19, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1332,12 +1331,12 @@ void control::ReentryLanesRolloverControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
if (!light_on(&control_lite56_tag) && l_trek_lights->Message(MessageCode::TLightGroupGetMessage2, 0.0))
|
if (!light_on(&control_lite56_tag) && l_trek_lights->Message(39, 0.0))
|
||||||
{
|
{
|
||||||
l_trek_lights->Message(MessageCode::TLightGroupReset, 0.0);
|
l_trek_lights->Message(34, 0.0);
|
||||||
l_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
l_trek_lights->Message(20, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightGroupReset, 0.0);
|
r_trek_lights->Message(34, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
r_trek_lights->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
TLight* light;
|
TLight* light;
|
||||||
|
@ -1355,22 +1354,22 @@ void control::ReentryLanesRolloverControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (light->LightOnFlag)
|
if (light->LightOnFlag)
|
||||||
{
|
{
|
||||||
light->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
light->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
light->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
light->Message(19, 0.0);
|
||||||
int activeCount = bmpr_inc_lights->Message(MessageCode::TLightGroupGetOnCount, 0.0);
|
int activeCount = bmpr_inc_lights->Message(37, 0.0);
|
||||||
if (activeCount == bmpr_inc_lights->Message(MessageCode::TLightGroupGetLightCount, 0.0))
|
if (activeCount == bmpr_inc_lights->Message(38, 0.0))
|
||||||
{
|
{
|
||||||
bmpr_inc_lights->Message(MessageCode::TLightFlasherStartTimed, 5.0);
|
bmpr_inc_lights->Message(7, 5.0);
|
||||||
bmpr_inc_lights->Message(MessageCode::TLightTurnOff, 0.0);
|
bmpr_inc_lights->Message(0, 0.0);
|
||||||
if (bump1->BmpIndex < 3)
|
if (bump1->BmpIndex < 3)
|
||||||
{
|
{
|
||||||
attack_bump->Message(MessageCode::TBumperIncBmpIndex, 0.0);
|
attack_bump->Message2(MessageCode::TBumperIncBmpIndex, 0.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING106), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING106), 2.0);
|
||||||
}
|
}
|
||||||
attack_bump->Message(MessageCode::TComponentGroupResetNotifyTimer, 60.0);
|
attack_bump->Message2(MessageCode::TComponentGroupResetNotifyTimer, 60.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1382,8 +1381,8 @@ void control::BumperGroupControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 61)
|
if (code == 61)
|
||||||
{
|
{
|
||||||
caller->Message(MessageCode::TComponentGroupResetNotifyTimer, 60.0);
|
caller->Message2(MessageCode::TComponentGroupResetNotifyTimer, 60.0);
|
||||||
caller->Message(MessageCode::TBumperDecBmpIndex, 0.0);
|
caller->Message2(MessageCode::TBumperDecBmpIndex, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1407,22 +1406,22 @@ void control::LaunchLanesRolloverControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (light->LightOnFlag)
|
if (light->LightOnFlag)
|
||||||
{
|
{
|
||||||
light->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
light->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
light->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
light->Message(19, 0.0);
|
||||||
int msg1 = ramp_bmpr_inc_lights->Message(MessageCode::TLightGroupGetOnCount, 0.0);
|
int msg1 = ramp_bmpr_inc_lights->Message(37, 0.0);
|
||||||
if (msg1 == ramp_bmpr_inc_lights->Message(MessageCode::TLightGroupGetLightCount, 0.0))
|
if (msg1 == ramp_bmpr_inc_lights->Message(38, 0.0))
|
||||||
{
|
{
|
||||||
ramp_bmpr_inc_lights->Message(MessageCode::TLightFlasherStartTimed, 5.0);
|
ramp_bmpr_inc_lights->Message(7, 5.0);
|
||||||
ramp_bmpr_inc_lights->Message(MessageCode::TLightTurnOff, 0.0);
|
ramp_bmpr_inc_lights->Message(0, 0.0);
|
||||||
if (bump5->BmpIndex < 3)
|
if (bump5->BmpIndex < 3)
|
||||||
{
|
{
|
||||||
launch_bump->Message(MessageCode::TBumperIncBmpIndex, 0.0);
|
launch_bump->Message2(MessageCode::TBumperIncBmpIndex, 0.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING107), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING107), 2.0);
|
||||||
}
|
}
|
||||||
launch_bump->Message(MessageCode::TComponentGroupResetNotifyTimer, 60.0);
|
launch_bump->Message2(MessageCode::TComponentGroupResetNotifyTimer, 60.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1437,8 +1436,8 @@ void control::OutLaneRolloverControl(int code, TPinballComponent* caller)
|
||||||
if (light_on(&control_lite17_tag) || light_on(&control_lite18_tag))
|
if (light_on(&control_lite17_tag) || light_on(&control_lite18_tag))
|
||||||
{
|
{
|
||||||
table_add_extra_ball(2.0);
|
table_add_extra_ball(2.0);
|
||||||
lite17->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite17->Message(20, 0.0);
|
||||||
lite18->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite18->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1448,14 +1447,14 @@ void control::OutLaneRolloverControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (light_on(&control_lite30_tag))
|
if (light_on(&control_lite30_tag))
|
||||||
{
|
{
|
||||||
lite30->Message(MessageCode::TLightFlasherStart, 0.0);
|
lite30->Message(4, 0.0);
|
||||||
lite196->Message(MessageCode::TLightFlasherStart, 0.0);
|
lite196->Message(4, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (light_on(&control_lite29_tag))
|
else if (light_on(&control_lite29_tag))
|
||||||
{
|
{
|
||||||
lite29->Message(MessageCode::TLightFlasherStart, 0.0);
|
lite29->Message(4, 0.0);
|
||||||
lite195->Message(MessageCode::TLightFlasherStart, 0.0);
|
lite195->Message(4, 0.0);
|
||||||
}
|
}
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
}
|
}
|
||||||
|
@ -1465,16 +1464,16 @@ void control::ExtraBallLightControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 19)
|
if (code == 19)
|
||||||
{
|
{
|
||||||
lite17->Message(MessageCode::TLightTurnOnTimed, 55.0);
|
lite17->Message(9, 55.0);
|
||||||
lite18->Message(MessageCode::TLightTurnOnTimed, 55.0);
|
lite18->Message(9, 55.0);
|
||||||
extraball_light_flag = 1;
|
extraball_light_flag = 1;
|
||||||
}
|
}
|
||||||
else if (code == 60)
|
else if (code == 60)
|
||||||
{
|
{
|
||||||
if (extraball_light_flag)
|
if (extraball_light_flag)
|
||||||
{
|
{
|
||||||
lite17->Message(MessageCode::TLightFlasherStartTimed, 5.0);
|
lite17->Message(7, 5.0);
|
||||||
lite18->Message(MessageCode::TLightFlasherStartTimed, 5.0);
|
lite18->Message(7, 5.0);
|
||||||
extraball_light_flag = 0;
|
extraball_light_flag = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1488,8 +1487,8 @@ void control::ReturnLaneRolloverControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (light_on(&control_lite27_tag))
|
if (light_on(&control_lite27_tag))
|
||||||
{
|
{
|
||||||
lite59->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite59->Message(20, 0.0);
|
||||||
lite27->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite27->Message(20, 0.0);
|
||||||
TableG->AddScore(caller->get_scoring(1));
|
TableG->AddScore(caller->get_scoring(1));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1499,8 +1498,8 @@ void control::ReturnLaneRolloverControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (light_on(&control_lite28_tag))
|
if (light_on(&control_lite28_tag))
|
||||||
{
|
{
|
||||||
lite59->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite59->Message(20, 0.0);
|
||||||
lite28->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite28->Message(20, 0.0);
|
||||||
TableG->AddScore(caller->get_scoring(1));
|
TableG->AddScore(caller->get_scoring(1));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1520,7 +1519,7 @@ void control::BonusLaneRolloverControl(int code, TPinballComponent* caller)
|
||||||
int addedScore = SpecialAddScore(TableG->ScoreSpecial2);
|
int addedScore = SpecialAddScore(TableG->ScoreSpecial2);
|
||||||
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING104), addedScore);
|
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING104), addedScore);
|
||||||
info_text_box->Display(Buffer, 2.0);
|
info_text_box->Display(Buffer, 2.0);
|
||||||
lite16->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite16->Message(20, 0.0);
|
||||||
soundwave50_1->Play(caller, "BonusLaneRolloverControl1");
|
soundwave50_1->Play(caller, "BonusLaneRolloverControl1");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1529,7 +1528,7 @@ void control::BonusLaneRolloverControl(int code, TPinballComponent* caller)
|
||||||
soundwave25->Play(caller, "BonusLaneRolloverControl2");
|
soundwave25->Play(caller, "BonusLaneRolloverControl2");
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
||||||
}
|
}
|
||||||
fuel_bargraph->Message(MessageCode::TLightGroupToggleSplitIndex, 11.0);
|
fuel_bargraph->Message(45, 11.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1537,13 +1536,13 @@ void control::FuelRollover1Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
if (fuel_bargraph->Message(MessageCode::TLightGroupGetOnCount, 0.0) > 1)
|
if (fuel_bargraph->Message(37, 0.0) > 1)
|
||||||
{
|
{
|
||||||
literoll179->Message(MessageCode::TLightTurnOffTimed, 0.05f);
|
literoll179->Message(8, 0.05f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fuel_bargraph->Message(MessageCode::TLightGroupToggleSplitIndex, 1.0);
|
fuel_bargraph->Message(45, 1.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
||||||
}
|
}
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
|
@ -1554,13 +1553,13 @@ void control::FuelRollover2Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
if (fuel_bargraph->Message(MessageCode::TLightGroupGetOnCount, 0.0) > 3)
|
if (fuel_bargraph->Message(37, 0.0) > 3)
|
||||||
{
|
{
|
||||||
literoll180->Message(MessageCode::TLightTurnOffTimed, 0.05f);
|
literoll180->Message(8, 0.05f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fuel_bargraph->Message(MessageCode::TLightGroupToggleSplitIndex, 3.0);
|
fuel_bargraph->Message(45, 3.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
||||||
}
|
}
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
|
@ -1571,13 +1570,13 @@ void control::FuelRollover3Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
if (fuel_bargraph->Message(MessageCode::TLightGroupGetOnCount, 0.0) > 5)
|
if (fuel_bargraph->Message(37, 0.0) > 5)
|
||||||
{
|
{
|
||||||
literoll181->Message(MessageCode::TLightTurnOffTimed, 0.05f);
|
literoll181->Message(8, 0.05f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fuel_bargraph->Message(MessageCode::TLightGroupToggleSplitIndex, 5.0);
|
fuel_bargraph->Message(45, 5.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
||||||
}
|
}
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
|
@ -1588,13 +1587,13 @@ void control::FuelRollover4Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
if (fuel_bargraph->Message(MessageCode::TLightGroupGetOnCount, 0.0) > 7)
|
if (fuel_bargraph->Message(37, 0.0) > 7)
|
||||||
{
|
{
|
||||||
literoll182->Message(MessageCode::TLightTurnOffTimed, 0.05f);
|
literoll182->Message(8, 0.05f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fuel_bargraph->Message(MessageCode::TLightGroupToggleSplitIndex, 7.0);
|
fuel_bargraph->Message(45, 7.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
||||||
}
|
}
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
|
@ -1605,13 +1604,13 @@ void control::FuelRollover5Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
if (fuel_bargraph->Message(MessageCode::TLightGroupGetOnCount, 0.0) > 9)
|
if (fuel_bargraph->Message(37, 0.0) > 9)
|
||||||
{
|
{
|
||||||
literoll183->Message(MessageCode::TLightTurnOffTimed, 0.05f);
|
literoll183->Message(8, 0.05f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fuel_bargraph->Message(MessageCode::TLightGroupToggleSplitIndex, 9.0);
|
fuel_bargraph->Message(45, 9.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
||||||
}
|
}
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
|
@ -1622,13 +1621,13 @@ void control::FuelRollover6Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
if (fuel_bargraph->Message(MessageCode::TLightGroupGetOnCount, 0.0) > 11)
|
if (fuel_bargraph->Message(37, 0.0) > 11)
|
||||||
{
|
{
|
||||||
literoll184->Message(MessageCode::TLightTurnOffTimed, 0.05f);
|
literoll184->Message(8, 0.05f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fuel_bargraph->Message(MessageCode::TLightGroupToggleSplitIndex, 11.0);
|
fuel_bargraph->Message(45, 11.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
||||||
}
|
}
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
|
@ -1640,16 +1639,16 @@ void control::HyperspaceLightGroupControl(int code, TPinballComponent* caller)
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
caller->Message(MessageCode::TLightTurnOff, 0.0);
|
caller->Message(0, 0.0);
|
||||||
break;
|
break;
|
||||||
case 41:
|
case 41:
|
||||||
caller->Message(MessageCode::TLightGroupResetAndTurnOn, 2.0);
|
caller->Message(41, 2.0);
|
||||||
caller->Message(MessageCode::TLightGroupRestartNotifyTimer, 60.0);
|
caller->Message(43, 60.0);
|
||||||
break;
|
break;
|
||||||
case 61:
|
case 61:
|
||||||
caller->Message(MessageCode::TLightGroupOffsetAnimationBackward, 0.0);
|
caller->Message(33, 0.0);
|
||||||
if (caller->Message(MessageCode::TLightGroupGetOnCount, 0.0))
|
if (caller->Message(37, 0.0))
|
||||||
caller->Message(MessageCode::TLightGroupRestartNotifyTimer, 60.0);
|
caller->Message(43, 60.0);
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
@ -1673,9 +1672,9 @@ void control::WormHoleControl(int code, TPinballComponent* caller)
|
||||||
if (lite4Msg)
|
if (lite4Msg)
|
||||||
{
|
{
|
||||||
lite4->MessageField = 0;
|
lite4->MessageField = 0;
|
||||||
worm_hole_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
worm_hole_lights->Message(20, 0.0);
|
||||||
bsink_arrow_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
bsink_arrow_lights->Message(20, 0.0);
|
||||||
lite110->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite110->Message(20, 0.0);
|
||||||
if (lite4Msg == sinkFlag + 1)
|
if (lite4Msg == sinkFlag + 1)
|
||||||
{
|
{
|
||||||
if (TableG->MultiballFlag)
|
if (TableG->MultiballFlag)
|
||||||
|
@ -1700,10 +1699,10 @@ void control::WormHoleControl(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
|
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING150), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING150), 2.0);
|
||||||
wormhole_tag_array2[sinkFlag].get()->Message(MessageCode::TLightFlasherStartTimedThenStayOff, sink->TimerTime);
|
wormhole_tag_array2[sinkFlag]->GetComponent()->Message(16, sink->TimerTime);
|
||||||
wormhole_tag_array3[sinkFlag].get()->Message(MessageCode::TLightSetOnStateBmpIndex, static_cast<float>(2 - sinkFlag));
|
wormhole_tag_array3[sinkFlag]->GetComponent()->Message(11, static_cast<float>(2 - sinkFlag));
|
||||||
wormhole_tag_array3[sinkFlag].get()->Message(MessageCode::TLightFlasherStartTimedThenStayOff, sink->TimerTime);
|
wormhole_tag_array3[sinkFlag]->GetComponent()->Message(16, sink->TimerTime);
|
||||||
wormhole_tag_array1[sinkFlag].get()->Message(MessageCode::TSinkResetTimer, sink->TimerTime);
|
wormhole_tag_array1[sinkFlag]->GetComponent()->Message2(MessageCode::TSinkResetTimer, sink->TimerTime);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TableG->AddScore(sink->get_scoring(2));
|
TableG->AddScore(sink->get_scoring(2));
|
||||||
|
@ -1715,10 +1714,10 @@ void control::WormHoleControl(int code, TPinballComponent* caller)
|
||||||
sinkFlag2 = sinkFlag;
|
sinkFlag2 = sinkFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
wormhole_tag_array2[sinkFlag2].get()->Message(MessageCode::TLightFlasherStartTimedThenStayOff, sink->TimerTime);
|
wormhole_tag_array2[sinkFlag2]->GetComponent()->Message(16, sink->TimerTime);
|
||||||
wormhole_tag_array3[sinkFlag2].get()->Message(MessageCode::TLightSetOnStateBmpIndex, static_cast<float>(2 - sinkFlag2));
|
wormhole_tag_array3[sinkFlag2]->GetComponent()->Message(11, static_cast<float>(2 - sinkFlag2));
|
||||||
wormhole_tag_array3[sinkFlag2].get()->Message(MessageCode::TLightFlasherStartTimedThenStayOff, sink->TimerTime);
|
wormhole_tag_array3[sinkFlag2]->GetComponent()->Message(16, sink->TimerTime);
|
||||||
wormhole_tag_array1[sinkFlag2].get()->Message(MessageCode::TSinkResetTimer, sink->TimerTime);
|
wormhole_tag_array1[sinkFlag2]->GetComponent()->Message2(MessageCode::TSinkResetTimer, sink->TimerTime);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING150), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING150), 2.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1727,8 +1726,8 @@ void control::LeftFlipperControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 1)
|
if (code == 1)
|
||||||
{
|
{
|
||||||
bmpr_inc_lights->Message(MessageCode::TLightGroupStepBackward, 0.0);
|
bmpr_inc_lights->Message(24, 0.0);
|
||||||
ramp_bmpr_inc_lights->Message(MessageCode::TLightGroupStepBackward, 0.0);
|
ramp_bmpr_inc_lights->Message(24, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1736,8 +1735,8 @@ void control::RightFlipperControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 1)
|
if (code == 1)
|
||||||
{
|
{
|
||||||
bmpr_inc_lights->Message(MessageCode::TLightGroupStepForward, 0.0);
|
bmpr_inc_lights->Message(25, 0.0);
|
||||||
ramp_bmpr_inc_lights->Message(MessageCode::TLightGroupStepForward, 0.0);
|
ramp_bmpr_inc_lights->Message(25, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1808,11 +1807,11 @@ void control::BoosterTargetControl(int code, TPinballComponent* caller)
|
||||||
sound->Play(caller, "BoosterTargetControl");
|
sound->Play(caller, "BoosterTargetControl");
|
||||||
|
|
||||||
target1->MessageField = 0;
|
target1->MessageField = 0;
|
||||||
target1->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target1->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target2->MessageField = 0;
|
target2->MessageField = 0;
|
||||||
target2->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target2->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target3->MessageField = 0;
|
target3->MessageField = 0;
|
||||||
target3->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target3->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
TableG->AddScore(caller->get_scoring(1));
|
TableG->AddScore(caller->get_scoring(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1822,16 +1821,16 @@ void control::MedalLightGroupControl(int code, TPinballComponent* caller)
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
caller->Message(MessageCode::TLightTurnOff, 0.0);
|
caller->Message(0, 0.0);
|
||||||
break;
|
break;
|
||||||
case 41:
|
case 41:
|
||||||
caller->Message(MessageCode::TLightGroupResetAndTurnOn, 2.0);
|
caller->Message(41, 2.0);
|
||||||
caller->Message(MessageCode::TLightGroupRestartNotifyTimer, 30.0);
|
caller->Message(43, 30.0);
|
||||||
break;
|
break;
|
||||||
case 61:
|
case 61:
|
||||||
caller->Message(MessageCode::TLightGroupOffsetAnimationBackward, 0.0);
|
caller->Message(33, 0.0);
|
||||||
if (caller->Message(MessageCode::TLightGroupGetOnCount, 0.0))
|
if (caller->Message(37, 0.0))
|
||||||
caller->Message(MessageCode::TLightGroupRestartNotifyTimer, 30.0);
|
caller->Message(43, 30.0);
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
@ -1842,29 +1841,29 @@ void control::MultiplierLightGroupControl(int code, TPinballComponent* caller)
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
caller->Message(MessageCode::TLightTurnOff, 0.0);
|
caller->Message(0, 0.0);
|
||||||
break;
|
break;
|
||||||
case 41:
|
case 41:
|
||||||
caller->Message(MessageCode::TLightGroupResetAndTurnOn, 2.0);
|
caller->Message(41, 2.0);
|
||||||
caller->Message(MessageCode::TLightGroupRestartNotifyTimer, 30.0);
|
caller->Message(43, 30.0);
|
||||||
break;
|
break;
|
||||||
case 61:
|
case 61:
|
||||||
if (TableG->ScoreMultiplier)
|
if (TableG->ScoreMultiplier)
|
||||||
TableG->ScoreMultiplier = TableG->ScoreMultiplier - 1;
|
TableG->ScoreMultiplier = TableG->ScoreMultiplier - 1;
|
||||||
caller->Message(MessageCode::TLightGroupOffsetAnimationBackward, 0.0);
|
caller->Message(33, 0.0);
|
||||||
if (caller->Message(MessageCode::TLightGroupGetOnCount, 0.0))
|
if (caller->Message(37, 0.0))
|
||||||
caller->Message(MessageCode::TLightGroupRestartNotifyTimer, 30.0);
|
caller->Message(43, 30.0);
|
||||||
break;
|
break;
|
||||||
case 64:
|
case 64:
|
||||||
TableG->ScoreMultiplier = 4;
|
TableG->ScoreMultiplier = 4;
|
||||||
caller->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
caller->Message(19, 0.0);
|
||||||
caller->Message(MessageCode::TLightGroupRestartNotifyTimer, 30.0);
|
caller->Message(43, 30.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING160), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING160), 2.0);
|
||||||
break;
|
break;
|
||||||
case 65:
|
case 65:
|
||||||
TableG->ScoreMultiplier = 0;
|
TableG->ScoreMultiplier = 0;
|
||||||
caller->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
caller->Message(20, 0.0);
|
||||||
caller->Message(MessageCode::TLightGroupRestartNotifyTimer, -1.0);
|
caller->Message(43, -1.0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -1887,12 +1886,12 @@ void control::FuelSpotTargetControl(int code, TPinballComponent* caller)
|
||||||
if (target11 != caller)
|
if (target11 != caller)
|
||||||
liteComp = lite72;
|
liteComp = lite72;
|
||||||
}
|
}
|
||||||
liteComp->Message(MessageCode::TLightFlasherStartTimedThenStayOn, 2.0);
|
liteComp->Message(15, 2.0);
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
if (top_circle_tgt_lights->Message(MessageCode::TLightGroupGetOnCount, 0.0) == 3)
|
if (top_circle_tgt_lights->Message(37, 0.0) == 3)
|
||||||
{
|
{
|
||||||
top_circle_tgt_lights->Message(MessageCode::TLightFlasherStartTimedThenStayOff, 2.0);
|
top_circle_tgt_lights->Message(16, 2.0);
|
||||||
fuel_bargraph->Message(MessageCode::TLightGroupToggleSplitIndex, 11.0);
|
fuel_bargraph->Message(45, 11.0);
|
||||||
soundwave25->Play(caller, "FuelSpotTargetControl1");
|
soundwave25->Play(caller, "FuelSpotTargetControl1");
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING145), 2.0);
|
||||||
}
|
}
|
||||||
|
@ -1923,7 +1922,7 @@ void control::MissionSpotTargetControl(int code, TPinballComponent* caller)
|
||||||
lite101->MessageField |= 4u;
|
lite101->MessageField |= 4u;
|
||||||
lite = lite103;
|
lite = lite103;
|
||||||
}
|
}
|
||||||
lite->Message(MessageCode::TLightFlasherStartTimedThenStayOn, 2.0);
|
lite->Message(15, 2.0);
|
||||||
|
|
||||||
TSound* sound;
|
TSound* sound;
|
||||||
if (!light_on(&control_lite198_tag) || lite198->FlasherOnFlag)
|
if (!light_on(&control_lite198_tag) || lite198->FlasherOnFlag)
|
||||||
|
@ -1934,8 +1933,8 @@ void control::MissionSpotTargetControl(int code, TPinballComponent* caller)
|
||||||
sound = soundwave49D;
|
sound = soundwave49D;
|
||||||
sound->Play(caller, "MissionSpotTargetControl");
|
sound->Play(caller, "MissionSpotTargetControl");
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
if (ramp_tgt_lights->Message(MessageCode::TLightGroupGetOnCount, 0.0) == 3)
|
if (ramp_tgt_lights->Message(37, 0.0) == 3)
|
||||||
ramp_tgt_lights->Message(MessageCode::TLightFlasherStartTimedThenStayOff, 2.0);
|
ramp_tgt_lights->Message(16, 2.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1960,13 +1959,13 @@ void control::LeftHazardSpotTargetControl(int code, TPinballComponent* caller)
|
||||||
lite104->MessageField |= 4u;
|
lite104->MessageField |= 4u;
|
||||||
lite = lite106;
|
lite = lite106;
|
||||||
}
|
}
|
||||||
lite->Message(MessageCode::TLightFlasherStartTimedThenStayOn, 2.0);
|
lite->Message(15, 2.0);
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
if (lchute_tgt_lights->Message(MessageCode::TLightGroupGetOnCount, 0.0) == 3)
|
if (lchute_tgt_lights->Message(37, 0.0) == 3)
|
||||||
{
|
{
|
||||||
soundwave14_1->Play(caller, "LeftHazardSpotTargetControl1");
|
soundwave14_1->Play(caller, "LeftHazardSpotTargetControl1");
|
||||||
gate1->Message(MessageCode::TGateDisable, 0.0);
|
gate1->Message2(MessageCode::TGateDisable, 0.0);
|
||||||
lchute_tgt_lights->Message(MessageCode::TLightFlasherStartTimedThenStayOff, 2.0);
|
lchute_tgt_lights->Message(16, 2.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1996,13 +1995,13 @@ void control::RightHazardSpotTargetControl(int code, TPinballComponent* caller)
|
||||||
lite107->MessageField |= 4u;
|
lite107->MessageField |= 4u;
|
||||||
light = lite109;
|
light = lite109;
|
||||||
}
|
}
|
||||||
light->Message(MessageCode::TLightFlasherStartTimedThenStayOn, 2.0);
|
light->Message(15, 2.0);
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
if (bpr_solotgt_lights->Message(MessageCode::TLightGroupGetOnCount, 0.0) == 3)
|
if (bpr_solotgt_lights->Message(37, 0.0) == 3)
|
||||||
{
|
{
|
||||||
soundwave14_1->Play(caller, "RightHazardSpotTargetControl1");
|
soundwave14_1->Play(caller, "RightHazardSpotTargetControl1");
|
||||||
gate2->Message(MessageCode::TGateDisable, 0.0);
|
gate2->Message2(MessageCode::TGateDisable, 0.0);
|
||||||
bpr_solotgt_lights->Message(MessageCode::TLightFlasherStartTimedThenStayOff, 2.0);
|
bpr_solotgt_lights->Message(16, 2.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2017,7 +2016,7 @@ void control::WormHoleDestinationControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (!light_on(&control_lite110_tag))
|
if (!light_on(&control_lite110_tag))
|
||||||
{
|
{
|
||||||
lite110->Message(MessageCode::TLightFlasherStartTimedThenStayOn, 3.0);
|
lite110->Message(15, 3.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING194), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING194), 2.0);
|
||||||
}
|
}
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
|
@ -2034,7 +2033,7 @@ void control::BlackHoleKickoutControl(int code, TPinballComponent* caller)
|
||||||
int addedScore = TableG->AddScore(caller->get_scoring(0));
|
int addedScore = TableG->AddScore(caller->get_scoring(0));
|
||||||
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING181), addedScore);
|
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING181), addedScore);
|
||||||
info_text_box->Display(Buffer, 2.0);
|
info_text_box->Display(Buffer, 2.0);
|
||||||
caller->Message(MessageCode::TKickoutRestartTimer, -1.0);
|
caller->Message2(MessageCode::TKickoutRestartTimer, -1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2062,10 +2061,10 @@ void control::GravityWellKickoutControl(int code, TPinballComponent* caller)
|
||||||
auto addedScore = TableG->AddScore(caller->get_scoring(0));
|
auto addedScore = TableG->AddScore(caller->get_scoring(0));
|
||||||
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING182), addedScore);
|
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING182), addedScore);
|
||||||
info_text_box->Display(Buffer, 2.0);
|
info_text_box->Display(Buffer, 2.0);
|
||||||
lite62->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite62->Message(20, 0.0);
|
||||||
caller->ActiveFlag = 0;
|
caller->ActiveFlag = 0;
|
||||||
auto duration = soundwave7->Play(lite62, "GravityWellKickoutControl");
|
auto duration = soundwave7->Play(lite62, "GravityWellKickoutControl");
|
||||||
caller->Message(MessageCode::TKickoutRestartTimer, duration);
|
caller->Message2(MessageCode::TKickoutRestartTimer, duration);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 64:
|
case 64:
|
||||||
|
@ -2080,7 +2079,7 @@ void control::GravityWellKickoutControl(int code, TPinballComponent* caller)
|
||||||
snprintf(Buffer, sizeof Buffer, "%s", pb::get_rc_string(Msg::STRING146));
|
snprintf(Buffer, sizeof Buffer, "%s", pb::get_rc_string(Msg::STRING146));
|
||||||
}
|
}
|
||||||
info_text_box->Display(Buffer, 2.0);
|
info_text_box->Display(Buffer, 2.0);
|
||||||
lite62->Message(MessageCode::TLightFlasherStart, 0.0);
|
lite62->Message(4, 0.0);
|
||||||
kickout1->ActiveFlag = 1;
|
kickout1->ActiveFlag = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2094,15 +2093,15 @@ void control::SkillShotGate1Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
lite200->Message(MessageCode::TLightTurnOnTimed, 5.0);
|
lite200->Message(9, 5.0);
|
||||||
if (light_on(&control_lite67_tag))
|
if (light_on(&control_lite67_tag))
|
||||||
{
|
{
|
||||||
skill_shot_lights->Message(MessageCode::TLightGroupReset, 0.0);
|
skill_shot_lights->Message(34, 0.0);
|
||||||
skill_shot_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
skill_shot_lights->Message(20, 0.0);
|
||||||
lite67->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite67->Message(19, 0.0);
|
||||||
lite54->Message(MessageCode::TLightFlasherStartTimed, 5.0);
|
lite54->Message(7, 5.0);
|
||||||
lite25->Message(MessageCode::TLightFlasherStartTimed, 5.0);
|
lite25->Message(7, 5.0);
|
||||||
fuel_bargraph->Message(MessageCode::TLightGroupToggleSplitIndex, 11.0);
|
fuel_bargraph->Message(45, 11.0);
|
||||||
soundwave14_2->Play(lite67, "SkillShotGate1Control");
|
soundwave14_2->Play(lite67, "SkillShotGate1Control");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2114,7 +2113,7 @@ void control::SkillShotGate2Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (light_on(&control_lite67_tag))
|
if (light_on(&control_lite67_tag))
|
||||||
{
|
{
|
||||||
lite68->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite68->Message(19, 0.0);
|
||||||
soundwave14_2->Play(lite68, "SkillShotGate2Control");
|
soundwave14_2->Play(lite68, "SkillShotGate2Control");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2126,7 +2125,7 @@ void control::SkillShotGate3Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (light_on(&control_lite67_tag))
|
if (light_on(&control_lite67_tag))
|
||||||
{
|
{
|
||||||
lite69->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite69->Message(19, 0.0);
|
||||||
soundwave14_2->Play(lite69, "SkillShotGate3Control");
|
soundwave14_2->Play(lite69, "SkillShotGate3Control");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2138,7 +2137,7 @@ void control::SkillShotGate4Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (light_on(&control_lite67_tag))
|
if (light_on(&control_lite67_tag))
|
||||||
{
|
{
|
||||||
lite131->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite131->Message(19, 0.0);
|
||||||
soundwave14_2->Play(lite131, "SkillShotGate4Control");
|
soundwave14_2->Play(lite131, "SkillShotGate4Control");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2150,7 +2149,7 @@ void control::SkillShotGate5Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (light_on(&control_lite67_tag))
|
if (light_on(&control_lite67_tag))
|
||||||
{
|
{
|
||||||
lite132->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite132->Message(19, 0.0);
|
||||||
soundwave14_2->Play(lite132, "SkillShotGate5Control");
|
soundwave14_2->Play(lite132, "SkillShotGate5Control");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2162,7 +2161,7 @@ void control::SkillShotGate6Control(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (light_on(&control_lite67_tag))
|
if (light_on(&control_lite67_tag))
|
||||||
{
|
{
|
||||||
lite133->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite133->Message(19, 0.0);
|
||||||
soundwave14_2->Play(lite133, "SkillShotGate6Control");
|
soundwave14_2->Play(lite133, "SkillShotGate6Control");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2178,7 +2177,7 @@ void control::ShootAgainLightControl(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
caller->Message(MessageCode::TLightFlasherStartTimedThenStayOff, 5.0);
|
caller->Message(16, 5.0);
|
||||||
caller->MessageField = 1;
|
caller->MessageField = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2188,7 +2187,7 @@ void control::EscapeChuteSinkControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 63)
|
if (code == 63)
|
||||||
{
|
{
|
||||||
caller->Message(MessageCode::TSinkResetTimer, -1.0f);
|
caller->Message2(MessageCode::TSinkResetTimer, -1.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2203,10 +2202,10 @@ void control::MissionControl(int code, TPinballComponent* caller)
|
||||||
case 47:
|
case 47:
|
||||||
if (fuel_bargraph == caller && lite198Msg > 1)
|
if (fuel_bargraph == caller && lite198Msg > 1)
|
||||||
{
|
{
|
||||||
l_trek_lights->Message(MessageCode::TLightGroupReset, 0.0);
|
l_trek_lights->Message(34, 0.0);
|
||||||
l_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
l_trek_lights->Message(20, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightGroupReset, 0.0);
|
r_trek_lights->Message(34, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
r_trek_lights->Message(20, 0.0);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING210), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING210), 4.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
|
@ -2215,7 +2214,7 @@ void control::MissionControl(int code, TPinballComponent* caller)
|
||||||
case 60:
|
case 60:
|
||||||
if (fuel_bargraph == caller && lite198Msg)
|
if (fuel_bargraph == caller && lite198Msg)
|
||||||
{
|
{
|
||||||
if (fuel_bargraph->Message(MessageCode::TLightGroupGetOnCount, 0.0) == 1)
|
if (fuel_bargraph->Message(37, 0.0) == 1)
|
||||||
{
|
{
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING217), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING217), 4.0);
|
||||||
}
|
}
|
||||||
|
@ -2342,7 +2341,7 @@ void control::HyperspaceKickOutControl(int code, TPinballComponent* caller)
|
||||||
if (code != 63)
|
if (code != 63)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto activeCount = hyper_lights->Message(MessageCode::TLightGroupGetOnCount, 0.0);
|
auto activeCount = hyper_lights->Message(37, 0.0);
|
||||||
HyperspaceLightGroupControl(41, hyper_lights);
|
HyperspaceLightGroupControl(41, hyper_lights);
|
||||||
switch (activeCount)
|
switch (activeCount)
|
||||||
{
|
{
|
||||||
|
@ -2379,7 +2378,7 @@ void control::HyperspaceKickOutControl(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
hyper_lights->Message(MessageCode::TLightTurnOff, 0.0);
|
hyper_lights->Message(0, 0.0);
|
||||||
size_t addedScore = TableG->AddScore(caller->get_scoring(4));
|
size_t addedScore = TableG->AddScore(caller->get_scoring(4));
|
||||||
GravityWellKickoutControl(64, reinterpret_cast<TPinballComponent*>(addedScore));
|
GravityWellKickoutControl(64, reinterpret_cast<TPinballComponent*>(addedScore));
|
||||||
break;
|
break;
|
||||||
|
@ -2401,15 +2400,15 @@ void control::HyperspaceKickOutControl(int code, TPinballComponent* caller)
|
||||||
if (light_on(&control_lite130_tag))
|
if (light_on(&control_lite130_tag))
|
||||||
{
|
{
|
||||||
someFlag |= 4u;
|
someFlag |= 4u;
|
||||||
lite130->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite130->Message(20, 0.0);
|
||||||
MultiplierLightGroupControl(64, top_target_lights);
|
MultiplierLightGroupControl(64, top_target_lights);
|
||||||
bumber_target_lights->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
bumber_target_lights->Message(19, 0.0);
|
||||||
table_set_jackpot();
|
table_set_jackpot();
|
||||||
table_set_bonus();
|
table_set_bonus();
|
||||||
table_set_flag_lights();
|
table_set_flag_lights();
|
||||||
table_set_bonus_hold();
|
table_set_bonus_hold();
|
||||||
lite27->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite27->Message(19, 0.0);
|
||||||
lite28->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite28->Message(19, 0.0);
|
||||||
ExtraBallLightControl(19, nullptr);
|
ExtraBallLightControl(19, nullptr);
|
||||||
DrainBallBlockerControl(52, block1);
|
DrainBallBlockerControl(52, block1);
|
||||||
|
|
||||||
|
@ -2439,8 +2438,8 @@ void control::HyperspaceKickOutControl(int code, TPinballComponent* caller)
|
||||||
auto duration = soundwave41->Play(lite24, "HyperspaceKickOutControl1");
|
auto duration = soundwave41->Play(lite24, "HyperspaceKickOutControl1");
|
||||||
soundwave36_1->Play(lite24, "HyperspaceKickOutControl2");
|
soundwave36_1->Play(lite24, "HyperspaceKickOutControl2");
|
||||||
soundwave50_2->Play(lite24, "HyperspaceKickOutControl3");
|
soundwave50_2->Play(lite24, "HyperspaceKickOutControl3");
|
||||||
lite25->Message(MessageCode::TLightFlasherStartTimed, 5.0);
|
lite25->Message(7, 5.0);
|
||||||
caller->Message(MessageCode::TKickoutRestartTimer, duration);
|
caller->Message2(MessageCode::TKickoutRestartTimer, duration);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sound = soundwave40;
|
sound = soundwave40;
|
||||||
|
@ -2468,8 +2467,8 @@ void control::HyperspaceKickOutControl(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto duration = sound->Play(lite24, "HyperspaceKickOutControl4");
|
auto duration = sound->Play(lite24, "HyperspaceKickOutControl4");
|
||||||
lite25->Message(MessageCode::TLightFlasherStartTimed, 5.0);
|
lite25->Message(7, 5.0);
|
||||||
caller->Message(MessageCode::TKickoutRestartTimer, duration);
|
caller->Message2(MessageCode::TKickoutRestartTimer, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
void control::PlungerControl(int code, TPinballComponent* caller)
|
void control::PlungerControl(int code, TPinballComponent* caller)
|
||||||
|
@ -2481,25 +2480,25 @@ void control::PlungerControl(int code, TPinballComponent* caller)
|
||||||
else if (code == 1016)
|
else if (code == 1016)
|
||||||
{
|
{
|
||||||
table_unlimited_balls = false;
|
table_unlimited_balls = false;
|
||||||
if (!middle_circle->Message(MessageCode::TLightGroupGetOnCount, 0.0))
|
if (!middle_circle->Message(37, 0.0))
|
||||||
middle_circle->Message(MessageCode::TLightGroupOffsetAnimationForward, 0.0);
|
middle_circle->Message(32, 0.0);
|
||||||
if (!light_on(&control_lite200_tag))
|
if (!light_on(&control_lite200_tag))
|
||||||
{
|
{
|
||||||
skill_shot_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
skill_shot_lights->Message(20, 0.0);
|
||||||
lite67->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite67->Message(19, 0.0);
|
||||||
skill_shot_lights->Message(MessageCode::TLightGroupAnimationBackward, 0.25f);
|
skill_shot_lights->Message(26, 0.25f);
|
||||||
l_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
l_trek_lights->Message(20, 0.0);
|
||||||
l_trek_lights->Message(MessageCode::TLightGroupOffsetAnimationForward, 0.2f);
|
l_trek_lights->Message(32, 0.2f);
|
||||||
l_trek_lights->Message(MessageCode::TLightGroupAnimationBackward, 0.2f);
|
l_trek_lights->Message(26, 0.2f);
|
||||||
r_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
r_trek_lights->Message(20, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightGroupOffsetAnimationForward, 0.2f);
|
r_trek_lights->Message(32, 0.2f);
|
||||||
r_trek_lights->Message(MessageCode::TLightGroupAnimationBackward, 0.2f);
|
r_trek_lights->Message(26, 0.2f);
|
||||||
TableG->ScoreSpecial1 = 25000;
|
TableG->ScoreSpecial1 = 25000;
|
||||||
MultiplierLightGroupControl(65, top_target_lights);
|
MultiplierLightGroupControl(65, top_target_lights);
|
||||||
fuel_bargraph->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
fuel_bargraph->Message(19, 0.0);
|
||||||
lite200->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite200->Message(19, 0.0);
|
||||||
gate1->Message(MessageCode::TGateDisable, 0.0);
|
gate1->Message2(MessageCode::TGateDisable, 0.0);
|
||||||
gate2->Message(MessageCode::TGateDisable, 0.0);
|
gate2->Message2(MessageCode::TGateDisable, 0.0);
|
||||||
}
|
}
|
||||||
lite200->MessageField = 0;
|
lite200->MessageField = 0;
|
||||||
}
|
}
|
||||||
|
@ -2515,7 +2514,7 @@ void control::MedalTargetControl(int code, TPinballComponent* caller)
|
||||||
+ target4->MessageField == 3)
|
+ target4->MessageField == 3)
|
||||||
{
|
{
|
||||||
MedalLightGroupControl(41, bumber_target_lights);
|
MedalLightGroupControl(41, bumber_target_lights);
|
||||||
int activeCount = bumber_target_lights->Message(MessageCode::TLightGroupGetOnCount, 0.0) - 1;
|
int activeCount = bumber_target_lights->Message(37, 0.0) - 1;
|
||||||
const char* text;
|
const char* text;
|
||||||
switch (activeCount)
|
switch (activeCount)
|
||||||
{
|
{
|
||||||
|
@ -2534,11 +2533,11 @@ void control::MedalTargetControl(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
info_text_box->Display(text, 2.0);
|
info_text_box->Display(text, 2.0);
|
||||||
target6->MessageField = 0;
|
target6->MessageField = 0;
|
||||||
target6->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target6->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target5->MessageField = 0;
|
target5->MessageField = 0;
|
||||||
target5->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target5->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target4->MessageField = 0;
|
target4->MessageField = 0;
|
||||||
target4->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target4->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TableG->AddScore(caller->get_scoring(0));
|
TableG->AddScore(caller->get_scoring(0));
|
||||||
|
@ -2554,7 +2553,7 @@ void control::MultiplierTargetControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
TableG->AddScore(caller->get_scoring(1));
|
TableG->AddScore(caller->get_scoring(1));
|
||||||
MultiplierLightGroupControl(41, top_target_lights);
|
MultiplierLightGroupControl(41, top_target_lights);
|
||||||
int activeCount = top_target_lights->Message(MessageCode::TLightGroupGetOnCount, 0.0);
|
int activeCount = top_target_lights->Message(37, 0.0);
|
||||||
const char* text;
|
const char* text;
|
||||||
switch (activeCount)
|
switch (activeCount)
|
||||||
{
|
{
|
||||||
|
@ -2578,11 +2577,11 @@ void control::MultiplierTargetControl(int code, TPinballComponent* caller)
|
||||||
|
|
||||||
info_text_box->Display(text, 2.0);
|
info_text_box->Display(text, 2.0);
|
||||||
target9->MessageField = 0;
|
target9->MessageField = 0;
|
||||||
target9->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target9->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target8->MessageField = 0;
|
target8->MessageField = 0;
|
||||||
target8->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target8->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target7->MessageField = 0;
|
target7->MessageField = 0;
|
||||||
target7->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target7->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2599,46 +2598,46 @@ void control::BallDrainControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (lite199->MessageField)
|
if (lite199->MessageField)
|
||||||
{
|
{
|
||||||
TableG->Message(MessageCode::GameOver, 0.0);
|
TableG->Message2(MessageCode::GameOver, 0.0);
|
||||||
if (pb::chk_highscore())
|
if (pb::chk_highscore())
|
||||||
{
|
{
|
||||||
soundwave3->Play(nullptr, "BallDrainControl1");
|
soundwave3->Play(nullptr, "BallDrainControl1");
|
||||||
TableG->LightGroup->Message(MessageCode::TLightFlasherStartTimedThenStayOff, 3.0);
|
TableG->LightGroup->Message(16, 3.0);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING277), -1.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING277), -1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
plunger->Message(MessageCode::PlungerStartFeedTimer, 0.0);
|
plunger->Message2(MessageCode::PlungerStartFeedTimer, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (code == 63)
|
else if (code == 63)
|
||||||
{
|
{
|
||||||
if (table_unlimited_balls)
|
if (table_unlimited_balls)
|
||||||
{
|
{
|
||||||
drain->Message(MessageCode::Reset, 0.0);
|
drain->Message2(MessageCode::Reset, 0.0);
|
||||||
sink3->Message(MessageCode::TSinkResetTimer, 0.0);
|
sink3->Message2(MessageCode::TSinkResetTimer, 0.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (TableG->TiltLockFlag)
|
if (TableG->TiltLockFlag)
|
||||||
{
|
{
|
||||||
lite200->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite200->Message(20, 0.0);
|
||||||
lite199->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite199->Message(20, 0.0);
|
||||||
midi::play_track(MidiTracks::Track1, false);
|
midi::play_track(MidiTracks::Track1, false);
|
||||||
}
|
}
|
||||||
if (light_on(&control_lite200_tag))
|
if (light_on(&control_lite200_tag))
|
||||||
{
|
{
|
||||||
soundwave27->Play(nullptr, "BallDrainControl2");
|
soundwave27->Play(nullptr, "BallDrainControl2");
|
||||||
lite200->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite200->Message(19, 0.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING197), -1.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING197), -1.0);
|
||||||
soundwave59->Play(nullptr, "BallDrainControl3");
|
soundwave59->Play(nullptr, "BallDrainControl3");
|
||||||
}
|
}
|
||||||
else if (light_on(&control_lite199_tag))
|
else if (light_on(&control_lite199_tag))
|
||||||
{
|
{
|
||||||
soundwave27->Play(nullptr, "BallDrainControl4");
|
soundwave27->Play(nullptr, "BallDrainControl4");
|
||||||
lite199->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite199->Message(20, 0.0);
|
||||||
lite200->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite200->Message(19, 0.0);
|
||||||
info_text_box->Display(pb::get_rc_string(Msg::STRING196), 2.0);
|
info_text_box->Display(pb::get_rc_string(Msg::STRING196), 2.0);
|
||||||
soundwave59->Play(nullptr, "BallDrainControl5");
|
soundwave59->Play(nullptr, "BallDrainControl5");
|
||||||
--TableG->UnknownP78;
|
--TableG->UnknownP78;
|
||||||
|
@ -2647,13 +2646,13 @@ void control::BallDrainControl(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (TableG->MultiballCount == 1)
|
if (TableG->MultiballCount == 1)
|
||||||
{
|
{
|
||||||
lite38->Message(MessageCode::TLightResetAndTurnOff, 0.0f);
|
lite38->Message(20, 0.0f);
|
||||||
lite39->Message(MessageCode::TLightResetAndTurnOff, 0.0f);
|
lite39->Message(20, 0.0f);
|
||||||
midi::play_track(MidiTracks::Track1, false);
|
midi::play_track(MidiTracks::Track1, false);
|
||||||
}
|
}
|
||||||
else if (TableG->MultiballCount == 2)
|
else if (TableG->MultiballCount == 2)
|
||||||
{
|
{
|
||||||
lite40->Message(MessageCode::TLightResetAndTurnOff, 0.0f);
|
lite40->Message(20, 0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2693,7 +2692,7 @@ void control::BallDrainControl(int code, TPinballComponent* caller)
|
||||||
TableG->ChangeBallCount(TableG->BallCount - 1);
|
TableG->ChangeBallCount(TableG->BallCount - 1);
|
||||||
if (TableG->CurrentPlayer + 1 != TableG->PlayerCount || TableG->BallCount)
|
if (TableG->CurrentPlayer + 1 != TableG->PlayerCount || TableG->BallCount)
|
||||||
{
|
{
|
||||||
TableG->Message(MessageCode::SwitchToNextPlayer, 0.0);
|
TableG->Message2(MessageCode::SwitchToNextPlayer, 0.0);
|
||||||
lite199->MessageField = 0;
|
lite199->MessageField = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2702,77 +2701,77 @@ void control::BallDrainControl(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
soundwave27->Play(nullptr, "BallDrainControl8");
|
soundwave27->Play(nullptr, "BallDrainControl8");
|
||||||
}
|
}
|
||||||
bmpr_inc_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
bmpr_inc_lights->Message(20, 0.0);
|
||||||
ramp_bmpr_inc_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
ramp_bmpr_inc_lights->Message(20, 0.0);
|
||||||
lite30->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite30->Message(20, 0.0);
|
||||||
lite29->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite29->Message(20, 0.0);
|
||||||
lite1->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite1->Message(20, 0.0);
|
||||||
lite54->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite54->Message(20, 0.0);
|
||||||
lite55->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite55->Message(20, 0.0);
|
||||||
lite56->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite56->Message(20, 0.0);
|
||||||
lite17->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite17->Message(20, 0.0);
|
||||||
lite18->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite18->Message(20, 0.0);
|
||||||
lite27->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite27->Message(20, 0.0);
|
||||||
lite28->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite28->Message(20, 0.0);
|
||||||
lite16->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite16->Message(20, 0.0);
|
||||||
lite20->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite20->Message(20, 0.0);
|
||||||
hyper_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
hyper_lights->Message(20, 0.0);
|
||||||
lite25->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite25->Message(20, 0.0);
|
||||||
lite26->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite26->Message(20, 0.0);
|
||||||
lite130->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite130->Message(20, 0.0);
|
||||||
lite19->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite19->Message(20, 0.0);
|
||||||
worm_hole_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
worm_hole_lights->Message(20, 0.0);
|
||||||
bsink_arrow_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
bsink_arrow_lights->Message(20, 0.0);
|
||||||
l_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
l_trek_lights->Message(20, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
r_trek_lights->Message(20, 0.0);
|
||||||
lite60->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite60->Message(20, 0.0);
|
||||||
lite59->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite59->Message(20, 0.0);
|
||||||
lite61->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite61->Message(20, 0.0);
|
||||||
bumber_target_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
bumber_target_lights->Message(20, 0.0);
|
||||||
top_target_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
top_target_lights->Message(20, 0.0);
|
||||||
top_circle_tgt_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
top_circle_tgt_lights->Message(20, 0.0);
|
||||||
ramp_tgt_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
ramp_tgt_lights->Message(20, 0.0);
|
||||||
lchute_tgt_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lchute_tgt_lights->Message(20, 0.0);
|
||||||
bpr_solotgt_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
bpr_solotgt_lights->Message(20, 0.0);
|
||||||
lite110->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite110->Message(20, 0.0);
|
||||||
skill_shot_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
skill_shot_lights->Message(20, 0.0);
|
||||||
lite77->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite77->Message(20, 0.0);
|
||||||
lite198->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite198->Message(20, 0.0);
|
||||||
lite196->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite196->Message(20, 0.0);
|
||||||
lite195->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite195->Message(20, 0.0);
|
||||||
fuel_bargraph->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
fuel_bargraph->Message(20, 0.0);
|
||||||
fuel_bargraph->Message(MessageCode::Reset, 0.0);
|
fuel_bargraph->Message2(MessageCode::Reset, 0.0);
|
||||||
GravityWellKickoutControl(1024, nullptr);
|
GravityWellKickoutControl(1024, nullptr);
|
||||||
lite62->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite62->Message(20, 0.0);
|
||||||
lite4->MessageField = 0;
|
lite4->MessageField = 0;
|
||||||
lite101->MessageField = 0;
|
lite101->MessageField = 0;
|
||||||
lite102->MessageField = 0;
|
lite102->MessageField = 0;
|
||||||
lite103->MessageField = 0;
|
lite103->MessageField = 0;
|
||||||
ramp_tgt_lights->MessageField = 0;
|
ramp_tgt_lights->MessageField = 0;
|
||||||
outer_circle->Message(MessageCode::TLightGroupReset, 0.0);
|
outer_circle->Message(34, 0.0);
|
||||||
middle_circle->Message(MessageCode::TLightGroupReset, 0.0);
|
middle_circle->Message(34, 0.0);
|
||||||
attack_bump->Message(MessageCode::Reset, 0.0);
|
attack_bump->Message2(MessageCode::Reset, 0.0);
|
||||||
launch_bump->Message(MessageCode::Reset, 0.0);
|
launch_bump->Message2(MessageCode::Reset, 0.0);
|
||||||
gate1->Message(MessageCode::Reset, 0.0);
|
gate1->Message2(MessageCode::Reset, 0.0);
|
||||||
gate2->Message(MessageCode::Reset, 0.0);
|
gate2->Message2(MessageCode::Reset, 0.0);
|
||||||
block1->Message(MessageCode::Reset, 0.0);
|
block1->Message2(MessageCode::Reset, 0.0);
|
||||||
target1->Message(MessageCode::Reset, 0.0);
|
target1->Message2(MessageCode::Reset, 0.0);
|
||||||
target2->Message(MessageCode::Reset, 0.0);
|
target2->Message2(MessageCode::Reset, 0.0);
|
||||||
target3->Message(MessageCode::Reset, 0.0);
|
target3->Message2(MessageCode::Reset, 0.0);
|
||||||
target6->Message(MessageCode::Reset, 0.0);
|
target6->Message2(MessageCode::Reset, 0.0);
|
||||||
target5->Message(MessageCode::Reset, 0.0);
|
target5->Message2(MessageCode::Reset, 0.0);
|
||||||
target4->Message(MessageCode::Reset, 0.0);
|
target4->Message2(MessageCode::Reset, 0.0);
|
||||||
target9->Message(MessageCode::Reset, 0.0);
|
target9->Message2(MessageCode::Reset, 0.0);
|
||||||
target8->Message(MessageCode::Reset, 0.0);
|
target8->Message2(MessageCode::Reset, 0.0);
|
||||||
target7->Message(MessageCode::Reset, 0.0);
|
target7->Message2(MessageCode::Reset, 0.0);
|
||||||
if (lite199->MessageField)
|
if (lite199->MessageField)
|
||||||
lite198->MessageField = 32;
|
lite198->MessageField = 32;
|
||||||
else
|
else
|
||||||
lite198->MessageField = 0;
|
lite198->MessageField = 0;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
TableG->Message(MessageCode::ClearTiltLock, 0.0);
|
TableG->Message2(MessageCode::ClearTiltLock, 0.0);
|
||||||
if (light_on(&control_lite58_tag))
|
if (light_on(&control_lite58_tag))
|
||||||
lite58->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite58->Message(20, 0.0);
|
||||||
else
|
else
|
||||||
TableG->ScoreSpecial2 = 25000;
|
TableG->ScoreSpecial2 = 25000;
|
||||||
}
|
}
|
||||||
|
@ -2786,7 +2785,7 @@ void control::table_control_handler(int code)
|
||||||
if (code == 1011)
|
if (code == 1011)
|
||||||
{
|
{
|
||||||
table_unlimited_balls = false;
|
table_unlimited_balls = false;
|
||||||
lite77->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite77->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2797,14 +2796,14 @@ void control::AlienMenaceController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
attack_bump->Message(MessageCode::TBumperSetBmpIndex, 0.0);
|
attack_bump->Message2(MessageCode::TBumperSetBmpIndex, 0.0);
|
||||||
l_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
l_trek_lights->Message(20, 0.0);
|
||||||
l_trek_lights->Message(MessageCode::TLightGroupOffsetAnimationForward, 0.2f);
|
l_trek_lights->Message(32, 0.2f);
|
||||||
l_trek_lights->Message(MessageCode::TLightGroupAnimationBackward, 0.2f);
|
l_trek_lights->Message(26, 0.2f);
|
||||||
r_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
r_trek_lights->Message(20, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightGroupOffsetAnimationForward, 0.2f);
|
r_trek_lights->Message(32, 0.2f);
|
||||||
r_trek_lights->Message(MessageCode::TLightGroupAnimationBackward, 0.2f);
|
r_trek_lights->Message(26, 0.2f);
|
||||||
lite307->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite307->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -2817,7 +2816,7 @@ void control::AlienMenaceController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (bump1->BmpIndex)
|
if (bump1->BmpIndex)
|
||||||
{
|
{
|
||||||
lite307->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite307->Message(20, 0.0);
|
||||||
lite198->MessageField = 20;
|
lite198->MessageField = 20;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -2833,12 +2832,12 @@ void control::AlienMenacePartTwoController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 8;
|
lite56->MessageField = 8;
|
||||||
l_trek_lights->Message(MessageCode::TLightGroupReset, 0.0);
|
l_trek_lights->Message(34, 0.0);
|
||||||
l_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
l_trek_lights->Message(20, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightGroupReset, 0.0);
|
r_trek_lights->Message(34, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
r_trek_lights->Message(20, 0.0);
|
||||||
lite308->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite308->Message(7, 0.0);
|
||||||
lite311->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite311->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -2861,8 +2860,8 @@ void control::AlienMenacePartTwoController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite308->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite308->Message(20, 0.0);
|
||||||
lite311->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite311->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING231), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING231), 4.0);
|
||||||
|
@ -2892,9 +2891,9 @@ void control::BlackHoleThreatController(int code, TPinballComponent* caller)
|
||||||
&& bump5->BmpIndex)
|
&& bump5->BmpIndex)
|
||||||
{
|
{
|
||||||
if (light_on(&control_lite316_tag))
|
if (light_on(&control_lite316_tag))
|
||||||
lite316->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite316->Message(20, 0.0);
|
||||||
if (light_on(&control_lite314_tag))
|
if (light_on(&control_lite314_tag))
|
||||||
lite314->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite314->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING225), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING225), 4.0);
|
||||||
|
@ -2911,7 +2910,7 @@ void control::BlackHoleThreatController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
launch_bump->Message(MessageCode::TBumperSetBmpIndex, 0.0);
|
launch_bump->Message2(MessageCode::TBumperSetBmpIndex, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -2921,20 +2920,20 @@ void control::BlackHoleThreatController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING224), -1.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING224), -1.0);
|
||||||
if (light_on(&control_lite316_tag))
|
if (light_on(&control_lite316_tag))
|
||||||
lite316->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite316->Message(20, 0.0);
|
||||||
if (!light_on(&control_lite314_tag))
|
if (!light_on(&control_lite314_tag))
|
||||||
{
|
{
|
||||||
lite314->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite314->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING223), -1.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING223), -1.0);
|
||||||
if (light_on(&control_lite314_tag))
|
if (light_on(&control_lite314_tag))
|
||||||
lite314->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite314->Message(20, 0.0);
|
||||||
if (!light_on(&control_lite316_tag))
|
if (!light_on(&control_lite316_tag))
|
||||||
{
|
{
|
||||||
lite316->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite316->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2950,32 +2949,32 @@ void control::BugHuntController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 15;
|
lite56->MessageField = 15;
|
||||||
target1->MessageField = 0;
|
target1->MessageField = 0;
|
||||||
target1->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target1->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target2->MessageField = 0;
|
target2->MessageField = 0;
|
||||||
target2->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target2->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target3->MessageField = 0;
|
target3->MessageField = 0;
|
||||||
target3->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target3->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target6->MessageField = 0;
|
target6->MessageField = 0;
|
||||||
target6->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target6->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target5->MessageField = 0;
|
target5->MessageField = 0;
|
||||||
target5->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target5->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target4->MessageField = 0;
|
target4->MessageField = 0;
|
||||||
target4->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target4->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target9->MessageField = 0;
|
target9->MessageField = 0;
|
||||||
target9->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target9->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target8->MessageField = 0;
|
target8->MessageField = 0;
|
||||||
target8->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target8->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target7->MessageField = 0;
|
target7->MessageField = 0;
|
||||||
target7->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target7->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
top_circle_tgt_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
top_circle_tgt_lights->Message(20, 0.0);
|
||||||
ramp_tgt_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
ramp_tgt_lights->Message(20, 0.0);
|
||||||
lchute_tgt_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lchute_tgt_lights->Message(20, 0.0);
|
||||||
bpr_solotgt_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
bpr_solotgt_lights->Message(20, 0.0);
|
||||||
lite306->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite306->Message(7, 0.0);
|
||||||
lite308->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite308->Message(7, 0.0);
|
||||||
lite310->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite310->Message(7, 0.0);
|
||||||
lite313->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite313->Message(7, 0.0);
|
||||||
lite319->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite319->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3015,11 +3014,11 @@ void control::BugHuntController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite306->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite306->Message(20, 0.0);
|
||||||
lite308->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite308->Message(20, 0.0);
|
||||||
lite310->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite310->Message(20, 0.0);
|
||||||
lite313->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite313->Message(20, 0.0);
|
||||||
lite319->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite319->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING227), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING227), 4.0);
|
||||||
|
@ -3043,10 +3042,10 @@ void control::CosmicPlagueController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 75;
|
lite56->MessageField = 75;
|
||||||
lite20->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite20->Message(19, 0.0);
|
||||||
lite19->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite19->Message(19, 0.0);
|
||||||
lite305->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite305->Message(7, 0.0);
|
||||||
lite312->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite312->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3065,12 +3064,12 @@ void control::CosmicPlagueController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite305->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite305->Message(20, 0.0);
|
||||||
lite312->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite312->Message(20, 0.0);
|
||||||
lite198->MessageField = 21;
|
lite198->MessageField = 21;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
lite20->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite20->Message(20, 0.0);
|
||||||
lite19->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite19->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3083,7 +3082,7 @@ void control::CosmicPlaguePartTwoController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite310->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite310->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3094,7 +3093,7 @@ void control::CosmicPlaguePartTwoController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
if (roll9 == caller)
|
if (roll9 == caller)
|
||||||
{
|
{
|
||||||
lite310->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite310->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING242), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING242), 4.0);
|
||||||
|
@ -3117,8 +3116,8 @@ void control::DoomsdayMachineController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 3;
|
lite56->MessageField = 3;
|
||||||
lite301->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite301->Message(7, 0.0);
|
||||||
lite320->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite320->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3137,8 +3136,8 @@ void control::DoomsdayMachineController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite301->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite301->Message(20, 0.0);
|
||||||
lite320->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite320->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING239), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING239), 4.0);
|
||||||
|
@ -3159,10 +3158,10 @@ void control::GameoverController(int code, TPinballComponent* caller)
|
||||||
|
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
goal_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
goal_lights->Message(20, 0.0);
|
||||||
pb::mode_change(GameModes::GameOver);
|
pb::mode_change(GameModes::GameOver);
|
||||||
flip1->Message(MessageCode::GameOver, 0.0);
|
flip1->Message2(MessageCode::GameOver, 0.0);
|
||||||
flip2->Message(MessageCode::GameOver, 0.0);
|
flip2->Message2(MessageCode::GameOver, 0.0);
|
||||||
mission_text_box->MessageField = 0;
|
mission_text_box->MessageField = 0;
|
||||||
midi::play_track(MidiTracks::Track1, false);
|
midi::play_track(MidiTracks::Track1, false);
|
||||||
return;
|
return;
|
||||||
|
@ -3259,7 +3258,7 @@ void control::LaunchTrainingController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite317->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite317->Message(7, 0.0);
|
||||||
lite56->MessageField = 3;
|
lite56->MessageField = 3;
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
|
@ -3279,7 +3278,7 @@ void control::LaunchTrainingController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite317->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite317->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING212), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING212), 4.0);
|
||||||
|
@ -3303,9 +3302,9 @@ void control::MaelstromController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 3;
|
lite56->MessageField = 3;
|
||||||
lite303->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite303->Message(7, 0.0);
|
||||||
lite309->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite309->Message(7, 0.0);
|
||||||
lite315->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite315->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3332,9 +3331,9 @@ void control::MaelstromController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite303->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite303->Message(20, 0.0);
|
||||||
lite309->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite309->Message(20, 0.0);
|
||||||
lite315->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite315->Message(20, 0.0);
|
||||||
lite198->MessageField = 25;
|
lite198->MessageField = 25;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -3349,8 +3348,8 @@ void control::MaelstromPartEightController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite130->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite130->Message(19, 0.0);
|
||||||
lite304->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite304->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3361,8 +3360,8 @@ void control::MaelstromPartEightController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
if (kickout2 == caller)
|
if (kickout2 == caller)
|
||||||
{
|
{
|
||||||
lite304->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite304->Message(20, 0.0);
|
||||||
lite130->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite130->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
int addedScore = SpecialAddScore(5000000);
|
int addedScore = SpecialAddScore(5000000);
|
||||||
|
@ -3382,7 +3381,7 @@ void control::MaelstromPartFiveController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite317->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite317->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3393,7 +3392,7 @@ void control::MaelstromPartFiveController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
if (ramp == caller)
|
if (ramp == caller)
|
||||||
{
|
{
|
||||||
lite317->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite317->Message(20, 0.0);
|
||||||
lite198->MessageField = 29;
|
lite198->MessageField = 29;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -3406,7 +3405,7 @@ void control::MaelstromPartFourController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 0;
|
lite56->MessageField = 0;
|
||||||
lite318->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite318->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3417,7 +3416,7 @@ void control::MaelstromPartFourController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
if (roll184 == caller)
|
if (roll184 == caller)
|
||||||
{
|
{
|
||||||
lite318->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite318->Message(20, 0.0);
|
||||||
lite198->MessageField = 28;
|
lite198->MessageField = 28;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -3430,9 +3429,9 @@ void control::MaelstromPartSevenController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
AdvanceWormHoleDestination(1);
|
AdvanceWormHoleDestination(1);
|
||||||
sink1->Message(MessageCode::TSinkUnknown7, 0.0);
|
sink1->Message2(MessageCode::TSinkUnknown7, 0.0);
|
||||||
sink2->Message(MessageCode::TSinkUnknown7, 0.0);
|
sink2->Message2(MessageCode::TSinkUnknown7, 0.0);
|
||||||
sink3->Message(MessageCode::TSinkUnknown7, 0.0);
|
sink3->Message2(MessageCode::TSinkUnknown7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3456,10 +3455,10 @@ void control::MaelstromPartSixController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite20->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite20->Message(19, 0.0);
|
||||||
lite19->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite19->Message(19, 0.0);
|
||||||
lite305->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite305->Message(7, 0.0);
|
||||||
lite312->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite312->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3470,12 +3469,12 @@ void control::MaelstromPartSixController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
if (flag1 == caller || flag2 == caller)
|
if (flag1 == caller || flag2 == caller)
|
||||||
{
|
{
|
||||||
lite305->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite305->Message(20, 0.0);
|
||||||
lite312->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite312->Message(20, 0.0);
|
||||||
lite198->MessageField = 30;
|
lite198->MessageField = 30;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
lite20->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite20->Message(20, 0.0);
|
||||||
lite19->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite19->Message(20, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3488,12 +3487,12 @@ void control::MaelstromPartThreeController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 5;
|
lite56->MessageField = 5;
|
||||||
lite301->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite301->Message(7, 0.0);
|
||||||
lite302->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite302->Message(7, 0.0);
|
||||||
lite307->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite307->Message(7, 0.0);
|
||||||
lite316->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite316->Message(7, 0.0);
|
||||||
lite320->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite320->Message(7, 0.0);
|
||||||
lite321->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite321->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3522,12 +3521,12 @@ void control::MaelstromPartThreeController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite301->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite301->Message(20, 0.0);
|
||||||
lite302->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite302->Message(20, 0.0);
|
||||||
lite307->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite307->Message(20, 0.0);
|
||||||
lite316->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite316->Message(20, 0.0);
|
||||||
lite320->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite320->Message(20, 0.0);
|
||||||
lite321->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite321->Message(20, 0.0);
|
||||||
lite198->MessageField = 27;
|
lite198->MessageField = 27;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -3543,11 +3542,11 @@ void control::MaelstromPartTwoController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 3;
|
lite56->MessageField = 3;
|
||||||
lite306->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite306->Message(7, 0.0);
|
||||||
lite308->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite308->Message(7, 0.0);
|
||||||
lite310->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite310->Message(7, 0.0);
|
||||||
lite313->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite313->Message(7, 0.0);
|
||||||
lite319->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite319->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3578,11 +3577,11 @@ void control::MaelstromPartTwoController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite306->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite306->Message(20, 0.0);
|
||||||
lite308->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite308->Message(20, 0.0);
|
||||||
lite310->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite310->Message(20, 0.0);
|
||||||
lite313->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite313->Message(20, 0.0);
|
||||||
lite319->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite319->Message(20, 0.0);
|
||||||
lite198->MessageField = 26;
|
lite198->MessageField = 26;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -3597,8 +3596,8 @@ void control::PracticeMissionController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite308->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite308->Message(7, 0.0);
|
||||||
lite311->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite311->Message(7, 0.0);
|
||||||
lite56->MessageField = 8;
|
lite56->MessageField = 8;
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
|
@ -3622,8 +3621,8 @@ void control::PracticeMissionController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite308->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite308->Message(20, 0.0);
|
||||||
lite311->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite311->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING209), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING209), 4.0);
|
||||||
|
@ -3647,12 +3646,12 @@ void control::ReconnaissanceController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 15;
|
lite56->MessageField = 15;
|
||||||
lite301->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite301->Message(7, 0.0);
|
||||||
lite302->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite302->Message(7, 0.0);
|
||||||
lite307->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite307->Message(7, 0.0);
|
||||||
lite316->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite316->Message(7, 0.0);
|
||||||
lite320->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite320->Message(7, 0.0);
|
||||||
lite321->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite321->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3681,12 +3680,12 @@ void control::ReconnaissanceController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite301->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite301->Message(20, 0.0);
|
||||||
lite302->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite302->Message(20, 0.0);
|
||||||
lite307->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite307->Message(20, 0.0);
|
||||||
lite316->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite316->Message(20, 0.0);
|
||||||
lite320->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite320->Message(20, 0.0);
|
||||||
lite321->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite321->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING237), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING237), 4.0);
|
||||||
|
@ -3710,13 +3709,13 @@ void control::ReentryTrainingController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 3;
|
lite56->MessageField = 3;
|
||||||
l_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
l_trek_lights->Message(20, 0.0);
|
||||||
l_trek_lights->Message(MessageCode::TLightGroupOffsetAnimationForward, 0.2f);
|
l_trek_lights->Message(32, 0.2f);
|
||||||
l_trek_lights->Message(MessageCode::TLightGroupAnimationBackward, 0.2f);
|
l_trek_lights->Message(26, 0.2f);
|
||||||
r_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
r_trek_lights->Message(20, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightGroupOffsetAnimationForward, 0.2f);
|
r_trek_lights->Message(32, 0.2f);
|
||||||
r_trek_lights->Message(MessageCode::TLightGroupAnimationBackward, 0.2f);
|
r_trek_lights->Message(26, 0.2f);
|
||||||
lite307->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite307->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3737,7 +3736,7 @@ void control::ReentryTrainingController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite307->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite307->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING214), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING214), 4.0);
|
||||||
|
@ -3776,9 +3775,9 @@ void control::RescueMissionController(int code, TPinballComponent* caller)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (light_on(&control_lite303_tag))
|
if (light_on(&control_lite303_tag))
|
||||||
lite303->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite303->Message(20, 0.0);
|
||||||
if (light_on(&control_lite304_tag))
|
if (light_on(&control_lite304_tag))
|
||||||
lite304->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite304->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING230), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING230), 4.0);
|
||||||
|
@ -3792,8 +3791,8 @@ void control::RescueMissionController(int code, TPinballComponent* caller)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 66:
|
case 66:
|
||||||
lite20->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite20->Message(20, 0.0);
|
||||||
lite19->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite19->Message(20, 0.0);
|
||||||
lite56->MessageField = 1;
|
lite56->MessageField = 1;
|
||||||
break;
|
break;
|
||||||
case 67:
|
case 67:
|
||||||
|
@ -3801,20 +3800,20 @@ void control::RescueMissionController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING229), -1.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING229), -1.0);
|
||||||
if (light_on(&control_lite303_tag))
|
if (light_on(&control_lite303_tag))
|
||||||
lite303->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite303->Message(20, 0.0);
|
||||||
if (!light_on(&control_lite304_tag))
|
if (!light_on(&control_lite304_tag))
|
||||||
{
|
{
|
||||||
lite304->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite304->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING228), -1.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING228), -1.0);
|
||||||
if (light_on(&control_lite304_tag))
|
if (light_on(&control_lite304_tag))
|
||||||
lite304->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite304->Message(20, 0.0);
|
||||||
if (!light_on(&control_lite303_tag))
|
if (!light_on(&control_lite303_tag))
|
||||||
{
|
{
|
||||||
lite303->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite303->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -3832,7 +3831,7 @@ void control::SatelliteController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 3;
|
lite56->MessageField = 3;
|
||||||
lite308->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite308->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3851,7 +3850,7 @@ void control::SatelliteController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite308->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite308->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING234), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING234), 4.0);
|
||||||
|
@ -3876,26 +3875,26 @@ void control::ScienceMissionController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 9;
|
lite56->MessageField = 9;
|
||||||
target1->MessageField = 0;
|
target1->MessageField = 0;
|
||||||
target1->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target1->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target2->MessageField = 0;
|
target2->MessageField = 0;
|
||||||
target2->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target2->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target3->MessageField = 0;
|
target3->MessageField = 0;
|
||||||
target3->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target3->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target6->MessageField = 0;
|
target6->MessageField = 0;
|
||||||
target6->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target6->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target5->MessageField = 0;
|
target5->MessageField = 0;
|
||||||
target5->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target5->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target4->MessageField = 0;
|
target4->MessageField = 0;
|
||||||
target4->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target4->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target9->MessageField = 0;
|
target9->MessageField = 0;
|
||||||
target9->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target9->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target8->MessageField = 0;
|
target8->MessageField = 0;
|
||||||
target8->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target8->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
target7->MessageField = 0;
|
target7->MessageField = 0;
|
||||||
target7->Message(MessageCode::TPopupTargetEnable, 0.0);
|
target7->Message2(MessageCode::TPopupTargetEnable, 0.0);
|
||||||
lite303->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite303->Message(7, 0.0);
|
||||||
lite309->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite309->Message(7, 0.0);
|
||||||
lite315->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite315->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3922,9 +3921,9 @@ void control::ScienceMissionController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite303->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite303->Message(20, 0.0);
|
||||||
lite309->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite309->Message(20, 0.0);
|
||||||
lite315->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite315->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING216), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING216), 4.0);
|
||||||
|
@ -3947,10 +3946,10 @@ void control::SecretMissionGreenController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite6->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite6->Message(19, 0.0);
|
||||||
lite2->Message(MessageCode::TLightSetOnStateBmpIndex, 1.0);
|
lite2->Message(11, 1.0);
|
||||||
lite2->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite2->Message(19, 0.0);
|
||||||
lite2->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite2->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -3981,10 +3980,10 @@ void control::SecretMissionRedController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite5->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite5->Message(19, 0.0);
|
||||||
lite4->Message(MessageCode::TLightSetOnStateBmpIndex, 2.0);
|
lite4->Message(11, 2.0);
|
||||||
lite4->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite4->Message(19, 0.0);
|
||||||
lite4->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite4->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -4006,14 +4005,14 @@ void control::SecretMissionYellowController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
worm_hole_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
worm_hole_lights->Message(20, 0.0);
|
||||||
bsink_arrow_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
bsink_arrow_lights->Message(20, 0.0);
|
||||||
bsink_arrow_lights->Message(MessageCode::TLightSetMessageField, 0.0);
|
bsink_arrow_lights->Message(23, 0.0);
|
||||||
lite110->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite110->Message(20, 0.0);
|
||||||
lite7->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite7->Message(19, 0.0);
|
||||||
lite3->Message(MessageCode::TLightSetOnStateBmpIndex, 0.0);
|
lite3->Message(11, 0.0);
|
||||||
lite3->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite3->Message(19, 0.0);
|
||||||
lite3->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite3->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -4054,17 +4053,17 @@ void control::SelectMissionController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (ramp == caller
|
if (ramp == caller
|
||||||
&& light_on(&control_lite56_tag)
|
&& light_on(&control_lite56_tag)
|
||||||
&& fuel_bargraph->Message(MessageCode::TLightGroupGetOnCount, 0.0))
|
&& fuel_bargraph->Message(37, 0.0))
|
||||||
{
|
{
|
||||||
lite56->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite56->Message(20, 0.0);
|
||||||
lite198->Message(MessageCode::TLightResetAndTurnOn, 0.0);
|
lite198->Message(19, 0.0);
|
||||||
outer_circle->Message(MessageCode::TLightGroupAnimationBackward, -1.0);
|
outer_circle->Message(26, -1.0);
|
||||||
if (light_on(&control_lite317_tag))
|
if (light_on(&control_lite317_tag))
|
||||||
lite317->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite317->Message(20, 0.0);
|
||||||
if (light_on(&control_lite318_tag))
|
if (light_on(&control_lite318_tag))
|
||||||
lite318->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite318->Message(20, 0.0);
|
||||||
if (light_on(&control_lite319_tag))
|
if (light_on(&control_lite319_tag))
|
||||||
lite319->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite319->Message(20, 0.0);
|
||||||
lite198->MessageField = lite56->MessageField;
|
lite198->MessageField = lite56->MessageField;
|
||||||
auto scoreId = lite56->MessageField - 2;
|
auto scoreId = lite56->MessageField - 2;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
|
@ -4083,7 +4082,7 @@ void control::SelectMissionController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
|
|
||||||
int missionId;
|
int missionId;
|
||||||
auto activeCount = middle_circle->Message(MessageCode::TLightGroupGetOnCount, 0.0);
|
auto activeCount = middle_circle->Message(37, 0.0);
|
||||||
switch (activeCount)
|
switch (activeCount)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -4179,25 +4178,25 @@ void control::SelectMissionController(int code, TPinballComponent* caller)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lite56->MessageField = missionId;
|
lite56->MessageField = missionId;
|
||||||
lite56->Message(MessageCode::TLightFlasherStartTimedThenStayOn, 2.0);
|
lite56->Message(15, 2.0);
|
||||||
lite198->Message(MessageCode::TLightFlasherStart, 0.0);
|
lite198->Message(4, 0.0);
|
||||||
MissionControl(67, caller);
|
MissionControl(67, caller);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case 66:
|
case 66:
|
||||||
midi::play_track(MidiTracks::Track1, false);
|
midi::play_track(MidiTracks::Track1, false);
|
||||||
lite198->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite198->Message(20, 0.0);
|
||||||
outer_circle->Message(MessageCode::TLightGroupReset, 0.0);
|
outer_circle->Message(34, 0.0);
|
||||||
ramp_tgt_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
ramp_tgt_lights->Message(20, 0.0);
|
||||||
lite56->MessageField = 0;
|
lite56->MessageField = 0;
|
||||||
lite101->MessageField = 0;
|
lite101->MessageField = 0;
|
||||||
l_trek_lights->Message(MessageCode::TLightGroupReset, 0.0);
|
l_trek_lights->Message(34, 0.0);
|
||||||
l_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
l_trek_lights->Message(20, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightGroupReset, 0.0);
|
r_trek_lights->Message(34, 0.0);
|
||||||
r_trek_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
r_trek_lights->Message(20, 0.0);
|
||||||
goal_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
goal_lights->Message(20, 0.0);
|
||||||
worm_hole_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
worm_hole_lights->Message(20, 0.0);
|
||||||
bsink_arrow_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
bsink_arrow_lights->Message(20, 0.0);
|
||||||
break;
|
break;
|
||||||
case 67:
|
case 67:
|
||||||
break;
|
break;
|
||||||
|
@ -4205,7 +4204,7 @@ void control::SelectMissionController(int code, TPinballComponent* caller)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fuel_bargraph->Message(MessageCode::TLightGroupGetOnCount, 0.0))
|
if (fuel_bargraph->Message(37, 0.0))
|
||||||
{
|
{
|
||||||
if (light_on(&control_lite56_tag))
|
if (light_on(&control_lite56_tag))
|
||||||
{
|
{
|
||||||
|
@ -4213,22 +4212,22 @@ void control::SelectMissionController(int code, TPinballComponent* caller)
|
||||||
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING207), missionText);
|
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING207), missionText);
|
||||||
mission_text_box->Display(Buffer, -1.0);
|
mission_text_box->Display(Buffer, -1.0);
|
||||||
if (light_on(&control_lite318_tag))
|
if (light_on(&control_lite318_tag))
|
||||||
lite318->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite318->Message(20, 0.0);
|
||||||
if (light_on(&control_lite319_tag))
|
if (light_on(&control_lite319_tag))
|
||||||
lite319->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite319->Message(20, 0.0);
|
||||||
if (!light_on(&control_lite317_tag))
|
if (!light_on(&control_lite317_tag))
|
||||||
lite317->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite317->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING205), -1.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING205), -1.0);
|
||||||
if (light_on(&control_lite317_tag))
|
if (light_on(&control_lite317_tag))
|
||||||
lite317->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite317->Message(20, 0.0);
|
||||||
if (light_on(&control_lite318_tag))
|
if (light_on(&control_lite318_tag))
|
||||||
lite318->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite318->Message(20, 0.0);
|
||||||
if (!light_on(&control_lite319_tag))
|
if (!light_on(&control_lite319_tag))
|
||||||
{
|
{
|
||||||
lite319->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite319->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4236,12 +4235,12 @@ void control::SelectMissionController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING206), -1.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING206), -1.0);
|
||||||
if (light_on(&control_lite317_tag))
|
if (light_on(&control_lite317_tag))
|
||||||
lite317->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite317->Message(20, 0.0);
|
||||||
if (light_on(&control_lite319_tag))
|
if (light_on(&control_lite319_tag))
|
||||||
lite319->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite319->Message(20, 0.0);
|
||||||
if (!light_on(&control_lite318_tag))
|
if (!light_on(&control_lite318_tag))
|
||||||
{
|
{
|
||||||
lite318->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite318->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4259,8 +4258,8 @@ void control::SpaceRadiationController(int code, TPinballComponent* caller)
|
||||||
if (lite104->MessageField == 7)
|
if (lite104->MessageField == 7)
|
||||||
{
|
{
|
||||||
lite104->MessageField = 15;
|
lite104->MessageField = 15;
|
||||||
bsink_arrow_lights->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
bsink_arrow_lights->Message(7, 0.0);
|
||||||
lite313->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite313->Message(20, 0.0);
|
||||||
MissionControl(67, caller);
|
MissionControl(67, caller);
|
||||||
AdvanceWormHoleDestination(1);
|
AdvanceWormHoleDestination(1);
|
||||||
}
|
}
|
||||||
|
@ -4286,9 +4285,9 @@ void control::SpaceRadiationController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lchute_tgt_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lchute_tgt_lights->Message(20, 0.0);
|
||||||
lite104->MessageField = 0;
|
lite104->MessageField = 0;
|
||||||
lite313->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite313->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code == 67)
|
else if (code == 67)
|
||||||
{
|
{
|
||||||
|
@ -4314,15 +4313,15 @@ void control::StrayCometController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (lite107->MessageField == 7)
|
if (lite107->MessageField == 7)
|
||||||
{
|
{
|
||||||
lite306->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite306->Message(20, 0.0);
|
||||||
lite304->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite304->Message(7, 0.0);
|
||||||
lite107->MessageField = 15;
|
lite107->MessageField = 15;
|
||||||
MissionControl(67, caller);
|
MissionControl(67, caller);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (kickout2 == caller && lite107->MessageField == 15)
|
else if (kickout2 == caller && lite107->MessageField == 15)
|
||||||
{
|
{
|
||||||
lite304->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite304->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING220), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING220), 4.0);
|
||||||
|
@ -4339,9 +4338,9 @@ void control::StrayCometController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
bpr_solotgt_lights->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
bpr_solotgt_lights->Message(20, 0.0);
|
||||||
lite107->MessageField = 0;
|
lite107->MessageField = 0;
|
||||||
lite306->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite306->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code == 67)
|
else if (code == 67)
|
||||||
{
|
{
|
||||||
|
@ -4364,8 +4363,8 @@ void control::TimeWarpController(int code, TPinballComponent* caller)
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite56->MessageField = 25;
|
lite56->MessageField = 25;
|
||||||
lite300->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite300->Message(7, 0.0);
|
||||||
lite322->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite322->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -4387,8 +4386,8 @@ void control::TimeWarpController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lite300->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite300->Message(20, 0.0);
|
||||||
lite322->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite322->Message(20, 0.0);
|
||||||
lite198->MessageField = 24;
|
lite198->MessageField = 24;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
}
|
}
|
||||||
|
@ -4403,10 +4402,10 @@ void control::TimeWarpPartTwoController(int code, TPinballComponent* caller)
|
||||||
{
|
{
|
||||||
if (code == 66)
|
if (code == 66)
|
||||||
{
|
{
|
||||||
lite55->Message(MessageCode::TLightFlasherStartTimed, -1.0);
|
lite55->Message(7, -1.0);
|
||||||
lite26->Message(MessageCode::TLightFlasherStartTimed, -1.0);
|
lite26->Message(7, -1.0);
|
||||||
lite304->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite304->Message(7, 0.0);
|
||||||
lite317->Message(MessageCode::TLightFlasherStartTimed, 0.0);
|
lite317->Message(7, 0.0);
|
||||||
}
|
}
|
||||||
else if (code != 67)
|
else if (code != 67)
|
||||||
{
|
{
|
||||||
|
@ -4418,10 +4417,10 @@ void control::TimeWarpPartTwoController(int code, TPinballComponent* caller)
|
||||||
if (kickout2 == caller)
|
if (kickout2 == caller)
|
||||||
{
|
{
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING148), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING148), 4.0);
|
||||||
if (middle_circle->Message(MessageCode::TLightGroupGetOnCount, 0.0) > 1)
|
if (middle_circle->Message(37, 0.0) > 1)
|
||||||
{
|
{
|
||||||
middle_circle->Message(MessageCode::TLightGroupOffsetAnimationBackward, 5.0);
|
middle_circle->Message(33, 5.0);
|
||||||
int rank = middle_circle->Message(MessageCode::TLightGroupGetOnCount, 0.0);
|
int rank = middle_circle->Message(37, 0.0);
|
||||||
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING274), pb::get_rc_string(RankRcArray[rank - 1]));
|
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING274), pb::get_rc_string(RankRcArray[rank - 1]));
|
||||||
mission_text_box->Display(Buffer, 8.0);
|
mission_text_box->Display(Buffer, 8.0);
|
||||||
}
|
}
|
||||||
|
@ -4431,10 +4430,10 @@ void control::TimeWarpPartTwoController(int code, TPinballComponent* caller)
|
||||||
if (ramp != caller)
|
if (ramp != caller)
|
||||||
return;
|
return;
|
||||||
mission_text_box->Display(pb::get_rc_string(Msg::STRING147), 4.0);
|
mission_text_box->Display(pb::get_rc_string(Msg::STRING147), 4.0);
|
||||||
if (middle_circle->Message(MessageCode::TLightGroupGetOnCount, 0.0) < 9)
|
if (middle_circle->Message(37, 0.0) < 9)
|
||||||
{
|
{
|
||||||
int rank = middle_circle->Message(MessageCode::TLightGroupGetOnCount, 0.0);
|
int rank = middle_circle->Message(37, 0.0);
|
||||||
middle_circle->Message(MessageCode::TLightGroupResetAndTurnOn, 5.0);
|
middle_circle->Message(41, 5.0);
|
||||||
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING273), pb::get_rc_string(RankRcArray[rank]));
|
snprintf(Buffer, sizeof Buffer, pb::get_rc_string(Msg::STRING273), pb::get_rc_string(RankRcArray[rank]));
|
||||||
}
|
}
|
||||||
if (!AddRankProgress(12))
|
if (!AddRankProgress(12))
|
||||||
|
@ -4444,10 +4443,10 @@ void control::TimeWarpPartTwoController(int code, TPinballComponent* caller)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SpecialAddScore(2000000);
|
SpecialAddScore(2000000);
|
||||||
lite55->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite55->Message(20, 0.0);
|
||||||
lite26->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite26->Message(20, 0.0);
|
||||||
lite304->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite304->Message(20, 0.0);
|
||||||
lite317->Message(MessageCode::TLightResetAndTurnOff, 0.0);
|
lite317->Message(20, 0.0);
|
||||||
lite198->MessageField = 1;
|
lite198->MessageField = 1;
|
||||||
MissionControl(66, nullptr);
|
MissionControl(66, nullptr);
|
||||||
// SpecialAddScore sets the score dirty flag. So next tick it will be redrawn.
|
// SpecialAddScore sets the score dirty flag. So next tick it will be redrawn.
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
class TSink;
|
|
||||||
class TLight;
|
class TLight;
|
||||||
class TSound;
|
class TSound;
|
||||||
class TPinballTable;
|
class TPinballTable;
|
||||||
|
@ -70,8 +69,7 @@ public:
|
||||||
static bool table_unlimited_balls;
|
static bool table_unlimited_balls;
|
||||||
static Msg RankRcArray[9], MissionRcArray[17];
|
static Msg RankRcArray[9], MissionRcArray[17];
|
||||||
static int mission_select_scores[17];
|
static int mission_select_scores[17];
|
||||||
static std::reference_wrapper<TSink*> wormhole_tag_array1[3];
|
static component_tag_base *wormhole_tag_array1[3], *wormhole_tag_array2[3], *wormhole_tag_array3[3];
|
||||||
static std::reference_wrapper<TLight*> wormhole_tag_array2[3], wormhole_tag_array3[3];
|
|
||||||
|
|
||||||
static void make_links(TPinballTable* table);
|
static void make_links(TPinballTable* table);
|
||||||
static void ClearLinks();
|
static void ClearLinks();
|
||||||
|
|
|
@ -170,7 +170,7 @@ void pb::SelectDatFile(const std::vector<const char*>& dataSearchPaths)
|
||||||
void pb::reset_table()
|
void pb::reset_table()
|
||||||
{
|
{
|
||||||
if (MainTable)
|
if (MainTable)
|
||||||
MainTable->Message(MessageCode::Reset, 0.0);
|
MainTable->Message2(MessageCode::Reset, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ void pb::mode_change(GameModes mode)
|
||||||
winmain::DemoActive = false;
|
winmain::DemoActive = false;
|
||||||
}
|
}
|
||||||
if (MainTable && MainTable->LightGroup)
|
if (MainTable && MainTable->LightGroup)
|
||||||
MainTable->LightGroup->Message(MessageCode::TLightGroupGameOverAnimation, 1.4f);
|
MainTable->LightGroup->Message(29, 1.4f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
game_mode = mode;
|
game_mode = mode;
|
||||||
|
@ -226,7 +226,7 @@ void pb::toggle_demo()
|
||||||
if (demo_mode)
|
if (demo_mode)
|
||||||
{
|
{
|
||||||
demo_mode = false;
|
demo_mode = false;
|
||||||
MainTable->Message(MessageCode::Reset, 0.0);
|
MainTable->Message2(MessageCode::Reset, 0.0);
|
||||||
mode_change(GameModes::GameOver);
|
mode_change(GameModes::GameOver);
|
||||||
MissTextBox->Clear();
|
MissTextBox->Clear();
|
||||||
InfoTextBox->Display(get_rc_string(Msg::STRING125), -1.0);
|
InfoTextBox->Display(get_rc_string(Msg::STRING125), -1.0);
|
||||||
|
@ -243,7 +243,7 @@ void pb::replay_level(bool demoMode)
|
||||||
mode_change(GameModes::InGame);
|
mode_change(GameModes::InGame);
|
||||||
if (options::Options.Music)
|
if (options::Options.Music)
|
||||||
midi::music_play();
|
midi::music_play();
|
||||||
MainTable->Message(MessageCode::NewGame, static_cast<float>(options::Options.Players));
|
MainTable->Message2(MessageCode::NewGame, static_cast<float>(options::Options.Players));
|
||||||
}
|
}
|
||||||
|
|
||||||
void pb::ballset(float dx, float dy)
|
void pb::ballset(float dx, float dy)
|
||||||
|
@ -374,7 +374,7 @@ void pb::pause_continue()
|
||||||
if (winmain::single_step)
|
if (winmain::single_step)
|
||||||
{
|
{
|
||||||
if (MainTable)
|
if (MainTable)
|
||||||
MainTable->Message(MessageCode::Pause, time_now);
|
MainTable->Message2(MessageCode::Pause, time_now);
|
||||||
InfoTextBox->Display(get_rc_string(Msg::STRING123), -1.0);
|
InfoTextBox->Display(get_rc_string(Msg::STRING123), -1.0);
|
||||||
midi::music_stop();
|
midi::music_stop();
|
||||||
Sound::Deactivate();
|
Sound::Deactivate();
|
||||||
|
@ -382,7 +382,7 @@ void pb::pause_continue()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (MainTable)
|
if (MainTable)
|
||||||
MainTable->Message(MessageCode::Resume, 0.0);
|
MainTable->Message2(MessageCode::Resume, 0.0);
|
||||||
if (!demo_mode)
|
if (!demo_mode)
|
||||||
{
|
{
|
||||||
const char* text;
|
const char* text;
|
||||||
|
@ -408,7 +408,7 @@ void pb::pause_continue()
|
||||||
void pb::loose_focus()
|
void pb::loose_focus()
|
||||||
{
|
{
|
||||||
if (MainTable)
|
if (MainTable)
|
||||||
MainTable->Message(MessageCode::LooseFocus, time_now);
|
MainTable->Message2(MessageCode::LooseFocus, time_now);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pb::InputUp(GameInput input)
|
void pb::InputUp(GameInput input)
|
||||||
|
@ -418,15 +418,15 @@ void pb::InputUp(GameInput input)
|
||||||
|
|
||||||
if (AnyBindingMatchesInput(options::Options.Key.LeftFlipper, input))
|
if (AnyBindingMatchesInput(options::Options.Key.LeftFlipper, input))
|
||||||
{
|
{
|
||||||
MainTable->Message(MessageCode::LeftFlipperInputReleased, time_now);
|
MainTable->Message2(MessageCode::LeftFlipperInputReleased, time_now);
|
||||||
}
|
}
|
||||||
if (AnyBindingMatchesInput(options::Options.Key.RightFlipper, input))
|
if (AnyBindingMatchesInput(options::Options.Key.RightFlipper, input))
|
||||||
{
|
{
|
||||||
MainTable->Message(MessageCode::RightFlipperInputReleased, time_now);
|
MainTable->Message2(MessageCode::RightFlipperInputReleased, time_now);
|
||||||
}
|
}
|
||||||
if (AnyBindingMatchesInput(options::Options.Key.Plunger, input))
|
if (AnyBindingMatchesInput(options::Options.Key.Plunger, input))
|
||||||
{
|
{
|
||||||
MainTable->Message(MessageCode::PlungerInputReleased, time_now);
|
MainTable->Message2(MessageCode::PlungerInputReleased, time_now);
|
||||||
}
|
}
|
||||||
if (AnyBindingMatchesInput(options::Options.Key.LeftTableBump, input))
|
if (AnyBindingMatchesInput(options::Options.Key.LeftTableBump, input))
|
||||||
{
|
{
|
||||||
|
@ -453,15 +453,15 @@ void pb::InputDown(GameInput input)
|
||||||
|
|
||||||
if (AnyBindingMatchesInput(options::Options.Key.LeftFlipper, input))
|
if (AnyBindingMatchesInput(options::Options.Key.LeftFlipper, input))
|
||||||
{
|
{
|
||||||
MainTable->Message(MessageCode::LeftFlipperInputPressed, time_now);
|
MainTable->Message2(MessageCode::LeftFlipperInputPressed, time_now);
|
||||||
}
|
}
|
||||||
if (AnyBindingMatchesInput(options::Options.Key.RightFlipper, input))
|
if (AnyBindingMatchesInput(options::Options.Key.RightFlipper, input))
|
||||||
{
|
{
|
||||||
MainTable->Message(MessageCode::RightFlipperInputPressed, time_now);
|
MainTable->Message2(MessageCode::RightFlipperInputPressed, time_now);
|
||||||
}
|
}
|
||||||
if (AnyBindingMatchesInput(options::Options.Key.Plunger, input))
|
if (AnyBindingMatchesInput(options::Options.Key.Plunger, input))
|
||||||
{
|
{
|
||||||
MainTable->Message(MessageCode::PlungerInputPressed, time_now);
|
MainTable->Message2(MessageCode::PlungerInputPressed, time_now);
|
||||||
}
|
}
|
||||||
if (AnyBindingMatchesInput(options::Options.Key.LeftTableBump, input))
|
if (AnyBindingMatchesInput(options::Options.Key.LeftTableBump, input))
|
||||||
{
|
{
|
||||||
|
@ -504,10 +504,10 @@ void pb::InputDown(GameInput input)
|
||||||
MainTable->port_draw();
|
MainTable->port_draw();
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
MainTable->LightGroup->Message(MessageCode::TLightFtTmpOverrideOn, 1.0f);
|
MainTable->LightGroup->Message(-24, 1.0f);
|
||||||
break;
|
break;
|
||||||
case 'j':
|
case 'j':
|
||||||
MainTable->LightGroup->Message(MessageCode::TLightFtTmpOverrideOff, 1.0f);
|
MainTable->LightGroup->Message(-25, 1.0f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -515,7 +515,7 @@ void pb::InputDown(GameInput input)
|
||||||
|
|
||||||
void pb::launch_ball()
|
void pb::launch_ball()
|
||||||
{
|
{
|
||||||
MainTable->Plunger->Message(MessageCode::PlungerLaunchBall, 0.0f);
|
MainTable->Plunger->Message2(MessageCode::PlungerLaunchBall, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pb::end_game()
|
void pb::end_game()
|
||||||
|
|
Loading…
Reference in a new issue