diff options
| author | silv3rwing07 <62714207+silv3rwing07@users.noreply.github.com> | 2020-04-14 10:17:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-14 13:17:25 -0400 |
| commit | 5aef81071e501fbbe5298a433ead06a625cdb3d8 (patch) | |
| tree | 686ccf568a7f05bd7741be96cd22f51d358451d4 /src/code/z_debug.c | |
| parent | 16646aa34d533b36e3a93985ae59cbefdf58b6d4 (diff) | |
padmgr and related (#71)
* In process of moving changes over from old repo
* Merged in changes
* Finished import of padmgr changes from old repo
* Adjusted some volatile
* Improving padmgr volatile situation
* Almost matched osReadMempak
* Working on osMempakDataCRC
* Explanations and equivalents but no matches for osMempakAddrCRC and osMempakDataCRC
* OK after merge
* Matched osMempakAddrCRC and osMempakDataCRC
* Matched osReadMempak
* Updated PadMgr function names to be less like original code
* Changed variable names to make them further from original code
* Changed names and it stopped matching
* Undid clang-format steamrollering whitespace memes
* Cleaned up Input names
* More formatting changes
* Moved padmgr to z64.h, deleted padmgr.h
Diffstat (limited to 'src/code/z_debug.c')
| -rw-r--r-- | src/code/z_debug.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/code/z_debug.c b/src/code/z_debug.c index cb21e0125..fc663c3d2 100644 --- a/src/code/z_debug.c +++ b/src/code/z_debug.c @@ -114,11 +114,12 @@ void func_8006390C(Input* input) { s32 i; regGroup = (gGameInfo->regGroup * REG_PAGES + gGameInfo->regPage) * REG_PER_PAGE - REG_PER_PAGE; - dpad = input->raw.pad & (U_JPAD | L_JPAD | R_JPAD | D_JPAD); - if (!~(input->raw.pad | ~L_TRIG) || !~(input->raw.pad | ~R_TRIG) || !~(input->raw.pad | ~START_BUTTON)) { + dpad = input->cur.in.button & (U_JPAD | L_JPAD | R_JPAD | D_JPAD); + if (!~(input->cur.in.button | ~L_TRIG) || !~(input->cur.in.button | ~R_TRIG) || + !~(input->cur.in.button | ~START_BUTTON)) { input_combo = inputCombos; for (i = 0; i < REG_GROUPS; i++) { - if (~(~input_combo->push | input->raw.pad) || ~(~input_combo->held | input->padPressed)) { + if (~(~input_combo->push | input->cur.in.button) || ~(~input_combo->held | input->press.in.button)) { input_combo++; } else { break; @@ -154,16 +155,18 @@ void func_8006390C(Input* input) { gGameInfo->dpadLast = dpad; } - increment = (dpad & R_JPAD) - ? (!~(input->raw.pad | ~(A_BUTTON | B_BUTTON)) - ? 1000 - : !~(input->raw.pad | ~A_BUTTON) ? 100 : !~(input->raw.pad | ~B_BUTTON) ? 10 : 1) - : (dpad & L_JPAD) ? (!~(input->raw.pad | ~(A_BUTTON | B_BUTTON)) - ? -1000 - : !~(input->raw.pad | ~A_BUTTON) - ? -100 - : !~(input->raw.pad | ~B_BUTTON) ? -10 : -1) - : 0; + increment = + (dpad & R_JPAD) + ? (!~(input->cur.in.button | ~(A_BUTTON | B_BUTTON)) + ? 1000 + : !~(input->cur.in.button | ~A_BUTTON) ? 100 + : !~(input->cur.in.button | ~B_BUTTON) ? 10 : 1) + : (dpad & L_JPAD) ? (!~(input->cur.in.button | ~(A_BUTTON | B_BUTTON)) + ? -1000 + : !~(input->cur.in.button | ~A_BUTTON) + ? -100 + : !~(input->cur.in.button | ~B_BUTTON) ? -10 : -1) + : 0; gGameInfo->data[gGameInfo->regCur + regGroup] += increment; if (dpad & U_JPAD) { |
