How do you display sprites from appvars in ice
I have 5 sprites in a appvar and I need to display them.
I haven't used ICE in a while, but I believe you would do something like this:

Code:
sum(1,"appvar name","r")→SPRTVAR              // Opens the appvar slot for reading

sum(5,SPRITEA,1,/*(width*height)+2*/,SPRTVAR) // Reads the first sprite into SPRITEA
sum(5,SPRITEB,1,/*(width*height)+2*/,SPRTVAR) // Reads the second sprite into SPRITEB
sum(5,SPRITEC,1,/*(width*height)+2*/,SPRTVAR) // Etc.
sum(5,SPRITED,1,/*(width*height)+2*/,SPRTVAR)
sum(5,SPRITEE,1,/*(width*height)+2*/,SPRTVAR)

sum(3,SPRTVAR)                                // Closes the appvar slot

Then you would just treat those 5 variables as regular sprites
That works. I’ve done that before. If you want to read them at different times, you can copy the pointers into an array and use that.
thank you so much! Very Happy i have been playing around with that but could not find a solution.

Edit: It didnt work for me. here is what i did.



Code:

sum(0
det(0
sum(1,"CLASHLOG","r")->SLOT
sum(5,ºMAINPLAY,1,6582,SLOT
det(62,MAINPLAY,0,0,3,3
Pause
det(1
sum(0
You might also want to review the html documents attached in the zip file for ICE, they contain all sorts of useful and helpful information. I like to keep printed out copies of them handy.
IceWorks wrote:
thank you so much! Very Happy i have been playing around with that but could not find a solution.

Edit: It didnt work for me. here is what i did.



Code:

sum(0
det(0
sum(1,"CLASHLOG","r")->SLOT
sum(5,ºMAINPLAY,1,6582,SLOT
det(62,MAINPLAY,0,0,3,3
Pause
det(1
sum(0


Fixed it!


Code:

sum(0
det(0
sum(1,"CLASHLOG","r")->SLOT
sum(5,ºMAINPLAY,1,6582,SLOT
det(62,°MAINPLAY,0,0,3,3
Pause
det(1
sum(0
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement