Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / RPGTookit Tileset Reader functions (for those of us who are to lazy to make our own)

Author
Message
Code Ninja
20
Years of Service
User Offline
Joined: 17th Dec 2003
Location: AZ, U.S.
Posted: 6th Jan 2005 21:50 Edited at: 6th Jan 2005 21:54
Here is a set of 3 functions which read/print/capture-to-image tiles from the RPGToolkit tileset format (*.TST)
The function program is attached and bellow is an example to show you how to use the functions. (Also gives you a peak at my board editor for my 2D RPG Designer


The three functions are:
ReturnVar=ReadTileset(filename$,#ofTiles2Read)
Reads tiles from the specified file (filename$) from tile 0 to #ofTiles2Read. The ReturnVar is the tile size (x and y) for the tileset (generally returns 32 if you are using Tookit Tilesets over v2.0).

DrawTiles(xpos,ypos,First2Draw,Last2Draw,SizeofTile)
This draws the tiles that have been read to the screen. xpos and ypos are the drawing start points. The function will draw tile First2Draw to tile Last2Draw. SizeofTile is the ReturnVar from the previous function.

GetTile(Tile#,Image#)
Gets the specified tile (Tile#) and set it as the specified image (Image#).

Enjoy!

[edit] Tested in DBC only. I don't know if it'll work in DBPro, but anyone is welcome to try... oh, and if there are any suggestions for improvement or any additional functions you want to see, please don't hessitate to say so.

Dragael Software
Current Project: Nothing worth mentioning

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-23 16:44:33
Your offset time is: 2024-11-23 16:44:33