#83116 - Kixdemp - Sat May 13, 2006 2:12 am
Hello everyone! :-D
OK, I got an assertion error in my emulator, saying
Code: |
Image must be paletizzed. |
That's because, when I tried to make a pallete with SoConverter, I got this error:
Code: |
Fatal conversion error:
No palette available in the media file loaded. |
Why is that? Since the PNG file didn't work, I converted it to 24-bit bitmap in MS Paint, but that didn't work either! Anyone know why this is? Thanks! ;-)
PS: Here's my bitmap: (First image I could find, I think I found it at some forum or something...):
http://www.sulfurmidis.com/monkey.bmp
_________________
"My wealth has doubled since we last met."
-- RICH BOY WILTON, Pokemon Emerald
#83120 - kusma - Sat May 13, 2006 3:10 am
try.. (duh)... palletizing it? (Image -> Mode -> Indexed Color in Photoshop)
#83125 - Kixdemp - Sat May 13, 2006 3:42 am
Ooohh... Alright, thanks! ;-)
Now... All I get is a color patternized screen of some sort... :-(
I want to place this image on the top-left corner of the screen, what's the correct code to do it? I have this:
Code: |
// set palette
SoPaletteSetPalette(SO_SCREEN_PALETTE, monkeyPalette, true);
// Set Mode 4 (bitmap mode)
SoDisplaySetMode(0);
// load tile data
SoImageBkgLoad(&monkeyImage, 0, 0);
// allocate a background layer
SoBkgSetup(0, SO_BKG_PRIORITY_0 | SO_BKG_CHARBASE(0)
| SO_BKG_MOSAIC_DISABLE | SO_BKG_CLRMODE_256 | SO_BKG_SCRBASE(0x1f)
| SO_BKG_TEXTSIZE_256x256);
// turn on the background display
SoBkgEnable(0, true); |
What must I change? Thanks! ;-)
Note: That code is just an edited version of the BBA example... :-)
_________________
"My wealth has doubled since we last met."
-- RICH BOY WILTON, Pokemon Emerald
#83142 - thegamefreak0134 - Sat May 13, 2006 6:59 am
I'm not entirely sure (you're obviously using some defines I don't recognize) but it looks like you're in a tiled mode. If you want to use a picture, you must be in either mode 3, 4, or 5, which are the bitmap modes. If not, you must convert the picture to a tileset and a map to load into the tiled mode.
Mode 0 allows tiled modes and nothing else. Change the mode to 4 and copy the image into the appropriate location to see if you've got the image right, then work from there.
*edit* How much "editing" have you done to this code? What was it supposed to do in the first place? That may hold the answer.
_________________
What if the hokey-pokey really is what it's all about?
[url=http:/www.darknovagames.com/index.php?action=recruit&clanid=1]Support Zeta on DarkNova![/url]
#83184 - Kixdemp - Sat May 13, 2006 11:05 pm
Oops, nevermind - in tileset mode, I get a brown screen, it's in bitmap mode that I get the patternized screen... :-$
The original code is the 6th code block in this page:
http://www.suddenpresence.com/bbatutorial/chapter03.html (Ctrl+F for: // *** INITIALIZATION )
Quote: |
copy the image into the appropriate location to see if you've got the image right |
How do I do that? (Sorry, I'm a n00b, I never made GBA games before... :-P )
Thanks! ;-)
_________________
"My wealth has doubled since we last met."
-- RICH BOY WILTON, Pokemon Emerald
#83224 - thegamefreak0134 - Sun May 14, 2006 7:36 am
memcpy( (u16 *)0x6000000, &<pic>Data, sizeof(<pic>Data) );
This assumes you've taken a PCX file and converted it to an image array in a header file define. Of course, you said something to the effect of not using PCX files. Anywho (the above is for mode 4 I believe) basically what this does is copies the actual image to the area of RAM (0x6000000) that the GBA uses to draw the screen. It does it in one big lump, so it's nice and fast. Replace "<pic>Data" with whatever your utility of choice outputs as the image array and see what you get.
Note: If the above makes no sense, you're probably not using that kind of utility.
Something just occured to me: Are you using a 240,160 image? If you're not, that might explain your wierd patterened-ness. Can you show us a screenshot of what you're getting? My theory here is that the pattern is all towards the top, indicating that rather than go to the next line arter the width of the image your program is rather continuing on the same line, resulting in vary bad effects. Try making your image 240 by 160 and see if it helps.
Cheers!
-thegamefreak
_________________
What if the hokey-pokey really is what it's all about?
[url=http:/www.darknovagames.com/index.php?action=recruit&clanid=1]Support Zeta on DarkNova![/url]
#83288 - Kixdemp - Mon May 15, 2006 1:01 am
I resized the image to 240x160. I still get a patterned image, but now it doesn't "move"... :-/
Here's what I get: [Images not permitted - Click here to view it]
Know what's wrong? Thanks! ;-)
_________________
"My wealth has doubled since we last met."
-- RICH BOY WILTON, Pokemon Emerald
#83302 - tepples - Mon May 15, 2006 4:57 am
I'll bet money that weird.png is an attempt to display tile data intended for mode 0 in mode 4 (8-bit extended rotation).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#83665 - Kixdemp - Wed May 17, 2006 7:28 pm
Umm... it's a bitmap, why would I want to display it as tiles? :-/
Thanks! ;-)
_________________
"My wealth has doubled since we last met."
-- RICH BOY WILTON, Pokemon Emerald
#83674 - tepples - Wed May 17, 2006 8:08 pm
Kixdemp wrote: |
Umm... it's a bitmap, why would I want to display it as tiles? :-/ |
Perhaps because your image converter was set to output tile data. Either use a tile mode to display tile data or use an extended rotation (bitmap) mode to display bitmap data.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.