Online Binary/Hexadecimal Sprite Creator for C

Start Date: 10/22/17
Completion Date: In progress

Progressshine.pnghead.pngwhite.gif


I recently started to learn C for the 68k line of calculators, as it is also a rich programming language that 68k calculators have. As I progressed in my learning, I came to the topic of sprites, and the tutorial gave no simple tool to convert them.

For those who don't know how sprites in 68k C work, they are basically segments of information that are drawn to the screen very quickly. In the case of 68k C sprites, the segments of information come in the form of hexadecimal values. The sprite is first drawn using binary (1's and 0's) and then converted to hexadecimal. For example, a square in binary would be:

11111111
10000001
10000001
10000001
10000001
10000001
10000001
11111111

And to convert it to hexadecimal would give you:
{0xFF,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0xFF}

I quickly found that this was hard to do my hand, so I decided to make this a project to create a sprite editor for ease of sprite creation. This page will document the progress and creation of this tool.


Oct 27

I've created the main layout of the sprite creator.

Keep in mind that this is not the final product, as this still has to be formatted and adjusted on a page of its own.

Code Breakdown
Drawing
Each button will have an on and off state. Clicking on it will activate it's 'on' state and clicking it again will activate its 'off' state. The background color will change depending on its state.
Conversion
I'll probably put the buttons in some array-like variable. The states will be stored in that array (which will be a 1 or 0), and then each row of the multidimensional array (I'll do this by nesting arrays).

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License