Originally Posted by
Gleeok
Really, there should be an extra parameter for translucency. Like my pappy used to say: "forwards compatibility of yesterday today, nonsensical and confusing rubbish of yesterday tomorrow".
Not that the all drawing stuff are the greatest or anything, but still.
I know, and I agree; but only to a point. I'd rather do the extra things using overloads, so that older scripts don't break. This is primarily because you can't expect users to know how to update a script, particularly if the author doesn't update it (and you know that they won't); and also, because sometimes changing arguments will result in quests breaking., such as Starshooter, if you recall, I had to fix a few calls to make it work on any 2.5 final release.
I'll probably add overloads in, eventually, but for the moment, this works, to test things, and of course, we're still waiting on you, too, before we do anything officially for 2.future, so there's that.
http://timelord.insomnia247.nl/zc/sc...3D_Bitmaps.cpp
Added support to Quad(), Quad3D(), Triangle(), and Triangle3D() to use a bitmap RT_* as a valid texture. I'm not entirely certain that what I did is correct, so if it isn't, then feel free to throw pet rocks.
This change uses the texture argument, and functions by using a value of 65520 as RT_0, 65521 as RT_1, and so forth. Thus, in ZScript (and std.zh) this would be represented as:
Code:
const int TEX_BITMAP = 65520;
void Quad3D(layer, pos, uv, cset, size, size, TEX_BITMAP+RT_BITMAP3, mode );
I don't think that it is possible to read the screen as a bitmap, via: zscriptDrawingRenderTarget->GetBitmapPtr(-1) ; -- or is it?
That could make for some rather interesting effects, if it's legal.
I set the minimum value for this method as '0', so if it's possible to read the screen as a bitmap like that, I'll need to adjust the values a tiny bit, to permit it.
If you have a moment, please look at how I set up the drawing commands, and tell me if I did anything that is obviously broken. I think one point that I may need to address, is the size (w and h) used in the vertices vectors. I set it up to do the vectors, create the bitmaps, and then issue the draw instruction inside the statements that read the type (tile, combo, bitmap) of texture. This feels like unnecessary duplication, but at least I know what I'm looking at, this way.