From 7be9178c0f9b0e698a305ecc5c0c41fcc596a4fc Mon Sep 17 00:00:00 2001 From: "John Wilbert M. Villamor" Date: Sun, 23 Jun 2019 07:42:16 +0800 Subject: LibPSn00b officially v0.10b, added psxsio library, better DrawSync() and VSync(), better reference manual. --- libpsn00b/psxgte/vectornormals.s | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libpsn00b/psxgte/vectornormals.s') diff --git a/libpsn00b/psxgte/vectornormals.s b/libpsn00b/psxgte/vectornormals.s index 8907d43..49d949d 100644 --- a/libpsn00b/psxgte/vectornormals.s +++ b/libpsn00b/psxgte/vectornormals.s @@ -6,13 +6,12 @@ .section .text +# Implementation based from Sony libs .global VectorNormalS .type VectorNormalS, @function VectorNormalS: - # Implementation ripped from Sony libs - lw $t0, 0($a0) lw $t1, 4($a0) lw $t2, 8($a0) @@ -42,15 +41,15 @@ VectorNormalS: sra $t6, 1 addiu $t3, $v1, -24 - bltz $t3, $value_neg + bltz $t3, .Lvalue_neg nop - b $value_pos + b .Lvalue_pos sllv $t4, $v0, $t3 -$value_neg: +.Lvalue_neg: addiu $t3, $0 , 24 sub $t3, $v1 srav $t4, $v0, $t3 -$value_pos: +.Lvalue_pos: addi $t4, -64 sll $t4, 1 -- cgit v1.2.3