English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. General (http://eab.abime.net/forumdisplay.php?f=37)
-   -   Blitz Basic CustomCop command (http://eab.abime.net/showthread.php?t=75641)

JPQ 01 November 2014 17:31

Blitz Basic CustomCop command only thing what i dont understand is how string is (first parameter) defined for CustomCop? if i need copper command which is hex FFFE (fictional example) then i do string FFFE orwhat?. want changecolours to left to right at least i want test some ideas thisway.

i have manuals which tell how copperlist is done but they of course dont ansver how this Blitz Basic 2 command work.

Cylon 23 November 2014 22:23

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?


All times are GMT +2. The time now is 08:16.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.

Page generated in 0.04621 seconds with 11 queries