I was just wondering if there is any way at all that I could call a sound (.wav, .mp3, etc.) and/or a graphic (.jpg, .gif, .bmp, etc.) via my C++ program. I looked in the OpenGL tutorials, but it's not what I wanted per-say (I might delve into that later).
Here's an example of what I would use it for:
And during this bit of the code I would like it to call an audio file (battle music, I guess). Is there any way I could do this?Code:cout<<"It's a goblin, hurry attack."<<endl; while (gob > 0){ //Battle Loop attack = rand() % (HIGH - LOW + 1) + LOW; cout<<"***Slash***"<<endl; Sleep(1000); cout<<"The Goblin has "<<gob - attack<<" life left!"<<endl; gob = gob - attack; Sleep(1500); gobattack = rand() % (gobhi - goblo +1) + goblo; if(gob > 0){ cout<<"***Whack***"<<endl; Sleep(1000); cout<<"You have "<<player - gobattack<<" life left!"<<endl; player = player - gobattack; Sleep(1500); } }
By the way, I am using Microsoft Visual Studio .NET 2003.



LinkBack URL
About LinkBacks



Code, have fun, blow up a computer.