Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cooming 2013: "Yumiko in the haunted Mansion"
#30
LCD Wrote:BTW: How to extend PutChars to add masking? I want to have some parts of the background shine through the chars by defining bitmap of a mask.
Have a look at PRINT routine. PRINT uses OVER 2 and OVER 3 for masking. Wink[/quote]
PRINT masking does not allow to shine through only selected parts of the bitmap to make them appear like "sprites" with a border around them. And if I'm low on memory, I replace all prints with a routine based on PutChars because this saves around 800 bytes of memory. Maybe you noticed in source of Yumiko.[/quote].
That's right. PRINT is a very generic routine (as BASIC requires). Usually you need OVER 2 + OVER 3 (OVER 2 + OVER 1 will also work) to do masking, but you will need to precalculate the inverted mask in advance. I haven't read your code entirely, BTW, but if you managed to get a routine that calculates some masks automatically (this is usually not possible, I guess) and invert them (e.g. at the beginning of each game level, or whatever) you will save a lot of memory. I've always wanted something like this :roll:
Quote:I modified the program as your said (the first three instructions are the same as yours, but then I stuck). And it works fine. Thats great. Exactly what I wanted. Thank you.
:?: :?
Sorry, I wasn't questioning your code; just suggesting you can get some ideas from the default PRINT routine (as I do from many places, the ROM included).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)