Idiot requires help with spaceships, aliens, lasers!

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
jubber
Posts: 6
Joined: Thu Jan 19, 2006 5:14 pm

Idiot requires help with spaceships, aliens, lasers!

Post by jubber »

Hi chaps - first time poster here with a question or two. I'm trying to write a 2D game on the psp - and so far your forums have proved invaluable, especially getting cygwin and psptool up and running. I am using Blit from the samples and getting a starfield up and running with it was simplicity itself. Whack some stars into the texture and blit it every frame. Easy However now I want to load up some bitmaps (Spaceships! Lasers! Aliens!).

I can load 32 bpp Windows bitmaps into memory with a handy routine someone posted on one of these forums. Now comes the tricky bit which makes my tiny brain unhappy. Blit uses 16 bit texture blitting, but bmp files can only be in 32 bits (well at least this is what Paintshop Pro tells me....) soooo....

Either I need to convert blit to use 32 bit textures (easy to change the variables, eg GU_TEXTURE_32BITF from 16BIT but I get text working but no starfield anymore, even when filling the array with very big numbers) or I need some way to load 16 bit textures. From files obviously - encoding all the graphics in the pbp using one of those pngtoc type apps is not appropriate for a game with levels.

Have I been a thickie and just changing to 32 bit should work but I've made an elementary error, ie vertex should stay 16BIT

or is there a program out there that can output 16 bit files from bitmaps etc which I could then dump into ram.

Sorry if this is a bit long winded - only started coding two days ago, so a bit noob. No, a lot noob.

Cheers,

Robin Jubber
Post Reply