Changeset 26 for trunk/Classes/unit.cpp


Ignore:
Timestamp:
2010-05-28 07:39:52 (2 years ago)
Author:
kpoole
Message:

Episode 5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Classes/unit.cpp

    r19 r26  
    4242#define WRN_CONFIG LOG_STREAM(warn, config) 
    4343#define ERR_CONFIG LOG_STREAM(err, config) 
     44 
     45extern bool gIsDragging; 
    4446 
    4547namespace { 
     
    19811983        getUnitTextureAtlasInfo(buf, mods, ellipse_front); 
    19821984    } 
    1983     //if (ellipse_back != NULL) { 
    1984     if (ellipse_back.mapId != 0) { 
    1985         //disp.drawing_buffer_add(display::LAYER_UNIT_BG, loc, 
    1986         disp.drawing_buffer_add(display::LAYER_UNIT_FIRST, loc, 
    1987             display::tblit(xsrc, ysrc +adjusted_params.y-ellipse_floating, ellipse_back)); 
    1988     } 
    1989  
    1990     //if (ellipse_front != NULL) { 
    1991     if (ellipse_front.mapId != 0) { 
    1992         //disp.drawing_buffer_add(display::LAYER_UNIT_FG, loc, 
    1993         disp.drawing_buffer_add(display::LAYER_UNIT_FIRST, loc, 
    1994             display::tblit(xsrc, ysrc +adjusted_params.y-ellipse_floating, ellipse_front)); 
     1985     
     1986//  if (gIsDragging == false) 
     1987    { 
     1988        //if (ellipse_back != NULL) { 
     1989        if (ellipse_back.mapId != 0) { 
     1990            //disp.drawing_buffer_add(display::LAYER_UNIT_BG, loc, 
     1991            disp.drawing_buffer_add(display::LAYER_UNIT_FIRST, loc, 
     1992                                display::tblit(xsrc, ysrc +adjusted_params.y-ellipse_floating, ellipse_back)); 
     1993        } 
     1994 
     1995        //if (ellipse_front != NULL) { 
     1996        if (ellipse_front.mapId != 0) { 
     1997            //disp.drawing_buffer_add(display::LAYER_UNIT_FG, loc, 
     1998            disp.drawing_buffer_add(display::LAYER_UNIT_FIRST, loc, 
     1999                                display::tblit(xsrc, ysrc +adjusted_params.y-ellipse_floating, ellipse_front)); 
     2000        } 
    19952001    } 
    19962002 
     
    20172023        } 
    20182024 
    2019         if (movement_file) 
     2025        if (movement_file) //&& gIsDragging == false) 
    20202026        { 
    20212027            textureAtlasInfo tinfo; 
     
    20582064                 
    20592065            textureAtlasInfo crown; 
    2060             if (getTextureAtlasInfo("misc/leader-crown.png", crown))  
     2066            if (/*gIsDragging==false &&*/ getTextureAtlasInfo("misc/leader-crown.png", crown))  
    20612067            { 
    20622068                disp.drawing_buffer_add(display::LAYER_UNIT_BAR, 
     
    20652071        } 
    20662072 
    2067         for(std::vector<shared_string>::const_iterator ov = overlays().begin(); ov != overlays().end(); ++ov) { 
    2068             const surface ov_img(image::get_image(*ov, image::SCALED_TO_ZOOM)); 
    2069             if(ov_img != NULL) { 
    2070                 disp.drawing_buffer_add(display::LAYER_UNIT_BAR, 
    2071                     loc, display::tblit(xsrc, ysrc +adjusted_params.y, ov_img)); 
     2073        //if (gIsDragging == false) 
     2074        { 
     2075            for(std::vector<shared_string>::const_iterator ov = overlays().begin(); ov != overlays().end(); ++ov) { 
     2076                const surface ov_img(image::get_image(*ov, image::SCALED_TO_ZOOM)); 
     2077                if(ov_img != NULL) { 
     2078                    disp.drawing_buffer_add(display::LAYER_UNIT_BAR, 
     2079                                            loc, display::tblit(xsrc, ysrc +adjusted_params.y, ov_img)); 
     2080                } 
    20722081            } 
    20732082        } 
Note: See TracChangeset for help on using the changeset viewer.