Skip to content

Enhancement Request - add Image Get and Put #70

Open

Description

@drarem

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

Activity

  1. changed the title [-]Enhancement[/-] [+]Enhancement Request - add Image Get and Put[/+] on Mar 25, 2023
  2. EricCarrGH commented on May 7, 2023

    @EricCarrGH
    Contributor

    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?

  3. drarem commented on Aug 8, 2023

    @drarem
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions