Changeset 13
- Timestamp:
- 12/07/07 12:43:19 (1 year ago)
- Files:
-
- trunk/guisterax/guisterax (modified) (previous)
- trunk/guisterax/src/display.d (modified) (1 diff)
- trunk/guisterax/src/surface.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/guisterax/src/display.d
r10 r13 178 178 SDL_Rect dest; 179 179 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); 181 182 dest.w = surf.surf.w; 182 183 dest.h = surf.surf.h; trunk/guisterax/src/surface.d
r10 r13 79 79 super(); 80 80 this.surf = surf; 81 super.surf = surf.surf;82 81 this.x = x; this.y = y; this._w = w; this._h = h; 83 82 pos = Vect(-w / 2, -h / 2); … … 85 84 86 85 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); 88 87 } 89 88 };
