Add L3 and R3

This commit is contained in:
Shinovon 2026-05-07 19:00:54 +05:00
parent 00eb422ee4
commit 52b026b689
2 changed files with 22 additions and 3 deletions

View file

@ -1355,6 +1355,12 @@ void CHud::DrawAfterFade()
CSprite2d::DrawRect(CRECT(320 + 20, 286 + y, 60, 20), CRGBA(0, 0, 0, 128)); CSprite2d::DrawRect(CRECT(320 + 20, 286 + y, 60, 20), CRGBA(0, 0, 0, 128));
PRINT("start", 320 + 20, 290 + y, 60); PRINT("start", 320 + 20, 290 + y, 60);
// l3, r3
CSprite2d::DrawRect(CRECT(320 - 80, 254 + y, 60, 20), CRGBA(0, 0, 0, 128));
PRINT("L3", 320 - 80, 258 + y, 60);
CSprite2d::DrawRect(CRECT(320 + 20, 254 + y, 60, 20), CRGBA(0, 0, 0, 128));
PRINT("R3", 320 + 20, 258 + y, 60);
// dpad // dpad
CSprite2d::DrawRect(CRECT(0, 80 + y, w / 4, 120), CRGBA(0, 0, 0, 128)); CSprite2d::DrawRect(CRECT(0, 80 + y, w / 4, 120), CRGBA(0, 0, 0, 128));
PRINT("/\\", w / 8 - 15, 90 + y, 30); PRINT("/\\", w / 8 - 15, 90 + y, 30);

View file

@ -71,6 +71,8 @@ const TUid KUidRE3 = {0xe0d67647};
#define JOY_L2 6 #define JOY_L2 6
#define JOY_R2 7 #define JOY_R2 7
#define JOY_BACK 8 #define JOY_BACK 8
#define JOY_L3 9
#define JOY_R3 10
#define JOY_START 11 #define JOY_START 11
#define JOY_DPAD_UP 12 #define JOY_DPAD_UP 12
#define JOY_DPAD_RIGHT 13 #define JOY_DPAD_RIGHT 13
@ -357,6 +359,10 @@ static int MapScanCode(TInt aScanCode, TInt aModifiers) {
return JOY_L2; return JOY_L2;
case '8': case '8':
return JOY_R2; return JOY_R2;
case '9':
return JOY_L3;
case '0':
return JOY_R3;
case EStdKeyDevice0: case EStdKeyDevice0:
return JOY_BACK; return JOY_BACK;
@ -411,7 +417,6 @@ public:
CMenuManager::m_bStartUpFrontEndRequested = true; CMenuManager::m_bStartUpFrontEndRequested = true;
container->gGameState = GS_FRONTEND; container->gGameState = GS_FRONTEND;
// container->gGameState = GS_INIT_PLAYING_GAME;
break; break;
case GS_FRONTEND: case GS_FRONTEND:
if (!ForegroundApp) break; if (!ForegroundApp) break;
@ -616,7 +621,7 @@ public:
int w = Size().iWidth; int w = Size().iWidth;
int h = Size().iHeight; int h = Size().iHeight;
if (h > 360) y += h - 360; if (h > 360) y += (h * 360) / 480;
// if (FrontEndMenuManager.m_bMenuActive) { // if (FrontEndMenuManager.m_bMenuActive) {
// PSGLOBAL(lastMousePos).x = x; // PSGLOBAL(lastMousePos).x = x;
@ -677,7 +682,7 @@ public:
stickCenterX[i] = x; stickCenterX[i] = x;
stickCenterY[i] = y; stickCenterY[i] = y;
} }
} else if (y >= 280 && y <= 280 + 32) { } else if (y > 280 && y < 280 + 32) {
if (x > 320 - 80 && x < 320 - 20) { if (x > 320 - 80 && x < 320 - 20) {
// select // select
activeZone[i] = JOY_BACK + 1; activeZone[i] = JOY_BACK + 1;
@ -687,6 +692,14 @@ public:
activeZone[i] = JOY_START + 1; activeZone[i] = JOY_START + 1;
virtualButtons[JOY_START] = 1; virtualButtons[JOY_START] = 1;
} }
} else if (y > 280 - 32 && y < 280) {
if (x > 320 - 80 && x < 320 - 20) {
activeZone[i] = JOY_L3 + 1;
virtualButtons[JOY_L3] = 1;
} else if (x > 320 + 20 && x < 320 + 80) {
activeZone[i] = JOY_R3 + 1;
virtualButtons[JOY_R3] = 1;
}
} else if (y >= 80 && y <= 80 + 120) { } else if (y >= 80 && y <= 80 + 120) {
if (x < w / 4) { if (x < w / 4) {
// dpad // dpad