Integrate all the progress into master #6

Merged
jaby merged 595 commits from ToolBox into main 2025-01-01 13:17:44 +00:00
3 changed files with 11 additions and 6 deletions
Showing only changes of commit 101baed5da - Show all commits

View File

@ -30,9 +30,9 @@ namespace GTETest {
return true; return true;
} }
const auto matrix = GTE::MATRIX::rotation(0, 0, rotation); auto matrix = GTE::MATRIX::rotation(0, rotation, rotation);
GTE::set_trans_matrix(matrix); matrix.trans[0] = (Assets::Main::DoenerFishInfo.size.width/2);
GTE::set_rot_matrix(matrix); matrix.trans[1] = (Assets::Main::DoenerFishInfo.size.height/2);
doener_fish.apply(matrix); doener_fish.apply(matrix);
rotation += 5_DEG; rotation += 5_DEG;

View File

@ -19,10 +19,15 @@ namespace GTETest {
void apply(const GTE::MATRIX& matrix) { void apply(const GTE::MATRIX& matrix) {
static const auto apply_to = [](const GTE::MATRIX& matrix, GTE::SVECTOR vector) -> GPU::Vertex { static const auto apply_to = [](const GTE::MATRIX& matrix, GTE::SVECTOR vector) -> GPU::Vertex {
GTE::MATRIX move_back = GTE::MATRIX::identity();
GTE::SVECTOR output; GTE::SVECTOR output;
int32_t flag; int32_t flag;
return GTE::apply_matrix(matrix, vector, output).to<GPU::Vertex>(); move_back.trans[0] = -matrix.trans[0];
move_back.trans[1] = -matrix.trans[1];
move_back.trans[2] = -matrix.trans[2];
return GTE::apply_matrix(matrix, GTE::apply_matrix(move_back, vector, output), output).to<GPU::Vertex>();
}; };
const auto& area = this->area; const auto& area = this->area;

View File

@ -45,10 +45,10 @@ namespace JabyEngine {
SVECTOR& apply_matrix(const MATRIX& m0, const SVECTOR& v0, SVECTOR& v1) { SVECTOR& apply_matrix(const MATRIX& m0, const SVECTOR& v0, SVECTOR& v1) {
// TODO: Do we want to push here? // TODO: Do we want to push here?
set_rot_matrix(m0); set_matrix(m0);
JabyEngine::GTE::ldv0(v0); JabyEngine::GTE::ldv0(v0);
JabyEngine::GTE::rtv0(); JabyEngine::GTE::rt();
JabyEngine::GTE::stsv(v1); JabyEngine::GTE::stsv(v1);
return v1; return v1;
} }