Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement Request - add Image Get and Put #70

Open
drarem opened this issue Mar 25, 2023 · 2 comments
Open

Enhancement Request - add Image Get and Put #70

drarem opened this issue Mar 25, 2023 · 2 comments

Comments

@drarem
Copy link

drarem commented Mar 25, 2023

Feature Request: Add GET IMAGE and PUT IMAGE (or similar) to be able to blit graphics to the graphics modes.

@drarem drarem changed the title Enhancement Enhancement Request - add Image Get and Put Mar 25, 2023
@EricCarrGH
Copy link

EricCarrGH commented May 7, 2023

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.

Thoughts?

@drarem
Copy link
Author

drarem commented Aug 8, 2023

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()



Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants