![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
I started reading and playing around with the GTE - and as always I run into various problems. (I wonder why am I always the guy asking those things >o<)
My plan is to display a simple 2D rectangle with a texture, with all the GTE stuff happening but with a rotation and translation of 0 - also with no perspective. So Basicly I want to see my sprite.
The good thing is: I see my sprite ^o^ The bad thing... it is 2 times bigger then it should be and it refuses to shrink in size :/
My GTE setup code looks like that:
Code: Select all
VECTOR transV{0, 0, 0};
SVECTOR rotV{0, 0, 0};
//We run in PAL mode
SetVideoMode(MODE_PAL);
SsSetTickMode(SS_TICK50);
/*
Setting up double buffer and such
*/
InitGeom();
SetGeomOffset(0, 0);
SetGeomScreen(512);
TransMatrix(&trans, &transV);
RotMatrix_gte(&rotV, &rot);
SetRotMatrix(&rot);
SetTransMatrix(&trans);
SetDispMask(0);
Code: Select all
SVECTOR inputCoordinates[] =
{
this->position,
{(this->position.vx + Flammie::Width), this->position.vy, this->position.vz},
{ this->position.vx, (this->position.vy + Flammie::Height), this->position.vz},
{(this->position.vx + Flammie::Width), (this->position.vy + Flammie::Height), this->position.vz}
};
long p;
long flag;
RotAverage4(&inputCoordinates[0], &inputCoordinates[1], &inputCoordinates[2], &inputCoordinates[3],
(long*)&this->ouput.x0, (long*)&this->ouput.x1, (long*)&this->ouput.x2, (long*)&this->ouput.x3,
&p, &flag);
I also tried applying a scaling vector in my setup phase - but no matter what I do it stays two times its size :/
Code: Select all
MATRIX scaly;
VECTOR scaleV{2048, 2048, 2048};
SetRotMatrix(&rot);
SetTransMatrix(&trans);
MulRotMatrix(&scaly);
Also... is there some explaining reading material to pick up on those subjects?