Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
trying to draw a better moon
#2
Missing Dim Shared or setting of the variables that were supposed to black out the last image ie img_maxx and img_maxy.  Also CLS seems to work instead of Line statement:
Code: (Select All)
Function craters (mx, my, mrd, mk&)
    ' put craters on those moons
    crmax = mrd * .24
    numk = Int(Rnd * 24) + 12
    _Dest cp&
    Cls
    'Line (0, 0)-(img_maxx - 1, img_maxy - 1), _RGB32(0, 0, 0) ' <---- why isn't this overwritng the old image on cp&
    For k = 1 To numk
        crad = Int(Rnd * crmax) + 1
        cgominx = mx - mrd + crad: cgomax = mx + mrd - crad
        cgominy = my - mrd + crad: cgomay = my + mrd - crad
        cx = Int(Rnd * (cgomax - cgominx)) + cgominx + 1
        cy = Int(Rnd * (cgomay - cgominy)) + cgominy + 1
        nk& = mk&
        orb cx, cy, crad, nk&, 1.9

    Next k
    _Dest MS&
    cratercopy mx, my, mrd
    _Source MS&
    _Dest MS&

    craters = numk
End Function
b = b + ...
Reply


Messages In This Thread
trying to draw a better moon - by James D Jarvis - 05-19-2022, 02:10 PM
RE: trying to draw a better moon - by bplus - 05-19-2022, 03:51 PM
RE: trying to draw a better moon - by bplus - 05-19-2022, 04:18 PM
RE: trying to draw a better moon - by bplus - 05-19-2022, 04:41 PM
RE: trying to draw a better moon - by bplus - 05-21-2022, 01:17 AM
RE: trying to draw a better moon - by Pete - 05-21-2022, 01:41 AM



Users browsing this thread: 1 Guest(s)