[C++] SDL Newbie Question

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

Post Reply
Pornomag
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 41
Joined: Tue Jun 21, 2011 5:39 am
Programming Language of Choice: C++

[C++] SDL Newbie Question

Post by Pornomag »

Okay so after spending some time in Objective C and learning how to make apps and stuff for iOS, I found it extremely easy to log some errors in my programs.
And then coming back to SDL, I then wondered how could I do this in SDL, like display visually text if there was an error, in visual studio log messages or something like that?

Thanks in advance and sorry if I sound like an uber noob :P
Aleios
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 78
Joined: Mon Feb 21, 2011 2:55 am
Current Project: Aleios Engine
Favorite Gaming Platforms: PC, Dreamcast
Programming Language of Choice: C++
Location: Melbourne, Australia

Re: [C++] SDL Newbie Question

Post by Aleios »

To output to the VC++ debugger i think there is a pragma named message, i think #pragma message("BLAH") but this is only at compile time. To display text using SDL's blitting, use SDL_ttf, an extension to SDL for displaying text. Otherwise you could do some file io and write to a debug log kind of thing. (eg. "debug.txt").
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: [C++] SDL Newbie Question

Post by Falco Girgis »

Or just create a console project and use the standard output via printf() and cout.
Pornomag
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 41
Joined: Tue Jun 21, 2011 5:39 am
Programming Language of Choice: C++

Re: [C++] SDL Newbie Question

Post by Pornomag »

Thanks everyone :D
Post Reply