stag019 / rgbgfx

rgbgfx is a program which converts PNG images into the Game Boy's planar tile format, for eventual integration into RGBDS
Other
11 stars 1 forks source link

GB struct member depth #8

Closed stag019 closed 8 years ago

stag019 commented 9 years ago

It starts with the command line option -b existing or not, setting the opt member binary to true or false. Then the gb struct member depth gets 1 for true, and 2 for false. However, there are other commonly used numbers derived from this, leading myself to confusion.

For the number of colors, depth 1 gets 2, depth 2 gets 4, calculated by 2 ^ depth. Also used is this value minus one (used for indexes). Another common occurrence is depth 1 gets 2, depth 2 gets 1, calculated by 3 - depth.

stag019 commented 8 years ago

I'd say I've sorted this out fairly well now with the last three commits.