uze6666 wrote:Hi mapes,
I'm not sure to understand what you tool does exactly. Can you elaborate?
-Uze
Sure,
I've been looking at the source code for several games, such as space invaders and noticed that there were no graphic files included with the files. All of the graphics were converted to text in tiles or sprite "*.inc" files.
I looked at the format used by space invaders of 8X8 tiles and wrote a program to rotate the text file tiles clockwise or counter clockwise.
However, I noticed later that this won't work on several other games that don't use the same format, Meaning that although the format is received the same when compiling "Syntax", the program I wrote doesn't parse it correctly.
For the program to work, the .inc file needs the tiles to be formatted in this fashion:
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
And a clock wise rotation would make it like this:
0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,
0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,
0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,
0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,
0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,
0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,
0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,
0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,
Because this is written in a 8X8 matrix form in text, the program parses each pixel into an array and then rotates, and pastes it into a new file adding .ccw ( counter clockwise) or .cw (clockwise) to the end of it.
The way it parses the data into an array is by separating it out by the commas (,). The program isn't configured to input more than 8 pixels per row for the rotation, but could if there is requests for it.
Since we don't have the graphic files, I thought this would be a useful tool in the future if the Uzebox Jamma takes off for easily converting all of the graphics to vertically set up monitors.
Hopefully this gives you a better idea of what the tool does, and when it would be used.