4 #include "../Networking.h" 5 #include "../GameClass.h" 6 #include "../Viewscreen/Viewscreen.h" 7 #include "RakNetStatistics.h" 10 #include "../StringUtilities.h" 18 HUD.EnableKeyboardInput(
true);
20 RECT rect; rect.left = rect.right = 0; rect.top = rect.bottom = -1;
51 if (activetab < 0 || activetab >= MAX_TAB)
53 logger->
Log(
"ConfigurationDialog::UpdateMenu activetab was out-of-bounds", Logger::Level::Debug);
59 if (windowed ==
nullptr)
60 logger->
Log(
"ConfigurationDialog::UpdateMenu DXUTSETTINGSDLG_WINDOWED is nullptr", Logger::Level::Debug);
64 if (full_screen ==
nullptr)
65 logger->
Log(
"ConfigurationDialog::UpdateMenu DXUTSETTINGSDLG_FULLSCREEN is nullptr", Logger::Level::Debug);
75 rect.top =
static_cast<LONG
>(y + tracked->y);
76 rect.left =
static_cast<LONG
>(500.0f + tracked->x);
77 rect.bottom = rect.right = 0;
95 swprintf_s(str, 6, L
"%+i", value);
100 value = (-value + 1000) / 2;
103 swprintf_s(str, 6, L
"%+i", value);
134 const float cpu = BASS_GetCPU();
148 else if (pingtime > 100)
156 const float fps = DXUTGetFPS();
159 else if (fps < 42.0f)
174 rect.top =
static_cast<long>(tracked->y) + 2;
175 rect.left =
static_cast<long>(tracked->x) + 5;
182 sprintf_s(msg, 99,
"Actual bytes per second sent %llu", s->valueOverLastSecond[RakNet::ACTUAL_BYTES_SENT]);
186 sprintf_s(msg, 99,
"Actual bytes per second received %llu", s->valueOverLastSecond[RakNet::ACTUAL_BYTES_RECEIVED]);
190 sprintf_s(msg, 99,
"Message bytes per second sent %llu", s->valueOverLastSecond[RakNet::USER_MESSAGE_BYTES_SENT]);
194 sprintf_s(msg, 99,
"Message bytes per second resent %llu", s->valueOverLastSecond[RakNet::USER_MESSAGE_BYTES_RESENT]);
198 sprintf_s(msg, 99,
"Message bytes per second pushed %llu", s->valueOverLastSecond[RakNet::USER_MESSAGE_BYTES_PUSHED]);
202 sprintf_s(msg, 99,
"Message bytes per second returned %llu", s->valueOverLastSecond[RakNet::USER_MESSAGE_BYTES_RECEIVED_PROCESSED]);
206 sprintf_s(msg, 99,
"Message bytes per second ignored %llu", s->valueOverLastSecond[RakNet::USER_MESSAGE_BYTES_RECEIVED_IGNORED]);
210 sprintf_s(msg, 99,
"Total bytes sent %llu", s->runningTotal[RakNet::ACTUAL_BYTES_SENT]);
214 sprintf_s(msg, 99,
"Total bytes received %llu", s->runningTotal[RakNet::ACTUAL_BYTES_RECEIVED]);
218 sprintf_s(msg, 99,
"Total message bytes sent %llu", s->runningTotal[RakNet::USER_MESSAGE_BYTES_SENT]);
222 sprintf_s(msg, 99,
"Total message bytes resent %llu", s->runningTotal[RakNet::USER_MESSAGE_BYTES_RESENT]);
226 sprintf_s(msg, 99,
"Total message bytes pushed %llu", s->runningTotal[RakNet::USER_MESSAGE_BYTES_PUSHED]);
230 sprintf_s(msg, 99,
"Total message bytes returned %llu", s->runningTotal[RakNet::USER_MESSAGE_BYTES_RECEIVED_PROCESSED]);
234 sprintf_s(msg, 99,
"Total message bytes ignored %llu", s->runningTotal[RakNet::USER_MESSAGE_BYTES_RECEIVED_IGNORED]);
238 sprintf_s(msg, 99,
"Messages in send buffer, by priority %i,%i,%i,%i", s->messageInSendBuffer[IMMEDIATE_PRIORITY], s->messageInSendBuffer[HIGH_PRIORITY], s->messageInSendBuffer[MEDIUM_PRIORITY], s->messageInSendBuffer[LOW_PRIORITY]);
242 sprintf_s(msg, 99,
"Bytes in send buffer, by priority %.0f,%.0f,%.0f,%.0f", s->bytesInSendBuffer[IMMEDIATE_PRIORITY], s->bytesInSendBuffer[HIGH_PRIORITY], s->bytesInSendBuffer[MEDIUM_PRIORITY], s->bytesInSendBuffer[LOW_PRIORITY]);
246 sprintf_s(msg, 99,
"Messages in resend buffer %i", s->messagesInResendBuffer);
250 sprintf_s(msg, 99,
"Bytes in resend buffer %llu", s->bytesInResendBuffer);
254 sprintf_s(msg, 99,
"Current packet loss %.1f%%", s->packetlossLastSecond*100.0f);
258 sprintf_s(msg, 99,
"Average packet loss %.1f%%", s->packetlossTotal*100.0f);
262 sprintf_s(msg, 99,
"Elapsed connection time in seconds %llu", (RakNet::GetTimeUS() - s->connectionStartTime) / 1000000);
266 if (s->BPSLimitByCongestionControl != 0)
268 sprintf_s(msg, 99,
"Send capacity %llu bytes per second (%.0f%%)", s->BPSLimitByCongestionControl, 100.0f * s->valueOverLastSecond[RakNet::ACTUAL_BYTES_SENT] / s->BPSLimitByCongestionControl);
273 if (s->BPSLimitByOutgoingBandwidthLimit != 0)
275 sprintf_s(msg, 99,
"Send limit %llu (%.0f%%)", s->BPSLimitByOutgoingBandwidthLimit, 100.0f * s->valueOverLastSecond[RakNet::ACTUAL_BYTES_SENT] / s->BPSLimitByOutgoingBandwidthLimit);
313 HUD.GetComboBox(control)->SetSelectedByIndex(config->
axis);
336 #pragma region Interface 339 ShellExecuteW(
nullptr,
nullptr, L
"https://www.risetvp.com/Keycard",
nullptr,
nullptr, SW_SHOW);
343 ShellExecuteW(
nullptr,
nullptr, L
"https://portal.risetvp.com",
nullptr,
nullptr, SW_SHOW);
347 if (nEvent == EVENT_COMBOBOX_SELECTION_CHANGED)
377 if (maxScale > xScale * 1.5f)
378 maxScale = xScale * 1.5f;
379 if (maxScale > yScale * 1.5f)
380 maxScale = yScale * 1.5f;
421 void* pData = cfd->
HUD.GetComboBox(nControlID)->GetSelectedItem()->pData;
423 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
424 if (selectedIndex > 0)
430 if (selectedIndex == 0)
432 inputConfig->
axis = 0;
447 cfd->
HUD.GetComboBox(nControlID + 1)->SetEnabled(selectedIndex > 0);
449 CDXUTCheckBox* splitCheckbox = cfd->
HUD.GetCheckBox(nControlID + 3);
452 cfd->
HUD.GetCheckBox(nControlID + 2)->SetEnabled(selectedIndex > 0);
453 splitCheckbox->SetEnabled(selectedIndex > 0);
460 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
467 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
474 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
481 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
488 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
495 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
502 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
509 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
516 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
523 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
530 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
537 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
544 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
551 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
558 const int selectedIndex = cfd->
HUD.GetComboBox(nControlID)->GetSelectedIndex();
698 if (nEvent == EVENT_COMBOBOX_SELECTION_CHANGED)
700 CDXUTComboBox* cdxut_combo_box = cfd->
HUD.GetComboBox(nControlID);
703 const int selected_index = cdxut_combo_box->GetSelectedIndex();
776 for (
int i = 0; i <
vphelpC; i++)
781 SClientPacket outpacket = SClientPacket();
784 outpacket.f_x =
static_cast<float>(i);
785 outpacket.f_y = 2.0f;
786 outpacket.f_z = 0.0f;
787 outpacket.f_w = 0.0f;
795 for (
int i = 0; i <
vphelpC; i++)
800 SClientPacket outpacket = SClientPacket();
803 outpacket.f_x =
static_cast<float>(i);
804 outpacket.f_y = 3.0f;
805 outpacket.f_z = 0.0f;
806 outpacket.f_w = 0.0f;
827 #pragma region Interface 947 #pragma region Account
InputConfig inputConfigLeftToeBrake
void ShowStatus(InputConfig *input_config, int y, D3DXVECTOR3 *tracked, bool engine) const
std::vector< DIDEVICEINSTANCE > deviceList
HRESULT Poll(InputConfig *config, long *value, DIJOYSTATE *js) const
void GetVersionText(WCHAR *, int size) const
void SendToServer(void *pData, DWORD dwSize, bool bGuaranteed, PacketOrdering order=ORDERING_NONE) const
void InitializeDevice(InputConfig *config, std::string control)
InformationDialog * informationDialog
std::vector< GUID > deviceGuids
SoundConfig soundConfigLegacy
InputConfig inputConfigGas
void UTF8_to_WChar(wchar_t *res, const char *string)
InputConfig inputConfigRoll
InputConfig inputConfigLookVertical
void ToggleFullScreen(bool goFullScreen)
void InitDevice(SoundConfig *deviceConfig)
RakNet::RakNetStatistics * GetStatistics() const
InputConfig inputConfigThrustLeft
CDXUTDialogResourceManager g_DialogResourceManager
InputConfig inputConfigThrustRight
void CreateAxisDropdown(int control, int y, InputConfig *config)
void ChangeCockpit(bool force)
std::vector< std::string > deviceNames
InputConfig inputConfigPitchTrim
static void OnDeviceReset()
WCHAR msgbartext[HELP_SIZE]
short tabusedefaultlang[MAX_TAB]
void LoadPeopleSounds() const
InputConfig inputConfigPitch
SoundConfig soundConfigComms
InputConfig inputConfigBrake
void ChangeVolume(SoundConfig *config, float modVolume)
void TriggerWelcomeApt2() const
static void RestoreDefaults()
void Draw(D3DXVECTOR3 *tracked)
void AddLanguageOptions(UIControlIds controlId, CDXUTDialog *HUD) const
void Log(const char *msg, Level level=Info, int errorCode=0)
InputConfig inputConfigRightToeBrake
ID3DXSprite * g_pTextSprite
SoundConfig soundConfigRadio
static void UpdateInput(InputConfig *config)
InputConfig inputConfigWalkVertical
InputConfig inputConfigWalkLateral
D3DXVECTOR3 windowdefaultlocation
static void CALLBACK DialogCallback(UINT nEvent, int nControlID, CDXUTControl *pControl, void *pUserContext)
std::wstring strings[L_ENUMERATION]
InputConfig inputConfigYaw
void AddToCallStack(const char *msg)
SoundConfig soundConfigComputer
ConfigurationDialog(short id)
void RequestVerbiage(int helpId) const
void LoadSounds(short instage)
InputConfig inputConfigSteer
InputConfig inputConfigLookLateral
void UpdateMenu(short tab)