0 Members and 1 Guest are viewing this topic.
' By Shockwave'-------------------------------------------------------------------------- OPTION STATIC OPTION EXPLICIT '-------------------------------------------------------------------------' Includes.'------------------------------------------------------------------------- #define PTC_WIN #Include Once "tinyptc.bi"'-------------------------------------------------------------------------' Open Screen;'------------------------------------------------------------------------- If( ptc_open( "EHHH??!", 256, 256 ) = 0 ) Then End -1 End If Dim Shared As uInteger Buffer( 256 * 256 ):' Screen Buffer. '-------------------------------------------------------------------------' Main Loop;'-------------------------------------------------------------------------dim x,y,cc as integer DO for y=0 to 255 cc=Y*256 for x=0 to 255 if (x and y) = 1 then buffer(cc+x) = &hffffff else buffer(cc+x) = (x xor y) end if next next ptc_update@buffer(0) LOOP UNTIL INKEY$ = CHR$(27)
'plain old black / white checkerboard patternfor y = 0 to 256 for x = 0 to 256 checker_pattern(x,y) = ((x xor y) and 1)*255 nextnext
@mind:great! thanks for sharing the tip! :-)