Rotation example

Post Reply
Charliee1151
Posts: 4
Joined: Thu Feb 14, 2013 9:48 pm

Rotation example

Post by Charliee1151 » Tue Apr 02, 2013 11:46 pm

Hi all,
I'm interested in the rotation example (NDS). I note that it uses a BIN file and a palette.
The bin file is "Drunkenlogo.bin", the palette is "palette.bin".

I'd like to replace that graphic with my own, so I searched for something that would guide me in doing so.
I finally found "Drunkenlogo.pcx"! Yay! I'm guessing that this pcx file is the source for the two bin files.....but I haven't found the correct program (or syntax for that program) to make the conversion.

So...
1. Is "Drunkenlogo.pcx", in fact, the source for "Drunkenlogo.bin" and "palette.bin"
2. What conversion program is used to get there?
3. What is the command syntax for that program?
4. Is there any info/tutorial on this, and I am just too dense to find it?

I'm willing to search, re-search, and learn, but I need a starting point!

Eventually, I'd like to use BMP files, but I obviously first need to learn how the example works.

By the way, I love your work....and I realize I have a lot of learning ahead.

Thanks,
Please keep supporting the DS

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: Rotation example

Post by elhobbs » Thu Apr 11, 2013 1:15 am

The 256_color_bmp example may be a better example to look at. The make file has rules for folders and for files based on extensions. It has rules for processing graphics. I think the rotation example may be older and just references the manually processed graphics.

Charliee1151
Posts: 4
Joined: Thu Feb 14, 2013 9:48 pm

Re: Rotation example

Post by Charliee1151 » Sun Apr 14, 2013 9:06 pm

==>the rotation example may be older <==
Yep, kind of figured that out, after a lot of work.

==>The 256_color_bmp example may be a better example <==
Hah! That's where I finally ended up anyway.

More questions coming soon.

Thanks
Charlie

sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

Re: Rotation example

Post by sverx » Mon Apr 15, 2013 11:25 am

BTW the tool is called 'Grit'. You can google 'grit command line options' for instance... 8)

Charliee1151
Posts: 4
Joined: Thu Feb 14, 2013 9:48 pm

Re: Rotation example

Post by Charliee1151 » Mon Apr 22, 2013 10:48 pm

==>the tool is called 'Grit'.<==
Thanks.
I've found the Grit "elevator" post, I'll have to study it.

Thanks again

Charlie

Charliee1151
Posts: 4
Joined: Thu Feb 14, 2013 9:48 pm

Re: Rotation example

Post by Charliee1151 » Sat Jun 08, 2013 6:01 pm

Ok, guys....back again. I'm looking at the multiple background example this time....the one with the two layers of clouds, as give on "LiraNuna’s Development Blog » Lesson 4.htm".

I have created two of my own BMP files, subb'ed them in for the cloud BMP's, and almost get what I want. The first file (Background = "BKGYEL") is a yellow square, 256x256, 16 color. The second file (Foreground = "FRGWHT") is a white square, also 256x256 16 color, with a set of black rectangles (in the shape of a full size "H") in it. My expectation is that the result, using DSEmu, will be a white square with a yellow "H" in it, where the yellow background shows through the transparent black of the "H" in the foreground, surrounded by the white of the foreground. Instead, I get a yellow "H" surrounded by a black foreground. I obviously have missed a palette setup someplace, but I can't find it.

I have followed the commands for gfx2gba, including the "-v4096" to set the second palette; the results closely match that given in the web page.
(gfx2gba -m -c16 -t8 g:\gfx2gba013\frgwht\frgwht.bmp)
and
(gfx2gba -v4096 -m -c16 -t8 g:\gfx2gba013\bkgyel\bkgyel.bmp)

I am using the same code in the source file as the example, except of course for the BMP-translated-to-BIN-files names.

Using Ifran view, the palette for the background file shows the first entry as Yellow, the remaining 15 as black. The palette for the second file shows the first entry as Black, the following 14 as a rainbow assortment you might find in the palette in Microsofts Paint program, and the 16th color as White.

Did I convert wrong, or maybe Ifran view is the wrong program for viewing the palettes?

I can post the source code if you need it, or a BMP of the palettes if someone can tell me how to do that.

Thanks
Charlie

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests