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 

N00b HELP! SDL_ttf problem (file placement)?

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



Joined: 01 Apr 2008
Posts: 3
Location: New York, NY

PostPosted: Tue Apr 01, 2008 2:40 am    Post subject: N00b HELP! SDL_ttf problem (file placement)? Reply with quote

Hi,

I'm having a problem with a simple program (my first for PSP) I'm working on which uses SDL_ttf. I've built the libraries, and everything seems to work fine, but text does not show up on the screen. Compiling the same code on Linux does display the text.

Is there a certain directory that files must be placed? I have the file (FreeSans.ttf) in the same directory as EBOOT.PBP.

Do I have to open the font specifying the path in a specific way? The line right now to open the font looks like:

Code:
TTF_OpenFont("FreeSans.ttf", 18);


I've tried outputting any errors to a text file, but the file never gets created.

The Makefile is that of the logic sample with "-lSDL_ttf -lfreetype -lSDL..." and other appropriate SDL stuff added.

I've drawn images to the screen with no problem, so it is working, just not TTF.

I've tried outputting to std::cout and/or std::cerr, but while stdout.txt and stderr.txt are created, they are both empty.
Back to top
View user's profile Send private message
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Tue Apr 01, 2008 3:19 am    Post subject: Reply with quote

Are you sure you use the SDL_Flip(screen); function.

It was my problem too and i found this solution.
Back to top
View user's profile Send private message
thebigbad



Joined: 01 Apr 2008
Posts: 3
Location: New York, NY

PostPosted: Tue Apr 01, 2008 8:12 am    Post subject: Reply with quote

Thanx that was the first thing i checked as i've done that before. Like i said everything else like images show just not text. Works fine on linux.
Back to top
View user's profile Send private message
thebigbad



Joined: 01 Apr 2008
Posts: 3
Location: New York, NY

PostPosted: Thu Apr 03, 2008 4:37 am    Post subject: Reply with quote

Well, I finally get PSPLink to work, although I have issues with it I'll leave that for later.

Now that I'm running under PSPLink, I get my debugging messages that I put in the code, woohoo!

TTF_GetError() returns "Can't seek in stream." A search on here reveals nothing, and Google no help either (all results snippets of SDL_ttf.c where it returns the error).

I see there is another project on PSP that uses SDL?SDL_ttf although I haven't the chance to try it yet.

A little info on the psplibraries build I'm using:

Revision 2354 of the psp toolchain.
Revision 2347 of the psplibraries chain, 12-12-07.

Older than I originally thought, I'll update these later, as compiling the toolchain/libs on this thing is S-L-O-W. Will the newer revisions even fix this problem? From what I can see, its somewhere in SDL_ttf, SDL_RWops, or maybe the standard fseek. Unfortunately I'm a casual developer and don't have the knowledge I need to fix this if I have to go too deep.

Built on Ubuntu 7.10, 2.6.22-14-ppc32 g++ 4.1.3, ld 2.18 (I guess this shouldn't matter unless 4.1.3 has bugs in regards to compiling the psp toolset).
Back to top
View user's profile Send private message
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