Author Topic: [83+ xLIB] Backgrounds  (Read 3673 times)

0 Members and 1 Guest are viewing this topic.

Demon

  • Guest
[83+ xLIB] Backgrounds
« 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)?

Offline Spellshaper

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1690
  • Rating: +0/-0
  • This is me. Or maybe not.
    • View Profile
[83+ xLIB] Backgrounds
« Reply #1 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

Dragon__lance

  • Guest
[83+ xLIB] Backgrounds
« Reply #2 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?

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
[83+ xLIB] Backgrounds
« Reply #3 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)

Offline Spellshaper

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1690
  • Rating: +0/-0
  • This is me. Or maybe not.
    • View Profile
[83+ xLIB] Backgrounds
« Reply #4 on: July 17, 2006, 11:31:00 pm »
why real(0 when you overwrite the screen with the background pic anyways? :Ptongue.gif

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
[83+ xLIB] Backgrounds
« Reply #5 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

Dragon__lance

  • Guest
[83+ xLIB] Backgrounds
« Reply #6 on: July 18, 2006, 05:18:00 am »
yeah,ur right.my bad,metroid does it quite fast :)smile.gif