Beispiel #1
0
static void
update(struct game_state *gs)
{
	if (inner_state.state != IS_LEVEL_CLEARED &&
	  inner_state.state != IS_LEVEL_TRANSITION)
		update_eye();

	update_crosshair();
	update_background();
	update_water();
	update_particles();
	update_explosions();

	if (ship_is_visible()) {
		update_ship();
		update_missiles();
		update_bombs();
		update_lasers();
		update_foes();
	}

	update_powerups();
	update_in_game_texts();

	if (inner_state.state == IS_IN_GAME) {
		update_multiplier();
		update_combo();
	}

	if (inner_state.state == IS_GAME_OVER) {
		if (inner_state.tics >= GAME_OVER_FADE_IN_TICS) {
			if (!update_stats_table()) {
				gc.score += game_over_stats.bonus;
				set_inner_state(IS_RANK);
			}
		}
	}

	if (inner_state.state == IS_LEVEL_CLEARED) {
		if (inner_state.tics >= LEVEL_CLEARED_FADE_IN_TICS) {
			if (!update_stats_table()) {
				gc.score += game_over_stats.bonus;
				set_inner_state(IS_LEVEL_TRANSITION);
			}
		}
	}

	update_level_tics();
	update_inner_state();

	if (serializing)
		serialize();
}
Beispiel #2
0
void update_game(game *g) {
    if(g->status == Quit) {
        del_game(g);
    } else {
        if(first_a == NULL)
            g->status = Win;
        else {
            update_shoots();
            update_asteroids();
            update_collisions(g);

            update_ship(g, first_a);
        }
    }
}
void ship_flags_dlg::OnOK()
{
	object *objp;

	objp = GET_FIRST(&obj_used_list);
	while (objp != END_OF_LIST(&obj_used_list)) {
		if ((objp->type == OBJ_START) || (objp->type == OBJ_SHIP)) {
			if (objp->flags & OF_MARKED)
				update_ship(objp->instance);
		}

		objp = GET_NEXT(objp);
	}

	CDialog::OnOK();
}
void ShipSpecialDamage::OnOK() 
{
	UpdateData(TRUE);

	int i;

	if (m_inner_rad > m_outer_rad) {
		MessageBox("Inner radius must be less than outer radius");
		return;
	}

	for ( i = 0; i < num_selected_ships; i++ ) {
		update_ship(m_selected_ships[i]);
	}

	CDialog::OnOK();
}
Beispiel #5
0
void update()
{
    update_starfield(stars, get_ship_rotation(ship));
    update_ship(ship);
}