PDA

View Full Version : Tile Editor



Nick
08-10-2001, 10:35 PM
Ok here is my tile editor.

It *will* break down if you pass in the wrong stuft and the code is really messy. There's probably a faster way to scroll the screen with the SDL but it's a tile editor and it scrolls fast enough. On a slow machine or opening a huge map you might notice it. There's alot of stuft like checking to see if you passed a integer in the command line that I didn't do. It automatically saves the level data in level.lev a text file, very limited user interaction!

By running the program with no command options
you get a help screen you must pass in the tile bitmaps
with -t tiles.bmp The default tile width and height are
16 but like if you pass in some thing like 0 for the tile width and height there's no telling what's going to happen!
As an example look at my code to get the dimensions of the
grid absoultly no error checking.

Once your running the program you can press space to get a
screen with all the tiles. Again this is just a blit of tiles.bmp and you will lose tiles go off the
screen. You are then able to pick a tile with the mouse.
In case you havn't noticed I got the design, space to get tiles, left click to choose tiles, and right click to
erase tile from fastgraph but it shares no code from
their (only on windows) tile editor.

To compile you need the SDL and SDL_image


I also have code for a tile ripper but it needs major changes such as receiving the width and height of the tiles from the command line.

Nick
08-10-2001, 10:50 PM
hmm having trouble downloading :)

Nick
08-10-2001, 11:23 PM
Let me try this one more time from windows.

Nick
08-10-2001, 11:24 PM
Still not uploading right.