Jump to content



Recommended Posts

I was trying to code a 4 frame animation: I need to plot a small 9x9 square of tiles on the screen taken from different positions in a large ROM area ad change the place from the data come at each frame

I was doing this 


    for i=0 to 3
        SCREEN VARPTR #room0_0(i*9*9),0,0,9,9,9

BUT it seems that SCREEN does not support VARPTR....


Oscar can we add this feature if it is missing ?


Is there a workaround I cannot see?

Maybe playing on the origin_offset....



Edited by artrag
Link to comment
Share on other sites

Hi, @artrag,


Looking at the source of the compiler, I see that SCREEN does not accept anything other than a "name" (label or variable symbol) as its first argument, so VARPTR is not allowed.


Notwithstanding, the documentation has this to say:


  SCREEN label[,origin_offset,target_offset,cols,rows]
  SCREEN label[,origin_offset,target_offset,cols,rows,origin_width]




  Label can be also a 16-bits array for dynamically-drawn elements.


        DIM #cards(4)

        SCREEN #cards,0,0,4,1


So it means that if you are using a 16-bit array, you shouldn't need the VARPTR at all.  Have you tried the following:

    for i=0 to 3
        SCREEN #room0_0(i*9*9),0,0,9,9,9


Edited by DZ-Jay
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...