mirror of
https://github.com/kevinbentley/Descent3.git
synced 2026-04-04 02:00:04 -04:00
Properly format/use variadic macros
This commit is contained in:
@@ -294,7 +294,7 @@ ct_config_data lnxgameController::get_controller_value(ct_type type_req) {
|
||||
case ctMouseButton:
|
||||
for (j = 0; j < CT_MAX_BUTTONS; j++) {
|
||||
if (ddio_MouseBtnUpCount(j)) {
|
||||
// mprintf((0, "MseBtn %d down\n", j));
|
||||
// mprintf(0, "MseBtn %d down\n", j);
|
||||
val = MAKE_CONFIG_DATA(CONTROLLER_CTL_INFO(1, NULL_CONTROLLER), CONTROLLER_CTL_VALUE(j + 1, NULL_BINDING));
|
||||
return val;
|
||||
}
|
||||
@@ -386,13 +386,13 @@ ct_config_data lnxgameController::get_controller_value(ct_type type_req) {
|
||||
}
|
||||
if (m_ControlList[i].flags & CTF_Y_AXIS) {
|
||||
pos = get_axis_value(i, CT_Y_AXIS, ctAnalog);
|
||||
// mprintf((0, "y=%.2f ", pos));
|
||||
// mprintf(0, "y=%.2f ", pos);
|
||||
if (fabs(pos) >= 0.90f)
|
||||
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_Y_AXIS, NULL_BINDING));
|
||||
}
|
||||
if (m_ControlList[i].flags & CTF_X_AXIS) {
|
||||
pos = get_axis_value(i, CT_X_AXIS, ctAnalog);
|
||||
// mprintf((0, "x=%.2f\n", pos));
|
||||
// mprintf(0, "x=%.2f\n", pos);
|
||||
if (fabs(pos) >= 0.90f)
|
||||
val = MAKE_CONFIG_DATA(ctl, CONTROLLER_CTL_VALUE(CT_X_AXIS, NULL_BINDING));
|
||||
}
|
||||
@@ -815,7 +815,7 @@ void lnxgameController::extctl_getpos(int id) {
|
||||
if ((ji.buttons & (1 << i)) && !(m_ExtCtlStates[id].buttons & (1 << i))) {
|
||||
m_ExtCtlStates[id].btnpresses[i]++;
|
||||
m_ExtCtlStates[id].btnstarts[i] = timer_val;
|
||||
// mprintf((0, "Start time for %d = %f\n", i, timer_val));
|
||||
// mprintf(0, "Start time for %d = %f\n", i, timer_val);
|
||||
}
|
||||
|
||||
if (ji.buttons & (1 << i)) // if button is down
|
||||
@@ -917,7 +917,7 @@ bool lnxgameController::enum_controllers() {
|
||||
m_ControlList[num_devs].sensmod[i] = 1.0f;
|
||||
}
|
||||
m_ControlList[num_devs].deadzone = JOY_DEADZONE;
|
||||
mprintf((0, "Controller %s found.\n", jc.name));
|
||||
mprintf(0, "Controller %s found.\n", jc.name);
|
||||
|
||||
// okay, now search for a "****.ctl" file in the current directory
|
||||
parse_ctl_file(num_devs, jc.name);
|
||||
@@ -1101,7 +1101,7 @@ float lnxgameController::get_button_value(int8_t controller, ct_format format, u
|
||||
break;
|
||||
|
||||
default:
|
||||
mprintf((1, "gameController::button unsupported format for function\n"));
|
||||
mprintf(1, "gameController::button unsupported format for function\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@@ -1167,7 +1167,7 @@ float lnxgameController::get_axis_value(int8_t controller, uint8_t axis, ct_form
|
||||
normalizer = ctldev->normalizer[axis] * m_frame_time;
|
||||
nullzone = MOUSE_DEADZONE;
|
||||
if (axis == CT_X_AXIS) {
|
||||
// mprintf_at((4, 4, 0, "m_dX:%03d normal:%03.2f", (int)axisval, normalizer));
|
||||
// mprintf_at(4, 4, 0, "m_dX:%03d normal:%03.2f", (int)axisval, normalizer);
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -1204,7 +1204,7 @@ float lnxgameController::get_axis_value(int8_t controller, uint8_t axis, ct_form
|
||||
val = val - (float)1.0;
|
||||
} else {
|
||||
val = (float)0.0;
|
||||
mprintf((1, "gameController::axis unsupported format for function.\n"));
|
||||
mprintf(1, "gameController::axis unsupported format for function.\n");
|
||||
}
|
||||
|
||||
ct_packet key_slide1, key_bank;
|
||||
@@ -1338,7 +1338,7 @@ float lnxgameController::get_pov_value(int8_t controller, ct_format format, uint
|
||||
break;
|
||||
|
||||
default:
|
||||
mprintf((1, "gameController::pov unsupported format for function\n"));
|
||||
mprintf(1, "gameController::pov unsupported format for function\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@@ -1366,7 +1366,7 @@ float lnxgameController::get_key_value(int key, ct_format format) {
|
||||
break;
|
||||
|
||||
default:
|
||||
mprintf((1, "gameController::key unsupported format for function\n"));
|
||||
mprintf(1, "gameController::key unsupported format for function\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
|
||||
Reference in New Issue
Block a user