Hi,
das zweite Rechteck wird bei den unteren zwei beispielen nicht gezeichnet.
Der erste Code Funktioniert.
DRAWRECT 0,0,20,20,RGB(0xff, 0x00, 0x00) // Rot
DRAWRECT 20,0,20,20,RGB(0x00, 0x80, 0x00) // Grün
GRABSPRITE 0,0,0,20,20
GRABSPRITE 1,20,0,20,20
WHILE TRUE
DRAWSPRITE 0, 10,10
DRAWSPRITE 1, 30,10
SHOWSCREEN
WEND
DRAWRECT 0,0,20,20,RGB(0xff, 0x00, 0x00) // Rot
GRABSPRITE 0,0,0,20,20
CLEARSCREEN RGB(0x00, 0x00, 0x00)
DRAWRECT 0,0,20,20,RGB(0x00, 0x80, 0x00) // Grün
GRABSPRITE 1,20,0,20,20
WHILE TRUE
DRAWSPRITE 0, 10,10
DRAWSPRITE 1, 30,10
SHOWSCREEN
WEND
DRAWRECT 0,0,20,20,RGB(0xff, 0x00, 0x00) // Rot
GRABSPRITE 0,0,0,20,20
BLACKSCREEN
DRAWRECT 0,0,20,20,RGB(0x00, 0x80, 0x00) // Grün
GRABSPRITE 1,20,0,20,20
WHILE TRUE
DRAWSPRITE 0, 10,10
DRAWSPRITE 1, 30,10
SHOWSCREEN
WEND
The first example draws the 2nd sprite at 20 pixels for the 'x'.
The other two examples draw it at 0 for the 'x', but grab it from 20 just as the first one did.
Here's the 2nd one updated:
DRAWRECT 0,0,20,20,RGB(0xff, 0x00, 0x00) // Rot
GRABSPRITE 0,0,0,20,20
CLEARSCREEN RGB(0x00, 0x00, 0x00)
DRAWRECT 0,0,20,20,RGB(0x00, 0x80, 0x00) // Grün
GRABSPRITE 1,0,0,20,20 ///////// Updated this line to be at 0 x, not 20 x
WHILE TRUE
DRAWSPRITE 0, 10,10
DRAWSPRITE 1, 30,10
SHOWSCREEN
WEND
Im zweiten Bsp ist das Drawrect auf 0,0 und Grab auf 20,0?
Oh man. so ein Blöder Tipp fehler.
Das kommt von den vielen Copy and Paste, da zieht man lauter Fehler mit, auch wenn sie noch so klein sind.
"zu sich selbts sprechend"
Hmmmpfff, mach die Augen auf Fabbio