Beginner's Guide to Game Programming Ep1 Part 6-B Drawing Text in SDL
Uploader Comments (LusikkaMage)
Top Comments
-
Thanks!
-
Thanks ^0^
All Comments (13)
-
am i the only one who noticed the intro and code at 0:16?
-
LOL nevermind, I didn't realise you had to manually download fonts.
-
I can't get the font to load.
font = TTF_OpenFont( "data/georgia.ttf", size );
doesn't work for me. How do I know the correct path to the font?
-
Great
-
I already got it long time ago :P thanks for help though :)
-
@YouKondziu An int and a const char are different types of data you must first convert scoreN into a string probably using the _itoa_s () function.
-
I can't get variable to be displayed, but when I put int "Text" it works, heres the part of code. int scoreN = 1; SDL_Surface *Score = NULL; Score = TTF_RenderText_Solid( regfont, scoreN ,blackc); SDL_BlitSurface(Score,NULL,scr
een,&cords); I want scoreN to increase when stick is picked, but I get error saying that invalid convertion from int to const char
anyone could help?
-
Lusikka, you have a nicer sounding voice.
-
You may want to pass that string as "const string& msg". This way is faster because the string won't be copied, just a reference will be passed (it's like a pointer). And const because you do not want to accidentally modify it in a drawing function.
-
Nice tut o/
thnx



yay it's finally out
TheShadowsedge 2 years ago 2
Yooop! Thank ye thank ye Alex. Sorry I didn't get this done before I went on vacation. P:
LusikkaMage 2 years ago