LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-26-2006, 02:19 AM   #1
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Blog Entries: 1

Rep: Reputation: 30
Strange problem displaying a string on SDL_ttf screen...


After getting my game updated and running again, I came across this strange problem: I can dispaly just about all my menu options with the exception of the last two: The last string shows one strange character while the 2nd string in MENU_LINE array shows several strange characters.. but the first two are perfect. Here is a link to the program files http://pntbalg.shackspace.com/GeorgeLair/052606.. just download all those files (both ttf's do the same thing), and type make in a terminal. I did a seperate small program which just does the string to char control structures... and it works just without the problem described above. I did a gdb on the program and the only error I see is when I send in strings to display_font(). Here is the gdb output...

Code:
(gdb) s
main (nNumberofArgs=1, pszArgs=0xbf8e1a34) at main.cpp:104
104                     for(int MENU_DONE = 0, TXT_PLACE = 10;
(gdb) s
108                             display_font(10, TXT_PLACE, 18, 255, 0, 255, MENU_LINE[MENU_DONE]);
(gdb) s
display_font (x2=10, y2=100, Psize=18, R=255, G=0, B=255, OUTMESS=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<cha
r>> = {<No data fields>}, <No data fields>}, _M_p = 0x807204c "Quit"}}) at gSDL.cpp:12
12      {
(gdb) s
14              font=TTF_OpenFont("couri.ttf", Psize);
This is the same result for all the strings, but if this was the problem, then all of them should be acting funky. Any ideas?

... the string to char conversion little program is located in the same directory. Thanks in advance.
 
Old 05-29-2006, 02:01 PM   #2
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
RHLinuxGUY I think you would be better posting these SDL questions on one of the following links which are both game dev sites. I woould help but I only use SDL for a cross platform windowing/events api for opengl.


http://www.gamedev.net/
http://gpwiki.org/forums/
 
Old 05-29-2006, 02:46 PM   #3
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Ok dmail, will do, thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question/Problem with SDL_ttf program I made... RHLinuxGUY Programming 6 04-26-2006 10:38 PM
Not displaying movies on TV screen rabalder321 Linux - Newbie 1 01-26-2006 06:10 PM
Really strange change of string values in C realos Programming 34 08-08-2005 09:32 PM
Strange screen problem installing fedora markpower Linux - Newbie 2 06-22-2005 02:31 AM
Strange string in log file ne21 Linux - Security 2 04-18-2004 04:23 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration