From c98cd17e68487d4c52540f4f3e40be7a99795943 Mon Sep 17 00:00:00 2001 From: entriphy <1747088+entriphy@users.noreply.github.com> Date: Sat, 8 Jul 2023 21:52:29 -0700 Subject: [PATCH] nakano: Decompile nkpad.cc --- include/nakano.h | 46 +++++++++++++++++++++++----------------------- src/nakano/cpad.cc | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/include/nakano.h b/include/nakano.h index 50b2dcf..5ade125 100644 --- a/include/nakano.h +++ b/include/nakano.h @@ -322,61 +322,61 @@ class CPadControl { // 0x380 void Init(); void Open(); void Close(); - void Update(); + void Update(bool skip = false); void Clear(); void ClearAll(); u32 lvl(s32 id) { - return this->paddata[id].lvl; + return (this->paddata + id)->lvl; } u32 trg(s32 id) { - return this->paddata[id].trg; + return (this->paddata + id)->trg; } u32 rep(s32 id) { - return this->paddata[id].rep; + return (this->paddata + id)->rep; } s32 looks(s32 id) { - return this->paddata[id].looks; + return (this->paddata + id)->looks; } void SetRepeatTime(u32 rep1, u32 rep2, s32 id) { - this->paddata[id].repf = rep1; - this->paddata[id].reps = rep2; + (this->paddata + id)->repf = rep1; + (this->paddata + id)->reps = rep2; } s32 r3ih(s32 id) { - return this->paddata[id].analog[0].ih; + return (this->paddata + id)->analog[0].ih; } s32 r3iv(s32 id) { - return this->paddata[id].analog[0].iv; + return (this->paddata + id)->analog[0].iv; } f32 r3fh(s32 id) { - return this->paddata[id].analog[0].fh; + return (this->paddata + id)->analog[0].fh; } f32 r3fv(s32 id) { - return this->paddata[id].analog[0].fv; + return (this->paddata + id)->analog[0].fv; } s32 r3dir(s32 id) { - return this->paddata[id].analog[0].direction; + return (this->paddata + id)->analog[0].direction; } f32 r3scalar(s32 id) { - return this->paddata[id].analog[0].scalar; + return (this->paddata + id)->analog[0].scalar; } f32 r3lscalar(s32 id) { - return this->paddata[id].analog[0].lscalar; + return (this->paddata + id)->analog[0].lscalar; } f32 r3angle(s32 id) { - return this->paddata[id].analog[0].angle; + return (this->paddata + id)->analog[0].angle; } s32 r3h(s32 id) { @@ -388,35 +388,35 @@ class CPadControl { // 0x380 } s32 l3ih(s32 id) { - return this->paddata[id].analog[1].ih; + return (this->paddata + id)->analog[1].ih; } s32 l3iv(s32 id) { - return this->paddata[id].analog[1].iv; + return (this->paddata + id)->analog[1].iv; } f32 l3fh(s32 id) { - return this->paddata[id].analog[1].fh; + return (this->paddata + id)->analog[1].fh; } f32 l3fv(s32 id) { - return this->paddata[id].analog[1].fv; + return (this->paddata + id)->analog[1].fv; } s32 l3dir(s32 id) { - return this->paddata[id].analog[1].direction; + return (this->paddata + id)->analog[1].direction; } f32 l3scalar(s32 id) { - return this->paddata[id].analog[1].scalar; + return (this->paddata + id)->analog[1].scalar; } f32 l3lscalar(s32 id) { - return this->paddata[id].analog[1].lscalar; + return (this->paddata + id)->analog[1].lscalar; } f32 l3angle(s32 id) { - return this->paddata[id].analog[1].angle; + return (this->paddata + id)->analog[1].angle; } s32 l3h(s32 id) { diff --git a/src/nakano/cpad.cc b/src/nakano/cpad.cc index 8712e1e..f672141 100644 --- a/src/nakano/cpad.cc +++ b/src/nakano/cpad.cc @@ -73,7 +73,7 @@ void CPadControl::Close() { // TODO } -void CPadControl::Update() { +void CPadControl::Update(bool skip) { // TODO }