Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Raylin on September 16, 2010, 05:29:08 pm
-
How do you do it in Axe outside of a million Pt-Mask() commands?
-
You could write a custom bitmap routine, I guess.
I'm several versions behind on Axe, I haven't even seen Pt-Mask. Advance Wars uses its own masked sprite routine.
-
What was your solution to that, Sir? Could you input arbitrary numbers for the size of said bitmap?
-
Well, you can define them at compile time, and you can use SMC to define them at runtime.
-
Hmm...
How would one make his own masking routine?
What are the basics of masking?
-
Well, I made one sprite completely black (sprite A), and the other one was just the white pixels (sprite B), then I used Pt-On first with sprite A, then Pt-Change with sprite B on top.
-
PICS OR IT DIDN'T HAPPEN.
-
No. I'm having trouble sending things between my calc and my computer. Just try it on your own, it will work.
-
This is actually how masking is done in xLib too (though most people prefer using AND/OR masking, but AND is not an option in Axe)
-
I used XOR to do sprite masking in my axe game. I would draw on one sprite that contained black for everywhere that I wanted to be masked using OR logic (Pt-On), and I would draw a sprite over that with black for all the areas of the masked sprite I wanted white using XOR logic (Pt-Change).
EDIT: oh wait, SirCmpwn already said that
-
Quigibo? Any ideas? Maybe add in this badass feature (masked bitmaps)?
-
I would like this feature. I think it uses TI's routine, though, so I am unsure how it can be modified.
-
The Pt-Mask() is a way to automate exactly what SirCmpwn was talking about. There isn't a way to optimize it further outside of writing an Asm routine.
-
Is there ANY WAY to mask huge sprites without the Pt-Mask()?
-
You can write a gazillion pxl-change()/pxl-on()/pxl-off() but that's really slow. Like I said, your only other option is inline assembly or multiple Pt-Mask() routines.
-
you could also copy the data directly from the source to the buffer using logic, but that only has arbitrary height(width still must be a multiple of 8), and its x position has to be a multiple of 8 as well...
so yeah, your best bet is just multiple pt-masks
EDIT: LOLS, 8 ) was turned into a smiley...
-
o.o
shmibs, EXPOUND! That may be the key! :D