All pastes #981176 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-04-11 16:10 UTC
rendered paste body
int rpolynum = read4bytes(NUMBERPOLYS);

// Coords for the polygon, x1,y1,x2,y2,x3,y3.
float rpx1;
float rpx2;
float rpx3;
float rpy1;
float rpy2;
float rpy3;

// Drawtriangle loop.
// POLYDIFF is always 0x1c.
for ( int i = 0; i <= rpolynum; i++ ) {

        rpx1 = readfloat((POLYGONS + (0x54 * i))) * scale + 500;
        rpy1 = readfloat(((POLYGONS + (0x54 * i)) + 0x4)) * scale + 300;

        rpx2 = readfloat(((POLYGONS + (0x54 * i)) + 0x1C)) * scale + 500;
        rpy2 = readfloat(((POLYGONS + (0x54 * i)) + 0x20)) * scale + 300;

        rpx3 = readfloat(((POLYGONS + (0x54 * i)) + 0x38)) * scale + 500;
        rpy3 = readfloat(((POLYGONS + (0x54 * i)) + 0x3C)) * scale + 300;

		//drawtriangle(polygonColor[getpolytype(i)],rpx1,rpy1,rpx2,rpy2,rpx3,rpy3,m_pD3Ddev);

		//cool green radar wirframe
		drawline(0xAF00FF00,rpx1,rpy1,rpx2,rpy2,m_pD3Ddev);
		drawline(0xAF00FF00,rpx2,rpy2,rpx3,rpy3,m_pD3Ddev);
		drawline(0xAF00FF00,rpx3,rpy3,rpx1,rpy1,m_pD3Ddev);
}