#include "AFlib3_Sprite.bi"
#include "AFlib3_Font.bi"
#include "AFlib3_Primitives.bi"
#include "AFlib3_Miscellaneous.bi"

Dim Full_or_Windowed as integer = 0 '<----- Pass '0' for Windowed Mode; or
                                    '            '1' for Fullscreen Mode.



Declare Sub ShadowPrint ( Byref text as String, _ 
                          Byval x as Integer, Byval y as Integer, _ 
                          Byval col as Integer, Byval sh_x as Integer, _ 
                          Byval sh_y as Integer, Byval sh_col as Integer, _
                          Byval fontface as Integer ) 

Dim BitDepth as integer = 24


'========================================================================== 
'/////// S T A R T   O F   M A I N   P O R T I O N 
'========================================================================== 

ScreenRes 424, 96 , , 0
Windowtitle "AFlib III -- Drawing Primitives Test"
Color 15, 1: ? "          Please select your color depth!!!          "
Locate 4: Color 15, 0
Locate , 17: Color 10: ? "[1] ";: Color 14: ? "- 15-bit color": ?
Locate , 17: Color 10: ? "[2] ";: Color 14: ? "- 16-bit color": ?
Locate , 17: Color 10: ? "[3] ";: Color 14: ? "- 24-bit color": ?
Locate , 17: Color 10: ? "[4] ";: Color 14: ? "- 32-bit color"

Do
  Select case Inkey$
    Case "1": BitDepth = 15: Exit Do
    Case "2": BitDepth = 16: Exit Do
    Case "3": BitDepth = 24: Exit Do
    Case "4": BitDepth = 32: Exit Do
  End Select
Loop
Cls

ScreenRes 424, 280, , , 0
Color 15, 1: ? "         Please select your graphics mode!!!         "
Locate 4: Color 15, 0
Locate , 27: Color 10: ? "[1] ";: Color 14: ? "- 320x200"
Locate , 27: ?
Locate , 27: Color 10: ? "[2] ";: Color 14: ? "- 320x240"
Locate , 27: ?
Locate , 27: Color 10: ? "[3] ";: Color 14: ? "- 400x300"
Locate , 27: ?
Locate , 27: Color 10: ? "[4] ";: Color 14: ? "- 512x384"
Locate , 27: ?
Locate , 27: Color 10: ? "[5] ";: Color 14: ? "- 640x400"
Locate , 27: ?
Locate , 27: Color 10: ? "[6] ";: Color 14: ? "- 640x480"
Locate , 27: ?
Locate , 27: Color 10: ? "[7] ";: Color 14: ? "- 720x480"
Locate , 27: ?
Locate , 27: Color 10: ? "[8] ";: Color 14: ? "- 720x576"
Locate , 27: ?
Locate , 27: Color 10: ? "[9] ";: Color 14: ? "- 800x600"
Locate , 27: ?
Locate , 27: Color 10: ? "[0] ";: Color 14: ? "- 1024x768"
Locate , 27: ?
Locate , 27: Color 10: ? "[A] ";: Color 14: ? "- 1152x864"
Locate , 27: ?
Locate , 27: Color 10: ? "[B] ";: Color 14: ? "- 1280x720"
Locate , 27: ?
Locate , 27: Color 10: ? "[C] ";: Color 14: ? "- 1280x1024"
Locate , 27: ?
Locate , 27: Color 10: ? "[D] ";: Color 14: ? "- 1600x1200"
Locate , 27: ?
Locate , 27: Color 10: ? "[E] ";: Color 14: ? "- 1920x1080"
Locate 6, 5: Color 15: ? BitDepth; "-bit color"
Locate 7, 10: Color 15: ? "is selected!"

Do
  Select case Inkey$
    Case "1": ScreenRes 320, 200, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "2": ScreenRes 320, 240, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "3": ScreenRes 400, 300, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "4": ScreenRes 512, 384, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "5": ScreenRes 640, 400, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "6": ScreenRes 640, 480, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "7": ScreenRes 720, 480, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "8": ScreenRes 720, 576, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "9": ScreenRes 800, 600, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "0": ScreenRes 1024, 768, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "A", "a": ScreenRes 1152, 864, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "B", "b": ScreenRes 1280, 720, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "C", "c": ScreenRes 1280, 1024, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "D", "d": ScreenRes 1600, 1200, BitDepth, 2, Full_or_Windowed: Exit Do
    Case "E", "e": ScreenRes 1920, 1080, BitDepth, 2, Full_or_Windowed: Exit Do
  End Select
Loop
SetMouse , , 0

Dim as Integer Screen_h, Screen_v
SetMouse , , 0

Windowtitle "AFlib III -- Drawing Primitives Test"

Dim as Integer GFX_h, GFX_v
ScreenInfo GFX_h, GFX_v

Dim as Integer t, stime, BlitsPerSecond, BlitsPerSecond_max(1 to 30), TimeLeft, Rcol, waiting

Color RGB(255, 255, 30), RGB(0, 0, 128): Locate 1, 1: ? "------- A F l i b   I I I -------"
Color RGB(255, 205, 155), 0: Locate 2, 5: ? "Drawing Primitives Test"

If GFX_h > 320 then
  Color RGB(255, 255, 255), 0: Locate 4, 1: ? "(c)2005-2016 Adigun Azikiwe Polack/Aura Flow."
else
  Color RGB(255, 255, 255), 0: Locate 4, 1: ? "(c)2005-2016 AAP/Aura Flow."
End if
Color RGB(255, 255, 255), 0: Locate 5, 1: ? "All Rights Reserved."

Locate 7, 1: ? "Now Starting...";
For waiting = 0 to 9
  ? ".";: Sleep 500
Next

AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Pixel" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Pixel Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 128
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(1) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Pixel", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(1))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4
While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Pixel_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Pixel_add Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 28
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(2) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Pixel_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(2))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Pixel_custom" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Pixel_custom Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), int(rnd(1)*5) + 1
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(3) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Pixel_custom", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(3))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Line" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Line Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 128
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(4) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Line", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(4))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Line_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Line_add Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 28
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(5) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Line_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(5))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Line_custom" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Line_custom Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), int(rnd(1)*5) + 1
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(6) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Line_custom", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(6))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Box" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Box Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 128
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(7) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Box", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(7))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Box_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Box_add Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 10
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(8) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Box_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(8))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Box_custom" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Box_custom Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), int(rnd(1)*5) + 1
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(9) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Box_custom", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(9))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_FilledBox" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_FilledBox Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 128
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(10) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_FilledBox", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(10))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_FilledBox_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_FilledBox_add Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 10
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(11) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_FilledBox_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(11))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_FilledBox_custom" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_FilledBox_custom Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), int(rnd(1)*5) + 1
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(12) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_FilledBox_custom", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(12))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_SubPixel" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_SubPixel Int(rnd(1) * ((GFX_h * 10) - 1)) / 10, Int(rnd(1) * ((GFX_h * 10) - 1)) / 10, RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 128
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(13) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_SubPixel", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(13))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_SubPixel_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_SubPixel_add Int(rnd(1) * ((GFX_h * 10) - 1)) / 10, Int(rnd(1) * ((GFX_h * 10) - 1)) / 10, RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 32
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(14) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_SubPixel_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(14))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_SubLine" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_SubLine Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 128
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(15) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_SubLine", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(15))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_SubLine_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_SubLine_add Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 28
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(16) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_SubLine_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(16))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Triangle" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Triangle Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 128', custbuffer
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(17) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Triangle", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(17))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Triangle_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Triangle_add Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 28
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(18) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Triangle_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(18))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Triangle_solid" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Triangle_solid Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1))
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(19) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Triangle_solid", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(19))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_SubTriangle" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_SubTriangle Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 128
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(20) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_SubTriangle", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(20))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_SubTriangle_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_SubTriangle_add Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 28
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(21) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_SubTriangle_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(21))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_FilledTriangle" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_FilledTriangle Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 128
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(22) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_FilledTriangle", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(22))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_FilledTriangle_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_FilledTriangle_add Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 28
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(23) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_FilledTriangle_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(23))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_FilledTriangle_solid" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_FilledTriangle_solid Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1))
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(24) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_FilledTriangle_solid", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(24))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Circle" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Circle Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), (int(rnd(1)*50) + 1) / 10, int(rnd(1)*199) + 1, RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 105
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(25) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Circle", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(25))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Circle_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Circle_add Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), (int(rnd(1)*50) + 1) / 10, int(rnd(1)*199) + 1, RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 25
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(26) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Circle_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(26))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_FilledCircle" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_FilledCircle Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), (int(rnd(1)*50) + 1) / 10, int(rnd(1)*199) + 1, RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 105
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(27) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_FilledCircle", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(27))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_FilledCircle_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_FilledCircle_add Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), (int(rnd(1)*50) + 1) / 10, int(rnd(1)*199) + 1, RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), 25
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(28) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_FilledCircle_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(28))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Globe" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Globe Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), (int(rnd(1)*50) + 1) / 10, int(rnd(1)*99) + 1, RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), int(rnd(1)*50) + 1, 125
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(29) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Globe", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(29))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

'----- Testing for "AFlibIII_Globe_add" ------------------------------------------

BlitsPerSecond = 0
TimeLeft = 5
Do
  AFlibIII_Globe_add Int(rnd(1) * (GFX_h - 1)), Int(rnd(1) * (GFX_v - 1)), (int(rnd(1)*50) + 1) / 10, int(rnd(1)*99) + 1, RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), RGB(int(rnd(1)*255 + 1), int(rnd(1)*255 + 1), int(rnd(1)*255 + 1)), int(rnd(1)*50) + 1, 24
  BlitsPerSecond += 1
  t = (timer - stime) * 2
  If t > 2 then
    BlitsPerSecond_max(30) = BlitsPerSecond
    BlitsPerSecond = 0
    stime = timer
    TimeLeft -= 1
  End if
Loop until TimeLeft = 0

AFlibIII_FilledBox 0, 0, GFX_h - 1, 16, 0, 120
ShadowPrint "AFlibIII_Globe_add", 0, 0, RGB(255, 255, 255), 1, 1, RGB(120, 120, 120), 4
ShadowPrint "Blits per Second: " + Ltrim$(str$(BlitsPerSecond_max(30))), 0, 8, RGB(255, 255, 30), 1, 1, RGB(128, 128, 24), 4

While inkey$ <> "": Wend
Sleep 4000
AFlibIII_ClearDisplay RGB(0, 0, 0)

ScreenRes 456, 360, , , 0

Windowtitle "AFlib III -- Drawing Primitives Test Results!"
Locate 1, 1
Color 15, 1: ? "----- Drawing Primitives Test Results (AFlib III): ------"
?
Color 10, 0: print "M o d e   S e l e c t e d :"
Color 15, 0: ? GFX_h; "x"; Ltrim(Str$(GFX_v)); " graphics mode ("; Ltrim(Str$(BitDepth)); "-bit color)"
?: ?

Color 14, 0: print "AFlibIII_Pixel -----------------";
Color 31, 0: ? BlitsPerSecond_max(1); " blits/second"

Color 14, 0: print "AFlibIII_Pixel_add -------------";
Color 31, 0: ? BlitsPerSecond_max(2); " blits/second"

Color 14, 0: print "AFlibIII_Pixel_custom ----------";
Color 31, 0: ? BlitsPerSecond_max(3); " blits/second"

Color 14, 0: print "AFlibIII_Line ------------------";
Color 31, 0: ? BlitsPerSecond_max(4); " blits/second"

Color 14, 0: print "AFlibIII_Line_add --------------";
Color 31, 0: ? BlitsPerSecond_max(5); " blits/second"

Color 14, 0: print "AFlibIII_Line_custom -----------";
Color 31, 0: ? BlitsPerSecond_max(6); " blits/second"

Color 14, 0: print "AFlibIII_Box -------------------";
Color 31, 0: ? BlitsPerSecond_max(7); " blits/second"

Color 14, 0: print "AFlibIII_Box_add ---------------";
Color 31, 0: ? BlitsPerSecond_max(8); " blits/second"

Color 14, 0: print "AFlibIII_Box_custom ------------";
Color 31, 0: ? BlitsPerSecond_max(9); " blits/second"

Color 14, 0: print "AFlibIII_FilledBox -------------";
Color 31, 0: ? BlitsPerSecond_max(10); " blits/second"

Color 14, 0: print "AFlibIII_FilledBox_add ---------";
Color 31, 0: ? BlitsPerSecond_max(11); " blits/second"

Color 14, 0: print "AFlibIII_FilledBox_custom ------";
Color 31, 0: ? BlitsPerSecond_max(12); " blits/second"

Color 14, 0: print "AFlibIII_SubPixel --------------";
Color 31, 0: ? BlitsPerSecond_max(13); " blits/second"

Color 14, 0: print "AFlibIII_SubPixel_add ----------";
Color 31, 0: ? BlitsPerSecond_max(14); " blits/second"

Color 14, 0: print "AFlibIII_SubLine ---------------";
Color 31, 0: ? BlitsPerSecond_max(15); " blits/second"

Color 14, 0: print "AFlibIII_SubLine_add -----------";
Color 31, 0: ? BlitsPerSecond_max(16); " blits/second"

Color 14, 0: print "AFlibIII_Triangle --------------";
Color 31, 0: ? BlitsPerSecond_max(17); " blits/second"

Color 14, 0: print "AFlibIII_Triangle_add ----------";
Color 31, 0: ? BlitsPerSecond_max(18); " blits/second"

Color 14, 0: print "AFlibIII_Triangle_solid --------";
Color 31, 0: ? BlitsPerSecond_max(19); " blits/second"

Color 14, 0: print "AFlibIII_SubTriangle -----------";
Color 31, 0: ? BlitsPerSecond_max(20); " blits/second"

Color 14, 0: print "AFlibIII_SubTriangle_add -------";
Color 31, 0: ? BlitsPerSecond_max(21); " blits/second"

Color 14, 0: print "AFlibIII_FilledTriangle --------";
Color 31, 0: ? BlitsPerSecond_max(22); " blits/second"

Color 14, 0: print "AFlibIII_FilledTriangle_add ----";
Color 31, 0: ? BlitsPerSecond_max(23); " blits/second"

Color 14, 0: print "AFlibIII_FilledTriangle_solid --";
Color 31, 0: ? BlitsPerSecond_max(24); " blits/second"

Color 14, 0: print "AFlibIII_Circle ----------------";
Color 31, 0: ? BlitsPerSecond_max(25); " blits/second"

Color 14, 0: print "AFlibIII_Circle_add ------------";
Color 31, 0: ? BlitsPerSecond_max(26); " blits/second"

Color 14, 0: print "AFlibIII_FilledCircle ----------";
Color 31, 0: ? BlitsPerSecond_max(27); " blits/second"

Color 14, 0: print "AFlibIII_FilledCircle_add ------";
Color 31, 0: ? BlitsPerSecond_max(28); " blits/second"

Color 14, 0: print "AFlibIII_Globe -----------------";
Color 31, 0: ? BlitsPerSecond_max(29); " blits/second"

Color 14, 0: print "AFlibIII_Globe_add -------------";
Color 31, 0: ? BlitsPerSecond_max(30); " blits/second"

?: ?: ?: ? "Press any key to end, please."

AFlibIII_ConsoleEdit_Open
AFlibIII_ConsoleEdit_Print "--- Drawing Primitives Test Results (AFlib III): ---"
AFlibIII_ConsoleEdit_Print ""
AFlibIII_ConsoleEdit_Print ""
AFlibIII_ConsoleEdit_Print "M o d e   S e l e c t e d :"
AFlibIII_ConsoleEdit_Print Ltrim(Str$(GFX_h)) + "x" + Ltrim(Str$(GFX_v)) + " graphics mode (" + Ltrim(Str$(BitDepth)) + "-bit color)"
AFlibIII_ConsoleEdit_Print ""
AFlibIII_ConsoleEdit_Print "AFlibIII_Pixel -----------------" + Ltrim(Str$(BlitsPerSecond_max(1))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Pixel_add -------------" + Ltrim(Str$(BlitsPerSecond_max(2))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Pixel_custom ----------" + Ltrim(Str$(BlitsPerSecond_max(3))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Line ------------------" + Ltrim(Str$(BlitsPerSecond_max(4))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Line_add --------------" + Ltrim(Str$(BlitsPerSecond_max(5))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Line_custom -----------" + Ltrim(Str$(BlitsPerSecond_max(6))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Box -------------------" + Ltrim(Str$(BlitsPerSecond_max(7))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Box_add ---------------" + Ltrim(Str$(BlitsPerSecond_max(8))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Box_custom ------------" + Ltrim(Str$(BlitsPerSecond_max(9))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_FilledBox -------------" + Ltrim(Str$(BlitsPerSecond_max(10))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_FilledBox_add ---------" + Ltrim(Str$(BlitsPerSecond_max(11))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_FilledBox_custom ------" + Ltrim(Str$(BlitsPerSecond_max(12))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_SubPixel --------------" + Ltrim(Str$(BlitsPerSecond_max(13))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_SubPixel_add ----------" + Ltrim(Str$(BlitsPerSecond_max(14))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_SubLine ---------------" + Ltrim(Str$(BlitsPerSecond_max(15))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_SubLine_add -----------" + Ltrim(Str$(BlitsPerSecond_max(16))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Triangle --------------" + Ltrim(Str$(BlitsPerSecond_max(17))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Triangle_add ----------" + Ltrim(Str$(BlitsPerSecond_max(18))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Triangle_solid --------" + Ltrim(Str$(BlitsPerSecond_max(19))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_SubTriangle -----------" + Ltrim(Str$(BlitsPerSecond_max(20))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_SubTriangle_add -------" + Ltrim(Str$(BlitsPerSecond_max(21))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_FilledTriangle --------" + Ltrim(Str$(BlitsPerSecond_max(22))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_FilledTriangle_add ----" + Ltrim(Str$(BlitsPerSecond_max(23))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_FilledTriangle_solid --" + Ltrim(Str$(BlitsPerSecond_max(24))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Circle ----------------" + Ltrim(Str$(BlitsPerSecond_max(25))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Circle_add ------------" + Ltrim(Str$(BlitsPerSecond_max(26))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_FilledCircle ----------" + Ltrim(Str$(BlitsPerSecond_max(27))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_FilledCircle_add ------" + Ltrim(Str$(BlitsPerSecond_max(28))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Globe -----------------" + Ltrim(Str$(BlitsPerSecond_max(29))) + " blits/second"
AFlibIII_ConsoleEdit_Print "AFlibIII_Globe_add -------------" + Ltrim(Str$(BlitsPerSecond_max(30))) + " blits/second"
AFlibIII_ConsoleEdit_Close

Sleep

AFlibIII_EndProgram








'__________________________________________________________________________ 
Sub ShadowPrint ( Byref text as String, _ 
                  Byval x as Integer, Byval y as Integer, _ 
                  Byval col as Integer, Byval sh_x as Integer, _ 
                  Byval sh_y as Integer, Byval sh_col as Integer, _
                  Byval fontface as Integer ) 

AFlibIII_Print text, x + sh_x, y + sh_y, 1, 1, sh_col, 0, 0, fontface
AFlibIII_Print text, x, y, 1, 1, col, 0, 0, fontface

End Sub