BLIT command

Previous topic - Next topic


Hi, Could I possibly suggest the following command:

blit s1,x1,y1,x2,y2,s2,x,y,m

Where s1 is the source screen and x1,y1,x2,y2 is the part of the bitmap to be copied and s2 is the destination at x,y
(Mainly for the purposes of software scrolling!)
Also a color masking option would be nice like $000000 but $FF00FF seems to be popular these days. :-;


XOR AX,AX - A Fast Zero... (Those were the days...)


You can emulate this in GLBasic by using GRABSPRITE and DRAWSPRITE but I'm not sure how fast this would be :-)
I guess you could also use CREATESCREEN to draw all your grafics to a separate surface and then use DRAWSPRITE with this screen to draw it scrolling over the screen.


It may also be worth looking at the POLYVECTOR command for drawing parts of a graphic ....
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity


Yes, POLYVECTOR handles an image with the texture coordinates, and color masking.

Bing ChatGpt is pretty smart :O

Kitty Hello

VIEWPORT x,y,w,h
DRAWSPRITE id, -x1, -y2
VIEWPORT 0,0,0,0


Thanks for all the help guys - sorted it!

BTW PeeJay, if you fancy a look at a remake of Boulderdash (Rock) goto - it is 15 years old and is coded 99% in assembler with a bit of Turbo Pascal to set up the memory model - also the sound doesn't work under XP, as we coded the SB16 directly. (69k download) but it is cool! - Wiki/Google the other (maybe main) coder - Leslie Benzies. R*

Any comments on a 15 year old bit of code would be quite interesting... (My brother & I are thinking of converting it to GLBasic).

XOR AX,AX - A Fast Zero... (Those were the days...)


Sorry Guys, I should have posted the reply I got from Gernot directly.
Here is his code...

CREATESCREEN 1,101,512,512 // make offscreen 1 512x512 and bind to sprite id 101
USESCREEN 1 // draw to sprite 101, offscreen 1
DRAWRECT 0,0,32,32,RGB(12,12,12) // draw
USESCREEN -1 // draw on back buffer
DRAWSPRITE 101, 55,55 // paste the rendered sprite

Hope my post helped others!

XOR AX,AX - A Fast Zero... (Those were the days...)