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
c174a993
Commit
c174a993
authored
Sep 30, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Get rid of the SPRITE typedef.
parent
07760604
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
sprite.c
dlls/d3dx9_36/sprite.c
+14
-9
No files found.
dlls/d3dx9_36/sprite.c
View file @
c174a993
...
...
@@ -32,7 +32,8 @@ struct sprite_vertex
D3DXVECTOR2
tex
;
};
typedef
struct
_SPRITE
{
struct
sprite
{
IDirect3DTexture9
*
texture
;
UINT
texw
,
texh
;
RECT
rect
;
...
...
@@ -40,7 +41,7 @@ typedef struct _SPRITE {
D3DXVECTOR3
pos
;
D3DCOLOR
color
;
D3DXMATRIX
transform
;
}
SPRITE
;
};
struct
d3dx9_sprite
{
...
...
@@ -60,7 +61,7 @@ struct d3dx9_sprite
DWORD
maxanisotropy
;
DWORD
alphacmp_caps
;
SPRITE
*
sprites
;
struct
sprite
*
sprites
;
int
sprite_count
;
/* number of sprites to be drawn */
int
allocated_sprites
;
/* number of (pre-)allocated sprites */
};
...
...
@@ -346,12 +347,16 @@ static HRESULT WINAPI d3dx9_sprite_Draw(ID3DXSprite *iface, IDirect3DTexture9 *t
if
(
texture
==
NULL
)
return
D3DERR_INVALIDCALL
;
if
(
!
This
->
ready
)
return
D3DERR_INVALIDCALL
;
if
(
This
->
allocated_sprites
==
0
)
{
This
->
sprites
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
32
*
sizeof
(
SPRITE
));
This
->
allocated_sprites
=
32
;
}
else
if
(
This
->
allocated_sprites
<=
This
->
sprite_count
)
{
This
->
allocated_sprites
=
This
->
allocated_sprites
*
3
/
2
;
This
->
sprites
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
sprites
,
This
->
allocated_sprites
*
sizeof
(
SPRITE
));
if
(
!
This
->
allocated_sprites
)
{
This
->
sprites
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
32
*
sizeof
(
*
This
->
sprites
));
This
->
allocated_sprites
=
32
;
}
else
if
(
This
->
allocated_sprites
<=
This
->
sprite_count
)
{
This
->
allocated_sprites
+=
This
->
allocated_sprites
/
2
;
This
->
sprites
=
HeapReAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
sprites
,
This
->
allocated_sprites
*
sizeof
(
*
This
->
sprites
));
}
This
->
sprites
[
This
->
sprite_count
].
texture
=
texture
;
if
(
!
(
This
->
flags
&
D3DXSPRITE_DO_NOT_ADDREF_TEXTURE
))
...
...
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