Integrate all the progress into master #6

Merged
jaby merged 595 commits from ToolBox into main 2025-01-01 13:17:44 +00:00
1 changed files with 20 additions and 0 deletions
Showing only changes of commit d361c5504c - Show all commits

View File

@ -41,6 +41,26 @@ namespace JabyEngine {
__asm__ volatile("ctc2 $14, $4" :: "r"(&matrix) : "$12", "$13", "$14");
}
static MATRIX get_rot_matrix() {
MATRIX matrix = {0};
// TODO: v why is this needed?
// TODO: v what is this? v
// TODO: v v what exactly is this register?
__asm__ volatile("cfc2 $12, $0" :: "r"(&matrix) : "$12", "$13", "$14", "memory");
__asm__ volatile("cfc2 $13, $1" :: "r"(&matrix) : "$12", "$13", "$14", "memory");
__asm__ volatile("sw $12, 0(%0)" :: "r"(&matrix) : "$12", "$13", "$14", "memory");
__asm__ volatile("sw $13, 4(%0)" :: "r"(&matrix) : "$12", "$13", "$14", "memory");
__asm__ volatile("cfc2 $12, $2" :: "r"(&matrix) : "$12", "$13", "$14", "memory");
__asm__ volatile("cfc2 $13, $3" :: "r"(&matrix) : "$12", "$13", "$14", "memory");
__asm__ volatile("cfc2 $14, $4" :: "r"(&matrix) : "$12", "$13", "$14", "memory");
__asm__ volatile("sw $12, 8(%0)" :: "r"(&matrix) : "$12", "$13", "$14", "memory");
__asm__ volatile("sw $13, 12(%0)" :: "r"(&matrix) : "$12", "$13", "$14", "memory");
__asm__ volatile("sw $14, 16(%0)" :: "r"(&matrix) : "$12", "$13", "$14", "memory");
return matrix;
}
/*
SetTransMatrix