Initial commit: ROW Client source code

Game client codebase including:
- CharacterActionControl: Character and creature management
- GlobalScript: Network, items, skills, quests, utilities
- RYLClient: Main client application with GUI and event handlers
- Engine: 3D rendering engine (RYLGL)
- MemoryManager: Custom memory allocation
- Library: Third-party dependencies (DirectX, boost, etc.)
- Tools: Development utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-29 16:24:34 +09:00
commit e067522598
5135 changed files with 1745744 additions and 0 deletions

View File

@@ -0,0 +1,443 @@
//------------------------------------------------------------------------------
// File: BGMusic.cpp
//
// Desc: A simple playback applicaiton that plays a cyclic set of media
// files of the same type. This is the code required to use DirectShow
// to play compressed audio in the background of your title in a
// seamless manner.
//
// Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <windows.h>
#include <dshow.h>
#include <tchar.h>
#include <malloc.h>
#include "resource.h"
//------------------------------------------------------------------------------
// Forward Declarations
//------------------------------------------------------------------------------
HRESULT GraphInit(void);
HWND AppInit(HINSTANCE hInstance);
void AppMessageLoop(void);
void AppCleanUp(void);
HRESULT SwapSourceFilter(void);
void ShowCurrentFile(HWND hWnd);
const TCHAR* DXUtil_GetDXSDKMediaPath();
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
VOID CALLBACK MyTimerProc(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime);
//------------------------------------------------------------------------------
// Macros
//------------------------------------------------------------------------------
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
//------------------------------------------------------------------------------
// Constants
//------------------------------------------------------------------------------
#define CLASSNAME TEXT("BGMusicPlayer")
#define APPNAME TEXT("BGMusic Player")
#define APPWIDTH 200
#define APPHEIGHT 100
#define MEDIA_TIMEOUT (10 * 1000) // 10 seconds, represented in milliseconds
//------------------------------------------------------------------------------
// Global Variables
//------------------------------------------------------------------------------
// DirectShow Graph, Filter & Pins used
IGraphBuilder *g_pGraphBuilder = NULL;
IMediaControl *g_pMediaControl = NULL;
IMediaSeeking *g_pMediaSeeking = NULL;
IBaseFilter *g_pSourceCurrent = NULL;
IBaseFilter *g_pSourceNext = NULL;
TCHAR g_szCurrentFile[128];
HWND g_hwndApp;
// File names & variables to track current file
LPCTSTR pstrFiles[] =
{
TEXT("track1.mp3\0"),
TEXT("track2.mp3\0"),
TEXT("track3.mp3\0"),
};
int g_iNumFiles = 3, g_iNextFile = 0;
//------------------------------------------------------------------------------
// Name: WinMain()
// Desc: Main Entry point for the app. Calls the Initialization routines and
// then calls the main processing loop.
//------------------------------------------------------------------------------
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// Initialize application window
if (! AppInit(hInstance))
return 0;
// Initialize DirectShow components and build initial graph
if (SUCCEEDED (GraphInit()))
{
// Main Message Loop
AppMessageLoop();
}
// Clean up
AppCleanUp();
return 0;
}
//------------------------------------------------------------------------------
// Name: GraphInit()
// Desc: Initialization of DirectShow components and initial graph
//------------------------------------------------------------------------------
HRESULT GraphInit(void)
{
HRESULT hr;
// Initialize COM
if (FAILED (hr = CoInitialize(NULL)) )
return hr;
// Create DirectShow Graph
if (FAILED (hr = CoCreateInstance(CLSID_FilterGraph, NULL,
CLSCTX_INPROC, IID_IGraphBuilder,
reinterpret_cast<void **>(&g_pGraphBuilder))) )
return hr;
// Get the IMediaControl Interface
if (FAILED (g_pGraphBuilder->QueryInterface(IID_IMediaControl,
reinterpret_cast<void **>(&g_pMediaControl))))
return hr;
// Get the IMediaControl Interface
if (FAILED (g_pGraphBuilder->QueryInterface(IID_IMediaSeeking,
reinterpret_cast<void **>(&g_pMediaSeeking))))
return hr;
// Create Source Filter for first file
g_iNextFile = 0;
// Create the intial graph
if (FAILED (SwapSourceFilter()))
return hr;
// Set a timer for switching the sources
SetTimer(g_hwndApp, 0, MEDIA_TIMEOUT, (TIMERPROC) MyTimerProc);
return S_OK;
}
//------------------------------------------------------------------------------
// Name: AppInit()
// Desc: Initialization of application window
//------------------------------------------------------------------------------
HWND AppInit(HINSTANCE hInstance)
{
WNDCLASS wc;
// Register the window class
ZeroMemory(&wc, sizeof wc);
wc.lpfnWndProc = WndProc;
wc.hInstance = hInstance;
wc.lpszClassName = CLASSNAME;
wc.lpszMenuName = NULL;
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_BGMUSIC));
if(!RegisterClass(&wc))
return 0;
// Create the main window without support for resizing
g_hwndApp = CreateWindow(CLASSNAME, APPNAME,
WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU
| WS_MINIMIZEBOX | WS_VISIBLE,
CW_USEDEFAULT, CW_USEDEFAULT,
APPWIDTH, APPHEIGHT,
0, 0, hInstance, 0);
return g_hwndApp;
}
//------------------------------------------------------------------------------
// Name: WndProcLoop()
// Desc: Main Message Processor for the Application
//------------------------------------------------------------------------------
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_PAINT:
ShowCurrentFile(hWnd);
break;
case WM_CLOSE:
case WM_DESTROY:
PostQuitMessage(0);
break;
}
return DefWindowProc(hWnd, message, wParam, lParam);
}
//------------------------------------------------------------------------------
// Name: ShowCurrentFile()
// Desc: Display the currently playing media file in the main window
//------------------------------------------------------------------------------
void ShowCurrentFile(HWND hWnd)
{
PAINTSTRUCT ps;
RECT rc;
TCHAR szMsg[128];
BeginPaint(hWnd, &ps);
HDC hdc = GetDC(hWnd);
GetWindowRect(hWnd, &rc);
// Set the text color to bright green against black background
SetTextColor(hdc, RGB(80, 255, 80));
SetBkColor(hdc, RGB(0,0,0));
// Decide where to place the text (centered in window)
int X = (rc.right - rc.left) / 2;
int Y = (rc.bottom - rc.top) / 3;
SetTextAlign(hdc, TA_CENTER | VTA_CENTER);
// Update the text string
wsprintf(szMsg, _T("Playing %s\0"), g_szCurrentFile);
ExtTextOut(hdc, X, Y, ETO_OPAQUE, NULL, szMsg, _tcslen(szMsg), 0);
EndPaint(hWnd, &ps);
}
//------------------------------------------------------------------------------
// Name: AppMessageLoop()
// Desc: Main Message Loop for the Application
//------------------------------------------------------------------------------
void AppMessageLoop(void)
{
MSG msg={0};
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (! TranslateAccelerator(msg.hwnd, NULL, &msg) )
{
TranslateMessage(&msg) ;
DispatchMessage(&msg) ;
}
}
return;
}
//------------------------------------------------------------------------------
// Name: AppCleanUp)
// Desc: Clean up the application
//------------------------------------------------------------------------------
void AppCleanUp(void)
{
// Stop playback
if (g_pMediaControl)
g_pMediaControl->Stop();
// Release all remaining pointers
SAFE_RELEASE( g_pSourceNext);
SAFE_RELEASE( g_pSourceCurrent);
SAFE_RELEASE( g_pMediaSeeking);
SAFE_RELEASE( g_pMediaControl);
SAFE_RELEASE( g_pGraphBuilder);
// Clean up COM
CoUninitialize();
return;
}
//------------------------------------------------------------------------------
// MyTimerProc - Callback when the timer goes off
//------------------------------------------------------------------------------
VOID CALLBACK MyTimerProc(
HWND hwnd, // handle to window
UINT uMsg, // WM_TIMER message
UINT idEvent, // timer identifier
DWORD dwTime // current system time
)
{
SwapSourceFilter();
// Update the "current file" text message
RECT rc;
GetWindowRect(hwnd, &rc);
InvalidateRect(hwnd, &rc, TRUE);
}
//------------------------------------------------------------------------------
// Name: SwapSourceFilter()
// Desc: This routine is used to change the source file in the current graph.
// First the graph is stopped, then the current source filter is removed.
// The new source filter is added, the output pin on this filter is
// rendered, and playback is restarted.
//
// When this routine is called during initialization, there is no
// currently running graph. In that case, Stop becomes a no-op. The source
// filter is added to an empty graph. Then during the render call, all
// necessary filters required to play this source are added to the graph.
//
// On subsequent calls, Stopping the graph allows filters to be removed.
// When the old source filter is removed, all other filters are still
// left in the graph. The new source filter is added, and then the render
// operation reconnects the graph. Since all of the necessary filters for
// playback are already in the graph (if the two files have the same file
// type), these filters are reused. Existing filters in the graph are
// always used first, if possible, during a Render operation. This avoids
// having to create new filter instances with each change.
//------------------------------------------------------------------------------
HRESULT SwapSourceFilter(void)
{
HRESULT hr = S_OK;
IPin *pPin = NULL;
TCHAR szFilename[MAX_PATH];
WCHAR wFileName[MAX_PATH];
// Determine the file to load based on DirectX Media path (from SDK)
_tcscpy( szFilename, DXUtil_GetDXSDKMediaPath() );
_tcscat( szFilename, pstrFiles[g_iNextFile % g_iNumFiles]);
_tcscpy( g_szCurrentFile, pstrFiles[g_iNextFile % g_iNumFiles]);
g_iNextFile++;
// Make sure that this file exists
DWORD dwAttr = GetFileAttributes(szFilename);
if (dwAttr == (DWORD) -1)
return ERROR_FILE_NOT_FOUND;
#ifndef UNICODE
MultiByteToWideChar(CP_ACP, 0, szFilename, -1, wFileName, MAX_PATH);
#else
lstrcpy(wFileName, szFilename);
#endif
// OPTIMIZATION OPPORTUNITY
// This will open the file, which is expensive. To optimize, this
// should be done earlier, ideally as soon as we knew this was the
// next file to ensure that the file load doesn't add to the
// filter swapping time & cause a hiccup.
//
// Add the new source filter to the graph. (Graph can still be running)
hr = g_pGraphBuilder->AddSourceFilter(wFileName, wFileName, &g_pSourceNext);
// Get the first output pin of the new source filter. Audio sources
// typically have only one output pin, so for most audio cases finding
// any output pin is sufficient.
if (SUCCEEDED(hr)) {
hr = g_pSourceNext->FindPin(L"Output", &pPin);
}
// Stop the graph
if (SUCCEEDED(hr)) {
hr = g_pMediaControl->Stop();
}
// Break all connections on the filters. You can do this by adding
// and removing each filter in the graph
if (SUCCEEDED(hr)) {
IEnumFilters *pFilterEnum = NULL;
if (SUCCEEDED(hr = g_pGraphBuilder->EnumFilters(&pFilterEnum))) {
int iFiltCount = 0;
int iPos = 0;
// Need to know how many filters. If we add/remove filters during the
// enumeration we'll invalidate the enumerator
while (S_OK == pFilterEnum->Skip(1)) {
iFiltCount++;
}
// Allocate space, then pull out all of the
IBaseFilter **ppFilters = reinterpret_cast<IBaseFilter **>
(_alloca(sizeof(IBaseFilter *) * iFiltCount));
pFilterEnum->Reset();
while (S_OK == pFilterEnum->Next(1, &(ppFilters[iPos++]), NULL));
SAFE_RELEASE(pFilterEnum);
for (iPos = 0; iPos < iFiltCount; iPos++) {
g_pGraphBuilder->RemoveFilter(ppFilters[iPos]);
// Put the filter back, unless it is the old source
if (ppFilters[iPos] != g_pSourceCurrent) {
g_pGraphBuilder->AddFilter(ppFilters[iPos], NULL);
}
SAFE_RELEASE(ppFilters[iPos]);
}
}
}
// We have the new ouput pin. Render it
if (SUCCEEDED(hr)) {
hr = g_pGraphBuilder->Render(pPin);
g_pSourceCurrent = g_pSourceNext;
g_pSourceNext = NULL;
}
SAFE_RELEASE(pPin);
SAFE_RELEASE(g_pSourceNext); // In case of errors
// Re-seek the graph to the beginning
if (SUCCEEDED(hr)) {
LONGLONG llPos = 0;
hr = g_pMediaSeeking->SetPositions(&llPos, AM_SEEKING_AbsolutePositioning,
&llPos, AM_SEEKING_NoPositioning);
}
// Start the graph
if (SUCCEEDED(hr)) {
hr = g_pMediaControl->Run();
}
// Release the old source filter.
SAFE_RELEASE(g_pSourceCurrent)
return S_OK;
}
//-----------------------------------------------------------------------------
// Name: DXUtil_GetDXSDKMediaPath()
// Desc: Returns the DirectX SDK media path
//-----------------------------------------------------------------------------
const TCHAR* DXUtil_GetDXSDKMediaPath()
{
static TCHAR strNull[2] = _T("");
static TCHAR strPath[MAX_PATH];
DWORD dwType;
DWORD dwSize = MAX_PATH;
HKEY hKey;
// Open the appropriate registry key
LONG lResult = RegOpenKeyEx( HKEY_LOCAL_MACHINE,
_T("Software\\Microsoft\\DirectX SDK"),
0, KEY_READ, &hKey );
if( ERROR_SUCCESS != lResult )
return strNull;
lResult = RegQueryValueEx( hKey, _T("DX81SDK Samples Path"), NULL,
&dwType, (BYTE*)strPath, &dwSize );
RegCloseKey( hKey );
if( ERROR_SUCCESS != lResult )
return strNull;
_tcscat( strPath, _T("\\Media\\") );
return strPath;
}

View File

@@ -0,0 +1,109 @@
# Microsoft Developer Studio Project File - Name="BGMusic" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=BGMusic - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "bgmusic.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "bgmusic.mak" CFG="BGMusic - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "BGMusic - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "BGMusic - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "BGMusic - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "WIN32"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib strmiids.lib /nologo /subsystem:windows /machine:I386 /stack:0x200000,0x200000
!ELSEIF "$(CFG)" == "BGMusic - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FD /GZ /c
# SUBTRACT CPP /Fr /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" /d "WIN32"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib strmiids.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /stack:0x200000,0x200000
!ENDIF
# Begin Target
# Name "BGMusic - Win32 Release"
# Name "BGMusic - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\bgmusic.CPP
# End Source File
# Begin Source File
SOURCE=.\bgmusic.rc
# End Source File
# End Group
# Begin Source File
SOURCE=.\directx.ico
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "BGMusic"=.\bgmusic.DSP - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,201 @@
# Microsoft Developer Studio Generated NMAKE File, Based on bgmusic.dsp
!IF "$(CFG)" == ""
CFG=BGMusic - Win32 Debug
!MESSAGE No configuration specified. Defaulting to BGMusic - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "BGMusic - Win32 Release" && "$(CFG)" != "BGMusic - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "bgmusic.mak" CFG="BGMusic - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "BGMusic - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "BGMusic - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
!IF "$(CFG)" == "BGMusic - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros
ALL : "$(OUTDIR)\bgmusic.exe"
CLEAN :
-@erase "$(INTDIR)\bgmusic.obj"
-@erase "$(INTDIR)\bgmusic.res"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(OUTDIR)\bgmusic.exe"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\bgmusic.res" /d "NDEBUG"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\bgmusic.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib strmiids.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\bgmusic.pdb" /machine:I386 /out:"$(OUTDIR)\bgmusic.exe" /stack:0x200000,0x200000
LINK32_OBJS= \
"$(INTDIR)\bgmusic.obj" \
"$(INTDIR)\bgmusic.res"
"$(OUTDIR)\bgmusic.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "BGMusic - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "$(OUTDIR)\bgmusic.exe"
CLEAN :
-@erase "$(INTDIR)\bgmusic.obj"
-@erase "$(INTDIR)\bgmusic.res"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\bgmusic.exe"
-@erase "$(OUTDIR)\bgmusic.ilk"
-@erase "$(OUTDIR)\bgmusic.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /I "..\..\BaseClasses" /I "..\..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
MTL=midl.exe
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
RSC=rc.exe
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\bgmusic.res" /d "_DEBUG"
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\bgmusic.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib strmiids.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\bgmusic.pdb" /debug /machine:I386 /out:"$(OUTDIR)\bgmusic.exe" /pdbtype:sept /stack:0x200000,0x200000
LINK32_OBJS= \
"$(INTDIR)\bgmusic.obj" \
"$(INTDIR)\bgmusic.res"
"$(OUTDIR)\bgmusic.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("bgmusic.dep")
!INCLUDE "bgmusic.dep"
!ELSE
!MESSAGE Warning: cannot find "bgmusic.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "BGMusic - Win32 Release" || "$(CFG)" == "BGMusic - Win32 Debug"
SOURCE=.\bgmusic.CPP
"$(INTDIR)\bgmusic.obj" : $(SOURCE) "$(INTDIR)"
SOURCE=.\bgmusic.rc
"$(INTDIR)\bgmusic.res" : $(SOURCE) "$(INTDIR)"
$(RSC) $(RSC_PROJ) $(SOURCE)
!ENDIF

View File

@@ -0,0 +1,123 @@
// Microsoft Developer Studio generated resource script.
//
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#define APSTUDIO_HIDDEN_SYMBOLS
#include "windows.h"
#undef APSTUDIO_HIDDEN_SYMBOLS
#include "resource.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_BGMUSIC ICON DISCARDABLE "directx.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resrc1.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""resource.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 8,1,0,0
PRODUCTVERSION 8,1,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "DirectShow Sample\0"
VALUE "CompanyName", "Microsoft\0"
VALUE "FileDescription", "BGMusic Applicatoin\0"
VALUE "FileVersion", "8.10\0"
VALUE "InternalName", "BGMusic\0"
VALUE "LegalCopyright", "Copyright (c) 2000-2001 Microsoft Corporation\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "BGMusic.exe\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "DirectX 8 SDK\0"
VALUE "ProductVersion", "8.1\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,13 @@
DirectShow Sample -- BGMusic
----------------------------
This sample shows how to swap source filters in a filter graph. It will
cycle through three MP3 files, displaying the name of each file as it is played.
The MP3 files used by this sample are located in the Media directory of the
DirectX SDK ( <sdk root>\samples\Multimedia\Media ).
When the application begins, it renders the first audio file in the sequence
and sets a timer. Whenever the timer fires, the application removes the current
source filter and replaces it with a source filter for the next file.
Since the files are all of the same type, there is no need to rebuild the
entire graph.

View File

@@ -0,0 +1,14 @@
//-----------------------------------------------------------------------------
// File: Resource.h
//
// Desc: Header file for DirectShow Background music player
//
// Copyright (c) 2000-2001 Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Resource constants
//-----------------------------------------------------------------------------
#define IDI_BGMUSIC 10000