' imgputt() sample. RGB = (255, 0, 255) is transparent ' ' Usage : imgputt_test.exe BPP ' BPP : 8 or 16 or 32 ' ' Last updated: <2024/02/07 05:35:50 +0900> '#include "imgputt.bi" #include "imgputt_new.bi" Dim As Integer bpp = 32 Select Case Command(1) Case "32" : bpp = 32 Case "16" : bpp = 16 Case "8" : bpp = 8 Case "/?", "-h", "--help" Print "Usage : " & Command(0) & " [BPP]" Print " BPP : 8, 16, 32" : end End Select screenres 512, 512, bpp Dim As Any Ptr p = ImageCreate(101, 101) Select Case bpp Case 32 : Bload "sprite_24bit.bmp", p Case 16 : Bload "sprite_16bit.bmp", p Case 8 : Bload "sprite_8bit.bmp", p : color 14, 15 : cls End Select ' Draw Dim As Integer x = 10 Dim As Integer y = 10 Dim As Integer w = 110 For mode As Integer = 0 To 1 'mode = 0 : Trans, 1 : Pset imgputt( p, , x + w * 0, y, 0, mode) imgputt( p, , x + w * 1, y, 90, mode) imgputt( p, , x + w * 2, y, 180, mode) imgputt( p, , x + w * 3, y, 270, mode) y += 120 imgputt( p, , x + w * 0, y, TRANSFORM_HFLIP, mode ) imgputt( p, , x + w * 1, y, TRANSFORM_VFLIP, mode ) imgputt( p, , x + w * 2, y, TRANSFORM_D1FLIP, mode ) imgputt( p, , x + w * 3, y, TRANSFORM_D2FLIP, mode ) y += 120 Next mode Print "BPP: " & bpp imagedestroy p sleep