rjDrawLineList - shaddatic/sa2b-render-fix GitHub Wiki
Prototype
void rjDrawLineList( const NJS_POINT2* vtx, Float ooz, Sint32 Count, Float r, Uint32 Color )
API
void (*DrawLineList)( const NJS_POINT2* vtx, Float ooz, Sint32 Count, Float r, Uint32 Color )
Ninja
N/A
Parameters
const NJS_POINT2* vtx
Line vertex list
Float ooz
One over Z depth, ie hardware depth
Int Count
Line count
Float r
Line width in hardware units
Int Color
Line color. Translucent drawing is used if Alpha component is != 0xFF
Returns
No return value.
Description
Draw 'n' line list vertexes in hardware units.
Example
This example will draw a 64x64, opaque, box out of 4 red lines in the center of the screen at half depth. The lines will have a width of 2 pixels.
#define NUM_LINE 4
#define NUM_VTX NUM_LINE * 2
// set vertex list
NJS_POINT2 vtx[NUM_VTX] =
{
// x, y
{ 288.f, 208.f }, // line 1: top left
{ 288.f, 272.f }, // line 1: bottom left
{ 288.f, 272.f }, // line 2: bottom left
{ 352.f, 272.f }, // line 2: bottom right
{ 352.f, 272.f }, // line 3: bottom right
{ 352.f, 208.f }, // line 3: top right
{ 352.f, 208.f }, // line 4: top right
{ 288.f, 208.f }, // line 4: top left, again
};
// draw lines
rjDrawLineList( vtx, 0.5f, NUM_VTX, 2.f, 0xFFFF0000 ); // <<<<<<<<
Related Functions
- rjDrawLineStrip() Draw a line strip