X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fsdl%2Futility.cpp;h=061d64c048a0c591eb1f6f3614d86dd2169519cd;hb=a0f72bcd94a77cd398ec82bdce8182bdc5b607f6;hp=94eb6252465e8238953c76966c08662edc19b116;hpb=cc3d698b8c1ad09d7a3f9e3f28bc84e0ac1735ea;p=l2e.git diff --git a/src/sdl/utility.cpp b/src/sdl/utility.cpp index 94eb625..061d64c 100644 --- a/src/sdl/utility.cpp +++ b/src/sdl/utility.cpp @@ -2,7 +2,7 @@ #include -using geometry::Vector; +using math::Vector; namespace sdl { @@ -15,7 +15,7 @@ void HorizontalLine(SDL_Surface *dst, const Vector &position, unsigned int SDL_FillRect(dst, &destRect, color); } -void VerticalLine(SDL_Surface *dst, const geometry::Vector &position, unsigned int length, Uint32 color) { +void VerticalLine(SDL_Surface *dst, const math::Vector &position, unsigned int length, Uint32 color) { SDL_Rect destRect; destRect.x = position.X(); destRect.y = position.Y(); @@ -41,13 +41,20 @@ void OutlineRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color) { destRect.w = dstrect->w; destRect.h = 1; SDL_FillRect(dst, &destRect, color); - destRect.y += dstrect->h - 1; + destRect.x = dstrect->x; + destRect.y = dstrect->y + dstrect->h - 1; + destRect.w = dstrect->w; + destRect.h = 1; SDL_FillRect(dst, &destRect, color); + destRect.x = dstrect->x; destRect.y = dstrect->y; destRect.w = 1; destRect.h = dstrect->h; SDL_FillRect(dst, &destRect, color); - destRect.x += dstrect->w - 1; + destRect.x = dstrect->x + dstrect->w - 1; + destRect.y = dstrect->y; + destRect.w = 1; + destRect.h = dstrect->h; SDL_FillRect(dst, &destRect, color); }