Código: Seleccionar todo
void Opcion_A()
{
{
int n;
SceCtrlData pad;
typedef struct {
char name[10];
unsigned int code;
} btn_struct;
btn_struct btns[22] = { "SELECT", 0x000001, "START", 0x000008, "ARRIBA", 0x000010, "DERECHA", 0x000020, "ABAJO", 0x000040, "IZQUIERDA", 0x000080, "GATILLO L", 0x000100, "GATILLO R", 0x000200, "TRIANGULO", 0x001000, "CIRCULO", 0x002000, "EQUIS", 0x004000, "CUADRADO", 0x008000, "HOME", 0x010000, "HOLD", 0x020000 };
pspDebugScreenInit();
pspDebugScreenSetTextColor(0xFFFFFF);
while(1 && sceCtrlReadBufferPositive(&pad, 1)) for (n=0; n< 22; ++n, pspDebugScreenSetXY(5, n)) if ((pad.Buttons & btns[n].code) pspDebugScreenPrintf("%s - OK", btns[n].name));
}
}
SE supone que volver al menu principal sería algo asi:
Código: Seleccionar todo
while(1 && sceCtrlReadBufferPositive(&pad, 1)) if ((pad.Buttons & PSP_CTRL_START) sceKernelDelayThread(4*1000*1000);
Menu_A();
SEGURO que esta mal y nose donde integrarlo porque soy aprendiz Level 1, pero quiero aprender con mis 16 añitos .Se me olvidaba, Gracias!
Código: Seleccionar todo