Merge branch 'frogbull/miami-hints' into 'main'

Miami Hints (Dreamcast Hints for Miami like in Liberty)

See merge request skmp/dca3-game!93
This commit is contained in:
Stefanos Kornilios Mitsis Poiitidis
2025-03-31 20:29:56 +00:00

View File

@@ -2032,6 +2032,635 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
return NULL; return NULL;
} }
#ifdef RW_DC
wchar *CControllerConfigManager::GetControllerSettingTextKeyBoard(e_ControllerAction action, eControllerType type)
{
// The Hints Messages use GetControllerSettingTextKeyBoard to get the Action Key associated for each Action
// As we manualy set them for CONTROL_CLASSIC and CONTROL_STANDARD we don't need to take into account a reassignment by the player
// [!] Please note that for the moment it's the same Layout for both CONTROL_CLASSIC and CONTROL_STANDARD
// CONTROL_STANDARD : more like GTA 3 on Original Xbox
// CONTROL_CLASSIC : more like GTA: Liberty City Stories on PlayStation Portable
//static wchar ActionText[50];
static wchar ActionText[24];
for (int32 i = 0; i < ARRAY_SIZE(ActionText); i++)
ActionText[i] = '\0';
const int iLimitCopy = ARRAY_SIZE(ActionText)-1;
static const char* Dreamcast_A = "A";
static const char* Dreamcast_B = "B";
static const char* Dreamcast_X = "X";
static const char* Dreamcast_Y = "Y";
static const char* Dreamcast_LeftTrigger = "Left Trigger";
static const char* Dreamcast_RightTrigger = "Right Trigger";
static const char* Dreamcast_Start = "Start";
static const char* Dreamcast_DPad_Up = "D-Pad Up";
static const char* Dreamcast_DPad_Down = "D-Pad Down";
static const char* Dreamcast_DPad_Left = "D-Pad Left";
static const char* Dreamcast_DPad_Right = "D-Pad Right";
static const char* Dreamcast_Stick_Up = "Joystick Up";
static const char* Dreamcast_Stick_Down = "Joystick Down";
static const char* Dreamcast_Stick_Left = "Joystick Left";
static const char* Dreamcast_Stick_Right = "Joystick Right";
static const char* Dreamcast_VehicleLookLeft = "A + Joystick Left";
static const char* Dreamcast_VehicleLookRight = "A + Joystick Right";
static const char* Dreamcast_CenterCamera = "Double click X";
static const char* Dreamcast_CameraUp = "X + Joystick Up";
static const char* Dreamcast_CameraDown = "X + Joystick Down";
static const char* Dreamcast_CameraLeft = "X + Joystick Left";
static const char* Dreamcast_CameraRight = "X + Joystick Right";
static const char* Dreamcast_LookBehind = "Right trigger + Left trigger";
static const char* Dreamcast_NotAssigned = "Not Assigned";
//Dual sticks
static const char* LefAnalog_Up = "Left Stick Up";
static const char* LefAnalog_Down = "Left Stick Down";
static const char* LefAnalog_Left = "Left Stick Left";
static const char* LefAnalog_Right = "Left Stick Right";
static const char* RightAnalog_Up = "Right Stick Up";
static const char* RightAnalog_Down = "Right Stick Down";
static const char* RightAnalog_Left = "Right Stick Left";
static const char* RightAnalog_Right = "Right Stick Right";
//Xbox Specific
static const char* Xbox_VehicleLookLeft = "LB";
static const char* Xbox_VehicleLookRight = "RB";
static const char* Xbox_VehicleLookBehind = "RB + LB";
static const char* Xbox_Back = "Back";
//PS2 Specific
static const char* Dreamcast_PS2_VehicleLookLeft = "B + Joystick Left";
static const char* Dreamcast_PS2_VehicleLookRight = "B + Joystick Right";
static const char* PS2_L1 = "L1";
static const char* PS2_R1 = "R1";
static const char* PS2_L2 = "L2";
static const char* PS2_R2 = "R2";
static const char* PS2_Cross = "Cross";
static const char* PS2_Square = "Square";
static const char* PS2_Circle = "Circle";
static const char* PS2_Triangle = "Triangle";
if ((CPad::GetPad(0)->Mode == 0) && (CPad::GetPad(0)->IsDualAnalog == 0)) // Standard DC controller, Xbox like bindings
{
switch (action)
{
case VEHICLE_LOOKLEFT:
for (int i = 0; (ActionText[i] = Dreamcast_VehicleLookLeft[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_LOOKRIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_VehicleLookRight[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_HORN:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_HANDBRAKE:
for (int i = 0; (ActionText[i] = Dreamcast_B[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_ENTER_EXIT:
for (int i = 0; (ActionText[i] = Dreamcast_Y[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_ACCELERATE:
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_CHANGE_RADIO_STATION: // D-Pad Right to switch RADIO on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_BRAKE:
for (int i = 0; (ActionText[i] = Dreamcast_LeftTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_SUBMISSIONS: // D-Pad Left to enable SUBMISSIONS on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_FORWARD:
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Up[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_BACK:
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_LOOKBEHIND:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_FIREWEAPON:
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_FIREWEAPON:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_WEAPON_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_WEAPON_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_LOCK_TARGET:
for (int i = 0; (ActionText[i] = Dreamcast_LeftTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_JUMPING:
for (int i = 0; (ActionText[i] = Dreamcast_B[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SPRINT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_TARGET_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_TARGET_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CENTER_CAMERA_BEHIND_PLAYER:
for (int i = 0; (ActionText[i] = Dreamcast_CenterCamera[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SNIPER_ZOOM_IN:
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SNIPER_ZOOM_OUT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_UP:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_DOWN:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETLEFT: // Not sure How to deal with that with a Single Analog as the Turret are handle by letting X (Dreamcast) pressed
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETRIGHT: // Not sure How to deal with that with a Single Analog as the Turret are handle by letting X (Dreamcast) pressed
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETUP: // Remark: VEHICLE_TURRETUP and VEHICLE_TURRETDOWN are used to shift your weight on a bike in Vice City
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Up[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETDOWN: // Remark: VEHICLE_TURRETUP and VEHICLE_TURRETDOWN are used to shift your weight on a bike in Vice City
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case CAMERA_CHANGE_VIEW_ALL_SITUATIONS:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Up[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_LOOKBEHIND:
for (int i = 0; (ActionText[i] = Dreamcast_LookBehind[i]) != '\0' && i < iLimitCopy; i++);
break;
case NETWORK_TALK: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case _CONTROLLERACTION_36: // What is that???
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_DPAD: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case SWITCH_DEBUG_CAM_ON: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case TAKE_SCREEN_SHOT: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case SHOW_MOUSE_POINTER_TOGGLE: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case MAX_CONTROLLERACTIONS: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
default:
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
}
}
if ((CPad::GetPad(0)->Mode == 0) && (CPad::GetPad(0)->IsDualAnalog == 1)) // Dual analog, Xbox like bindings
{
switch (action)
{
case VEHICLE_LOOKLEFT:
for (int i = 0; (ActionText[i] = Xbox_VehicleLookLeft[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_LOOKRIGHT:
for (int i = 0; (ActionText[i] = Xbox_VehicleLookRight[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_HORN:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_HANDBRAKE:
for (int i = 0; (ActionText[i] = Dreamcast_B[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_ENTER_EXIT:
for (int i = 0; (ActionText[i] = Dreamcast_Y[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_ACCELERATE:
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_CHANGE_RADIO_STATION: // D-Pad Right to switch RADIO on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_BRAKE:
for (int i = 0; (ActionText[i] = Dreamcast_LeftTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_SUBMISSIONS: // D-Pad Left to enable SUBMISSIONS on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_LEFT:
for (int i = 0; (ActionText[i] = LefAnalog_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_RIGHT:
for (int i = 0; (ActionText[i] = LefAnalog_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_FORWARD:
for (int i = 0; (ActionText[i] = LefAnalog_Up[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_BACK:
for (int i = 0; (ActionText[i] = LefAnalog_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_LOOKBEHIND:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_FIREWEAPON:
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_FIREWEAPON:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_WEAPON_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_WEAPON_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_LOCK_TARGET:
for (int i = 0; (ActionText[i] = Dreamcast_LeftTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_JUMPING:
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SPRINT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_TARGET_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_TARGET_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CENTER_CAMERA_BEHIND_PLAYER:
for (int i = 0; (ActionText[i] = Dreamcast_CenterCamera[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SNIPER_ZOOM_IN:
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SNIPER_ZOOM_OUT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_UP:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_DOWN:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETLEFT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETRIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETUP:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETDOWN:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case CAMERA_CHANGE_VIEW_ALL_SITUATIONS:
for (int i = 0; (ActionText[i] = Xbox_Back[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_LOOKBEHIND:
for (int i = 0; (ActionText[i] = Xbox_VehicleLookBehind[i]) != '\0' && i < iLimitCopy; i++);
break;
case NETWORK_TALK: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case _CONTROLLERACTION_36: // What is that???
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_DPAD: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case SWITCH_DEBUG_CAM_ON: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case TAKE_SCREEN_SHOT: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case SHOW_MOUSE_POINTER_TOGGLE: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case MAX_CONTROLLERACTIONS: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
default:
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
}
}
if ((CPad::GetPad(0)->Mode == 1) && (CPad::GetPad(0)->IsDualAnalog == 0)) // Standard DC controller, PS2 like bindings
{
switch (action)
{
case VEHICLE_LOOKLEFT:
for (int i = 0; (ActionText[i] = Dreamcast_PS2_VehicleLookLeft[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_LOOKRIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_PS2_VehicleLookRight[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_HORN:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_HANDBRAKE:
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_ENTER_EXIT:
for (int i = 0; (ActionText[i] = Dreamcast_Y[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_ACCELERATE:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_CHANGE_RADIO_STATION: // D-Pad Right to switch RADIO on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_BRAKE:
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_SUBMISSIONS: // D-Pad Left to enable SUBMISSIONS on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_FORWARD:
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Up[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_BACK:
for (int i = 0; (ActionText[i] = Dreamcast_Stick_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_LOOKBEHIND:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_FIREWEAPON:
for (int i = 0; (ActionText[i] = Dreamcast_B[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_FIREWEAPON:
for (int i = 0; (ActionText[i] = Dreamcast_B[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_WEAPON_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_WEAPON_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_LOCK_TARGET:
for (int i = 0; (ActionText[i] = Dreamcast_RightTrigger[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_JUMPING:
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SPRINT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_TARGET_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_TARGET_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CENTER_CAMERA_BEHIND_PLAYER:
for (int i = 0; (ActionText[i] = Dreamcast_CenterCamera[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SNIPER_ZOOM_IN:
for (int i = 0; (ActionText[i] = Dreamcast_X[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SNIPER_ZOOM_OUT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_UP:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_DOWN:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETLEFT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETRIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETUP:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETDOWN:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case CAMERA_CHANGE_VIEW_ALL_SITUATIONS:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Up[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_LOOKBEHIND:
for (int i = 0; (ActionText[i] = Dreamcast_LookBehind[i]) != '\0' && i < iLimitCopy; i++);
break;
case NETWORK_TALK: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case _CONTROLLERACTION_36: // What is that???
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_DPAD: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case SWITCH_DEBUG_CAM_ON: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case TAKE_SCREEN_SHOT: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case SHOW_MOUSE_POINTER_TOGGLE: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case MAX_CONTROLLERACTIONS: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
default:
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
}
}
if ((CPad::GetPad(0)->Mode == 1) && (CPad::GetPad(0)->IsDualAnalog == 1)) // Dual Stick, PS2 like bindings
{
switch (action)
{
case VEHICLE_LOOKLEFT:
for (int i = 0; (ActionText[i] = PS2_L2[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_LOOKRIGHT:
for (int i = 0; (ActionText[i] = PS2_R2[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_HORN:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_HANDBRAKE:
for (int i = 0; (ActionText[i] = PS2_R1[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_ENTER_EXIT:
for (int i = 0; (ActionText[i] = PS2_Triangle[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_ACCELERATE:
for (int i = 0; (ActionText[i] = PS2_Cross[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_CHANGE_RADIO_STATION:
for (int i = 0; (ActionText[i] = PS2_L1[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_BRAKE:
for (int i = 0; (ActionText[i] = PS2_Square[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_SUBMISSIONS:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_LEFT:
for (int i = 0; (ActionText[i] = LefAnalog_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_RIGHT:
for (int i = 0; (ActionText[i] = LefAnalog_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_FORWARD:
for (int i = 0; (ActionText[i] = LefAnalog_Up[i]) != '\0' && i < iLimitCopy; i++);
break;
case GO_BACK:
for (int i = 0; (ActionText[i] = LefAnalog_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_LOOKBEHIND:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Down[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_FIREWEAPON:
for (int i = 0; (ActionText[i] = PS2_Circle[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_FIREWEAPON:
for (int i = 0; (ActionText[i] = PS2_Circle[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_WEAPON_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Left[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_WEAPON_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Right[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_LOCK_TARGET:
for (int i = 0; (ActionText[i] = PS2_R1[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_JUMPING:
for (int i = 0; (ActionText[i] = PS2_Square[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SPRINT:
for (int i = 0; (ActionText[i] = PS2_Circle[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_TARGET_LEFT:
for (int i = 0; (ActionText[i] = PS2_L2[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CYCLE_TARGET_RIGHT:
for (int i = 0; (ActionText[i] = PS2_R2[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_CENTER_CAMERA_BEHIND_PLAYER:
for (int i = 0; (ActionText[i] = Dreamcast_CenterCamera[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SNIPER_ZOOM_IN:
for (int i = 0; (ActionText[i] = PS2_Square[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_SNIPER_ZOOM_OUT:
for (int i = 0; (ActionText[i] = PS2_Cross[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_LEFT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_RIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_UP:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case PED_1RST_PERSON_LOOK_DOWN:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETLEFT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETRIGHT:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETUP:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_TURRETDOWN:
for (int i = 0; (ActionText[i] = Dreamcast_A[i]) != '\0' && i < iLimitCopy; i++);
break;
case CAMERA_CHANGE_VIEW_ALL_SITUATIONS:
for (int i = 0; (ActionText[i] = Dreamcast_DPad_Up[i]) != '\0' && i < iLimitCopy; i++);
break;
case VEHICLE_LOOKBEHIND:
for (int i = 0; (ActionText[i] = Dreamcast_LookBehind[i]) != '\0' && i < iLimitCopy; i++);
break;
case NETWORK_TALK: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case _CONTROLLERACTION_36: // What is that???
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case TOGGLE_DPAD: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case SWITCH_DEBUG_CAM_ON: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case TAKE_SCREEN_SHOT: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case SHOW_MOUSE_POINTER_TOGGLE: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
case MAX_CONTROLLERACTIONS: // Not Used on Dreamcast
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
default:
for (int i = 0; (ActionText[i] = Dreamcast_NotAssigned[i]) != '\0' && i < iLimitCopy; i++);
break;
}
}
return ActionText;
}
#else // not RW_DC
wchar *CControllerConfigManager::GetControllerSettingTextKeyBoard(e_ControllerAction action, eControllerType type) wchar *CControllerConfigManager::GetControllerSettingTextKeyBoard(e_ControllerAction action, eControllerType type)
{ {
static wchar ActionText[50]; static wchar ActionText[50];
@@ -2375,6 +3004,7 @@ wchar *CControllerConfigManager::GetControllerSettingTextKeyBoard(e_ControllerAc
return NULL; return NULL;
} }
#endif // endif RW_DC
wchar *CControllerConfigManager::GetControllerSettingTextMouse(e_ControllerAction action) wchar *CControllerConfigManager::GetControllerSettingTextMouse(e_ControllerAction action)
{ {
@@ -2423,12 +3053,15 @@ wchar *CControllerConfigManager::GetControllerSettingTextJoystick(e_ControllerAc
int32 CControllerConfigManager::GetNumOfSettingsForAction(e_ControllerAction action) int32 CControllerConfigManager::GetNumOfSettingsForAction(e_ControllerAction action)
{ {
#ifdef RW_DC
int32 num = 0; // No need to show alternative control in the Hint Messages for an action on Dreamcast (just like PS2 and Xbox)
#else
int32 num = 0; int32 num = 0;
if (m_aSettings[action][KEYBOARD].m_Key != rsNULL) num++; if (m_aSettings[action][KEYBOARD].m_Key != rsNULL) num++;
if (m_aSettings[action][OPTIONAL_EXTRA].m_Key != rsNULL) num++; if (m_aSettings[action][OPTIONAL_EXTRA].m_Key != rsNULL) num++;
if (m_aSettings[action][MOUSE].m_Key != 0) num++; if (m_aSettings[action][MOUSE].m_Key != 0) num++;
if (m_aSettings[action][JOYSTICK].m_Key != 0) num++; if (m_aSettings[action][JOYSTICK].m_Key != 0) num++;
#endif
return num; return num;
} }