| View previous topic :: View next topic |
| Author |
Message |
wilef
Joined: 27 Jul 2005 Posts: 3
|
Posted: Wed Jul 27, 2005 4:13 am Post subject: Displaying a bmp at full resolution, newbie question |
|
|
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. |
|
| Back to top |
|
 |
AnonymousTipster
Joined: 01 Jul 2005 Posts: 197
|
Posted: Wed Jul 27, 2005 4:19 am Post subject: |
|
|
| Try changing the #define PIXELSIZE in pg.c, it may be above 1. Change it to 1 and that might fix it. |
|
| Back to top |
|
 |
wilef
Joined: 27 Jul 2005 Posts: 3
|
Posted: Wed Jul 27, 2005 4:42 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
cwbowron

Joined: 06 May 2005 Posts: 76 Location: East Lansing, MI
|
Posted: Wed Jul 27, 2005 4:49 am Post subject: Re: Displaying a bmp at full resolution, newbie question |
|
|
| 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. |
|
| Back to top |
|
 |
wilef
Joined: 27 Jul 2005 Posts: 3
|
Posted: Wed Jul 27, 2005 7:21 am Post subject: |
|
|
| 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? |
|
| Back to top |
|
 |
|