Script Drawing Improvements.
[edit] Added the following:
Screen->SetRenderSource(source, x, y, w, h);
Screen->CreateBitmap(w, h, depth = 8);
Screen->DrawBitmapEx(layer, bitmap, x, y, w, h, tx, ty, tw, th, mask, bool, bool);
Screen->Polygon(...);
Screen->DrawPixelArray(layer, count, []x, []y, []colors);
Screen->DrawTileArray(layer, count, []tiles, []x, []y, []colors);
Screen->DrawComboArray(layer, count, []combos, []x, []y, []colors);
TODO:
Screen->Polygon(...);
Screen->DrawBitmapEx(...);
int opacity arguments to Tile() and Combo() will accept 128, or 256 to draw a cloaked tile or combo.
Post anything I'm missing here. It's better just to get everything in one go, so I'm making super duper sure berforhand. :) *cough* I'm lazy *cough*
Likely candidates so far:
[1] Screen->DrawBitmapEx(...);
[2] Screen->SetRenderSource(source, x, y, w, h);
[3] Screen->Polygon(...);
[4] Screen->DrawPixelArray([]x, []y, []colors, int count);
[1] Most common bitching about bitmaps is the way allegro does translucency and the fact that drawing inverted things is all the rage with the kiddies these days.... fair enough. Let's make one specially designed for those cases then.
[2] Instead of drawing from tiles or combos with other 3D (Quad, Triangle, etc..) drawing commands you could draw from bitmaps instead. Usage:
Code:
Screen->SetRenderSource(RT_BITMAP1, ...);
Screen->Quad(...);
Screen->SetRenderSource(RT_DEFAULT);
[3] Not sure really... It's over 9000!!! (ZoriaRPG was going to test this one)
[4] Because PutPixel is slow and crappy, and if you ever want to draw single pixels then you probably want to draw a lot more than 1000 of them.
Others (?) XOR drawing mode. ZoriaRPG expressed interest in this, but I'm a bit skeptical on the usefulness (Not too mention the testing! Oh noes, the tesing! :P ) Though, it could be easy enough to support other drawing modes by introducing a simple mask to opacity. [Example: DrawSomething(x, y, 128 | DM_XOR] ..or some other non-intrusive thing.
[5] Screen->CreateBitmap(w, h); // let users specify the size of bitmaps.
[6] Screen->DrawCloakedTile/Combo(); // Draw invisible stuff. ...Confused yet? ;) (Perhaps instead add a mask to other drawing commands, ie; translucent = 64, opaque = 128, cloakes = 256, - might be better.