forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Displaying a bmp at full resolution, newbie question

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
wilef



Joined: 27 Jul 2005
Posts: 3

PostPosted: Wed Jul 27, 2005 4:13 am    Post subject: Displaying a bmp at full resolution, newbie question Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Wed Jul 27, 2005 4:19 am    Post subject: Reply with quote

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
View user's profile Send private message
wilef



Joined: 27 Jul 2005
Posts: 3

PostPosted: Wed Jul 27, 2005 4:42 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger
cwbowron



Joined: 06 May 2005
Posts: 76
Location: East Lansing, MI

PostPosted: Wed Jul 27, 2005 4:49 am    Post subject: Re: Displaying a bmp at full resolution, newbie question Reply with quote

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
View user's profile Send private message Visit poster's website
wilef



Joined: 27 Jul 2005
Posts: 3

PostPosted: Wed Jul 27, 2005 7:21 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group