Ok Ill do that.
For now, here is the xiemsfiles header
// XiemFiles.h FILE FOR CALL TO ARMS
// AUTHOR: NATHAN KRYGIER
// FILE CREATION DATE: 6/21/06
// LAST UPDATED: 6/21/06
class Xiemfiles
{
public:
Xiemfiles();
void LoadImage(char *sFileName, int iFileNum);
void LoadSound(char *sFileName, int iFileNum);
void LoadMesh();
void LoadWEP();
void LoadCLS();
void LoadLVL();
private:
char *sTempSound;
char *sTempImage;
};
Xiemfiles::Xiemfiles()
{
sTempSound = "tempxsf.wav";
sTempImage = "tempxif.bmp";
}
void Xiemfiles::LoadImage(char *sFileName, int iFileNum)
{
if(dbFileExist(sFileName) == 1)
{
dbRenameFile(sFileName,sTempImage);
dbLoadImage(sTempImage,iFileNum,1);
dbRenameFile(sTempImage,sFileName);
}
else if(dbFileExist(sFileName) != 1)
{
MessageBox(NULL,"Unable to load XIF File","Xiem Image File Error",MB_OK);
}
}
void Xiemfiles::LoadSound(char *sFileName, int iFileNum)
{
if(dbFileExist(sFileName) == 1)
{
dbRenameFile(sFileName,sTempSound);
dbLoadSound(sTempSound,iFileNum);
dbRenameFile(sTempSound,sFileName);
}
else if(dbFileExist(sFileName) != 1)
{
MessageBox(NULL,"Unable to load XSF File","Xiem Sound File Error",MB_OK);
}
}
And where I set the value for sMenuMusic
//*****************************************************
// CLASS CONSTRUCTOR
//*****************************************************
igeApplication::igeApplication()
{
bLoop = true;
bSplashLoop = true;
iResolutionX = 800;
iResolutionY = 600;
iColorBits = 32;
sWindowTitle = "Call To Arms v1.00 Beta";
sBackdrop = "images/backdrop.xif";
sMenuMusic = "sound/menu.xsf";
sSplashImage_A = "images/xiemsoft.xif";
iSplashFadeDelay_A = 33;
iSplashWait_A = 3000;
sSplashImage_B = "images/ctasplash.xif";
iSplashFadeDelay_B = 33;
iSplashWait_B = 3000;
}
Where I make the LoadSound call
//****************************************************
// PLAYSPLASH PLAYS SPLASH SCREENS
//****************************************************
void igeApplication::PlaySplash()
{
File.LoadImage(sSplashImage_A,SPLASH_ONE);
dbSprite(SPLASH_ONE,0,0,SPLASH_ONE);
dbHideSprite(SPLASH_ONE);
File.LoadImage(sSplashImage_B,SPLASH_TWO);
dbSprite(SPLASH_TWO,0,0,SPLASH_TWO);
dbHideSprite(SPLASH_TWO);
File.LoadSound(sMenuMusic,MENU_MUSIC);
dbPlaySound(MENU_MUSIC);
// rest function cut out
Current Project: CTA Beta
Lines: 559
Last Updated: 6/23/06 at 12:23 AM EST.