View Single Post
Old 23 November 2014, 22:23   #2
Cylon
Registered User

 
Join Date: Oct 2014
Location: Europe
Posts: 466
CustomCop BB2

Hm, i've never used the CustomCop cmd myself; the more useful one is CustomString.
There are some docs on BUM6 about that, the example below is a modified src from BUM6:
Code:
 NEWTYPE .mycop
    size.l            ;0 = not initialised
    coppos.l          ;location in chipmem
    colors.l
    sprites.l
    bpcons.l
    bplanes.l
    dot.l
    customs.l
    dob.l
    numbp.w:colpokes.w                  ;limits
    fetchwid.w:xand:xshift              ;for show calculations (3 words)
    ypos.w:height:res
    numsprites.w:numcols:numcustoms
    aga.w                               ;24bit=$8000 fetch = $00,$10,$20,$30
    resshift.w                          ;lo,hi,shi = 2 1 0
    setup.w                             ;lines taken for setup
    cblow.w                             ;if custom goes below 256
    sfetch.w:spres:spif:spwid:sspwid    ;sprite mode for display
 End NEWTYPE

 DEFTYPE.l

 BitMap0,320,256,5

 LoadBitMap0,"face8.iff",0

 InitCopList1,44,256,3,8,8,$FF

 VWait50

 BLITZ

 CreateDisplay1



Statement mirror {coplst.w,ypos.w}
    *myc.mycop=Addr CopList(coplst)
    #BPLMOD1=$108
    #BPLMOD2=$10A
    co$=Mki$(#BPLMOD1)+Mki$(-79)
    co$+Mki$(#BPLMOD2)+Mki$(-79)
    CustomString 1,SizeOf.mycop\customs,ypos,co$
End Statement


 DisplayBitMap1,0
 DisplayPalette1,0

 sypos=120:x.q=0                          ;testing `MIRROR'

 While Joyb(0)=0
    VWait
    x=QWrap(x+1,0,64):mirror {1,Sin(x/10)*6+sypos}
 Wend
 End

 NoCli:CloseEd
Maybe this helps?
Cylon is offline  
 
Page generated in 0.04983 seconds with 11 queries