# HG changeset patch # User Matti Hamalainen # Date 1348834541 -10800 # Node ID f2f6963080bdfd43821770ecfa5e2ae529a810aa # Parent 997e26f1794658f7065f7f3aab59f214c1eb7904 Add test for line drawing. diff -r 997e26f17946 -r f2f6963080bd vptest.c --- a/vptest.c Fri Sep 28 15:15:33 2012 +0300 +++ b/vptest.c Fri Sep 28 15:15:41 2012 +0300 @@ -206,6 +206,8 @@ SDL_WM_SetCaption("Halleluja", "DMT"); } + Uint32 lcol = dmMapRGB(screen, 255,255,255); + int numFrames = 0, startTime = SDL_GetTicks(), endTime = 0; exitFlag = FALSE; @@ -289,6 +291,10 @@ 128 + sin(f*0.1) * 120.0f); #endif + dmDrawLineAny(screen, 30, 30, 600 + 200 * sin(f), 250 , lcol, DMD_NONE); + dmDrawLineAny(screen, 20, 30, 100 , 250 + 100 * sin(f), lcol, DMD_NONE); + dmDrawLineAny(screen, 100, 100, 100 + cos(f) * 50, 100 + sin(f) * 50, lcol, DMD_NONE); + if (!optBenchmark) { dmDrawTTFText(screen, font, fontcol, 0, 0, "%3.1f FPS",