VBTN_POINTS *Joystick_get_btn_points(float scale) { int i; for (i = 0; i < 4; i++) { scaled_vbtn_points[i].x = -VKEY_DLX(scale) + scale * vbtn_points[i].x; scaled_vbtn_points[i].y = -VKEY_DDY(scale) + scale * vbtn_points[i].y; } for (i = 4; i < 6; i++) { scaled_vbtn_points[i].x = -VKEY_DRX(scale) + scale * vbtn_points[i].x; scaled_vbtn_points[i].y = -VKEY_DDY(scale) + scale * vbtn_points[i].y; } // keyboard button scaled_vbtn_points[i].x = -VKEY_DKX(scale) + scale * vbtn_points[i].x; scaled_vbtn_points[i].y = 0; i++; // menu button scaled_vbtn_points[i].x = -VKEY_DKX(scale) + scale * vbtn_points[i].x; scaled_vbtn_points[i].y = 0 + scale * vbtn_points[i].y; return scaled_vbtn_points; }
VBTN_POINTS *Joystick_get_btn_points(float scale) { int i; for (i = 0; i < 4; i++) { scaled_vbtn_points[i].x = -VKEY_DLX(scale) + scale * vbtn_points[i].x; scaled_vbtn_points[i].y = -VKEY_DDY(scale) + scale * vbtn_points[i].y; } for (i = 4; i < 6; i++) { scaled_vbtn_points[i].x = -VKEY_DRX(scale) + scale * vbtn_points[i].x; scaled_vbtn_points[i].y = -VKEY_DDY(scale) + scale * vbtn_points[i].y; } // キーボードonスイッチ scaled_vbtn_points[i].x = -VKEY_DKX(scale) + scale * vbtn_points[i].x; scaled_vbtn_points[i].y = 0; return scaled_vbtn_points; }