gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Which is better?(including graphics files in app)

#162388 - putzpie - Mon Sep 01, 2008 8:14 pm

Hey, I'm not sure if this is the right board, but I think it should be >_>. Anyway, I'm wondering which method of including graphics with your NDS apps is better, the Bin2o rule thingy or Grit? Or are they the exact same thing >_______>.

Thanks.
_________________
http://putzpie.com

#162396 - M3d10n - Tue Sep 02, 2008 12:39 am

Grit converts images to various formats that can be feed directly into DS's VRAM without conversion. It can generate .h and .c files with the data properly formatted as an array for you, or generate raw binary files to be loaded using a filesystem.

bin2o just grabs any binary file and builds a .h and .o that allows you to link the file to your code, so if you use it with a .png, as example, you'd still need to parse the PNG data in your DS code before it can be displayed.

#162399 - putzpie - Tue Sep 02, 2008 2:21 am

So really it doesn't matter, but grit does more work for you, right?
_________________
http://putzpie.com

#162401 - gauauu - Tue Sep 02, 2008 4:13 am

putzpie wrote:
So really it doesn't matter, but grit does more work for you, right?


Basically, that's correct.

For most game-type applications, I'd recommend using grit to pre-convert it to the DS's native format, to avoid the amount of processing you have to do at run-time, and the amount of code you have to write.