Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e89cef0e
Commit
e89cef0e
authored
Oct 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmstyle: Rename style_motif to style_pattern.
Doc says "A motif is a special kind of pattern in a style".
parent
ce8ec96a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
style.c
dlls/dmstyle/style.c
+19
-16
No files found.
dlls/dmstyle/style.c
View file @
e89cef0e
...
...
@@ -62,7 +62,8 @@ static void style_part_destroy(struct style_part *part)
free
(
part
);
}
struct
style_motif
{
struct
style_pattern
{
struct
list
entry
;
DWORD
dwRhythm
;
DMUS_IO_PATTERN
pattern
;
...
...
@@ -79,7 +80,7 @@ struct style
struct
dmobject
dmobj
;
LONG
ref
;
DMUS_IO_STYLE
style
;
struct
list
motif
s
;
struct
list
pattern
s
;
struct
list
bands
;
struct
list
parts
;
};
...
...
@@ -133,7 +134,7 @@ static ULONG WINAPI style_Release(IDirectMusicStyle8 *iface)
if
(
!
ref
)
{
struct
style_band
*
band
,
*
band2
;
struct
style_
motif
*
motif
,
*
motif2
;
struct
style_
pattern
*
pattern
;
struct
style_part_ref
*
part_ref
;
struct
style_part
*
part
;
void
*
next
;
...
...
@@ -144,14 +145,15 @@ static ULONG WINAPI style_Release(IDirectMusicStyle8 *iface)
IDirectMusicBand_Release
(
band
->
pBand
);
free
(
band
);
}
LIST_FOR_EACH_ENTRY_SAFE
(
motif
,
motif2
,
&
This
->
motifs
,
struct
style_motif
,
entry
)
{
list_remove
(
&
motif
->
entry
);
LIST_FOR_EACH_ENTRY_SAFE
(
part_ref
,
next
,
&
motif
->
part_refs
,
struct
style_part_ref
,
entry
)
LIST_FOR_EACH_ENTRY_SAFE
(
pattern
,
next
,
&
This
->
patterns
,
struct
style_pattern
,
entry
)
{
list_remove
(
&
pattern
->
entry
);
LIST_FOR_EACH_ENTRY_SAFE
(
part_ref
,
next
,
&
pattern
->
part_refs
,
struct
style_part_ref
,
entry
)
{
list_remove
(
&
part_ref
->
entry
);
free
(
part_ref
);
}
free
(
motif
);
free
(
pattern
);
}
LIST_FOR_EACH_ENTRY_SAFE
(
part
,
next
,
&
This
->
parts
,
struct
style_part
,
entry
)
...
...
@@ -227,7 +229,7 @@ static HRESULT WINAPI style_EnumMotif(IDirectMusicStyle8 *iface, DWORD index,
WCHAR
*
name
)
{
struct
style
*
This
=
impl_from_IDirectMusicStyle8
(
iface
);
const
struct
style_
motif
*
motif
=
NULL
;
const
struct
style_
pattern
*
pattern
=
NULL
;
const
struct
list
*
cursor
;
unsigned
int
i
=
0
;
...
...
@@ -237,18 +239,19 @@ static HRESULT WINAPI style_EnumMotif(IDirectMusicStyle8 *iface, DWORD index,
return
E_POINTER
;
/* index is zero based */
LIST_FOR_EACH
(
cursor
,
&
This
->
motifs
)
{
LIST_FOR_EACH
(
cursor
,
&
This
->
patterns
)
{
if
(
i
==
index
)
{
motif
=
LIST_ENTRY
(
cursor
,
struct
style_motif
,
entry
);
pattern
=
LIST_ENTRY
(
cursor
,
struct
style_pattern
,
entry
);
break
;
}
i
++
;
}
if
(
!
motif
)
if
(
!
pattern
)
return
S_FALSE
;
if
(
motif
->
desc
.
dwValidData
&
DMUS_OBJ_NAME
)
lstrcpynW
(
name
,
motif
->
desc
.
wszName
,
DMUS_MAX_NAME
);
if
(
pattern
->
desc
.
dwValidData
&
DMUS_OBJ_NAME
)
lstrcpynW
(
name
,
pattern
->
desc
.
wszName
,
DMUS_MAX_NAME
);
else
name
[
0
]
=
0
;
...
...
@@ -524,7 +527,7 @@ static HRESULT parse_pattern_list(struct style *This, DMUS_PRIVATE_CHUNK *pChunk
DWORD
ListSize
[
3
],
ListCount
[
3
];
LARGE_INTEGER
liMove
;
/* used when skipping chunks */
IDirectMusicBand
*
pBand
=
NULL
;
struct
style_
motif
*
pNewMotif
=
NULL
;
struct
style_
pattern
*
pNewMotif
=
NULL
;
if
(
pChunk
->
fccID
!=
DMUS_FOURCC_PATTERN_LIST
)
{
ERR_
(
dmfile
)(
": %s chunk should be a PATTERN list
\n
"
,
debugstr_fourcc
(
pChunk
->
fccID
));
...
...
@@ -543,7 +546,7 @@ static HRESULT parse_pattern_list(struct style *This, DMUS_PRIVATE_CHUNK *pChunk
TRACE_
(
dmfile
)(
": Pattern chunk
\n
"
);
/** alloc new motif entry */
if
(
!
(
pNewMotif
=
calloc
(
1
,
sizeof
(
*
pNewMotif
))))
return
E_OUTOFMEMORY
;
list_add_tail
(
&
This
->
motif
s
,
&
pNewMotif
->
entry
);
list_add_tail
(
&
This
->
pattern
s
,
&
pNewMotif
->
entry
);
IStream_Read
(
pStm
,
&
pNewMotif
->
pattern
,
Chunk
.
dwSize
,
NULL
);
/** TODO trace pattern */
...
...
@@ -896,7 +899,7 @@ HRESULT create_dmstyle(REFIID lpcGUID, void **ppobj)
obj
->
dmobj
.
IPersistStream_iface
.
lpVtbl
=
&
persiststream_vtbl
;
list_init
(
&
obj
->
parts
);
list_init
(
&
obj
->
bands
);
list_init
(
&
obj
->
motif
s
);
list_init
(
&
obj
->
pattern
s
);
hr
=
IDirectMusicStyle8_QueryInterface
(
&
obj
->
IDirectMusicStyle8_iface
,
lpcGUID
,
ppobj
);
IDirectMusicStyle8_Release
(
&
obj
->
IDirectMusicStyle8_iface
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment