ReactOS  0.4.15-dev-489-g75a0787
texture.c
Go to the documentation of this file.
1 /*
2  * Implementation of IDirect3DRMTextureX interfaces
3  *
4  * Copyright 2012 Christian Costa
5  * Copyright 2016 Aaryaman Vasishta
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21 
22 #include "d3drm_private.h"
23 
25 
26 static inline struct d3drm_texture *impl_from_IDirect3DRMTexture(IDirect3DRMTexture *iface)
27 {
29 }
30 
31 static inline struct d3drm_texture *impl_from_IDirect3DRMTexture2(IDirect3DRMTexture2 *iface)
32 {
34 }
35 
36 static inline struct d3drm_texture *impl_from_IDirect3DRMTexture3(IDirect3DRMTexture3 *iface)
37 {
39 }
40 
42 {
43  TRACE("texture %p is being destroyed.\n", texture);
44 
45  d3drm_object_cleanup((IDirect3DRMObject*)&texture->IDirect3DRMTexture_iface, &texture->obj);
46  if (texture->image || texture->surface)
48  if (texture->surface)
49  IDirectDrawSurface_Release(texture->surface);
51 }
52 
54 {
55  if (!image
56  || !image->red_mask
57  || !image->green_mask
58  || !image->blue_mask
59  || !image->buffer1
60  || !(image->rgb || (image->palette && image->palette_size)))
61  {
62  return FALSE;
63  }
64 
65  return TRUE;
66 }
67 
68 static BOOL d3drm_image_palettise(D3DRMIMAGE *image, unsigned char *src_data,
69  SIZE_T w, SIZE_T h, BOOL flip)
70 {
71  unsigned char *dst_data, *src_ptr, *dst_ptr;
72  SIZE_T src_pitch, dst_pitch, i, x, y;
74  unsigned int colour_count = 0;
75 
76  if (w > (~(SIZE_T)0 - 3) / h)
77  return FALSE;
78 
79  src_pitch = flip ? -w * 3 : w * 3;
80  dst_pitch = (w + 3) & ~3;
81 
82  if (!(dst_data = heap_alloc(dst_pitch * h)))
83  {
84  WARN("Failed to allocate image buffer.\n");
85  return FALSE;
86  }
87  memset(dst_data, 0xff, dst_pitch * h);
88 
89  if (!(palette = heap_alloc(256 * sizeof(*palette))))
90  {
91  WARN("Failed to allocate palette.\n");
92  heap_free(dst_data);
93  return FALSE;
94  }
95 
96  src_ptr = flip ? &src_data[(h - 1) * w * 3] : src_data;
97  dst_ptr = dst_data;
98 
99  for (y = 0; y < h; ++y)
100  {
101  for (x = 0; x < w; ++x)
102  {
103  for (i = 0; i < colour_count; ++i)
104  {
105  entry = &palette[i];
106  if (entry->red == src_ptr[x * 3 + 0]
107  && entry->green == src_ptr[x * 3 + 1]
108  && entry->blue == src_ptr[x * 3 + 2])
109  break;
110  }
111 
112  if (i == colour_count)
113  {
114  if (colour_count == 256)
115  {
116  heap_free(dst_data);
118  return FALSE;
119  }
120 
121  entry = &palette[colour_count++];
122  entry->red = src_ptr[x * 3 + 0];
123  entry->green = src_ptr[x * 3 + 1];
124  entry->blue = src_ptr[x * 3 + 2];
125  entry->flags = D3DRMPALETTE_READONLY;
126  }
127 
128  dst_ptr[x] = i;
129  }
130 
131  src_ptr += src_pitch;
132  dst_ptr += dst_pitch;
133  }
134 
135  image->depth = 8;
136  image->rgb = 0;
137  image->bytes_per_line = dst_pitch;
138  image->buffer1 = dst_data;
139  image->red_mask = 0xff;
140  image->green_mask = 0xff;
141  image->blue_mask = 0xff;
142  image->palette_size = colour_count;
143  if (!(image->palette = heap_realloc(palette, colour_count * sizeof(*palette))))
144  image->palette = palette;
145 
146  return TRUE;
147 }
148 
149 static HRESULT d3drm_image_load_32(D3DRMIMAGE *image, unsigned char *src_data,
150  LONGLONG src_data_size, SIZE_T w, SIZE_T h, BOOL flip)
151 {
152  unsigned char *dst_data, *src_ptr, *dst_ptr;
153  SIZE_T src_pitch, dst_pitch, x, y;
154 
155  if (d3drm_image_palettise(image, src_data, w, h, flip))
156  return D3DRM_OK;
157 
158  if (w > (~(SIZE_T)0 / 4) / h)
159  return D3DRMERR_BADALLOC;
160 
161  src_pitch = flip ? -w * 3 : w * 3;
162  dst_pitch = w * 4;
163 
164  if (!(dst_data = heap_alloc(dst_pitch * h)))
165  {
166  WARN("Failed to allocate image buffer.\n");
167  return D3DRMERR_BADALLOC;
168  }
169 
170  src_ptr = flip ? &src_data[(h - 1) * w * 3] : src_data;
171  dst_ptr = dst_data;
172 
173  for (y = 0; y < h; ++y)
174  {
175  for (x = 0; x < w; ++x)
176  {
177  dst_ptr[x * 4 + 0] = src_ptr[x * 3 + 0];
178  dst_ptr[x * 4 + 1] = src_ptr[x * 3 + 1];
179  dst_ptr[x * 4 + 2] = src_ptr[x * 3 + 2];
180  dst_ptr[x * 4 + 3] = 0xff;
181  }
182 
183  src_ptr += src_pitch;
184  dst_ptr += dst_pitch;
185  }
186 
187  image->depth = 32;
188  image->rgb = 1;
189  image->bytes_per_line = dst_pitch;
190  image->buffer1 = dst_data;
191  image->red_mask = 0xff0000;
192  image->green_mask = 0x00ff00;
193  image->blue_mask = 0x0000ff;
194  image->palette_size = 0;
195  image->palette = NULL;
196 
197  return D3DRM_OK;
198 }
199 
201  unsigned char *src_data, LONGLONG src_data_size, SIZE_T w, SIZE_T h, BOOL flip)
202 {
203  unsigned char *dst_data;
204  SIZE_T i;
205 
206  if (w > ~(SIZE_T)0 / h)
207  return D3DRMERR_BADALLOC;
208 
209  if (!(dst_data = heap_alloc(w * h)))
210  {
211  WARN("Failed to allocate image buffer.\n");
212  return D3DRMERR_BADALLOC;
213  }
214 
215  if (!(image->palette = heap_alloc(256 * sizeof(*image->palette))))
216  {
217  WARN("Failed to allocate palette.\n");
218  heap_free(dst_data);
219  return D3DRMERR_BADALLOC;
220  }
221 
222  memcpy(image->palette, palette, 256 * sizeof(*image->palette));
223  for (i = 0; i < 256; ++i)
224  {
225  image->palette[i].flags = D3DRMPALETTE_READONLY;
226  }
227 
228  if (flip)
229  {
230  for (i = 0; i < h; ++i)
231  {
232  memcpy(&dst_data[i * w], &src_data[(h - 1 - i) * w], w);
233  }
234  }
235  else
236  {
237  memcpy(dst_data, src_data, w * h);
238  }
239 
240  image->depth = 8;
241  image->rgb = 0;
242  image->bytes_per_line = w;
243  image->buffer1 = dst_data;
244  image->red_mask = 0xff;
245  image->green_mask = 0xff;
246  image->blue_mask = 0xff;
247  image->palette_size = 256;
248 
249  return D3DRM_OK;
250 }
251 
252 static void CDECL destroy_image_callback(IDirect3DRMObject *obj, void *arg)
253 {
254  D3DRMIMAGE *image = arg;
255 
256  TRACE("texture object %p, image %p.\n", obj, image);
257 
258  heap_free(image->buffer1);
259  heap_free(image);
260 }
261 
263  const char *path, BOOL flip, D3DRMIMAGE **image_out)
264 {
266  unsigned int w, h, bpp;
269  D3DRMIMAGE *image;
270  BITMAPINFO *info;
271  LONGLONG rem;
272  HRESULT hr;
273 
275  return D3DRMERR_BADOBJECT;
276 
278  CloseHandle(file);
280  return D3DRMERR_BADVALUE;
281 
282  if (!GetFileSizeEx(mapping, &size))
283  {
285  return D3DRMERR_BADVALUE;
286  }
287  rem = size.QuadPart;
288 
291  if (!header)
292  return D3DRMERR_BADVALUE;
293 
295  if (!(image = heap_alloc_zero(sizeof(*image))))
296  goto fail;
297 
299  if (rem < sizeof(*header) || header->bfType != 0x4d42 /* BM */)
300  goto fail;
301  rem -= sizeof(*header);
302 
303  info = (BITMAPINFO *)&header[1];
304  /* Only allow version 1 DIB's (BITMAPINFOHEADER) to be loaded. */
305  if (rem < sizeof(info->bmiHeader) || info->bmiHeader.biSize != sizeof(info->bmiHeader))
306  goto fail;
307  rem -= sizeof(info->bmiHeader);
308 
309  w = info->bmiHeader.biWidth;
310  h = abs(info->bmiHeader.biHeight);
311  bpp = info->bmiHeader.biBitCount == 24 ? 32 : info->bmiHeader.biBitCount;
312  if (bpp != 8 && bpp != 32)
313  goto fail;
314 
315  image->width = w;
316  image->height = h;
317  image->aspectx = 1;
318  image->aspecty = 1;
319  if (bpp == 8)
320  {
321  rem -= 256 * sizeof(*info->bmiColors);
322  if (w > rem / h)
323  goto fail;
324  hr = d3drm_image_load_8(image, info->bmiColors, (unsigned char *)&info->bmiColors[256], rem, w, h, flip);
325  }
326  else
327  {
328  if (w > (rem / 3) / h)
329  goto fail;
330  hr = d3drm_image_load_32(image, (unsigned char *)&info->bmiColors, rem, w, h, flip);
331  }
332  if (FAILED(hr))
333  goto fail;
334 
335  /* Use an internal destroy callback to destroy the image struct. */
337 
338  *image_out = image;
339 
341 
342  return hr;
343 
344 fail:
345  heap_free(image);
347 
348  return hr;
349 }
350 
351 static HRESULT WINAPI d3drm_texture1_QueryInterface(IDirect3DRMTexture *iface, REFIID riid, void **out)
352 {
354 
355  TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
356 
357  return IDirect3DRMTexture3_QueryInterface(&texture->IDirect3DRMTexture3_iface, riid, out);
358 }
359 
360 static ULONG WINAPI d3drm_texture1_AddRef(IDirect3DRMTexture *iface)
361 {
363 
364  TRACE("iface %p.\n", iface);
365 
366  return IDirect3DRMTexture3_AddRef(&texture->IDirect3DRMTexture3_iface);
367 }
368 
369 static ULONG WINAPI d3drm_texture1_Release(IDirect3DRMTexture *iface)
370 {
372 
373  TRACE("iface %p.\n", iface);
374 
375  return IDirect3DRMTexture3_Release(&texture->IDirect3DRMTexture3_iface);
376 }
377 
378 static HRESULT WINAPI d3drm_texture1_Clone(IDirect3DRMTexture *iface,
379  IUnknown *outer, REFIID iid, void **out)
380 {
382 
383  TRACE("iface %p, outer %p, iid %s, out %p.\n", iface, outer, debugstr_guid(iid), out);
384 
385  return IDirect3DRMTexture3_Clone(&texture->IDirect3DRMTexture3_iface, outer, iid, out);
386 }
387 
388 static HRESULT WINAPI d3drm_texture1_AddDestroyCallback(IDirect3DRMTexture *iface,
389  D3DRMOBJECTCALLBACK cb, void *ctx)
390 {
392 
393  TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
394 
395  return IDirect3DRMTexture3_AddDestroyCallback(&texture->IDirect3DRMTexture3_iface, cb, ctx);
396 }
397 
398 static HRESULT WINAPI d3drm_texture1_DeleteDestroyCallback(IDirect3DRMTexture *iface,
399  D3DRMOBJECTCALLBACK cb, void *ctx)
400 {
402 
403  TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
404 
405  return IDirect3DRMTexture3_DeleteDestroyCallback(&texture->IDirect3DRMTexture3_iface, cb, ctx);
406 }
407 
408 static HRESULT WINAPI d3drm_texture1_SetAppData(IDirect3DRMTexture *iface, DWORD data)
409 {
411 
412  TRACE("iface %p, data %#x.\n", iface, data);
413 
414  return IDirect3DRMTexture3_SetAppData(&texture->IDirect3DRMTexture3_iface, data);
415 }
416 
417 static DWORD WINAPI d3drm_texture1_GetAppData(IDirect3DRMTexture *iface)
418 {
420 
421  TRACE("iface %p.\n", iface);
422 
423  return IDirect3DRMTexture3_GetAppData(&texture->IDirect3DRMTexture3_iface);
424 }
425 
426 static HRESULT WINAPI d3drm_texture1_SetName(IDirect3DRMTexture *iface, const char *name)
427 {
429 
430  TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
431 
432  return IDirect3DRMTexture3_SetName(&texture->IDirect3DRMTexture3_iface, name);
433 }
434 
435 static HRESULT WINAPI d3drm_texture1_GetName(IDirect3DRMTexture *iface, DWORD *size, char *name)
436 {
438 
439  TRACE("iface %p, size %p, name %p.\n", iface, size, name);
440 
441  return IDirect3DRMTexture3_GetName(&texture->IDirect3DRMTexture3_iface, size, name);
442 }
443 
444 static HRESULT WINAPI d3drm_texture1_GetClassName(IDirect3DRMTexture *iface, DWORD *size, char *name)
445 {
447 
448  TRACE("iface %p, size %p, name %p.\n", iface, size, name);
449 
450  return IDirect3DRMTexture3_GetClassName(&texture->IDirect3DRMTexture3_iface, size, name);
451 }
452 
453 static HRESULT WINAPI d3drm_texture1_InitFromFile(IDirect3DRMTexture *iface, const char *filename)
454 {
456  D3DRMIMAGE *image;
457  HRESULT hr;
458 
459  TRACE("iface %p, filename %s.\n", iface, debugstr_a(filename));
460 
462  return hr;
463 
464  return IDirect3DRMTexture3_InitFromImage(&texture->IDirect3DRMTexture3_iface, image);
465 }
466 
467 static HRESULT WINAPI d3drm_texture1_InitFromSurface(IDirect3DRMTexture *iface,
468  IDirectDrawSurface *surface)
469 {
471 
472  TRACE("iface %p, surface %p.\n", iface, surface);
473 
474  return IDirect3DRMTexture3_InitFromSurface(&texture->IDirect3DRMTexture3_iface, surface);
475 }
476 
477 static HRESULT WINAPI d3drm_texture1_InitFromResource(IDirect3DRMTexture *iface, HRSRC resource)
478 {
479  FIXME("iface %p, resource %p stub!\n", iface, resource);
480 
481  return E_NOTIMPL;
482 }
483 
484 static HRESULT WINAPI d3drm_texture1_Changed(IDirect3DRMTexture *iface, BOOL pixels, BOOL palette)
485 {
486  FIXME("iface %p, pixels %#x, palette %#x stub!\n", iface, pixels, palette);
487 
488  return E_NOTIMPL;
489 }
490 
491 static HRESULT WINAPI d3drm_texture1_SetColors(IDirect3DRMTexture *iface, DWORD max_colors)
492 {
494 
495  TRACE("iface %p, max_colors %u.\n", iface, max_colors);
496 
497  return IDirect3DRMTexture3_SetColors(&texture->IDirect3DRMTexture3_iface, max_colors);
498 }
499 
500 static HRESULT WINAPI d3drm_texture1_SetShades(IDirect3DRMTexture *iface, DWORD max_shades)
501 {
503 
504  TRACE("iface %p, max_shades %u.\n", iface, max_shades);
505 
506  return IDirect3DRMTexture3_SetShades(&texture->IDirect3DRMTexture3_iface, max_shades);
507 }
508 
510 {
512 
513  TRACE("iface %p, width %.8e, height %.8e.\n", iface, width, height);
514 
515  return IDirect3DRMTexture3_SetDecalSize(&texture->IDirect3DRMTexture3_iface, width, height);
516 }
517 
518 static HRESULT WINAPI d3drm_texture1_SetDecalOrigin(IDirect3DRMTexture *iface, LONG x, LONG y)
519 {
521 
522  TRACE("iface %p, x %d, y %d.\n", iface, x, y);
523 
524  return IDirect3DRMTexture3_SetDecalOrigin(&texture->IDirect3DRMTexture3_iface, x, y);
525 }
526 
527 static HRESULT WINAPI d3drm_texture1_SetDecalScale(IDirect3DRMTexture *iface, DWORD scale)
528 {
530 
531  TRACE("iface %p, scale %u.\n", iface, scale);
532 
533  return IDirect3DRMTexture3_SetDecalScale(&texture->IDirect3DRMTexture3_iface, scale);
534 }
535 
536 static HRESULT WINAPI d3drm_texture1_SetDecalTransparency(IDirect3DRMTexture *iface, BOOL transparency)
537 {
539 
540  TRACE("iface %p, transparency %#x.\n", iface, transparency);
541 
542  return IDirect3DRMTexture3_SetDecalTransparency(&texture->IDirect3DRMTexture3_iface, transparency);
543 }
544 
546 {
548 
549  TRACE("iface %p, color 0x%08x.\n", iface, color);
550 
551  return IDirect3DRMTexture3_SetDecalTransparentColor(&texture->IDirect3DRMTexture3_iface, color);
552 }
553 
555 {
557 
558  TRACE("iface %p, width %p, height %p.\n", iface, width, height);
559 
560  return IDirect3DRMTexture3_GetDecalSize(&texture->IDirect3DRMTexture3_iface, width, height);
561 }
562 
563 static HRESULT WINAPI d3drm_texture1_GetDecalOrigin(IDirect3DRMTexture *iface, LONG *x, LONG *y)
564 {
566 
567  TRACE("iface %p, x %p, y %p.\n", iface, x, y);
568 
569  return IDirect3DRMTexture3_GetDecalOrigin(&texture->IDirect3DRMTexture3_iface, x, y);
570 }
571 
572 static D3DRMIMAGE * WINAPI d3drm_texture1_GetImage(IDirect3DRMTexture *iface)
573 {
575 
576  TRACE("iface %p.\n", iface);
577 
578  return IDirect3DRMTexture3_GetImage(&texture->IDirect3DRMTexture3_iface);
579 }
580 
581 static DWORD WINAPI d3drm_texture1_GetShades(IDirect3DRMTexture *iface)
582 {
584 
585  TRACE("iface %p.\n", iface);
586 
587  return IDirect3DRMTexture3_GetShades(&texture->IDirect3DRMTexture3_iface);
588 }
589 
590 static DWORD WINAPI d3drm_texture1_GetColors(IDirect3DRMTexture *iface)
591 {
593 
594  TRACE("iface %p.\n", iface);
595 
596  return IDirect3DRMTexture3_GetColors(&texture->IDirect3DRMTexture3_iface);
597 }
598 
599 static DWORD WINAPI d3drm_texture1_GetDecalScale(IDirect3DRMTexture *iface)
600 {
602 
603  TRACE("iface %p.\n", iface);
604 
605  return IDirect3DRMTexture3_GetDecalScale(&texture->IDirect3DRMTexture3_iface);
606 }
607 
608 static BOOL WINAPI d3drm_texture1_GetDecalTransparency(IDirect3DRMTexture *iface)
609 {
611 
612  TRACE("iface %p.\n", iface);
613 
614  return IDirect3DRMTexture3_GetDecalTransparency(&texture->IDirect3DRMTexture3_iface);
615 }
616 
617 static D3DCOLOR WINAPI d3drm_texture1_GetDecalTransparentColor(IDirect3DRMTexture *iface)
618 {
620 
621  TRACE("iface %p.\n", iface);
622 
623  return IDirect3DRMTexture3_GetDecalTransparentColor(&texture->IDirect3DRMTexture3_iface);
624 }
625 
626 static const struct IDirect3DRMTextureVtbl d3drm_texture1_vtbl =
627 {
658 };
659 
660 static HRESULT WINAPI d3drm_texture2_QueryInterface(IDirect3DRMTexture2 *iface, REFIID riid, void **out)
661 {
663 
664  TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
665 
666  return IDirect3DRMTexture3_QueryInterface(&texture->IDirect3DRMTexture3_iface, riid, out);
667 }
668 
669 static ULONG WINAPI d3drm_texture2_AddRef(IDirect3DRMTexture2 *iface)
670 {
672 
673  TRACE("iface %p.\n", iface);
674 
675  return IDirect3DRMTexture3_AddRef(&texture->IDirect3DRMTexture3_iface);
676 }
677 
678 static ULONG WINAPI d3drm_texture2_Release(IDirect3DRMTexture2 *iface)
679 {
681 
682  TRACE("iface %p.\n", iface);
683 
684  return IDirect3DRMTexture3_Release(&texture->IDirect3DRMTexture3_iface);
685 }
686 
687 static HRESULT WINAPI d3drm_texture2_Clone(IDirect3DRMTexture2 *iface,
688  IUnknown *outer, REFIID iid, void **out)
689 {
691 
692  TRACE("iface %p, outer %p, iid %s, out %p.\n", iface, outer, debugstr_guid(iid), out);
693 
694  return IDirect3DRMTexture3_Clone(&texture->IDirect3DRMTexture3_iface, outer, iid, out);
695 }
696 
697 static HRESULT WINAPI d3drm_texture2_AddDestroyCallback(IDirect3DRMTexture2 *iface,
698  D3DRMOBJECTCALLBACK cb, void *ctx)
699 {
701 
702  TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
703 
704  return IDirect3DRMTexture3_AddDestroyCallback(&texture->IDirect3DRMTexture3_iface, cb, ctx);
705 }
706 
707 static HRESULT WINAPI d3drm_texture2_DeleteDestroyCallback(IDirect3DRMTexture2 *iface,
708  D3DRMOBJECTCALLBACK cb, void *ctx)
709 {
711 
712  TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
713 
714  return IDirect3DRMTexture3_DeleteDestroyCallback(&texture->IDirect3DRMTexture3_iface, cb, ctx);
715 }
716 
717 static HRESULT WINAPI d3drm_texture2_SetAppData(IDirect3DRMTexture2 *iface, DWORD data)
718 {
720 
721  TRACE("iface %p, data %#x.\n", iface, data);
722 
723  return IDirect3DRMTexture3_SetAppData(&texture->IDirect3DRMTexture3_iface, data);
724 }
725 
726 static DWORD WINAPI d3drm_texture2_GetAppData(IDirect3DRMTexture2 *iface)
727 {
729 
730  TRACE("iface %p.\n", iface);
731 
732  return IDirect3DRMTexture3_GetAppData(&texture->IDirect3DRMTexture3_iface);
733 }
734 
735 static HRESULT WINAPI d3drm_texture2_SetName(IDirect3DRMTexture2 *iface, const char *name)
736 {
738 
739  TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
740 
741  return IDirect3DRMTexture3_SetName(&texture->IDirect3DRMTexture3_iface, name);
742 }
743 
744 static HRESULT WINAPI d3drm_texture2_GetName(IDirect3DRMTexture2 *iface, DWORD *size, char *name)
745 {
747 
748  TRACE("iface %p, size %p, name %p.\n", iface, size, name);
749 
750  return IDirect3DRMTexture3_GetName(&texture->IDirect3DRMTexture3_iface, size, name);
751 }
752 
753 static HRESULT WINAPI d3drm_texture2_GetClassName(IDirect3DRMTexture2 *iface, DWORD *size, char *name)
754 {
756 
757  TRACE("iface %p, size %p, name %p.\n", iface, size, name);
758 
759  return IDirect3DRMTexture3_GetClassName(&texture->IDirect3DRMTexture3_iface, size, name);
760 }
761 
762 static HRESULT WINAPI d3drm_texture2_InitFromFile(IDirect3DRMTexture2 *iface, const char *filename)
763 {
765 
766  TRACE("iface %p, filename %s.\n", iface, debugstr_a(filename));
767 
768  return IDirect3DRMTexture3_InitFromFile(&texture->IDirect3DRMTexture3_iface, filename);
769 }
770 
771 static HRESULT WINAPI d3drm_texture2_InitFromSurface(IDirect3DRMTexture2 *iface,
772  IDirectDrawSurface *surface)
773 {
775 
776  TRACE("iface %p, surface %p.\n", iface, surface);
777 
778  return IDirect3DRMTexture3_InitFromSurface(&texture->IDirect3DRMTexture3_iface, surface);
779 }
780 
781 static HRESULT WINAPI d3drm_texture2_InitFromResource(IDirect3DRMTexture2 *iface, HRSRC resource)
782 {
783  FIXME("iface %p, resource %p stub!\n", iface, resource);
784 
785  return E_NOTIMPL;
786 }
787 
788 static HRESULT WINAPI d3drm_texture2_Changed(IDirect3DRMTexture2 *iface, BOOL pixels, BOOL palette)
789 {
790  FIXME("iface %p, pixels %#x, palette %#x stub!\n", iface, pixels, palette);
791 
792  return E_NOTIMPL;
793 }
794 
795 static HRESULT WINAPI d3drm_texture2_SetColors(IDirect3DRMTexture2 *iface, DWORD max_colors)
796 {
798 
799  TRACE("iface %p, max_colors %u.\n", iface, max_colors);
800 
801  return IDirect3DRMTexture3_SetColors(&texture->IDirect3DRMTexture3_iface, max_colors);
802 }
803 
804 static HRESULT WINAPI d3drm_texture2_SetShades(IDirect3DRMTexture2 *iface, DWORD max_shades)
805 {
807 
808  TRACE("iface %p, max_shades %u.\n", iface, max_shades);
809 
810  return IDirect3DRMTexture3_SetShades(&texture->IDirect3DRMTexture3_iface, max_shades);
811 }
812 
814 {
816 
817  TRACE("iface %p, width %.8e, height %.8e.\n", iface, width, height);
818 
819  return IDirect3DRMTexture3_SetDecalSize(&texture->IDirect3DRMTexture3_iface, width, height);
820 }
821 
822 static HRESULT WINAPI d3drm_texture2_SetDecalOrigin(IDirect3DRMTexture2 *iface, LONG x, LONG y)
823 {
825 
826  TRACE("iface %p, x %d, y %d.\n", iface, x, y);
827 
828  return IDirect3DRMTexture3_SetDecalOrigin(&texture->IDirect3DRMTexture3_iface, x, y);
829 }
830 
831 static HRESULT WINAPI d3drm_texture2_SetDecalScale(IDirect3DRMTexture2 *iface, DWORD scale)
832 {
834 
835  TRACE("iface %p, scale %u.\n", iface, scale);
836 
837  return IDirect3DRMTexture3_SetDecalScale(&texture->IDirect3DRMTexture3_iface, scale);
838 }
839 
840 static HRESULT WINAPI d3drm_texture2_SetDecalTransparency(IDirect3DRMTexture2 *iface, BOOL transparency)
841 {
843 
844  TRACE("iface %p, transparency %#x.\n", iface, transparency);
845 
846  return IDirect3DRMTexture3_SetDecalTransparency(&texture->IDirect3DRMTexture3_iface, transparency);
847 }
848 
850 {
852 
853  TRACE("iface %p, color 0x%08x.\n", iface, color);
854 
855  return IDirect3DRMTexture3_SetDecalTransparentColor(&texture->IDirect3DRMTexture3_iface, color);
856 }
857 
859 {
861 
862  TRACE("iface %p, width %p, height %p.\n", iface, width, height);
863 
864  return IDirect3DRMTexture3_GetDecalSize(&texture->IDirect3DRMTexture3_iface, width, height);
865 }
866 
867 static HRESULT WINAPI d3drm_texture2_GetDecalOrigin(IDirect3DRMTexture2 *iface, LONG *x, LONG *y)
868 {
870 
871  TRACE("iface %p, x %p, y %p.\n", iface, x, y);
872 
873  return IDirect3DRMTexture3_GetDecalOrigin(&texture->IDirect3DRMTexture3_iface, x, y);
874 }
875 
876 static D3DRMIMAGE * WINAPI d3drm_texture2_GetImage(IDirect3DRMTexture2 *iface)
877 {
879 
880  TRACE("iface %p.\n", iface);
881 
882  return IDirect3DRMTexture3_GetImage(&texture->IDirect3DRMTexture3_iface);
883 }
884 
885 static DWORD WINAPI d3drm_texture2_GetShades(IDirect3DRMTexture2 *iface)
886 {
888 
889  TRACE("iface %p.\n", iface);
890 
891  return IDirect3DRMTexture3_GetShades(&texture->IDirect3DRMTexture3_iface);
892 }
893 
894 static DWORD WINAPI d3drm_texture2_GetColors(IDirect3DRMTexture2 *iface)
895 {
897 
898  TRACE("iface %p.\n", iface);
899 
900  return IDirect3DRMTexture3_GetColors(&texture->IDirect3DRMTexture3_iface);
901 }
902 
903 static DWORD WINAPI d3drm_texture2_GetDecalScale(IDirect3DRMTexture2 *iface)
904 {
906 
907  TRACE("iface %p.\n", iface);
908 
909  return IDirect3DRMTexture3_GetDecalScale(&texture->IDirect3DRMTexture3_iface);
910 }
911 
912 static BOOL WINAPI d3drm_texture2_GetDecalTransparency(IDirect3DRMTexture2 *iface)
913 {
915 
916  TRACE("iface %p.\n", iface);
917 
918  return IDirect3DRMTexture3_GetDecalTransparency(&texture->IDirect3DRMTexture3_iface);
919 }
920 
921 static D3DCOLOR WINAPI d3drm_texture2_GetDecalTransparentColor(IDirect3DRMTexture2 *iface)
922 {
924 
925  TRACE("iface %p.\n", iface);
926 
927  return IDirect3DRMTexture3_GetDecalTransparentColor(&texture->IDirect3DRMTexture3_iface);
928 }
929 
930 static HRESULT WINAPI d3drm_texture2_InitFromImage(IDirect3DRMTexture2 *iface, D3DRMIMAGE *image)
931 {
933 
934  TRACE("iface %p, image %p.\n", iface, image);
935 
936  return IDirect3DRMTexture3_InitFromImage(&texture->IDirect3DRMTexture3_iface, image);
937 }
938 
939 static HRESULT WINAPI d3drm_texture2_InitFromResource2(IDirect3DRMTexture2 *iface,
940  HMODULE module, const char *name, const char *type)
941 {
942  FIXME("iface %p, module %p, name %s, type %s stub!\n",
943  iface, module, debugstr_a(name), debugstr_a(type));
944 
945  return E_NOTIMPL;
946 }
947 
948 static HRESULT WINAPI d3drm_texture2_GenerateMIPMap(IDirect3DRMTexture2 *iface, DWORD flags)
949 {
951 
952  TRACE("iface %p, flags %#x.\n", iface, flags);
953 
954  return IDirect3DRMTexture3_GenerateMIPMap(&texture->IDirect3DRMTexture3_iface, flags);
955 }
956 
957 static const struct IDirect3DRMTexture2Vtbl d3drm_texture2_vtbl =
958 {
992 };
993 
994 static HRESULT WINAPI d3drm_texture3_QueryInterface(IDirect3DRMTexture3 *iface, REFIID riid, void **out)
995 {
997 
998  TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
999 
1000  if (IsEqualGUID(riid, &IID_IDirect3DRMTexture)
1001  || IsEqualGUID(riid, &IID_IDirect3DRMVisual)
1002  || IsEqualGUID(riid, &IID_IDirect3DRMObject)
1004  {
1005  *out = &texture->IDirect3DRMTexture_iface;
1006  }
1007  else if (IsEqualGUID(riid, &IID_IDirect3DRMTexture2))
1008  {
1009  *out = &texture->IDirect3DRMTexture2_iface;
1010  }
1011  else if (IsEqualGUID(riid, &IID_IDirect3DRMTexture3))
1012  {
1013  *out = &texture->IDirect3DRMTexture3_iface;
1014  }
1015  else
1016  {
1017  *out = NULL;
1018  WARN("%s not implemented, returning CLASS_E_CLASSNOTAVAILABLE.\n", debugstr_guid(riid));
1020  }
1021 
1022  IUnknown_AddRef((IUnknown *)*out);
1023  return S_OK;
1024 }
1025 
1026 static ULONG WINAPI d3drm_texture3_AddRef(IDirect3DRMTexture3 *iface)
1027 {
1029  ULONG refcount = InterlockedIncrement(&texture->obj.ref);
1030 
1031  TRACE("%p increasing refcount to %u.\n", iface, refcount);
1032 
1033  return refcount;
1034 }
1035 
1036 static ULONG WINAPI d3drm_texture3_Release(IDirect3DRMTexture3 *iface)
1037 {
1039  ULONG refcount = InterlockedDecrement(&texture->obj.ref);
1040 
1041  TRACE("%p decreasing refcount to %u.\n", iface, refcount);
1042 
1043  if (!refcount)
1045 
1046  return refcount;
1047 }
1048 
1049 static HRESULT WINAPI d3drm_texture3_Clone(IDirect3DRMTexture3 *iface,
1050  IUnknown *outer, REFIID iid, void **out)
1051 {
1052  FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
1053 
1054  return E_NOTIMPL;
1055 }
1056 
1057 static HRESULT WINAPI d3drm_texture3_AddDestroyCallback(IDirect3DRMTexture3 *iface,
1058  D3DRMOBJECTCALLBACK cb, void *ctx)
1059 {
1061 
1062  TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
1063 
1064  return d3drm_object_add_destroy_callback(&texture->obj, cb, ctx);
1065 }
1066 
1067 static HRESULT WINAPI d3drm_texture3_DeleteDestroyCallback(IDirect3DRMTexture3 *iface,
1068  D3DRMOBJECTCALLBACK cb, void *ctx)
1069 {
1071 
1072  TRACE("iface %p, cb %p, ctx %p\n", iface, cb, ctx);
1073 
1074  return d3drm_object_delete_destroy_callback(&texture->obj, cb, ctx);
1075 }
1076 
1077 static HRESULT WINAPI d3drm_texture3_SetAppData(IDirect3DRMTexture3 *iface, DWORD data)
1078 {
1080 
1081  TRACE("iface %p, data %#x.\n", iface, data);
1082 
1083  texture->obj.appdata = data;
1084 
1085  return D3DRM_OK;
1086 }
1087 
1088 static DWORD WINAPI d3drm_texture3_GetAppData(IDirect3DRMTexture3 *iface)
1089 {
1091 
1092  TRACE("iface %p.\n", iface);
1093 
1094  return texture->obj.appdata;
1095 }
1096 
1097 static HRESULT WINAPI d3drm_texture3_SetName(IDirect3DRMTexture3 *iface, const char *name)
1098 {
1100 
1101  TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
1102 
1103  return d3drm_object_set_name(&texture->obj, name);
1104 }
1105 
1106 static HRESULT WINAPI d3drm_texture3_GetName(IDirect3DRMTexture3 *iface, DWORD *size, char *name)
1107 {
1109 
1110  TRACE("iface %p, size %p, name %p.\n", iface, size, name);
1111 
1112  return d3drm_object_get_name(&texture->obj, size, name);
1113 }
1114 
1115 static HRESULT WINAPI d3drm_texture3_GetClassName(IDirect3DRMTexture3 *iface, DWORD *size, char *name)
1116 {
1118 
1119  TRACE("iface %p, size %p, name %p.\n", iface, size, name);
1120 
1121  return d3drm_object_get_class_name(&texture->obj, size, name);
1122 }
1123 
1124 static HRESULT WINAPI d3drm_texture3_InitFromFile(IDirect3DRMTexture3 *iface, const char *filename)
1125 {
1127  D3DRMIMAGE *image;
1128  HRESULT hr;
1129 
1130  TRACE("iface %p, filename %s.\n", iface, debugstr_a(filename));
1131 
1133  return hr;
1134 
1136 }
1137 
1138 static HRESULT WINAPI d3drm_texture3_InitFromSurface(IDirect3DRMTexture3 *iface,
1139  IDirectDrawSurface *surface)
1140 {
1142 
1143  TRACE("iface %p, surface %p.\n", iface, surface);
1144 
1145  if (!surface)
1146  return D3DRMERR_BADOBJECT;
1147 
1148  /* d3drm intentionally leaks a reference to IDirect3DRM here if texture has already been initialized. */
1149  IDirect3DRM_AddRef(texture->d3drm);
1150 
1151  if (texture->image || texture->surface)
1152  return D3DRMERR_BADOBJECT;
1153 
1154  texture->surface = surface;
1155  IDirectDrawSurface_AddRef(texture->surface);
1156  return D3DRM_OK;
1157 }
1158 
1159 static HRESULT WINAPI d3drm_texture3_InitFromResource(IDirect3DRMTexture3 *iface, HRSRC resource)
1160 {
1161  FIXME("iface %p, resource %p stub!\n", iface, resource);
1162 
1163  return E_NOTIMPL;
1164 }
1165 
1166 static HRESULT WINAPI d3drm_texture3_Changed(IDirect3DRMTexture3 *iface,
1167  DWORD flags, DWORD rect_count, RECT *rects)
1168 {
1169  FIXME("iface %p, flags %#x, rect_count %u, rects %p stub!\n", iface, flags, rect_count, rects);
1170 
1171  return E_NOTIMPL;
1172 }
1173 
1174 static HRESULT WINAPI d3drm_texture3_SetColors(IDirect3DRMTexture3 *iface, DWORD max_colors)
1175 {
1176  FIXME("iface %p, max_colors %u stub!\n", iface, max_colors);
1177 
1178  return E_NOTIMPL;
1179 }
1180 
1181 static HRESULT WINAPI d3drm_texture3_SetShades(IDirect3DRMTexture3 *iface, DWORD max_shades)
1182 {
1183  FIXME("iface %p, max_shades %u stub!\n", iface, max_shades);
1184 
1185  return E_NOTIMPL;
1186 }
1187 
1189 {
1190  FIXME("iface %p, width %.8e, height %.8e stub!\n", iface, width, height);
1191 
1192  return E_NOTIMPL;
1193 }
1194 
1195 static HRESULT WINAPI d3drm_texture3_SetDecalOrigin(IDirect3DRMTexture3 *iface, LONG x, LONG y)
1196 {
1197  FIXME("iface %p, x %d, y %d stub!\n", iface, x, y);
1198 
1199  return E_NOTIMPL;
1200 }
1201 
1202 static HRESULT WINAPI d3drm_texture3_SetDecalScale(IDirect3DRMTexture3 *iface, DWORD scale)
1203 {
1204  FIXME("iface %p, scale %u stub!\n", iface, scale);
1205 
1206  return E_NOTIMPL;
1207 }
1208 
1209 static HRESULT WINAPI d3drm_texture3_SetDecalTransparency(IDirect3DRMTexture3 *iface, BOOL transparency)
1210 {
1211  FIXME("iface %p, transparency %#x stub!\n", iface, transparency);
1212 
1213  return E_NOTIMPL;
1214 }
1215 
1217 {
1218  FIXME("iface %p, color 0x%08x stub!\n", iface, color);
1219 
1220  return E_NOTIMPL;
1221 }
1222 
1224 {
1225  FIXME("iface %p, width %p, height %p stub!\n", iface, width, height);
1226 
1227  return E_NOTIMPL;
1228 }
1229 
1230 static HRESULT WINAPI d3drm_texture3_GetDecalOrigin(IDirect3DRMTexture3 *iface, LONG *x, LONG *y)
1231 {
1232  FIXME("iface %p, x %p, y %p stub!\n", iface, x, y);
1233 
1234  return E_NOTIMPL;
1235 }
1236 
1237 static D3DRMIMAGE * WINAPI d3drm_texture3_GetImage(IDirect3DRMTexture3 *iface)
1238 {
1240 
1241  TRACE("iface %p.\n", iface);
1242 
1243  return texture->image;
1244 }
1245 
1246 static DWORD WINAPI d3drm_texture3_GetShades(IDirect3DRMTexture3 *iface)
1247 {
1248  FIXME("iface %p stub!\n", iface);
1249 
1250  return 0;
1251 }
1252 
1253 static DWORD WINAPI d3drm_texture3_GetColors(IDirect3DRMTexture3 *iface)
1254 {
1255  FIXME("iface %p stub!\n", iface);
1256 
1257  return 0;
1258 }
1259 
1260 static DWORD WINAPI d3drm_texture3_GetDecalScale(IDirect3DRMTexture3 *iface)
1261 {
1262  FIXME("iface %p stub!\n", iface);
1263 
1264  return 0;
1265 }
1266 
1267 static BOOL WINAPI d3drm_texture3_GetDecalTransparency(IDirect3DRMTexture3 *iface)
1268 {
1269  FIXME("iface %p stub!\n", iface);
1270 
1271  return FALSE;
1272 }
1273 
1274 static D3DCOLOR WINAPI d3drm_texture3_GetDecalTransparentColor(IDirect3DRMTexture3 *iface)
1275 {
1276  FIXME("iface %p stub!\n", iface);
1277 
1278  return 0;
1279 }
1280 
1281 static HRESULT WINAPI d3drm_texture3_InitFromImage(IDirect3DRMTexture3 *iface, D3DRMIMAGE *image)
1282 {
1284 
1285  TRACE("iface %p, image %p.\n", iface, image);
1286 
1288  return D3DRMERR_BADOBJECT;
1289 
1290  /* d3drm intentionally leaks a reference to IDirect3DRM here if texture has already been initialized. */
1291  IDirect3DRM_AddRef(texture->d3drm);
1292 
1293  if (texture->image || texture->surface)
1294  return D3DRMERR_BADOBJECT;
1295 
1296  texture->image = image;
1297 
1298  return D3DRM_OK;
1299 }
1300 
1301 static HRESULT WINAPI d3drm_texture3_InitFromResource2(IDirect3DRMTexture3 *iface,
1302  HMODULE module, const char *name, const char *type)
1303 {
1304  FIXME("iface %p, module %p, name %s, type %s stub!\n",
1305  iface, module, debugstr_a(name), debugstr_a(type));
1306 
1307  return E_NOTIMPL;
1308 }
1309 
1310 static HRESULT WINAPI d3drm_texture3_GenerateMIPMap(IDirect3DRMTexture3 *iface, DWORD flags)
1311 {
1312  FIXME("iface %p, flags %#x stub!\n", iface, flags);
1313 
1314  return E_NOTIMPL;
1315 }
1316 
1317 static HRESULT WINAPI d3drm_texture3_GetSurface(IDirect3DRMTexture3 *iface,
1318  DWORD flags, IDirectDrawSurface **surface)
1319 {
1321 
1322  TRACE("iface %p, flags %#x, surface %p.\n", iface, flags, surface);
1323 
1324  if (flags)
1325  FIXME("unexpected flags %#x.\n", flags);
1326 
1327  if (!surface)
1328  return D3DRMERR_BADVALUE;
1329 
1330  if (texture->image)
1332 
1333  *surface = texture->surface;
1334  IDirectDrawSurface_AddRef(*surface);
1335 
1336  return D3DRM_OK;
1337 }
1338 
1339 static HRESULT WINAPI d3drm_texture3_SetCacheOptions(IDirect3DRMTexture3 *iface, LONG importance, DWORD flags)
1340 {
1341  FIXME("iface %p, importance %d, flags %#x stub!\n", iface, importance, flags);
1342 
1343  return E_NOTIMPL;
1344 }
1345 
1346 static HRESULT WINAPI d3drm_texture3_GetCacheOptions(IDirect3DRMTexture3 *iface,
1347  LONG *importance, DWORD *flags)
1348 {
1349  FIXME("iface %p, importance %p, flags %p stub!\n", iface, importance, flags);
1350 
1351  return E_NOTIMPL;
1352 }
1353 
1354 static HRESULT WINAPI d3drm_texture3_SetDownsampleCallback(IDirect3DRMTexture3 *iface,
1355  D3DRMDOWNSAMPLECALLBACK cb, void *ctx)
1356 {
1357  FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
1358 
1359  return E_NOTIMPL;
1360 }
1361 
1362 static HRESULT WINAPI d3drm_texture3_SetValidationCallback(IDirect3DRMTexture3 *iface,
1363  D3DRMVALIDATIONCALLBACK cb, void *ctx)
1364 {
1365  FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
1366 
1367  return E_NOTIMPL;
1368 }
1369 
1370 static const struct IDirect3DRMTexture3Vtbl d3drm_texture3_vtbl =
1371 {
1410 };
1411 
1413 {
1414  static const char classname[] = "Texture";
1415  struct d3drm_texture *object;
1416 
1417  TRACE("texture %p.\n", texture);
1418 
1419  if (!(object = heap_alloc_zero(sizeof(*object))))
1420  return E_OUTOFMEMORY;
1421 
1422  object->IDirect3DRMTexture_iface.lpVtbl = &d3drm_texture1_vtbl;
1423  object->IDirect3DRMTexture2_iface.lpVtbl = &d3drm_texture2_vtbl;
1424  object->IDirect3DRMTexture3_iface.lpVtbl = &d3drm_texture3_vtbl;
1425  object->d3drm = d3drm;
1426 
1428 
1429  *texture = object;
1430 
1431  return D3DRM_OK;
1432 }
static HRESULT WINAPI d3drm_texture3_DeleteDestroyCallback(IDirect3DRMTexture3 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: texture.c:1067
static struct d3drm_texture * impl_from_IDirect3DRMTexture(IDirect3DRMTexture *iface)
Definition: texture.c:26
void d3drm_object_cleanup(IDirect3DRMObject *iface, struct d3drm_object *object)
Definition: d3drm_main.c:153
#define abs(i)
Definition: fconv.c:206
GLeglImageOES image
Definition: gl.h:2204
static HRESULT WINAPI d3drm_texture2_SetDecalSize(IDirect3DRMTexture2 *iface, D3DVALUE width, D3DVALUE height)
Definition: texture.c:813
static HRESULT WINAPI d3drm_texture2_GetName(IDirect3DRMTexture2 *iface, DWORD *size, char *name)
Definition: texture.c:744
GLint GLint GLsizei width
Definition: gl.h:1546
static HRESULT WINAPI d3drm_texture2_GenerateMIPMap(IDirect3DRMTexture2 *iface, DWORD flags)
Definition: texture.c:948
static ULONG WINAPI d3drm_texture1_Release(IDirect3DRMTexture *iface)
Definition: texture.c:369
static DWORD WINAPI d3drm_texture2_GetAppData(IDirect3DRMTexture2 *iface)
Definition: texture.c:726
#define IDirect3DRMTexture3_SetDecalTransparentColor(p, a)
Definition: d3drmobj.h:3497
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
static HRESULT WINAPI d3drm_texture1_Clone(IDirect3DRMTexture *iface, IUnknown *outer, REFIID iid, void **out)
Definition: texture.c:378
#define CloseHandle
Definition: compat.h:407
#define IDirect3DRMTexture3_InitFromImage(p, a)
Definition: d3drmobj.h:3506
static HRESULT WINAPI d3drm_texture3_GetDecalOrigin(IDirect3DRMTexture3 *iface, LONG *x, LONG *y)
Definition: texture.c:1230
static HRESULT WINAPI d3drm_texture2_SetDecalOrigin(IDirect3DRMTexture2 *iface, LONG x, LONG y)
Definition: texture.c:822
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
static HRESULT WINAPI d3drm_texture3_InitFromFile(IDirect3DRMTexture3 *iface, const char *filename)
Definition: texture.c:1124
HRESULT(__cdecl * D3DRMDOWNSAMPLECALLBACK)(struct IDirect3DRMTexture3 *texture, void *ctx, IDirectDrawSurface *src_surface, IDirectDrawSurface *dst_surface)
Definition: d3drmobj.h:168
static DWORD WINAPI d3drm_texture1_GetAppData(IDirect3DRMTexture *iface)
Definition: texture.c:417
#define MapViewOfFile
Definition: compat.h:411
static HRESULT WINAPI d3drm_texture3_SetDecalTransparency(IDirect3DRMTexture3 *iface, BOOL transparency)
Definition: texture.c:1209
HRESULT hr
Definition: shlfolder.c:183
static HRESULT WINAPI d3drm_texture3_SetDecalTransparentColor(IDirect3DRMTexture3 *iface, D3DCOLOR color)
Definition: texture.c:1216
#define IDirect3DRMTexture3_InitFromFile(p, a)
Definition: d3drmobj.h:3487
static DWORD WINAPI d3drm_texture3_GetDecalScale(IDirect3DRMTexture3 *iface)
Definition: texture.c:1260
static HRESULT WINAPI d3drm_texture1_SetDecalOrigin(IDirect3DRMTexture *iface, LONG x, LONG y)
Definition: texture.c:518
#define D3DRMERR_NOTCREATEDFROMDDS
Definition: d3drm.h:513
static HRESULT WINAPI d3drm_texture3_SetDecalScale(IDirect3DRMTexture3 *iface, DWORD scale)
Definition: texture.c:1202
static HRESULT WINAPI d3drm_texture1_InitFromSurface(IDirect3DRMTexture *iface, IDirectDrawSurface *surface)
Definition: texture.c:467
REFIID riid
Definition: precomp.h:44
static DWORD WINAPI d3drm_texture1_GetColors(IDirect3DRMTexture *iface)
Definition: texture.c:590
static HRESULT WINAPI d3drm_texture2_GetDecalSize(IDirect3DRMTexture2 *iface, D3DVALUE *width, D3DVALUE *height)
Definition: texture.c:858
static D3DCOLOR WINAPI d3drm_texture3_GetDecalTransparentColor(IDirect3DRMTexture3 *iface)
Definition: texture.c:1274
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9032
#define WARN(fmt,...)
Definition: debug.h:112
#define IDirect3DRMTexture3_SetAppData(p, a)
Definition: d3drmobj.h:3481
IDirect3DRMTexture3 IDirect3DRMTexture3_iface
Definition: d3drm_private.h:63
#define D3DRMERR_BADALLOC
Definition: d3drm.h:489
static HRESULT WINAPI d3drm_texture3_InitFromImage(IDirect3DRMTexture3 *iface, D3DRMIMAGE *image)
Definition: texture.c:1281
static HRESULT WINAPI d3drm_texture2_Changed(IDirect3DRMTexture2 *iface, BOOL pixels, BOOL palette)
Definition: texture.c:788
static HRESULT WINAPI d3drm_texture3_GenerateMIPMap(IDirect3DRMTexture3 *iface, DWORD flags)
Definition: texture.c:1310
static struct d3drm_texture * impl_from_IDirect3DRMTexture3(IDirect3DRMTexture3 *iface)
Definition: texture.c:36
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
HRESULT(__cdecl * D3DRMVALIDATIONCALLBACK)(struct IDirect3DRMTexture3 *texture, void *ctx, DWORD flags, DWORD rect_count, RECT *rects)
Definition: d3drmobj.h:170
#define INVALID_HANDLE_VALUE
Definition: compat.h:400
static const struct IDirect3DRMTexture2Vtbl d3drm_texture2_vtbl
Definition: texture.c:957
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static void d3drm_texture_destroy(struct d3drm_texture *texture)
Definition: texture.c:41
HRESULT d3drm_object_add_destroy_callback(struct d3drm_object *object, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: d3drm_main.c:55
void * arg
Definition: msvc.h:10
static HRESULT WINAPI d3drm_texture2_SetName(IDirect3DRMTexture2 *iface, const char *name)
Definition: texture.c:735
static HRESULT WINAPI d3drm_texture1_SetShades(IDirect3DRMTexture *iface, DWORD max_shades)
Definition: texture.c:500
HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm)
Definition: texture.c:1412
WCHAR classname[128]
Definition: startup.c:15
#define IDirect3DRMTexture3_GetImage(p)
Definition: d3drmobj.h:3500
const char * filename
Definition: ioapi.h:135
static HRESULT WINAPI d3drm_texture1_QueryInterface(IDirect3DRMTexture *iface, REFIID riid, void **out)
Definition: texture.c:351
static HRESULT WINAPI d3drm_texture3_GetCacheOptions(IDirect3DRMTexture3 *iface, LONG *importance, DWORD *flags)
Definition: texture.c:1346
static HRESULT d3drm_image_load_8(D3DRMIMAGE *image, const RGBQUAD *palette, unsigned char *src_data, LONGLONG src_data_size, SIZE_T w, SIZE_T h, BOOL flip)
Definition: texture.c:200
static HRESULT WINAPI d3drm_texture2_QueryInterface(IDirect3DRMTexture2 *iface, REFIID riid, void **out)
Definition: texture.c:660
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
static ULONG WINAPI d3drm_texture1_AddRef(IDirect3DRMTexture *iface)
Definition: texture.c:360
static HRESULT WINAPI d3drm_texture2_InitFromImage(IDirect3DRMTexture2 *iface, D3DRMIMAGE *image)
Definition: texture.c:930
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
static HRESULT WINAPI d3drm_texture1_Changed(IDirect3DRMTexture *iface, BOOL pixels, BOOL palette)
Definition: texture.c:484
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define FILE_SHARE_READ
Definition: compat.h:125
static const struct IDirect3DRMTexture3Vtbl d3drm_texture3_vtbl
Definition: texture.c:1370
static HRESULT WINAPI d3drm_texture3_InitFromSurface(IDirect3DRMTexture3 *iface, IDirectDrawSurface *surface)
Definition: texture.c:1138
static HRESULT WINAPI d3drm_texture3_SetCacheOptions(IDirect3DRMTexture3 *iface, LONG importance, DWORD flags)
Definition: texture.c:1339
#define IDirect3DRMTexture3_SetDecalSize(p, a, b)
Definition: d3drmobj.h:3493
static HRESULT WINAPI d3drm_texture2_AddDestroyCallback(IDirect3DRMTexture2 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: texture.c:697
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
static BOOL d3drm_image_palettise(D3DRMIMAGE *image, unsigned char *src_data, SIZE_T w, SIZE_T h, BOOL flip)
Definition: texture.c:68
struct _test_info info[]
Definition: SetCursorPos.c:19
static HRESULT WINAPI d3drm_texture3_QueryInterface(IDirect3DRMTexture3 *iface, REFIID riid, void **out)
Definition: texture.c:994
static HRESULT WINAPI d3drm_texture3_Changed(IDirect3DRMTexture3 *iface, DWORD flags, DWORD rect_count, RECT *rects)
Definition: texture.c:1166
#define IDirect3DRMTexture3_SetName(p, a)
Definition: d3drmobj.h:3483
#define IDirect3DRMTexture3_AddRef(p)
Definition: d3drmobj.h:3475
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
Definition: glfuncs.h:248
static struct d3drm_texture * impl_from_IDirect3DRMTexture2(IDirect3DRMTexture2 *iface)
Definition: texture.c:31
static HRESULT WINAPI d3drm_texture1_SetName(IDirect3DRMTexture *iface, const char *name)
Definition: texture.c:426
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static BOOL WINAPI d3drm_texture1_GetDecalTransparency(IDirect3DRMTexture *iface)
Definition: texture.c:608
#define D3DRMERR_BADOBJECT
Definition: d3drm.h:487
static HRESULT WINAPI d3drm_texture1_SetDecalSize(IDirect3DRMTexture *iface, D3DVALUE width, D3DVALUE height)
Definition: texture.c:509
#define IDirect3DRM_AddRef(p)
Definition: d3drm.h:110
static ULONG WINAPI d3drm_texture3_AddRef(IDirect3DRMTexture3 *iface)
Definition: texture.c:1026
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
GLuint color
Definition: glext.h:6243
static HRESULT WINAPI d3drm_texture3_SetDecalOrigin(IDirect3DRMTexture3 *iface, LONG x, LONG y)
Definition: texture.c:1195
static D3DRMIMAGE *WINAPI d3drm_texture3_GetImage(IDirect3DRMTexture3 *iface)
Definition: texture.c:1237
static HRESULT WINAPI d3drm_texture3_GetClassName(IDirect3DRMTexture3 *iface, DWORD *size, char *name)
Definition: texture.c:1115
#define FIXME(fmt,...)
Definition: debug.h:111
static HRESULT WINAPI d3drm_texture1_GetClassName(IDirect3DRMTexture *iface, DWORD *size, char *name)
Definition: texture.c:444
static HRESULT WINAPI d3drm_texture1_GetName(IDirect3DRMTexture *iface, DWORD *size, char *name)
Definition: texture.c:435
#define IDirect3DRMTexture3_GetColors(p)
Definition: d3drmobj.h:3502
static DWORD WINAPI d3drm_texture3_GetColors(IDirect3DRMTexture3 *iface)
Definition: texture.c:1253
float D3DVALUE
Definition: d3dtypes.h:89
#define IDirect3DRMTexture3_GetAppData(p)
Definition: d3drmobj.h:3482
IDirect3DRMTexture IDirect3DRMTexture_iface
Definition: d3drm_private.h:61
smooth NULL
Definition: ftsmooth.c:416
HRESULT d3drm_object_get_name(struct d3drm_object *object, DWORD *size, char *name)
Definition: d3drm_main.c:111
static HRESULT WINAPI d3drm_texture1_SetAppData(IDirect3DRMTexture *iface, DWORD data)
Definition: texture.c:408
static ULONG WINAPI d3drm_texture2_AddRef(IDirect3DRMTexture2 *iface)
Definition: texture.c:669
static HRESULT WINAPI d3drm_texture2_SetShades(IDirect3DRMTexture2 *iface, DWORD max_shades)
Definition: texture.c:804
#define FILE_MAP_READ
Definition: compat.h:436
static HRESULT WINAPI d3drm_texture2_DeleteDestroyCallback(IDirect3DRMTexture2 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: texture.c:707
static HRESULT WINAPI d3drm_texture3_AddDestroyCallback(IDirect3DRMTexture3 *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: texture.c:1057
#define debugstr_guid
Definition: kernel32.h:35
HRESULT d3drm_object_get_class_name(struct d3drm_object *object, DWORD *size, char *name)
Definition: d3drm_main.c:92
#define OPEN_EXISTING
Definition: compat.h:435
static HRESULT WINAPI d3drm_texture3_GetSurface(IDirect3DRMTexture3 *iface, DWORD flags, IDirectDrawSurface **surface)
Definition: texture.c:1317
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
#define IDirect3DRMTexture3_SetColors(p, a)
Definition: d3drmobj.h:3491
#define IDirect3DRMTexture3_GenerateMIPMap(p, a)
Definition: d3drmobj.h:3508
static DWORD WINAPI d3drm_texture1_GetDecalScale(IDirect3DRMTexture *iface)
Definition: texture.c:599
static HRESULT WINAPI d3drm_texture1_SetDecalTransparency(IDirect3DRMTexture *iface, BOOL transparency)
Definition: texture.c:536
int64_t LONGLONG
Definition: typedefs.h:67
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD WINAPI d3drm_texture3_GetShades(IDirect3DRMTexture3 *iface)
Definition: texture.c:1246
#define IDirect3DRMTexture3_Clone(p, a, b, c)
Definition: d3drmobj.h:3478
GLsizeiptr size
Definition: glext.h:5919
static HRESULT WINAPI d3drm_texture2_SetDecalTransparentColor(IDirect3DRMTexture2 *iface, D3DCOLOR color)
Definition: texture.c:849
ULONG RGBQUAD
Definition: precomp.h:50
static HRESULT WINAPI d3drm_texture3_SetDownsampleCallback(IDirect3DRMTexture3 *iface, D3DRMDOWNSAMPLECALLBACK cb, void *ctx)
Definition: texture.c:1354
static BOOL WINAPI d3drm_texture3_GetDecalTransparency(IDirect3DRMTexture3 *iface)
Definition: texture.c:1267
#define debugstr_a
Definition: kernel32.h:31
GLenum GLuint texture
Definition: glext.h:6295
LONG HRESULT
Definition: typedefs.h:78
#define CreateFileMappingW(a, b, c, d, e, f)
Definition: compat.h:410
static void CDECL destroy_image_callback(IDirect3DRMObject *obj, void *arg)
Definition: texture.c:252
#define D3DRM_OK
Definition: d3drm.h:486
WINE_DEFAULT_DEBUG_CHANNEL(d3d8)
const GUID IID_IUnknown
static D3DRMIMAGE *WINAPI d3drm_texture2_GetImage(IDirect3DRMTexture2 *iface)
Definition: texture.c:876
static HRESULT WINAPI d3drm_texture2_GetClassName(IDirect3DRMTexture2 *iface, DWORD *size, char *name)
Definition: texture.c:753
static HRESULT WINAPI d3drm_texture1_InitFromFile(IDirect3DRMTexture *iface, const char *filename)
Definition: texture.c:453
#define WINAPI
Definition: msvc.h:6
const char file[]
Definition: icontest.c:11
#define IDirect3DRMTexture3_GetClassName(p, a, b)
Definition: d3drmobj.h:3485
static FILE * out
Definition: regtests2xml.c:44
static HRESULT WINAPI d3drm_texture1_GetDecalSize(IDirect3DRMTexture *iface, D3DVALUE *width, D3DVALUE *height)
Definition: texture.c:554
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
#define IDirect3DRMTexture3_GetDecalSize(p, a, b)
Definition: d3drmobj.h:3498
static HRESULT WINAPI d3drm_texture2_InitFromSurface(IDirect3DRMTexture2 *iface, IDirectDrawSurface *surface)
Definition: texture.c:771
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI d3drm_texture2_InitFromResource(IDirect3DRMTexture2 *iface, HRSRC resource)
Definition: texture.c:781
static HRESULT WINAPI d3drm_texture3_SetColors(IDirect3DRMTexture3 *iface, DWORD max_colors)
Definition: texture.c:1174
#define IDirect3DRMTexture3_GetName(p, a, b)
Definition: d3drmobj.h:3484
static HRESULT WINAPI d3drm_texture3_SetShades(IDirect3DRMTexture3 *iface, DWORD max_shades)
Definition: texture.c:1181
void(__cdecl * D3DRMOBJECTCALLBACK)(struct IDirect3DRMObject *obj, void *arg)
Definition: d3drmobj.h:157
static DWORD WINAPI d3drm_texture2_GetColors(IDirect3DRMTexture2 *iface)
Definition: texture.c:894
#define GetFileSizeEx
Definition: compat.h:423
static HRESULT WINAPI d3drm_texture3_Clone(IDirect3DRMTexture3 *iface, IUnknown *outer, REFIID iid, void **out)
Definition: texture.c:1049
HRESULT d3drm_object_delete_destroy_callback(struct d3drm_object *object, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: d3drm_main.c:72
static HRESULT WINAPI d3drm_texture2_SetDecalScale(IDirect3DRMTexture2 *iface, DWORD scale)
Definition: texture.c:831
IDirectDrawSurface * surface
Definition: d3drm_private.h:66
#define D3DRMERR_BADVALUE
Definition: d3drm.h:496
#define InterlockedDecrement
Definition: armddk.h:52
static HRESULT WINAPI d3drm_texture3_SetDecalSize(IDirect3DRMTexture3 *iface, D3DVALUE width, D3DVALUE height)
Definition: texture.c:1188
static HRESULT WINAPI d3drm_texture3_InitFromResource2(IDirect3DRMTexture3 *iface, HMODULE module, const char *name, const char *type)
Definition: texture.c:1301
uint32_t entry
Definition: isohybrid.c:63
static HRESULT WINAPI d3drm_texture2_InitFromFile(IDirect3DRMTexture2 *iface, const char *filename)
Definition: texture.c:762
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define GENERIC_READ
Definition: compat.h:124
#define IDirect3DRMTexture3_InitFromSurface(p, a)
Definition: d3drmobj.h:3488
static HRESULT WINAPI d3drm_texture1_InitFromResource(IDirect3DRMTexture *iface, HRSRC resource)
Definition: texture.c:477
#define IDirect3DRMTexture3_GetShades(p)
Definition: d3drmobj.h:3501
static HPALETTE palette
Definition: clipboard.c:1345
#define IDirect3DRMObject_AddDestroyCallback(p, a, b)
Definition: d3drmobj.h:223
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
Definition: d3drm.c:188
static HRESULT WINAPI d3drm_texture1_GetDecalOrigin(IDirect3DRMTexture *iface, LONG *x, LONG *y)
Definition: texture.c:563
ULONG_PTR SIZE_T
Definition: typedefs.h:79
static HRESULT WINAPI d3drm_texture3_SetName(IDirect3DRMTexture3 *iface, const char *name)
Definition: texture.c:1097
#define IDirect3DRMTexture3_SetDecalScale(p, a)
Definition: d3drmobj.h:3495
#define S_OK
Definition: intsafe.h:59
static HRESULT WINAPI d3drm_texture2_SetAppData(IDirect3DRMTexture2 *iface, DWORD data)
Definition: texture.c:717
#define IDirect3DRMTexture3_SetDecalTransparency(p, a)
Definition: d3drmobj.h:3496
#define InterlockedIncrement
Definition: armddk.h:53
static HRESULT WINAPI d3drm_texture2_GetDecalOrigin(IDirect3DRMTexture2 *iface, LONG *x, LONG *y)
Definition: texture.c:867
static HRESULT WINAPI d3drm_texture1_DeleteDestroyCallback(IDirect3DRMTexture *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: texture.c:398
#define CDECL
Definition: compat.h:21
static DWORD WINAPI d3drm_texture2_GetDecalScale(IDirect3DRMTexture2 *iface)
Definition: texture.c:903
static HRESULT d3drm_image_load_32(D3DRMIMAGE *image, unsigned char *src_data, LONGLONG src_data_size, SIZE_T w, SIZE_T h, BOOL flip)
Definition: texture.c:149
static DWORD WINAPI d3drm_texture1_GetShades(IDirect3DRMTexture *iface)
Definition: texture.c:581
static ULONG WINAPI d3drm_texture3_Release(IDirect3DRMTexture3 *iface)
Definition: texture.c:1036
#define E_NOTIMPL
Definition: ddrawi.h:99
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
Definition: gl.h:1546
static HRESULT WINAPI d3drm_texture3_GetName(IDirect3DRMTexture3 *iface, DWORD *size, char *name)
Definition: texture.c:1106
static D3DRMIMAGE *WINAPI d3drm_texture1_GetImage(IDirect3DRMTexture *iface)
Definition: texture.c:572
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define IDirect3DRMTexture3_GetDecalOrigin(p, a, b)
Definition: d3drmobj.h:3499
IDirect3DRM * d3drm
Definition: d3drm_private.h:64
#define PAGE_READONLY
Definition: compat.h:127
void d3drm_object_init(struct d3drm_object *object, const char *classname)
Definition: d3drm_main.c:39
static D3DCOLOR WINAPI d3drm_texture1_GetDecalTransparentColor(IDirect3DRMTexture *iface)
Definition: texture.c:617
#define IDirect3DRMTexture3_SetShades(p, a)
Definition: d3drmobj.h:3492
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static HRESULT WINAPI d3drm_texture3_InitFromResource(IDirect3DRMTexture3 *iface, HRSRC resource)
Definition: texture.c:1159
static BOOL WINAPI d3drm_texture2_GetDecalTransparency(IDirect3DRMTexture2 *iface)
Definition: texture.c:912
#define IDirect3DRMTexture3_QueryInterface(p, a, b)
Definition: d3drmobj.h:3474
static HRESULT WINAPI d3drm_texture1_SetDecalScale(IDirect3DRMTexture *iface, DWORD scale)
Definition: texture.c:527
static D3DCOLOR WINAPI d3drm_texture2_GetDecalTransparentColor(IDirect3DRMTexture2 *iface)
Definition: texture.c:921
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32
static DWORD WINAPI d3drm_texture3_GetAppData(IDirect3DRMTexture3 *iface)
Definition: texture.c:1088
Definition: name.c:38
static HRESULT WINAPI d3drm_texture1_AddDestroyCallback(IDirect3DRMTexture *iface, D3DRMOBJECTCALLBACK cb, void *ctx)
Definition: texture.c:388
#define IDirect3DRMTexture3_Release(p)
Definition: d3drmobj.h:3476
static HRESULT WINAPI d3drm_texture1_SetDecalTransparentColor(IDirect3DRMTexture *iface, D3DCOLOR color)
Definition: texture.c:545
#define IDirect3DRMTexture3_DeleteDestroyCallback(p, a, b)
Definition: d3drmobj.h:3480
static HRESULT WINAPI d3drm_texture3_GetDecalSize(IDirect3DRMTexture3 *iface, D3DVALUE *width, D3DVALUE *height)
Definition: texture.c:1223
unsigned int ULONG
Definition: retypes.h:1
static HRESULT WINAPI d3drm_texture3_SetAppData(IDirect3DRMTexture3 *iface, DWORD data)
Definition: texture.c:1077
#define IDirect3DRMTexture3_SetDecalOrigin(p, a, b)
Definition: d3drmobj.h:3494
#define IDirect3DRM_Release(p)
Definition: d3drm.h:111
#define D3DRMERR_BADFILE
Definition: d3drm.h:494
static ULONG WINAPI d3drm_texture2_Release(IDirect3DRMTexture2 *iface)
Definition: texture.c:678
DWORD bpp
Definition: surface.c:182
static HRESULT WINAPI d3drm_texture1_SetColors(IDirect3DRMTexture *iface, DWORD max_colors)
Definition: texture.c:491
static HRESULT WINAPI d3drm_texture2_SetColors(IDirect3DRMTexture2 *iface, DWORD max_colors)
Definition: texture.c:795
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:408
#define IDirect3DRMTexture3_GetDecalTransparency(p)
Definition: d3drmobj.h:3504
static HRESULT d3drm_texture_load(struct d3drm_texture *texture, const char *path, BOOL flip, D3DRMIMAGE **image_out)
Definition: texture.c:262
IDirect3DRMTexture2 IDirect3DRMTexture2_iface
Definition: d3drm_private.h:62
#define UnmapViewOfFile
Definition: compat.h:412
#define memset(x, y, z)
Definition: compat.h:39
#define IDirect3DRMTexture3_AddDestroyCallback(p, a, b)
Definition: d3drmobj.h:3479
static HRESULT WINAPI d3drm_texture2_Clone(IDirect3DRMTexture2 *iface, IUnknown *outer, REFIID iid, void **out)
Definition: texture.c:687
static HRESULT WINAPI d3drm_texture3_SetValidationCallback(IDirect3DRMTexture3 *iface, D3DRMVALIDATIONCALLBACK cb, void *ctx)
Definition: texture.c:1362
static HRESULT WINAPI d3drm_texture2_SetDecalTransparency(IDirect3DRMTexture2 *iface, BOOL transparency)
Definition: texture.c:840
struct CFHEADER header
Definition: fdi.c:101
void * object
Definition: jmemsys.h:48
static HRESULT WINAPI d3drm_texture2_InitFromResource2(IDirect3DRMTexture2 *iface, HMODULE module, const char *name, const char *type)
Definition: texture.c:939
static DWORD WINAPI d3drm_texture2_GetShades(IDirect3DRMTexture2 *iface)
Definition: texture.c:885
static BOOL d3drm_validate_image(D3DRMIMAGE *image)
Definition: texture.c:53
#define IDirect3DRMTexture3_GetDecalTransparentColor(p)
Definition: d3drmobj.h:3505
#define IDirect3DRMTexture3_GetDecalScale(p)
Definition: d3drmobj.h:3503
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
HRESULT d3drm_object_set_name(struct d3drm_object *object, const char *name)
Definition: d3drm_main.c:135
Definition: fci.c:126
static const struct IDirect3DRMTextureVtbl d3drm_texture1_vtbl
Definition: texture.c:626