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
This commit is contained in:
silv3rwing07
2020-04-14 10:17:25 -07:00
committed by GitHub
parent 16646aa34d
commit 5aef81071e
45 changed files with 640 additions and 789 deletions
+7 -8
View File
@@ -1,13 +1,12 @@
#include <ultra64.h>
#include <global.h>
#include <padmgr.h>
extern u8 D_80160FD0[];
extern PadMgr gPadMgr;
void func_800A9F30(s32 a, s32 b) {
func_800D2E30(&D_80160FD0);
func_800C7948(a, &D_80160FD0);
PadMgr_RumbleSet(a, &D_80160FD0);
}
void func_800A9F6C(f32 a, u8 b, u8 c, u8 d) {
@@ -35,8 +34,8 @@ void func_800A9F6C(f32 a, u8 b, u8 c, u8 d) {
void func_800AA0B4(void) {
func_800D3140(&D_80160FD0);
gPadMgr.unk_460 = func_800A9F30;
gPadMgr.unk_464 = 0;
gPadMgr.retraceCallback = func_800A9F30;
gPadMgr.retraceCallbackValue = 0;
if (0) {} // Necessary to match
}
@@ -44,16 +43,16 @@ void func_800AA0B4(void) {
void func_800AA0F0(void) {
PadMgr* padmgr = &gPadMgr;
if ((padmgr->unk_460 == func_800A9F30) && (padmgr->unk_464 == 0)) {
padmgr->unk_460 = NULL;
padmgr->unk_464 = 0;
if (((void*)padmgr->retraceCallback == (void*)func_800A9F30) && (padmgr->retraceCallbackValue == 0)) {
padmgr->retraceCallback = NULL;
padmgr->retraceCallbackValue = 0;
}
func_800D3178(&D_80160FD0);
}
u32 func_800AA148(void) {
return ((gPadMgr.unk_2AE[0] ^ 1) == 0);
return ((gPadMgr.pakType[0] ^ 1) == 0);
}
void func_800AA15C(void) {