mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
MusicMod: Fixed the build
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3507 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -57,6 +57,9 @@
|
||||
// Build with playback rerecording options
|
||||
//#define RERECORDING
|
||||
|
||||
// Build with music modification
|
||||
//#define MUSICMOD
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------
|
||||
|
||||
#endif // _SETUP_H_
|
||||
|
@ -29,6 +29,12 @@
|
||||
#include "VolumeCreator.h"
|
||||
#include "Filesystem.h"
|
||||
|
||||
// Music mod
|
||||
#include "Setup.h" // Define MUSICMOD here
|
||||
#ifdef MUSICMOD
|
||||
#include "../../../../Externals/MusicMod/Main/Src/Main.h"
|
||||
#endif
|
||||
|
||||
using namespace DVDInterface;
|
||||
|
||||
|
||||
@ -222,6 +228,11 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
|
||||
{
|
||||
PanicAlert("Cant read from DVD_Plugin - DVD-Interface: Fatal Error");
|
||||
}
|
||||
|
||||
#ifdef MUSICMOD
|
||||
std::string Tmp = pFilename;
|
||||
MusicMod::CheckFile(Tmp);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -20,6 +20,14 @@
|
||||
#include "VolumeGC.h"
|
||||
#include "StringUtil.h"
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Music mod
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#include "Setup.h" // Define MUSICMOD here
|
||||
#ifdef MUSICMOD
|
||||
#include "../../../../Externals/MusicMod/Main/Src/Main.h"
|
||||
#endif
|
||||
///////////////////////
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
@ -37,7 +45,13 @@ bool CVolumeGC::Read(u64 _Offset, u64 _Length, u8* _pBuffer) const
|
||||
{
|
||||
if (m_pReader == NULL)
|
||||
return false;
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Music mod
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#ifdef MUSICMOD
|
||||
MusicMod::FindFilename(_Offset, _Length);
|
||||
#endif
|
||||
///////////////////////
|
||||
return m_pReader->Read(_Offset, _Length, _pBuffer);
|
||||
}
|
||||
|
||||
|
@ -58,6 +58,10 @@
|
||||
#include "Frame.h"
|
||||
#include "CodeWindow.h"
|
||||
#include "Setup.h"
|
||||
// MusicMod
|
||||
#ifdef MUSICMOD
|
||||
#include "../../../Externals/MusicMod/Main/Src/Main.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@ -200,6 +204,16 @@ bool BootCore(const std::string& _rFilename)
|
||||
#endif
|
||||
// =====================
|
||||
|
||||
|
||||
// =================================================================
|
||||
// Init MusicMod
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#ifdef MUSICMOD
|
||||
MusicMod::Main(StartUp.m_strFilename);
|
||||
#endif
|
||||
// ===================
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,11 @@ be accessed from Core::GetWindowHandle().
|
||||
// includes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "Common.h" // Common
|
||||
#include "FileUtil.h"
|
||||
#include "Timer.h"
|
||||
#include "Setup.h"
|
||||
|
||||
#include "Globals.h" // Local
|
||||
#include "Frame.h"
|
||||
#include "ConfigMain.h"
|
||||
@ -44,11 +49,6 @@ be accessed from Core::GetWindowHandle().
|
||||
#include "GameListCtrl.h"
|
||||
#include "BootManager.h"
|
||||
|
||||
#include "Common.h" // Common
|
||||
#include "FileUtil.h"
|
||||
#include "Timer.h"
|
||||
#include "Setup.h"
|
||||
|
||||
#include "ConfigManager.h" // Core
|
||||
#include "Core.h"
|
||||
#include "HW/DVDInterface.h"
|
||||
@ -82,7 +82,6 @@ extern "C" {
|
||||
};
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
/* Windows functions. Setting the cursor with wxSetCursor() did not work in this instance.
|
||||
Probably because it's somehow reset from the WndProc() in the child window */
|
||||
@ -114,7 +113,7 @@ HWND MSWGetParent_(HWND Parent)
|
||||
return GetParent(Parent);
|
||||
}
|
||||
#endif
|
||||
/////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
@ -226,13 +225,12 @@ int abc = 0;
|
||||
return wxPanel::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
#endif
|
||||
/////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// event tables
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------
|
||||
|
||||
// Notice that wxID_HELP will be processed for the 'About' menu and the toolbar
|
||||
// help button.
|
||||
@ -256,6 +254,13 @@ EVT_MENU(IDM_CONFIG_DSP_PLUGIN, CFrame::OnPluginDSP)
|
||||
EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnPluginPAD)
|
||||
EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnPluginWiimote)
|
||||
|
||||
#ifdef MUSICMOD
|
||||
EVT_MENU(IDM_MUTE, CFrame::MM_OnMute)
|
||||
EVT_MENU(IDM_MUSIC_PLAY, CFrame::MM_OnPause)
|
||||
EVT_COMMAND_SCROLL(IDM_VOLUME, CFrame::MM_OnVolume)
|
||||
//EVT_MENU(IDM_MM_LOG, CFrame::MM_OnLog)
|
||||
#endif
|
||||
|
||||
EVT_MENU(IDM_NETPLAY, CFrame::OnNetPlay)
|
||||
EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
|
||||
EVT_MENU(IDM_MEMCARD, CFrame::OnMemcard)
|
||||
@ -291,13 +296,12 @@ EVT_HOST_COMMAND(wxID_ANY, CFrame::OnHostMessage)
|
||||
EVT_TIMER(wxID_ANY, CFrame::OnTimer)
|
||||
#endif
|
||||
END_EVENT_TABLE()
|
||||
/////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Creation and close, quit functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// ----------------------------------------
|
||||
CFrame::CFrame(bool showLogWindow,
|
||||
wxFrame* parent,
|
||||
wxWindowID id,
|
||||
@ -342,6 +346,12 @@ CFrame::CFrame(bool showLogWindow,
|
||||
ConsoleListener *console = LogManager::GetInstance()->getConsoleListener();
|
||||
if (SConfig::GetInstance().m_InterfaceConsole)
|
||||
console->Open();
|
||||
//////////////////////////////////////////
|
||||
// Init MusicMod and the console window in the dll
|
||||
#ifdef MUSICMOD
|
||||
MM_OnLog(SConfig::GetInstance().m_InterfaceConsole);
|
||||
#endif
|
||||
//////////////////////////////////////////
|
||||
|
||||
// This panel is the parent for rendering and it holds the gamelistctrl
|
||||
//m_Panel = new wxPanel(this, IDM_MPANEL);
|
||||
@ -443,7 +453,7 @@ void CFrame::OnClose(wxCloseEvent& event)
|
||||
UpdateGUI();
|
||||
}
|
||||
}
|
||||
/////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -100,6 +100,22 @@ class CFrame : public wxFrame
|
||||
|
||||
char **drives;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// Music mod
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#ifdef MUSICMOD
|
||||
wxToolBarToolBase* mm_ToolMute, * mm_ToolPlay, * mm_ToolLog;
|
||||
wxSlider * mm_Slider;
|
||||
|
||||
void MM_UpdateGUI(); void MM_PopulateGUI(); void MM_InitBitmaps(int Theme);
|
||||
void MM_OnPlay(); void MM_OnStop();
|
||||
void MM_OnMute(wxCommandEvent& event);
|
||||
void MM_OnPause(wxCommandEvent& event);
|
||||
void MM_OnVolume(wxScrollEvent& event);
|
||||
void MM_OnLog(bool);
|
||||
#endif
|
||||
///////////////////////////////////
|
||||
|
||||
enum EToolbar
|
||||
{
|
||||
Toolbar_FileOpen,
|
||||
@ -117,6 +133,10 @@ class CFrame : public wxFrame
|
||||
Toolbar_Wiimote,
|
||||
Toolbar_Help,
|
||||
|
||||
#ifdef MUSICMOD // Music modification
|
||||
Toolbar_Log, Toolbar_PluginDSP_Dis, Toolbar_Log_Dis,
|
||||
#endif
|
||||
|
||||
EToolbar_Max
|
||||
};
|
||||
|
||||
|
@ -16,24 +16,38 @@
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
|
||||
/*
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Documentation
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
1.1 Windows
|
||||
|
||||
CFrame is the main parent window. Inside CFrame there is m_Panel which is the
|
||||
parent for the rendering window (when we render to the main window). In Windows
|
||||
the rendering window is created by giving CreateWindow() m_Panel->GetHandle()
|
||||
as parent window and creating a new child window to m_Panel. The new child
|
||||
window handle that is returned by CreateWindow() can be accessed from
|
||||
Core::GetWindowHandle().
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////*/
|
||||
|
||||
|
||||
// FIXME: why doesn't it work on windows???
|
||||
#ifndef _WIN32
|
||||
#include "Common.h"
|
||||
#endif
|
||||
|
||||
#include "Setup.h" // Common
|
||||
|
||||
#if defined(HAVE_SFML) && HAVE_SFML || defined(_WIN32)
|
||||
#include "NetWindow.h"
|
||||
#endif
|
||||
|
||||
#include "Common.h" // Common
|
||||
#include "FileUtil.h"
|
||||
#include "FileSearch.h"
|
||||
#include "Timer.h"
|
||||
|
||||
#include "Globals.h" // Local
|
||||
#include "Frame.h"
|
||||
#include "ConfigMain.h"
|
||||
@ -47,12 +61,6 @@ Core::GetWindowHandle().
|
||||
#include "LogWindow.h"
|
||||
#include "WxUtils.h"
|
||||
|
||||
#include "Common.h" // Common
|
||||
#include "FileUtil.h"
|
||||
#include "FileSearch.h"
|
||||
#include "Timer.h"
|
||||
#include "Setup.h"
|
||||
|
||||
#include "ConfigManager.h" // Core
|
||||
#include "Core.h"
|
||||
#include "HW/DVDInterface.h"
|
||||
@ -91,7 +99,10 @@ static const long TOOLBAR_STYLE = wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT;
|
||||
wxCheatsWindow* CheatsWindow;
|
||||
wxInfoWindow* InfoWindow;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// Create menu items
|
||||
// ----------------------
|
||||
void CFrame::CreateMenu()
|
||||
{
|
||||
if (GetMenuBar())
|
||||
@ -211,9 +222,12 @@ void CFrame::CreateMenu()
|
||||
// Associate the menu bar with the frame
|
||||
SetMenuBar(menuBar);
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
// Create toolbar items
|
||||
// ----------------------
|
||||
void CFrame::PopulateToolbar(wxToolBar* toolBar)
|
||||
{
|
||||
int w = m_Bitmaps[Toolbar_FileOpen].GetWidth(),
|
||||
@ -224,10 +238,7 @@ void CFrame::PopulateToolbar(wxToolBar* toolBar)
|
||||
toolBar->AddTool(wxID_REFRESH, _T("Refresh"), m_Bitmaps[Toolbar_Refresh], _T("Refresh"));
|
||||
toolBar->AddTool(IDM_BROWSE, _T("Browse"), m_Bitmaps[Toolbar_Browse], _T("Browse for an ISO directory..."));
|
||||
toolBar->AddSeparator();
|
||||
|
||||
toolBar->AddTool(IDM_PLAY, _T("Play"), m_Bitmaps[Toolbar_Play], _T("Play"));
|
||||
|
||||
|
||||
toolBar->AddTool(IDM_STOP, _T("Stop"), m_Bitmaps[Toolbar_Stop], _T("Stop"));
|
||||
#ifdef _WIN32
|
||||
toolBar->AddTool(IDM_TOGGLE_FULLSCREEN, _T("Fullscr."), m_Bitmaps[Toolbar_FullScreen], _T("Toggle Fullscreen"));
|
||||
@ -242,10 +253,21 @@ void CFrame::PopulateToolbar(wxToolBar* toolBar)
|
||||
toolBar->AddSeparator();
|
||||
toolBar->AddTool(IDM_HELPABOUT, _T("About"), m_Bitmaps[Toolbar_Help], _T("About Dolphin"));
|
||||
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Music mod
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#ifdef MUSICMOD
|
||||
MM_PopulateGUI();
|
||||
#endif
|
||||
///////////////////////
|
||||
|
||||
|
||||
// after adding the buttons to the toolbar, must call Realize() to reflect
|
||||
// the changes
|
||||
toolBar->Realize();
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// Delete and recreate the toolbar
|
||||
@ -362,15 +384,31 @@ void CFrame::InitBitmaps()
|
||||
default: PanicAlert("Theme selection went wrong");
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Music modification
|
||||
// -------------
|
||||
#ifdef MUSICMOD
|
||||
MM_InitBitmaps(Theme);
|
||||
#endif
|
||||
//////////////////////////
|
||||
|
||||
|
||||
// Update in case the bitmap has been updated
|
||||
if (GetToolBar() != NULL)
|
||||
RecreateToolbar();
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Start the game or change the disc
|
||||
// -------------
|
||||
void CFrame::BootGame()
|
||||
{
|
||||
// Music modification
|
||||
#ifdef MUSICMOD
|
||||
MM_OnPlay();
|
||||
#endif
|
||||
|
||||
// Rerecording
|
||||
#ifdef RERECORDING
|
||||
Core::RerecordingStart();
|
||||
@ -470,8 +508,12 @@ void CFrame::OnBootDrive(wxCommandEvent& event)
|
||||
{
|
||||
BootManager::BootCore(drives[event.GetId()-IDM_DRIVE1]);
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Refresh the file list and browse for a favorites directory
|
||||
// --------------------
|
||||
void CFrame::OnRefresh(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
if (m_GameListCtrl)
|
||||
@ -485,7 +527,12 @@ void CFrame::OnBrowse(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
m_GameListCtrl->BrowseForDirectory();
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Create screenshot
|
||||
// --------------------
|
||||
static inline void GenerateScreenshotName(std::string& name)
|
||||
{
|
||||
int index = 1;
|
||||
@ -510,11 +557,19 @@ void CFrame::OnScreenshot(wxCommandEvent& WXUNUSED (event))
|
||||
if(!bPaused)
|
||||
Core::SetState(Core::CORE_RUN);
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Stop the emulation
|
||||
// --------------------
|
||||
void CFrame::DoStop()
|
||||
{
|
||||
// Music modification
|
||||
#ifdef MUSICMOD
|
||||
MM_OnStop();
|
||||
#endif
|
||||
|
||||
// Rerecording
|
||||
#ifdef RERECORDING
|
||||
Core::RerecordingStop();
|
||||
@ -551,6 +606,8 @@ void CFrame::OnStop(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
DoStop();
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
void CFrame::OnConfigMain(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
@ -595,7 +652,6 @@ void CFrame::OnPluginWiimote(wxCommandEvent& WXUNUSED (event))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void CFrame::OnHelp(wxCommandEvent& event)
|
||||
{
|
||||
switch (event.GetId())
|
||||
@ -752,6 +808,14 @@ void CFrame::ToggleConsole(bool check)
|
||||
else
|
||||
console->Close();
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Music mod
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#ifdef MUSICMOD
|
||||
MM_OnLog(SConfig::GetInstance().m_InterfaceConsole);
|
||||
#endif
|
||||
///////////////////////
|
||||
|
||||
// Make sure the check is updated (if wxw isn't calling this func)
|
||||
GetMenuBar()->FindItem(IDM_TOGGLE_CONSOLE)->Check(check);
|
||||
}
|
||||
@ -759,6 +823,10 @@ void CFrame::ToggleConsole(bool check)
|
||||
// Update the enabled/disabled status
|
||||
void CFrame::UpdateGUI()
|
||||
{
|
||||
#ifdef MUSICMOD
|
||||
MM_UpdateGUI();
|
||||
#endif
|
||||
|
||||
// Save status
|
||||
bool initialized = Core::GetState() != Core::CORE_UNINITIALIZED;
|
||||
bool running = Core::GetState() == Core::CORE_RUN;
|
||||
|
@ -79,6 +79,17 @@ enum
|
||||
IDM_HELPWEBSITE,
|
||||
IDM_HELPGOOGLECODE,
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
// Music modification
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#ifdef MUSICMOD
|
||||
IDM_MUTE,
|
||||
IDM_MUSIC_PLAY,
|
||||
IDM_VOLUME, IDM_VOLUME_LABEL, IDM_VOLUME_PANEL,
|
||||
IDM_MM_LOG,
|
||||
#endif
|
||||
//////////////////////////////////////////////////////
|
||||
|
||||
IDM_CONFIG_MAIN,
|
||||
IDM_CONFIG_GFX_PLUGIN,
|
||||
IDM_CONFIG_DSP_PLUGIN,
|
||||
|
Reference in New Issue
Block a user