dmime: Pass objects instead of ifaces to helpers.

This commit is contained in:
Michael Stefaniuc 2015-07-01 09:30:36 +02:00 committed by Alexandre Julliard
parent 40769b4fad
commit a2a2ea0311
1 changed files with 14 additions and 10 deletions

View File

@ -256,8 +256,9 @@ static HRESULT WINAPI IDirectMusicSegTriggerTrack_IPersistStream_IsDirty (LPPERS
return S_FALSE; return S_FALSE;
} }
static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegment (LPPERSISTSTREAM iface, DMUS_PRIVATE_CHUNK* pChunk, IStream* pStm) { static HRESULT parse_segment(IDirectMusicSegTriggerTrack *This, DMUS_PRIVATE_CHUNK *pChunk,
ICOM_THIS_MULTI(IDirectMusicSegTriggerTrack, PersistStreamVtbl, iface); IStream *pStm)
{
DMUS_PRIVATE_CHUNK Chunk; DMUS_PRIVATE_CHUNK Chunk;
DWORD ListSize[3], ListCount[3]; DWORD ListSize[3], ListCount[3];
LARGE_INTEGER liMove; /* used when skipping chunks */ LARGE_INTEGER liMove; /* used when skipping chunks */
@ -312,7 +313,8 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegment (LPPERSIS
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_REF_LIST: { case DMUS_FOURCC_REF_LIST: {
FIXME_(dmfile)(": DMRF (DM References) list\n"); FIXME_(dmfile)(": DMRF (DM References) list\n");
hr = IDirectMusicUtils_IPersistStream_ParseReference (iface, &Chunk, pStm, &pObject); hr = IDirectMusicUtils_IPersistStream_ParseReference((IPersistStream*)&This->PersistStreamVtbl,
&Chunk, pStm, &pObject);
if (FAILED(hr)) { if (FAILED(hr)) {
ERR(": could not load Reference\n"); ERR(": could not load Reference\n");
return hr; return hr;
@ -346,8 +348,9 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegment (LPPERSIS
return S_OK; return S_OK;
} }
static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegmentsList (LPPERSISTSTREAM iface, DMUS_PRIVATE_CHUNK* pChunk, IStream* pStm) { static HRESULT parse_segments_list(IDirectMusicSegTriggerTrack *This, DMUS_PRIVATE_CHUNK *pChunk,
/*ICOM_THIS_MULTI(IDirectMusicSegTriggerTrack, PersistStreamVtbl, iface);*/ IStream *pStm)
{
HRESULT hr = E_FAIL; HRESULT hr = E_FAIL;
DMUS_PRIVATE_CHUNK Chunk; DMUS_PRIVATE_CHUNK Chunk;
DWORD ListSize[3], ListCount[3]; DWORD ListSize[3], ListCount[3];
@ -374,7 +377,7 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegmentsList (LPP
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_SEGMENT_LIST: { case DMUS_FOURCC_SEGMENT_LIST: {
TRACE_(dmfile)(": SEGMENT list\n"); TRACE_(dmfile)(": SEGMENT list\n");
hr = IDirectMusicSegTriggerTrack_IPersistStream_ParseSegment (iface, &Chunk, pStm); hr = parse_segment(This, &Chunk, pStm);
if (FAILED(hr)) return hr; if (FAILED(hr)) return hr;
break; break;
} }
@ -400,8 +403,9 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegmentsList (LPP
return S_OK; return S_OK;
} }
static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegTrackList (LPPERSISTSTREAM iface, DMUS_PRIVATE_CHUNK* pChunk, IStream* pStm) { static HRESULT parse_seqtrack_list(IDirectMusicSegTriggerTrack *This, DMUS_PRIVATE_CHUNK *pChunk,
/*ICOM_THIS_MULTI(IDirectMusicSegTriggerTrack, PersistStreamVtbl, iface);*/ IStream *pStm)
{
HRESULT hr = E_FAIL; HRESULT hr = E_FAIL;
DMUS_PRIVATE_CHUNK Chunk; DMUS_PRIVATE_CHUNK Chunk;
DWORD ListSize[3], ListCount[3]; DWORD ListSize[3], ListCount[3];
@ -434,7 +438,7 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegTrackList (LPP
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_SEGMENTS_LIST: { case DMUS_FOURCC_SEGMENTS_LIST: {
TRACE_(dmfile)(": SEGMENTS list\n"); TRACE_(dmfile)(": SEGMENTS list\n");
hr = IDirectMusicSegTriggerTrack_IPersistStream_ParseSegmentsList (iface, &Chunk, pStm); hr = parse_segments_list(This, &Chunk, pStm);
if (FAILED(hr)) return hr; if (FAILED(hr)) return hr;
break; break;
} }
@ -478,7 +482,7 @@ static HRESULT WINAPI IDirectMusicSegTriggerTrack_IPersistStream_Load (LPPERSIST
switch (Chunk.fccID) { switch (Chunk.fccID) {
case DMUS_FOURCC_SEGTRACK_LIST: { case DMUS_FOURCC_SEGTRACK_LIST: {
TRACE_(dmfile)(": segment trigger track list\n"); TRACE_(dmfile)(": segment trigger track list\n");
hr = IDirectMusicSegTriggerTrack_IPersistStream_ParseSegTrackList (iface, &Chunk, pStm); hr = parse_seqtrack_list(This, &Chunk, pStm);
if (FAILED(hr)) return hr; if (FAILED(hr)) return hr;
break; break;
} }