mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-17 13:24:45 +00:00
[ntsc-1.2] Decompile fault.c (#2046)
* wip decomp ntsc-1.2 fault.c * more ntsc-1.2 fault.c * decompiled fault_v1.c * name fault_v1 functions, wip * try to clean up build system (two versions of the fault system coexisting) * cleanup * cleanup2 * fix build gc-eu-mq-dbg * match 2 more, ty anon * matched * review * more review * fixup spec * `(uintptr_t)ptr op int` instead of `ptr op (type*)int` * move fault.h out of global headers, properly include fault.h and versions.h * compile all fault_*.c files regardless of version by overriding FAULT_VERSION * n64 FaultMgr.framebuffer s32 -> u16* * FaultMgr.framebuffer -> FaultMgr.fb * make gc FaultMgr.fb u16* (yes, thats everything) * bss * fix Fault_Printf return type * noop FaultDrawer_SetFontColor, FaultDrawer_SetCharPad in fault_n64 * fault_color_ stuff is only for fault_gc * rm empty line in makefile * I guess `D_80105A90_unknown` is `[sg]TotalAllocFailures` * bss * `Fault_WaitInput` -> `Fault_WaitForInput` * use named fault funcs in pointers array * FAULT_OOT{N64,GC} -> FAULT_{N64,GC} * Apply suggestions from code review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * review, sync fault_{gc,n64} * Apply `FPCSR_CE` suggestions from code review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
This commit is contained in:
parent
aa97586659
commit
68818044db
34 changed files with 1031 additions and 80 deletions
|
@ -29,6 +29,7 @@
|
|||
* done while waiting for this operation to complete.
|
||||
*/
|
||||
#include "global.h"
|
||||
#include "fault.h"
|
||||
#include "terminal.h"
|
||||
|
||||
#define PADMGR_LOG(controllerNum, msg) \
|
||||
|
@ -236,7 +237,7 @@ void PadMgr_RumbleStop(PadMgr* padMgr) {
|
|||
if (osMotorInit(serialEventQueue, &padMgr->rumblePfs[i], i) == 0) {
|
||||
// If there is a rumble pak attached to this controller, stop it
|
||||
|
||||
if (gFaultMgr.msgId == 0 && padMgr->rumbleOnTimer != 0) {
|
||||
if (FAULT_MSG_ID == 0 && padMgr->rumbleOnTimer != 0) {
|
||||
PADMGR_LOG(i, T("振動パック 停止", "Stop rumble pak"));
|
||||
}
|
||||
osMotorStop(&padMgr->rumblePfs[i]);
|
||||
|
@ -399,7 +400,7 @@ void PadMgr_HandleRetrace(PadMgr* padMgr) {
|
|||
}
|
||||
padMgr->validCtrlrsMask = mask;
|
||||
|
||||
if (gFaultMgr.msgId != 0) {
|
||||
if (FAULT_MSG_ID != 0) {
|
||||
// If fault is active, no rumble
|
||||
PadMgr_RumbleStop(padMgr);
|
||||
} else if (padMgr->rumbleOffTimer > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue