J3DDrawBuffer yeah

This commit is contained in:
Jasper St. Pierre
2023-09-12 19:39:54 -07:00
parent 109b2f299d
commit 286c30129f
5 changed files with 225 additions and 50 deletions
+23 -2
View File
@@ -17,8 +17,29 @@ void J3DGQRSetup7(unsigned long, unsigned long, unsigned long, unsigned long) {
}
/* 802DA0E8-802DA120 .text J3DCalcZValue__FPA4_f3Vec */
void J3DCalcZValue(float(*)[4], Vec) {
/* Nonmatching */
// matches debug
f32 J3DCalcZValue(register MtxP m, register Vec v) {
register f32 temp_f4;
register f32 out;
register f32 temp_f0;
register f32 temp_f2;
register f32 temp_f1 = 1.0f;
// clang-format off
asm {
psq_l temp_f0, 0(v), 0, 0 /* qr0 */
lfs temp_f2, 8(v)
psq_l temp_f4, 32(m), 0, 0 /* qr0 */
psq_l out, 40(m), 0, 0 /* qr0 */
ps_merge00 temp_f2, temp_f2, temp_f1
ps_mul temp_f4, temp_f0, temp_f4
ps_madd out, temp_f2, out, temp_f4
ps_sum0 out, out, out, out
}
// clang-format on
return out;
}
/* 802DA120-802DA2E0 .text J3DCalcBBoardMtx__FPA4_f */