Files In the 2deg.net File Manager
----------------------------------

Files can be read in and written out.
They have a specific format. I want to try to use hexadecimal values for bytes. One byte has 256 possible values. In order to represent any of those, two digits must be used. In hexadecimal (base 16), 0-9 are the standard digits for zero through nine, and a through f stand for ten through fifteen. Zero is a value, so the maximum value is 16.

One byte has 8 bits. One byte has a maximum value of 255, if zero is counted. 16 times 16 = 256, but zero is a value, so we must subtract 1. The total number of values is 256 and the maximum value is 0.
In some implementations, there are negative numbers when an integer is stored in a byte. The term for that in the C programming language is signed char.

Usually a single byte is used to represent a character in the alphabet, and it can also be used to hold a number value. When signed is used to describe char, it's probably referring to the fact that there is a minus sign. For a positive number, you don't normally have to have a sign. If there is one, it means it's negative.


I just got a notification on my cell phone. I have to turn those off when writing. I just turned the volume all the way down.


Files might have a specific syntax. They will use a certain way of storing the information from the BM. Well, that's what we used to refer to it as. It stands for Bit Map.
The bits are mapped in the file. Some bits are on, some bits are off. Colors might be implemented. In my editor I did not have colors working yet.
For the graphic, if a bit of a byte was set, it indicated that the pixel value was on. It should be possible to add pixel color values to the implementation. There will have to be an array of color values that line up with the bits set.

Color Values
------------
There won't have to be a transparent value to indicate that the EGG, which stands for Editor and Game Graphic, should be placed over another without overwriting one of it's pixel values.
The pixel values that will be written when an EGG is mapped are decided by the bits that are set. (EGG is the new type of file that we've given a name, replacing the old name which was BM.)

EGG File Syntax
---------------
It might be possible to have the EGG in human-readable form. There would not need to be any binary information that would cause it to be unreadable in a text editor. By using hexadecimal values to represent bytes this should be able to be accomplished. The rest of the values can be stored in arrays with keys -- names which describe the use of a particular array element.
In hexadecimal, two digits are used to represent one byte. If we do not want to use a transparent value at all, only three bytes would need to be used for one pixel value. Each byte represents one of: Red, Green, and Blue.
If all values are set to zero the pixel will be black.