mirror of https://github.com/zeldaret/oot.git
Finished import of padmgr changes from old repo
This commit is contained in:
parent
911dde45e1
commit
68f2662048
|
@ -269,7 +269,7 @@ u32 Fault_WaitForInputImpl() {
|
||||||
Fault_Sleep(0x10);
|
Fault_Sleep(0x10);
|
||||||
Fault_UpdatePadImpl();
|
Fault_UpdatePadImpl();
|
||||||
|
|
||||||
kDown = curInput->padPressed;
|
kDown = curInput->pressed_diff.input.button;
|
||||||
|
|
||||||
if (kDown == 0x20) {
|
if (kDown == 0x20) {
|
||||||
sFaultStructPtr->faultActive = !sFaultStructPtr->faultActive;
|
sFaultStructPtr->faultActive = !sFaultStructPtr->faultActive;
|
||||||
|
@ -582,7 +582,7 @@ void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) {
|
||||||
count--;
|
count--;
|
||||||
Fault_Sleep(0x10);
|
Fault_Sleep(0x10);
|
||||||
Fault_UpdatePadImpl();
|
Fault_UpdatePadImpl();
|
||||||
if (!~(curInput->padPressed | ~0x20)) {
|
if (!~(curInput->pressed_diff.input.button | ~0x20)) {
|
||||||
sFaultStructPtr->faultActive = false;
|
sFaultStructPtr->faultActive = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -590,42 +590,42 @@ void Fault_DrawMemDump(u32 pc, u32 sp, u32 unk0, u32 unk1) {
|
||||||
do {
|
do {
|
||||||
Fault_Sleep(0x10);
|
Fault_Sleep(0x10);
|
||||||
Fault_UpdatePadImpl();
|
Fault_UpdatePadImpl();
|
||||||
} while (curInput->padPressed == 0);
|
} while (curInput->pressed_diff.input.button == 0);
|
||||||
|
|
||||||
if (!~(curInput->padPressed | ~0x1000)) {
|
if (!~(curInput->pressed_diff.input.button | ~0x1000)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!~(curInput->raw.pad | ~0x8000)) {
|
if (!~(curInput->current.input.button | ~0x8000)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
off = 0x10;
|
off = 0x10;
|
||||||
if (!~(curInput->raw.pad | ~0x2000)) {
|
if (!~(curInput->current.input.button | ~0x2000)) {
|
||||||
off = 0x100;
|
off = 0x100;
|
||||||
}
|
}
|
||||||
if (!~(curInput->raw.pad | ~0x4000)) {
|
if (!~(curInput->current.input.button | ~0x4000)) {
|
||||||
off <<= 8;
|
off <<= 8;
|
||||||
}
|
}
|
||||||
if (!~(curInput->raw.pad | ~0x800)) {
|
if (!~(curInput->current.input.button | ~0x800)) {
|
||||||
addr -= off;
|
addr -= off;
|
||||||
}
|
}
|
||||||
if (!~(curInput->raw.pad | ~0x400)) {
|
if (!~(curInput->current.input.button | ~0x400)) {
|
||||||
addr += off;
|
addr += off;
|
||||||
}
|
}
|
||||||
if (!~(curInput->raw.pad | ~0x8)) {
|
if (!~(curInput->current.input.button | ~0x8)) {
|
||||||
addr = pc;
|
addr = pc;
|
||||||
}
|
}
|
||||||
if (!~(curInput->raw.pad | ~0x4)) {
|
if (!~(curInput->current.input.button | ~0x4)) {
|
||||||
addr = sp;
|
addr = sp;
|
||||||
}
|
}
|
||||||
if (!~(curInput->raw.pad | ~0x2)) {
|
if (!~(curInput->current.input.button | ~0x2)) {
|
||||||
addr = unk0;
|
addr = unk0;
|
||||||
}
|
}
|
||||||
if (!~(curInput->raw.pad | ~0x1)) {
|
if (!~(curInput->current.input.button | ~0x1)) {
|
||||||
addr = unk1;
|
addr = unk1;
|
||||||
}
|
}
|
||||||
if (!~(curInput->raw.pad | ~0x20)) {
|
if (!~(curInput->current.input.button | ~0x20)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3992,13 +3992,13 @@ void Interface_Update(GlobalContext* globalCtx) {
|
||||||
u16 action;
|
u16 action;
|
||||||
Input* input = &globalCtx->state.input[2];
|
Input* input = &globalCtx->state.input[2];
|
||||||
|
|
||||||
if (!~(input->padPressed | -0x201)) {
|
if (!~(input->pressed_diff.input.button | -0x201)) {
|
||||||
gSaveContext.language = 0;
|
gSaveContext.language = 0;
|
||||||
osSyncPrintf("J_N=%x J_N=%x\n", gSaveContext.language, &gSaveContext.language);
|
osSyncPrintf("J_N=%x J_N=%x\n", gSaveContext.language, &gSaveContext.language);
|
||||||
} else if (!~(input->padPressed | -0x801)) {
|
} else if (!~(input->pressed_diff.input.button | -0x801)) {
|
||||||
gSaveContext.language = 1;
|
gSaveContext.language = 1;
|
||||||
osSyncPrintf("J_N=%x J_N=%x\n", gSaveContext.language, &gSaveContext.language);
|
osSyncPrintf("J_N=%x J_N=%x\n", gSaveContext.language, &gSaveContext.language);
|
||||||
} else if (!~(input->padPressed | -0x101)) {
|
} else if (!~(input->pressed_diff.input.button | -0x101)) {
|
||||||
gSaveContext.language = 2;
|
gSaveContext.language = 2;
|
||||||
osSyncPrintf("J_N=%x J_N=%x\n", gSaveContext.language, &gSaveContext.language);
|
osSyncPrintf("J_N=%x J_N=%x\n", gSaveContext.language, &gSaveContext.language);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue