Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

bios10h

Loading WAV and BMP from CURRENT_DIR$\sounds and CURRENT_DIR$\graphics

This topic is 6586 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, I just programmed a tetris-clone for learning purpose and fun. Eveything is working well now but I have a ton of files in my program (.exe) directory. I would like to create child directory .\sounds and .\graphics and load my files from these dir. I uses PlaySound for wav and LoadImage for BMP. Summary : I need a Win32 function to get my program location when running. I will then concat the child dir and filename ! Anybody can help with that ? Or bring another solution than this one ? sorry for bad english, bios10h ------------------------------------------ Stephane Duguay DMI C.S. student, University of Sherbrooke, Province of Quebec, Canada.

Share this post


Link to post
Share on other sites
Advertisement
Look up:

GetCurrentDirectory()
SetCurrentDirectory()

Those should be all you need.

Share this post


Link to post
Share on other sites
GetModuleFileName() gives you filename of your application, regardless of current folder, easily.

I recommend you to look up CreateDirectory(), splitpath(), and makepath(). They also help you, I guess.

Kurie

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!