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