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.

Graphics > How to use Objective

#154556 - Polaris - Fri Apr 18, 2008 2:09 am

I'm trying to load a large sprite made up several smaller ones on the NDS.

Got a couple of questions:

1) What should I be adding on the Makefile so that Objective automatically takes an image and do its thing when I build my project? And where should I place Objective.exe. I'm guessing it is all similar to how grit is set up, but a more comprehensive explanation would be apreciated.

2) I did make a small test using the command line to see what Objective's output was, and it worked fine, or so it seems. My problem is that I still can't figure out how should I use all the data. In short, what would be the fastest way to have the bigger image made up of the smaller ones up and running?

#158610 - dovoto - Sat Jun 14, 2008 1:13 pm

Not sure what objective is unless its a tool by boofly made a long while ago...

Most converters require you to place your sprite animation frames in discreate regular intervals related to the size of the sprite.

Devkitarm comes with a graphics converter to do this and there allready is a makefile rule to pass the images through this tool.

Code:


#---------------------------------------------------------------------------------
# This rule creates assembly source files using grit
# grit takes an image file and a .grit describing how the file is to be processed
# add additional rules like this for each image extension
# you use in the graphics folders
#---------------------------------------------------------------------------------
%.s %.h   : %.bmp %.grit
#---------------------------------------------------------------------------------
   grit $< -fts -o$*



you should be able to do something similar with your tool.
_________________
www.drunkencoders.com