Displaying a bmp at full resolution, newbie question

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

Moderators: cheriff, TyRaNiD

Post Reply
wilef
Posts: 3
Joined: Wed Jul 27, 2005 4:06 am

Displaying a bmp at full resolution, newbie question

Post by wilef »

Sorry, I'm new to game programming (though I'm a programmer as a career), so this may be a dumb question. I created a 480x272 bitmap in mspaint and used ConvImage16 to convert it to a *.c file, brought that into bitmap.c from the hello world source code and compiled it.

On the psp, my image appears, but way too big. What am I doing wrong? I want the image to be 480x272, I know I'm missing something obvious...any help would be appreciated.
AnonymousTipster
Posts: 197
Joined: Fri Jul 01, 2005 2:50 am

Post by AnonymousTipster »

Try changing the #define PIXELSIZE in pg.c, it may be above 1. Change it to 1 and that might fix it.
wilef
Posts: 3
Joined: Wed Jul 27, 2005 4:06 am

Post by wilef »

no, checked it out and it's set to 1, here are the constants:

//constants
#define PIXELSIZE 1 //in short
#define LINESIZE 512 //in short
#define FRAMESIZE 0x44000 //in byte

//480*272 = 60*38
#define CMAX_X 60
#define CMAX_Y 38
#define CMAX2_X 30
#define CMAX2_Y 19
#define CMAX4_X 15
#define CMAX4_Y 9
User avatar
cwbowron
Posts: 76
Joined: Fri May 06, 2005 4:22 am
Location: East Lansing, MI
Contact:

Re: Displaying a bmp at full resolution, newbie question

Post by cwbowron »

wilef wrote:Sorry, I'm new to game programming (though I'm a programmer as a career), so this may be a dumb question. I created a 480x272 bitmap in mspaint and used ConvImage16 to convert it to a *.c file, brought that into bitmap.c from the hello world source code and compiled it.

On the psp, my image appears, but way too big. What am I doing wrong? I want the image to be 480x272, I know I'm missing something obvious...any help would be appreciated.
what are you using to display it on the screen? whats the function call look like and whats the function itself look like?

if you are using pgBitBlit thats in some of the stuff maybe you are calling it with a magnitude of more than 1 so its stretching out the bitmap.
wilef
Posts: 3
Joined: Wed Jul 27, 2005 4:06 am

Post by wilef »

cwbowron, thanks I got it, I was using pgBitBlit and had the multiplier on 2. So by using a smaller image and multiplying its size, I assume this makes the program smaller? And if you don't need the resolution, that's the way to go...am I correct?
Post Reply