artrag Posted March 13, 2021 Share Posted March 13, 2021 (edited) 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 wait next BUT it seems that SCREEN does not support VARPTR.... Oscar can we add this feature if it is missing ? Or Is there a workaround I cannot see? Maybe playing on the origin_offset.... Edited March 13, 2021 by artrag Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted March 13, 2021 Share Posted March 13, 2021 (edited) 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: Quote 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 wait next Edited March 13, 2021 by DZ-Jay 1 Quote Link to comment Share on other sites More sharing options...
artrag Posted March 13, 2021 Author Share Posted March 13, 2021 (edited) thanks, I ended to use the first parameter as an offset SCREEN #room0_0,#j, 0,9,9,9 #j = #j + 9*9 Edited March 13, 2021 by artrag 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.