1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +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:
Dragorn421 2024-08-28 09:38:42 +02:00 committed by GitHub
parent aa97586659
commit 68818044db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 1031 additions and 80 deletions

View file

@ -5,6 +5,7 @@
*/
#include "z_en_mag.h"
#include "versions.h"
#include "assets/objects/object_mag/object_mag.h"
#if PLATFORM_N64
#include "n64dd.h"

View file

@ -14,7 +14,7 @@
#include "cic6105.h"
#endif
#pragma increment_block_number "gc-eu:164 gc-eu-mq:164 gc-jp:166 gc-jp-ce:166 gc-jp-mq:166 gc-us:166 gc-us-mq:166"
#pragma increment_block_number "gc-eu:174 gc-eu-mq:174 gc-jp:176 gc-jp-ce:176 gc-jp-mq:176 gc-us:176 gc-us-mq:176"
#define FLAGS ACTOR_FLAG_4

View file

@ -354,19 +354,19 @@ void Player_Action_CsAction(Player* this, PlayState* play);
// .bss part 1
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"
static s32 D_80858AA0;
// TODO: There's probably a way to match BSS ordering with less padding by spreading the variables out and moving
// data around. It would be easier if we had more options for controlling BSS ordering in debug.
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192"
static s32 D_80858AA4;
static Vec3f sInteractWallCheckResult;
static Input* sControlInput;
#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224"
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224"
// .data