' \/\/\/\/\/\/\/\/\/
' Load texture image
' /\/\/\/\/\/\/\/\/\
 
' \/\/\/\/\/\/\/\/\/\/
' Center of the screen
' /\/\/\/\/\/\/\/\/\/\
cw = 250
ch = 250
 
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Width and Height of the texture
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
w = 480
h = 480
 
' \/\/\/\/\/\/\/\/\/\/\/\/\/
' Location to put the images
' /\/\/\/\/\/\/\/\/\/\/\/\/\
tx = cw - w \ 2
ty = ch - h \ 2
 
    fcirc 250 + 200 + dx, 250, 250 + 2 * dx
 
Text = "Creating Mars planet.... "
 
' \/\/\/\/\/\/
' Mars images
' /\/\/\/\/\/\
' \/\/\/\/\/\/\/\/\/
' Start with frame 1
' /\/\/\/\/\/\/\/\/\
frames = 1
 
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Scroll the texture the width of the texture
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
    ' \/\/\/\/\/\/\/\/\/\/\/
    ' Draw to the Mars image
    ' /\/\/\/\/\/\/\/\/\/\/\
 
    '_PUTIMAGE (tx, ty), Texture, , (x, 0)-(w, h)
    '_PUTIMAGE (tx + w - x, ty), Texture, , (1, 0)-(x, h)
    _PUTIMAGE (w 
- x
, 0), Texture
, , (1, 0)-(x
, h
)     ' \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
    ' Remove all extra image data from outside the circle
    ' /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
    ' \/\/\/\/\/\/\/\/\/\/
    ' Increase frame count
    ' /\/\/\/\/\/\/\/\/\/\
    frames = frames + 1
 
' \/\/\/\/\/\/\/\/\/\/\/\/\/
' Set destination to screen
' /\/\/\/\/\/\/\/\/\/\/\/\/\
 
' \/\/\/\/\/\/\/\/
' Erase the screen
' /\/\/\/\/\/\/\/\
LINE (0, 0)-(800, 600), _RGB(0, 0, 0), BF
  
' \/\/\/\/\/\/\/\/\/\/\/\/\/\/
' Repeat until ESC is pressed
' /\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
    ' \/\/\/\/\/\/\/\/\/\/
    ' Show the planet Mars
    ' /\/\/\/\/\/\/\/\/\/\
 
'Steve McNeil's  copied from his forum   note: Radius is too common a name
 
    RadiusError = -subRadius
    X = subRadius
    Y = 0
 
 
    ' Draw the middle span here so we don't draw it twice in the main loop,
    ' which would be a problem with blending turned on.
    LINE (CX 
- X
, CY
)-(CX 
+ X
, CY
), , BF
  
        RadiusError = RadiusError + Y * 2 + 1
                LINE (CX 
- Y
, CY 
- X
)-(CX 
+ Y
, CY 
- X
), , BF
                 LINE (CX 
- Y
, CY 
+ X
)-(CX 
+ Y
, CY 
+ X
), , BF
             X = X - 1
            RadiusError = RadiusError - X * 2
        Y = Y + 1
        LINE (CX 
- X
, CY 
- Y
)-(CX 
+ X
, CY 
- Y
), , BF
         LINE (CX 
- X
, CY 
+ Y
)-(CX 
+ X
, CY 
+ Y
), , BF