This commit is contained in:
Paul 2001-01-04 17:10:13 +00:00
parent db82702cef
commit d15480ef40
3 changed files with 76 additions and 3 deletions

View File

@ -1,3 +1,9 @@
// PKG
// Temporay home of memcard stuff
// Controls:
// UP Save file ( this writes the save file to the memcard, must be done first time )
// DOWN Overwrite saved file
// LEFT Load saved file
/*=========================================================================
credits.cpp
@ -76,6 +82,11 @@
Params:
Returns:
---------------------------------------------------------------------- */
#include "memcard\memcard.h"
#include "memcard\saveload.h"
SaveLoadDatabase *sl;
enum{mode_none,mode_save,mode_load};
int mode=mode_none;
void CFrontEndCredits::init()
{
}
@ -99,6 +110,9 @@ void CFrontEndCredits::shutdown()
static u8 *s_image;
void CFrontEndCredits::select()
{
MemCard::Start();
sl=new ("sldb") SaveLoadDatabase();
mode=mode_none;
m_shuttingDown=false;
s_image=CFileIO::loadFile(BACKDROP_CREDITS_GFX);
ASSERT(s_image);
@ -114,6 +128,8 @@ void CFrontEndCredits::select()
---------------------------------------------------------------------- */
void CFrontEndCredits::unselect()
{
MemCard::Stop();
delete sl;
ClearScreenImage();
MemFree(s_image); s_image=NULL;
}
@ -136,7 +152,64 @@ void CFrontEndCredits::render()
---------------------------------------------------------------------- */
void CFrontEndCredits::think(int _frames)
{
if(!m_shuttingDown)
sl->think();
if(mode==mode_none)
{
int pad=PadGetDown(0);
if(pad&PAD_UP)
{
PAUL_DBGMSG("startSave(\"blah\")");
sl->startSave("blah");
mode=mode_save;
}
else if(pad&PAD_DOWN)
{
PAUL_DBGMSG("startSave(\"blah\",0)");
sl->startSave("blah",0);
mode=mode_save;
}
else if(pad&PAD_LEFT)
{
PAUL_DBGMSG("startLoad(0)");
sl->startLoad(0);
mode=mode_load;
}
}
else if(mode==mode_save)
{
int status=sl->getSaveStatus();
if(status!=SaveLoadDatabase::IN_PROGRESS)
{
if(status==SaveLoadDatabase::FINISHED_OK)
{
MEMCARD_DBGMSG("saved ok");
}
else
{
MEMCARD_DBGMSG("not saved ok");
}
mode=mode_none;
}
}
else if(mode==mode_load)
{
int status=sl->getLoadStatus();
if(status!=SaveLoadDatabase::IN_PROGRESS)
{
if(status==SaveLoadDatabase::FINISHED_OK)
{
MEMCARD_DBGMSG("loaded ok");
}
else
{
MEMCARD_DBGMSG("not loaded ok");
}
mode=mode_none;
}
}
if(mode==mode_none)
if(!m_shuttingDown&&!CFader::isFading())
{
if(PadGetDown(0)&(PAD_CROSS|PAD_START))
{

View File

@ -220,13 +220,13 @@ if(_frames==0)_frames=1;
CXAStream::ControlXA();
s_xmplaySound->think();
// Push through any changes in volume
if(s_volumeDirty[VOL_FADE])
{
s_volumeDirty[VOL_SONG]=true;
s_volumeDirty[VOL_SFX]=true;
s_volumeDirty[VOL_SPEECH]=true;
s_volumeDirty[VOL_FADE]=false;
}
if(s_volumeDirty[VOL_SONG])
{

View File

@ -361,7 +361,7 @@ xmModId CXMPlaySound::loadModData(FileEquate _modFe)
if(mod->m_refCount==0)
{
mod->m_xmData=(u8*)CFileIO::loadFile(_modFe);
InitXMData(mod->m_xmData,modId,0);//XM_UseS3MPanning);
InitXMData(mod->m_xmData,modId,XM_UseXMPanning);
mod->m_file=_modFe;
mod->m_refCount=1;
break;