translations: rename enums and avoid macros
This commit is contained in:
parent
ead8ac2c18
commit
ea4e143405
|
@ -290,7 +290,7 @@ void TPinballTable::tilt(float time)
|
|||
{
|
||||
pinball::InfoTextBox->Clear();
|
||||
pinball::MissTextBox->Clear();
|
||||
pinball::InfoTextBox->Display(pinball::get_rc_string(translation_id_e::STRING136), -1.0);
|
||||
pinball::InfoTextBox->Display(pinball::get_rc_string(Msg::STRING136), -1.0);
|
||||
loader::play_sound(SoundIndex3, nullptr, "TPinballTable1");
|
||||
TiltTimeoutTimer = timer::set(30.0, this, tilt_timeout);
|
||||
|
||||
|
@ -369,9 +369,9 @@ int TPinballTable::Message(int code, float value)
|
|||
LightGroup->Message(20, 0.0);
|
||||
Plunger->Message(1016, 0.0);
|
||||
if (Demo && Demo->ActiveFlag)
|
||||
rc_text = pinball::get_rc_string(translation_id_e::STRING131);
|
||||
rc_text = pinball::get_rc_string(Msg::STRING131);
|
||||
else
|
||||
rc_text = pinball::get_rc_string(translation_id_e::STRING127);
|
||||
rc_text = pinball::get_rc_string(Msg::STRING127);
|
||||
pinball::InfoTextBox->Display(rc_text, -1.0);
|
||||
if (Demo)
|
||||
Demo->Message(1014, 0.0);
|
||||
|
@ -468,9 +468,9 @@ int TPinballTable::Message(int code, float value)
|
|||
{
|
||||
const char* textboxText;
|
||||
if (Demo->ActiveFlag)
|
||||
textboxText = pinball::get_rc_string(translation_id_e::STRING131);
|
||||
textboxText = pinball::get_rc_string(Msg::STRING131);
|
||||
else
|
||||
textboxText = pinball::get_rc_string(translation_id_e::STRING127);
|
||||
textboxText = pinball::get_rc_string(Msg::STRING127);
|
||||
pinball::InfoTextBox->Display(textboxText, -1.0);
|
||||
break;
|
||||
}
|
||||
|
@ -512,27 +512,27 @@ int TPinballTable::Message(int code, float value)
|
|||
{
|
||||
case 0:
|
||||
if (Demo->ActiveFlag)
|
||||
textboxText = pinball::get_rc_string(translation_id_e::STRING131);
|
||||
textboxText = pinball::get_rc_string(Msg::STRING131);
|
||||
else
|
||||
textboxText = pinball::get_rc_string(translation_id_e::STRING127);
|
||||
textboxText = pinball::get_rc_string(Msg::STRING127);
|
||||
break;
|
||||
case 1:
|
||||
if (Demo->ActiveFlag)
|
||||
textboxText = pinball::get_rc_string(translation_id_e::STRING132);
|
||||
textboxText = pinball::get_rc_string(Msg::STRING132);
|
||||
else
|
||||
textboxText = pinball::get_rc_string(translation_id_e::STRING128);
|
||||
textboxText = pinball::get_rc_string(Msg::STRING128);
|
||||
break;
|
||||
case 2:
|
||||
if (Demo->ActiveFlag)
|
||||
textboxText = pinball::get_rc_string(translation_id_e::STRING133);
|
||||
textboxText = pinball::get_rc_string(Msg::STRING133);
|
||||
else
|
||||
textboxText = pinball::get_rc_string(translation_id_e::STRING129);
|
||||
textboxText = pinball::get_rc_string(Msg::STRING129);
|
||||
break;
|
||||
case 3:
|
||||
if (Demo->ActiveFlag)
|
||||
textboxText = pinball::get_rc_string(translation_id_e::STRING134);
|
||||
textboxText = pinball::get_rc_string(Msg::STRING134);
|
||||
else
|
||||
textboxText = pinball::get_rc_string(translation_id_e::STRING130);
|
||||
textboxText = pinball::get_rc_string(Msg::STRING130);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -549,7 +549,7 @@ int TPinballTable::Message(int code, float value)
|
|||
case 1022:
|
||||
loader::play_sound(SoundIndex2, nullptr, "TPinballTable3");
|
||||
pinball::MissTextBox->Clear();
|
||||
pinball::InfoTextBox->Display(pinball::get_rc_string(translation_id_e::STRING135), -1.0);
|
||||
pinball::InfoTextBox->Display(pinball::get_rc_string(Msg::STRING135), -1.0);
|
||||
EndGameTimeoutTimer = timer::set(3.0, this, EndGame_timeout);
|
||||
break;
|
||||
case 1024:
|
||||
|
@ -661,7 +661,7 @@ void TPinballTable::EndGame_timeout(int timerId, void* caller)
|
|||
if (table->Demo)
|
||||
table->Demo->Message(1022, 0.0);
|
||||
control::handler(67, pinball::MissTextBox);
|
||||
pinball::InfoTextBox->Display(pinball::get_rc_string(translation_id_e::STRING125), -1.0);
|
||||
pinball::InfoTextBox->Display(pinball::get_rc_string(Msg::STRING125), -1.0);
|
||||
}
|
||||
|
||||
void TPinballTable::LightShow_timeout(int timerId, void* caller)
|
||||
|
|
|
@ -773,37 +773,37 @@ component_tag_base* control::simple_components[145]
|
|||
int control::waiting_deployment_flag;
|
||||
bool control::table_unlimited_balls = false;
|
||||
int control::extraball_light_flag;
|
||||
translation_id_e control::RankRcArray[9] =
|
||||
Msg control::RankRcArray[9] =
|
||||
{
|
||||
translation_id_e::STRING185,
|
||||
translation_id_e::STRING186,
|
||||
translation_id_e::STRING187,
|
||||
translation_id_e::STRING188,
|
||||
translation_id_e::STRING189,
|
||||
translation_id_e::STRING190,
|
||||
translation_id_e::STRING191,
|
||||
translation_id_e::STRING192,
|
||||
translation_id_e::STRING193
|
||||
Msg::STRING185,
|
||||
Msg::STRING186,
|
||||
Msg::STRING187,
|
||||
Msg::STRING188,
|
||||
Msg::STRING189,
|
||||
Msg::STRING190,
|
||||
Msg::STRING191,
|
||||
Msg::STRING192,
|
||||
Msg::STRING193
|
||||
};
|
||||
translation_id_e control::MissionRcArray[17] =
|
||||
Msg control::MissionRcArray[17] =
|
||||
{
|
||||
translation_id_e::STRING161,
|
||||
translation_id_e::STRING162,
|
||||
translation_id_e::STRING163,
|
||||
translation_id_e::STRING164,
|
||||
translation_id_e::STRING165,
|
||||
translation_id_e::STRING166,
|
||||
translation_id_e::STRING167,
|
||||
translation_id_e::STRING168,
|
||||
translation_id_e::STRING169,
|
||||
translation_id_e::STRING170,
|
||||
translation_id_e::STRING171,
|
||||
translation_id_e::STRING172,
|
||||
translation_id_e::STRING173,
|
||||
translation_id_e::STRING174,
|
||||
translation_id_e::STRING175,
|
||||
translation_id_e::STRING176,
|
||||
translation_id_e::STRING177
|
||||
Msg::STRING161,
|
||||
Msg::STRING162,
|
||||
Msg::STRING163,
|
||||
Msg::STRING164,
|
||||
Msg::STRING165,
|
||||
Msg::STRING166,
|
||||
Msg::STRING167,
|
||||
Msg::STRING168,
|
||||
Msg::STRING169,
|
||||
Msg::STRING170,
|
||||
Msg::STRING171,
|
||||
Msg::STRING172,
|
||||
Msg::STRING173,
|
||||
Msg::STRING174,
|
||||
Msg::STRING175,
|
||||
Msg::STRING176,
|
||||
Msg::STRING177
|
||||
};
|
||||
int control::mission_select_scores[17] =
|
||||
{
|
||||
|
@ -960,28 +960,28 @@ void control::table_add_extra_ball(float count)
|
|||
{
|
||||
++TableG->ExtraBalls;
|
||||
soundwave28->Play(nullptr, "table_add_extra_ball");
|
||||
auto msg = pinball::get_rc_string(translation_id_e::STRING110);
|
||||
auto msg = pinball::get_rc_string(Msg::STRING110);
|
||||
info_text_box->Display(msg, count);
|
||||
}
|
||||
|
||||
void control::table_set_bonus_hold()
|
||||
{
|
||||
lite58->Message(19, 0.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING153), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING153), 2.0);
|
||||
}
|
||||
|
||||
void control::table_set_bonus()
|
||||
{
|
||||
TableG->ScoreSpecial2Flag = 1;
|
||||
lite59->Message(9, 60.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING105), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING105), 2.0);
|
||||
}
|
||||
|
||||
void control::table_set_jackpot()
|
||||
{
|
||||
TableG->ScoreSpecial3Flag = 1;
|
||||
lite60->Message(9, 60.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING116), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING116), 2.0);
|
||||
}
|
||||
|
||||
void control::table_set_flag_lights()
|
||||
|
@ -989,7 +989,7 @@ void control::table_set_flag_lights()
|
|||
lite20->Message(9, 60.0);
|
||||
lite19->Message(9, 60.0);
|
||||
lite61->Message(9, 60.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING152), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING152), 2.0);
|
||||
}
|
||||
|
||||
void control::table_set_multiball(float time)
|
||||
|
@ -1003,7 +1003,7 @@ void control::table_set_multiball(float time)
|
|||
lite38->Message(7, -1.0f);
|
||||
lite39->Message(7, -1.0f);
|
||||
lite40->Message(7, -1.0f);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING117), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING117), 2.0);
|
||||
midi::play_track(MidiTracks::Track3, true);
|
||||
}
|
||||
}
|
||||
|
@ -1023,7 +1023,7 @@ void control::table_bump_ball_sink_lock()
|
|||
{
|
||||
TableG->BallLockedCounter = TableG->BallLockedCounter + 1;
|
||||
soundwave44->Play(nullptr, "table_bump_ball_sink_lock");
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING102), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING102), 2.0);
|
||||
TableG->Plunger->Message(1018, 2.0f);
|
||||
}
|
||||
}
|
||||
|
@ -1032,7 +1032,7 @@ void control::table_bump_ball_sink_lock()
|
|||
void control::table_set_replay(float value)
|
||||
{
|
||||
lite199->Message(19, 0.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING101), value);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING101), value);
|
||||
}
|
||||
|
||||
void control::cheat_bump_rank()
|
||||
|
@ -1044,7 +1044,7 @@ void control::cheat_bump_rank()
|
|||
{
|
||||
middle_circle->Message(41, 2.0f);
|
||||
auto rankText = pinball::get_rc_string(RankRcArray[rank]);
|
||||
snprintf(Buffer,sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING184), rankText);
|
||||
snprintf(Buffer,sizeof Buffer, pinball::get_rc_string(Msg::STRING184), rankText);
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
soundwave10->Play(nullptr, "cheat_bump_rank");
|
||||
}
|
||||
|
@ -1095,7 +1095,7 @@ int control::AddRankProgress(int rank)
|
|||
{
|
||||
middle_circle->Message(41, 5.0);
|
||||
auto rankText = pinball::get_rc_string(RankRcArray[midActiveCount]);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING184), rankText);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING184), rankText);
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
soundwave10->Play(nullptr, "AddRankProgress");
|
||||
}
|
||||
|
@ -1219,7 +1219,7 @@ void control::DeploymentChuteToEscapeChuteOneWayControl(int code, TPinballCompon
|
|||
{
|
||||
soundwave3->Play(nullptr, "DeploymentChuteToEscapeChuteOneWayControl");
|
||||
int score = TableG->AddScore(caller->get_scoring(count - 1));
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING122), score);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING122), score);
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
if (!light_on(&control_lite56_tag))
|
||||
{
|
||||
|
@ -1282,7 +1282,7 @@ void control::LaunchRampControl(int code, TPinballComponent* caller)
|
|||
{
|
||||
someFlag = 1;
|
||||
int addedScore = SpecialAddScore(TableG->ScoreSpecial1);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING111), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING111), addedScore);
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
}
|
||||
if (light_on(&control_lite55_tag))
|
||||
|
@ -1368,7 +1368,7 @@ void control::ReentryLanesRolloverControl(int code, TPinballComponent* caller)
|
|||
if (bump1->BmpIndex < 3)
|
||||
{
|
||||
attack_bump->Message(12, 0.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING106), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING106), 2.0);
|
||||
}
|
||||
attack_bump->Message(48, 60.0);
|
||||
}
|
||||
|
@ -1424,7 +1424,7 @@ void control::LaunchLanesRolloverControl(int code, TPinballComponent* caller)
|
|||
if (bump5->BmpIndex < 3)
|
||||
{
|
||||
launch_bump->Message(12, 0.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING107), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING107), 2.0);
|
||||
}
|
||||
launch_bump->Message(48, 60.0);
|
||||
}
|
||||
|
@ -1522,7 +1522,7 @@ void control::BonusLaneRolloverControl(int code, TPinballComponent* caller)
|
|||
if (light_on(&control_lite16_tag))
|
||||
{
|
||||
int addedScore = SpecialAddScore(TableG->ScoreSpecial2);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING104), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING104), addedScore);
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
lite16->Message(20, 0.0);
|
||||
soundwave50_1->Play(caller, "BonusLaneRolloverControl1");
|
||||
|
@ -1531,7 +1531,7 @@ void control::BonusLaneRolloverControl(int code, TPinballComponent* caller)
|
|||
{
|
||||
TableG->AddScore(caller->get_scoring(0));
|
||||
soundwave25->Play(caller, "BonusLaneRolloverControl2");
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING145), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING145), 2.0);
|
||||
}
|
||||
fuel_bargraph->Message(45, 11.0);
|
||||
}
|
||||
|
@ -1548,7 +1548,7 @@ void control::FuelRollover1Control(int code, TPinballComponent* caller)
|
|||
else
|
||||
{
|
||||
fuel_bargraph->Message(45, 1.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING145), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING145), 2.0);
|
||||
}
|
||||
TableG->AddScore(caller->get_scoring(0));
|
||||
}
|
||||
|
@ -1565,7 +1565,7 @@ void control::FuelRollover2Control(int code, TPinballComponent* caller)
|
|||
else
|
||||
{
|
||||
fuel_bargraph->Message(45, 3.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING145), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING145), 2.0);
|
||||
}
|
||||
TableG->AddScore(caller->get_scoring(0));
|
||||
}
|
||||
|
@ -1582,7 +1582,7 @@ void control::FuelRollover3Control(int code, TPinballComponent* caller)
|
|||
else
|
||||
{
|
||||
fuel_bargraph->Message(45, 5.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING145), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING145), 2.0);
|
||||
}
|
||||
TableG->AddScore(caller->get_scoring(0));
|
||||
}
|
||||
|
@ -1599,7 +1599,7 @@ void control::FuelRollover4Control(int code, TPinballComponent* caller)
|
|||
else
|
||||
{
|
||||
fuel_bargraph->Message(45, 7.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING145), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING145), 2.0);
|
||||
}
|
||||
TableG->AddScore(caller->get_scoring(0));
|
||||
}
|
||||
|
@ -1616,7 +1616,7 @@ void control::FuelRollover5Control(int code, TPinballComponent* caller)
|
|||
else
|
||||
{
|
||||
fuel_bargraph->Message(45, 9.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING145), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING145), 2.0);
|
||||
}
|
||||
TableG->AddScore(caller->get_scoring(0));
|
||||
}
|
||||
|
@ -1633,7 +1633,7 @@ void control::FuelRollover6Control(int code, TPinballComponent* caller)
|
|||
else
|
||||
{
|
||||
fuel_bargraph->Message(45, 11.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING145), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING145), 2.0);
|
||||
}
|
||||
TableG->AddScore(caller->get_scoring(0));
|
||||
}
|
||||
|
@ -1703,7 +1703,7 @@ void control::WormHoleControl(int code, TPinballComponent* caller)
|
|||
TableG->AddScore(sink->get_scoring(1));
|
||||
}
|
||||
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING150), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING150), 2.0);
|
||||
wormhole_tag_array2[sinkFlag]->GetComponent()->Message(16, sink->TimerTime);
|
||||
wormhole_tag_array3[sinkFlag]->GetComponent()->Message(11, static_cast<float>(2 - sinkFlag));
|
||||
wormhole_tag_array3[sinkFlag]->GetComponent()->Message(16, sink->TimerTime);
|
||||
|
@ -1723,7 +1723,7 @@ void control::WormHoleControl(int code, TPinballComponent* caller)
|
|||
wormhole_tag_array3[sinkFlag2]->GetComponent()->Message(11, static_cast<float>(2 - sinkFlag2));
|
||||
wormhole_tag_array3[sinkFlag2]->GetComponent()->Message(16, sink->TimerTime);
|
||||
wormhole_tag_array1[sinkFlag2]->GetComponent()->Message(56, sink->TimerTime);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING150), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING150), 2.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1863,7 +1863,7 @@ void control::MultiplierLightGroupControl(int code, TPinballComponent* caller)
|
|||
TableG->ScoreMultiplier = 4;
|
||||
caller->Message(19, 0.0);
|
||||
caller->Message(43, 30.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING160), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING160), 2.0);
|
||||
break;
|
||||
case 65:
|
||||
TableG->ScoreMultiplier = 0;
|
||||
|
@ -1898,7 +1898,7 @@ void control::FuelSpotTargetControl(int code, TPinballComponent* caller)
|
|||
top_circle_tgt_lights->Message(16, 2.0);
|
||||
fuel_bargraph->Message(45, 11.0);
|
||||
soundwave25->Play(caller, "FuelSpotTargetControl1");
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING145), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING145), 2.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2022,7 +2022,7 @@ void control::WormHoleDestinationControl(int code, TPinballComponent* caller)
|
|||
if (!light_on(&control_lite110_tag))
|
||||
{
|
||||
lite110->Message(15, 3.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING194), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING194), 2.0);
|
||||
}
|
||||
TableG->AddScore(caller->get_scoring(0));
|
||||
AdvanceWormHoleDestination(1);
|
||||
|
@ -2036,7 +2036,7 @@ void control::BlackHoleKickoutControl(int code, TPinballComponent* caller)
|
|||
if (code == 63)
|
||||
{
|
||||
int addedScore = TableG->AddScore(caller->get_scoring(0));
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING181), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING181), addedScore);
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
caller->Message(55, -1.0);
|
||||
}
|
||||
|
@ -2064,7 +2064,7 @@ void control::GravityWellKickoutControl(int code, TPinballComponent* caller)
|
|||
case 63:
|
||||
{
|
||||
auto addedScore = TableG->AddScore(caller->get_scoring(0));
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING182), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING182), addedScore);
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
lite62->Message(20, 0.0);
|
||||
caller->ActiveFlag = 0;
|
||||
|
@ -2077,11 +2077,11 @@ void control::GravityWellKickoutControl(int code, TPinballComponent* caller)
|
|||
auto score = reinterpret_cast<size_t>(caller);
|
||||
if (score)
|
||||
{
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING183), score);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING183), score);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(Buffer, sizeof Buffer, "%s", pinball::get_rc_string(translation_id_e::STRING146));
|
||||
snprintf(Buffer, sizeof Buffer, "%s", pinball::get_rc_string(Msg::STRING146));
|
||||
}
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
lite62->Message(4, 0.0);
|
||||
|
@ -2209,7 +2209,7 @@ void control::MissionControl(int code, TPinballComponent* caller)
|
|||
l_trek_lights->Message(20, 0.0);
|
||||
r_trek_lights->Message(34, 0.0);
|
||||
r_trek_lights->Message(20, 0.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING210), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING210), 4.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
}
|
||||
|
@ -2219,7 +2219,7 @@ void control::MissionControl(int code, TPinballComponent* caller)
|
|||
{
|
||||
if (fuel_bargraph->Message(37, 0.0) == 1)
|
||||
{
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING217), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING217), 4.0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -2351,14 +2351,14 @@ void control::HyperspaceKickOutControl(int code, TPinballComponent* caller)
|
|||
case 0:
|
||||
{
|
||||
auto addedScore = TableG->AddScore(caller->get_scoring(0));
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING113), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING113), addedScore);
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
auto addedScore = SpecialAddScore(TableG->ScoreSpecial3);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING115), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING115), addedScore);
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
TableG->ScoreSpecial3 = 20000;
|
||||
break;
|
||||
|
@ -2367,7 +2367,7 @@ void control::HyperspaceKickOutControl(int code, TPinballComponent* caller)
|
|||
{
|
||||
DrainBallBlockerControl(52, block1);
|
||||
auto addedScore = TableG->AddScore(caller->get_scoring(2));
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING103), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING103), addedScore);
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
break;
|
||||
}
|
||||
|
@ -2375,7 +2375,7 @@ void control::HyperspaceKickOutControl(int code, TPinballComponent* caller)
|
|||
{
|
||||
ExtraBallLightControl(19, nullptr);
|
||||
auto addedScore = TableG->AddScore(caller->get_scoring(3));
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING109), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING109), addedScore);
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
break;
|
||||
}
|
||||
|
@ -2395,7 +2395,7 @@ void control::HyperspaceKickOutControl(int code, TPinballComponent* caller)
|
|||
{
|
||||
someFlag = 1;
|
||||
auto addedScore = SpecialAddScore(TableG->ScoreSpecial1);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING111), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING111), addedScore);
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
}
|
||||
if (light_on(&control_lite26_tag))
|
||||
|
@ -2523,15 +2523,15 @@ void control::MedalTargetControl(int code, TPinballComponent* caller)
|
|||
{
|
||||
case 0:
|
||||
TableG->AddScore(caller->get_scoring(1));
|
||||
text = pinball::get_rc_string(translation_id_e::STRING154);
|
||||
text = pinball::get_rc_string(Msg::STRING154);
|
||||
break;
|
||||
case 1:
|
||||
TableG->AddScore(caller->get_scoring(2));
|
||||
text = pinball::get_rc_string(translation_id_e::STRING155);
|
||||
text = pinball::get_rc_string(Msg::STRING155);
|
||||
break;
|
||||
default:
|
||||
table_add_extra_ball(4.0);
|
||||
text = pinball::get_rc_string(translation_id_e::STRING156);
|
||||
text = pinball::get_rc_string(Msg::STRING156);
|
||||
break;
|
||||
}
|
||||
info_text_box->Display(text, 2.0);
|
||||
|
@ -2562,19 +2562,19 @@ void control::MultiplierTargetControl(int code, TPinballComponent* caller)
|
|||
{
|
||||
case 1:
|
||||
TableG->ScoreMultiplier = 1;
|
||||
text = pinball::get_rc_string(translation_id_e::STRING157);
|
||||
text = pinball::get_rc_string(Msg::STRING157);
|
||||
break;
|
||||
case 2:
|
||||
TableG->ScoreMultiplier = 2;
|
||||
text = pinball::get_rc_string(translation_id_e::STRING158);
|
||||
text = pinball::get_rc_string(Msg::STRING158);
|
||||
break;
|
||||
case 3:
|
||||
TableG->ScoreMultiplier = 3;
|
||||
text = pinball::get_rc_string(translation_id_e::STRING159);
|
||||
text = pinball::get_rc_string(Msg::STRING159);
|
||||
break;
|
||||
default:
|
||||
TableG->ScoreMultiplier = 4;
|
||||
text = pinball::get_rc_string(translation_id_e::STRING160);
|
||||
text = pinball::get_rc_string(Msg::STRING160);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2606,7 +2606,7 @@ void control::BallDrainControl(int code, TPinballComponent* caller)
|
|||
{
|
||||
soundwave3->Play(nullptr, "BallDrainControl1");
|
||||
TableG->LightGroup->Message(16, 3.0);
|
||||
const char* v11 = pinball::get_rc_string(translation_id_e::STRING277);
|
||||
const char* v11 = pinball::get_rc_string(Msg::STRING277);
|
||||
mission_text_box->Display(v11, -1.0);
|
||||
}
|
||||
}
|
||||
|
@ -2634,7 +2634,7 @@ void control::BallDrainControl(int code, TPinballComponent* caller)
|
|||
{
|
||||
soundwave27->Play(nullptr, "BallDrainControl2");
|
||||
lite200->Message(19, 0.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING197), -1.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING197), -1.0);
|
||||
soundwave59->Play(nullptr, "BallDrainControl3");
|
||||
}
|
||||
else if (light_on(&control_lite199_tag))
|
||||
|
@ -2642,7 +2642,7 @@ void control::BallDrainControl(int code, TPinballComponent* caller)
|
|||
soundwave27->Play(nullptr, "BallDrainControl4");
|
||||
lite199->Message(20, 0.0);
|
||||
lite200->Message(19, 0.0);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING196), 2.0);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING196), 2.0);
|
||||
soundwave59->Play(nullptr, "BallDrainControl5");
|
||||
--TableG->UnknownP78;
|
||||
}
|
||||
|
@ -2664,7 +2664,7 @@ void control::BallDrainControl(int code, TPinballComponent* caller)
|
|||
if (!TableG->TiltLockFlag)
|
||||
{
|
||||
int time = SpecialAddScore(TableG->ScoreSpecial2);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING195), time);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING195), time);
|
||||
info_text_box->Display(Buffer, 2.0);
|
||||
}
|
||||
if (TableG->ExtraBalls)
|
||||
|
@ -2676,17 +2676,17 @@ void control::BallDrainControl(int code, TPinballComponent* caller)
|
|||
switch (TableG->CurrentPlayer)
|
||||
{
|
||||
case 0:
|
||||
shootAgainText = pinball::get_rc_string(translation_id_e::STRING198);
|
||||
shootAgainText = pinball::get_rc_string(Msg::STRING198);
|
||||
break;
|
||||
case 1:
|
||||
shootAgainText = pinball::get_rc_string(translation_id_e::STRING199);
|
||||
shootAgainText = pinball::get_rc_string(Msg::STRING199);
|
||||
break;
|
||||
case 2:
|
||||
shootAgainText = pinball::get_rc_string(translation_id_e::STRING200);
|
||||
shootAgainText = pinball::get_rc_string(Msg::STRING200);
|
||||
break;
|
||||
default:
|
||||
case 3:
|
||||
shootAgainText = pinball::get_rc_string(translation_id_e::STRING201);
|
||||
shootAgainText = pinball::get_rc_string(Msg::STRING201);
|
||||
break;
|
||||
}
|
||||
info_text_box->Display(shootAgainText, -1.0);
|
||||
|
@ -2813,7 +2813,7 @@ void control::AlienMenaceController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING275), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING275), -1.0);
|
||||
return;
|
||||
}
|
||||
if (bump1 == caller)
|
||||
|
@ -2847,7 +2847,7 @@ void control::AlienMenacePartTwoController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING208),
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING208),
|
||||
lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
|
@ -2868,9 +2868,9 @@ void control::AlienMenacePartTwoController(int code, TPinballComponent* caller)
|
|||
lite311->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING231), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING231), 4.0);
|
||||
int addedScore = SpecialAddScore(750000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(7))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -2900,9 +2900,9 @@ void control::BlackHoleThreatController(int code, TPinballComponent* caller)
|
|||
lite314->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING225), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING225), 4.0);
|
||||
int addedScore = SpecialAddScore(1000000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(8))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -2922,7 +2922,7 @@ void control::BlackHoleThreatController(int code, TPinballComponent* caller)
|
|||
}
|
||||
if (bump5->BmpIndex)
|
||||
{
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING224), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING224), -1.0);
|
||||
if (light_on(&control_lite316_tag))
|
||||
lite316->Message(20, 0.0);
|
||||
if (!light_on(&control_lite314_tag))
|
||||
|
@ -2932,7 +2932,7 @@ void control::BlackHoleThreatController(int code, TPinballComponent* caller)
|
|||
}
|
||||
else
|
||||
{
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING223), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING223), -1.0);
|
||||
if (light_on(&control_lite314_tag))
|
||||
lite314->Message(20, 0.0);
|
||||
if (!light_on(&control_lite316_tag))
|
||||
|
@ -2984,7 +2984,7 @@ void control::BugHuntController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING226), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING226), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3025,9 +3025,9 @@ void control::BugHuntController(int code, TPinballComponent* caller)
|
|||
lite319->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING227), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING227), 4.0);
|
||||
int addedScore = SpecialAddScore(750000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(7))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3055,7 +3055,7 @@ void control::CosmicPlagueController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING240), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING240), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3092,7 +3092,7 @@ void control::CosmicPlaguePartTwoController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING241), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING241), -1.0);
|
||||
return;
|
||||
}
|
||||
if (roll9 == caller)
|
||||
|
@ -3100,9 +3100,9 @@ void control::CosmicPlaguePartTwoController(int code, TPinballComponent* caller)
|
|||
lite310->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING242), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING242), 4.0);
|
||||
int addedScore = SpecialAddScore(1750000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(11))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3127,7 +3127,7 @@ void control::DoomsdayMachineController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING238), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING238), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3144,9 +3144,9 @@ void control::DoomsdayMachineController(int code, TPinballComponent* caller)
|
|||
lite320->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING239), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING239), 4.0);
|
||||
int addedScore = SpecialAddScore(1250000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(9))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3185,16 +3185,16 @@ void control::GameoverController(int code, TPinballComponent* caller)
|
|||
switch (nextPlayerId)
|
||||
{
|
||||
case 1:
|
||||
playerNScoreText = pinball::get_rc_string(translation_id_e::STRING280);
|
||||
playerNScoreText = pinball::get_rc_string(Msg::STRING280);
|
||||
break;
|
||||
case 2:
|
||||
playerNScoreText = pinball::get_rc_string(translation_id_e::STRING281);
|
||||
playerNScoreText = pinball::get_rc_string(Msg::STRING281);
|
||||
break;
|
||||
case 3:
|
||||
playerNScoreText = pinball::get_rc_string(translation_id_e::STRING282);
|
||||
playerNScoreText = pinball::get_rc_string(Msg::STRING282);
|
||||
break;
|
||||
case 4:
|
||||
playerNScoreText = pinball::get_rc_string(translation_id_e::STRING283);
|
||||
playerNScoreText = pinball::get_rc_string(Msg::STRING283);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -3222,19 +3222,19 @@ void control::GameoverController(int code, TPinballComponent* caller)
|
|||
switch (nextHidhscoreId)
|
||||
{
|
||||
case 1:
|
||||
highScoreNText = pinball::get_rc_string(translation_id_e::STRING284);
|
||||
highScoreNText = pinball::get_rc_string(Msg::STRING284);
|
||||
break;
|
||||
case 2:
|
||||
highScoreNText = pinball::get_rc_string(translation_id_e::STRING285);
|
||||
highScoreNText = pinball::get_rc_string(Msg::STRING285);
|
||||
break;
|
||||
case 3:
|
||||
highScoreNText = pinball::get_rc_string(translation_id_e::STRING286);
|
||||
highScoreNText = pinball::get_rc_string(Msg::STRING286);
|
||||
break;
|
||||
case 4:
|
||||
highScoreNText = pinball::get_rc_string(translation_id_e::STRING287);
|
||||
highScoreNText = pinball::get_rc_string(Msg::STRING287);
|
||||
break;
|
||||
case 5:
|
||||
highScoreNText = pinball::get_rc_string(translation_id_e::STRING288);
|
||||
highScoreNText = pinball::get_rc_string(Msg::STRING288);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -3251,7 +3251,7 @@ void control::GameoverController(int code, TPinballComponent* caller)
|
|||
}
|
||||
|
||||
mission_text_box->MessageField = 0x100;
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING272), 10.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING272), 10.0);
|
||||
}
|
||||
|
||||
void control::LaunchTrainingController(int code, TPinballComponent* caller)
|
||||
|
@ -3269,7 +3269,7 @@ void control::LaunchTrainingController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING211), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING211), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3285,9 +3285,9 @@ void control::LaunchTrainingController(int code, TPinballComponent* caller)
|
|||
lite317->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING212), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING212), 4.0);
|
||||
int addedScore = SpecialAddScore(500000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(6))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3314,7 +3314,7 @@ void control::MaelstromController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING249), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING249), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3359,7 +3359,7 @@ void control::MaelstromPartEightController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING256), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING256), -1.0);
|
||||
return;
|
||||
}
|
||||
if (kickout2 == caller)
|
||||
|
@ -3369,8 +3369,8 @@ void control::MaelstromPartEightController(int code, TPinballComponent* caller)
|
|||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
int addedScore = SpecialAddScore(5000000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
info_text_box->Display(pinball::get_rc_string(translation_id_e::STRING149), 4.0);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
info_text_box->Display(pinball::get_rc_string(Msg::STRING149), 4.0);
|
||||
if (!AddRankProgress(18))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3391,7 +3391,7 @@ void control::MaelstromPartFiveController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING253), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING253), -1.0);
|
||||
return;
|
||||
}
|
||||
if (ramp == caller)
|
||||
|
@ -3415,7 +3415,7 @@ void control::MaelstromPartFourController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING252), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING252), -1.0);
|
||||
return;
|
||||
}
|
||||
if (roll184 == caller)
|
||||
|
@ -3441,7 +3441,7 @@ void control::MaelstromPartSevenController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING255), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING255), -1.0);
|
||||
return;
|
||||
}
|
||||
if (sink1 == caller
|
||||
|
@ -3468,7 +3468,7 @@ void control::MaelstromPartSixController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING254), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING254), -1.0);
|
||||
return;
|
||||
}
|
||||
if (flag1 == caller || flag2 == caller)
|
||||
|
@ -3502,7 +3502,7 @@ void control::MaelstromPartThreeController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING251), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING251), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3556,7 +3556,7 @@ void control::MaelstromPartTwoController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING250), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING250), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3608,7 +3608,7 @@ void control::PracticeMissionController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING208), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING208), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3629,9 +3629,9 @@ void control::PracticeMissionController(int code, TPinballComponent* caller)
|
|||
lite311->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING209), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING209), 4.0);
|
||||
int addedScore = SpecialAddScore(500000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(6))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3661,7 +3661,7 @@ void control::ReconnaissanceController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING235), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING235), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3692,9 +3692,9 @@ void control::ReconnaissanceController(int code, TPinballComponent* caller)
|
|||
lite321->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING237), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING237), 4.0);
|
||||
int addedScore = SpecialAddScore(1250000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(9))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3725,7 +3725,7 @@ void control::ReentryTrainingController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING213), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING213), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3743,9 +3743,9 @@ void control::ReentryTrainingController(int code, TPinballComponent* caller)
|
|||
lite307->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING214), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING214), 4.0);
|
||||
int addedScore = SpecialAddScore(500000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(6))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3784,9 +3784,9 @@ void control::RescueMissionController(int code, TPinballComponent* caller)
|
|||
lite304->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING230), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING230), 4.0);
|
||||
int addedScore = SpecialAddScore(750000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(7))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3802,7 +3802,7 @@ void control::RescueMissionController(int code, TPinballComponent* caller)
|
|||
case 67:
|
||||
if (light_on(&control_lite20_tag))
|
||||
{
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING229), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING229), -1.0);
|
||||
if (light_on(&control_lite303_tag))
|
||||
lite303->Message(20, 0.0);
|
||||
if (!light_on(&control_lite304_tag))
|
||||
|
@ -3812,7 +3812,7 @@ void control::RescueMissionController(int code, TPinballComponent* caller)
|
|||
}
|
||||
else
|
||||
{
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING228), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING228), -1.0);
|
||||
if (light_on(&control_lite304_tag))
|
||||
lite304->Message(20, 0.0);
|
||||
if (!light_on(&control_lite303_tag))
|
||||
|
@ -3841,7 +3841,7 @@ void control::SatelliteController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING233), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING233), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3857,9 +3857,9 @@ void control::SatelliteController(int code, TPinballComponent* caller)
|
|||
lite308->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING234), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING234), 4.0);
|
||||
int addedScore = SpecialAddScore(1250000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(9))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3904,7 +3904,7 @@ void control::ScienceMissionController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING215), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING215), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3930,9 +3930,9 @@ void control::ScienceMissionController(int code, TPinballComponent* caller)
|
|||
lite315->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING216), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING216), 4.0);
|
||||
int addedScore = SpecialAddScore(750000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(9))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3959,7 +3959,7 @@ void control::SecretMissionGreenController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
const char* v2 = pinball::get_rc_string(translation_id_e::STRING245);
|
||||
const char* v2 = pinball::get_rc_string(Msg::STRING245);
|
||||
mission_text_box->Display(v2, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -3967,9 +3967,9 @@ void control::SecretMissionGreenController(int code, TPinballComponent* caller)
|
|||
{
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING246), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING246), 4.0);
|
||||
int addedScore = SpecialAddScore(1500000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(10))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -3993,7 +3993,7 @@ void control::SecretMissionRedController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING244), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING244), -1.0);
|
||||
return;
|
||||
}
|
||||
if (sink1 == caller)
|
||||
|
@ -4022,7 +4022,7 @@ void control::SecretMissionYellowController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING243), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING243), -1.0);
|
||||
return;
|
||||
}
|
||||
if (sink3 == caller)
|
||||
|
@ -4072,7 +4072,7 @@ void control::SelectMissionController(int code, TPinballComponent* caller)
|
|||
auto scoreId = lite56->MessageField - 2;
|
||||
MissionControl(66, nullptr);
|
||||
int addedScore = SpecialAddScore(mission_select_scores[scoreId]);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING178), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING178), addedScore);
|
||||
mission_text_box->Display(Buffer, 4.0);
|
||||
midi::play_track(MidiTracks::Track2, true);
|
||||
}
|
||||
|
@ -4213,7 +4213,7 @@ void control::SelectMissionController(int code, TPinballComponent* caller)
|
|||
if (light_on(&control_lite56_tag))
|
||||
{
|
||||
auto missionText = pinball::get_rc_string(MissionRcArray[lite56->MessageField - 2]);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING207), missionText);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING207), missionText);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
if (light_on(&control_lite318_tag))
|
||||
lite318->Message(20, 0.0);
|
||||
|
@ -4224,7 +4224,7 @@ void control::SelectMissionController(int code, TPinballComponent* caller)
|
|||
}
|
||||
else
|
||||
{
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING205), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING205), -1.0);
|
||||
if (light_on(&control_lite317_tag))
|
||||
lite317->Message(20, 0.0);
|
||||
if (light_on(&control_lite318_tag))
|
||||
|
@ -4237,7 +4237,7 @@ void control::SelectMissionController(int code, TPinballComponent* caller)
|
|||
}
|
||||
else
|
||||
{
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING206), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING206), -1.0);
|
||||
if (light_on(&control_lite317_tag))
|
||||
lite317->Message(20, 0.0);
|
||||
if (light_on(&control_lite319_tag))
|
||||
|
@ -4275,9 +4275,9 @@ void control::SpaceRadiationController(int code, TPinballComponent* caller)
|
|||
{
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING222), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING222), 4.0);
|
||||
int addedScore = SpecialAddScore(1000000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(8))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -4297,9 +4297,9 @@ void control::SpaceRadiationController(int code, TPinballComponent* caller)
|
|||
{
|
||||
const char* text;
|
||||
if (lite104->MessageField == 15)
|
||||
text = pinball::get_rc_string(translation_id_e::STRING221);
|
||||
text = pinball::get_rc_string(Msg::STRING221);
|
||||
else
|
||||
text = pinball::get_rc_string(translation_id_e::STRING276);
|
||||
text = pinball::get_rc_string(Msg::STRING276);
|
||||
mission_text_box->Display(text, -1.0);
|
||||
}
|
||||
}
|
||||
|
@ -4328,9 +4328,9 @@ void control::StrayCometController(int code, TPinballComponent* caller)
|
|||
lite304->Message(20, 0.0);
|
||||
lite198->MessageField = 1;
|
||||
MissionControl(66, nullptr);
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING220), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING220), 4.0);
|
||||
int addedScore = SpecialAddScore(1000000);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING179), addedScore);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING179), addedScore);
|
||||
if (!AddRankProgress(8))
|
||||
{
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
|
@ -4350,9 +4350,9 @@ void control::StrayCometController(int code, TPinballComponent* caller)
|
|||
{
|
||||
const char* text;
|
||||
if (lite107->MessageField == 15)
|
||||
text = pinball::get_rc_string(translation_id_e::STRING219);
|
||||
text = pinball::get_rc_string(Msg::STRING219);
|
||||
else
|
||||
text = pinball::get_rc_string(translation_id_e::STRING218);
|
||||
text = pinball::get_rc_string(Msg::STRING218);
|
||||
mission_text_box->Display(text, -1.0);
|
||||
}
|
||||
}
|
||||
|
@ -4374,7 +4374,7 @@ void control::TimeWarpController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING247), lite56->MessageField);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING247), lite56->MessageField);
|
||||
mission_text_box->Display(Buffer, -1.0);
|
||||
return;
|
||||
}
|
||||
|
@ -4415,17 +4415,17 @@ void control::TimeWarpPartTwoController(int code, TPinballComponent* caller)
|
|||
{
|
||||
return;
|
||||
}
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING248), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING248), -1.0);
|
||||
return;
|
||||
}
|
||||
if (kickout2 == caller)
|
||||
{
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING148), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING148), 4.0);
|
||||
if (middle_circle->Message(37, 0.0) > 1)
|
||||
{
|
||||
middle_circle->Message(33, 5.0);
|
||||
int rank = middle_circle->Message(37, 0.0);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING274), pinball::get_rc_string(RankRcArray[rank - 1]));
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING274), pinball::get_rc_string(RankRcArray[rank - 1]));
|
||||
mission_text_box->Display(Buffer, 8.0);
|
||||
}
|
||||
}
|
||||
|
@ -4433,12 +4433,12 @@ void control::TimeWarpPartTwoController(int code, TPinballComponent* caller)
|
|||
{
|
||||
if (ramp != caller)
|
||||
return;
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING147), 4.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING147), 4.0);
|
||||
if (middle_circle->Message(37, 0.0) < 9)
|
||||
{
|
||||
int rank = middle_circle->Message(37, 0.0);
|
||||
middle_circle->Message(41, 5.0);
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(translation_id_e::STRING273), pinball::get_rc_string(RankRcArray[rank]));
|
||||
snprintf(Buffer, sizeof Buffer, pinball::get_rc_string(Msg::STRING273), pinball::get_rc_string(RankRcArray[rank]));
|
||||
}
|
||||
if (!AddRankProgress(12))
|
||||
{
|
||||
|
@ -4479,7 +4479,7 @@ void control::WaitingDeploymentController(int code, TPinballComponent* caller)
|
|||
midi::play_track(MidiTracks::Track1, false);
|
||||
break;
|
||||
case 67:
|
||||
mission_text_box->Display(pinball::get_rc_string(translation_id_e::STRING151), -1.0);
|
||||
mission_text_box->Display(pinball::get_rc_string(Msg::STRING151), -1.0);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
static component_tag_base* simple_components[145];
|
||||
static int waiting_deployment_flag;
|
||||
static bool table_unlimited_balls;
|
||||
static translation_id_e RankRcArray[9], MissionRcArray[17];
|
||||
static Msg RankRcArray[9], MissionRcArray[17];
|
||||
static int mission_select_scores[17];
|
||||
static component_tag_base *wormhole_tag_array1[3], *wormhole_tag_array2[3], *wormhole_tag_array3[3];
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ void font_selection::RenderDialog()
|
|||
ImGui::SameLine();
|
||||
ImGui::InputText("", DialogInputBuffer, IM_ARRAYSIZE(DialogInputBuffer));
|
||||
|
||||
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Ok)))
|
||||
if (ImGui::Button(pinball::get_rc_string(Msg::HIGHSCORES_Ok)))
|
||||
{
|
||||
options::Options.FontFileName = DialogInputBuffer;
|
||||
ImGui::CloseCurrentPopup();
|
||||
|
@ -42,7 +42,7 @@ void font_selection::RenderDialog()
|
|||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Cancel)))
|
||||
if (ImGui::Button(pinball::get_rc_string(Msg::HIGHSCORES_Cancel)))
|
||||
ImGui::CloseCurrentPopup();
|
||||
|
||||
ImGui::EndPopup();
|
||||
|
|
|
@ -121,7 +121,7 @@ void high_score::RenderHighScoreDialog()
|
|||
if (ShowDialog == true)
|
||||
{
|
||||
ShowDialog = false;
|
||||
if (!ImGui::IsPopupOpen(pinball::get_rc_string(translation_id_e::HIGHSCORES_Caption)))
|
||||
if (!ImGui::IsPopupOpen(pinball::get_rc_string(Msg::HIGHSCORES_Caption)))
|
||||
{
|
||||
dlg_enter_name = false;
|
||||
while (!ScoreQueue.empty())
|
||||
|
@ -140,19 +140,19 @@ void high_score::RenderHighScoreDialog()
|
|||
}
|
||||
}
|
||||
|
||||
ImGui::OpenPopup(pinball::get_rc_string(translation_id_e::HIGHSCORES_Caption));
|
||||
ImGui::OpenPopup(pinball::get_rc_string(Msg::HIGHSCORES_Caption));
|
||||
}
|
||||
}
|
||||
|
||||
bool unused_open = true;
|
||||
if (ImGui::BeginPopupModal(pinball::get_rc_string(translation_id_e::HIGHSCORES_Caption), &unused_open, ImGuiWindowFlags_AlwaysAutoResize))
|
||||
if (ImGui::BeginPopupModal(pinball::get_rc_string(Msg::HIGHSCORES_Caption), &unused_open, ImGuiWindowFlags_AlwaysAutoResize))
|
||||
{
|
||||
if (ImGui::BeginTable("table1", 3, ImGuiTableFlags_Borders))
|
||||
{
|
||||
char buf[36];
|
||||
ImGui::TableSetupColumn(pinball::get_rc_string(translation_id_e::HIGHSCORES_Rank));
|
||||
ImGui::TableSetupColumn(pinball::get_rc_string(translation_id_e::HIGHSCORES_Name));
|
||||
ImGui::TableSetupColumn(pinball::get_rc_string(translation_id_e::HIGHSCORES_Score));
|
||||
ImGui::TableSetupColumn(pinball::get_rc_string(Msg::HIGHSCORES_Rank));
|
||||
ImGui::TableSetupColumn(pinball::get_rc_string(Msg::HIGHSCORES_Name));
|
||||
ImGui::TableSetupColumn(pinball::get_rc_string(Msg::HIGHSCORES_Score));
|
||||
ImGui::TableHeadersRow();
|
||||
|
||||
for (int offset = 0, row = 0; row < 5; row++)
|
||||
|
@ -184,7 +184,7 @@ void high_score::RenderHighScoreDialog()
|
|||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Ok)))
|
||||
if (ImGui::Button(pinball::get_rc_string(Msg::HIGHSCORES_Ok)))
|
||||
{
|
||||
if (dlg_enter_name)
|
||||
{
|
||||
|
@ -194,23 +194,23 @@ void high_score::RenderHighScoreDialog()
|
|||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Cancel)))
|
||||
if (ImGui::Button(pinball::get_rc_string(Msg::HIGHSCORES_Cancel)))
|
||||
ImGui::CloseCurrentPopup();
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Clear)))
|
||||
if (ImGui::Button(pinball::get_rc_string(Msg::HIGHSCORES_Clear)))
|
||||
ImGui::OpenPopup("Confirm");
|
||||
if (ImGui::BeginPopupModal("Confirm", nullptr, ImGuiWindowFlags_MenuBar))
|
||||
{
|
||||
ImGui::TextUnformatted(pinball::get_rc_string(translation_id_e::STRING141));
|
||||
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Ok), ImVec2(120, 0)))
|
||||
ImGui::TextUnformatted(pinball::get_rc_string(Msg::STRING141));
|
||||
if (ImGui::Button(pinball::get_rc_string(Msg::HIGHSCORES_Ok), ImVec2(120, 0)))
|
||||
{
|
||||
clear_table();
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
ImGui::SetItemDefaultFocus();
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Cancel), ImVec2(120, 0)))
|
||||
if (ImGui::Button(pinball::get_rc_string(Msg::HIGHSCORES_Cancel), ImVec2(120, 0)))
|
||||
{
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ void high_score::RenderHighScoreDialog()
|
|||
ImGui::EndPopup();
|
||||
|
||||
// Reenter dialog for the next score in the queue
|
||||
if (!ImGui::IsPopupOpen(pinball::get_rc_string(translation_id_e::HIGHSCORES_Caption)) && !ScoreQueue.empty())
|
||||
if (!ImGui::IsPopupOpen(pinball::get_rc_string(Msg::HIGHSCORES_Caption)) && !ScoreQueue.empty())
|
||||
{
|
||||
ShowDialog = true;
|
||||
}
|
||||
|
|
|
@ -19,12 +19,12 @@ bool options::ShowDialog = false;
|
|||
GameInput* options::ControlWaitingForInput = nullptr;
|
||||
const ControlRef options::Controls[6]
|
||||
{
|
||||
{translation_id_e::KEYMAPPER_FlipperL, RebindControls.LeftFlipper},
|
||||
{translation_id_e::KEYMAPPER_FlipperR, RebindControls.RightFlipper},
|
||||
{translation_id_e::KEYMAPPER_BumpLeft, RebindControls.LeftTableBump},
|
||||
{translation_id_e::KEYMAPPER_BumpRight, RebindControls.RightTableBump},
|
||||
{translation_id_e::KEYMAPPER_BumpBottom, RebindControls.BottomTableBump},
|
||||
{translation_id_e::KEYMAPPER_Plunger, RebindControls.Plunger},
|
||||
{Msg::KEYMAPPER_FlipperL, RebindControls.LeftFlipper},
|
||||
{Msg::KEYMAPPER_FlipperR, RebindControls.RightFlipper},
|
||||
{Msg::KEYMAPPER_BumpLeft, RebindControls.LeftTableBump},
|
||||
{Msg::KEYMAPPER_BumpRight, RebindControls.RightTableBump},
|
||||
{Msg::KEYMAPPER_BumpBottom, RebindControls.BottomTableBump},
|
||||
{Msg::KEYMAPPER_Plunger, RebindControls.Plunger},
|
||||
};
|
||||
|
||||
|
||||
|
@ -114,7 +114,7 @@ void options::InitPrimary()
|
|||
Options.DebugOverlayCollisionMask = get_int("Debug Overlay Collision Mask", true);
|
||||
Options.DebugOverlaySprites = get_int("Debug Overlay Sprites", true);
|
||||
Options.DebugOverlaySounds = get_int("Debug Overlay Sounds", true);
|
||||
translations::set_current_language(get_string("Language", translations::get_current_language()).c_str());
|
||||
translations::set_current_language(get_string("Language", translations::get_current_language()->short_name).c_str());
|
||||
Options.FontFileName = get_string("FontFileName", "");
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ void options::uninit()
|
|||
set_int("Debug Overlay Collision Mask", Options.DebugOverlayCollisionMask);
|
||||
set_int("Debug Overlay Sprites", Options.DebugOverlaySprites);
|
||||
set_int("Debug Overlay Sounds", Options.DebugOverlaySounds);
|
||||
set_string("Language", translations::get_current_language());
|
||||
set_string("Language", translations::get_current_language()->short_name);
|
||||
set_string("FontFileName", Options.FontFileName.c_str());
|
||||
}
|
||||
|
||||
|
@ -344,16 +344,16 @@ void options::RenderControlDialog()
|
|||
return;
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowMinSize, ImVec2{550, 450});
|
||||
if (ImGui::Begin(pinball::get_rc_string(translation_id_e::KEYMAPPER_Caption), &ShowDialog))
|
||||
if (ImGui::Begin(pinball::get_rc_string(Msg::KEYMAPPER_Caption), &ShowDialog))
|
||||
{
|
||||
ImGui::TextUnformatted(pinball::get_rc_string(translation_id_e::KEYMAPPER_Groupbox2));
|
||||
ImGui::TextUnformatted(pinball::get_rc_string(Msg::KEYMAPPER_Groupbox2));
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::TextWrapped(pinball::get_rc_string(translation_id_e::KEYMAPPER_Help1));
|
||||
ImGui::TextWrapped(pinball::get_rc_string(translation_id_e::KEYMAPPER_Help2));
|
||||
ImGui::TextWrapped(pinball::get_rc_string(Msg::KEYMAPPER_Help1));
|
||||
ImGui::TextWrapped(pinball::get_rc_string(Msg::KEYMAPPER_Help2));
|
||||
ImGui::Spacing();
|
||||
|
||||
ImGui::TextUnformatted(pinball::get_rc_string(translation_id_e::KEYMAPPER_Groupbox1));
|
||||
ImGui::TextUnformatted(pinball::get_rc_string(Msg::KEYMAPPER_Groupbox1));
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, ImVec2{5, 10});
|
||||
if (ImGui::BeginTable("Controls", 4, ImGuiTableFlags_NoSavedSettings | ImGuiTableFlags_Borders))
|
||||
|
@ -422,20 +422,20 @@ void options::RenderControlDialog()
|
|||
ImGui::PopStyleVar();
|
||||
ImGui::Spacing();
|
||||
|
||||
if (ImGui::Button(pinball::get_rc_string(translation_id_e::KEYMAPPER_Ok)))
|
||||
if (ImGui::Button(pinball::get_rc_string(Msg::KEYMAPPER_Ok)))
|
||||
{
|
||||
Options.Key = RebindControls;
|
||||
ShowDialog = false;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(pinball::get_rc_string(translation_id_e::KEYMAPPER_Cancel)))
|
||||
if (ImGui::Button(pinball::get_rc_string(Msg::KEYMAPPER_Cancel)))
|
||||
{
|
||||
ShowDialog = false;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(pinball::get_rc_string(translation_id_e::KEYMAPPER_Default)))
|
||||
if (ImGui::Button(pinball::get_rc_string(Msg::KEYMAPPER_Default)))
|
||||
{
|
||||
RebindControls = Options.KeyDft;
|
||||
ControlWaitingForInput = nullptr;
|
||||
|
|
|
@ -97,7 +97,7 @@ struct optionsStruct
|
|||
|
||||
struct ControlRef
|
||||
{
|
||||
translation_id_e NameStringId;
|
||||
Msg NameStringId;
|
||||
GameInput (&Option)[3];
|
||||
};
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ int pb::init()
|
|||
record_table = partman::load_records(dataFilePath.c_str(), FullTiltMode);
|
||||
|
||||
auto useBmpFont = 0;
|
||||
pinball::get_rc_int(translation_id_e::STRING258, &useBmpFont);
|
||||
pinball::get_rc_int(Msg::STRING258, &useBmpFont);
|
||||
if (useBmpFont)
|
||||
score::load_msg_font("pbmsg_ft");
|
||||
|
||||
|
@ -124,7 +124,7 @@ void pb::SelectDatFile(const std::vector<const char*>& dataSearchPaths)
|
|||
std::string datFileNames[3]
|
||||
{
|
||||
"CADET.DAT",
|
||||
options::get_string("Pinball Data", pinball::get_rc_string(translation_id_e::STRING268)),
|
||||
options::get_string("Pinball Data", pinball::get_rc_string(Msg::STRING268)),
|
||||
"DEMO.DAT",
|
||||
};
|
||||
|
||||
|
@ -219,7 +219,7 @@ void pb::toggle_demo()
|
|||
MainTable->Message(1024, 0.0);
|
||||
mode_change(GameModes::GameOver);
|
||||
pinball::MissTextBox->Clear();
|
||||
auto text = pinball::get_rc_string(translation_id_e::STRING125);
|
||||
auto text = pinball::get_rc_string(Msg::STRING125);
|
||||
pinball::InfoTextBox->Display(text, -1.0);
|
||||
}
|
||||
else
|
||||
|
@ -288,7 +288,7 @@ void pb::frame(float dtMilliSec)
|
|||
{
|
||||
if (nudge::nudge_count > 0.5f)
|
||||
{
|
||||
pinball::InfoTextBox->Display(pinball::get_rc_string(translation_id_e::STRING126), 2.0);
|
||||
pinball::InfoTextBox->Display(pinball::get_rc_string(Msg::STRING126), 2.0);
|
||||
}
|
||||
if (nudge::nudge_count > 1.0f)
|
||||
MainTable->tilt(time_now);
|
||||
|
@ -366,7 +366,7 @@ void pb::pause_continue()
|
|||
{
|
||||
if (MainTable)
|
||||
MainTable->Message(1008, time_now);
|
||||
pinball::InfoTextBox->Display(pinball::get_rc_string(translation_id_e::STRING123), -1.0);
|
||||
pinball::InfoTextBox->Display(pinball::get_rc_string(Msg::STRING123), -1.0);
|
||||
midi::music_stop();
|
||||
Sound::Deactivate();
|
||||
}
|
||||
|
@ -381,12 +381,12 @@ void pb::pause_continue()
|
|||
if (game_mode == GameModes::GameOver)
|
||||
{
|
||||
textTime = -1.0;
|
||||
text = pinball::get_rc_string(translation_id_e::STRING125);
|
||||
text = pinball::get_rc_string(Msg::STRING125);
|
||||
}
|
||||
else
|
||||
{
|
||||
textTime = 5.0;
|
||||
text = pinball::get_rc_string(translation_id_e::STRING124);
|
||||
text = pinball::get_rc_string(Msg::STRING124);
|
||||
}
|
||||
pinball::InfoTextBox->Display(text, textTime);
|
||||
}
|
||||
|
@ -481,7 +481,7 @@ void pb::InputDown(GameInput input)
|
|||
case 'h':
|
||||
{
|
||||
high_score_struct entry{ {0}, 1000000000 };
|
||||
strncpy(entry.Name, pinball::get_rc_string(translation_id_e::STRING127), sizeof entry.Name - 1);
|
||||
strncpy(entry.Name, pinball::get_rc_string(Msg::STRING127), sizeof entry.Name - 1);
|
||||
high_score::show_and_set_high_score_dialog({ entry, 1 });
|
||||
break;
|
||||
}
|
||||
|
@ -553,10 +553,10 @@ void pb::end_game()
|
|||
const char* playerName = "Player";
|
||||
|
||||
switch(scoreIndex[i]) {
|
||||
case 0: playerName = pinball::get_rc_string(translation_id_e::STRING127); break;
|
||||
case 1: playerName = pinball::get_rc_string(translation_id_e::STRING128); break;
|
||||
case 2: playerName = pinball::get_rc_string(translation_id_e::STRING129); break;
|
||||
case 3: playerName = pinball::get_rc_string(translation_id_e::STRING130); break;
|
||||
case 0: playerName = pinball::get_rc_string(Msg::STRING127); break;
|
||||
case 1: playerName = pinball::get_rc_string(Msg::STRING128); break;
|
||||
case 2: playerName = pinball::get_rc_string(Msg::STRING129); break;
|
||||
case 3: playerName = pinball::get_rc_string(Msg::STRING130); break;
|
||||
}
|
||||
|
||||
strncpy(entry.Name, playerName, sizeof entry.Name - 1);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "translations.h"
|
||||
#include "winmain.h"
|
||||
|
||||
int LoadStringAlt(translation_id_e uID, LPSTR lpBuffer, int cchBufferMax)
|
||||
int LoadStringAlt(Msg uID, LPSTR lpBuffer, int cchBufferMax)
|
||||
{
|
||||
const char* text = translations::get_translation(uID);
|
||||
|
||||
|
@ -20,7 +20,7 @@ int pinball::LeftShift = -1;
|
|||
int pinball::RightShift = -1;
|
||||
std::string pinball::BasePath;
|
||||
|
||||
char* pinball::get_rc_string(translation_id_e uID)
|
||||
char* pinball::get_rc_string(Msg uID)
|
||||
{
|
||||
char* result = &getRcBuffer[256 * rc_string_slot];
|
||||
if (!LoadStringAlt(uID, &getRcBuffer[256 * rc_string_slot], 255))
|
||||
|
@ -31,7 +31,7 @@ char* pinball::get_rc_string(translation_id_e uID)
|
|||
return result;
|
||||
}
|
||||
|
||||
int pinball::get_rc_int(translation_id_e uID, int* dst)
|
||||
int pinball::get_rc_int(Msg uID, int* dst)
|
||||
{
|
||||
char buffer[255];
|
||||
int result = LoadStringAlt(uID, buffer, 255);
|
||||
|
|
|
@ -14,8 +14,8 @@ public:
|
|||
static int LeftShift;
|
||||
static std::string BasePath;
|
||||
|
||||
static char* get_rc_string(translation_id_e uID);
|
||||
static int get_rc_int(translation_id_e uID, int* dst);
|
||||
static char* get_rc_string(Msg uID);
|
||||
static int get_rc_int(Msg uID, int* dst);
|
||||
static std::string make_path_name(const std::string& fileName);
|
||||
private:
|
||||
static char getRcBuffer[256 * 6];
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
enum class translation_id_e
|
||||
enum class Msg
|
||||
{
|
||||
STRING101,
|
||||
STRING102,
|
||||
|
@ -257,11 +257,16 @@ enum class translation_id_e
|
|||
NUMBER,
|
||||
};
|
||||
|
||||
struct languageInfo {
|
||||
const char* short_name;
|
||||
const char* display_name;
|
||||
};
|
||||
|
||||
class translations {
|
||||
public:
|
||||
static std::vector<const char*> Languages;
|
||||
static const char* get_translation(translation_id_e id);
|
||||
static void set_current_language(const char* language_name);
|
||||
static const char* get_current_language();
|
||||
static const languageInfo* get_languages(size_t* languages_number);
|
||||
static const char* get_translation(Msg id);
|
||||
static void set_current_language(const char* short_name);
|
||||
static const languageInfo* get_current_language();
|
||||
static void get_glyph_range(ImVector<ImWchar>* ranges);
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@ int winmain::WinMain(LPCSTR lpCmdLine)
|
|||
// SDL window
|
||||
SDL_Window* window = SDL_CreateWindow
|
||||
(
|
||||
pinball::get_rc_string(translation_id_e::STRING139),
|
||||
pinball::get_rc_string(Msg::STRING139),
|
||||
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
|
||||
800, 556,
|
||||
SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE
|
||||
|
@ -390,34 +390,34 @@ void winmain::RenderUi()
|
|||
fullscrn::window_size_changed();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu(pinball::get_rc_string(translation_id_e::Menu1_Game)))
|
||||
if (ImGui::BeginMenu(pinball::get_rc_string(Msg::Menu1_Game)))
|
||||
{
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_New_Game), "F2"))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_New_Game), "F2"))
|
||||
{
|
||||
new_game();
|
||||
}
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_Launch_Ball), nullptr, false, LaunchBallEnabled))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_Launch_Ball), nullptr, false, LaunchBallEnabled))
|
||||
{
|
||||
end_pause();
|
||||
pb::launch_ball();
|
||||
}
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_Pause_Resume_Game), "F3"))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_Pause_Resume_Game), "F3"))
|
||||
{
|
||||
pause();
|
||||
}
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_High_Scores), nullptr, false, HighScoresEnabled))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_High_Scores), nullptr, false, HighScoresEnabled))
|
||||
{
|
||||
pause(false);
|
||||
pb::high_scores();
|
||||
}
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_Demo), nullptr, DemoActive))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_Demo), nullptr, DemoActive))
|
||||
{
|
||||
end_pause();
|
||||
pb::toggle_demo();
|
||||
}
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_Exit)))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_Exit)))
|
||||
{
|
||||
SDL_Event event{SDL_QUIT};
|
||||
SDL_PushEvent(&event);
|
||||
|
@ -425,53 +425,57 @@ void winmain::RenderUi()
|
|||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu(pinball::get_rc_string(translation_id_e::Menu1_Options)))
|
||||
if (ImGui::BeginMenu(pinball::get_rc_string(Msg::Menu1_Options)))
|
||||
{
|
||||
if (ImGui::MenuItem("Show Menu", "F9", Options.ShowMenu))
|
||||
{
|
||||
options::toggle(Menu1::Show_Menu);
|
||||
}
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_Full_Screen), "F4", Options.FullScreen))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_Full_Screen), "F4", Options.FullScreen))
|
||||
{
|
||||
options::toggle(Menu1::Full_Screen);
|
||||
}
|
||||
if (ImGui::BeginMenu(pinball::get_rc_string(translation_id_e::Menu1_Select_Players)))
|
||||
if (ImGui::BeginMenu(pinball::get_rc_string(Msg::Menu1_Select_Players)))
|
||||
{
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_1Player), nullptr, Options.Players == 1))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_1Player), nullptr, Options.Players == 1))
|
||||
{
|
||||
options::toggle(Menu1::OnePlayer);
|
||||
new_game();
|
||||
}
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_2Players), nullptr, Options.Players == 2))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_2Players), nullptr, Options.Players == 2))
|
||||
{
|
||||
options::toggle(Menu1::TwoPlayers);
|
||||
new_game();
|
||||
}
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_3Players), nullptr, Options.Players == 3))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_3Players), nullptr, Options.Players == 3))
|
||||
{
|
||||
options::toggle(Menu1::ThreePlayers);
|
||||
new_game();
|
||||
}
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_4Players), nullptr, Options.Players == 4))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_4Players), nullptr, Options.Players == 4))
|
||||
{
|
||||
options::toggle(Menu1::FourPlayers);
|
||||
new_game();
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_Player_Controls), "F8"))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_Player_Controls), "F8"))
|
||||
{
|
||||
pause(false);
|
||||
options::ShowControlDialog();
|
||||
}
|
||||
if (ImGui::BeginMenu("Language"))
|
||||
{
|
||||
std::string current_language = translations::get_current_language();
|
||||
for(const auto& item : translations::Languages)
|
||||
std::string current_language = translations::get_current_language()->short_name;
|
||||
size_t language_number;
|
||||
const languageInfo* languages = translations::get_languages(&language_number);
|
||||
|
||||
for(size_t i = 0; i < language_number; i++)
|
||||
{
|
||||
if (ImGui::MenuItem(item, nullptr, current_language == item))
|
||||
const languageInfo* item = &languages[i];
|
||||
if (ImGui::MenuItem(item->display_name, nullptr, current_language == item->short_name))
|
||||
{
|
||||
translations::set_current_language(item);
|
||||
translations::set_current_language(item->short_name);
|
||||
winmain::Restart();
|
||||
}
|
||||
}
|
||||
|
@ -503,7 +507,7 @@ void winmain::RenderUi()
|
|||
}
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_Music), "F6", Options.Music))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_Music), "F6", Options.Music))
|
||||
{
|
||||
options::toggle(Menu1::Music);
|
||||
}
|
||||
|
@ -578,15 +582,15 @@ void winmain::RenderUi()
|
|||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu(pinball::get_rc_string(translation_id_e::Menu1_Table_Resolution)))
|
||||
if (ImGui::BeginMenu(pinball::get_rc_string(Msg::Menu1_Table_Resolution)))
|
||||
{
|
||||
char buffer[20]{};
|
||||
translation_id_e resolutionStringId = translation_id_e::Menu1_UseMaxResolution_640x480;
|
||||
Msg resolutionStringId = Msg::Menu1_UseMaxResolution_640x480;
|
||||
|
||||
switch(fullscrn::GetMaxResolution()) {
|
||||
case 0: resolutionStringId = translation_id_e::Menu1_UseMaxResolution_640x480; break;
|
||||
case 1: resolutionStringId = translation_id_e::Menu1_UseMaxResolution_800x600; break;
|
||||
case 2: resolutionStringId = translation_id_e::Menu1_UseMaxResolution_1024x768; break;
|
||||
case 0: resolutionStringId = Msg::Menu1_UseMaxResolution_640x480; break;
|
||||
case 1: resolutionStringId = Msg::Menu1_UseMaxResolution_800x600; break;
|
||||
case 2: resolutionStringId = Msg::Menu1_UseMaxResolution_1024x768; break;
|
||||
}
|
||||
|
||||
auto maxResText = pinball::get_rc_string(resolutionStringId);
|
||||
|
@ -617,7 +621,7 @@ void winmain::RenderUi()
|
|||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenu(pinball::get_rc_string(translation_id_e::Menu1_Help)))
|
||||
if (ImGui::BeginMenu(pinball::get_rc_string(Msg::Menu1_Help)))
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
if (ImGui::MenuItem("ImGui Demo", nullptr, ShowImGuiDemo))
|
||||
|
@ -676,7 +680,7 @@ void winmain::RenderUi()
|
|||
}
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(translation_id_e::Menu1_About_Pinball)))
|
||||
if (ImGui::MenuItem(pinball::get_rc_string(Msg::Menu1_About_Pinball)))
|
||||
{
|
||||
pause(false);
|
||||
ShowAboutDialog = true;
|
||||
|
@ -977,8 +981,8 @@ void winmain::memalloc_failure()
|
|||
{
|
||||
midi::music_stop();
|
||||
Sound::Close();
|
||||
const char* caption = pinball::get_rc_string(translation_id_e::STRING270);
|
||||
const char* text = pinball::get_rc_string(translation_id_e::STRING279);
|
||||
const char* caption = pinball::get_rc_string(Msg::STRING270);
|
||||
const char* text = pinball::get_rc_string(Msg::STRING279);
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, caption, text, MainWindow);
|
||||
std::exit(1);
|
||||
}
|
||||
|
@ -988,13 +992,13 @@ void winmain::a_dialog()
|
|||
if (ShowAboutDialog == true)
|
||||
{
|
||||
ShowAboutDialog = false;
|
||||
ImGui::OpenPopup(pinball::get_rc_string(translation_id_e::STRING204));
|
||||
ImGui::OpenPopup(pinball::get_rc_string(Msg::STRING204));
|
||||
}
|
||||
|
||||
bool unused_open = true;
|
||||
if (ImGui::BeginPopupModal(pinball::get_rc_string(translation_id_e::STRING204), &unused_open, ImGuiWindowFlags_AlwaysAutoResize))
|
||||
if (ImGui::BeginPopupModal(pinball::get_rc_string(Msg::STRING204), &unused_open, ImGuiWindowFlags_AlwaysAutoResize))
|
||||
{
|
||||
ImGui::TextUnformatted(pinball::get_rc_string(translation_id_e::STRING139));
|
||||
ImGui::TextUnformatted(pinball::get_rc_string(Msg::STRING139));
|
||||
ImGui::TextUnformatted("Original game by Cinematronics, Microsoft");
|
||||
ImGui::Separator();
|
||||
|
||||
|
|
Loading…
Reference in New Issue