Previous 199869 Revisions Next

r30613 Thursday 22nd May, 2014 at 23:45:09 UTC by David Haywood
kill unused old code (nw)
[src/mame/includes]gaiden.h tecmo16.h
[src/mame/video]gaiden.c tecmo16.c

trunk/src/mame/includes/tecmo16.h
r30612r30613
6161   DECLARE_VIDEO_START(ginkun);
6262   DECLARE_VIDEO_START(riot);
6363   UINT32 screen_update_tecmo16(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
64   void blendbitmaps(bitmap_rgb32 &dest, bitmap_ind16 &src1, bitmap_ind16 &src2, bitmap_ind16 &src3,
65      int sx, int sy, const rectangle &cliprect);
6664   required_device<cpu_device> m_maincpu;
6765   required_device<cpu_device> m_audiocpu;
6866   required_device<gfxdecode_device> m_gfxdecode;
trunk/src/mame/includes/gaiden.h
r30612r30613
101101   void drgnbowl_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
102102   void descramble_drgnbowl(int descramble_cpu);
103103   void descramble_mastninj_gfx(UINT8* src);
104   void blendbitmaps(bitmap_rgb32 &dest,bitmap_ind16 &src1,bitmap_ind16 &src2,bitmap_ind16 &src3,
105      int sx,int sy,const rectangle &cliprect);
106104   DECLARE_WRITE_LINE_MEMBER(irqhandler);
107105   required_device<cpu_device> m_maincpu;
108106   required_device<gfxdecode_device> m_gfxdecode;
trunk/src/mame/video/gaiden.c
r30612r30613
265265
266266***************************************************************************/
267267
268/* mix & blend the paletted 16-bit tile and sprite bitmaps into an RGB 32-bit bitmap */
269void gaiden_state::blendbitmaps(bitmap_rgb32 &dest,bitmap_ind16 &src1,bitmap_ind16 &src2,bitmap_ind16 &src3,
270      int sx,int sy,const rectangle &cliprect)
271{
272   int y,x;
273   const pen_t *paldata = m_palette->pens();
274
275   for (y = cliprect.min_y; y <= cliprect.max_y; y++)
276   {
277      UINT32 *dd  = &dest.pix32(y);
278      UINT16 *sd1 = &src1.pix16(y);
279      UINT16 *sd2 = &src2.pix16(y);
280      UINT16 *sd3 = &src3.pix16(y);
281
282      for (x = cliprect.min_x; x <= cliprect.max_x; x++)
283      {
284         if (sd3[x])
285         {
286            if (sd2[x])
287               dd[x] = paldata[sd2[x] | 0x0400] | paldata[sd3[x]];
288            else
289               dd[x] = paldata[sd1[x] | 0x0400] | paldata[sd3[x]];
290         }
291         else
292         {
293            if (sd2[x])
294            {
295               if (sd2[x] & 0x800)
296                  dd[x] = paldata[sd1[x] | 0x0400] | paldata[sd2[x]];
297               else
298                  dd[x] = paldata[sd2[x]];
299            }
300            else
301               dd[x] = paldata[sd1[x]];
302         }
303      }
304   }
305}
306
307268// dragon bowl uses a bootleg format
308269/* sprite format:
309270 *
trunk/src/mame/video/tecmo16.c
r30612r30613
192192
193193/******************************************************************************/
194194
195/* mix & blend the paletted 16-bit tile and sprite bitmaps into an RGB 32-bit bitmap */
196void tecmo16_state::blendbitmaps(bitmap_rgb32 &dest,bitmap_ind16 &src1,bitmap_ind16 &src2,bitmap_ind16 &src3,
197      int sx,int sy,const rectangle &cliprect)
198{
199   int y,x;
200   const pen_t *paldata = m_palette->pens();
201195
202   for (y = cliprect.min_y; y <= cliprect.max_y; y++)
203   {
204      UINT32 *dd  = &dest.pix32(y);
205      UINT16 *sd1 = &src1.pix16(y);
206      UINT16 *sd2 = &src2.pix16(y);
207      UINT16 *sd3 = &src3.pix16(y);
208
209      for (x = cliprect.min_x; x <= cliprect.max_x; x++)
210      {
211         if (sd3[x])
212         {
213            if (sd2[x])
214               dd[x] = paldata[sd2[x] | 0x0400] | paldata[sd3[x]];
215            else
216               dd[x] = paldata[sd1[x] | 0x0400] | paldata[sd3[x]];
217         }
218         else
219         {
220            if (sd2[x])
221            {
222               if (sd2[x] & 0x800)
223                  dd[x] = paldata[sd1[x] | 0x0400] | paldata[sd2[x]];
224               else
225                  dd[x] = paldata[sd2[x]];
226            }
227            else
228               dd[x] = paldata[sd1[x]];
229         }
230      }
231   }
232}
233
234196/******************************************************************************/
235197
236198UINT32 tecmo16_state::screen_update_tecmo16(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)

Previous 199869 Revisions Next


© 1997-2024 The MAME Team