
11-14-2011, 08:29 AM
|
|
Will work for food. Maybe
|
 |
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
|
|
level.tilesetrender
|
Returns an image object of what Graal is currently using to render tiles. For example, by default it would just be a copy of pics1.png. However, the important part is when you're using addtiledef2.
I don't know how Graal implements its usage of addtiledef2, but I imagine that it stores the tileset in a buffer, and addtiledef2 draws over that buffer whenever playerenters() is called. So I imagine this object is already there stored in memory, why can't we access it? For example, when making a level editor, we need to render the tileset as the client sees it, addtiledef2 definitions and all. This would greatly simplify the matter.
As well, it'd be nice if we could access the image of a DrawingPanel as an object. For example:
showimg(200,TDrawingPanel.image,32,32);
This would make scripting a GUI-based level editor way easier as well, since in order to support addtiledef2 you'd have to go the complex route when rendering tile selections(since the image in the tileset that you'd pick tiles from would probably contain many addtiledef2 definitions drawn over the base tileset). This would allow us to draw the addtiledef2 images over the base tileset in a DrawingPanel, and simply render/crop from that image when rendering the level/tile selection. |
Last edited by DustyPorViva; 11-14-2011 at 10:32 AM..
|
|
|