Changeset 532

Show
Ignore:
Timestamp:
05/02/08 18:48:50 (8 months ago)
Author:
LeoD
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/defend/game/hud/MiniMap.d

    r530 r532  
    9090         
    9191        sprite = new Sprite(texture, Rect(0, 0, width - 1, height - 1), true); 
     92        sprite.scaling = 128.0f / width; 
     93         
    9294        position = vec2i(renderer.width - 150, renderer.height - HUD_HEIGHT + 10); 
    9395    } 
  • trunk/src/gen/util/Sprite.d

    r465 r532  
    2323    Rect area; 
    2424 
     25    float _scaling = 1.f; 
     26 
    2527public: 
    2628    mixin MAllocator; 
     
    3032    Texture texture() { return _texture; } 
    3133    Rect rect() { return area; } 
     34 
     35    void scaling(float s) { _scaling = s; } 
    3236 
    3337    this(char[] file, bool reverse = false) 
     
    9094        renderer.pushMatrix(); 
    9195        renderer.translate(position.x, position.y, 0.0); 
     96        renderer.scale(_scaling); 
    9297         
    9398        render();