aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxgte/vectornormals.s
diff options
context:
space:
mode:
authorJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-06-23 07:42:16 +0800
committerJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-06-23 07:42:16 +0800
commit7be9178c0f9b0e698a305ecc5c0c41fcc596a4fc (patch)
treee98c627e1da5c764563774b89b0c06d7ac5ad0a4 /libpsn00b/psxgte/vectornormals.s
parentae9e545c3ed33d39ce21ae13ceb8337fa34901b8 (diff)
downloadpsn00bsdk-7be9178c0f9b0e698a305ecc5c0c41fcc596a4fc.tar.gz
LibPSn00b officially v0.10b, added psxsio library, better DrawSync() and VSync(), better reference manual.
Diffstat (limited to 'libpsn00b/psxgte/vectornormals.s')
-rw-r--r--libpsn00b/psxgte/vectornormals.s11
1 files changed, 5 insertions, 6 deletions
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