mirror of
https://github.com/DarwinAnim8or/DarkflameServerNostalgiaMax.git
synced 2025-12-21 13:29:37 -06:00
69 lines
2.9 KiB
C++
69 lines
2.9 KiB
C++
#include "CDControlSchemesTable.h"
|
|
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.927075
|
|
//DO NOT EDIT THIS FILE MANUALLY!
|
|
|
|
CDControlSchemesTable::CDControlSchemesTable() {
|
|
unsigned int size = 0;
|
|
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ControlSchemes");
|
|
while (!tableSize.eof()) {
|
|
size = tableSize.getIntField(0, 0);
|
|
tableSize.nextRow();
|
|
}
|
|
|
|
tableSize.finalize();
|
|
this->m_entries.reserve(size);
|
|
|
|
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ControlSchemes");
|
|
while (!tableData.eof()) {
|
|
CDControlSchemes entry;
|
|
entry.control_scheme = tableData.getIntField(0, int{});
|
|
entry.scheme_name = tableData.getStringField(1, std::string{}.c_str());
|
|
entry.rotation_speed = tableData.getFloatField(2, float{});
|
|
entry.walk_forward_speed = tableData.getFloatField(3, float{});
|
|
entry.walk_backward_speed = tableData.getFloatField(4, float{});
|
|
entry.walk_strafe_speed = tableData.getFloatField(5, float{});
|
|
entry.walk_strafe_forward_speed = tableData.getFloatField(6, float{});
|
|
entry.walk_strafe_backward_speed = tableData.getFloatField(7, float{});
|
|
entry.run_backward_speed = tableData.getFloatField(8, float{});
|
|
entry.run_strafe_speed = tableData.getFloatField(9, float{});
|
|
entry.run_strafe_forward_speed = tableData.getFloatField(10, float{});
|
|
entry.run_strafe_backward_speed = tableData.getFloatField(11, float{});
|
|
entry.keyboard_zoom_sensitivity = tableData.getFloatField(12, float{});
|
|
entry.keyboard_pitch_sensitivity = tableData.getFloatField(13, float{});
|
|
entry.keyboard_yaw_sensitivity = tableData.getFloatField(14, float{});
|
|
entry.mouse_zoom_wheel_sensitivity = tableData.getFloatField(15, float{});
|
|
entry.x_mouse_move_sensitivity_modifier = tableData.getFloatField(16, float{});
|
|
entry.y_mouse_move_sensitivity_modifier = tableData.getFloatField(17, float{});
|
|
entry.freecam_speed_modifier = tableData.getFloatField(18, float{});
|
|
entry.freecam_slow_speed_multiplier = tableData.getFloatField(19, float{});
|
|
entry.freecam_fast_speed_multiplier = tableData.getFloatField(20, float{});
|
|
entry.freecam_mouse_modifier = tableData.getFloatField(21, float{});
|
|
entry.gamepad_pitch_rot_sensitivity = tableData.getFloatField(22, float{});
|
|
entry.gamepad_yaw_rot_sensitivity = tableData.getFloatField(23, float{});
|
|
entry.gamepad_trigger_sensitivity = tableData.getFloatField(24, float{});
|
|
this->m_entries.push_back(entry);
|
|
tableData.nextRow();
|
|
}
|
|
|
|
tableData.finalize();
|
|
}
|
|
|
|
CDControlSchemesTable::~CDControlSchemesTable() {
|
|
}
|
|
|
|
std::string CDControlSchemesTable::GetName(void) const {
|
|
return "ControlSchemes";
|
|
}
|
|
|
|
std::vector<CDControlSchemes> CDControlSchemesTable::Query(std::function<bool(CDControlSchemes)> predicate) {
|
|
std::vector<CDControlSchemes> data = cpplinq::from(this->m_entries)
|
|
>> cpplinq::where(predicate)
|
|
>> cpplinq::to_vector();
|
|
|
|
return data;
|
|
}
|
|
|
|
std::vector<CDControlSchemes> CDControlSchemesTable::GetEntries(void) const {
|
|
return this->m_entries;
|
|
}
|