265
static void firetrk_draw_car(gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect, int which, int flash)
265
static void firetrk_draw_car(bitmap_t *bitmap, const rectangle *cliprect, gfx_element **gfx, int which, int flash)
267
267
int gfx_bank, code, color, flip_x, flip_y, x, y;
290
drawgfx(bitmap, gfx[gfx_bank], code, color, flip_x, flip_y, x, y, cliprect, TRANSPARENCY_PEN, 0);
290
drawgfx_transpen(bitmap, cliprect, gfx[gfx_bank], code, color, flip_x, flip_y, x, y, 0);
294
static void superbug_draw_car(gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect, int flash)
294
static void superbug_draw_car(bitmap_t *bitmap, const rectangle *cliprect, gfx_element **gfx, int flash)
296
296
int gfx_bank = (*firetrk_car_rot & 0x10) ? 4 : 3;
297
297
int code = ~*firetrk_car_rot & 0x03;
299
299
int flip_x = *firetrk_car_rot & 0x04;
300
300
int flip_y = *firetrk_car_rot & 0x08;
302
drawgfx(bitmap, gfx[gfx_bank], code, color, flip_x, flip_y, 144, 104, cliprect, TRANSPARENCY_PEN, 0);
302
drawgfx_transpen(bitmap, cliprect, gfx[gfx_bank], code, color, flip_x, flip_y, 144, 104, 0);
306
static void montecar_draw_car(gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect, int which, int is_collision_detection)
306
static void montecar_draw_car(bitmap_t *bitmap, const rectangle *cliprect, gfx_element **gfx, int which, int is_collision_detection)
308
308
int gfx_bank, code, color, flip_x, flip_y, x, y;
331
drawgfx(bitmap, gfx[gfx_bank], code, color, flip_x, flip_y, x, y, cliprect, TRANSPARENCY_PEN, 0);
331
drawgfx_transpen(bitmap, cliprect, gfx[gfx_bank], code, color, flip_x, flip_y, x, y, 0);
335
static void draw_text(gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *alpha_ram,
335
static void draw_text(bitmap_t *bitmap, const rectangle *cliprect, gfx_element **gfx, UINT8 *alpha_ram,
336
336
int x, int count, int height)
340
340
for (i = 0; i < count; i++)
341
drawgfx(bitmap, gfx[0], alpha_ram[i], 0, 0, 0, x, i * height, cliprect, TRANSPARENCY_NONE, 0);
341
drawgfx_opaque(bitmap, cliprect, gfx[0], alpha_ram[i], 0, 0, 0, x, i * height);
364
364
VIDEO_UPDATE( firetrk )
366
tilemap_mark_all_tiles_dirty(ALL_TILEMAPS);
366
tilemap_mark_all_tiles_dirty_all(screen->machine);
367
367
tilemap_set_scrollx(tilemap1, 0, *firetrk_scroll_x - 37);
368
368
tilemap_set_scrollx(tilemap2, 0, *firetrk_scroll_x - 37);
369
369
tilemap_set_scrolly(tilemap1, 0, *firetrk_scroll_y);
372
372
bitmap_fill(bitmap, cliprect, 0);
373
373
tilemap_draw(bitmap, &playfield_window, tilemap1, 0, 0);
374
firetrk_draw_car(screen->machine->gfx, bitmap, &playfield_window, 0, firetrk_flash);
375
firetrk_draw_car(screen->machine->gfx, bitmap, &playfield_window, 1, firetrk_flash);
376
draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x00, 296, 0x10, 0x10);
377
draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x10, 8, 0x10, 0x10);
374
firetrk_draw_car(bitmap, &playfield_window, screen->machine->gfx, 0, firetrk_flash);
375
firetrk_draw_car(bitmap, &playfield_window, screen->machine->gfx, 1, firetrk_flash);
376
draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x00, 296, 0x10, 0x10);
377
draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x10, 8, 0x10, 0x10);
379
379
if (cliprect->max_y == video_screen_get_visible_area(screen)->max_y)
381
381
tilemap_draw(helper1, &playfield_window, tilemap2, 0, 0);
383
383
bitmap_fill(helper2, &playfield_window, 0xff);
384
firetrk_draw_car(screen->machine->gfx, helper2, &playfield_window, 0, FALSE);
384
firetrk_draw_car(helper2, &playfield_window, screen->machine->gfx, 0, FALSE);
385
385
check_collision(0);
387
387
bitmap_fill(helper2, &playfield_window, 0xff);
388
firetrk_draw_car(screen->machine->gfx, helper2, &playfield_window, 1, FALSE);
388
firetrk_draw_car(helper2, &playfield_window, screen->machine->gfx, 1, FALSE);
389
389
check_collision(1);
391
391
*firetrk_blink = FALSE;
398
398
VIDEO_UPDATE( superbug )
400
tilemap_mark_all_tiles_dirty(ALL_TILEMAPS);
400
tilemap_mark_all_tiles_dirty_all(screen->machine);
401
401
tilemap_set_scrollx(tilemap1, 0, *firetrk_scroll_x - 37);
402
402
tilemap_set_scrollx(tilemap2, 0, *firetrk_scroll_x - 37);
403
403
tilemap_set_scrolly(tilemap1, 0, *firetrk_scroll_y);
406
406
bitmap_fill(bitmap, cliprect, 0);
407
407
tilemap_draw(bitmap, &playfield_window, tilemap1, 0, 0);
408
superbug_draw_car(screen->machine->gfx, bitmap, &playfield_window, firetrk_flash);
409
draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x00, 296, 0x10, 0x10);
410
draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x10, 8, 0x10, 0x10);
408
superbug_draw_car(bitmap, &playfield_window, screen->machine->gfx, firetrk_flash);
409
draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x00, 296, 0x10, 0x10);
410
draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x10, 8, 0x10, 0x10);
412
412
if (cliprect->max_y == video_screen_get_visible_area(screen)->max_y)
414
414
tilemap_draw(helper1, &playfield_window, tilemap2, 0, 0);
416
416
bitmap_fill(helper2, &playfield_window, 0xff);
417
superbug_draw_car(screen->machine->gfx, helper2, &playfield_window, FALSE);
417
superbug_draw_car(helper2, &playfield_window, screen->machine->gfx, FALSE);
418
418
check_collision(0);
420
420
*firetrk_blink = FALSE;
427
427
VIDEO_UPDATE( montecar )
429
tilemap_mark_all_tiles_dirty(ALL_TILEMAPS);
429
tilemap_mark_all_tiles_dirty_all(screen->machine);
430
430
tilemap_set_scrollx(tilemap1, 0, *firetrk_scroll_x - 37);
431
431
tilemap_set_scrollx(tilemap2, 0, *firetrk_scroll_x - 37);
432
432
tilemap_set_scrolly(tilemap1, 0, *firetrk_scroll_y);
435
435
bitmap_fill(bitmap, cliprect, 0x2c);
436
436
tilemap_draw(bitmap, &playfield_window, tilemap1, 0, 0);
437
montecar_draw_car(screen->machine->gfx, bitmap, &playfield_window, 0, FALSE);
438
montecar_draw_car(screen->machine->gfx, bitmap, &playfield_window, 1, FALSE);
439
draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x00, 24, 0x20, 0x08);
440
draw_text(screen->machine->gfx, bitmap, cliprect, firetrk_alpha_num_ram + 0x20, 16, 0x20, 0x08);
437
montecar_draw_car(bitmap, &playfield_window, screen->machine->gfx, 0, FALSE);
438
montecar_draw_car(bitmap, &playfield_window, screen->machine->gfx, 1, FALSE);
439
draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x00, 24, 0x20, 0x08);
440
draw_text(bitmap, cliprect, screen->machine->gfx, firetrk_alpha_num_ram + 0x20, 16, 0x20, 0x08);
442
442
if (cliprect->max_y == video_screen_get_visible_area(screen)->max_y)
444
444
tilemap_draw(helper1, &playfield_window, tilemap2, 0, 0);
446
446
bitmap_fill(helper2, &playfield_window, 0xff);
447
montecar_draw_car(screen->machine->gfx, helper2, &playfield_window, 0, TRUE);
447
montecar_draw_car(helper2, &playfield_window, screen->machine->gfx, 0, TRUE);
448
448
check_collision(0);
450
450
bitmap_fill(helper2, &playfield_window, 0xff);
451
montecar_draw_car(screen->machine->gfx, helper2, &playfield_window, 1, TRUE);
451
montecar_draw_car(helper2, &playfield_window, screen->machine->gfx, 1, TRUE);
452
452
check_collision(1);