Decompile guPerspective

This commit is contained in:
Ryan Dwyer 2021-01-28 23:59:48 +10:00
parent a8b846785f
commit dcc13c5077
4 changed files with 11 additions and 31 deletions

View File

@ -121,7 +121,7 @@ glabel func0f0155f0
/* f015718: e7a80010 */ swc1 $f8,0x10($sp)
/* f01571c: e7aa0014 */ swc1 $f10,0x14($sp)
/* f015720: 032e2021 */ addu $a0,$t9,$t6
/* f015724: 0c001289 */ jal func00004a24
/* f015724: 0c001289 */ jal guPerspective
/* f015728: e7b00018 */ swc1 $f16,0x18($sp)
/* f01572c: 3c0fbc00 */ lui $t7,0xbc00
/* f015730: 35ef000e */ ori $t7,$t7,0xe

View File

@ -3786,10 +3786,10 @@ void func0f0baf38(void)
Gfx *func0f0baf84(Gfx *gdl)
{
if (g_Vars.currentplayer->pausemode != PAUSEMODE_UNPAUSED) {
f32 *a = gfxAllocateMatrix();
Mtx *a = gfxAllocateMatrix();
u16 b;
func00004a24(a, &b, g_Vars.currentplayer->zoominfovy,
guPerspective(a, &b, g_Vars.currentplayer->zoominfovy,
1.4545454978943f, 10, 300, 1);
gSPMatrix(gdl++, 0x80000000 + (u32)a, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);

View File

@ -3,6 +3,4 @@
#include <ultra64.h>
#include "types.h"
void func00004a24(f32 *matrix, u16 *arg1, f32 fovy, f32 arg3, f32 arg4, f32 arg5, f32 arg6);
#endif

View File

@ -49,29 +49,11 @@ void guPerspectiveF(float mf[4][4], u16 *perspNorm, float fovy, float aspect, fl
}
}
GLOBAL_ASM(
glabel func00004a24
/* 4a24: 27bdff98 */ addiu $sp,$sp,-104
/* 4a28: 44866000 */ mtc1 $a2,$f12
/* 4a2c: 44877000 */ mtc1 $a3,$f14
/* 4a30: c7a40078 */ lwc1 $f4,0x78($sp)
/* 4a34: c7a6007c */ lwc1 $f6,0x7c($sp)
/* 4a38: c7a80080 */ lwc1 $f8,0x80($sp)
/* 4a3c: afbf0024 */ sw $ra,0x24($sp)
/* 4a40: afa40068 */ sw $a0,0x68($sp)
/* 4a44: 44066000 */ mfc1 $a2,$f12
/* 4a48: 44077000 */ mfc1 $a3,$f14
/* 4a4c: 27a40028 */ addiu $a0,$sp,0x28
/* 4a50: e7a40010 */ swc1 $f4,0x10($sp)
/* 4a54: e7a60014 */ swc1 $f6,0x14($sp)
/* 4a58: 0c001210 */ jal guPerspectiveF
/* 4a5c: e7a80018 */ swc1 $f8,0x18($sp)
/* 4a60: 27a40028 */ addiu $a0,$sp,0x28
/* 4a64: 0c0128d8 */ jal guMtxF2L
/* 4a68: 8fa50068 */ lw $a1,0x68($sp)
/* 4a6c: 8fbf0024 */ lw $ra,0x24($sp)
/* 4a70: 27bd0068 */ addiu $sp,$sp,0x68
/* 4a74: 03e00008 */ jr $ra
/* 4a78: 00000000 */ nop
/* 4a7c: 00000000 */ nop
);
void guPerspective(Mtx *m, u16 *perspNorm, float fovy, float aspect, float near, float far, float scale)
{
float mf[4][4];
guPerspectiveF(mf, perspNorm, fovy, aspect, near, far, scale);
guMtxF2L(mf, m);
}