'MarkoeZ' said:
[newbie mode]
Well i have installed Debian on a spare pc, installed Code::blocks, PandoraPanic nicely compiles for linux allready (some minor glitches, but those will be fixed).
Now i have downloaded the pandora toolchain by cpasjuste and i don't have a clue what to do to get this thing compiling for pandora :S Since poke is very busy i thought i'd might as well try asking it here.
Can i somehow simply integrate the toolchain in Code blocks and compile straight from there?
I don't need to have a complete explanation, just a clue where to look for clear information would be sufficient. Linux itself is fairly new to me, but toolchain stuff is just a complete blank :S
All help is appreciated!
[/newbie mode]
I'm not sure what is actually included in cpasjuste's script, but you will definitely need the ARM compiler from Codesorcery, obviously the linux versions.
You will have to setup a new compiler in Code::Blocks and then point it to the relevant compiler executables.
Then the Pandora project target will have to be modified to point to this configured compiler and also directed to any Pandora SDL libs
Yes I've been stupidly busy and got some wonga to show for it... but anyways now I have two weeks vacation, which is bad timing in relation to this project, since I may or may not have access to the net.
Long story short, MarkoeZ is kinda "project lead" right now.
'todd' said:
One curious question: most of my images have alpha backgrounds. That seems to work, generally, except for one. This one is a big, red X (sorry, not convenient to upload it from here: see images/PandoraPanic/bigRedX.png). This image makes a big red "X" framed in the same red. The interior spaces (four of them) are transparent. It always comes up right in Gimp & other image viewers I've tried. Occasionally they come up correct in PandoraPanic -- but usually not. They come up with the red parts transparent and the transparent parts colored (were white; they're blue on the version I made today).
I changed my code to use the "loadImageNoAlpha" and everything seems happy: the non-red background is even transparent! I'm not understanding something, I think.
I would also like to comment on how awesome the toolkit is. Poke, probably I shouldn't credit you alone with the invention of spritesheets.
But wow! I had two different chores in mind today both of which I thought were going to be difficult and involve a lot of ugly code. Spritesheets made them both trivial. Hooray!
And as a hint for anyone interested, the ImageMagick utility "montage" is quite handy for taking a set of consecutively named files (e.g., pic1.png, pic2.png, pic3.png...) and tacking them together as a spritesheet, all aligned just so. It just takes a single line like so:
CODE
montage pic[0-9].png -tile x1 -geometry 240x128+0+0 -background transparent spritesheet.png
See the manpage to adjust for your needs. But it works fabulously. TheBrainSquid made some very nice icons for me, but they weren't aligned they way I wanted them for my code. I cut them out into individual files and used a few montage commands to put them back together how I wanted. Very nice for the gimp-impaired.
--Todd
OK try not to use Alpha unless you really need it. In SDL it seems you have to use software surfaces in order to use alpha channel images. Try to use colour keyed sprites since they are handled much more efficiently.
Then you can just set the transparent colour (if it has been incorrectly detected)
CODE
Sprite.setTransparentColour(Vector2di pixel);
Sprite.setTransparentColour(Colour colour);
You may also have to force Software sprites
CODE
Sprite.setUseHardware(true); // hardware sprites (no alpha support but fast)
Sprite.setUseHardware(false); // soft sprites (alpha but can be sLOWWW)
Thanks for the pat on the back. I just read a lot of tutorials, combined the good bits and also what I learned at uni... It certainly means a lot though to find that my code is usable to others.
Thanks for the tips for spritesheets, I must say that any sprite sheets I've made have been manually aligned...