static void draw_phasor(starshp1_state *state, bitmap_t* bitmap) { int i; for (i = 128; i < 240; i++) if (i >= get_sprite_vpos(state, 13)) { *BITMAP_ADDR16(bitmap, i, 2 * i + 0) = 0x10; *BITMAP_ADDR16(bitmap, i, 2 * i + 1) = 0x10; *BITMAP_ADDR16(bitmap, i, 2 * (255 - i) + 0) = 0x10; *BITMAP_ADDR16(bitmap, i, 2 * (255 - i) + 1) = 0x10; } }
static void draw_phasor(starshp1_state *state, bitmap_ind16 &bitmap) { int i; for (i = 128; i < 240; i++) if (i >= get_sprite_vpos(state, 13)) { bitmap.pix16(i, 2 * i + 0) = 0x10; bitmap.pix16(i, 2 * i + 1) = 0x10; bitmap.pix16(i, 2 * (255 - i) + 0) = 0x10; bitmap.pix16(i, 2 * (255 - i) + 1) = 0x10; } }
static void draw_sprites(running_machine *machine, bitmap_t* bitmap, const rectangle* cliprect) { starshp1_state *state = machine->driver_data<starshp1_state>(); int i; for (i = 0; i < 14; i++) { int code = (state->obj_ram[i] & 0xf) ^ 0xf; drawgfx_transpen(bitmap, cliprect, machine->gfx[1], code % 8, code / 8, 0, 0, get_sprite_hpos(state, i), get_sprite_vpos(state, i), 0); } }
static void draw_spaceship(running_machine *machine, bitmap_t* bitmap, const rectangle* cliprect) { starshp1_state *state = machine->driver_data<starshp1_state>(); double scaler = -5 * log(1 - state->ship_size / 256.0); /* ? */ unsigned xzoom = 2 * 0x10000 * scaler; unsigned yzoom = 1 * 0x10000 * scaler; int x = get_sprite_hpos(state, 14); int y = get_sprite_vpos(state, 14); if (x <= 0) x -= (xzoom * state->ship_hoffset) >> 16; if (y <= 0) y -= (yzoom * state->ship_voffset) >> 16; drawgfxzoom_transpen(bitmap, cliprect, machine->gfx[2], state->ship_picture & 0x03, state->ship_explode, state->ship_picture & 0x80, 0, x, y, xzoom, yzoom, 0); }