Page 1 of 1

Clearing a tiled background memor

Posted: Wed Oct 10, 2012 10:52 pm
by Drake
Hello everyone :)
I am here because I cannot find a way to clear a tiled background I have stored in memory.
I need to clear the background map to allow the loading of another background (to move to another level in the game).

Any help would be really apreciated :)
thanks!

Re: Clearing a tiled background memor

Posted: Fri Oct 12, 2012 12:05 am
by elhobbs
Why do you need to clear? Just load the new background over the old one.

Re: Clearing a tiled background memor

Posted: Fri Oct 12, 2012 2:43 pm
by Drake
I have tried but sometimes I get unwanted results as shifted background or game getting stuck...the problem might be somewhere else though...I will try to remove my attempts of clearing it and see what happens
thanks a lot

Re: Clearing a tiled background memor

Posted: Sat Nov 10, 2012 1:23 pm
by Foxi4
Techincally you could clear the entirety of the bank by re-initializing it. Another method is to simply fill in the bank with blank data, starting from the adress the background begins and of the sizeof(BackgroundYouWantToClear);, however I don't see how this could be beneficial to you.

When a new background is placed within VRAM, it overwrites the old one, and unless you direcctly access the left-over tiles in question, they should not cause you any grief.