34 lines
701 B
C
34 lines
701 B
C
#include <cvg.h>
|
|
#include <sst1init.h>
|
|
|
|
#include "Draw.h"
|
|
|
|
#define XY_ONE (1<<SST_XY_FRACBITS)
|
|
|
|
void
|
|
drawTriangle( const SstRegs *sst,
|
|
const int x,
|
|
const int y,
|
|
const int tSize)
|
|
{
|
|
ISET(sst->vA.x,x);
|
|
ISET(sst->vA.y,y);
|
|
ISET(sst->vB.x,x+XY_ONE*tSize);
|
|
ISET(sst->vB.y,y);
|
|
ISET(sst->vC.x,x);
|
|
ISET(sst->vC.y,y+XY_ONE*tSize);
|
|
ISET(sst->s,0);
|
|
ISET(sst->t,0);
|
|
ISET(sst->w,0);
|
|
ISET(sst->dsdx,1<<SST_ST_FRACBITS);
|
|
ISET(sst->dtdx,0);
|
|
ISET(sst->dwdx,0);
|
|
ISET(sst->dsdy,0);
|
|
ISET(sst->dtdy,1<<SST_ST_FRACBITS);
|
|
ISET(sst->dwdy,0);
|
|
ISET(sst->triangleCMD,0);
|
|
ISET(sst->vB.x, (x<<SST_XY_FRACBITS));
|
|
ISET(sst->vB.y, ((y+tSize)<<SST_XY_FRACBITS));
|
|
ISET(sst->triangleCMD, 0xFFFFFFFF);
|
|
}
|