You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would this essentially be a move with an extra two parameters, source (image) width, dest (screen) width?
So, after move writes N1 bytes of source, it moves the dest pointer N2 bytes before continuing, looping until all bytes have been copied?
E.g. move from, to, length, fromWidth, destWidth
If you sent destWidth, the move command would need to compute the skip amount (destWidth-fromWidth), or instead of destWidth you could just send the skip amount after computing it in basic.
Putting a 10x10 sprite on a 40x24 screen:
Move &sprite, &screen, 100, 10, 40
Or if the last param is simply the bytes to skip:
Skip = 40-10
Move &sprite, &screen, 100, 10, skip
The get would simply me moving the skip to the source instead of dest.
Obviously the command name could be different like gets/puts.
i would say set up a buffer with the correct size, and just use get/put - stored locations would tell it what size to use.
dim sprite1(256) as Image ' 16x16 image
dim buffer(256) as Image ' store background
' data loads sprite to screen
LOAD ("test1.dat",&sprite1)
GET ("d1:test1.dat",&sprite1,16,16) ' <stores sizex,sizey in memory location
loop:
GET (&screen,&buffer,oldx,oldy)
Move &buffer, &screen, oldx,oldy
WAITVBL
Move &sprite1,&screen,x,y
until key()
Feature Request: Add GET IMAGE and PUT IMAGE (or similar) to be able to blit graphics to the graphics modes.
The text was updated successfully, but these errors were encountered: