Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: Demon on July 17, 2006, 09:20:00 am

Title: [83+ xLIB] Backgrounds
Post by: Demon on July 17, 2006, 09:20:00 am
Is there a way to set a background so that whenever you do clrdraw [or real(0)], it will always be there until you unset it, and you won't ever have to redraw the background in the game you're making (until you go somewhree and and its changed by the game, or whatever)?
Title: [83+ xLIB] Backgrounds
Post by: Spellshaper on July 17, 2006, 09:26:00 am
uhm... save it to a pic.
then recall the pic with
real(3,,0,0,1
is the number of the pic
that way it overwrites the screen with the background instead of clearing it via real(0
Title: [83+ xLIB] Backgrounds
Post by: Dragon__lance on July 17, 2006, 01:06:00 pm
yep,that's the best way to do it imo.Be sure to clear the screen with real(0,but not update it.Then draw the background with update.btw,imo stands for it's my opinion right?
Title: [83+ xLIB] Backgrounds
Post by: kalan_vod on July 17, 2006, 03:44:00 pm
QuoteBegin-Dragon__lance+Jul 17 2006, 07:06 PM-->
QUOTE (Dragon__lance @ Jul 17 2006, 07:06 PM)
yep,that's the best way to do it imo.Be sure to clear the screen with real(0,but not update it.Then draw the background with update.btw,imo stands for it's my opinion right?  

 Yes, that would be the best way. (In my opinion)
Title: [83+ xLIB] Backgrounds
Post by: Spellshaper on July 17, 2006, 11:31:00 pm
why real(0 when you overwrite the screen with the background pic anyways? :Ptongue.gif
Title: [83+ xLIB] Backgrounds
Post by: DJ Omnimaga on July 18, 2006, 02:47:00 am
uhm if you are gonna overwrite the screen with the background you shouldnt even need to clear the screen prior doing this right?

like

c1-->
CODE
ec1
while 1
real(3,1,0,0

...
some random xlib sprites displayed here
...
End

c2
ec2

thats the method i use in metroid, as the background is basically the map with the HUD
Title: [83+ xLIB] Backgrounds
Post by: Dragon__lance on July 18, 2006, 05:18:00 am
yeah,ur right.my bad,metroid does it quite fast :)smile.gif