30#define D3DXSPRITE_FLAGLIMIT 511
56 IDirect3DVertexDeclaration9 *
vdecl;
85 IUnknown_AddRef(iface);
101 TRACE(
"%p increasing refcount to %u.\n",
sprite, refcount);
111 TRACE(
"%p decreasing refcount to %u.\n",
sprite, refcount);
121 for (
i = 0;
i <
sprite->sprite_count; ++
i)
186 FIXME(
"iface %p, world %p, view %p stub!\n", iface, world,
view);
194 FIXME(
"iface %p, world %p, view %p stub!\n", iface, world,
view);
273 D3DXMatrixIdentity(&
mat);
286 TRACE(
"iface %p, flags %#x.\n", iface,
flags);
349 struct sprite *new_sprites;
352 TRACE(
"iface %p, texture %p, rect %s, center %p, position %p, color 0x%08x.\n",
358 if (!
This->allocated_sprites)
361 This->allocated_sprites = 32;
363 else if (
This->allocated_sprites <=
This->sprite_count)
366 This->sprites,
This->allocated_sprites * 2 *
sizeof(*
This->sprites));
369 This->sprites = new_sprites;
370 This->allocated_sprites *= 2;
377 if(
This->sprite_count) {
395 This->sprites[
This->sprite_count].center.x=0.0f;
396 This->sprites[
This->sprite_count].center.y=0.0f;
397 This->sprites[
This->sprite_count].center.z=0.0f;
401 This->sprites[
This->sprite_count].pos.x=0.0f;
402 This->sprites[
This->sprite_count].pos.y=0.0f;
403 This->sprites[
This->sprite_count].pos.z=0.0f;
404 }
else This->sprites[
This->sprite_count].pos=*position;
407 This->sprites[
This->sprite_count].transform=
This->transform;
408 This->sprite_count++;
419 TRACE(
"iface %p.\n", iface);
429 while(i<This->sprite_count &&
431 float spritewidth=(
float)
This->sprites[
i].rect.right-(
float)
This->sprites[
i].rect.left;
432 float spriteheight=(
float)
This->sprites[
i].rect.bottom-(
float)
This->sprites[
i].rect.top;
434 vertices[6*
i ].
pos.
x =
This->sprites[
i].pos.x -
This->sprites[
i].center.x;
435 vertices[6*
i ].
pos.
y =
This->sprites[
i].pos.y -
This->sprites[
i].center.y;
436 vertices[6*
i ].
pos.
z =
This->sprites[
i].pos.z -
This->sprites[
i].center.z;
437 vertices[6*
i+1].
pos.
x = spritewidth +
This->sprites[
i].pos.x -
This->sprites[
i].center.x;
438 vertices[6*
i+1].
pos.
y =
This->sprites[
i].pos.y -
This->sprites[
i].center.y;
439 vertices[6*
i+1].
pos.
z =
This->sprites[
i].pos.z -
This->sprites[
i].center.z;
440 vertices[6*
i+2].
pos.
x = spritewidth +
This->sprites[
i].pos.x -
This->sprites[
i].center.x;
441 vertices[6*
i+2].
pos.
y = spriteheight +
This->sprites[
i].pos.y -
This->sprites[
i].center.y;
442 vertices[6*
i+2].
pos.
z =
This->sprites[
i].pos.z -
This->sprites[
i].center.z;
443 vertices[6*
i+3].
pos.
x =
This->sprites[
i].pos.x -
This->sprites[
i].center.x;
444 vertices[6*
i+3].
pos.
y = spriteheight +
This->sprites[
i].pos.y -
This->sprites[
i].center.y;
445 vertices[6*
i+3].
pos.
z =
This->sprites[
i].pos.z -
This->sprites[
i].center.z;
446 vertices[6*
i ].
col =
This->sprites[
i].color;
447 vertices[6*
i+1].
col =
This->sprites[
i].color;
448 vertices[6*
i+2].
col =
This->sprites[
i].color;
449 vertices[6*
i+3].
col =
This->sprites[
i].color;
459 vertices[6*
i+4]=vertices[6*
i];
460 vertices[6*
i+5]=vertices[6*
i+2];
463 &vertices[6 *
i].
pos,
sizeof(*vertices), &
This->sprites[
i].transform, 6);
472 2 *
count, vertices + 6 *
start,
sizeof(*vertices));
477 for(
i=0;
i<
This->sprite_count;
i++)
480 This->sprite_count=0;
491 TRACE(
"iface %p.\n", iface);
510 TRACE(
"iface %p.\n", iface);
530 TRACE(
"iface %p.\n", iface);
534 for (
i = 0;
i <
sprite->sprite_count; ++
i)
589 object->stateblock=
NULL;
591 D3DXMatrixIdentity(&
object->transform);
592 D3DXMatrixIdentity(&
object->view);
601 object->sprites=
NULL;
602 object->allocated_sprites=0;
603 *
sprite=&
object->ID3DXSprite_iface;
#define InterlockedIncrement
#define InterlockedDecrement
static const char * wine_dbgstr_rect(const RECT *prc)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define D3DPTFILTERCAPS_MIPFLINEAR
#define D3DPTFILTERCAPS_MINFANISOTROPIC
#define D3DPTFILTERCAPS_MAGFANISOTROPIC
@ D3DRS_DIFFUSEMATERIALSOURCE
@ D3DRS_INDEXEDVERTEXBLENDENABLE
#define D3DCOLORWRITEENABLE_ALPHA
#define D3DCOLORWRITEENABLE_RED
@ D3DTSS_TEXTURETRANSFORMFLAGS
#define D3DCOLORWRITEENABLE_GREEN
#define D3DCOLORWRITEENABLE_BLUE
#define IDirect3DTexture9_GetLevelDesc(p, a, b)
#define IDirect3DDevice9_SetIndices(p, a)
#define IDirect3DDevice9_CreateVertexDeclaration(p, a, b)
#define IDirect3DTexture9_AddRef(p)
#define IDirect3DDevice9_SetTextureStageState(p, a, b, c)
#define IDirect3DDevice9_DrawPrimitiveUP(p, a, b, c, d)
#define IDirect3DDevice9_SetNPatchMode(p, a)
#define IDirect3DStateBlock9_Release(p)
#define IDirect3DDevice9_SetRenderState(p, a, b)
#define IDirect3DDevice9_SetPixelShader(p, a)
#define IDirect3DDevice9_GetDeviceCaps(p, a)
#define IDirect3DVertexDeclaration9_Release(p)
#define IDirect3DDevice9_SetStreamSource(p, a, b, c, d)
#define IDirect3DDevice9_GetViewport(p, a)
#define IDirect3DDevice9_EndStateBlock(p, a)
#define IDirect3DDevice9_SetTransform(p, a, b)
#define IDirect3DDevice9_SetVertexShader(p, a)
#define IDirect3DDevice9_Release(p)
#define IDirect3DStateBlock9_Apply(p)
#define IDirect3DDevice9_BeginStateBlock(p)
#define IDirect3DStateBlock9_Capture(p)
#define IDirect3DDevice9_SetTexture(p, a, b)
#define IDirect3DTexture9_Release(p)
#define IDirect3DDevice9_AddRef(p)
#define IDirect3DDevice9_SetVertexDeclaration(p, a)
#define IDirect3DDevice9_SetSamplerState(p, a, b, c)
@ D3DRS_ENABLEADAPTIVETESSELLATION
@ D3DRS_SEPARATEALPHABLENDENABLE
#define D3DERR_INVALIDCALL
#define D3DXSPRITE_DONOTMODIFY_RENDERSTATE
#define D3DXSPRITE_BILLBOARD
#define D3DXSPRITE_SORT_DEPTH_BACKTOFRONT
#define D3DXSPRITE_SORT_DEPTH_FRONTTOBACK
#define D3DXSPRITE_DONOTSAVESTATE
#define ID3DXSprite_OnResetDevice(p)
#define D3DXSPRITE_SORT_TEXTURE
#define ID3DXSprite_Flush(p)
#define D3DXSPRITE_OBJECTSPACE
#define D3DXSPRITE_DO_NOT_ADDREF_TEXTURE
D3DXMATRIX *WINAPI D3DXMatrixOrthoOffCenterLH(D3DXMATRIX *pout, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf)
D3DXVECTOR3 *WINAPI D3DXVec3TransformCoordArray(D3DXVECTOR3 *out, UINT outstride, const D3DXVECTOR3 *in, UINT instride, const D3DXMATRIX *matrix, UINT elements)
#define HeapFree(x, y, z)
GLuint GLuint GLsizei count
GLuint GLenum GLenum transform
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static float(__cdecl *square_half_float)(float x
#define IsEqualGUID(rguid1, rguid2)
static HRESULT WINAPI d3dx9_sprite_SetTransform(ID3DXSprite *iface, const D3DXMATRIX *transform)
HRESULT WINAPI D3DXCreateSprite(struct IDirect3DDevice9 *device, struct ID3DXSprite **sprite)
static HRESULT WINAPI d3dx9_sprite_GetTransform(ID3DXSprite *iface, D3DXMATRIX *transform)
static void set_states(struct d3dx9_sprite *object)
static HRESULT WINAPI d3dx9_sprite_QueryInterface(ID3DXSprite *iface, REFIID riid, void **out)
static HRESULT WINAPI d3dx9_sprite_SetWorldViewLH(ID3DXSprite *iface, const D3DXMATRIX *world, const D3DXMATRIX *view)
static struct d3dx9_sprite * impl_from_ID3DXSprite(ID3DXSprite *iface)
static HRESULT WINAPI d3dx9_sprite_OnLostDevice(ID3DXSprite *iface)
static HRESULT WINAPI d3dx9_sprite_GetDevice(struct ID3DXSprite *iface, struct IDirect3DDevice9 **device)
static HRESULT WINAPI d3dx9_sprite_End(ID3DXSprite *iface)
static HRESULT WINAPI d3dx9_sprite_Flush(ID3DXSprite *iface)
static HRESULT WINAPI d3dx9_sprite_SetWorldViewRH(ID3DXSprite *iface, const D3DXMATRIX *world, const D3DXMATRIX *view)
#define D3DXSPRITE_FLAGLIMIT
static HRESULT WINAPI d3dx9_sprite_Begin(ID3DXSprite *iface, DWORD flags)
static ULONG WINAPI d3dx9_sprite_AddRef(ID3DXSprite *iface)
static const ID3DXSpriteVtbl d3dx9_sprite_vtbl
static HRESULT WINAPI d3dx9_sprite_Draw(ID3DXSprite *iface, IDirect3DTexture9 *texture, const RECT *rect, const D3DXVECTOR3 *center, const D3DXVECTOR3 *position, D3DCOLOR color)
static ULONG WINAPI d3dx9_sprite_Release(ID3DXSprite *iface)
static HRESULT WINAPI d3dx9_sprite_OnResetDevice(ID3DXSprite *iface)
IDirect3DDevice9 * device
IDirect3DStateBlock9 * stateblock
IDirect3DVertexDeclaration9 * vdecl
ID3DXSprite ID3DXSprite_iface
IDirect3DTexture9 * texture
#define CONTAINING_RECORD(address, type, field)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)