trunk/src/mame/includes/tecmo16.h
| r30612 | r30613 | |
| 61 | 61 | DECLARE_VIDEO_START(ginkun); |
| 62 | 62 | DECLARE_VIDEO_START(riot); |
| 63 | 63 | 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); |
| 66 | 64 | required_device<cpu_device> m_maincpu; |
| 67 | 65 | required_device<cpu_device> m_audiocpu; |
| 68 | 66 | required_device<gfxdecode_device> m_gfxdecode; |
trunk/src/mame/includes/gaiden.h
| r30612 | r30613 | |
| 101 | 101 | void drgnbowl_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 102 | 102 | void descramble_drgnbowl(int descramble_cpu); |
| 103 | 103 | 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); |
| 106 | 104 | DECLARE_WRITE_LINE_MEMBER(irqhandler); |
| 107 | 105 | required_device<cpu_device> m_maincpu; |
| 108 | 106 | required_device<gfxdecode_device> m_gfxdecode; |
trunk/src/mame/video/gaiden.c
| r30612 | r30613 | |
| 265 | 265 | |
| 266 | 266 | ***************************************************************************/ |
| 267 | 267 | |
| 268 | | /* mix & blend the paletted 16-bit tile and sprite bitmaps into an RGB 32-bit bitmap */ |
| 269 | | void 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 | | |
| 307 | 268 | // dragon bowl uses a bootleg format |
| 308 | 269 | /* sprite format: |
| 309 | 270 | * |
trunk/src/mame/video/tecmo16.c
| r30612 | r30613 | |
| 192 | 192 | |
| 193 | 193 | /******************************************************************************/ |
| 194 | 194 | |
| 195 | | /* mix & blend the paletted 16-bit tile and sprite bitmaps into an RGB 32-bit bitmap */ |
| 196 | | void 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(); |
| 201 | 195 | |
| 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 | | |
| 234 | 196 | /******************************************************************************/ |
| 235 | 197 | |
| 236 | 198 | UINT32 tecmo16_state::screen_update_tecmo16(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) |