mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-08 00:44:42 +00:00
Decompile code_8008E6A0.c / Add CHECK_PAD macro (#156)
* Decompile code_8008E6A0.c * Delete "counter" file
This commit is contained in:
parent
9a478a96ec
commit
89b0977e39
16 changed files with 88 additions and 111 deletions
|
@ -99,13 +99,13 @@ void func_80064558(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
|||
void func_800645A0(GlobalContext* globalCtx, CutsceneContext* csCtx) {
|
||||
Input* pad1 = &globalCtx->state.input[0];
|
||||
|
||||
if (!~(pad1->press.in.button | ~L_JPAD) && (csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4)) {
|
||||
if (CHECK_PAD(pad1->press, L_JPAD) && (csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4)) {
|
||||
D_8015FCC8 = 0;
|
||||
gSaveContext.cutsceneIndex = 0xFFFD;
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
|
||||
if (!~(pad1->press.in.button | ~U_JPAD) && (csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4) &&
|
||||
if (CHECK_PAD(pad1->press, U_JPAD) && (csCtx->state == CS_STATE_IDLE) && (gSaveContext.sceneSetupIndex >= 4) &&
|
||||
(D_8011D394 == 0)) {
|
||||
D_8015FCC8 = 1;
|
||||
gSaveContext.cutsceneIndex = 0xFFFD;
|
||||
|
@ -443,16 +443,15 @@ void Cutscene_Command_Terminator(GlobalContext* globalCtx, CutsceneContext* csCt
|
|||
|
||||
if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3) && (globalCtx->sceneNum != SCENE_SPOT00) &&
|
||||
(csCtx->frames > 20) &&
|
||||
(!~(globalCtx->state.input[0].press.in.button | ~A_BUTTON) ||
|
||||
!~(globalCtx->state.input[0].press.in.button | ~B_BUTTON) ||
|
||||
!~(globalCtx->state.input[0].press.in.button | ~START_BUTTON)) &&
|
||||
(CHECK_PAD(globalCtx->state.input[0].press, A_BUTTON) || CHECK_PAD(globalCtx->state.input[0].press, B_BUTTON) ||
|
||||
CHECK_PAD(globalCtx->state.input[0].press, START_BUTTON)) &&
|
||||
(gSaveContext.fileNum != 0xFEDC) && (globalCtx->sceneLoadFlag == 0)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
temp = 1;
|
||||
}
|
||||
|
||||
if ((csCtx->frames == cmd->startFrame) || (temp != 0) ||
|
||||
((csCtx->frames > 20) && (!~(globalCtx->state.input[0].press.in.button | ~START_BUTTON)) &&
|
||||
((csCtx->frames > 20) && CHECK_PAD(globalCtx->state.input[0].press, START_BUTTON) &&
|
||||
(gSaveContext.fileNum != 0xFEDC))) {
|
||||
csCtx->state = CS_STATE_UNSKIPPABLE_EXEC;
|
||||
func_800F68BC(0);
|
||||
|
@ -1524,7 +1523,7 @@ void Cutscene_ProcessCommands(GlobalContext* globalCtx, CutsceneContext* csCtx,
|
|||
return;
|
||||
}
|
||||
|
||||
if (!~(globalCtx->state.input[0].press.in.button | ~R_JPAD)) {
|
||||
if (CHECK_PAD(globalCtx->state.input[0].press, R_JPAD)) {
|
||||
csCtx->state = CS_STATE_UNSKIPPABLE_INIT;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue