Un-ignored: the dev drive is the ground truth the restoration and emulator work constantly reference (DPL3/LIBDPL + VRENDER i860 renderer source, BT/RP live+dev game trees, VGL_LABS pod boot, scene/audio content). Kept in-repo for the pod-owner community. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
262 lines
5.6 KiB
ArmAsm
262 lines
5.6 KiB
ArmAsm
.file "billboard.c"
|
|
// PGC Rel 2.0a -opt 2
|
|
.text
|
|
.align 8
|
|
__atan2deg:
|
|
.a1 = 80
|
|
.f1 = 32
|
|
addu -(.a1+.f1), sp, sp
|
|
st.l fp,(.f1-16)(sp)
|
|
addu (.f1-16), sp, fp
|
|
st.l r1, 4(fp)
|
|
fst.d f2, -8(fp)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fst.l f8, 16(fp)
|
|
fst.l f9, 20(fp)
|
|
// lineno: 0
|
|
// lineno: 13
|
|
orh ha%.C00491, r0, r31
|
|
fld.l l%.C00491(r31), f16
|
|
fmul.ss f9, f9, f17
|
|
|
|
|
|
pfle.ss f16, f17, f0
|
|
|
|
bnc .B492
|
|
pfle.ss f8, f0, f0
|
|
|
|
bnc .B494
|
|
orh ha%.C00495, r0, r31
|
|
br .B497
|
|
fld.l l%.C00495(r31), f2
|
|
// lineno: 0
|
|
.B494: //.B0001
|
|
orh ha%.C00498, r0, r31
|
|
.DB.B494494:
|
|
fld.l l%.C00498(r31), f2
|
|
// lineno: 15
|
|
.B497: //.B0002
|
|
br .B519
|
|
fiadd.ss f2, f0, f8
|
|
// lineno: 18
|
|
.B492: //.B0000
|
|
fld.l 16(fp), f16
|
|
.DB.B492492:
|
|
fld.l 20(fp), f17
|
|
|
|
fmov.sd f16, f8
|
|
|
|
|
|
call _atan2
|
|
fmov.sd f17, f10
|
|
orh ha%.C00501, r0, r31
|
|
fld.d l%.C00501(r31), f16
|
|
|
|
|
|
fmul.dd f8, f16, f18
|
|
|
|
|
|
|
|
fmov.ds f18, f8
|
|
// lineno: 0
|
|
.B519: //.R0000
|
|
// lineno: 20
|
|
|
|
|
|
|
|
|
|
fld.d -8(fp), f2
|
|
adds .a1+16, fp, r31
|
|
ld.l 4(fp), r1
|
|
ld.l 0(fp), fp
|
|
bri r1
|
|
mov r31, sp
|
|
.globl _billboardize
|
|
.align 8
|
|
_billboardize:
|
|
.a2 = 80
|
|
.f2 = 48
|
|
addu -(.a2+.f2), sp, sp
|
|
st.l fp,(.f2-16)(sp)
|
|
addu (.f2-16), sp, fp
|
|
st.l r1, 4(fp)
|
|
fst.d f2, -16(fp)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
st.l r16, 48(fp)
|
|
st.l r17, 52(fp)
|
|
// lineno: 0
|
|
// lineno: 27
|
|
fld.l 48(r16), f16
|
|
fld.l 52(r16), f3
|
|
fld.l 56(r16), f2
|
|
fsub.ss f0, f16, f8
|
|
|
|
|
|
fsub.ss f0, f3, f9
|
|
|
|
|
|
fsub.ss f0, f2, f10
|
|
|
|
|
|
call _dpl_Translate
|
|
fst.l f16, -4(fp)
|
|
orh ha%_billboard_rotY, r0, r31
|
|
fld.l l%_billboard_rotY(r31), f8
|
|
ld.l 48(fp), r16
|
|
call _dpl_Rotate
|
|
adds 1, r0, r17
|
|
ld.l 48(fp), r16
|
|
fld.l -4(fp), f8
|
|
|
|
|
|
|
|
fiadd.ss f3, f0, f9
|
|
|
|
call _dpl_Translate
|
|
fiadd.ss f2, f0, f10
|
|
ld.l 52(fp), r28
|
|
|
|
bte 0x0000, r28, .B509
|
|
ld.l 48(fp), r17
|
|
call _dpl_Invert
|
|
mov r28, r16
|
|
// lineno: 0
|
|
.B509: //.B0004
|
|
// lineno: 36
|
|
|
|
|
|
|
|
|
|
fld.d -16(fp), f2
|
|
adds .a2+16, fp, r31
|
|
ld.l 4(fp), r1
|
|
ld.l 0(fp), fp
|
|
bri r1
|
|
mov r31, sp
|
|
.globl _billboardstuff
|
|
.align 8
|
|
_billboardstuff:
|
|
.a3 = 80
|
|
.f3 = 64
|
|
addu -(.a3+.f3), sp, sp
|
|
st.l fp,(.f3-16)(sp)
|
|
addu (.f3-16), sp, fp
|
|
st.l r1, 4(fp)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
st.l r16, 48(fp)
|
|
// lineno: 0
|
|
// lineno: 44
|
|
bte 0x0000, r16, .B511
|
|
adds -16, fp, r16
|
|
ld.l 48(fp), r18
|
|
mov r16, r17
|
|
fst.l f0, r0(r16)
|
|
fst.l f0, -12(fp)
|
|
call _dpl_XformPoint
|
|
fst.l f0, -8(fp)
|
|
orh ha%.C00513, r0, r31
|
|
fld.l l%.C00513(r31), f16
|
|
adds -32, fp, r16
|
|
ld.l 48(fp), r18
|
|
fst.l f16, -24(fp)
|
|
mov r16, r17
|
|
fst.l f0, r0(r16)
|
|
call _dpl_XformPoint
|
|
fst.l f0, -28(fp)
|
|
fld.l -8(fp), f16
|
|
fld.l -24(fp), f17
|
|
fld.l -16(fp), f18
|
|
fld.l -32(fp), f19
|
|
fsub.ss f17, f16, f8
|
|
orh ha%.C00495, r0, r31
|
|
fld.l l%.C00495(r31), f20
|
|
fsub.ss f19, f18, f9
|
|
|
|
|
|
call __atan2deg
|
|
fst.l f20, -36(fp)
|
|
fld.l -36(fp), f16
|
|
|
|
|
|
fsub.ss f16, f8, f17
|
|
|
|
orh ha%_billboard_rotY, r0, r31
|
|
fst.l f17, l%_billboard_rotY(r31)
|
|
// lineno: 0
|
|
.B511: //.B0005
|
|
// lineno: 59
|
|
|
|
|
|
|
|
|
|
adds .a3+16, fp, r31
|
|
ld.l 4(fp), r1
|
|
ld.l 0(fp), fp
|
|
bri r1
|
|
mov r31, sp
|
|
.data
|
|
.align 8
|
|
.C00491: // (0)
|
|
.long 0x38d1b717 // 9.99999975E-05
|
|
.C00495: // (4)
|
|
.long 0x42b40000 // 9.00000000E+01
|
|
.C00498: // (8)
|
|
.long 0xc2b40000 // -9.00000000E+01
|
|
.align 8
|
|
.C00501: // (16)
|
|
.long 0x0, 0x404ca5dc // 5.72957763671875000E+01
|
|
.C00513: // (24)
|
|
.long 0xbf800000 // -1.00000000E+00
|
|
.data
|
|
.globl _billboard_rotY
|
|
.align 4
|
|
_billboard_rotY: //billboard_rotY
|
|
.long 0x0 // 0.00000000E+00
|
|
.extern _dpl_XformPoint
|
|
.extern _dpl_Invert
|
|
.extern _dpl_Rotate
|
|
.extern _dpl_Translate
|
|
.extern _atan2
|