my uv is:
Code: Select all
DVECTOR uvs[4] = {
{ 0, 127 },
{ 127, 127 },
{ 127, 0 },
{ 0, 0 },
};
Code: Select all
RECT texRect = {0, 0, 32>>3, 32>>3};
DR_TWIN* ptwin = (DR_TWIN*)db_nextpri;
setTexWindow(ptwin, &texRect);
addPrim(_orderingTable, ptwin);
ptwin++;
db_nextpri = (uint8_t*)ptwin;
GeometryType *pol4 = (GeometryType *)db_nextpri;
// Load the first 3 vertices of a quad to the GTE
gte_ldv3(
&values[0],
&values[1],
&values[2]);
// Rotation, Translation and Perspective Triple
gte_rtpt();
...
...
...
pol4->tpage = getTPage(texture->mode, 0, texture->prect->x, texture->prect->y);
if (texture->mode & 0x8)
{
// Set CLUT
setClut(pol4, texture->crect->x, texture->crect->y);
}
// setUV3 1, 0, 2
pol4->u0 = uvs[0].vx;
pol4->v0 = uvs[0].vy;
pol4->u1 = uvs[1].vx;
pol4->v1 = uvs[1].vy;
pol4->u2 = uvs[2].vx;
pol4->v2 = uvs[2].vy;