Previous 199869 Revisions Next

r36087 Monday 23rd February, 2015 at 19:51:32 UTC by Alex W. Jackson
render.c: render_containers now always make their own copy of the emulation palette for paletted textures, whether or not there are custom brightness/contrast/gamma settings. Fixes -mt color issues in driftout, raphero, etc. without the additional complexity introduced in fde220f4a7e955343c3b25a562d6884f94c63bdc (which has been reverted) (nw)
[/branches/kale/src/emu]render.c render.h rendersw.inc
[/branches/kale/src/lib/util]palette.h
[/branches/kale/src/osd/sdl]blit13.h draw13.c drawogl.c
[/branches/kale/src/osd/windows]drawd3d.c

branches/kale/src/emu/render.c
r244598r244599
202202}
203203
204204//**************************************************************************
205//  render_texinfo
206//**************************************************************************
207
208render_texinfo &render_texinfo::operator=(const render_texinfo &src)
209{
210   free_palette();
211   base = src.base;
212   rowpixels = src.rowpixels;
213   width = src.width;
214   height = src.height;
215   seqid = src.seqid;
216   osddata = src.osddata;
217   m_palette = src.m_palette;
218   if (m_palette != NULL)
219   {
220      m_palette->ref_count++;
221   }
222   return *this;
223}
224
225render_texinfo::render_texinfo(const render_texinfo &src)
226{
227   base = src.base;
228   rowpixels = src.rowpixels;
229   width = src.width;
230   height = src.height;
231   seqid = src.seqid;
232   osddata = src.osddata;
233   m_palette = src.m_palette;
234   if (m_palette != NULL)
235   {
236      m_palette->ref_count++;
237   }
238}
239
240void render_texinfo::set_palette(const dynamic_array<rgb_t> *source)
241{
242   free_palette();
243   if (source != NULL)
244   {
245      m_palette = global_alloc(render_palette_copy);
246      m_palette->palette.copyfrom(*source);
247      m_palette->ref_count = 1;
248   }
249   else
250   {
251      m_palette = NULL;
252   }
253}
254
255void render_texinfo::free_palette()
256{
257   if (m_palette != NULL)
258   {
259      m_palette->ref_count--;
260      if (m_palette->ref_count == 0)
261      {
262         global_free(m_palette);
263      }
264   }
265   m_palette = NULL;
266}
267
268
269//**************************************************************************
270205//  RENDER PRIMITIVE
271206//**************************************************************************
272207
r244598r244599
277212
278213void render_primitive::reset()
279214{
280   // public state
281   type = INVALID;
282   container = NULL;
283   bounds.x0 = 0;
284   bounds.y0 = 0;
285   bounds.x1 = 0;
286   bounds.y1 = 0;
287   color.a = 0;
288   color.r = 0;
289   color.g = 0;
290   color.b = 0;
291   flags = 0;
292   width = 0.0f;
293   texture.set_palette(NULL);
294   texture = render_texinfo();
295   texcoords.bl.u = 0.0f;
296   texcoords.bl.v = 0.0f;
297   texcoords.br.u = 0.0f;
298   texcoords.br.v = 0.0f;
299   texcoords.tl.u = 0.0f;
300   texcoords.tl.v = 0.0f;
301   texcoords.tr.u = 0.0f;
302   texcoords.tr.v = 0.0f;
303
304215   // do not clear m_next!
305   // memset(&type, 0, FPTR(&texcoords + 1) - FPTR(&type));
216   memset(&type, 0, FPTR(&texcoords + 1) - FPTR(&type));
306217}
307218
308219
r244598r244599
556467      texinfo.rowpixels = m_bitmap->rowpixels();
557468      texinfo.width = swidth;
558469      texinfo.height = sheight;
559      // will be set later
560      texinfo.set_palette(NULL);
470      // palette will be set later
561471      texinfo.seqid = ++m_curseq;
562472   }
563473   else
r244598r244599
611521      texinfo.rowpixels = scaled->bitmap->rowpixels();
612522      texinfo.width = dwidth;
613523      texinfo.height = dheight;
614      // will be set later
615      texinfo.set_palette(NULL);
524      // palette will be set later
616525      texinfo.seqid = scaled->seqid;
617526   }
618527}
r244598r244599
623532//  palette for a texture
624533//-------------------------------------------------
625534
626const dynamic_array<rgb_t> *render_texture::get_adjusted_palette(render_container &container)
535const rgb_t *render_texture::get_adjusted_palette(render_container &container)
627536{
628537   // override the palette with our adjusted palette
629538   switch (m_format)
r244598r244599
633542
634543         assert(m_bitmap->palette() != NULL);
635544
636         // if no adjustment necessary, return the raw palette
637         if (!container.has_brightness_contrast_gamma_changes())
638            return m_bitmap->palette()->entry_list_adjusted_darray();
639
640         // otherwise, return our adjusted palette
545         // return our adjusted palette
641546         return container.bcg_lookup_table(m_format, m_bitmap->palette());
642547
643548      case TEXFORMAT_RGB32:
r244598r244599
671576      m_manager(manager),
672577      m_screen(screen),
673578      m_overlaybitmap(NULL),
674      m_overlaytexture(NULL),
675      m_bcglookup256(0x400)
579      m_overlaytexture(NULL)
676580{
677581   // make sure it is empty
678582   empty();
r244598r244599
685589      m_user.m_brightness = manager.machine().options().brightness();
686590      m_user.m_contrast = manager.machine().options().contrast();
687591      m_user.m_gamma = manager.machine().options().gamma();
688      // can't allocate palette client yet since palette and screen devices aren't started yet
592      // palette client will be allocated later
689593   }
690594
691595   recompute_lookups();
r244598r244599
812716//  given texture mode
813717//-------------------------------------------------
814718
815const dynamic_array<rgb_t> *render_container::bcg_lookup_table(int texformat, palette_t *palette)
719const rgb_t *render_container::bcg_lookup_table(int texformat, palette_t *palette)
816720{
817721   switch (texformat)
818722   {
r244598r244599
820724      case TEXFORMAT_PALETTEA16:
821725         if (m_palclient == NULL) // if adjusted palette hasn't been created yet, create it
822726         {
823            assert(palette == m_screen->palette()->palette());
824727            m_palclient.reset(global_alloc(palette_client(*palette)));
825728            m_bcglookup.resize(palette->max_index());
826729            recompute_lookups();
827730         }
828731         assert (palette == &m_palclient->palette());
829         return &m_bcglookup;
732         return m_bcglookup;
830733
831734      case TEXFORMAT_RGB32:
832735      case TEXFORMAT_ARGB32:
833736      case TEXFORMAT_YUY16:
834         return &m_bcglookup256;
737         return m_bcglookup256;
835738
836739      default:
837740         return NULL;
r244598r244599
916819      const rgb_t *adjusted_palette = palette.entry_list_adjusted();
917820      int colors = palette.max_index();
918821
919      for (int i = 0; i < colors; i++)
822      if (has_brightness_contrast_gamma_changes())
920823      {
921         rgb_t newval = adjusted_palette[i];
922         m_bcglookup[i] = (newval & 0xff000000) |
824         for (int i = 0; i < colors; i++)
825         {
826            rgb_t newval = adjusted_palette[i];
827            m_bcglookup[i] = (newval & 0xff000000) |
923828                              m_bcglookup256[0x200 + newval.r()] |
924829                              m_bcglookup256[0x100 + newval.g()] |
925830                              m_bcglookup256[0x000 + newval.b()];
831         }
926832      }
833      else
834         memcpy(&m_bcglookup[0], adjusted_palette, colors * sizeof(rgb_t));
927835   }
928836}
929837
r244598r244599
949857      palette_t &palette = m_palclient->palette();
950858      const rgb_t *adjusted_palette = palette.entry_list_adjusted();
951859
952      // loop over chunks of 32 entries, since we can quickly examine 32 at a time
953      for (UINT32 entry32 = mindirty / 32; entry32 <= maxdirty / 32; entry32++)
860      if (has_brightness_contrast_gamma_changes())
954861      {
955         UINT32 dirtybits = dirty[entry32];
956         if (dirtybits != 0)
862         // loop over chunks of 32 entries, since we can quickly examine 32 at a time
863         for (UINT32 entry32 = mindirty / 32; entry32 <= maxdirty / 32; entry32++)
864         {
865            UINT32 dirtybits = dirty[entry32];
866            if (dirtybits != 0)
957867
958            // this chunk of 32 has dirty entries; fix them up
959            for (UINT32 entry = 0; entry < 32; entry++)
960               if (dirtybits & (1 << entry))
961               {
962                  UINT32 finalentry = entry32 * 32 + entry;
963                  rgb_t newval = adjusted_palette[finalentry];
964                  m_bcglookup[finalentry] = (newval & 0xff000000) |
868               // this chunk of 32 has dirty entries; fix them up
869               for (UINT32 entry = 0; entry < 32; entry++)
870                  if (dirtybits & (1 << entry))
871                  {
872                     UINT32 finalentry = entry32 * 32 + entry;
873                     rgb_t newval = adjusted_palette[finalentry];
874                     m_bcglookup[finalentry] = (newval & 0xff000000) |
965875                                          m_bcglookup256[0x200 + newval.r()] |
966876                                          m_bcglookup256[0x100 + newval.g()] |
967877                                          m_bcglookup256[0x000 + newval.b()];
968               }
878                  }
879         }
969880      }
881      else
882         memcpy(&m_bcglookup[mindirty], &adjusted_palette[mindirty], (maxdirty - mindirty + 1) * sizeof(rgb_t));
970883   }
971884}
972885
r244598r244599
18211734               height = MIN(height, m_maxtexheight);
18221735
18231736               curitem->texture()->get_scaled(width, height, prim->texture, list);
1737
18241738               // set the palette
1825#if 1
1826               const dynamic_array<rgb_t> *adjusted_pal = curitem->texture()->get_adjusted_palette(container);
1827               prim->texture.set_palette(adjusted_pal);
1828#else
18291739               prim->texture.palette = curitem->texture()->get_adjusted_palette(container);
1830#endif
18311740
18321741               // determine UV coordinates and apply clipping
18331742               prim->texcoords = oriented_texcoords[finalorient];
branches/kale/src/emu/render.h
r244598r244599
209209
210210
211211// render_texinfo - texture information
212
213
214struct render_palette_copy
212struct render_texinfo
215213{
216   int ref_count;
217   dynamic_array<rgb_t> palette;
218};
219
220class render_texinfo
221{
222public:
223   render_texinfo()
224   : base(NULL), rowpixels(0), width(0), height(0),
225      seqid(0), osddata(0), m_palette(NULL)
226   {}
227
228   render_texinfo(const render_texinfo &src);
229
230   ~render_texinfo()
231   {
232      free_palette();
233   }
234
235   render_texinfo &operator=(const render_texinfo &src);
236
237214   void *              base;               // base of the data
238215   UINT32              rowpixels;          // pixels per row
239216   UINT32              width;              // width of the image
240217   UINT32              height;             // height of the image
241218   UINT32              seqid;              // sequence ID
242219   UINT64              osddata;            // aux data to pass to osd
243
244   const rgb_t *       palette() const { return ((m_palette == NULL) ? NULL : &m_palette->palette[0]); }
245
246   void set_palette(const dynamic_array<rgb_t> *source);
247
248private:
249   void free_palette();
250
251   render_palette_copy *m_palette;     // palette for PALETTE16 textures, LUTs for RGB15/RGB32
220   const rgb_t *       palette;            // palette for PALETTE16 textures, bcg lookup table for RGB32/YUY16
252221};
253222
254223
r244598r244599
465434private:
466435   // internal helpers
467436   void get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &texinfo, render_primitive_list &primlist);
468   const dynamic_array<rgb_t> *get_adjusted_palette(render_container &container);
437   const rgb_t *get_adjusted_palette(render_container &container);
469438
470439   static const int MAX_TEXTURE_SCALES = 8;
471440
r244598r244599
555524   bool has_brightness_contrast_gamma_changes() const { return (m_user.m_brightness != 1.0f || m_user.m_contrast != 1.0f || m_user.m_gamma != 1.0f); }
556525   UINT8 apply_brightness_contrast_gamma(UINT8 value);
557526   float apply_brightness_contrast_gamma_fp(float value);
558   const dynamic_array<rgb_t> *bcg_lookup_table(int texformat, palette_t *palette = NULL);
527   const rgb_t *bcg_lookup_table(int texformat, palette_t *palette = NULL);
559528
560529private:
561530   // an item describes a high level primitive that is added to a container
r244598r244599
606575   bitmap_argb32 *         m_overlaybitmap;        // overlay bitmap
607576   render_texture *        m_overlaytexture;       // overlay texture
608577   auto_pointer<palette_client> m_palclient;       // client to the screen palette
609   dynamic_array<rgb_t>    m_bcglookup;            // full palette lookup with bcg adjustments
610   dynamic_array<rgb_t>    m_bcglookup256;         // lookup table for brightness/contrast/gamma
578   dynamic_array<rgb_t>    m_bcglookup;            // copy of screen palette with bcg adjustment
579   rgb_t                   m_bcglookup256[0x400];  // lookup table for brightness/contrast/gamma
611580};
612581
613582
branches/kale/src/emu/rendersw.inc
r244598r244599
130130
131131   static inline UINT32 get_texel_palette16(const render_texinfo &texture, INT32 curu, INT32 curv)
132132   {
133      const rgb_t *palbase = texture.palette();
133      const rgb_t *palbase = texture.palette;
134134      if (_BilinearFilter)
135135      {
136136         INT32 u0 = curu >> 16;
r244598r244599
166166
167167   static inline UINT32 get_texel_palette16a(const render_texinfo &texture, INT32 curu, INT32 curv)
168168   {
169      const rgb_t *palbase = texture.palette();
169      const rgb_t *palbase = texture.palette;
170170      if (_BilinearFilter)
171171      {
172172         INT32 u0 = curu >> 16;
r244598r244599
622622      INT32 endx = setup.endx;
623623
624624      // ensure all parameters are valid
625      assert(prim.texture.palette() != NULL);
625      assert(prim.texture.palette != NULL);
626626
627627      // fast case: no coloring, no alpha
628628      if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a))
r244598r244599
730730      INT32 endx = setup.endx;
731731
732732      // ensure all parameters are valid
733      assert(prim.texture.palette() != NULL);
733      assert(prim.texture.palette != NULL);
734734
735735      // fast case: no coloring, no alpha
736736      if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a))
r244598r244599
823823      INT32 endx = setup.endx;
824824
825825      // ensure all parameters are valid
826      assert(prim.texture.palette() != NULL);
826      assert(prim.texture.palette != NULL);
827827
828828      // fast case: no coloring, no alpha
829829      if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a))
r244598r244599
914914
915915   static void draw_quad_yuy16_none(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
916916   {
917      const rgb_t *palbase = prim.texture.palette();
917      const rgb_t *palbase = prim.texture.palette;
918918      INT32 dudx = setup.dudx;
919919      INT32 dvdx = setup.dvdx;
920920      INT32 endx = setup.endx;
r244598r244599
10841084
10851085   static void draw_quad_rgb32(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
10861086   {
1087      const rgb_t *palbase = prim.texture.palette();
1087      const rgb_t *palbase = prim.texture.palette;
10881088      INT32 dudx = setup.dudx;
10891089      INT32 dvdx = setup.dvdx;
10901090      INT32 endx = setup.endx;
r244598r244599
12541254
12551255   static void draw_quad_rgb32_add(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
12561256   {
1257      const rgb_t *palbase = prim.texture.palette();
1257      const rgb_t *palbase = prim.texture.palette;
12581258      INT32 dudx = setup.dudx;
12591259      INT32 dvdx = setup.dvdx;
12601260      INT32 endx = setup.endx;
r244598r244599
13921392
13931393   static void draw_quad_argb32_alpha(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
13941394   {
1395      const rgb_t *palbase = prim.texture.palette();
1395      const rgb_t *palbase = prim.texture.palette;
13961396      INT32 dudx = setup.dudx;
13971397      INT32 dvdx = setup.dvdx;
13981398      INT32 endx = setup.endx;
r244598r244599
15381538
15391539   static void draw_quad_argb32_multiply(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
15401540   {
1541      const rgb_t *palbase = prim.texture.palette();
1541      const rgb_t *palbase = prim.texture.palette;
15421542      INT32 dudx = setup.dudx;
15431543      INT32 dvdx = setup.dvdx;
15441544      INT32 endx = setup.endx;
r244598r244599
16571657
16581658   static void draw_quad_argb32_add(const render_primitive &prim, _PixelType *dstdata, UINT32 pitch, quad_setup_data &setup)
16591659   {
1660      const rgb_t *palbase = prim.texture.palette();
1660      const rgb_t *palbase = prim.texture.palette;
16611661      INT32 dudx = setup.dudx;
16621662      INT32 dvdx = setup.dvdx;
16631663      INT32 endx = setup.endx;
branches/kale/src/lib/util/palette.h
r244598r244599
170170
171171   // entry list getters
172172   const rgb_t *entry_list_raw() const { return m_entry_color; }
173   const dynamic_array<rgb_t> *entry_list_adjusted_darray() const { return &m_adjusted_color; }
174173   const rgb_t *entry_list_adjusted() const { return m_adjusted_color; }
175174   const rgb_t *entry_list_adjusted_rgb15() const { return m_adjusted_rgb15; }
176175
branches/kale/src/osd/sdl/blit13.h
r244598r244599
139139   blit_texcopy() : blit_base(sizeof(_dest_type) / _len_div, false, false) { }
140140    void texop(const texture_info *texture, const render_texinfo *texsource) const
141141    {
142       ATTR_UNUSED const rgb_t *palbase = texsource->palette();
142       ATTR_UNUSED const rgb_t *palbase = texsource->palette;
143143       int x, y;
144144       /* loop over Y */
145145       for (y = 0; y < texsource->height; y++) {
r244598r244599
166166   blit_texrot() : blit_base(sizeof(_dest_type), true, false) { }
167167   void texop(const texture_info *texture, const render_texinfo *texsource) const
168168   {
169      ATTR_UNUSED const rgb_t *palbase = texsource->palette();
169      ATTR_UNUSED const rgb_t *palbase = texsource->palette;
170170      int x, y;
171171      const quad_setup_data *setup = &texture->m_setup;
172172      int dudx = setup->dudx;
branches/kale/src/osd/sdl/draw13.c
r244598r244599
874874         m_format = SDL_TEXFORMAT_ARGB32;
875875         break;
876876      case TEXFORMAT_RGB32:
877         m_format = texsource.palette() ? SDL_TEXFORMAT_RGB32_PALETTED : SDL_TEXFORMAT_RGB32;
877         m_format = texsource.palette ? SDL_TEXFORMAT_RGB32_PALETTED : SDL_TEXFORMAT_RGB32;
878878         break;
879879      case TEXFORMAT_PALETTE16:
880880         m_format = SDL_TEXFORMAT_PALETTE16;
r244598r244599
883883         m_format = SDL_TEXFORMAT_PALETTE16A;
884884         break;
885885      case TEXFORMAT_YUY16:
886         m_format = texsource.palette() ? SDL_TEXFORMAT_YUY16_PALETTED : SDL_TEXFORMAT_YUY16;
886         m_format = texsource.palette ? SDL_TEXFORMAT_YUY16_PALETTED : SDL_TEXFORMAT_YUY16;
887887         break;
888888
889889      default:
branches/kale/src/osd/sdl/drawogl.c
r244598r244599
18161816   if    ( texture_copy_properties[texture->format][SDL_TEXFORMAT_SRC_EQUALS_DEST] &&
18171817         !texture_copy_properties[texture->format][SDL_TEXFORMAT_SRC_HAS_PALETTE] &&
18181818         texture->xprescale == 1 && texture->yprescale == 1 &&
1819         !texture->borderpix && !texsource->palette() &&
1819         !texture->borderpix && !texsource->palette &&
18201820         texsource->rowpixels <= m_texture_max_width )
18211821   {
18221822      texture->nocopy = TRUE;
r244598r244599
22632263         texture->format = SDL_TEXFORMAT_ARGB32;
22642264         break;
22652265      case TEXFORMAT_RGB32:
2266         if (texsource->palette() != NULL)
2266         if (texsource->palette != NULL)
22672267            texture->format = SDL_TEXFORMAT_RGB32_PALETTED;
22682268         else
22692269            texture->format = SDL_TEXFORMAT_RGB32;
r244598r244599
22752275         texture->format = SDL_TEXFORMAT_PALETTE16A;
22762276         break;
22772277      case TEXFORMAT_YUY16:
2278         if (texsource->palette() != NULL)
2278         if (texsource->palette != NULL)
22792279            texture->format = SDL_TEXFORMAT_YUY16_PALETTED;
22802280         else
22812281            texture->format = SDL_TEXFORMAT_YUY16;
r244598r244599
27172717            switch (PRIMFLAG_GET_TEXFORMAT(flags))
27182718            {
27192719               case TEXFORMAT_PALETTE16:
2720                  copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale);
2720                  copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale);
27212721                  break;
27222722
27232723               case TEXFORMAT_PALETTEA16:
2724                  copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale);
2724                  copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale);
27252725                  break;
27262726
27272727               case TEXFORMAT_RGB32:
2728                  copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale);
2728                  copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale);
27292729                  break;
27302730
27312731               case TEXFORMAT_ARGB32:
2732                  copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale);
2732                  copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale);
27332733                  break;
27342734
27352735               case TEXFORMAT_YUY16:
2736                  copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette(), texture->borderpix, texture->xprescale);
2736                  copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + y * texsource->rowpixels, texsource->width, texsource->palette, texture->borderpix, texture->xprescale);
27372737                  break;
27382738
27392739               default:
r244598r244599
28062806      texture->texinfo.width == prim->texture.width &&
28072807      texture->texinfo.height == prim->texture.height &&
28082808      texture->texinfo.rowpixels == prim->texture.rowpixels &&
2809      /* texture->texinfo.palette() == prim->texture.palette() && */
2809      /* texture->texinfo.palette == prim->texture.palette && */
28102810      ((texture->flags ^ prim->flags) & (PRIMFLAG_BLENDMODE_MASK | PRIMFLAG_TEXFORMAT_MASK)) == 0)
28112811      return 1;
28122812   else
branches/kale/src/osd/windows/drawd3d.c
r244598r244599
25442544      switch (PRIMFLAG_GET_TEXFORMAT(flags))
25452545      {
25462546         case TEXFORMAT_PALETTE16:
2547            copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2547            copyline_palette16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
25482548            break;
25492549
25502550         case TEXFORMAT_PALETTEA16:
2551            copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2551            copyline_palettea16((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
25522552            break;
25532553
25542554         case TEXFORMAT_RGB32:
2555            copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2555            copyline_rgb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
25562556            break;
25572557
25582558         case TEXFORMAT_ARGB32:
2559            copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2559            copyline_argb32((UINT32 *)dst, (UINT32 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
25602560            break;
25612561
25622562         case TEXFORMAT_YUY16:
25632563            if (m_texture_manager->get_yuv_format() == D3DFMT_YUY2)
2564               copyline_yuy16_to_yuy2((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2564               copyline_yuy16_to_yuy2((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
25652565            else if (m_texture_manager->get_yuv_format() == D3DFMT_UYVY)
2566               copyline_yuy16_to_uyvy((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2566               copyline_yuy16_to_uyvy((UINT16 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
25672567            else
2568               copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette(), m_xborderpix);
2568               copyline_yuy16_to_argb((UINT32 *)dst, (UINT16 *)texsource->base + srcy * texsource->rowpixels, texsource->width, texsource->palette, m_xborderpix);
25692569            break;
25702570
25712571         default:


Previous 199869 Revisions Next


© 1997-2024 The MAME Team