@Phibrizzo, post #1
@Phibrizzo, post #1
@Stoopi, post #8
@diobou, post #21
BLITZ ; w Amosie nieważne
DEFTYPE .w ; tak samo nieważne
bmd.w=2 ; BMD=2 (a w sumie ustaw na 4 bo to ilość bitplanów, a w AMOSIE używa się ilości kolorów, czyli BMD=4)
Slice 0,44,320,256,$fff8,bmd,8,32,800,800 ; Screen Open 0,320,256,4,LowRes
bmw.w=800 ; BMW=800
bmh.w=600 ; BMH=600
BitMap 0,bmw,bmh,bmd ; i tutaj nie wiem, bo ekran ma być rozmiaru 320x256, ale bitmapa to 800x600x2 bitplany
BitMapOutput 0 ; nie potrzeba w Amosie w sumie, to jest ekran na którym ma się wyświetlić PRINT
Locate 23,40 ; to samo w Amosie
Print"rotozoom test coagulus" ; to samo w Amosie
DEFTYPE.w ; nieważne, AMOS działa na longach
sz=32 ; SZ=32
Show 0 ; nieważne, to jest wyświetlenie bitmapy 0 na ekranie
Use BitMap 0 ; nieważne, to jest aktywowanie bitmapy 0 do rysowania
RGB 1,15,0,0 ; Colour 1,$f00
RGB 2,0,15,0 ; Colour 2,$0f0
RGB 3,0,0,15 ; Colour 3,$00f
VWait ; WaitVBL
ps.l=0 ; PS=0
;Gosub testgrid
Show 0,150,180 ; i tu nie umiem. To jest ScreenDisplay gdzie lewy górny róg to punkt bitmapy 150,180
VWait150 ; Wait 150
Repeat ; Repeat
VWait ; WaitVBL
Show 0,150,180 ; ScreenDisplay 10,150,180,320,256 (ewentualnie skoryguj przez X/Y Screen lub X/Y Hard bo ja tego nie pamiętam)
For y=298 To 302 ; to samo
For x=284 To 288 ; to samo
Plot x+2,y+2,Rnd(3)+1 ; to samo przy czym Rnd(3)+1 tyczy się numeru koloru, więc w Amosie chyba najpierw ustalało się kolor pędzla
Next ; to samo
Next ; to samo
shift=0 ; SHIFT=0
ps+1 ; PS=PS+1
;For i=0 To 4
shift=(shift ASL 1) OR ((ps ASR 0) AND 1) ; tu będzie raczej podobnie, tylko zamiast ASL i ASR użyj ROL I ROR
shift=(shift ASL 1) OR ((ps ASR 1) AND 1)
shift=(shift ASL 1) OR ((ps ASR 2) AND 1)
shift=(shift ASL 1) OR ((ps ASR 3) AND 1)
shift=(shift ASL 1) OR ((ps ASR 4) AND 1)
;Next
For y=4 To 11
yy=y LSL 5 +shift ;yy=y*32 ; LSL 5 to przesunięcie bitów o 5 w lewo, ale możesz też mnożyć przez 32 co będzie wolniejsze
For x=4 To 14 ; w AMOSie tak samo
xx=x LSL 5 +shift ;xx=x*32 ; LSL już było wyżej
Scroll xx+(16-y)-x,yy+x+(16-y),32,32,xx,yy+16
; przeniesienie części bitmapy, co wygląda tak: Scroll X1,Y1,SZEROKOSC,WYSOKOSC,X2,Y2 gdzie X1 i Y1 to lewy gorny punkt kawałka wycinanego a X2 i Y2 to punkt do wklejania
Next ; to samo w AMOSie
Next ; to samo
Until Joyb(0) OR RawStatus($69) ; Until 'FIRE' OR 'ESC'
End
testgrid:
xs=bmw/sz ;20 create a grid
ys=bmh/sz ;16
mx=bmw/2 ;center of display
my=bmh/2 ;
mxs=xs/2-1 ;center of grid
mys=ys/2-1 ;
;debug boxes array
For y=0 To ys-1
yy=y*sz
For x=0 To xs-1
xx=x*sz
Box xx,yy,xx+sz-1,yy+sz-1,1 ; rysowanie prostokąta bez wypełnienia gdzie składnia to Box X1,Y1,X2,Y2,KOLOR
Next
Next
;debug inner boxes array
For y=0 To 7
yy=(y-4)*sz +my
For x=0 To 9
xx=(x-5)*sz +mx
Box xx,yy,xx+sz-1,yy+sz-1,2
;now get "circular" direction
dx= Sgn(xx - mx) ;-1 -0 -1
dy= Sgn(yy - my)
Line xx,yy,xx+dx*20,yy+dy*20,2 ; rysowanie linii, gdzie składnia to Line X1,Y1,X2,Y2,KOLOR
Next
Next
Return @pisklak, post #24
@tukinem, post #25
@tukinem, post #25
@pisklak, post #28
[32mStatement: Screen[39m ------------------------------------------------------------------------------ Modes : Syntax : Screen [Screen#,Mode[,Title$]]|[Screen#,X,Y,W,H,D,Viewmode,Title$,Dpen,Bpen[,BitMap#] Screen will open an Intuition screen. The are 2 formats of the screen command, a quick format, and a long format. The quick format of the Screen commands involves 3 parameters - Screen#, Mode and an optional Title$. Screen# specifies the screen object to create. Mode specifies how many bitplanes the screen is to have, and should be in the range 1 through 6. Adding 8 to Mode will cause a hi-res screen to be opened, as opposed to the default lo-res screen. A hi-res screen may only have from 1 to 4 bitplanes. Adding 16 to Mode will cause an interlaced screen to be opened. Title$ allows you to add a title to the screen. The long format of Screen gives you much more control over how the screen is opened with control of the specific ViewMode. ViewMode Value HexValue -------- ----- -------- HiRes 32768 $8000 HAM 2048 $0800 HBrite 128 $0080 LACE 4 $0004 LoRes 0 $0000 Using CGX or P96 screens W and H choose Dimension Choose D (Depth) 9 use 8 bit Screen 15 use 15bit Screen 16 use 16bit Screen 24 use 24bit Screen 32 use 32bit Screen --- Example: Screen 0,0,0,640,480,16,$0,"test",0,1 Opens a 640*480*16 screen on P96/CGX The function use BestmodeID. If a resolution is not available on the System then the next greater res is chosen. For example Screen 0,0,0,700,500,16,$0,"test",0,1 ... opens a 800*600 screen If you have a displayid of a P96/cgx screen set D (depth) to 0 Then your screen will open with that 32bit display ID === WARNING === Use this only if check the return value Displayid's differ from system to system succ=Screen (0,0,0,640,480,0,$51001100,"test",0,1) if succ=0 then print "ops cant open screen" === NEW SCREEN FLAGS === The superhires viewmode flag $20 is now acceptable, but should always be used in conjunction with the standard hires flag of $8000. The depth of a screen may now be specified up to 8 bitplanes (256 colours) deep (if you've got an AGA machine!). Here's how you would go about opening a superhires, 256 colour screen: Screen 0,0,0,1280,256,8,$8020,"MyScreen",1,0