fix two editor errors:
one in boolean logic and another in the terrain palette constructor. (also gets rid of some empty_rect redefinitions.)
This commit is contained in:
parent
ccbadaef76
commit
1fb8195de9
5 changed files with 4 additions and 7 deletions
|
@ -1348,9 +1348,9 @@ void map_editor::main_loop() {
|
|||
int mousex, mousey;
|
||||
const int scroll_speed = preferences::scroll_speed();
|
||||
Uint8 mouse_flags = SDL_GetMouseState(&mousex,&mousey);
|
||||
const bool l_button_down = (0 == (mouse_flags & SDL_BUTTON_LMASK));
|
||||
const bool r_button_down = (0 == (mouse_flags & SDL_BUTTON_RMASK));
|
||||
const bool m_button_down = (0 == (mouse_flags & SDL_BUTTON_MMASK));
|
||||
const bool l_button_down = (0 != (mouse_flags & SDL_BUTTON_LMASK));
|
||||
const bool r_button_down = (0 != (mouse_flags & SDL_BUTTON_RMASK));
|
||||
const bool m_button_down = (0 != (mouse_flags & SDL_BUTTON_MMASK));
|
||||
|
||||
const gamemap::location cur_hex = gui_.hex_clicked_on(mousex,mousey);
|
||||
if (cur_hex != selected_hex_) {
|
||||
|
|
|
@ -45,7 +45,7 @@ terrain_palette::terrain_palette(display &gui, const size_specs &sizes,
|
|||
selected_bg_terrain_ = terrains_[0];
|
||||
}
|
||||
update_report();
|
||||
adjust_size();
|
||||
//adjust_size();
|
||||
}
|
||||
|
||||
void terrain_palette::adjust_size() {
|
||||
|
|
|
@ -1091,7 +1091,6 @@ const std::string& get_floating_label_text(int handle)
|
|||
|
||||
SDL_Rect get_floating_label_rect(int handle)
|
||||
{
|
||||
static const SDL_Rect empty_rect = {0,0,0,0};
|
||||
const label_map::iterator i = labels.find(handle);
|
||||
if(i != labels.end()) {
|
||||
const surface surf = i->second.create_surface();
|
||||
|
|
|
@ -65,7 +65,6 @@ int halo_id = 1;
|
|||
|
||||
bool hide_halo = false;
|
||||
|
||||
static const SDL_Rect empty_rect = {0,0,0,0};
|
||||
|
||||
effect::effect(int xpos, int ypos, const std::string& img, ORIENTATION orientation, int lifetime)
|
||||
: images_(img), orientation_(orientation), origx_(xpos), origy_(ypos), x_(xpos), y_(ypos),
|
||||
|
|
|
@ -952,7 +952,6 @@ SDL_Rect menu::get_item_rect(int item) const
|
|||
|
||||
SDL_Rect menu::get_item_rect_internal(size_t item) const
|
||||
{
|
||||
const SDL_Rect empty_rect = {0,0,0,0};
|
||||
unsigned int first_item_on_screen = get_position();
|
||||
if (item < first_item_on_screen ||
|
||||
size_t(item) >= first_item_on_screen + max_items_onscreen()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue