Jump to content

Photo

Question on DPC+ stack


1 reply to this topic

#1 pacgreg OFFLINE  

pacgreg

    Chopper Commander

  • 199 posts
  • Location:Florida

Posted Fri Jun 1, 2018 8:12 PM

If I were to say, pull every variable before using it and pushing it back where it came from every time, would that mean I could use the whole thing as variables?

like pulling out data for an animation to a then putting it away and using a again later in the code to pull out music position and put it away each loop will it always be stored in the same place?

 

I'm guessing this would look somewhat like this

 dim a = frame

 dim a = duration

mainloop

 ; Animation

 stack 100

 pull frame

 ; (CODE HERE)

 stack 99

 push frame

 

 ;music

 stack 101

 pull duration

 ; (CODE HERE)

 stack 100

 push duration

 

 drawscreen

 goto mainloop

 

Thanks

Greg



#2 SpiceWare ONLINE  

SpiceWare

    Draconian

  • 12,452 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Fri Jun 1, 2018 9:15 PM

You may find this topic useful.

http://atariage.com/...-into-variables




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users