Trivial developer-only change: Fixed various double->int and newline warnings.
This commit is contained in:
parent
1c319625bc
commit
3d67c495b3
4 changed files with 11 additions and 11 deletions
|
@ -119,14 +119,14 @@ const std::string& effect::current_image()
|
|||
void effect::rezoom()
|
||||
{
|
||||
const double new_zoom = disp->zoom();
|
||||
x_ = (x_*new_zoom)/zoom_;
|
||||
y_ = (y_*new_zoom)/zoom_;
|
||||
x_ = int((x_*new_zoom)/zoom_);
|
||||
y_ = int((y_*new_zoom)/zoom_);
|
||||
|
||||
zoom_ = new_zoom;
|
||||
|
||||
surf_.assign(image::get_image(current_image_,image::UNSCALED));
|
||||
if(surf_ != NULL && zoom_ != 1.0) {
|
||||
surf_.assign(scale_surface(surf_,surf_->w*zoom_,surf_->h*zoom_));
|
||||
surf_.assign(scale_surface(surf_,int(surf_->w*zoom_),int(surf_->h*zoom_)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -261,4 +261,4 @@ void unrender()
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,4 +49,4 @@ void unrender();
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -323,4 +323,4 @@ config default_map_generator::create_scenario(const std::vector<std::string>& ar
|
|||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -296,8 +296,8 @@ bool unit_attack_ranged(display& disp, unit_map& units, const gamemap& map,
|
|||
unit_halo_y = new_halo_y;
|
||||
|
||||
if(unit_halo_image != NULL && !disp.fogged(a.x,a.y)) {
|
||||
const int halo_xpos = disp.get_location_x(a)+disp.hex_size()/2 + unit_halo_x*disp.zoom();
|
||||
const int halo_ypos = disp.get_location_y(a)+disp.hex_size()/2 + unit_halo_y*disp.zoom();
|
||||
const int halo_xpos = int(disp.get_location_x(a)+disp.hex_size()/2.0 + unit_halo_x*disp.zoom());
|
||||
const int halo_ypos = int(disp.get_location_y(a)+disp.hex_size()/2.0 + unit_halo_y*disp.zoom());
|
||||
|
||||
unit_halo_effect.assign(halo::add(halo_xpos,halo_ypos,*unit_halo_image));
|
||||
} else {
|
||||
|
@ -361,8 +361,8 @@ bool unit_attack_ranged(display& disp, unit_map& units, const gamemap& map,
|
|||
new_halo_x *= -1;
|
||||
}
|
||||
|
||||
new_halo_x *= disp.zoom();
|
||||
new_halo_y *= disp.zoom();
|
||||
new_halo_x = int(new_halo_x*disp.zoom());
|
||||
new_halo_y = int(new_halo_y*disp.zoom());
|
||||
|
||||
static const std::string default_missile(game_config::missile_n_image);
|
||||
static const std::string default_diag_missile(game_config::missile_ne_image);
|
||||
|
@ -645,7 +645,7 @@ bool unit_attack(display& disp, unit_map& units, const gamemap& map,
|
|||
new_halo_x *= -1;
|
||||
}
|
||||
|
||||
new_halo_x *= disp.zoom();
|
||||
new_halo_x = int(new_halo_x*disp.zoom());
|
||||
|
||||
xoffset = int(double(xoffset)*disp.zoom());
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue