mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-23 13:09:44 +00:00
Decompile SetVertex
functions in reg03.c
(#1598)
Some checks failed
Format code / format (push) Failing after 0s
Build C code / extract-assets (push) Failing after 0s
Build C code / build-linux (push) Has been skipped
Build C code / build-macos (push) Has been skipped
Build C code / build-windows (push) Has been skipped
Build C code / build-linux-lle (push) Has been skipped
Build Saturn version / build-and-test-saturn (push) Has been skipped
Build Saturn version / function-finder-saturn (push) Has been skipped
Build Debug Module tool / build (push) Failing after 0s
Build PSX and PSP version / build-and-test (pspeu, hd) (push) Has been skipped
Build PSX and PSP version / build-and-test (pspeu, pspeu) (push) Has been skipped
Build PSX and PSP version / build-and-test (us, us) (push) Has been skipped
Build PSX and PSP version / generate-progress-report (pspeu, hd) (push) Has been skipped
Build PSX and PSP version / generate-progress-report (pspeu, pspeu) (push) Has been skipped
Build PSX and PSP version / generate-progress-report (us, us) (push) Has been skipped
Build PSX and PSP version / generate-duplicates-report (us, us) (push) Has been skipped
Build PSX and PSP version / generate-duplicates-report-psp (pspeu, pspeu) (push) Has been skipped
Some checks failed
Format code / format (push) Failing after 0s
Build C code / extract-assets (push) Failing after 0s
Build C code / build-linux (push) Has been skipped
Build C code / build-macos (push) Has been skipped
Build C code / build-windows (push) Has been skipped
Build C code / build-linux-lle (push) Has been skipped
Build Saturn version / build-and-test-saturn (push) Has been skipped
Build Saturn version / function-finder-saturn (push) Has been skipped
Build Debug Module tool / build (push) Failing after 0s
Build PSX and PSP version / build-and-test (pspeu, hd) (push) Has been skipped
Build PSX and PSP version / build-and-test (pspeu, pspeu) (push) Has been skipped
Build PSX and PSP version / build-and-test (us, us) (push) Has been skipped
Build PSX and PSP version / generate-progress-report (pspeu, hd) (push) Has been skipped
Build PSX and PSP version / generate-progress-report (pspeu, pspeu) (push) Has been skipped
Build PSX and PSP version / generate-progress-report (us, us) (push) Has been skipped
Build PSX and PSP version / generate-duplicates-report (us, us) (push) Has been skipped
Build PSX and PSP version / generate-duplicates-report-psp (pspeu, pspeu) (push) Has been skipped
Based this off other Josh's work on https://decomp.me/scratch/ncrbI Noticed there was already a define in `libgte.h` for Vector0 which I've used, but also filled out the other two. Hope this is ok for a first PR 😄 Let me know if anything needs changing. Co-authored-by: Josh Schreuder <jschreuder@mediaocean.com>
This commit is contained in:
parent
31048dac26
commit
20652c255c
@ -105,6 +105,16 @@ extern long ratan2(long y, long x);
|
||||
"lwc2 $1, 4( %0 )" \
|
||||
: \
|
||||
: "r"(r0))
|
||||
#define gte_ldv1(r0) \
|
||||
__asm__ volatile("lwc2 $2, 0( %0 );" \
|
||||
"lwc2 $3, 4( %0 )" \
|
||||
: \
|
||||
: "r"(r0))
|
||||
#define gte_ldv2(r0) \
|
||||
__asm__ volatile("lwc2 $4, 0( %0 );" \
|
||||
"lwc2 $5, 4( %0 )" \
|
||||
: \
|
||||
: "r"(r0))
|
||||
|
||||
// NOTE: These are not the official defines in the SDK.
|
||||
// They were identified by looking at functions which used them.
|
||||
|
@ -1,12 +1,17 @@
|
||||
#include "common.h"
|
||||
#include "psxsdk/libgte.h"
|
||||
|
||||
INCLUDE_ASM("main/nonmatchings/psxsdk/libgte/reg03", SetVertex0);
|
||||
void SetVertex0(SVECTOR* vector) { gte_ldv0(vector); }
|
||||
|
||||
INCLUDE_ASM("main/nonmatchings/psxsdk/libgte/reg03", SetVertex1);
|
||||
void SetVertex1(SVECTOR* vector) { gte_ldv1(vector); }
|
||||
|
||||
INCLUDE_ASM("main/nonmatchings/psxsdk/libgte/reg03", SetVertex2);
|
||||
void SetVertex2(SVECTOR* vector) { gte_ldv2(vector); }
|
||||
|
||||
INCLUDE_ASM("main/nonmatchings/psxsdk/libgte/reg03", SetVertexTri);
|
||||
void SetVertexTri(SVECTOR* vector1, SVECTOR* vector2, SVECTOR* vector3) {
|
||||
gte_ldv0(vector1);
|
||||
gte_ldv1(vector2);
|
||||
gte_ldv2(vector3);
|
||||
}
|
||||
|
||||
INCLUDE_ASM("main/nonmatchings/psxsdk/libgte/reg03", SetRGBfifo);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user