avoid using FL internally for all south facing units,

...we now have the info at the redraw level, so why bother...
This commit is contained in:
Jérémy Rosen 2009-01-31 18:41:45 +00:00
parent e70da2b51d
commit 8f1032ff56
2 changed files with 11 additions and 12 deletions

View File

@ -1837,10 +1837,6 @@ void unit::redraw_unit(game_display& disp, const map_location& loc, const bool f
if(utils::string_bool(get_state("stoned"))) params.image_mod +="~GS()";
if(facing_ == map_location::SOUTH_WEST || facing_ == map_location::SOUTH_EAST || facing_ == map_location::SOUTH ) {
params.image_mod +="~FL(vertical)";
params.halo_mod +="~FL(vertical)";
}
const frame_parameters adjusted_params = anim_->get_current_params(params,true);
@ -2039,12 +2035,6 @@ bool unit::invalidate(const map_location &loc)
params.blend_ratio = 0.25;
}
params.image_mod = image_mods();
if(facing_ == map_location::SOUTH_WEST ||
facing_ == map_location::SOUTH_EAST ||
facing_ == map_location::SOUTH ) {
params.image_mod +="~FL(vertical)";
params.halo_mod +="~FL(vertical)";
}
//get_animation()->update_last_draw_time();
frame_parameters adjusted_params= get_animation()->get_current_params(params);

View File

@ -394,6 +394,7 @@ void unit_frame::redraw(const int frame_time,bool first_time,const map_location
bool facing_west = direction == map_location::NORTH_WEST || direction == map_location::SOUTH_WEST;
#endif
bool facing_north = direction == map_location::NORTH_WEST || direction == map_location::NORTH || direction == map_location::NORTH_EAST;
if(primary) facing_north = true;
game_display::get_singleton()->render_unit_image(x + current_data.x- image->w/2,
y + current_data.y- image->h/2,
(display::tdrawing_layer)(display::LAYER_UNIT_FIRST+current_data.drawing_layer),
@ -413,10 +414,18 @@ void unit_frame::redraw(const int frame_time,bool first_time,const map_location
break;
case map_location::SOUTH_EAST:
case map_location::SOUTH:
orientation = halo::VREVERSE;
if(primary) {
orientation = halo::NORMAL;
} else {
orientation = halo::VREVERSE;
}
break;
case map_location::SOUTH_WEST:
orientation = halo::HVREVERSE;
if(primary) {
orientation = halo::HREVERSE;
} else {
orientation = halo::HVREVERSE;
}
break;
case map_location::NORTH_WEST:
orientation = halo::HREVERSE;