void visual_system_impl::init_eye() { // no eye is selected if camera name is incorrect to show problem visually!!! // please don't change selection logic #if 0 eye_ = (!props_.channel.camera_name.empty()) ? find_object<visual_control_ptr>(this, props_.channel.camera_name) : find_first_object<visual_control_ptr>(this) ; if (!eye_ && !props_.channel.camera_name.empty()) LogWarn("Can't find camera: " << props_.channel.camera_name); #else eye_ = find_object<visual_control_ptr>(this, props_.channel.camera_name); if (!eye_ && !props_.channel.camera_name.empty()) LogWarn("Can't find camera: " << props_.channel.camera_name); if(!eye_) eye_ = find_first_object<visual_control_ptr>(this) ; #endif #if 0 viewport_->SetClarityScale(props_.channel.pixel_scale); viewport_->set_geom_corr(props_.channel.cylindric_geom_corr ? victory::IViewport::explicit_cylinder : victory::IViewport::no_geom_corr); init_frustum_projection(); #endif update_eye(); }
void visual_system_impl::update(double time) { system_base::update(time); // scene_->update(time); if(!free_cam_) update_eye(); }
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(); }