Exemple #1
0
void recording_t::advance_to_end()
{
	recording_frame_block_t *fb = first_block;
	while (fb->next) fb = fb->next;
	current_block = fb;
	current_frame = 0;
	while (!advance_frame());
	D(bug("advanced to %hu\n", current_frame));
}
void show_ghost()
{
  frame_tempo.interval(100);  
  ghost.RefreshAll(1);
  advance_frame(50);
  for (row = 0; row < 25; row++)
  {
    uint32_t val;
    if (frame > 25) {
      val = ghost_x[0][row] >> (uint8_t) (50 - frame);
    } else {
Exemple #3
0
void recording_t::rewind_clearing(uint64 end)
{
	D(bug("rewinding to %lu\n", end));
	do {
		if (retreat_frame_clearing()) return;
		recording_frame_t *f = current_frame_ptr();
		if (f->microseconds <= end) {
			D(bug("done rewinding\n"));
			advance_frame();
			break;
		}
		D(bug("rewound past %lu\n", f->microseconds));
	} while (1);
	D(bug("clearing through %hu\n", current_frame));
	current_block->clear_to_end(current_frame);
}
Exemple #4
0
void recording_t::play_through(uint64 end)
{
	if (done) return;
	do {
		recording_frame_t *f = current_frame_ptr();
		if (f->microseconds > end) {
			if (!countdown) {
				D(bug("%lu us until next\n", f->microseconds - end));
				countdown = 60;
			} else --countdown;
			break;
		}
		D(bug("playback: %04x %d %lx %lu\n", current_frame, f->op, f->arg, f->microseconds));
		switch (f->op) {
		case OP_NO_OP:
			break;
		case OP_KEY_DOWN:
			the_app->key_down(f->arg);
			break;
		case OP_KEY_UP:
			the_app->key_up(f->arg);
			break;
		case OP_MOUSE_DOWN:
			ADBMouseDown(f->arg);
			break;
		case OP_MOUSE_UP:
			ADBMouseUp(f->arg);
			break;
		case OP_MOUSE_XY:
			ADBMouseMoved(f->arg & 0xffffffff, f->arg >> 32);
			break;
		case OP_INVALIDATE_CACHE:
			the_app->ppc_cpu->invalidate_cache();
			the_app->record(OP_INVALIDATE_CACHE, f->arg);
			break;
		default:
			D(bug("invalid op: %d", f->op));
		}
		if (advance_frame()) {
			D(bug("finished playback\n"));
			done = true;
			break;
		}
	} while (1);
}
Exemple #5
0
mplayit ()
{
if (gif_loaded) return;
if (!file_is_loaded) return;

hide_mp();
notice_keys=1;
clock1 = get80hz();
hide_mouse();
is_gif=0;
while (1)
	{
	advance_frame(&vf,1);
	clock1 += fh.speed;
	if (!wait_til2(clock1))
		break;
	if (clock1 > get80hz())
		clock1 = get80hz();
	}

/* clear input */
draw_mp();
show_mouse();
}