Changeset 13

Show
Ignore:
Timestamp:
12/07/07 12:43:19 (1 year ago)
Author:
charlie137
Message:

Correct a bug in Surface class

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/guisterax/src/display.d

    r10 r13  
    178178        SDL_Rect dest; 
    179179        dest.x = cast(int)round(pos.x); 
    180         dest.y = m_screen.h - cast(int)round(pos.y + surf.h); 
     180        int h = (src)?src.h : surf.h; 
     181        dest.y = m_screen.h - cast(int)round(pos.y + h); 
    181182        dest.w = surf.surf.w; 
    182183        dest.h = surf.surf.h; 
  • trunk/guisterax/src/surface.d

    r10 r13  
    7979        super(); 
    8080        this.surf = surf; 
    81         super.surf = surf.surf; 
    8281        this.x = x; this.y = y; this._w = w; this._h = h; 
    8382        pos = Vect(-w / 2, -h / 2); 
     
    8584     
    8685    void draw(Display disp, in Vect pos) { 
    87         disp.blit(this, pos + this.pos, x, y, w, h); 
     86        disp.blit(this.surf, pos + this.pos, x, y, w, h); 
    8887    } 
    8988};