MusicMod: Stop function
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1787 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
1 parent
906c8a5a63
commit
b5ee01ea60
8 files changed
+129
-87
No files matched your search
@@ -297,18 +297,19 @@ CFrame::MM_UpdateGUI()
|
||||
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
// Play and stop music
|
||||
// ---------------------------------------------------------------------------------------
|
||||
void
|
||||
CFrame::MM_OnPlay()
|
||||
{
|
||||
//MessageBox(0, "CFrame::OnPlay > Begin", "", 0);
|
||||
wprintf("\nCFrame::OnPlayMusicMod > Begin\n");
|
||||
|
||||
//wprintf("\nCFrame::OnPlayMusicMod > Begin\n");
|
||||
|
||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||
{
|
||||
if (Core::GetState() == Core::CORE_RUN)
|
||||
{
|
||||
wprintf("CFrame::OnPlayMusicMod > Pause\n");
|
||||
//wprintf("CFrame::OnPlayMusicMod > Pause\n");
|
||||
if(!MusicMod::GlobalPause) // we may has set this elsewhere
|
||||
{
|
||||
MusicMod::GlobalPause = true;
|
||||
@@ -316,12 +317,11 @@ CFrame::MM_OnPlay()
|
||||
{
|
||||
Player_Pause();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
wprintf("CFrame::OnPlayMusicMod > Play\n");
|
||||
//wprintf("CFrame::OnPlayMusicMod > Play\n");
|
||||
if(MusicMod::GlobalPause) // we may has set this elsewhere
|
||||
{
|
||||
MusicMod::GlobalPause = false;
|
||||
@@ -332,9 +332,15 @@ CFrame::MM_OnPlay()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
CFrame::MM_OnStop()
|
||||
{
|
||||
Player_Stop();
|
||||
MusicMod::GlobalPause = false;
|
||||
}
|
||||
// =======================================================================================
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
|
||||
@@ -79,7 +79,6 @@ void StructSort (std::vector <MyFilesStructure> &MyFiles)
|
||||
{
|
||||
for (int j = i + 1; j < MyFiles.size(); j++)
|
||||
{
|
||||
//if (printerStock[ i ].brand > printerStock[ j ].brand) //comparing brands
|
||||
if (MyFiles[ i ].offset > MyFiles[ j ].offset) //comparing cost
|
||||
{
|
||||
temp = MyFiles[ i ]; // Swapping entire struct
|
||||
@@ -92,7 +91,6 @@ void StructSort (std::vector <MyFilesStructure> &MyFiles)
|
||||
|
||||
for (long i=1; i<(long)MyFiles.size(); ++i)
|
||||
{
|
||||
//cout << printerStock.at(i).brand.c_str() << printerStock.at(i).cost << "\n";
|
||||
std::cout << i << " " << MyFiles[i].path.c_str() << "#" << MyFiles[i].offset << "\n";
|
||||
}
|
||||
|
||||
@@ -122,19 +120,21 @@ void Main(std::string FileName)
|
||||
MyFiles.at(i).path = my_pFileSystem->m_FileInfoVector.at(i).m_FullPath;
|
||||
}
|
||||
|
||||
// Sort the files by offset
|
||||
StructSort(MyFiles);
|
||||
|
||||
// These things below will not need to be updated after a new game is started
|
||||
if (dllloaded) return;
|
||||
|
||||
Player_Main(bShowConsole); // Call the DLL for the first time
|
||||
// Call the DLL for the first time
|
||||
Player_Main(bShowConsole);
|
||||
//play_file("c:\\demo36_02.ast");
|
||||
wprintf("DLL loaded\n");
|
||||
dllloaded = true; // Do this once
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Make Music directory
|
||||
// -------------------------
|
||||
LPSECURITY_ATTRIBUTES attr;
|
||||
attr = NULL;
|
||||
MusicPath = "Music\\";
|
||||
@@ -272,13 +272,10 @@ void CheckFile(u64 offset, u64 size)
|
||||
// ---------------------------------------------------------------------------------------
|
||||
}
|
||||
}
|
||||
|
||||
//wprintf("Blob.cpp:Read <%i> <%i> <%i> <%i>\n", offset, size, out_ptr);
|
||||
} // This ends the entire filescan
|
||||
// =======================================================================================
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
} // end of namespace
|
||||
Reference in new issue
Block a user