From 6e806b673ab4fe04f540a1bc89c8c62873a1b995 Mon Sep 17 00:00:00 2001 From: Ryan Myers Date: Thu, 9 Sep 2021 14:16:07 -0400 Subject: [PATCH] Rename perspNorm, and add a little more clarity to some function signatures --- asm/non_matchings/camera/func_80065EA0.s | 4 ++-- asm/non_matchings/camera/func_80067D3C.s | 4 ++-- asm/non_matchings/camera/func_80068514.s | 8 ++++---- asm/non_matchings/camera/func_80069484.s | 4 ++-- asm/non_matchings/camera/func_80069790.s | 4 ++-- include/PR/os_cont.h | 2 +- include/PR/os_eeprom.h | 10 +++++----- src/camera.c | 8 ++++---- src/controller_pak.c | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/asm/non_matchings/camera/func_80065EA0.s b/asm/non_matchings/camera/func_80065EA0.s index a27e86f8..1d0f7afa 100644 --- a/asm/non_matchings/camera/func_80065EA0.s +++ b/asm/non_matchings/camera/func_80065EA0.s @@ -96,10 +96,10 @@ glabel func_80065EA0 /* 066BF4 80065FF4 C426709C */ lwc1 $f6, %lo(D_800E709C)($at) /* 066BF8 80065FF8 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 066BFC 80065FFC 44814000 */ mtc1 $at, $f8 -/* 066C00 80066000 3C058012 */ lui $a1, %hi(D_80120D58+20) # $a1, 0x8012 +/* 066C00 80066000 3C058012 */ lui $a1, %hi(perspNorm+20) # $a1, 0x8012 /* 066C04 80066004 3C073FAA */ lui $a3, (0x3FAAAAAB >> 16) # lui $a3, 0x3faa /* 066C08 80066008 34E7AAAB */ ori $a3, (0x3FAAAAAB & 0xFFFF) # ori $a3, $a3, 0xaaab -/* 066C0C 8006600C 24A50D6C */ addiu $a1, %lo(D_80120D58+20) # addiu $a1, $a1, 0xd6c +/* 066C0C 8006600C 24A50D6C */ addiu $a1, %lo(perspNorm+20) # addiu $a1, $a1, 0xd6c /* 066C10 80066010 02002025 */ move $a0, $s0 /* 066C14 80066014 3C064270 */ lui $a2, 0x4270 /* 066C18 80066018 E7A40010 */ swc1 $f4, 0x10($sp) diff --git a/asm/non_matchings/camera/func_80067D3C.s b/asm/non_matchings/camera/func_80067D3C.s index 8166b733..a019e182 100644 --- a/asm/non_matchings/camera/func_80067D3C.s +++ b/asm/non_matchings/camera/func_80067D3C.s @@ -6,9 +6,9 @@ glabel func_80067D3C /* 06894C 80067D4C 3C0FB400 */ lui $t7, 0xb400 /* 068950 80067D50 246E0008 */ addiu $t6, $v1, 8 /* 068954 80067D54 AC8E0000 */ sw $t6, ($a0) -/* 068958 80067D58 3C188012 */ lui $t8, %hi(D_80120D58+20) # $t8, 0x8012 +/* 068958 80067D58 3C188012 */ lui $t8, %hi(perspNorm+20) # $t8, 0x8012 /* 06895C 80067D5C AC6F0000 */ sw $t7, ($v1) -/* 068960 80067D60 97180D6C */ lhu $t8, %lo(D_80120D58+20)($t8) +/* 068960 80067D60 97180D6C */ lhu $t8, %lo(perspNorm+20)($t8) /* 068964 80067D64 3C068012 */ lui $a2, %hi(D_80120CE4) # $a2, 0x8012 /* 068968 80067D68 AC780004 */ sw $t8, 4($v1) /* 06896C 80067D6C 24C60CE4 */ addiu $a2, %lo(D_80120CE4) # addiu $a2, $a2, 0xce4 diff --git a/asm/non_matchings/camera/func_80068514.s b/asm/non_matchings/camera/func_80068514.s index 8f9f28b8..3078ef43 100644 --- a/asm/non_matchings/camera/func_80068514.s +++ b/asm/non_matchings/camera/func_80068514.s @@ -27,12 +27,12 @@ glabel func_80068514 /* 069178 80068578 E7A8005C */ swc1 $f8, 0x5c($sp) /* 06917C 8006857C C4F20010 */ lwc1 $f18, 0x10($a3) /* 069180 80068580 C42A0D40 */ lwc1 $f10, %lo(D_80120D40)($at) -/* 069184 80068584 3C018012 */ lui $at, %hi(D_80120D58) # $at, 0x8012 +/* 069184 80068584 3C018012 */ lui $at, %hi(perspNorm) # $at, 0x8012 /* 069188 80068588 46125101 */ sub.s $f4, $f10, $f18 /* 06918C 8006858C 00390821 */ addu $at, $at, $t9 /* 069190 80068590 E7A40058 */ swc1 $f4, 0x58($sp) /* 069194 80068594 C4E80014 */ lwc1 $f8, 0x14($a3) -/* 069198 80068598 C4260D58 */ lwc1 $f6, %lo(D_80120D58)($at) +/* 069198 80068598 C4260D58 */ lwc1 $f6, %lo(perspNorm)($at) /* 06919C 8006859C 84E40000 */ lh $a0, ($a3) /* 0691A0 800685A0 0C01C1F1 */ jal func_800707C4 /* 0691A4 800685A4 46083501 */ sub.s $f20, $f6, $f8 @@ -119,12 +119,12 @@ glabel func_80068514 /* 0692DC 800686DC C42A0D40 */ lwc1 $f10, %lo(D_80120D40)($at) /* 0692E0 800686E0 C6120010 */ lwc1 $f18, 0x10($s0) /* 0692E4 800686E4 46083001 */ sub.s $f0, $f6, $f8 -/* 0692E8 800686E8 3C018012 */ lui $at, %hi(D_80120D58) # $at, 0x8012 +/* 0692E8 800686E8 3C018012 */ lui $at, %hi(perspNorm) # $at, 0x8012 /* 0692EC 800686EC 46125101 */ sub.s $f4, $f10, $f18 /* 0692F0 800686F0 002C0821 */ addu $at, $at, $t4 /* 0692F4 800686F4 E7A40058 */ swc1 $f4, 0x58($sp) /* 0692F8 800686F8 C6080014 */ lwc1 $f8, 0x14($s0) -/* 0692FC 800686FC C4260D58 */ lwc1 $f6, %lo(D_80120D58)($at) +/* 0692FC 800686FC C4260D58 */ lwc1 $f6, %lo(perspNorm)($at) /* 069300 80068700 46000282 */ mul.s $f10, $f0, $f0 /* 069304 80068704 46083501 */ sub.s $f20, $f6, $f8 /* 069308 80068708 00125840 */ sll $t3, $s2, 1 diff --git a/asm/non_matchings/camera/func_80069484.s b/asm/non_matchings/camera/func_80069484.s index 126b9ed1..efb96809 100644 --- a/asm/non_matchings/camera/func_80069484.s +++ b/asm/non_matchings/camera/func_80069484.s @@ -192,9 +192,9 @@ glabel func_80069484 /* 06A370 80069770 E7A40044 */ swc1 $f4, 0x44($sp) /* 06A374 80069774 E4280D40 */ swc1 $f8, %lo(D_80120D40)($at) /* 06A378 80069778 C7AA0044 */ lwc1 $f10, 0x44($sp) -/* 06A37C 8006977C 3C018012 */ lui $at, %hi(D_80120D58) # $at, 0x8012 +/* 06A37C 8006977C 3C018012 */ lui $at, %hi(perspNorm) # $at, 0x8012 /* 06A380 80069780 00220821 */ addu $at, $at, $v0 /* 06A384 80069784 27BD0050 */ addiu $sp, $sp, 0x50 /* 06A388 80069788 03E00008 */ jr $ra -/* 06A38C 8006978C E42A0D58 */ swc1 $f10, %lo(D_80120D58)($at) +/* 06A38C 8006978C E42A0D58 */ swc1 $f10, %lo(perspNorm)($at) diff --git a/asm/non_matchings/camera/func_80069790.s b/asm/non_matchings/camera/func_80069790.s index 31d9a00f..07f3f809 100644 --- a/asm/non_matchings/camera/func_80069790.s +++ b/asm/non_matchings/camera/func_80069790.s @@ -163,13 +163,13 @@ glabel func_80069790 /* 06A610 80069A10 0018C880 */ sll $t9, $t8, 2 /* 06A614 80069A14 00390821 */ addu $at, $at, $t9 /* 06A618 80069A18 C4260D40 */ lwc1 $f6, %lo(D_80120D40)($at) -/* 06A61C 80069A1C 3C018012 */ lui $at, %hi(D_80120D58) # $at, 0x8012 +/* 06A61C 80069A1C 3C018012 */ lui $at, %hi(perspNorm) # $at, 0x8012 /* 06A620 80069A20 E4A60000 */ swc1 $f6, ($a1) /* 06A624 80069A24 8C480000 */ lw $t0, ($v0) /* 06A628 80069A28 00000000 */ nop /* 06A62C 80069A2C 00084880 */ sll $t1, $t0, 2 /* 06A630 80069A30 00290821 */ addu $at, $at, $t1 -/* 06A634 80069A34 C4280D58 */ lwc1 $f8, %lo(D_80120D58)($at) +/* 06A634 80069A34 C4280D58 */ lwc1 $f8, %lo(perspNorm)($at) /* 06A638 80069A38 03E00008 */ jr $ra /* 06A63C 80069A3C E4C80000 */ swc1 $f8, ($a2) diff --git a/include/PR/os_cont.h b/include/PR/os_cont.h index 2754f250..4108b582 100644 --- a/include/PR/os_cont.h +++ b/include/PR/os_cont.h @@ -190,7 +190,7 @@ typedef struct { extern s32 osContInit(OSMesgQueue *, u8 *, OSContStatus *); extern s32 osContReset(OSMesgQueue *, OSContStatus *); extern s32 osContStartQuery(OSMesgQueue *); -extern s32 osContStartReadData(OSMesgQueue *); +extern s32 osContStartReadData(OSMesgQueue *mq); #ifndef _HW_VERSION_1 extern s32 osContSetCh(u8); #endif diff --git a/include/PR/os_eeprom.h b/include/PR/os_eeprom.h index b3bca814..18cd04e6 100644 --- a/include/PR/os_eeprom.h +++ b/include/PR/os_eeprom.h @@ -91,11 +91,11 @@ extern "C" { /* EEPROM interface */ -extern s32 osEepromProbe(OSMesgQueue *); -extern s32 osEepromRead(OSMesgQueue *, u8, u8 *); -extern s32 osEepromWrite(OSMesgQueue *, u8, u8 *); -extern s32 osEepromLongRead(OSMesgQueue *, u8, u8 *, int); -extern s32 osEepromLongWrite(OSMesgQueue *, u8, u8 *, int); +extern s32 osEepromProbe(OSMesgQueue *mq); +extern s32 osEepromRead(OSMesgQueue *mq, u8 address, u8 *buffer); +extern s32 osEepromWrite(OSMesgQueue *mq, u8 address, u8 *buffer); +extern s32 osEepromLongRead(OSMesgQueue *mq, u8 address, u8 *buffer, int nbytes); +extern s32 osEepromLongWrite(OSMesgQueue *mq, u8 address, u8 *buffer, int nbytes); #endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */ diff --git a/src/camera.c b/src/camera.c index 5b134f6e..567d0590 100644 --- a/src/camera.c +++ b/src/camera.c @@ -135,7 +135,7 @@ s32 D_80120D1C; s32 D_80120D20[2]; s32 D_80120D28[6]; s32 D_80120D40[6]; -u16 *D_80120D58[6]; +u16 *perspNorm[6]; Mtx *D_80120D70[6]; s32 D_80120D88[6]; Mtx D_80120DA0[5]; @@ -216,7 +216,7 @@ void func_80065EA0(void) { if ((D_B0000578 & 0xFFFF) != 0x8965) { D_800DD060 = 1; } - guPerspectiveF(&D_80120EE0, &D_80120D58[5], CAMERA_DEFAULT_FOV, CAMERA_ASPECT, CAMERA_NEAR, CAMERA_FAR, CAMERA_SCALE); + guPerspectiveF(&D_80120EE0, &perspNorm[5], CAMERA_DEFAULT_FOV, CAMERA_ASPECT, CAMERA_NEAR, CAMERA_FAR, CAMERA_SCALE); func_8006F870(&D_80120EE0, &D_80120FE0); gCurCamFOV = CAMERA_DEFAULT_FOV; } @@ -251,14 +251,14 @@ f32 get_current_camera_fov(void) { void update_camera_fov(f32 camFieldOfView) { if (CAMERA_MIN_FOV < camFieldOfView && camFieldOfView < CAMERA_MAX_FOV && camFieldOfView != gCurCamFOV) { gCurCamFOV = camFieldOfView; - guPerspectiveF(D_80120EE0, &D_80120D58[5], camFieldOfView, + guPerspectiveF(D_80120EE0, &perspNorm[5], camFieldOfView, CAMERA_ASPECT, CAMERA_NEAR, CAMERA_FAR, CAMERA_SCALE); func_8006F870(D_80120EE0, D_80120FE0); } } void func_80066194(void) { - guPerspectiveF(D_80120EE0, &D_80120D58[5], CAMERA_DEFAULT_FOV, + guPerspectiveF(D_80120EE0, &perspNorm[5], CAMERA_DEFAULT_FOV, CAMERA_ASPECT, CAMERA_NEAR, CAMERA_FAR, CAMERA_SCALE); func_8006F870(D_80120EE0, D_80120FE0); } diff --git a/src/controller_pak.c b/src/controller_pak.c index 3e6922c9..aae3e3db 100644 --- a/src/controller_pak.c +++ b/src/controller_pak.c @@ -61,7 +61,7 @@ const char D_800E7750[] = "warning: corrupt ghost\n"; /************ .bss ************/ -s32 D_80124010; +s32 D_80124010; //OSMesgQueue s32 D_80124014; OSPfs pfs[MAXCONTROLLERS];