![]() |
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. |
http://s3.amazonaws.com/bt_assets/sy...jpg?1296591793
I hope stefan implements this :) |
Why not using a GuiDrawingPanel? It's supporting the drawing of "TILES". The tiles textures are not kept in memory (sometimes they have a size bigger than 1024 pixels which cannot be loaded into graphic memory on some video cards). It can be possible to add functions to get the current tiles image and offset for a specific tile, so that you can display the information in the editor, but for actually displaying it it's better to use GuiDrawingPanel.
|
Quote:
|
| All times are GMT +2. The time now is 12:52 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.