Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- -----------------------------------------
- * Game hacking QTS ( Quickie Tip Series )
- * no. 3 - Primitive line drawing function
- -----------------------------------------
- * Author: SEGnosis - GHAnon.net
- * Thanks to:
- * bitterbanana - No known site
- * Drunken Cheetah - No known site
- * fatboy88 - No known site
- * Geek4Ever - No known site
- * learn_more - www.uc-forum.com
- * Novocaine - http://ilsken.net/blog/?page_id=64
- * Philly0494 - No known site
- * Roverturbo - www.uc-forum.com
- * SilentKarma - www.halocoders.com - offline
- * Strife - www.uc-forum.com
- * Wieter20 - No known site
- */
- //----------------------------------//
- LPD3DXLINE g_pLine; // global
- void DrawLine ( long Xa, long Ya, long Xb, long Yb, DWORD dwWidth, D3DCOLOR Color )
- {
- D3DXVECTOR2 vLine[ 2 ]; // Two points
- g_pLine->SetAntialias( 0 ); // To smooth edges
- g_pLine->SetWidth( dwWidth ); // Width of the line
- g_pLine->Begin();
- vLine[ 0 ][ 0 ] = Xa; // Set points into array
- vLine[ 0 ][ 1 ] = Ya;
- vLine[ 1 ][ 0 ] = Xb;
- vLine[ 1 ][ 1 ] = Yb;
- g_pLine->Draw( vLine, 2, Color ); // Draw with Line, number of lines, and color
- g_pLine->End(); // finish
- }
- //----------------------------------//
- //----------------------------------//
- if( !g_pLine )
- D3DXCreateLine( pDevice, &g_pLine ); // Make sure to create before calling DrawLine, use in endscene, present, etc
- //----------------------------------//
- // Make sure to reset as well to avoid crashes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement