Advertisement

[SDL] Load images from directory

Started by July 31, 2011 05:06 AM
0 comments, last by Wooh 13 years, 4 months ago
I'm using SDL.image.h for my image loading (IMG_Load(filename.c_str());) and am wondering if there is a way to load images from a specified directory?

Example:
C:\Documents and Settings\[name]\Desktop\[game]\[art]

It would be very helpful organizationally. If anyone has any ideas or advice please let me know. Thanks in advance.
You can pass the full path or relative path to the file you want to load.
IMG_Load("C:/Documents and Settings/[name]/Desktop/[game]/[art]");

This topic is closed to new replies.

Advertisement