1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 22:44:30 +00:00

Matched fault.c (#389)

* Matched fault.c

* Removed unused asm
This commit is contained in:
Lucas Shaw 2020-09-14 10:57:17 -07:00 committed by GitHub
parent 4d9f83da1b
commit eba7a30d86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 165 deletions

View file

@ -110,22 +110,21 @@ u32 Fault_ProcessClient(u32 callback, u32 param0, u32 param1) {
return a.ret;
}
#ifdef NON_MATCHING
// minor ordering differences
void Fault_AddClient(FaultClient* client, void* callback, void* param0, void* param1) {
OSIntMask mask;
u32 alreadyExists = false;
FaultClient* iter;
s32 alreadyExists = false;
mask = osSetIntMask(1);
iter = sFaultStructPtr->clients;
while (iter != NULL) {
if (iter == client) {
alreadyExists = true;
goto end;
{
FaultClient* iter = sFaultStructPtr->clients;
while (iter != NULL) {
if (iter == client) {
alreadyExists = true;
goto end;
}
iter = iter->next;
}
iter = iter->next;
}
client->callback = callback;
@ -140,9 +139,6 @@ end:
osSyncPrintf(VT_COL(RED, WHITE) "fault_AddClient: %08x は既にリスト中にある\n" VT_RST, client);
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/fault/Fault_AddClient.s")
#endif
void Fault_RemoveClient(FaultClient* client) {
FaultClient* iter;
@ -182,22 +178,21 @@ void Fault_RemoveClient(FaultClient* client) {
}
}
#ifdef NON_MATCHING
// minor ordering differences
void Fault_AddAddrConvClient(FaultAddrConvClient* client, void* callback, void* param) {
FaultAddrConvClient* iter;
u32 alreadyExists = false;
OSIntMask mask;
u32 alreadyExists = false;
mask = osSetIntMask(1);
iter = sFaultStructPtr->addrConvClients;
while (iter != NULL) {
if (iter == client) {
alreadyExists = true;
goto end;
{
FaultAddrConvClient* iter = sFaultStructPtr->addrConvClients;
while (iter != NULL) {
if (iter == client) {
alreadyExists = true;
goto end;
}
iter = iter->next;
}
iter = iter->next;
}
client->callback = callback;
@ -211,9 +206,6 @@ end:
osSyncPrintf(VT_COL(RED, WHITE) "fault_AddressConverterAddClient: %08x は既にリスト中にある\n" VT_RST, client);
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/fault/Fault_AddAddrConvClient.s")
#endif
void Fault_RemoveAddrConvClient(FaultAddrConvClient* client) {
FaultAddrConvClient* iter;