Author : Olivier Langlois The graph2d.h file goes in the system/i386 directory Here is some numbers from the VC++ profiler to put in evidence the performance boost with the new draw_line function in assembler (almost 6 times faster): Without assembler: Func Func+Child Hit Time % Time % Count Function --------------------------------------------------------- 1113.642 11.8 1591.912 16.9 1787454 csGraphics2D::DrawPixel16(int,int,int) (graph2d.obj) 1043.590 11.1 1587.968 16.9 1 _DirectDrawEnumerateA@8 (ddraw.dll) 789.272 8.4 1526.828 16.2 29997 istream::operator>>(float &) (istrflt.obj) 746.497 7.9 2449.607 26.0 156111 csGraphics2D::DrawLine(int,int,int,int,int) (graph2d.obj) With assembler: Func Func+Child Hit Time % Time % Count Function --------------------------------------------------------- 4521.136 20.5 4521.136 20.5 158 SysGraphics2D::Print(class csRect *) (win32.obj) 3123.300 14.1 9866.318 44.7 1450914 wfLine::draw(class csGraphics3D *,class Camera *) (wirefrm.obj) 2955.659 13.4 3706.859 16.8 1450914 csGraphics2D::DrawLine(int,int,int,int,int) (graph2d.obj) 2366.681 10.7 6073.540 27.5 1450914 csGraphics3D::DrawLine(class Vector3 &,class Vector3 &,int) (graph3d.obj) 1313.554 5.9 1359.364 6.2 1 _DirectDrawEnumerateA@8 (ddraw.dll) 1149.264 5.2 1149.264 5.2 158 csGraphics2D::Clear(int) (graph2d.obj)