Jump to content
  • Advertisement
Sign in to follow this  
MrSpiceGirl

C++ - SDL & Modifying text and colors

This topic is 4459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there! Im currently working with a little project, a text-based RPG. Im still repeating basics (since I want to remember it when I pass on to more complicated stuff). I got the advice to start using SDL for simple graphcis but didnt get it to work properly on my current computer* So I am creating this in that dos-alike window (don't know the name for it, since dos disappeared with win98 i assume it is not a dos-window). Though, I would like to change the color of the grey text. E.g when the character talks I would like it to display white text, and when a NPC talks I´d like it to display another one, while the story goes in grey and the battles in another. Is it possible or do I have to use any add-ons like SDL? I also wonder if there is someway to slow the whole thing down. After the first phrase, I would like the game to wait a few seconds before it starts printing the next. So any advice welcome. *I used Lazy Foo's guide and installed SDL. Afterwards I did chapter 2 in the tutorial, the Hello World, program. Though, only a black screen was displayed. I made sure that all the images were in the right directory. I also tried using the files that were downloadable but they didn´t work either. Anyone who knows what could be the problem?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by MrSpiceGirl
*I used Lazy Foo's guide and installed SDL. Afterwards I did chapter 2 in the tutorial, the Hello World, program. Though, only a black screen was displayed. I made sure that all the images were in the right directory. I also tried using the files that were downloadable but they didn´t work either. Anyone who knows what could be the problem?


Try compiling the source provided in the zip, make sure the images from the zip are in the same directory as the exe and run the exe by double clicking it. Sometimes files won't load if it's run from the IDE.

Share this post


Link to post
Share on other sites
Thank you Lazy Foo, It solved the whole thing :D Your my hero :P

So I guess I´ll be starting to work with SDL now then, since Lazy Foo saved my day :D

That means I pretty much don´t need answers on my questions for the moment, so admins, feel free to lock the thread.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!